Java - Axis (Web Services / SOAP / WSDL engine)

Java Conceptuel Diagram

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





Discover More
Bip Eclipse Web Service
BIP - Web Service

Getting Started with BIP Web Service How to generate the BI Publisher Stub Classes See See Include the following jar files in your classpath activation.jar from the Java...
Card Puncher Data Processing
BusinessObjects Web Services

Business Objects Web Services provide a Java and .NET API accessed by rich clients in the user interaction tier, such as and . Web Services consists of software components that can be called remotely...
Eclipse Wtp Installation Update
Eclipse - How to consume a web service (OBIEE) with WTP ?

The aim of this article is to show how with WTP, the Web Tools Platform Plugin of Eclipse, you can consume a web service. All the details the Web Service Subproject can be found on this page....
Java Conceptuel Diagram
Java - Web Services

Web services in Java See You can generate the client. See: Axis JAX-WS (Use by Virtualbox) Create you SOAP message Calls the web method through HTTP through : SAAJ...
Web Services - (Library|Tools)

This page lists the tools that can be used when developing or using a web service. GUI This section regroups the GUI application that permits to interact with a web service. Postman...



Share this page:
Follow us:
Task Runner