Hi,
Let's assume that I have create an OSGi Service in AEM and I have set its sling.servlet.paths property to '/bin/testservice'. Assuming that this service is active and the AEM instance is running, how do I call this service and obtain the service response from a Java snippet that is running on my local system(outside the AEM server)?
Thanks in advance
Solved! Go to Solution.
HI
use the HTTP client of your choice and call this URL? You might need to add proper authentication (ootb basic auth is working).
Jörg
HI
use the HTTP client of your choice and call this URL? You might need to add proper authentication (ootb basic auth is working).
Jörg
Jörg Hoh wrote...
HI
use the HTTP client of your choice and call this URL? You might need to add proper authentication (ootb basic auth is working).
Jörg
Hi Jörg,
The solution that you have mentioned worked out for me. I used the Apache HTTP Client and I connected to the CQ instance through the DefaultHttpClient. Then, using the URIBuilder, I created a URL that points to my service(with request parameters) and instantiated an HttpGet request with this URI. Then I consumed the response of the DefaultHttpClient with a ResponseHandler.
Thanks a ton for the quick response.
Shriram
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies