CPAN::Forum
SOAP-WSDL - noob using soap-wsdl for first time
| Posted on Wed Apr 23 00:16:01 2008 by rhumbliner |
| noob using soap-wsdl for first time |
|
i'm making my first attempt at writing a soap-wsdl client and could use a little direction.
soap-wsdl 2.0 installed fine and i was able to use wsdl2perl.pl to install the My* modules into /usr/local/lib/site_perl. the resulting perldoc for my new module shows:
[~] perldoc MyInterfaces::WSfsPublicQuery::Services_WSfsPublicQuery_Port
MyInterfaces::WSfsPublicQuery::Services_WSfsPuUserQContributed)PMyInterfaces::WSfsPublicQuery::Serv
+ices_WSfsPublicQuery_Port(3)
NAME
MyInterfaces::WSfsPublicQuery::Services_WSfsPublicQuery_Port - SOAP Interface for the WSfsPu
+blicQuery Web Service
SYNOPSIS
use MyInterfaces::WSfsPublicQuery::Services_WSfsPublicQuery_Port;
my $interface = MyInterfaces::WSfsPublicQuery::Services_WSfsPublicQuery_Port->new();
my $response;
$response = $interface->fsPublic_SQL();
DESCRIPTION
SOAP Interface for the WSfsPublicQuery web service located at http://infrawebdev.fs.usda.gov
+:5556/ws/fs_public.webService:WSfsPublicQuery.
SERVICE WSfsPublicQuery
Port fs_public.Services_WSfsPublicQuery_Port
i was given some php code explaining how the client should work:
$qryTxt=base64_encode ($qryTxt);
$parameters = array('StrQuery' => $qryTxt, 'option' => $option,'keepRowHeader' => $keepRowHeader);
$parameters = array('QryIn'=> $parameters );
$XMLout="";
$result = $proxy->fsPublic_SQL($parameters);
$result = $result['QryResult'];
if (!$soapclient->fault) {
if( !isset($result['Error']) ) {
so using SOAP::WSDL::Manual i translated the call as follows:
$q = encode_base64($q);
my %parm = (
QryIn => { StrQuery => $q, option => 'XML', keepRowHeader => 'false' }
);
my $interface = MyInterfaces::WSfsPublicQuery::Services_WSfsPublicQuery_Port->new();
my $response = $interface->fsPublic_SQL(%parm);
die $response if not $response;
but, of course, this returns an error. since perl doesn't care about order in hashes and php does, i presume i'm not setting up the parameters correctly. could someone point me in the right direction?
thanks
tom
|
| Direct Responses: 7722 | Write a response |
(0)
]