将Adobe AEM捆绑包作为restful webservices展示 [英] Expose Adobe AEM bundles as restful webservices

查看:173
本文介绍了将Adobe AEM捆绑包作为restful webservices展示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Adobe aem包。我想把它作为一个宁静的网络服务公开。我怎么能这样做。我看到有关于使用第三方休息服务的解释,但没有足够的信息来说明如何将您自己的AEM软件包作为休息服务公开。

I've created an Adobe aem bundle. I want to expose it as a restful web-service.How can I do it. I see there are explanation for consuming a third-party rest service but not enough information as to how to expose your own AEM bundle as a rest service.

推荐答案

由于AEM建立在 REST 之上体系结构概念它通过Servlet公开Restful端点。您可以使用默认的SlingServlet(如GET / POST方法)或通过扩展 SlingAllMethodsServlet (即接受GET或POST的Sling Servlet)

As AEM is built on top of REST architectural concept it exposes Restful endpoints via Servlets. You can use the default SlingServlets like GET/POST methods or write your own Servlets by extending the SlingAllMethodsServlet (i.e. Sling Servlet that accepts GETs or POSTs)

能够执行REST请求的其他客户端可以发送通过执行GET或POST向您的AEM(调用您的AEM Servlet)发出REST请求。

Other clients that are able to perform REST requests can sent REST requests to your AEM (calling your AEM Servlet) by performing GET or POSTs.

使用默认的吊索GET获取OOTB内容的示例JSON表示Servlet 可以通过以下网址看到,它会根据选择器

For an example JSON representation of the OOTB content by using the default sling GET Servlet can be seen by below urls which renders you the content in JSON format with child levels(depth content) based on the selector

http://localhost:4502/cf#/content/geometrixx-outdoors/en/men/coats.json
http://localhost:4502/content/geometrixx-outdoors/en/men/coats.1.json

来自客户端有多种方法可以调用这些像AJAX,JAVA SWING应用程序,HTTP FORM Post等的Servlet。

from the client end there are multiple ways of calling these Servlets like by AJAX, JAVA SWING applications, HTTP FORM Post, etc,.

以下文章中显示了一些示例。
AJAX CALL TO SERVLET 使用.net致电AEM 使用AEM POST CALL

Some examples are shown in below articles. AJAX CALL TO SERVLET, USING .net call to AEM, Using AEM POST CALL

〜希望有帮助

这篇关于将Adobe AEM捆绑包作为restful webservices展示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