Question

I have implemented a Push Notification adpater and would like backend system to call the procedure in order to submit notification.

With reference to this post, http://server:port/dev/invoke?adapter=adapterName&procedure=procedureName&parameters=1,2,3 can be used but it works in development environment only.

At the end of the post it is mentioned that http://server:port/context/invoke?adapter=adapterName&procedure=procedureName&parameters=1,2,3 can be used to invoke the adapter.

(1) May I know whether it is supported in production environment only? Because it returned HTTP method GET is not supported by this URL in development environment.

(2) Noted that we might need to define securityTest="wl_unprotected" for the adapter and thus the adapter is not protected. What will be the best way to achieve the goal for backend sytem to call the adapter with security control?

Was it helpful?

Solution

In Worklight 5, Worklight Studio uses Jetty within and the usage of a context root is not required. Only once moving your project to an application server such as Tomcat, WebSphere, Liberty, you have to specify it (in worklight.properties and application-descriptor.xml).

So,
in development - no.
in production - yes.

In Worklight 6 where Jetty has been replaced with Liberty, context root is now part of your project whether you are in development or production.

You will have to add the "wl_unprotected" securityTest to your procedure in the adapter XML.

As for protecting the requests, my guess is that your IT department can isolate and protect specific URLs and not allow using them in certain scenarios. You already have the URL structure for them to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top