users@jax-rpc.java.net

Re: Problem with C# clients

From: Anne Thomas Manes <anne_at_MANES.NET>
Date: Fri, 29 Aug 2003 21:22:40 -0400

Which request message is .NET and which is JAX-RPC?

There's one significant difference between the two:
In the first SOAP request message, <PurchaseOrder_1> is namespace
qualified, because "http://www.foobar.com/types" is defined as the default
namespace.
In the second SOAP request message, <PurchaseOrder_1> is not namespace
qualified, because there is no default namespace. This means that it must
be a local element within <acceptPO> element definition.

Can you supply us with your WSDL definition?

Anne

At 07:54 PM 8/29/2003 -0400, you wrote:
>Hi.
>
>I m trying to access a JAX-RPC service from C# client.
>
>I use document/literal and -wsi flag.
>
>I keep getting the following SOAP fault.
>
>"caught exception while handling request: deserialization error:
>unexpected XML reader state. expected: END but found: START:
>{http://www.foobar.com/types}PurchaseOrder_1"
>
>
>Attached are the SOAP fault message and SOAP request messages for
>C# and JAX-RPC.
>
>When I use a JAX-RPC client, everything works fine.
>
>The only thing I can see different between the Java and C# code
>is the way the namespace is declared for the body.
>
>Whats going on ... can anyone figure this out ?
>
>Thanks
>=s<?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="http://www.foobar.com/types">
><env:Body>
> <env:Fault><faultcode>env:Client</faultcode>
> <faultstring>caught exception while handling request:
> deserialization error: unexpected XML reader state. expected: END but
> found: START: {http://www.foobar.com/types}PurchaseOrder_1</faultstring>
> </env:Fault>
> </env:Body>
> </env:Envelope>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <acceptPO xmlns="http://www.foobar.com/types">
> <PurchaseOrder_1>
> <billTo>
> <address>1 Lonely Street</address>
> <city>Hartford</city>
> <name>Bicycle Buyers</name>
> <state>CT</state>
> <zipCode>06082</zipCode>
> </billTo>
> <poID>99AA</poID>
> <shipTo>
> <address>1 Lonely Street</address>
> <city>Hartford</city>
> <name>Bicycle Buyers</name>
> <state>CT</state>
> <zipCode>06082</zipCode>
> </shipTo>
> </PurchaseOrder_1>
> </acceptPO>
> </soap:Body>
></soap:Envelope>
>
><?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="http://www.foobar.com/types">
> <env:Body>
> <ns0:acceptPO>
> <PurchaseOrder_1>
> <billTo>
> <address>1 Lonely Street</address>
> <city>Hartford</city>
> <name>Bicycle Buyers</name>
> <state>CT</state>
> <zipCode>06082</zipCode>
> </billTo>
> <poID>99AA</poID>
> <shipTo>
> <address>1 Lonely Street</address>
> <city>Hartford</city>
> <name>Bicycle Buyers</name>
> <state>CT</state>
> <zipCode>06082</zipCode>
> </shipTo>
> </PurchaseOrder_1>
> </ns0:acceptPO>
> </env:Body>
></env:Envelope>