[JBoss JIRA] Updated: (JBWS-1079) Incorrect WSDL to Java mapping for anonymous struct.
by Thomas Diesler (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1079?page=all ]
Thomas Diesler updated JBWS-1079:
---------------------------------
Fix Version/s: jbossws-1.2.0.CR2
(was: jbossws-1.2.0)
(was: jbossws-1.0.5)
> Incorrect WSDL to Java mapping for anonymous struct.
> ----------------------------------------------------
>
> Key: JBWS-1079
> URL: http://jira.jboss.com/jira/browse/JBWS-1079
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: wstools
> Affects Versions: jbossws-1.0.1, jbossws-1.0.0
> Reporter: Darran Lofthouse
> Assigned To: Darran Lofthouse
> Fix For: jbossws-1.2.0.CR2
>
>
> When running wsdl to java for a wsdl that contains a complex type that contains an anonymous struct the class generated for the anonymous struct is incorrect.
> <xsd:complexType name="Person">
> <xsd:sequence>
> <xsd:element name="Address">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Address1" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> The above example would generate an class with the name 'PersonAddress'.
> From the jax-rpc specification (section 4.2.3) : -
> " An XML struct maps to a JavaBeans class with the same name as the type of the XML struct. If the struct is anonymous, then the name of the nearest enclosing xsd:element, xsd:complexType or xsd:simpleType is used instead."
> So the name of the generated type should be Address.
> The generation of the jaxrpc-mapping actually does assume the generated class was generated with the name 'Address' so the code generation and jaxrpc-mapping generation are out of synch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[JBoss JIRA] Updated: (JBWS-1174) NullPointerException using wstools to generate java classes from WSDL
by Manuel Valladares (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1174?page=all ]
Manuel Valladares updated JBWS-1174:
------------------------------------
Description:
I have a wsdl file that imports several schema files.
When I use wstools to generate the client classes the program returns a NullPointerException.
The schema files are part of the OTA specification and they should be valid.
With axis 1.2.1 and using wsdl2java everything works fine.
I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
Here it is the the output of the exception:
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
Here is my wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
</schema>
</types>
<message name="OTA_HotelAvailRequestMessage">
<part name="payload" element="ns1:OTA_HotelAvailRQ"/>
</message>
<message name="OTA_HotelAvailResponseMessage">
<part name="payload" element="ns1:OTA_HotelAvailRS"/>
</message>
<portType name="OTA_HotelAvail">
<operation name="process">
<input message="tns:OTA_HotelAvailRequestMessage"/>
<output message="tns:OTA_HotelAvailResponseMessage"/>
</operation>
</portType>
<binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation style="document" soapAction="process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="OTA_HotelAvail">
<port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
<soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
</port>
</service>
<plnk:partnerLinkType name="OTA_HotelAvail">
<plnk:role name="OTA_HotelAvailProvider">
<plnk:portType name="tns:OTA_HotelAvail"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
was:
I have a wsdl file that imports several schema files.
When I use wstools to generate the client classes the program returns a NullPointerException.
The schema files are part of the OTA specification and they should be valid.
With axis 1.2.1 and using wsdl2java everything works fine.
I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
This issue is related to the forum post:
Here it is the the output of the exception:
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
Here is my wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
</schema>
</types>
<message name="OTA_HotelAvailRequestMessage">
<part name="payload" element="ns1:OTA_HotelAvailRQ"/>
</message>
<message name="OTA_HotelAvailResponseMessage">
<part name="payload" element="ns1:OTA_HotelAvailRS"/>
</message>
<portType name="OTA_HotelAvail">
<operation name="process">
<input message="tns:OTA_HotelAvailRequestMessage"/>
<output message="tns:OTA_HotelAvailResponseMessage"/>
</operation>
</portType>
<binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation style="document" soapAction="process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="OTA_HotelAvail">
<port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
<soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
</port>
</service>
<plnk:partnerLinkType name="OTA_HotelAvail">
<plnk:role name="OTA_HotelAvailProvider">
<plnk:portType name="tns:OTA_HotelAvail"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
> NullPointerException using wstools to generate java classes from WSDL
> ---------------------------------------------------------------------
>
> Key: JBWS-1174
> URL: http://jira.jboss.com/jira/browse/JBWS-1174
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: wstools
> Affects Versions: jbossws-1.0.3
> Environment: openSuse 10.1
> jdk 1.5.0_06-b5
> jbossws-1.0.3
> jboss-4.0.4.GA
> Reporter: Manuel Valladares
> Fix For: jbossws-2.1.0
>
> Attachments: files.ZIP
>
>
> I have a wsdl file that imports several schema files.
> When I use wstools to generate the client classes the program returns a NullPointerException.
> The schema files are part of the OTA specification and they should be valid.
> With axis 1.2.1 and using wsdl2java everything works fine.
> I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
> Here it is the the output of the exception:
> Exception in thread "main" java.lang.NullPointerException
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
> at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
> at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
> at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
> at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
> at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
> at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
> at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
> at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
> at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
> at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
> at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
> Here is my wsdl file:
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
> <types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
> <import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
> </schema>
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
> <import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
> </schema>
> </types>
> <message name="OTA_HotelAvailRequestMessage">
> <part name="payload" element="ns1:OTA_HotelAvailRQ"/>
> </message>
> <message name="OTA_HotelAvailResponseMessage">
> <part name="payload" element="ns1:OTA_HotelAvailRS"/>
> </message>
> <portType name="OTA_HotelAvail">
> <operation name="process">
> <input message="tns:OTA_HotelAvailRequestMessage"/>
> <output message="tns:OTA_HotelAvailResponseMessage"/>
> </operation>
> </portType>
> <binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="process">
> <soap:operation style="document" soapAction="process"/>
> <input>
> <soap:body use="literal"/>
> </input>
> <output>
> <soap:body use="literal"/>
> </output>
> </operation>
> </binding>
> <service name="OTA_HotelAvail">
> <port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
> <soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
> </port>
> </service>
> <plnk:partnerLinkType name="OTA_HotelAvail">
> <plnk:role name="OTA_HotelAvailProvider">
> <plnk:portType name="tns:OTA_HotelAvail"/>
> </plnk:role>
> </plnk:partnerLinkType>
> </definitions>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[JBoss JIRA] Updated: (JBWS-1174) NullPointerException using wstools to generate java classes from WSDL
by Manuel Valladares (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1174?page=all ]
Manuel Valladares updated JBWS-1174:
------------------------------------
JBoss Forum Reference: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89740
Description:
I have a wsdl file that imports several schema files.
When I use wstools to generate the client classes the program returns a NullPointerException.
The schema files are part of the OTA specification and they should be valid.
With axis 1.2.1 and using wsdl2java everything works fine.
I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
This issue is related to the forum post:
Here it is the the output of the exception:
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
Here is my wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
</schema>
</types>
<message name="OTA_HotelAvailRequestMessage">
<part name="payload" element="ns1:OTA_HotelAvailRQ"/>
</message>
<message name="OTA_HotelAvailResponseMessage">
<part name="payload" element="ns1:OTA_HotelAvailRS"/>
</message>
<portType name="OTA_HotelAvail">
<operation name="process">
<input message="tns:OTA_HotelAvailRequestMessage"/>
<output message="tns:OTA_HotelAvailResponseMessage"/>
</operation>
</portType>
<binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation style="document" soapAction="process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="OTA_HotelAvail">
<port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
<soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
</port>
</service>
<plnk:partnerLinkType name="OTA_HotelAvail">
<plnk:role name="OTA_HotelAvailProvider">
<plnk:portType name="tns:OTA_HotelAvail"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
was:
I have a wsdl file that imports several schema files.
When I use wstools to generate the client classes the program returns a NullPointerException.
The schema files are part of the OTA specification and they should be valid.
With axis 1.2.1 and using wsdl2java everything works fine.
I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
Here it is the the output of the exception:
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
Here is my wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
</schema>
</types>
<message name="OTA_HotelAvailRequestMessage">
<part name="payload" element="ns1:OTA_HotelAvailRQ"/>
</message>
<message name="OTA_HotelAvailResponseMessage">
<part name="payload" element="ns1:OTA_HotelAvailRS"/>
</message>
<portType name="OTA_HotelAvail">
<operation name="process">
<input message="tns:OTA_HotelAvailRequestMessage"/>
<output message="tns:OTA_HotelAvailResponseMessage"/>
</operation>
</portType>
<binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation style="document" soapAction="process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="OTA_HotelAvail">
<port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
<soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
</port>
</service>
<plnk:partnerLinkType name="OTA_HotelAvail">
<plnk:role name="OTA_HotelAvailProvider">
<plnk:portType name="tns:OTA_HotelAvail"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
> NullPointerException using wstools to generate java classes from WSDL
> ---------------------------------------------------------------------
>
> Key: JBWS-1174
> URL: http://jira.jboss.com/jira/browse/JBWS-1174
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: wstools
> Affects Versions: jbossws-1.0.3
> Environment: openSuse 10.1
> jdk 1.5.0_06-b5
> jbossws-1.0.3
> jboss-4.0.4.GA
> Reporter: Manuel Valladares
> Fix For: jbossws-2.1.0
>
> Attachments: files.ZIP
>
>
> I have a wsdl file that imports several schema files.
> When I use wstools to generate the client classes the program returns a NullPointerException.
> The schema files are part of the OTA specification and they should be valid.
> With axis 1.2.1 and using wsdl2java everything works fine.
> I am including the wsdl file, I would like to add the schema files but there isn't a place where to attach files.
> This issue is related to the forum post:
> Here it is the the output of the exception:
> Exception in thread "main" java.lang.NullPointerException
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:214)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:149)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:587)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:628)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
> at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
> at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:249)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:154)
> at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
> at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:701)
> at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:694)
> at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:575)
> at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:372)
> at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:512)
> at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:534)
> at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:188)
> at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:329)
> at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
> at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
> at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
> Here is my wsdl file:
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="OTA_HotelAvail" targetNamespace="http://xmlns.oracle.com/OTA_HotelAvail" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns2="http://www.example.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail">
> <types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
> <import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/>
> </schema>
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/OTA_HotelAvail" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
> <import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/>
> </schema>
> </types>
> <message name="OTA_HotelAvailRequestMessage">
> <part name="payload" element="ns1:OTA_HotelAvailRQ"/>
> </message>
> <message name="OTA_HotelAvailResponseMessage">
> <part name="payload" element="ns1:OTA_HotelAvailRS"/>
> </message>
> <portType name="OTA_HotelAvail">
> <operation name="process">
> <input message="tns:OTA_HotelAvailRequestMessage"/>
> <output message="tns:OTA_HotelAvailResponseMessage"/>
> </operation>
> </portType>
> <binding name="OTA_HotelAvailBinding" type="tns:OTA_HotelAvail">
> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="process">
> <soap:operation style="document" soapAction="process"/>
> <input>
> <soap:body use="literal"/>
> </input>
> <output>
> <soap:body use="literal"/>
> </output>
> </operation>
> </binding>
> <service name="OTA_HotelAvail">
> <port name="OTA_HotelAvailPort" binding="tns:OTA_HotelAvailBinding">
> <soap:address location="http://pruebaoracle.oracle.com:7778/orabpel/Clientes/OTA_HotelAvail/1.0"/>
> </port>
> </service>
> <plnk:partnerLinkType name="OTA_HotelAvail">
> <plnk:role name="OTA_HotelAvailProvider">
> <plnk:portType name="tns:OTA_HotelAvail"/>
> </plnk:role>
> </plnk:partnerLinkType>
> </definitions>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months