This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Axis2 java2wsdl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 java2wsdl" Watch "Axis2 java2wsdl" New topic

Axis2 java2wsdl

Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 125
I have downloaded and extracted axis2-M2-bin to C:\axis2-M2-bin

From Axis2 Quick Start Guide

"Before we build anything using Axis2, we're going to need to take care of a little housekeeping. First off, you'll need to ready your environment for working with Axis2. Fortunately, it involves just a few simple steps:

1. Download and install Java. (Minimum version is JDK1.4)
2. Download Axis2 and extract it to a target directory.
3. Copy the axis2.war file to the webapps directory of your servlet engine.
4. Set the AXIS2_HOME environment variable to point to the target directory in step. Note that all of the scripts and build files Axis2 generates depend on this value, so don't skip this step!

%AXIS2_HOME%/bin/java2wsdl -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl"

I have set the Axis2_Home to C:\axis2-M2-bin but java2wsdl does not work. So I navigate to C:\axis2-M2-bin\bin and write java2wsdl but the message I am getting is

'java2wsdl' is not recognized as an internal or external command,
operable program or batch file.

Please tell me how to make it work.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41046
Your system might not be set up to recognize .bat files as being executable. Try "%AXIS2_HOME%/bin/java2wsdl.bat" instead of "%AXIS2_HOME%/bin/java2wsdl"

Ping & DNS - my free Android networking tools app
Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 125
Originally posted by Ulf Dittmer:
Your system might not be set up to recognize .bat files as being executable. Try "%AXIS2_HOME%/bin/java2wsdl.bat" instead of "%AXIS2_HOME%/bin/java2wsdl"

There is no java2wsdl.bat in the bin directory. I downloaded axis2-M2-bin and extracted it. Do i have to do something to create this batch file. There is WSDL2Java.bat, WSDL2Code.bat, start.bat, server.bat in the bin directory but no java2wsdl.bat

I am using J2SE 1.4
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
I'll try and help you out, I think you need the bin dir in the PATH variable.

Here's what I have in my local PATH env variable:

Here's the ClassPath variable:

Not sure if the above is needed as it's been awhile since I've messed around with it.

Here's a link to my trials and tribulations getting some sort of example to work:
Web Services


write, revise, re-write, revise, again...<br />write, revise, re-write, revise, again...
I agree. Here's the link:
subject: Axis2 java2wsdl
Similar Threads
Axis2 (1.5 version) java2wsdl - error stating JAVA_HOME environment variable is not defined correctl
Creating a web service with Axis2 built in script
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/wsdl/Java2WSDL
Issue in making axis2.war