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 Daniel Aschwanden <da...@inodes.ch> on 2003/06/29 21:00:43 UTC
xsi:type & base type in simpleType/restriction
Hi,
I configured the axis server to return xsi:types.
When the axis server returns a response (see the response snippet bellow) it
omits the xsi:type for the elements with simpleTypes/restrictions (as the
'loginState' in the following xsd snippet):
xsd snippet:
<xs:complexType name="loginResponse">
<xs:sequence>
<xs:element name="loginState">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="success"/>
<xs:enumeration value="undefinedError"/>
<xs:enumeration value="unableToEstablishLink"/>
<xs:enumeration value="entityNotDefined"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="additionalInformation" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
response snippet:
<ns3:loginResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns3="urn:NORA">
<loginResponse xsi:type="ns4:loginResponse" xmlns:ns4="urn:NORA:Schema">
<loginState>success</loginState>
<additionalInformation xsi:type="xsd:string">foo</additionalInformation>
</loginResponse>
</ns3:loginResponse>
What is the reason that axis does not return a xsi:type for the elements with
simpleType/restrictions?
How can I convince axis to return a xsi:type attribute?
eg. <loginState xsi:type="xsd:string">success</loginState> in the example
above?
Any hints would be very much appreciated.
Cheers,
Dan
--
Re: xsi:type & base type in simpleType/restriction
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
It can only return an xsi:type if you give that type a name, rather than
make it anonymous.
Jeff
----- Original Message -----
From: "Daniel Aschwanden" <da...@inodes.ch>
To: <ax...@ws.apache.org>
Sent: Sunday, June 29, 2003 12:00 PM
Subject: xsi:type & base type in simpleType/restriction
> Hi,
>
> I configured the axis server to return xsi:types.
> When the axis server returns a response (see the response snippet bellow)
it
> omits the xsi:type for the elements with simpleTypes/restrictions (as the
> 'loginState' in the following xsd snippet):
>
...