0
votes

I am using IBM worklight I depoly it on iPhone and when I try to call a soap service using my adapter I get error that I can't understand the cause of it. This is the log I got:

2014-06-24 20:57:26.375 myApp[842:60b]  user name XXXXX
2014-06-24 20:57:26.376 myApp[842:60b] [DEBUG] [NONE] establishSSLClientAuth
2014-06-24 20:57:26.378 myApp[842:60b] WLUserAuthManager.getCertificateIdentifierFromEntity: com.worklight.userenrollment.certificate:com.myApp.dev
2014-06-24 20:57:26.381 myApp[842:60b] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists:  false
2014-06-24 20:57:26.383 myApp[842:60b] [DEBUG] [NONE] Request[http://192.168.23.1:10080/myApp/apps/services/api/myApp/iphone/query]
2014-06-24 20:57:26.416 myApp[842:60b] [ERROR] [NONE] [http://192.168.23.1:10080/myApp/apps/services/api/myApp/iphone/query] failure. state: 500, response: The application 'myApp' with version=1.0 does not support the iphone environment
2014-06-24 20:57:26.417 myApp[842:60b] Loading stop
2014-06-24 20:57:26.418 myApp[842:60b]  MyModel::error::{"status":500,"invocationContext":null,"errorCode":"UNEXPECTED_ERROR","errorMsg":"The application 'myApp' with version=1.0 does not support the iphone environment"}

Note: The app is deployed on Android with no problem.

Edit:

I forgot to say that I deployed the iphone app with no problem. But this message is shown when I try to call an adapter calling a web service.

2
After creating your project and adding the iphone environment, did you make sure to select run as -> run on worklight development server?Idan Adar

2 Answers

1
votes

As Idan stated above this error is likely due to the fact that you do not have version 1.0 of the application "myApp" deployed successfully to your Worklight Server. To accomplish this in WL Studio just right click the iPhone enviornment in the below location and do run as-> run on Worklight Development Server:

/"Project Name"/apps/myApp/iphone

Also make sure you have the correct version listed inside of your application descriptor for this specific environment. You can verify that the application has been deployed successfully by seeing the following messages inside of your console:

Deploying application 'myApp' with environment 'iphone' to Worklight Server...
Application 'myApp' deployed successfully with environment 'iphone'

Just as a quick tip, you can also test your adapters inside of WL Studio by right-clicking the specific adapter and choosing Run As -> Invoke Worklight Procedure. Here you can choose which procedure you want to test and even include parameters into the requests

0
votes

The answer of @Jaalger2 is helpful, but I made another thing with it. I am not sure that what I did is the real fix, But here is what I did.

I changed in the console this field "App Authentication:" from "Enabled, blocking" to "Enabled, servicing"

enter image description here