You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Samantha Savvakis <sa...@cfs.net.au> on 2002/05/03 08:10:22 UTC

Generate WSDL

Hi,

I've seen alot of posts about what tools are available to generate WSDL.

I'm running:

Apache Tomcat 4.0.3
SOAP 2.2
JDK2 1.3
JRE2 1.3

I've downloaded the IBM Web Services Toolkit, as well as Systinet's WASP.
I've extracted the binaries for thes toolkits, setup my path etc. All I want
to use is the java2wsdl binary that will create WSDL for me.

Are there any good instructions out there on just how to use java2wsdl? I've
got the Implementing Web Services doco that came with the IBM toolkit, but
there are really no instructions how to use the java2wsdl in there. It skims
over it. I'm really not sure of the options to use etc.

I've been mainly trying to use the IBM Toolkit. I have deployed a very
simple Web Service called "HelloWorld" which has a method called "sayHello"
that takes a String. Here are the urn:HelloWorld details:

ID urn:helloworld
Scope: Request
Provider Type: java
Provider Class: Hello
Use Static Class: false
Methods: sayHello

This is what I'm attempting to use to generate the WSDL:

java org.apache.axis.wsdl.Java2WSDL \
	-N"http://Hello" \
	-n"http://Hello_Interface" \
	-o /u/dev/webservices/HelloWorld/Hello_Interface.wsdl \
	-O /u/dev/webservices/HelloWorld/Hello_Impl.wsdl \
	-L"%2Hello_Interace.wsdl" \
	-m"sayHello" \
	-l"%1" Hello

java.lang.ClassNotFoundException: Hello
        at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
Compiled Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
Compiled Code)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java, Compiled Code)
        at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
java.lang.NullPointerException
        at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)

Can someone point me in the right direction please.

(sorry if this is easy and a stupid question, come from a C++ background,
trying to write Java and it's just not happening :| )

Thanks,
Sam
-------------------------------------
Samantha Savvakis (B.E. CompSys(HONS))
Computer Fiscal Services
Software Engineer
Ph: (07) 3823 9500
Fax: (07) 3245 7299
http://www.cfs.net.au
http://www.autocheck.com.au


Re: Generate WSDL

Posted by Shivakumar GS <sh...@attbi.com>.
Hi,

make sure that the Hello.class is in your CLASSPATH.
!shiva

>
>java.lang.ClassNotFoundException: Hello
>        at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
>Code)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
>Compiled Code)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
>Compiled Code)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java, Compiled Code)
>        at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
>        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>java.lang.NullPointerException
>        at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
>        at org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
>        at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
>        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>
>Can someone point me in the right direction please.
>
>(sorry if this is easy and a stupid question, come from a C++ background,
>trying to write Java and it's just not happening :| )
>
>Thanks,
>Sam
>-------------------------------------
>Samantha Savvakis (B.E. CompSys(HONS))
>Computer Fiscal Services
>Software Engineer
>Ph: (07) 3823 9500
>Fax: (07) 3245 7299
>http://www.cfs.net.au
>http://www.autocheck.com.au
>
>




Re: Generate WSDL

Posted by Shivakumar GS <sh...@attbi.com>.
Hi,

make sure that the Hello.class is in your CLASSPATH.
!shiva

>
>java.lang.ClassNotFoundException: Hello
>        at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
>Code)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
>Compiled Code)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
>Compiled Code)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java, Compiled Code)
>        at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
>        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>java.lang.NullPointerException
>        at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
>        at org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
>        at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
>        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>
>Can someone point me in the right direction please.
>
>(sorry if this is easy and a stupid question, come from a C++ background,
>trying to write Java and it's just not happening :| )
>
>Thanks,
>Sam
>-------------------------------------
>Samantha Savvakis (B.E. CompSys(HONS))
>Computer Fiscal Services
>Software Engineer
>Ph: (07) 3823 9500
>Fax: (07) 3245 7299
>http://www.cfs.net.au
>http://www.autocheck.com.au
>
>




RE: Generate WSDL

Posted by Rebecca Dias <rd...@iona.com>.
Samantha,
	You could also use the XMLBus (www.xmlbus.com/work) which provides
graphical and command line tools for this.  You simply point at the class
you want to turn into WSDL and wala.  Another powerful feature is that it
allows you to sequence a series of calls together and expose that as a Web
service.  See http://www.xmlbus.com/docs/5.1/users_guide/index.html


becky

-----Original Message-----
From: Samantha Savvakis [mailto:samantha@cfs.net.au]
Sent: Friday, May 03, 2002 2:10 AM
To: Soap-User
Subject: Generate WSDL


Hi,

I've seen alot of posts about what tools are available to generate WSDL.

I'm running:

Apache Tomcat 4.0.3
SOAP 2.2
JDK2 1.3
JRE2 1.3

I've downloaded the IBM Web Services Toolkit, as well as Systinet's WASP.
I've extracted the binaries for thes toolkits, setup my path etc. All I want
to use is the java2wsdl binary that will create WSDL for me.

Are there any good instructions out there on just how to use java2wsdl? I've
got the Implementing Web Services doco that came with the IBM toolkit, but
there are really no instructions how to use the java2wsdl in there. It skims
over it. I'm really not sure of the options to use etc.

I've been mainly trying to use the IBM Toolkit. I have deployed a very
simple Web Service called "HelloWorld" which has a method called "sayHello"
that takes a String. Here are the urn:HelloWorld details:

ID urn:helloworld
Scope: Request
Provider Type: java
Provider Class: Hello
Use Static Class: false
Methods: sayHello

This is what I'm attempting to use to generate the WSDL:

java org.apache.axis.wsdl.Java2WSDL \
	-N"http://Hello" \
	-n"http://Hello_Interface" \
	-o /u/dev/webservices/HelloWorld/Hello_Interface.wsdl \
	-O /u/dev/webservices/HelloWorld/Hello_Impl.wsdl \
	-L"%2Hello_Interace.wsdl" \
	-m"sayHello" \
	-l"%1" Hello

java.lang.ClassNotFoundException: Hello
        at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
Compiled Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
Compiled Code)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java, Compiled Code)
        at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
