You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Emma Johansson <Em...@su.eip.ericsson.se> on 2002/11/06 10:49:05 UTC

java2wsdl

Hi!

Can someone please tell me how to use the java2wsdl command.
I'm trying to follow the instructions on

    http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2

But the command:
    java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl
    -l"http://localhost:8080/axis/services/fibonacci"
    -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci
gives me the following error:

% java org.apache.axis.wsdl.Java2WSDL -o fib2.wsdl
-lhttp://150.132.6.212:8080/axis/services/fib2 -n urn:fib2 -pfib2
urn:fib2 fib2.Fib2
java.lang.ClassNotFoundException: fib2.Fib2
        at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)

        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:130)
        at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171)
        at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112)

        at
org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270)
        at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454)
        at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497)

what might be wrong?

/ Emma

Re: java2wsdl

Posted by Emma Johansson <Em...@su.eip.ericsson.se>.
thank you!
you where right, I was standing in the wrong directory.

/ Emma

Selvakumar Ganesan wrote:

>  Emma,Make sure you are at the correct directory level when issuing
> the command. You may be inside fibonacci directory (where
> Fibonacci.class is present) while issuing the command, in which case
> the class file path is just Fibonacci and not
> fibonacci.Fibonacci. Assuming you are inside "fibonacci" directory,
> then the command would be:-
>     java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl
>     -l"http://localhost:8080/axis/services/fibonacci"
>     -n urn:fibonacci -p"fibonacci" urn:fibonacci
> Fibonacci regards,Selva.
>
>      ----- Original Message -----
>      From: Emma Johansson
>      To: axis-user@xml.apache.org
>      Sent: Wednesday, November 06, 2002 3:47 PM
>      Subject: Re: java2wsdl
>       I'm not sure of which classpath I need. I have
>          /home/loke/ejoemma/xml-axis-10
>      in my classpath. Do I need some more to be able to use the
>      java2wsdl tool?
>
>      Could it be something wrong with the command
>          java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl
>          -l"http://localhost:8080/axis/services/fibonacci"
>          -n urn:fibonacci -p"fibonacci" urn:fibonacci
>      fibonacci.Fibonacci
>
>      The reason why I'm asking is that I have managed this to
>      work earlier, but not now. I know that I had to change
>      something in the command, but cannot remember what it
>      was....
>
>      / Emma
>
>
>      Paolo Paganotto wrote:
>
>     > Hi, Emmait looks like the vm isn't able to find the class
>     > fib2.Fib2Is the classpath variable correct, if any?
>     > regards,Paolo
>     >
>     >
>     >
>     >      Hi!
>     >
>     >      Can someone please tell me how to use the
>     >      java2wsdl command.
>     >      I'm trying to follow the instructions on
>     >
>     >
>     >      http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2
>     >
>     >      But the command:
>     >          java org.apache.axis.wsdl.Java2WSDL -o
>     >      fib.wsdl
>     >
>     >      -l"http://localhost:8080/axis/services/fibonacci"
>     >
>     >          -n urn:fibonacci -p"fibonacci" urn:fibonacci
>     >      fibonacci.Fibonacci
>     >      gives me the following error:
>     >
>     >      % java org.apache.axis.wsdl.Java2WSDL -o
>     >      fib2.wsdl
>     >      -lhttp://150.132.6.212:8080/axis/services/fib2
>     >      -n urn:fib2 -pfib2 urn:fib2 fib2.Fib2
>     >      java.lang.ClassNotFoundException: fib2.Fib2
>     >              at
>     >      java.net.URLClassLoader$1.run(URLClassLoader.java:198)
>     >
>     >              at
>     >      java.security.AccessController.doPrivileged(Native
>     >      Method)
>     >              at
>     >      java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>     >
>     >              at
>     >      java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     >
>     >              at
>     >      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
>     >
>     >              at
>     >      java.lang.ClassLoader.loadClass(ClassLoader.java:262)
>     >
>     >              at
>     >      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
>     >
>     >              at java.lang.Class.forName0(Native
>     >      Method)
>     >              at
>     >      java.lang.Class.forName(Class.java:130)
>     >              at
>     >      org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197)
>     >
>     >              at
>     >      java.security.AccessController.doPrivileged(Native
>     >      Method)
>     >              at
>     >      org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171)
>     >
>     >              at
>     >      org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112)
>     >
>     >              at
>     >      org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270)
>     >
>     >              at
>     >      org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454)
>     >
>     >              at
>     >      org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497)
>     >
>     >      what might be wrong?
>     >
>     >      / Emma
>     >

