You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jeehong Min <je...@parasoft.com> on 2003/01/24 20:36:03 UTC
Correct serialization based on WSDL
Here are some fragments from a WSDL:
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.themindelectric.com/wrappers/">
<element name="Boolean" nillable="true" type="boolean" />
...
</types>
<message name="echoBool1In">
<part element="ns11:Boolean" name="arg0" />
</message>
<portType>
<operation name="echoBool" parameterOrder="arg0">
<input message="tns:echoBool1In" name="echoBool1In" />
<output message="tns:echoBool1Out" name="echoBool1Out" />
</operation>
...
</portType>
In addition,
xmlns:ns11="http://www.themindelectric.com/wrappers/"
soap:body use="encoded" with encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
My question is: which is the correct serialization to XML based on WSDL? 1 or 2 or both? (And why?) Fragment shown is from inside the SOAP-ENV:Body.
1.
<ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
<arg0 xsi:type="xsd:boolean" xsi:nil="true"/>
</ns1:echoBool>
2.
<ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
<ns2:Boolean xsi:type="xsd:boolean" xsi:nil="true" xmlns:ns2="http://www.themindelectric.com/wrappers/"/>
</ns1:echoBool>
Re: Correct serialization based on WSDL
Posted by Jeehong Min <je...@parasoft.com>.
Thanks for taking a bite.
Believe it or not, 1 is the message that a GLUE client sends based on the
WSDL (which is GLUE generated). 2 is the message I've created with AXIS
based on my parsing of the WSDL.
Personally, I think that 2 is more correct than 1 - neither seems wrong -
but I'm not sure. I would like to know if anyone has a definitive answer to
this.
----- Original Message -----
From: "Dennis Sosnoski" <dm...@sosnoski.com>
To: <ax...@xml.apache.org>
Sent: Friday, January 24, 2003 12:54 PM
Subject: Re: Correct serialization based on WSDL
> Jeehong Min wrote:
>
> > My question is: which is the correct serialization to XML based on
> > WSDL? 1 or 2 or both? (And why?) Fragment shown is from inside the
> > SOAP-ENV:Body.
> >
> > 1.
> > <ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
> > <arg0 xsi:type="xsd:boolean" xsi:nil="true"/>
> > </ns1:echoBool>
> >
> >
> > 2.
> > <ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
> > <ns2:Boolean xsi:type="xsd:boolean" xsi:nil="true"
> > xmlns:ns2="http://www.themindelectric.com/wrappers/"/
> > <http://www.themindelectric.com/wrappers/%22/>>
> > </ns1:echoBool>
>
> I'll bite. I'd say that 2 is correct. 1 does not appear to match the
> WSDL message format, which requires a Boolean element from the
> http://www.themindelectric.com/wrappers namespace. AFAIK it's not an
> option to ignore the message description in the WSDL and just encode the
> value directly. I haven't looked this up to be sure, though.
>
> From just looking at it I'd suspect that 1 was generated from code
> without using the WSDL.
>
> - Dennis
>
> Dennis M. Sosnoski
> Enterprise Java, XML, and Web Services Support
> http://www.sosnoski.com
> Redmond, WA 425.885.7197
>
>
Re: Correct serialization based on WSDL
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Jeehong Min wrote:
> My question is: which is the correct serialization to XML based on
> WSDL? 1 or 2 or both? (And why?) Fragment shown is from inside the
> SOAP-ENV:Body.
>
> 1.
> <ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
> <arg0 xsi:type="xsd:boolean" xsi:nil="true"/>
> </ns1:echoBool>
>
>
> 2.
> <ns1:echoBool xmlns:ns1="http://tempuri.org/soapservices.Echo">
> <ns2:Boolean xsi:type="xsd:boolean" xsi:nil="true"
> xmlns:ns2="http://www.themindelectric.com/wrappers/"/
> <http://www.themindelectric.com/wrappers/%22/>>
> </ns1:echoBool>
I'll bite. I'd say that 2 is correct. 1 does not appear to match the
WSDL message format, which requires a Boolean element from the
http://www.themindelectric.com/wrappers namespace. AFAIK it's not an
option to ignore the message description in the WSDL and just encode the
value directly. I haven't looked this up to be sure, though.
From just looking at it I'd suspect that 1 was generated from code
without using the WSDL.
- Dennis
Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com
Redmond, WA 425.885.7197