Issue : 

Some issues were reported from developers who had implemented their Entitlement Server using DPS APIs, which reads something like : After implementing when signed-In into the Entitlement server , the SignInWithCredentials webservice was working fine in our server but when the app is trying to call the entitlements webservice, I got  "Cannot Update Library -The connection to the server failed error" .

Solution:

Below are outlined some diagnostic steps you can try. It's very likely this is a minor problem with your entitlements webservice for the following reasons:

The SignInWithCredentials webservice is working correctly and returning a valid authtoken. This indicates you've specified the correct URL in App Builder for the services and the app is able to connect to at least one of them.There is nothing different that happens from the app or from Adobe when the second call – entitlements – is made. The Adobe servers – and the integrator ID - do not become involved until the final call verifyEntitlement. Because the first call – SignInWithCredentials – is working correctly, it's safe to assume the second call is also reaching your server and the error is occurring there.There are a couple things you can try to help diagnose the problem:

1. Run tests against your webservices in a browser to make sure they're adhering to the parameters in the Adobe specifications. For example:

FIRST CALL:  {Service path URL}/SignInWithCredentials.php?appID=com.xxxx.xx&appVersion=xx&uuid=xxxx&emailAddress=xxx&password=xxx

… RETURNS AUTHTOKEN (eg): 73a9207bdbdaf57d07c9c0036da86652

SECOND CALL:  {Service path URL}/entitlements?appID=com.xxxx.xx&appVersion=xx&authToken=73a9207bdbdaf57d07c9c0036da86652

… RETURNS LIST OF FOLIOS (eg):

 

<result httpResponseCode="200">
<entitlements>
<productId>EAST_April</productId>
<productId>EAST_March</productId>
<productId>EAST_May</productId>
</entitlements></result>

… Make sure you check both the calls AND the return values.  The app is expecting a very strict set of data back from both calls and any deviation will cause a problem.

2. Install Charles HTTP proxy for your iPad (http://www.charlesproxy.com/).  This will allow you to see the exact HTTP calls the app is making and receiving from your entitlement server. They should look very similar to the calls and returns what I listed in the above tests.  Hopefully, one or more of the return values is incorrect and this will help you to diagnose the problem.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy