-skullblower
Solved! Go to Solution.
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.
It all depends on what 3rd party service you want to consume in AEM. If you want to consume a 3rd party SOAP Stack that exposes a WSDL - then create Java proxy classes and wrap those in an OSGi bundle as shown in 2nd article. If you want to consume a 3rd party Restful service (ie - a Google Restful service that uses Map functionality) then 1st approach is best to use.
Views
Replies
Total Likes
I agree to your point. let me give a scenario,
Lets say,
Just for an example sake (i cannot share the information so i am making up some thing here),
When I login to a banking application i have a some REST API calls which exposes information as Profile API, Account Balance API, Transactions API, Print My Statement API, Recent Transactions API, etc .... there are about 15-20 REST API calls. (consider security is all implemented by some Oauth or SiteMinder etc..)
I might have to trigger some workflows, like when a check is deposited and it failed, i need to send out an email to a certain group with the check information so they can call the customer. Or sending an alert to a Payee about their recent email transaction.
which one should i prefer now ?
Views
Replies
Total Likes
If you have Choice on what Web service technology to use to consume a 3rd party service and pull in information into AEM, use Restful API. You can even build a custom AEM workflow step that does this. (That would make a good AEM article). So if you looking on what way to use in AEM (or from a workflow in AEM), I would use Restful. It's more lightweight than converting a 3rd party Soap stack into Java proxy classes.
However, if the 3rd party endpoint exposes a WSDL, then convert that WSDL into Java proxy classes. You could also use these Java proxy files in a custom workflow step.
Hope this helps.
Views
Replies
Total Likes
Hi , points from this corner,
As you have option to get the data from both client side and server side, I would have prefer server side. There could be many details you might want to keep with you. In real time you might not need all the detail all time. Pulling data from ajax might be a bad option if code is written badly and data is too much, it can affect client side performance ( which customer hates ). Again if user forget to logout, he / she can leave important data on browser mistakenly which is never a good option.
You can pull all data from secure server via rest API call, keep it on your server and make client call to your server when ever you need some data. Don't pull data you don't need. So I feel what you mentioned above, you can go for it.
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.
Perfecto. Thanks for your response scott and edubey. It makes perfect sense.
Views
Replies
Total Likes