Saturday, 9 November 2013

Creating Adobe Experience Manager services that invoke third party Restful web services

You can create an Adobe Experience Manager service that consumes data from a third-party Restful  web service and displays the data in an AEM web page. For example, assume that you have a requirement to create an AEM component that calculates the distance between two cities and displays the results in an AEM web page. In this situation, you can develop an OSGi bundle that contains Java classes located in the org.apache.http package that are able to invoke a third-party Restful service. The following illustration shows data being retrieved from a third-party Restful service and displayed in an AEM web page (JSP).

An AEM OSGi bundle invoking a third-party Restful service


The use case in this article is to calculate the distance between two cities, return the data within JSON, parse the JSON using an AEM page component (using JavaScript), and display the results in an AEM web page.

An AEM page that uses a Restful request to calculate the distance between two cities


To calculate the distance between two cities, the Google Distance Matrix API is used. For information about this API, see:

https://developers.google.com/maps/documentation/distancematrix/

To read this article, click  http://helpx.adobe.com/experience-manager/using/restful-services.html.

Note: For information about creating an AEM OSGi bundle that consumes a third-party WSDL, see http://scottsdigitalcommunity.blogspot.ca/2012/05/creating-adobe-cq-bundles-that-consume.html.

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel


No comments:

Post a Comment