chanakya has asked for the wisdom of the Perl Monks concerning the following question:
But the generated SOAP envelope comes out as below:<?xml version="1.0" encoding="utf-8"?> <MessageHeader> <AgreementId>urn:xxx-xxx:::</AgreementId> <ConversationId>20050904-13:30:03.469-8572</ConversationId> <Sequence> <Id>What id is this?</Id> <Number>123</Number> <Total>6</Total> </Sequence> <Service> <type>service.type. what servicetype is this?</type> </Service> <Action>Problem Submit</Action> <MessageData> <MessageId>20050904-13:30:03.469-8572@...</MessageId> <Timestamp>2005-0409T12:10:42</Timestamp> <RefToMessageId>Which reference is this?</RefToMessageId> <TimeToLive>2005-0409T12:10:42</TimeToLive> </MessageData> <Description>This is the message header</Description> <ErrorList> <Error> <Description> Error Description</Description> <codeContent>code content</codeContent> <errorCode>Error Code</errorCode> <severity>severity.type</severity> <location>error location</location> </Error> <highestSeverity>severity.type</highestSeverity> </ErrorList> <id>which id is this?</id> </MessageHeader>
How do I preserve the order of XML elements in the generated SOAP envelope (both on client/server side). like<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetbyName xmlns="urn:Delivery"> <MessageHeader xmlns="urn:MsgHeader"> <MessageData> <Timestamp>2005-04-08T14:29:37</Timestamp> <RefToMessageId>Which reference is this</RefToMessageId> <TimeToLive>2005-04-08T14:29:37</TimeToLive> <MessageId>20050904-13:30:03.469-8572@...</MessageId> </MessageData> <ErrorList> <Error> <location>error location</location> <errorCode>Error Code</errorCode> <codeContent>code content</codeContent> <severity>severity.type</severity> <Description>Error Description</Description> </Error> </ErrorList> <Service> <type>service.type. What servicetype is this?</type> </Service> <highestSeverity>severity.type</highestSeverity> <AgreementId>urn:xxx-xxxx:::</AgreementId> <Action>Problem Submittal</Action> <id>Which id is this</id> <Sequence> <Total>6</Total> <Number>123</Number> <Id>What id is this</Id> </Sequence> </MessageHeader> </GetbyName> </soap:Body> </soap:Envelope>
Many thanks<MessageHeader> <AgreementId>... <ConversationId>... <Sequence> <Id>... <Number> ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Preserve the sequence of xml elements in the generated SOAP Envelope
by Joost (Canon) on Apr 13, 2005 at 12:17 UTC | |
by chanakya (Friar) on Apr 13, 2005 at 13:18 UTC | |
by gellyfish (Monsignor) on Apr 13, 2005 at 14:16 UTC | |
by chanakya (Friar) on Apr 14, 2005 at 12:54 UTC | |
by jhourcle (Prior) on Apr 14, 2005 at 11:11 UTC | |
|
Re: Preserve the sequence of xml elements in the generated SOAP Envelope
by Anonymous Monk on Apr 13, 2005 at 13:41 UTC |