问题
We have developed a Worklight-based Hybrid application with Native pages as well. Our start page is a native page from which we are invoking an adapter.
After upgrading to Worklight 6.1, this adapter invocation is now always failing in iOS 5, however continues to function correctly in iOS 6 and iOS 7.
When the adapter invocation fails, it returns raw HTML as the response: Adapter Failure Response.
In Xcode Console this is the error we see:
[ERROR] Worklight: -[WLRequest requestFailed:]:338::Status code='404' error='(null)' [ERROR] Worklight: -[WLClient onInvokeProcedureFailure:userInfo:]:696::response string=HTML returning from adapter
The same application in Worklight 6.0.0.x works OK in iOS 5, 6 and 7.
This sample application can be used to see the error.
回答1:
From tests made, it appears that the adapter invocation fails only in iOS 5 because the request sent contains double-slashes whereas in iOS 6 and 7 it contains one slash.
This can be verified in Wireshark:
- This is a defect
- There is not applicable workaround
Once the defect is fixed, it will be available via IBM Fix Central, as well as in the PMR that your customer needs to open anyway to get this fixed.
回答2:
Check your wlclient.properties file, especially wlServerContext property. Looks like you're trying to connect to invalid URL.
来源:https://stackoverflow.com/questions/20717048/ibm-worklight-6-1-adapter-invocation-failing-in-ios-5-after-upgrading-to-v6-1