NewMonk2Perl has asked for the wisdom of the Perl Monks concerning the following question:
The script prints out "1 , 1"; I am assuming this is the faultcode and faultstring. I want to know what these value really means. How would I write it so I actually get the message rather than just the code? Thanks in advance. -Paul#!perl -w use SOAP::Lite; #use SOAP::Lite +trace => 'all'; use warnings; use strict; my $soap = SOAP::Lite -> uri('http://tempuri.org/test/serv') -> on_action( sub { join '/', 'tempuri.org/test/Serv', $_[1] } ) -> proxy('http://webserver.company.com/test/svc.asmx?wsdl'); my $method = SOAP::Data->name('wsm_Get_WMLead') ->attr({xmlns => 'http://tempuri.org/test/Serv/'}); my @params = ( SOAP::Data->name(str_UserName => "Manual"), SOAP::Data->name(str_Password => "M*Post"), SOAP::Data->name(str_TraceNumber => "19381120000000"), SOAP::Data->name(str_FName => "QU"), SOAP::Data->name(str_Minit => "D"), SOAP::Data->name(str_LName => "TEALS"), SOAP::Data->name(str_Address1 => "155 GRIFFIN LANE"), SOAP::Data->name(str_City => "MANSFIELD"), SOAP::Data->name(str_State => "CA"), SOAP::Data->name(str_ZipCode => "96063"), SOAP::Data->name(str_Phone => "5555534821"), SOAP::Data->name(str_ACEID => "4108574"), SOAP::Data->name(str_Center => "1938"), SOAP::Data->name(str_NewCustDate => "20110214"), SOAP::Data->name(str_PrinAmnt => "400.00"), SOAP::Data->name(str_CompanyCode => "C01"), SOAP::Data->name(str_ScriptNo => "") ); print $soap->call($method => @params)->result; unless ($soap->fault) { print $soap->result(); } else { print join ', ', $soap->faultcode, $soap->faultstring; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP LITE return message
by toolic (Bishop) on Feb 17, 2011 at 15:10 UTC | |
by NewMonk2Perl (Sexton) on Feb 17, 2011 at 16:28 UTC | |
|
Re: SOAP LITE return message
by dHarry (Abbot) on Feb 17, 2011 at 15:41 UTC | |
by NewMonk2Perl (Sexton) on Feb 17, 2011 at 16:15 UTC | |
by dHarry (Abbot) on Feb 17, 2011 at 17:04 UTC | |
by NewMonk2Perl (Sexton) on Feb 17, 2011 at 19:16 UTC | |
|
Re: SOAP LITE return message
by Anonymous Monk on Feb 17, 2011 at 15:13 UTC |