Hi Manoj,
I have got the same errors using JDK 1.5 as well. I believe the flaw is with
the way the java2wsdl parses the "-cp" command line argument.
I was able to get around this error by using ant for executing the java2wsdl
and wsdl2java commands. Also I believe that the "-cp" option is used only for
locating the class which we have mentioned in the "-cn" argument. Hence what I
would suggest is try using the following command at the command line
java -cp <AXIS_JARS+ OTHER_REQUIRED_JARS> org.apache.ws.java2wsdl.Java2WSDL
-cn <Name of the class> -cp <CLasspath for this class> .......
Else you can try using the Ant script which I have written.
<?xml version="1.0"?>
<project name="CodegenExample" default="" basedir=".">
<path id="example.classpath">
<fileset dir="E:\Work-Folder\AXIS-2.X-POC\build\classes">
<include name="*.class" />
</fileset>
<fileset dir="D:\thirdparty-tools\axis\axis2-1.1\lib">
<include name="*.jar" />
</fileset>
<fileset dir="D:\MyProject\jars\externals">
<include name="*.jar" />
</fileset>
<fileset dir="D:\MyProject\jars\internals">
<include name="*.jar" />
</fileset>
</path>
<target name="java2wsdl" depends="" >
<java classname="org.apache.ws.java2wsdl.Java2WSDL"
classpathref="example.classpath">
<arg value="-o"/>
<arg value="E:\Work-Folder\AXIS-2.X-POC\simmanager-ws\wsdl" />
<arg value="-cn"/>
<arg value="com.msc.sdm.ic.SimMgrWebServiceImpl" />
<arg value="-l"/>
<arg value="http://localhost:8000/sample/services/MyWebService"
/>
<arg value="-of"/>
<arg value="MyWebService.wsdl" />
<arg value="-st"/>
<arg value="rpc"/>
<arg value="-cp"/>
<arg value="E:\Work-Folder\AXIS-2.X-POC\build\classes"/>
<classpath refid="example.classpath"/>
</java>
</target>
</project>
You would have to just change the hard coded paths.
Hope that helps
Regards,
Nilesh
Manoj Khangaonkar <[EMAIL PROTECTED]> wrote: Thomas,
With the -cp . (dot) option , I notice that your error is from the jdk jar.
Not any of the libraries that AXIS2 brings in.
From your classpath, It seems that you are using JDK 1.6. I have seem emails
in this group that there are known
problems with JDK1.6
Try JDK 1.5. It has always worked from me.
I agree that requiring -cp . is annoying and the script needs to pick up the
existing classpath.
Mj
On 12/20/06, Thomas Bruckmayer <[EMAIL PROTECTED]> wrote: Hi all!
Sorry for the noob-question but i am not able to get java2wsdl running.
When I'am running java2wsdl without -cp opting i got the following message
An error occured while generating codejava.lang.ClassNotFoundException
When I'am running java2wsdl with -cp . (current directory)
I get Exception in thread "main" javax.xml.stream.FactoryConfigurationError :
Provider
javax.xml.stream.XMLInputFactory could not be instantiated:
java.lang.Instantiat
ionException
at
javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:158
)
at
org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:
40)
at
org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.ja
va:66)
at
org.apache.ws.java2wsdl.Java2OMBuilder.generateTypes (Java2OMBuilder.j
ava:153)
at
org.apache.ws.java2wsdl.Java2OMBuilder.generateOM(Java2OMBuilder.java
:122)
at
org.apache.ws.java2wsdl.Java2WSDLBuilder.generateWSDL(Java2WSDLBuilde
r.java:184)
at
org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCode
genEngine.java:56)
at org.apache.ws.java2wsdl.Java2WSDL.main(Java2WSDL.java:29)
I've heard that this can be cause when it is not possible to find the maven
- libs.
So I tried:
java2wsdl -cp .;P:\Apache Software Foundation\Maven 1.0.2\lib -cn
src.swa.webservices.SearchDeveloperService.SearchDeveloper -o SearchDevel
operService.wsdl
But the i get: An error occured while generating
codejava.lang.ClassNotFoundException: src.swa.
webservices.SearchDeveloperService.SearchDeveloper
Maven and current directory are in the %classpath% variable:
D:\workspace\swa_DMC>echo %classpath%
.;P:\Java\jdk1.6.0\lib;P:\axis\axis2- 1.1\lib;P:\ant\lib;D:\workspace\swa_DMC
;P:\
Apache Software Foundation\Maven 1.0.2\lib
But axis2wsdl does not care...
OS: Windows XP
regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com