Conclusion - Consuming REST API or Web Service from AEM
-skullblower
-skullblower
Exactly -keep the code that invokes the 3rd party web service within an OSGi bundle (ie - a service, a servlet, or a custom workflow step). Make sure you follow this:

Never try to consume a 3rd party WS using JavaScript. Always use it via JAVA in an OSGi as discussed in the above articles.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.