Expand my Community achievements bar.

Need to consume the restful webservice

Avatar

Level 6

Hi Team,

I need to develop the component which contain drop down  and that dropdown i need to consume service from

http://services.groupkt.com/country/get/all

What are all methodology  to archive this.

Regards

Manikantha R

2 Replies

Avatar

Level 10

This service returns a simple json object.

What are your requirements/constraints? Do you have any security constraints? You could directly consume it in javascript/jquery using $.getjson() or server side using HTL/Sling models if you have any orchestration requirements. You could also do it in various other frameworks/libraries.

check-

Adobe Experience Manager Help | Creating Adobe Experience Manager bundles that invoke third party Re...

https://api.jquery.com/jquery.getjson/

Ajax/jQuery.getJSON Simple Example — SitePoint

Avatar

Level 10

As @gauravb10066713 mentions you can write a custom AEM service that is able to use Java to consume a 3rd party RESTFul web service. In our little example - we consume a Google RESTFul service and displays the result in an AEM component.

Creating an Adobe Experience Manager 6.4 HTL Component that displays data from a Restful Web Service