ctaustin has asked for the wisdom of the Perl Monks concerning the following question:
POST /evernetqueryservice/evernetquery.asmx HTTP/1.1 Host: evernet.nwmls.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.nwmls.com/EverNetServices/RetrieveOfficeData" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x +mlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schema +s.xmlsoap.org/soap/envelope/"> <soap:Body> <RetrieveOfficeData xmlns="http://www.nwmls.com/EverNetServices"> <v_strXmlQuery>string</v_strXmlQuery> </RetrieveOfficeData> </soap:Body> </soap:Envelope>
#!/usr/bin/perl use strict; use SOAP::Lite; my $num= shift; $num=~/^\d+$/ or die "USAGE: $0 num/n"; my ($server,$endpoint,$soapaction,$method,$method_urn); $server='http://evernet.nwmls.com'; $endpoint="$server/evernetqueryservice/evernetquery.asmx"; $soapaction="http://www.nwmls.com/EverNetServices/RetrieveOfficeData"; $method='RetrieveOfficeData'; $method_urn='http://www.nwmls.com/EverNetServices'; my $num2words=SOAP::Lite->new(uri=>$soapaction, proxy=>$endpoint); my $response=$num2words -> call(SOAP::Data->name($method) ->attr({xmlns=>$method_urn}) =>#Arguments listed next SOAP::Data->name(v_strXmlQuery=>$num)); if ($response->fault){ printf "A fault (%s) occurred: %s\n", $response->faultcode,$response->faultstring; } else { print "$response->result\n"; } exit;
A fault (soap:Client) occurred: Server did not recognize the value of HTTP Header SOAPAction: http://www.nwmls.com/EverNetServices#RetrieveOfficeData.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite Help
by csuhockey3 (Curate) on Oct 21, 2004 at 19:51 UTC |