
winfinit
User
Jun 18, 2008, 5:52 PM
Post #2 of 2
(1117 views)
|
|
Re: [bubles_88] Perl Web CLient
[In reply to]
|
Can't Post
|
|
couple of advices: if you have a properly formated wsdl document then look into SOAP::WSDL http://search.cpan.org/~mkutter/SOAP-WSDL-2.00.04/lib/SOAP/WSDL.pm this guy did amazing job with this module, if you dont have a properly formatted WSDL then dont use it, just look into your requirements XML, and use something like this
my $soap = new SOAP::Lite; $soap->uri($nameSpace); $soap->proxy($proxy); #for you this is localhost i assume my $CommunityFindAccountsMethod = SOAP::Data->name('MethodExpected') ->attr({xmlns => $nameSpace}); my @CommunityFindAccountsValues = ( SOAP::Data->name('parameter' => 'data'), # SOAP::Data->name('FieldName' => 'SEARCHFIELD_LOGINID'), ); my $search = $soap->call($CommunityFindAccountsMethod => @CommunityFindAccountsValues); #$search->valueof('//AccountList/AdminAPIBaseAccountInfo/nAccountNumber'); return $search->valueof('//AccountList/AdminAPIBaseAccountInfo/nAccountNumber'); also do "use SOAP::Lite +trace => 'all';" that way you can see all your XML output, and you can see what you are sending in raw XML, so you can adjust your code. let me know if you need to construct some specific XML i can help you to write it with SOAP::Lite.
|