Table of Contents

About

Axis is a Web Services client generation engine.

How to

Installation

Client

ClassPath

maven dependency

<dependencies>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.13</version>
        </dependency>
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.schema</groupId>
            <artifactId>XmlSchema</artifactId>
            <version>1.4.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.13</version>
        </dependency>
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>1.6.2</version>
        </dependency>
</dependencies>

Generate the stubs

  • Open the file wsdl2java.bat in the bin directory and add the following environment variable:
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_04
set AXIS2_HOME=C:\axis2-1.6.2
  • Download the WSDL file
  • Run the following in a command file:
wsdl2java  
    -o ../../../.. 
    -S src/main/java 
    -or
    -s 
    -u 
    -ns2p urn://oracle.bi.webservices/v6=oracle.bi.webservices.v6 
    -d adb
    --noBuildXML
    -uri Obiee11gv6.wsdl

where:

  • -o is the output directory
  • -S defines the source directory (on this case a Maven Path)
  • -or says that the generated class must be overwritted
  • -s Generate code only for sync invocation methods style
  • -ns2p will define different package by namespace (nsp=package) (for only one package, you can use the -p option). The namespace in the WSDL is the targetNamespace attribute.
  • -u to unpack the classe (you get more classes but also more details)
  • -d defines the data binding framework (default adb)
  • –noBuildXML don't generate an ANT build.xml file
  • -uri defines the WSDL path

The class will be written from the output directory to the source directory (-S) plus the defined package (-p).

More Options: CodeGen Command Line Version