Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SOAP post

Status
Not open for further replies.

GrahamBright

Programmer
Joined
Oct 31, 2003
Messages
65
Location
AT
Hi all,

See the following a Soap implementation using

Soap::Lite
Soap::MIME
MIME::Enity</CODE>

I have one question. After the POST operation


SOAP::Transport::HTTP::Client::send_receive: POST HTTP/1.1
Accept: text/xml
Accept: multipart/*
Content-Length: 2810
Content-Type: text/xml
SOAPAction: ""


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 => "multipart/related", 'Content-Id' =>"<$cid>");



my $service = SOAP::Lite
-> uri(' -> on_action(sub { return "\"\""; })
#-> parts($ent)
-> proxy('

my $method = SOAP::Data
-> name('SubmitReq')
-> attr({xmlns => '
my $tx_header = SOAP::Header->name("TransactionID" => 'TransID')->mustUnderstand(1);



my @params = ( $tx_header,
SOAP::Data->name(MM7Version => '4.3.0')
->uri(' SOAP::Data->name(SenderIdentification => '')
->uri(' SOAP::Data->name( VASPID => '')
->uri(' SOAP::Data->name( SenderAddress => '')
->uri(' SOAP::Data->name( Recipients => '')
->uri(' SOAP::Data->name( To => '')
->uri(' SOAP::Data->name( ServiceCode => '')
->uri(' SOAP::Data->name( LinkedID => '')
->uri(' SOAP::Data->name( MessageClass => 'Personal')
->uri(' SOAP::Data->name( DeliveryReport => 'False')
->uri(' SOAP::Data->name( ReadReply => 'False')
->uri(' SOAP::Data->name( Priority => 'Normal')
->uri(' SOAP::Data->name( Subject => 'TestSoap')
->uri(' SOAP::Data->name( Content_href => 'MIME')
->uri(' "Line", 600, );


my $result = $service->call($method => @params);

if ($result->fault)
{
print $result->faultstring;
}

else

{
print $result->valueof('//SubmitReq/MM7Version');

}
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top