Hi all, See the following a Soap implementation using
Soap::Lite Soap::MIME MIME::Enity
I have one question. After the POST operation
SOAP::Transport::HTTP::Client::send_receive: POST http://10.236.137.7: +10021/vas_soap HTTP/1.1 Accept: text/xml Accept: multipart/* Content-Length: 2810 Content-Type: text/xml SOAPAction: "" <CODE> but I need Content-Type to be multipart/related; boundary="soap-border +"; type="text/xml" start="Test"
is there an easy way to do this
#!/opt/perl5/bin/perl ############################################# # # V0.2 # Soap04.pl ############################################## #use SOAP::Lite maptype => {}; use SOAP::Lite +trace; use SOAP::MIME; use MIME::Entity; $SOAP::Constants::DO_NOT_USE_CHARSET = 1; #Soap variables #my $cid = "Test"; #my $ent = MIME::Entity->build(Boundary => "soap-boarder", Type => "mu +ltipart/related", 'Content-Id' =>"<$cid>"); my $service = SOAP::Lite -> uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140 +/schema/REL-5-MM7-1-2') -> on_action(sub { return "\"\""; }) #-> parts($ent) -> proxy('http://10.236.137.7:10021/vas_soap'); my $method = SOAP::Data -> name('SubmitReq') -> attr({xmlns => 'http://www.3gpp.org/ftp/Specs/archive/23_se +ries/23.140/schema/REL-5-MM7-1-2'}); my $tx_header = SOAP::Header->name("TransactionID" => 'TransID')->must +Understand(1); my @params = ( $tx_header, SOAP::Data->name(MM7Version => '4.3.0') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name(SenderIdentification => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( VASPID => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( SenderAddress => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( Recipients => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( To => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( ServiceCode => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( LinkedID => '') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( MessageClass => 'Personal') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( DeliveryReport => 'False') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( ReadReply => 'False') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( Priority => 'Normal') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( Subject => 'TestSoap') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), SOAP::Data->name( Content_href => 'MIME') ->uri('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/ +schema/REL-5-MM7-1-2'), "Line", 600, ); my $result = $service->call($method => @params); if ($result->fault) { print $result->faultstring; } else { print $result->valueof('//SubmitReq/MM7Version'); }

In reply to Soap Post headers by TomJones

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.