XML : Request xml not created in the correct format using stub generated with the client wsdl

I have got a wsdl file using which I created the stub . When I create soap project using that wsdl file ,I obtain the request xml in the correct format but the request parameter order in the request xml created using the stub is not correct. Why is the order of request parameters different in both? How can I correct the order in the request xml created using stub?

Request xml created using stub :

  <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  <soapenv:Body>  <adjustAccount4Third xmlns="http://bme.huawei.com/cvasuvsinterface">  <AdjustAccountRequest4Third>  <RequestMessage>   <MessageHeader>    <CommandId>AdjustAccount4ThirdRequest</CommandId>    <Version>1.0</Version>    <TransactionId>35141004</TransactionId>    <SequenceId>1</SequenceId>    <RequestType>Event</RequestType>   </MessageHeader>   <MessageBody>    <Operator>3</Operator>    <LogID>12</LogID>    <ServiceNumber>919561231121</ServiceNumber>    <ModifyAcctFeeListEx>     <ModifyAcctFeeEx>      <AccountKey>2147483647</AccountKey>      <CurAcctChgAmt>100</CurAcctChgAmt>      <Accounttype>12</Accounttype>     </ModifyAcctFeeEx>    </ModifyAcctFeeListEx>   </MessageBody>  </RequestMessage>  </AdjustAccountRequest4Third>  <SessionEntity>  <userID>052</userID>      <password>D3ED4352600FDAD0C7E1A82EB3BDE76FFD81504378032ABF363663987</password>  <remoteAddr>127.0.0.1</remoteAddr>  <uploadRoot>root</uploadRoot>  <locale>en</locale>  <loginVia>ture</loginVia>  </SessionEntity>  </adjustAccount4Third>  </soapenv:Body>  </soapenv:Envelope>    

Correct request xml created using soap ui:

  <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  <soapenv:Body>  <adjustAccount4Third xmlns="http://bme.huawei.com/cvasuvsinterface">  <SessionEntity>  <userID>052</userID>    <password>D3ED4352600FDAD0C7E1A82EB3BDE76FFD81504378032ABF363663987</password>  <remoteAddr>127.0.0.1</remoteAddr>  <uploadRoot>root</uploadRoot>  <locale>en</locale>  <loginVia>ture</loginVia>  </SessionEntity>  <AdjustAccountRequest4Third>  <RequestMessage>   <MessageHeader>    <CommandId>AdjustAccount4ThirdRequest</CommandId>    <Version>1.0</Version>    <TransactionId>35141004</TransactionId>    <SequenceId>1</SequenceId>    <RequestType>Event</RequestType>   </MessageHeader>   <MessageBody>    <Operator>3</Operator>    <LogID>12</LogID>    <ServiceNumber>919561231121</ServiceNumber>    <ModifyAcctFeeListEx>     <ModifyAcctFeeEx>      <AccountKey>2147483647</AccountKey>      <CurAcctChgAmt>100</CurAcctChgAmt>      <Accounttype>12</Accounttype>     </ModifyAcctFeeEx>    </ModifyAcctFeeListEx>    </MessageBody>    </RequestMessage>    </AdjustAccountRequest4Third>   </adjustAccount4Third>  </soapenv:Body>  </soapenv:Envelope>    

No comments:

Post a Comment