Hi axis-users,
        I have a soap interoparibilty problem between axis and .net  with simple xsd 
types and how they are transformed into a soap xml message.

Assuming a type like the following:
                <xs:simpleType name="ZIP-CodeType">
                        <xs:restriction base="xs:NMTOKEN">
                                <xs:minLength value="4"/>
                        <xs:maxLength value="6"/>
                        </xs:restriction>
                </xs:simpleType>

In the axis generated soap body  this will look like 

<multiRef id="id10" soapenc:root="0" 
        soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
        xsi:type="ns13:ZIP-CodeType" 
        xmlns:ns13="http://www.itserve.ch/schemas/20030722/SalaryDeclaration"; 
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
        3000
</multiRef>

where '3000' is the value.

The equivalent soap serialization by .net looks like this
         <tns:ZIP-CodeType id="id13" xsi:type="tns:ZIP-CodeType">
            <Value xsi:type="xsd:NMTOKEN">3000</Value>
         </tns:ZIP-CodeType>

Axis will throw a fault because it does not expect a child element in the 
ZIP-CodeType.

If I change the xs:simpleType into a xs:complexType the axis soap body will 
look similar the .net style but then I have the problem that it is not 
possible to have a restriction in a complexType.

Is there any chance to change this behaviour on the axis side? (Unfortunately 
I had no luck on the .NET side, there's is no c# attribute to customize the 
mapping)

Thanks in advance!
-David

Reply via email to