You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Tutorial for using AXIS 1.4 with Apache Camel

Introduction

Apache AXIS is/was widely used as a webservice framework. So in line with some of the other tutorials to demonstrate how Camel is not an invasive framework but is flexible and integrates well with existing solution.

We have an existing solution that exposes a webservice using AXIS 1.4 deployed as web applications. This is a common solution. We use contract first so we have AXIS generated source code from an existing wsdl file. Then we show how we introduce Spring and Camel to integrate with AXIS.

Maven 2

AXIS dependencies is available for maven 2 so we configure our pom.xml as:

        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis-jaxrpc</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis-saaj</artifactId>
            <version>1.4</version>
        </dependency>

		<dependency>
		    <groupId>axis</groupId>
		    <artifactId>axis-wsdl4j</artifactId>
		    <version>1.5.1</version>
		</dependency>

		<dependency>
		    <groupId>commons-discovery</groupId>
		    <artifactId>commons-discovery</artifactId>
		    <version>0.4</version>
		</dependency> 

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>

Then we need the maven plugin to generate the source code based on the wsdl file.

            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>axistools-maven-plugin</artifactId>
               <configuration>
	          <sourceDirectory>src/main/resources/</sourceDirectory>
                  <packageSpace>com.mycompany.myschema</packageSpace>
                  <testCases>false</testCases>
                  <serverSide>true</serverSide>
                  <subPackageByFileName>false</subPackageByFileName>
               </configuration>
               <executions>
                 <execution>
                   <goals>
                     <goal>wsdl2java</goal>
                   </goals>
                 </execution>
               </executions>
            </plugin>
  • No labels