12

I downloaded Axis 1.4 ( http://www.nic.funet.fi/pub/mirrors/apache.org/ws/axis/1_4/ ) and I wanted to use WSDL2Java, but I didn't find such a file from package, but there are refrences to this file ( http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL ) in their site. Where I can get that file ?

newbie
  • 24,286
  • 80
  • 201
  • 301

5 Answers5

18

Here is a simple bash script to invoke WSDL2Java that you can place in the "lib" directory and run:

#! /bin/bash

CP="."
for JAR in `ls *.jar`; do
        CP="$CP:$JAR"
done
#echo "classpath = $CP"
java -cp $CP org.apache.axis.wsdl.WSDL2Java $@
johnthuss
  • 2,732
  • 2
  • 16
  • 7
9

From the doc

You'll find the Axis WSDL-to-Java tool in "org.apache.axis.wsdl.WSDL2Java". The basic invocation form looks like this:

% java org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
5

I thought I would provide an updated answer. Currently, wsdl2java is located in the Apache CXF package. If you extract it you will find handy scripts in the bin directory that simplify the execution process.

Download: http://cxf.apache.org/download.html
Directions for use: https://cxf.apache.org/docs/wsdl-to-java.html

Peter
  • 9,643
  • 6
  • 61
  • 108
0

I encountered the same problem when I tried to use wsdl2java with axis 1.4. But couldn't find the wsdl2java file. What I did was, I have taken wsdl2java from axis2 and modified according to axis 1.4 jar files and etc. I run it for axis 1.4. I could manage to get java class files with some warning. I dont bother about warning.

Anyway, I got all java class files from wsdl with axis 1.4. However, I feel that it would be better choice if you migrate it from axis 1.4 to axis2.

Siyual
  • 16,415
  • 8
  • 44
  • 58
Nazeer
  • 1
  • 6
    Use this to generate wsdl : java -classpath activation.jar;mailapi.jar;axis.jar;jaxrpc.jar;saaj.jar;commons-logging-1.0.4.jar;commons-discovery-0.2.jar;wsdl4j-1.5.1.jar;log4j-1.2.8.jar;C:\axis-1_4\lib org.apache.axis.wsdl.WSDL2Java -s your_wsdl_name.wsdl – newbie Nov 04 '09 at 06:35
0

Download cxf from https://cxf.apache.org/download.html (Binary distribution)

Here is example for version 3.4.3.

Just unpack it to the desired folder and You can find it in apache-cxf-3.4.3\bin

Igor Vuković
  • 742
  • 12
  • 25