Another way to fix this problem is to add elementFormDefault="qualified" to
your schema:
<schema xmlns="
http://www.w3.org/2001/XMLSchema"
xmlns:soap11-enc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:TTM"
elementFormDefault="qualified">
This attribute will put all local elements in the targetNamespace.
Note that the "other" client has a bug. Based on your current schema, the
child elements of <execute> should be unqualified.
Regards,
Anne
-----Original Message-----
From: Eric Rajkovic [mailto:eric.rajkovic_at_oracle.com]
Sent: Thursday, November 18, 2004 3:26 AM
To: users_at_jax-rpc.dev.java.net
Subject: RE: XML parsing problem
For the good request, you have
<ns0:execute>
<CreateCustomerAndAddressInput_1>
The parameter is not in the same namespace as the parent - the operation
name.
For the request which is not working, you have
<execute xmlns="urn:TTM">
<CreateCustomerAndAddressInput_1>
Because execute is defining a default namespace, the child node is in the
same namespace. One way to fix it
Will be to change the namespace of the parameter:
<execute xmlns="urn:TTM">
<CreateCustomerAndAddressInput_1 xmlns="">
eric
-----Original Message-----
From: Kämäräinen [mailto:Kämäräinen]
Sent: Thursday, November 18, 2004 12:05 AM
To: users_at_jax-rpc.dev.java.net
Subject: XML parsing problem
Hi!
This is actually an XML issue and not JAX-RPC issue, but may be somebody
here can help.
We have a JAX-RPC service that works well if we call it using a client
generated using JAX-RPC. But, when called using another client (generated by
other tools), an parsing error occurs.
Can anyone tell what's wrong with the second XML?
---------------------------------------------------
The WSDL of the service is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="
http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:TTM"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
name="CreateCustomerAndAddressService" targetNamespace="urn:TTM">
<types>
<schema xmlns="
http://www.w3.org/2001/XMLSchema"
xmlns:soap11-enc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:TTM">
<complexType name="execute">
<sequence>
<element name="CreateCustomerAndAddressInput_1"
type="tns:CreateCustomerAndAddressInput"
nillable="true"/></sequence></complexType>
<complexType name="CreateCustomerAndAddressInput">
<sequence>
<element name="customerAllowsDirectMarketing" type="boolean"
nillable="true"/>
<element name="customerAllowsEmailMarketing" type="boolean"
nillable="true"/>
<element name="customerContactData" type="string"
nillable="true"/>
<element name="customerCreateDate" type="dateTime"
nillable="true"/>
<element name="customerDescription" type="string"
nillable="true"/>
<element name="customerFaxAreaCode" type="string"
nillable="true"/>
<element name="customerFaxNumber" type="long" nillable="true"/>
<element name="customerFirstName" type="string" nillable="true"/>
<element name="customerLanguageCode" type="string"
nillable="true"/>
<element name="customerLastName" type="string" nillable="true"/>
<element name="customerNationalityId" type="string"
nillable="true"/>
<element name="customerTaxRegionId" type="string"
nillable="true"/>
<element name="customerTelNumber" type="long" nillable="true"/>
<element name="customerTruncCode" type="string" nillable="true"/>
<element name="customerUniqueId" type="string" nillable="true"/>
<element name="genAddressCountryId" type="string"
nillable="true"/>
<element name="genAddressRegionId" type="string" nillable="true"/>
<element name="genAddressStreetAddress" type="string"
nillable="true"/>
<element name="genAddressZipCode" type="string" nillable="true"/>
<element name="instAddressCountryId" type="string"
nillable="true"/>
<element name="instAddressRegionId" type="string"
nillable="true"/>
<element name="instAddressStreetAddress" type="string"
nillable="true"/>
<element name="instAddressZipCode" type="string" nillable="true"/>
<element name="password" type="string" nillable="true"/>
<element name="systemId" type="string" nillable="true"/>
<element name="username" type="string"
nillable="true"/></sequence></complexType>
<complexType name="executeResponse">
<sequence>
<element name="result" type="string"
nillable="true"/></sequence></complexType>
<element name="execute" type="tns:execute"/>
<element name="executeResponse"
type="tns:executeResponse"/></schema></types>
<message name="CreateCustomerAndAddressIF_execute">
<part name="parameters" element="tns:execute"/></message>
<message name="CreateCustomerAndAddressIF_executeResponse">
<part name="result" element="tns:executeResponse"/></message>
<portType name="CreateCustomerAndAddressIF">
<operation name="execute">
<input message="tns:CreateCustomerAndAddressIF_execute"/>
<output
message="tns:CreateCustomerAndAddressIF_executeResponse"/></operation></port
Type>
<binding name="CreateCustomerAndAddressIFBinding"
type="tns:CreateCustomerAndAddressIF">
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="execute">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>
<service name="CreateCustomerAndAddressService">
<port name="CreateCustomerAndAddressIFPort"
binding="tns:CreateCustomerAndAddressIFBinding">
<soap:address xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
location="secret"/></port></service></definitions>
---------------------------------------------------
The working SOAP request is:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns: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:enc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:TTM">
<env:Body>
<ns0:execute>
<CreateCustomerAndAddressInput_1>
<customerAllowsDirectMarketing xsi:nil="1"/>
<customerAllowsEmailMarketing xsi:nil="1"/>
<customerContactData xsi:nil="1"/>
<customerCreateDate>2004-11-18T09:17:32.077+02:00</customerCreateDate>
<customerDescription xsi:nil="1"/>
<customerFaxAreaCode xsi:nil="1"/>
<customerFaxNumber xsi:nil="1"/>
<customerFirstName xsi:nil="1"/>
<customerLanguageCode>1</customerLanguageCode>
<customerLastName>testLastName</customerLastName>
<customerNationalityId xsi:nil="1"/>
<customerTaxRegionId>049</customerTaxRegionId>
<customerTelNumber xsi:nil="1"/>
<customerTruncCode xsi:nil="1"/>
<customerUniqueId xsi:nil="1"/>
<genAddressCountryId>FI</genAddressCountryId>
<genAddressRegionId>049</genAddressRegionId>
<genAddressStreetAddress>test street
1409</genAddressStreetAddress>
<genAddressZipCode>00250</genAddressZipCode>
<instAddressCountryId xsi:nil="1"/>
<instAddressRegionId xsi:nil="1"/>
<instAddressStreetAddress xsi:nil="1"/>
<instAddressZipCode xsi:nil="1"/>
<password>xxx</password>
<systemId>xxx</systemId>
<username>xxx</username>
</CreateCustomerAndAddressInput_1>
</ns0:execute>
</env:Body>
</env:Envelope>
---------------------------------------------------
The non-working SOAP request is:
<?xml version="1.0"?>
<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">
<SOAP-ENV:Body>
<execute xmlns="urn:TTM">
<CreateCustomerAndAddressInput_1>
<customerAllowsDirectMarketing>False</customerAllowsDirectMarketing>
<customerAllowsEmailMarketing>False</customerAllowsEmailMarketing>
<customerContactData></customerContactData>
<customerCreateDate xsi:NULL="true"/>
<customerDescription></customerDescription>
<customerFaxAreaCode></customerFaxAreaCode>
<customerFaxNumber>0</customerFaxNumber>
<customerFirstName></customerFirstName>
<customerLanguageCode></customerLanguageCode>
<customerLastName></customerLastName>
<customerNationalityId></customerNationalityId>
<customerTaxRegionId></customerTaxRegionId>
<customerTelNumber>0</customerTelNumber>
<customerTruncCode></customerTruncCode>
<customerUniqueId></customerUniqueId>
<genAddressCountryId></genAddressCountryId>
<genAddressRegionId></genAddressRegionId>
<genAddressStreetAddress></genAddressStreetAddress>
<genAddressZipCode></genAddressZipCode>
<instAddressCountryId></instAddressCountryId>
<instAddressRegionId></instAddressRegionId>
<instAddressStreetAddress></instAddressStreetAddress>
<instAddressZipCode></instAddressZipCode>
<password>xxx</password>
<systemId>xxx</systemId>
<username>xxx</username>
</CreateCustomerAndAddressInput_1>
</execute>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---------------------------------------------------
And the JAX-RPC error message is:
JAXRPC.TIE.01: caught exception while handling request: deserialization
error: unexpected XML reader state. expected: END: but found: START:
{urn:TTM} UpdateAddressInput_1
Thanks in advance for any help!
--Teemu
--
TTM-Tieto Oy
Teemu Kämäräinen
GSM: +358 44 700 3227
E-mail: teemu.kamarainen_at_ttmtieto.fi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net