Re: java2wsdl

Posted by Selvakumar Ganesan <se...@wipro.com>.
Emma,
Make sure you are at the correct directory level when issuing the command. You may be inside fibonacci directory (where Fibonacci.class is present) while issuing the command, in which case the class file path is just Fibonacci and not fibonacci.Fibonacci.

Assuming you are inside "fibonacci" directory, then the command would be:-
    java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
    -l"http://localhost:8080/axis/services/fibonacci" 
    -n urn:fibonacci -p"fibonacci" urn:fibonacci Fibonacci 

regards,
Selva.
  ----- Original Message ----- 
  From: Emma Johansson 
  To: axis-user@xml.apache.org 
  Sent: Wednesday, November 06, 2002 3:47 PM
  Subject: Re: java2wsdl


  I'm not sure of which classpath I need. I have 
      /home/loke/ejoemma/xml-axis-10 
  in my classpath. Do I need some more to be able to use the java2wsdl tool? 
  Could it be something wrong with the command 
      java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
      -l"http://localhost:8080/axis/services/fibonacci" 
      -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci 

  The reason why I'm asking is that I have managed this to work earlier, but not now. I know that I had to change something in the command, but cannot remember what it was.... 

  / Emma 
    

  Paolo Paganotto wrote: 

    Hi, Emmait looks like the vm isn't able to find the class fib2.Fib2Is the classpath variable correct, if any? regards,Paolo 


      Hi! 
      Can someone please tell me how to use the java2wsdl command. 
      I'm trying to follow the instructions on 

          http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2 

      But the command: 
          java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
          -l"http://localhost:8080/axis/services/fibonacci" 
          -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci 
      gives me the following error: 

      % java org.apache.axis.wsdl.Java2WSDL -o fib2.wsdl -lhttp://150.132.6.212:8080/axis/services/fib2 -n urn:fib2 -pfib2 urn:fib2 fib2.Fib2 
      java.lang.ClassNotFoundException: fib2.Fib2 
              at java.net.URLClassLoader$1.run(URLClassLoader.java:198) 
              at java.security.AccessController.doPrivileged(Native Method) 
              at java.net.URLClassLoader.findClass(URLClassLoader.java:186) 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:262) 
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) 
              at java.lang.Class.forName0(Native Method) 
              at java.lang.Class.forName(Class.java:130) 
              at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197) 
              at java.security.AccessController.doPrivileged(Native Method) 
              at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171) 
              at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112) 
              at org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270) 
              at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454) 
              at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497) 

      what might be wrong? 

      / Emma


Re: java2wsdl

Posted by Paolo Paganotto <pa...@txt.it>.
Well, I posted on 28-10-02 a mail with subject "Axis 1.0 Tomcat 4.1.12 Java 1.4.0_02 Installation tips"
that maybe can help you understand if your configuration is good (with the stated versions of the software this tips make things work, even if it's not the best way).

But I think that your configuration is ok, since the class Java2WSDL is found, but not the class from which you want do derive a .wsdl file.
If so, you have to check out what is the package of that class and to provide a correct classpath for it. If the package is fibonacci and the class is Fibonacci, maybe you have to add a classpath of the directory where the fibonacci directory is located.
Maybe you changed the package, that's why the java2wsdl doesn't work anymore!

Hallo,
Paolo
  ----- Original Message ----- 
  From: Emma Johansson 
  To: axis-user@xml.apache.org 
  Sent: Wednesday, November 06, 2002 11:17 AM
  Subject: Re: java2wsdl


  I'm not sure of which classpath I need. I have 
      /home/loke/ejoemma/xml-axis-10 
  in my classpath. Do I need some more to be able to use the java2wsdl tool? 
  Could it be something wrong with the command 
      java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
      -l"http://localhost:8080/axis/services/fibonacci" 
      -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci 

  The reason why I'm asking is that I have managed this to work earlier, but not now. I know that I had to change something in the command, but cannot remember what it was.... 

  / Emma 
    

  Paolo Paganotto wrote: 

    Hi, Emmait looks like the vm isn't able to find the class fib2.Fib2Is the classpath variable correct, if any? regards,Paolo 


      Hi! 
      Can someone please tell me how to use the java2wsdl command. 
      I'm trying to follow the instructions on 

          http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2 

      But the command: 
          java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
          -l"http://localhost:8080/axis/services/fibonacci" 
          -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci 
      gives me the following error: 

      % java org.apache.axis.wsdl.Java2WSDL -o fib2.wsdl -lhttp://150.132.6.212:8080/axis/services/fib2 -n urn:fib2 -pfib2 urn:fib2 fib2.Fib2 
      java.lang.ClassNotFoundException: fib2.Fib2 
              at java.net.URLClassLoader$1.run(URLClassLoader.java:198) 
              at java.security.AccessController.doPrivileged(Native Method) 
              at java.net.URLClassLoader.findClass(URLClassLoader.java:186) 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:262) 
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) 
              at java.lang.Class.forName0(Native Method) 
              at java.lang.Class.forName(Class.java:130) 
              at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197) 
              at java.security.AccessController.doPrivileged(Native Method) 
              at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171) 
              at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112) 
              at org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270) 
              at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454) 
              at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497) 

      what might be wrong? 

      / Emma


