0
votes

I am currently working on a push notifications demo using Worklight v6.0 Enterprise Edition.

As part of the demo, I created a new Worklight project in Worklight studio.

  • I also imported the push notifications sample project into the same workspace
  • I copied the supplied authenticationConfig.xml file from the push notification sample project into my new project (replacing the file)
  • I also modified the application-descriptor.xml in my new project to reference the securityTest in the authenticationConfig.xml file

If I test my PushNotifications adapter on my test server (part of the Eclipse development environment), the adapter runs properly. I test the server via a browser call http://hostName:10080/ProjectName/invoke?adapter=PushAdapter&procedure=submitNotification&parameters=["user","testdata"].

However, if I deploy the new app and adapter to my QA Worklight server, I have a problem with the adapter. When I access the adapter again from a browser pointing to the new server, I receive the error:

/*-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"i9k34qhnj7r25s8ab7v2m0sf3l"}}}*/

The app running on my device can connect to the server. I am hoping to have an external server write notifications for the demo using the adapter endpoint:

http://hostName:10080/ProjectName/invoke?adapter=PushAdapter&procedure=submitNotification&parameters=["user","testdata"]
1

1 Answers

1
votes

Try adding securityTest="wl_unprotected" to the procedure in the adapter XML.

Also, you wrote that you are moving between application servers (from the Eclipse development environment to a QA environment running Worklight Server) so I assume you have re-deployed the .war file containing the updated authenticationConfig.xml to the QA environment's application server that has Worklight Server installed on it?