axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Safdar Ali" <saf...@ibmt.fhg.de>
Subject Re: WSDL2Java problem / Solution
Date Thu, 29 Jan 2004 19:06:00 GMT
MessageHi all, (especially Lopez, Kondapalli, Ashley)
Finally, after doing 3 days of brain storming.. I have come to a solution for WSDL2Java problem
where it throws Exception at different levels.....

It involves two prblems....
1) Your classpath variable limit; which is 1024 characters on Windows Sytems (2k professional
and all)...
2) Inclusion of all required .jars files into your classpath variable that come with Axis.

For the solution... I have made two System variables... one is CLASSPATH and the other is
CLASSPATH1
Now, when I want to run this command (>java org.apache.axis.wsdl.WSDL2Java AddressBook.wsdl),
I set the CLASSPATH variable before...like
>set CLASSPATH=%CLASSPATH%%CLASSPATH1%

My details of both variables are below:

CLASSPATH=.;%JAVA_HOME%\lib\;%JAVA_HOME%\lib\tools.jar;%JAVA_ENDORSED%\jdbc-ext.jar;%JAVA_ENDORSED%\jta.jar;%JAVA_ENDORSED%\log4j.jar;%JAVA_ENDORSED%\saaj.jar;

CLASSPATH1=%JAVA_ENDORSED%\active.jar;%JAVA_ENDORSED%\ant.jar;%JAVA_ENDORSED%\axis.jar;%JAVA_ENDORSED%\axis-ant.jar;%JAVA_ENDORSED%\com-coll.jar;%JAVA_ENDORSED%\com-disc.jar;%JAVA_ENDORSED%\com-log.jar;%JAVA_ENDORSED%\com-log-api.jar;%JAVA_ENDORSED%\com-pool.jar;%JAVA_ENDORSED%\jaxrpc.jar;%JAVA_ENDORSED%\nam-com.jar;%JAVA_ENDORSED%\nam-fac.jar;%JAVA_ENDORSED%\nam-res.jar;%JAVA_ENDORSED%\xerces.jar;%JAVA_ENDORSED%\xml-apis.jar;%JAVA_ENDORSED%\mail.jar;%JAVA_ENDORSED%\wsdl4j.jar;%JAVA_ENDORSED%\com-disc.jar;%JAVA_ENDORSED%\com-dbcp.jar;%JAVA_ENDORSED%\jas-comp.jar;%JAVA_ENDORSED%\jas-run.jar;%JAVA_ENDORSED%\jdbc-ext.jar;

where JAVA_ENDORSED=C:\j2sdk1.4.2_03\jre\lib\endorsed

(You can put all the files into lib folder of Java, but I prefer to put the files in endorsed
folder...)

I've shortened the names of all .jars files but these are still readable....I have made a
.bat file which I exectue before using the WSDL2Java utility...and this .bat contains the
command that I showed earlier... (>set CLASSPATH=%CLASSPATH%%CLASSPATH1%)

Have fun!!!
Safdar.

  ----- Original Message ----- 
  From: Ransel Lopez 
  To: axis-user@ws.apache.org 
  Sent: Monday, January 26, 2004 5:07 PM
  Subject: RE: WSDL2Java problem


  Hi Safdar,

  I have the same problem. I sent the same question and I didn't get any answer. Please, if
you find the solution let me know. I'll do the same.

  Thank you very much


  Ransel López, Web Services Developer
  Time Industrial, Inc.
   An Outsourced Contractor Time and Cost Tracking Service.
   -----------------------------------------------------------------------------------------
  tel: 780.413.1521  fax: 780.413.0474
   http://www.TimeIndustrial.com 

   -----------------------------------------------------------------------------------------
   This message and attached files, if any, is (are) intended only for the addressee(s) and
may 
   contain privileged or confidential information. Any unauthorized disclosure is strictly
prohibited. 
   If destined to our legal counsel, this transmission is privileged communication as between
an 
   attorney and its client.
   If you have received this message in error, please notify us immediately so that we may
correct 
   our internal records. Please then delete the original message. Thank you.

   
    

    -----Original Message-----
    From: axis-user-return-21199-rlopez=timeindustrial.com@ws.apache.org [mailto:axis-user-return-21199-rlopez=timeindustrial.com@ws.apache.org]
On Behalf Of Safdar Ali
    Sent: Monday, January 26, 2004 8:12 AM
    To: Axis User
    Subject: WSDL2Java problem


    Hello,
    I am getting the following error while using WSDL2Java tool...

    C:\axis-1_1\samples\addr>java org.apache.axis.wsdl.WSDL2Java Address.wsdl
    Exception in thread "main" java.lang.NoClassDefFoundError: javax.wsdl.Definition
            at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.class$(JavaGeneratorFactory.java:163)
            at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.addDefinitionGenerators(JavaGeneratorFactory.java:163)
            at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.addGenerators(JavaGeneratorFactory.java:133)
            at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.<init>(JavaGeneratorFactory.java:120)
            at org.apache.axis.wsdl.toJava.Emitter.<init>(Emitter.java:120)
            at org.apache.axis.wsdl.WSDL2Java.createParser(WSDL2Java.java:172)
            at org.apache.axis.wsdl.gen.WSDL2.<init>(WSDL2.java:113)
            at org.apache.axis.wsdl.WSDL2Java.<init>(WSDL2Java.java:161)
            at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:289)

    All of the required .jar files exist in classpath... and even I have extracted the 3 .jar
files into the Java_Home\lib folder... and it still doesn't work....
    I would be thankful if get the suggestion...

    Rgrds.
    Safdar.
Mime
View raw message