1
votes

I have build the app in worklight 6.1 version and which we have tested in our local environment with no issue at all. I have wrote the adapter procedure and which is not secure till now having simple procedure method where we won't required any security.

Now after deploying the app on production environment , I am not able to call worklight procedure at all. Some logs are getting displaying on Xcode console given below

2014-01-06 11:23:36.294 PROJECT[340:60b] DeviceAuthManager:getWorklightUniqueDeviceId --> returning UUID from the keychain
2014-01-06 11:23:36.666 PROJECT[340:60b] Adding request to wl_antiXSRFRealm challenge handler's waiting list
2014-01-06 11:23:36.668 PROJECT[340:60b] Adding request to wl_deviceNoProvisioningRealm challenge handler's waiting list  

and logs which are getting displaying on server side(IBM http server) given below

/PROJECT/apps/services/api/PROJECT/ipad/0/query HTTP/1.1" 401 165
IPADDRESS - - [05/Jan/2014:23:54:36 -0600] "POST /PROJECT/apps/services/api/PROJECT/ipad/0/query HTTP/1.1" 401 166
IPADDRESS - - [05/Jan/2014:23:54:36 -0600] "POST /PROJECT/apps/services/api/PROJECT/ipad/0/query HTTP/1.1" 401 166  

Just let me know what could be the reason for this whether i forgot something when deploying on the production.

And also let me know whether adapter must be secure or we can keep without any security on server side.

After Deploying the adapter on production , am calling the adapter using method given below

function Authentication(user,pass) {
    console.log('Hi Authentication');
    busyInd.show();
    var invocationData = {
            adapter : 'CORE_ADAPTER',
            procedure : 'Authentication',
            parameters : [ user,pass ]
        };

    WL.Client.invokeProcedure(invocationData,{
        onSuccess : AuthSuccess,
        onFailure : function AuthFailure(response){ busyInd.hide();console.log("reponse failure  "+response);},
    });
}  

As per the Srik Comment given below At the time of app launch I am getting

2014-01-06 17:24:31.710 PROJECT[53760:c07] DEBUG:  addDeviceIDHeader deviceIDSuccessCallback
2014-01-06 17:24:31.711 PROJECT[53760:c07] DEBUG:  connectOnStartup finalizeInit
2014-01-06 17:24:31.712 PROJECT[53760:c07] DEBUG:  before: app init onSuccess
2014-01-06 17:24:31.712 PROJECT[53760:c07] DEBUG:  after: app init onSuccess
2014-01-06 17:24:31.712 PROJECT[53760:c07] DEBUG:  added onPause event handler 
2014-01-06 17:24:31.712 PROJECT[53760:c07] DEBUG:  wlclient init success  

and ConnectOnStartup is true in initOption.js file, After successfully init only app is calling adapter.

I have checked this with wireshark worklight is adding one more slash at that time like this

http://localhost:10080/HDFC_SECURITIES_MEAP//apps/services/ 
1
When you mention "not able to call worklight procedure at all", what exactly is happening in the app ? Is the onFailure callback being called ? If so, what is the response from the server.Srik
NO nothing is getting called, even it is not going into onFailure....because on adapter procedure I have put some logs whether i am getting call or not. It is not showing any logs. I think it is not able to call adapter. Same app is working perfectly fine with our local environment .vishal_g
You do not mention whether or not you have deployed the adapter. If you did deploy it then please add the code where you call the procedure.Idan Adar
Please check the edited question where i have mentioned the code on client side to call adapter procedure.vishal_g
Are you doing a connect prior to the invokeProcedure ? If yes, did that succeed ? If not, can you use Wireshark or a similar network sniffer to ensure that the calls are reaching the worklight server.Srik

1 Answers

1
votes

This is resolved now after removing slash at the end of url in worlight.plist file. This is the testing with ios5 , ios6, ios7` and all build are working with no issue even not a single time we are getting exception. And .plist is completely editable.