axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wt@teksavvy.com" ...@teksavvy.com>
Subject Trouble generating wsdl for StockQuoteService sample
Date Sat, 10 Oct 2009 04:15:12 GMT
Hello All,

I'm having a problem working out a sample code from the documentation,
http://ws.apache.org/axis2/1_5/quickstartguide.html#ready . I cannot
generate the wsdl file for the StockQuoteService sample code.

I was able to successfully compile the java code to generate a class
file.  But when I tried to create the wsdl file via java2wsdl.sh I get
the follow compile problem.

Could someone help me out and let me know if I missed something?

Thanks in advance!



$ javac  -g -verbose
./src/samples/quickstart/service/pojo/StockQuoteService.java

Afterwards I used the command as given in the document.

***I noticed that the document shows java2wsdl, but I used java2wsdl.sh
instead. I guess this is a typo in the documentation***

$ /usr/local/bin/axis2-1.5/bin/java2wsdl.sh -cp . -cn
samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl

Exception in thread "main" java.lang.ClassNotFoundException:
samples.quickstart.service.pojo.StockQuoteService
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at
org.apache.axis2.description.java2wsdl.Java2WSDLUtils.namespaceFromClassName(Java2WSDLUtils.java:65)
	at
org.apache.axis2.description.java2wsdl.Java2WSDLUtils.schemaNamespaceFromClassName(Java2WSDLUtils.java:84)
	at
org.apache.ws.java2wsdl.Java2WSDLBuilder.getSchemaTargetNamespace(Java2WSDLBuilder.java:121)
	at
org.apache.ws.java2wsdl.Java2WSDLBuilder.generateWSDL(Java2WSDLBuilder.java:212)
	at
org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCodegenEngine.java:59)
	at org.apache.ws.java2wsdl.Java2WSDL.main(Java2WSDL.java:32)

I added some 'echo' commands to see what was being executed by
java2wsdl.sh and here is what was shown.

***I noticed that the 'axis2.sh' erroneously adds all 'java2wsdl.sh'

command lines to the classpath as well.  This could be a bug.***

$ /usr/local/bin/axis2-1.5/bin/java2wsdl.sh -cp . -cn
samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl

java2wsdl.sh executes:
----------------------
sh /usr/local/bin/axis2-1.5/bin/axis2.sh
org.apache.ws.java2wsdl.Java2WSDL -cp . -cn
samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl


axis2.sh executes:
------------------
/opt/JAVASDK/jdk/bin/java -classpath
StockQuoteService.wsdl:-of:samples.quickstart.service.pojo.StockQuoteService:-cn:.:-cp:org.apache.ws.java2wsdl.Java2WSDL:/usr/local/bin/axis2-1.5:/opt/JAVASDK/jdk/lib/tools.jar::/usr/local/bin/axis2-1.5/lib/activation-1.1.jar:/usr/local/bin/axis2-1.5/lib/axiom-api-1.2.8.jar:/usr/local/bin/axis2-1.5/lib/axiom-dom-1.2.8.jar:/usr/local/bin/axis2-1.5/lib/axiom-impl-1.2.8.jar:/usr/local/bin/axis2-1.5/lib/axis2-adb-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-adb-codegen-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-ant-plugin-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-clustering-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-codegen-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-corba-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-fastinfoset-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-java2wsdl-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-jaxbri-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-jaxws-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-jibx-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-json-1.5.jar:/us

r/local/bin/axis2-1.5/lib/axis2-kernel-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-metadata-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-mtompolicy-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-saaj-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-spring-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-transport-http-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-transport-local-1.5.jar:/usr/local/bin/axis2-1.5/lib/axis2-xmlbeans-1.5.jar:/usr/local/bin/axis2-1.5/lib/bcel-5.1.jar:/usr/local/bin/axis2-1.5/lib/commons-codec-1.3.jar:/usr/local/bin/axis2-1.5/lib/commons-fileupload-1.2.jar:/usr/local/bin/axis2-1.5/lib/commons-httpclient-3.1.jar:/usr/local/bin/axis2-1.5/lib/commons-io-1.4.jar:/usr/local/bin/axis2-1.5/lib/commons-lang-2.3.jar:/usr/local/bin/axis2-1.5/lib/commons-logging-1.1.1.jar:/usr/local/bin/axis2-1.5/lib/geronimo-annotation_1.0_spec-1.1.jar:/usr/local/bin/axis2-1.5/lib/geronimo-jaxws_2.1_spec-1.0.jar:/usr/local/bin/axis2-1.5/lib/geronimo-saaj_1.3_spec-1.0.1.jar:/usr/local/bin/axis2-1.

5/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:/usr/local/bin/axis2-1.5/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:/usr/local/bin/axis2-1.5/lib/httpcore-4.0.jar:/usr/local/bin/axis2-1.5/lib/jalopy-1.5rc3.jar:/usr/local/bin/axis2-1.5/lib/jaxb-api-2.1.jar:/usr/local/bin/axis2-1.5/lib/jaxb-impl-2.1.7.jar:/usr/local/bin/axis2-1.5/lib/jaxb-xjc-2.1.7.jar:/usr/local/bin/axis2-1.5/lib/jaxen-1.1.1.jar:/usr/local/bin/axis2-1.5/lib/jettison-1.0-RC2.jar:/usr/local/bin/axis2-1.5/lib/jibx-bind-1.2.1.jar:/usr/local/bin/axis2-1.5/lib/jibx-run-1.2.1.jar:/usr/local/bin/axis2-1.5/lib/log4j-1.2.15.jar:/usr/local/bin/axis2-1.5/lib/mail-1.4.jar:/usr/local/bin/axis2-1.5/lib/mex-1.5.jar:/usr/local/bin/axis2-1.5/lib/neethi-2.0.4.jar:/usr/local/bin/axis2-1.5/lib/smack-3.0.4.jar:/usr/local/bin/axis2-1.5/lib/smackx-3.0.4.jar:/usr/local/bin/axis2-1.5/lib/soapmonitor-1.5.jar:/usr/local/bin/axis2-1.5/lib/woden-api-1.0M8.jar:/usr/local/bin/axis2-1.5/lib/woden-impl-dom-1.0M8.jar:/usr/local/bin/axis2-1.5/lib/wsd

l4j-1.6.2.jar:/usr/local/bin/axis2-1.5/lib/wstx-asl-3.2.4.jar:/usr/local/bin/axis2-1.5/lib/xalan-2.7.0.jar:/usr/local/bin/axis2-1.5/lib/xercesImpl-2.6.2.jar:/usr/local/bin/axis2-1.5/lib/xml-apis-1.3.02.jar:/usr/local/bin/axis2-1.5/lib/xmlbeans-2.3.0.jar:/usr/local/bin/axis2-1.5/lib/xml-resolver-1.2.jar:/usr/local/bin/axis2-1.5/lib/XmlSchema-1.4.3.jar:
-Daxis2.xml=/usr/local/bin/axis2-1.5/conf/axis2.xml
-Daxis2.repo=/usr/local/bin/axis2-1.5/repository
org.apache.ws.java2wsdl.Java2WSDL -cn
samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl



Mime
View raw message