GrahamBright
Programmer
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:
O_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:
ata
-> name('SubmitReq')
-> attr({xmlns => '
my $tx_header = SOAP::Header->name("TransactionID" => 'TransID')->mustUnderstand(1);
my @params = ( $tx_header,
SOAP:
ata->name(MM7Version => '4.3.0')
->uri(' SOAP:
ata->name(SenderIdentification => '')
->uri(' SOAP:
ata->name( VASPID => '')
->uri(' SOAP:
ata->name( SenderAddress => '')
->uri(' SOAP:
ata->name( Recipients => '')
->uri(' SOAP:
ata->name( To => '')
->uri(' SOAP:
ata->name( ServiceCode => '')
->uri(' SOAP:
ata->name( LinkedID => '')
->uri(' SOAP:
ata->name( MessageClass => 'Personal')
->uri(' SOAP:
ata->name( DeliveryReport => 'False')
->uri(' SOAP:
ata->name( ReadReply => 'False')
->uri(' SOAP:
ata->name( Priority => 'Normal')
->uri(' SOAP:
ata->name( Subject => 'TestSoap')
->uri(' SOAP:
ata->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');
}
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:

#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:

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

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' SOAP:

->uri(' "Line", 600, );
my $result = $service->call($method => @params);
if ($result->fault)
{
print $result->faultstring;
}
else
{
print $result->valueof('//SubmitReq/MM7Version');
}