[jbossws-users] [jbossws] re: namespace problem: requested element {http://gaws.mec.com/rta/ws/types}businessdate is not allowed in this position in the sequence.

Erique eriqueliu at gmail.com
Fri Apr 25 01:23:00 EDT 2008


Hello,

I'm facing the same problem. I modified the Nusoap and it's possible to
create soap messages desired by JBoss for some of the functions, but when
I'm using the same way to call other functions, the error as Douglas
reported returned.

>From the debug info, i can see the error string is:
org.jboss.ws.binding.BindingException:
org.jboss.ws.jbossxb.UnmarshalException: Failed to parse source: Requested
element {http://messages..../ws}ChargedUserRequest_1 is not allowed in this
position in the sequence. The next element should be ChargedUserRequest_1

I think this error is also caused by the problem of namespace. So I tried to
add / removed all namespaces of each operation and parameter, but it doesn't
work too. I don't know what should be the xml like.

The way works fine on another function, the difference between those 2
function is, another function doesn't set its own parameter, but only
extends the Request. So I don't have any ideas about whether there is any
relations.

The issue soap message as below.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2410="http://tempuri.org
">
<SOAP-ENV:Body>
<chargeUser xmlns="urn:charge....types">
<ns:ChargeUserRequest_1 xmlns:ns="http://messages..../ws">
<amount>5</amount>
<reasonCode>456</reasonCode>
<taxable>true</taxable>
<appID>WEBSERVICE</appID>
<token>GW2K4PYMUkFmrjtKWisLZqFYx</token>
<account>123456</account>
<transactionID>0372001208429988</transactionID>
</ns:ChargeUserRequest_1>
</chargeUser>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and the related WSDL as the following:

<definitions name="WebService" targetNamespace="urn:charge....types" xmlns="
http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="urn:charge....types"
xmlns:ns2="http://messages..../ws" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:....ws" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<types>
<schema targetNamespace="http://messages..../ws" xmlns="
http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn:charge....types"
xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://messages..../ws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<import namespace="urn:charge....types"/>
<import namespace="http://www.w3.org/2001/XMLSchema"/>

<complexType name="ChargeUserRequest">
<complexContent>
<extension base="tns:Request">
<sequence>
<element name="amount" type="double"/>
<element name="reasonCode" nillable="true" type="string"/>
<element name="taxable" type="boolean"/>
</sequence>
</extension>
</complexContent>
</complexType>

<complexType name="Request">
<sequence>
<element name="appID" nillable="true" type="string"/>
<element name="token" nillable="true" type="string"/>
<element name="account" nillable="true" type="string"/>
<element name="transactionID" nillable="true" type="string"/>
</sequence>
</complexType>

</schema>

<schema targetNamespace="urn:charge....types" xmlns="
http://www.w3.org/2001/XMLSchema" xmlns:ns2="
http://www.w3.org/2001/XMLSchema" xmlns:ns3="http://messages..../ws"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:charge....types" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<import namespace="http://messages..../ws"/>
<import namespace="http://www.w3.org/2001/XMLSchema"/>

<complexType name="chargeUser">
<sequence>
<element name="ChargeUserRequest_1" nillable="true"
type="ns3:ChargeUserRequest"/>
</sequence>
</complexType>
<complexType name="chargeUserResponse">
<sequence>
<element name="result" nillable="true" type="ns3:ChargeUserResponse"/>
</sequence>
</complexType>

<element name="chargeUser" type="tns:chargeToBill"/>
<element name="chargeUserResponse" type="tns:chargeToBillResponse"/>

<message name="WebServiceInterface_chargeUser">
<part element="ns1:chargeUser" name="parameters"/>
</message>
<message name="WebServiceInterface_chargeUserResponse">
<part element="ns1:chargeUserResponse" name="result"/>
</message>

</schema>

<portType name="WebServiceInterface">
<operation name="chargeToBill">
<input message="tns:WebServiceInterface_chargeUser"/>
<output message="tns:WebServiceInterface_chargeUserResponse"/>
</operation>

<binding name="WebServiceInterfaceBinding" type="tns:WebServiceInterface">
<soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
<operation name="chargeUser">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>

<service name="WebService">
<port binding="tns:WebServiceInterfaceBinding"
name="WebServiceInterfacePort">
<soap:address location=".....">
</port>
</service>
</definitions>

Someone can help me on this problem?

Thanks,

Erique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbossws-users/attachments/20080425/85877902/attachment.html 


More information about the jbossws-users mailing list