Wl.client.connect Sending Request
Solution 1:
Starting IBM MobileFirst Platform 7.0, applications are required to perform client instance registration before they are able to send additional requests to the MobileFirst Server. Registration
and connect
, mentioned in the question, are part of those. WLHybridRequestSender
and WLRequestSender
are classes used to accomplish this. Hybrid apps send their requests using WLHybridRequestSender
, and WLRequestSender
is the class responsible for sending the registration request. The rest of their function is internal to the framework.
According to the provided stack trace of the failing flow, what is happening is that WLRequestSender
cannot handle the response for the registration request. Instead of a proper JSON response it gets something like:
{
document.write(warningString);
}
else{
document.cookie = 'acceptsCookies=yes; expires=Fri, 13-Apr-1970 00:00:00 GMT';
}
According to the logs from the happy flow, it can be seen that there already is registration data on the client side (there is a call to get the client instance header, and then imminently a request to connect is executed), and therefore the registration request is not sent. Instead the connect request is executed as expected.
You mention that WebSEAL is used, and the provided information is not enough to understand why it is failing (it could be that for whatever reason WebSEAL is altering the request sent) - please provide the following:
- WireShark logs from the time of failure
- full server logs
Solution 2:
I solved the issue whit acl make like this:
pdadmin sec_master> acl create endpoint_auth
pdadmin sec_master> acl modify endpoint_auth set unauthenticated Tr
pdadmin sec_master> acl modify endpoint_auth setany-other Tr
pdadmin sec_master> acl attach /WebSEAL/<myObjectSpace>/worklight/authorization/v1/clients/instance endpoint_auth
Now all work fine; only registration request endpoint is available for the unauthenticated users What do you think about this solution? Regards
Post a Comment for "Wl.client.connect Sending Request"