I came to web services with axis a few months ago, so not sure if any fella has addressed this problem before and had the problem already answerd( I have been searching through the axis mail list for clue though). The problem annoying my for quite a few days without any breakthrought is,
I have a xsd file defining a request element containing a few sub elements in a wanted order, ie.
<element name="SearchAndSelectResponse">
<complexType>
<sequence>
<element name="ResponseHeader" type="sba:WSRPResponseHeader"/>
<element name="Basket" type="sba:Basket"/>
<element name="PassengerSummary" type="sba:PassengerAgeSummary"/>
</sequence>
</complexType>
</element>
I created a SearchAndSelectResponse object and fully populated it with some testing dummy data, then assigned this object into a MessageElement pending for being sent via web services.
Surprisingly and saddly, when I open tcpmon to monitor the message flow, I saw my message elements have been sorted out in an alphabetical order, ie.
SearchAndSelectRequest
Basket
PassengerSummary
ResponseHeader
/SearchAndSelectRequest
This kind of automatic sorting is not what I want. Rather I do need those elements are in the order their associated xsd has defined. Does anybody have an idea how and where this sorting happens, and even better come with a solution to fix the problem. After all, any comment and sympathy is highly appreciated. Many thanks in advance.
cheers Stephen