Skip to main content
viren_pushpanay
Level 2
Oct 16, 2015 2:27 AM UTC
Solved

How do you create a SOAP service in CQ5 (AEM)

Does anyone know how to publish a SOAP service in CQ5? Found the following link but this looks more like a hack. Is there any other way to do it?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

AEM does not have the libs (including CXF) to expose a web service. You have really 2 choices. Assume you want to expose JCR data as a web service. You can follow that link. It talks about what you need to do. 

Or 2 - you can setup a web service on a web server (ie Tomcat) and code a Java bean and use Apache CXF and the JCR API. THe bean will expose a WSDL and use the JCR API to perform CRUD (Create, Replace, Update, and Delete) operations on the JCR Data. 

[img]CQWSDL.png[/img]

6 replies

viren_pushpanay
Level 2
Oct 16, 2015 2:27 AM UTC

Thanks mate. I rather go with the 2nd option as the 1st seems to be too much of a hack.

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

AEM does not have the libs (including CXF) to expose a web service. You have really 2 choices. Assume you want to expose JCR data as a web service. You can follow that link. It talks about what you need to do. 

Or 2 - you can setup a web service on a web server (ie Tomcat) and code a Java bean and use Apache CXF and the JCR API. THe bean will expose a WSDL and use the JCR API to perform CRUD (Create, Replace, Update, and Delete) operations on the JCR Data. 

[img]CQWSDL.png[/img]

Translate
Level 2
Feb 25, 2016 7:15 AM UTC

Could you please share the link?

Translate
Level 2
Feb 25, 2016 7:17 AM UTC

How to access JCR API from bean on tomcat? Please reply.

Translate
CQJonathanNiels
Level 2
Feb 25, 2016 10:05 AM UTC

I would also go with the option of setting up a separate Tomcat.

Getting Apache CXF to work as SOAP service within the OSGi runtime of AEM will be very complex, if not impossible due to dependency conflicts.

Take a look at Apache Mule, the concept is interesting!

Translate
CQJonathanNiels
Level 2
Feb 25, 2016 10:17 AM UTC

Try doing a bit of reading & learning: http://www.amazon.com/Beginning-Java-EE-Expert-Voice/dp/143024626X

Translate