[jboss-user] [JBossWS] - problem with wstools
barrob1
do-not-reply at jboss.com
Thu Dec 7 10:17:30 EST 2006
I have problem to generate wsdl to java. I tried run wstool against two document/literal wsdls. When wstools run with first document everything is ok. Problem occurs when I do some changes to wsdl, which in my mind has no effect on result. Below these two documents, and exception thrown when I run against second document.
First wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/personStore/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="personStore"
targetNamespace="http://www.example.org/personStore/">
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/personStore/"
xmlns:tns="http://www.example.org/personStore/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="InputDocuments" type="tns:InputDocumentsType" />
<xsd:complexType name="InputDocumentsType">
<xsd:sequence>
<xsd:element name="Document" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Person" type="tns:personType" />
<xsd:complexType name="personType">
<xsd:sequence>
<xsd:element name="GivenName" type="xsd:string" />
<xsd:element name="Surname" type="xsd:string" />
<xsd:element name="Age" type="xsd:integer" />
<xsd:element ref="tns:InputDocuments" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="PersonResponse" type="tns:personResponseType" />
<xsd:complexType name="personResponseType">
<xsd:sequence>
<xsd:element name="IdPerson" type="xsd:integer" />
<xsd:element name="IdParent" type="xsd:integer" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="NewOperationResponse">
<wsdl:part name="NewOperationResponse" element="tns:PersonResponse"/>
</wsdl:message>
<wsdl:message name="NewOperationRequest">
<wsdl:part name="NewOperationRequest" element="tns:Person" />
</wsdl:message>
<wsdl:portType name="personStore">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewOperationRequest"/>
<wsdl:output message="tns:NewOperationResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="personStoreSOAP" type="tns:personStore">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="http://www.example.org/personStore/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="personStore">
<wsdl:port binding="tns:personStoreSOAP" name="personStoreSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Second wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/personStore/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="personStore"
targetNamespace="http://www.example.org/personStore/">
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/personStore/"
xmlns:tns="http://www.example.org/personStore/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="InputDocuments">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Document" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Person" type="tns:personType" />
<xsd:complexType name="personType">
<xsd:sequence>
<xsd:element name="GivenName" type="xsd:string" />
<xsd:element name="Surname" type="xsd:string" />
<xsd:element name="Age" type="xsd:integer" />
<xsd:element ref="tns:InputDocuments" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="PersonResponse" type="tns:personResponseType" />
<xsd:complexType name="personResponseType">
<xsd:sequence>
<xsd:element name="IdPerson" type="xsd:integer" />
<xsd:element name="IdParent" type="xsd:integer" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="NewOperationResponse">
<wsdl:part name="NewOperationResponse" element="tns:PersonResponse"/>
</wsdl:message>
<wsdl:message name="NewOperationRequest">
<wsdl:part name="NewOperationRequest" element="tns:Person" />
</wsdl:message>
<wsdl:portType name="personStore">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewOperationRequest"/>
<wsdl:output message="tns:NewOperationResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="personStoreSOAP" type="tns:personStore">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="http://www.example.org/personStore/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="personStore">
<wsdl:port binding="tns:personStoreSOAP" name="personStoreSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Exception thrown when wstool run against second document:
Exception in thread "main" java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.tools.WSDLToJava.unwrapRequestParticles(WSDLToJava.java:266)
at org.jboss.ws.tools.WSDLToJava.unwrapRequest(WSDLToJava.java:239)
at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:360)
at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:486)
at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:518)
at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:161)
at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:303)
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)
config-wsdl.xml
<configuration
xmlns="http://www.jboss.org/jbossws-tools"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools jboss-wstools.xsd">
<wsdl-java location="/temp/_ab/personStoreReq.wsdl">
<webservices ejb-link="PersonWS"/>
</wsdl-java>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991977#3991977
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991977
More information about the jboss-user
mailing list