Re: java2wsdl

Posted by Emma Johansson <Em...@su.eip.ericsson.se>.
I'm not sure of which classpath I need. I have
    /home/loke/ejoemma/xml-axis-10
in my classpath. Do I need some more to be able to use the java2wsdl
tool?

Could it be something wrong with the command
    java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl
    -l"http://localhost:8080/axis/services/fibonacci"
    -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci

The reason why I'm asking is that I have managed this to work earlier,
but not now. I know that I had to change something in the command, but
cannot remember what it was....

/ Emma


Paolo Paganotto wrote:

> Hi, Emmait looks like the vm isn't able to find the class fib2.Fib2Is
> the classpath variable correct, if any? regards,Paolo
>
>
>
>      Hi!
>
>      Can someone please tell me how to use the java2wsdl command.
>
>      I'm trying to follow the instructions on
>
>
>      http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2
>
>      But the command:
>          java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl
>          -l"http://localhost:8080/axis/services/fibonacci"
>          -n urn:fibonacci -p"fibonacci" urn:fibonacci
>      fibonacci.Fibonacci
>      gives me the following error:
>
>      % java org.apache.axis.wsdl.Java2WSDL -o fib2.wsdl
>      -lhttp://150.132.6.212:8080/axis/services/fib2 -n urn:fib2
>      -pfib2 urn:fib2 fib2.Fib2
>      java.lang.ClassNotFoundException: fib2.Fib2
>              at
>      java.net.URLClassLoader$1.run(URLClassLoader.java:198)
>              at
>      java.security.AccessController.doPrivileged(Native Method)
>              at
>      java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>              at
>      java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>              at
>      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
>
>              at
>      java.lang.ClassLoader.loadClass(ClassLoader.java:262)
>              at
>      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
>
>              at java.lang.Class.forName0(Native Method)
>              at java.lang.Class.forName(Class.java:130)
>              at
>      org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197)
>              at
>      java.security.AccessController.doPrivileged(Native Method)
>              at
>      org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171)
>
>              at
>      org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112)
>
>              at
>      org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270)
>
>              at
>      org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454)
>              at
>      org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497)
>
>      what might be wrong?
>
>      / Emma
>

Re: java2wsdl

Posted by Paolo Paganotto <pa...@txt.it>.
Hi, Emma
it looks like the vm isn't able to find the class fib2.Fib2
Is the classpath variable correct, if any?

regards,
Paolo


  Hi! 
  Can someone please tell me how to use the java2wsdl command. 
  I'm trying to follow the instructions on 
    
      http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2 

  But the command: 
      java org.apache.axis.wsdl.Java2WSDL -o fib.wsdl 
      -l"http://localhost:8080/axis/services/fibonacci" 
      -n urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci 
  gives me the following error: 

  % java org.apache.axis.wsdl.Java2WSDL -o fib2.wsdl -lhttp://150.132.6.212:8080/axis/services/fib2 -n urn:fib2 -pfib2 urn:fib2 fib2.Fib2 
  java.lang.ClassNotFoundException: fib2.Fib2 
          at java.net.URLClassLoader$1.run(URLClassLoader.java:198) 
          at java.security.AccessController.doPrivileged(Native Method) 
          at java.net.URLClassLoader.findClass(URLClassLoader.java:186) 
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) 
          at java.lang.ClassLoader.loadClass(ClassLoader.java:262) 
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) 
          at java.lang.Class.forName0(Native Method) 
          at java.lang.Class.forName(Class.java:130) 
          at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197) 
          at java.security.AccessController.doPrivileged(Native Method) 
          at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171) 
          at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112) 
          at org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:1270) 
          at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:454) 
          at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:497) 

  what might be wrong? 

  / Emma