java.lang.NullPointerException
        at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)

Can someone point me in the right direction please.

(sorry if this is easy and a stupid question, come from a C++ background,
trying to write Java and it's just not happening :| )

Thanks,
Sam
-------------------------------------
Samantha Savvakis (B.E. CompSys(HONS))
Computer Fiscal Services
Software Engineer
Ph: (07) 3823 9500
Fax: (07) 3245 7299
http://www.cfs.net.au
http://www.autocheck.com.au



RE: Generate WSDL

Posted by Charlie Abela <ab...@maltanet.net>.
Is it possible to integrate the Java2WSDL tool by itself in an application?
Any docs about this available?

Charlie



RE: Generate WSDL

Posted by Charlie Abela <ab...@maltanet.net>.
Is it possible to integrate the Java2WSDL tool by itself in an application?
Any docs about this available?

Charlie



RE: Generate WSDL

Posted by Anne Thomas Manes <an...@manes.net>.
Samantha,

You'll find the WASP java2wsdl tool in the \bin directory. It's a .bat or
.sh file. To find the options available, just run java2wsdl -h.
Documentation on the tool can be found in Appendix C section 3 of the WASP
Advanced Programmers Guide:
http://www.systinet.com/products/wasp_advanced/doc/programmers_guide.html

Or Appendix B3 in the WASP Lite Programmers Guide:
http://www.systinet.com/products/wasp_lite/doc/programmers_guide.html

Best regards,

Anne Thomas Manes
CTO, Systinet
http://www.systinet.com



> -----Original Message-----
> From: Samantha Savvakis [mailto:samantha@cfs.net.au]
> Sent: Friday, May 03, 2002 2:10 AM
> To: Soap-User
> Subject: Generate WSDL
>
>
> Hi,
>
> I've seen alot of posts about what tools are available to generate WSDL.
>
> I'm running:
>
> Apache Tomcat 4.0.3
> SOAP 2.2
> JDK2 1.3
> JRE2 1.3
>
> I've downloaded the IBM Web Services Toolkit, as well as Systinet's WASP.
> I've extracted the binaries for thes toolkits, setup my path etc.
> All I want
> to use is the java2wsdl binary that will create WSDL for me.
>
> Are there any good instructions out there on just how to use
> java2wsdl? I've
> got the Implementing Web Services doco that came with the IBM toolkit, but
> there are really no instructions how to use the java2wsdl in
> there. It skims
> over it. I'm really not sure of the options to use etc.
>
> I've been mainly trying to use the IBM Toolkit. I have deployed a very
> simple Web Service called "HelloWorld" which has a method called
> "sayHello"
> that takes a String. Here are the urn:HelloWorld details:
>
> ID urn:helloworld
> Scope: Request
> Provider Type: java
> Provider Class: Hello
> Use Static Class: false
> Methods: sayHello
>
> This is what I'm attempting to use to generate the WSDL:
>
> java org.apache.axis.wsdl.Java2WSDL \
> 	-N"http://Hello" \
> 	-n"http://Hello_Interface" \
> 	-o /u/dev/webservices/HelloWorld/Hello_Interface.wsdl \
> 	-O /u/dev/webservices/HelloWorld/Hello_Impl.wsdl \
> 	-L"%2Hello_Interace.wsdl" \
> 	-m"sayHello" \
> 	-l"%1" Hello
>
> java.lang.ClassNotFoundException: Hello
>         at java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
> Code)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
> Compiled Code)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
> Compiled Code)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java, Compiled Code)
>         at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
>         at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
> java.lang.NullPointerException
>         at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
>         at
> org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
>         at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
>         at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>
> Can someone point me in the right direction please.
>
> (sorry if this is easy and a stupid question, come from a C++ background,
> trying to write Java and it's just not happening :| )
>
> Thanks,
> Sam
> -------------------------------------
> Samantha Savvakis (B.E. CompSys(HONS))
> Computer Fiscal Services
> Software Engineer
> Ph: (07) 3823 9500
> Fax: (07) 3245 7299
> http://www.cfs.net.au
> http://www.autocheck.com.au
>


RE: Generate WSDL

Posted by Anne Thomas Manes <an...@manes.net>.
Samantha,

You'll find the WASP java2wsdl tool in the \bin directory. It's a .bat or
.sh file. To find the options available, just run java2wsdl -h.
Documentation on the tool can be found in Appendix C section 3 of the WASP
Advanced Programmers Guide:
http://www.systinet.com/products/wasp_advanced/doc/programmers_guide.html

Or Appendix B3 in the WASP Lite Programmers Guide:
http://www.systinet.com/products/wasp_lite/doc/programmers_guide.html

Best regards,

Anne Thomas Manes
CTO, Systinet
http://www.systinet.com



> -----Original Message-----
> From: Samantha Savvakis [mailto:samantha@cfs.net.au]
> Sent: Friday, May 03, 2002 2:10 AM
> To: Soap-User
> Subject: Generate WSDL
>
>
> Hi,
>
> I've seen alot of posts about what tools are available to generate WSDL.
>
> I'm running:
>
> Apache Tomcat 4.0.3
> SOAP 2.2
> JDK2 1.3
> JRE2 1.3
>
> I've downloaded the IBM Web Services Toolkit, as well as Systinet's WASP.
> I've extracted the binaries for thes toolkits, setup my path etc.
> All I want
> to use is the java2wsdl binary that will create WSDL for me.
>
> Are there any good instructions out there on just how to use
> java2wsdl? I've
> got the Implementing Web Services doco that came with the IBM toolkit, but
> there are really no instructions how to use the java2wsdl in
> there. It skims
> over it. I'm really not sure of the options to use etc.
>
> I've been mainly trying to use the IBM Toolkit. I have deployed a very
> simple Web Service called "HelloWorld" which has a method called
> "sayHello"
> that takes a String. Here are the urn:HelloWorld details:
>
> ID urn:helloworld
> Scope: Request
> Provider Type: java
> Provider Class: Hello
> Use Static Class: false
> Methods: sayHello
>
> This is what I'm attempting to use to generate the WSDL:
>
> java org.apache.axis.wsdl.Java2WSDL \
> 	-N"http://Hello" \
> 	-n"http://Hello_Interface" \
> 	-o /u/dev/webservices/HelloWorld/Hello_Interface.wsdl \
> 	-O /u/dev/webservices/HelloWorld/Hello_Impl.wsdl \
> 	-L"%2Hello_Interace.wsdl" \
> 	-m"sayHello" \
> 	-l"%1" Hello
>
> java.lang.ClassNotFoundException: Hello
>         at java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
> Code)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
> Compiled Code)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
> Compiled Code)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java, Compiled Code)
>         at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
>         at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
> java.lang.NullPointerException
>         at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
>         at
> org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
>         at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
>         at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
>
> Can someone point me in the right direction please.
>
> (sorry if this is easy and a stupid question, come from a C++ background,
> trying to write Java and it's just not happening :| )
>
> Thanks,
> Sam
> -------------------------------------
> Samantha Savvakis (B.E. CompSys(HONS))
> Computer Fiscal Services
> Software Engineer
> Ph: (07) 3823 9500
> Fax: (07) 3245 7299
> http://www.cfs.net.au
> http://www.autocheck.com.au
>


RE: Generate WSDL

Posted by Rebecca Dias <rd...@iona.com>.
Samantha,
	You could also use the XMLBus (www.xmlbus.com/work) which provides
graphical and command line tools for this.  You simply point at the class
you want to turn into WSDL and wala.  Another powerful feature is that it
allows you to sequence a series of calls together and expose that as a Web
service.  See http://www.xmlbus.com/docs/5.1/users_guide/index.html


becky

-----Original Message-----
From: Samantha Savvakis [mailto:samantha@cfs.net.au]
Sent: Friday, May 03, 2002 2:10 AM
To: Soap-User
Subject: Generate WSDL


Hi,

I've seen alot of posts about what tools are available to generate WSDL.

I'm running:

Apache Tomcat 4.0.3
SOAP 2.2
JDK2 1.3
JRE2 1.3

I've downloaded the IBM Web Services Toolkit, as well as Systinet's WASP.
I've extracted the binaries for thes toolkits, setup my path etc. All I want
to use is the java2wsdl binary that will create WSDL for me.

Are there any good instructions out there on just how to use java2wsdl? I've
got the Implementing Web Services doco that came with the IBM toolkit, but
there are really no instructions how to use the java2wsdl in there. It skims
over it. I'm really not sure of the options to use etc.

I've been mainly trying to use the IBM Toolkit. I have deployed a very
simple Web Service called "HelloWorld" which has a method called "sayHello"
that takes a String. Here are the urn:HelloWorld details:

ID urn:helloworld
Scope: Request
Provider Type: java
Provider Class: Hello
Use Static Class: false
Methods: sayHello

This is what I'm attempting to use to generate the WSDL:

java org.apache.axis.wsdl.Java2WSDL \
	-N"http://Hello" \
	-n"http://Hello_Interface" \
	-o /u/dev/webservices/HelloWorld/Hello_Interface.wsdl \
	-O /u/dev/webservices/HelloWorld/Hello_Impl.wsdl \
	-L"%2Hello_Interace.wsdl" \
	-m"sayHello" \
	-l"%1" Hello

java.lang.ClassNotFoundException: Hello
        at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled
Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
Compiled Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
Compiled Code)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java, Compiled Code)
        at org.apache.axis.wsdl.fromJava.Emitter.setCls(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)
java.lang.NullPointerException
        at org.apache.axis.wsdl.fromJava.Emitter.init(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.getIntfWSDL(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.Java2WSDL.main(Unknown Source)

Can someone point me in the right direction please.

(sorry if this is easy and a stupid question, come from a C++ background,
trying to write Java and it's just not happening :| )

Thanks,
Sam
-------------------------------------
Samantha Savvakis (B.E. CompSys(HONS))
Computer Fiscal Services
Software Engineer
Ph: (07) 3823 9500
Fax: (07) 3245 7299
http://www.cfs.net.au
http://www.autocheck.com.au