Joost,
Here's the client code, where the messages are generated.
#!/usr/local/bin/perl #CLIENT use strict; use warnings; use SOAP::Lite +trace => qw(debug); use MIME::Base64; my $HOST = "http://localhost/perl/soap-dbi.pl"; my $NS = "urn:Delivery"; my $MsgHdr = "urn:MsgHeader"; #Data to be added to the request my (@data) = ( #Common MessageHeader SOAP::Data->name(MessageHeader => { ( AgreementId => "urn +:xxx-xxx:::" ), ( ConversationId => " +20050904-13:30:03.469-857" ), ( Sequence => { Id => +"What id is this", Number + => "123", Total +=> "6" } ), ( Service => { type => + "service.type. What servicetype is this?" } ), ( Action => "Problem +Submit" ), ( MessageData => { Mes +sageId => "20050904-13:30:03.469-8572\@xxx.xxx.xxx", Tim +estamp => SOAP::Utils::format_datetime(localtime), Ref +ToMessageId => "Which reference is this", Tim +eToLive => SOAP::Utils::format_datetime(localtime) } ), ( Description => "Thi +s is the message header" ), ( ErrorList => { Error => { + Description => "Error Description", + codeContent => "code + content", + errorCode => "Error Code", + severity => "seve +rity.type", + location => "error location" + } } ), ( highestSeverity => +"severity.type" ), ( id => "Which id is +this" ) } )->uri($MsgHdr)->prefix(''), ); #Enable fault management globally use SOAP::Lite on_fault => sub { my($soap, $res) = @_; eval { die ref $res ? $res->faultstring : $soap->transport->stat +us }; return ref $res ? $res : new SOAP::SOM; }; #print $soap->fault ? $soap->faultstring. "\n" : $soap->result; my $soap = SOAP::Lite -> proxy($HOST) -> uri($NS); #my $res = $soap->byName(@headers,@data); my $res = $soap->GetbyName(@data); #print $soap->retrieveDocument->result; print $res->fault ? $res->faultstring. "\n" : $res->result;
Many thanks

In reply to Re^2: Preserve the sequence of xml elements in the generated SOAP Envelope by chanakya
in thread Preserve the sequence of xml elements in the generated SOAP Envelope by chanakya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.