aspose file tools*
The moose likes Web Services and the fly likes Axis stub classes...classpath problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis stub classes...classpath problem" Watch "Axis stub classes...classpath problem" New topic
Author

Axis stub classes...classpath problem

Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
Hello. If anybody has a minute, I did this successfully several months ago and i've been revisiting it and for some reason i can't get the client stub java files created from the wsdl. Here's what i have...

C:\MWS\My WebService.wsdl

C:\MWS\lib\...this folder contains all the axis and xerces jars...

From C:\MWS> command line...I type...

C:\MWS\>java -classpath lib\* org.apache.wsdl.WSDL2Java -o . -d Session -s -p MWS.ws MyWebService.wsdl

and I get...

NoClassDefFoundError: lib\axis-ant/jar

Like I said, all the jars are in the lib folder...I've been trying different combos for the classpath and i can't get it...most errors tell me it can't even find the utility itself from axis.jar. i compiled the files for a seperate project successfully but i just can't remember what i did for the classpath. Thank you very much for reading this.
[ March 12, 2007: Message edited by: Tom Griffith ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
-classpath lib\*

The classpath switch doesn't work like that. Each jar file needs to be listed explicitly, like "-classpath lib\axis.jar;lib\foobar.jar;lib\saaj.jar;..."


Ping & DNS - my free Android networking tools app
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
Hi Ulf. Yeah, since axis has so many supporting jars, I set the axis classpath in AUTOEXEC.BAT. I know this is way off topic now but while it's out there, isn't the * a wildcard character for -classpath? I know i read it at sun somewhere.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

Originally posted by Tom Griffith:
isn't the * a wildcard character for -classpath? I know i read it at sun somewhere.
I believe it is for Java 6, but I haven't used the feature myself.
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
Yeah, thanks Paul. On second throught, I think thats where I saw it...

FOr the past hour it's telling me the switches ("unrecognized option: -o", etc) are not recognized and it cannot create the Java Virtual Machine. What could that mean? I'm running java 5 and the classpath is set...otherwise, it wouldn't recognize java and -cp...what gives with this? I've looked around and it seems the solutions to this are upgrading the jvm...but i'm running 5...and this ran successfully a couple of months ago. Ah. Thank you again for reading this everybody.
[ March 12, 2007: Message edited by: Tom Griffith ]
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
Eh, with all the compiling, tinkering, and messing with the autoexec.bat i just rebooted again, compiled and ran some softball programs and it seemed to clear the problem. Welp, it's going ok now. Thank you again everybody.
[ March 12, 2007: Message edited by: Tom Griffith ]
 
 
subject: Axis stub classes...classpath problem