Friday, March 16, 2012

How To Integrate a SOAP Web-Service Toolkit with Adobe CQ / WEM

Very nice blog post for this can be found here

For CXF

http://shsteimer.com/blog/2012/03/integrating-a-soap-web-service-toolkit-with-day-cq/

http://cqblog.inside-solutions.ch/2013/09/04/consuming-webservices-using-apache-cxf-in-cq5-6-1/

For JAX-WS

http://cqblog.inside-solutions.ch/2013/11/01/consuming-soap-web-service-with-jax-ws-in-cq5-6-1/

For Axis 2

Method 1
1) Create Axis2 Fragment bundle using this pom.xml (You might have to change Export-Package section based on your project)
2) Already created Axis2 fragment bundle can be downloaded from here (This is working for OOTB CQ5.4)
3) Put this to install folder of your application. Make sure that it is in fragment state in OSGI
4) Restart your instance (Fragment bundle resolution will take place upon restart)



Note If you have custom jar that uses Axis2. You can put them under libs folder (To same level where your pom.xml or bnd file is).

Make sure that you have following entry in bnd file

Import-Package: *;resolution:=optional
Private-Package: *
Dynamic-Import: *
Embed-Dependency: *;scope=compile|runtime
Embed-Directory: /libs
Embed-Transitive: true

Method 2 (Method 1 is recommended)
If you are keen to use Axis2 with CQ5.X. I have compiled set of OSGI bundle that you can use for this.

1) Download all bundles from here
2) Put them in /apps//install folder
3) Use Axis2 API in your project
4) All Jar file (Non OSGI) can be found here
5) Also see how to convert Jar file in to OSGI bundle
6) Make sure that you put all non OSGI class file in bundle class path of your custom OSGI bundle where you are using Axis2 API.
7) If you ar using Maven, You can use this pom.xml dependencies

<!-- Axis2 Dependencies -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>

Please test it before use. Axis2 Integration is still work in progress .. I will update once have concrete result

4 comments:

  1. Hi yogesh,

    the url http://shsteimer.com/blog/2012/03/integrating-a-soap-web-service-toolkit-with-day-cq/ is broken, do you have any other source

    Thanks
    Sanat

    ReplyDelete
  2. I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more. PCI DSS toolkit

    ReplyDelete
  3. Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing. PCI DSS toolkit

    ReplyDelete
  4. If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries ISO 27001 toolkit

    ReplyDelete