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 Xinjun Chen <xj...@gmail.com> on 2005/12/20 10:58:24 UTC

Java2WSDL error

I am using Java2WSDL to generate a WSDL from an existing Java file.
My java file is the implementation class of a web service, the code snippet
is as follows:

public class PrimitiveComponent {

public EndpointReferenceType createResource() throws RemoteException {...}
public void initComponentInstance(ComponentInstance instance) throws
RemoteException {...}
public void setRoutingRules(HashMap routingRules) throws RemoteException
{...}
public void setLinkedComponents(LinkedComponents info) throws
RemoteException {...}
public String getStatus() throws RemoteException {...}

}

ComponentInstance is from another jar file, LinkedComponents is a class
containing HashMap and Lists.

When I use the following command to generate WSDL, i get
NullPointerException without any other clue.

*K:\soardsgrid\component\build\classes>java org.apache.axis.wsdl.Java2WSDL-o PC.
wsdl -l"**
http://155.69.xx.xx:8080/wsrf/services/soardsgrid/PrimitiveComponent*<http://155.69.xx.xx:8080/wsrf/services/soardsgrid/PrimitiveComponent>
*" -
n "**http://soardsgrid/component/primitive*<http://soardsgrid/component/primitive>
*" -p"soardsgrid.component.primitive" "ht
tp://soardsgrid/component/primitive" -y DOCUMENT -u LITERAL -X
%CLASSPATH%;K:\so
ardsgrid\organizer\dist\organizer.jar
soardsgrid.component.primitive.PrimitiveCo
mponent
java.lang.NullPointerException
        at org.apache.axis.utils.ClassUtils.createClassLoader(
ClassUtils.java:26
0)
        at org.apache.axis.wsdl.Java2WSDL.parseOption(Java2WSDL.java:482)
        at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:552)
        at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:618)*

*K:\soardsgrid\component\build\classes>*

Could you expert give me a clue what I should do to successfully generate
the corresponding WSDL file?

Is it necessary that I change all the void input parameter
type and void return type to OperationName and OperationNameResponse complex
type? How can i get more detailed error message?

By the way, I am using Axis 1.2RC2 (distributed with Globus Toolkit Version
4.0.1).



Regards,

Xinjun