Expand my Community achievements bar.

SOLVED

how to create a restful web service server in AEM?

Avatar

Level 2

Hi,

    I want to create a restful web service server in AEM author site,so I can call this web service via java script from other site.

please tell me how to :

   1. how to create this service in AEM author site?

    2.how to process the request without login in CQ author site or set the authentication information in the request and can allow the request pass the authentication?

    

thanks!

yifei

1 Accepted Solution

Avatar

Correct answer by
Level 10

As Sham as pointed out - you can create an OSGi bunlde that can invoke a Restful web service. You can also create a sling servlet that can be invoked from other clients via a Rest request. See this article:

http://helpx.adobe.com/experience-manager/using/post_files.html

It talks about how to create a sling servlet that accepts REST requests. In this use case, its a Java client and it sends files. But you will get the idea of how to develop an AEM Sling Servlet that other clients can communicate with. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

As Sham as pointed out - you can create an OSGi bunlde that can invoke a Restful web service. You can also create a sling servlet that can be invoked from other clients via a Rest request. See this article:

http://helpx.adobe.com/experience-manager/using/post_files.html

It talks about how to create a sling servlet that accepts REST requests. In this use case, its a Java client and it sends files. But you will get the idea of how to develop an AEM Sling Servlet that other clients can communicate with.