You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Aaron McIver <aa...@gmail.com> on 2008/10/14 20:52:11 UTC

[Axis2] .NET client consuming Axis2

This is an Axis2 1.4 WS (Knoplerfish bundle) being consumed from a .NET
client.



The base issue is that the WSDL is stating:



           <xs:complexType name="Module">

                <xs:sequence>

                    <xs:element minOccurs="0" name="description"
nillable="true" type="xs:string"/>

                    <xs:element minOccurs="0" name="fqName" nillable="true"
type="xs:string"/>

                    <xs:element minOccurs="0" name="id" type="xs:int"/>

                    <xs:element minOccurs="0"
name="moduleInstanceFactoryServicePID" nillable="true" type="xs:string"/>

                    <xs:element minOccurs="0" name="priority"
type="xs:long"/>

                    <xs:element maxOccurs="unbounded" minOccurs="0"
name="properties" nillable="true" type="ax21:Property"/>

                </xs:sequence>

            </xs:complexType>

            <xs:complexType name="Campaign">

                <xs:complexContent>

                    <xs:extension base="ax21:Module">

                        <xs:sequence>

                            <xs:element minOccurs="0" name="applicationType"
nillable="true" type="xs:string"/>

                            <xs:element maxOccurs="unbounded" minOccurs="0"
name="schedules" nillable="true" type="ax21:Schedule"/>

                        </xs:sequence>

                    </xs:extension>

                </xs:complexContent>

            </xs:complexType>



Therefore when I make a call to getCampaign() which in turn return a
Campaign, the SOAP response looks like…



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:getCampaignResponse xmlns:ns="ws.admin.outbound.syntellect.com">
         <return type="com.syntellect.outbound.admin.Campaign">
            <applicationType xsi:nil="true" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <schedules xsi:nil="true" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <description>fancy fancy</description>
            <fqName xsi:nil="true" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <id>0</id>
            <moduleInstanceFactoryServicePID xsi:nil="true" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <priority>0</priority>
            <properties xsi:nil="true" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
         </return>
      </ns:getCampaignResponse>
   </soapenv:Body>
</soapenv:Envelope>





It should look like what is pasted below…notice how the base class
property's come first, then the derived class.



<soapenv:Envelope
xmlns:soapenv="*http://schemas.xmlsoap.org/soap/envelope/*<http://schemas.xmlsoap.org/soap/envelope/>
">
   <soapenv:Body>
      <ns:getCampaignResponse xmlns:ns="ws.admin.outbound.syntellect.com">
         <return type="com.syntellect.outbound.admin.Campaign">
            <description>fancy fancy</description>
            <fqName xsi:nil="true" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance"/*<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <id>0</id>
            <moduleInstanceFactoryServicePID xsi:nil="true" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance"/*<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <priority>0</priority>
            <properties xsi:nil="true" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance"/*<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <applicationType xsi:nil="true" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance"/*<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            <schedules xsi:nil="true" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance"/*<http://www.w3.org/2001/XMLSchema-instance%22/>
>
         </return>
      </ns:getCampaignResponse>
   </soapenv:Body>
</soapenv:Envelope>



The problem is that with the base class properties last, the deserialization
only populates the derived class property's, not the base class property's
since based on the WSDL the sequence is base -> derived.



My question is how can I change this on the server side to manipulate
ordering ie…base -> derived in the SOAP response/message, or is this bug
already fixed?