[Pdx-pm] help with SOAP??

Jeff Lavallee jeff at zeroclue.com
Tue Mar 3 16:58:51 PST 2009


Something like this should do the trick:

use SOAP::Lite;
use SOAP::Lite +trace => [qw/ debug method fault /]; #global debug for  
SOAP calls

my $uri      = 'http://foo';
my $soap_url = 'http://soap.foobar.com/';

my $soap = SOAP::Lite->new
                      ->uri( $uri )
                      ->proxy( $soap_url )
;

my @headers = (
     SOAP::Header->name('APIKey')->value('123456789'),
     SOAP::Header->name('DatabaseMode')->value('MyVoterFile'),
);


$soap->GetSavedList(
   SOAP::Data->name('SavedListID')->value('500328'),
   SOAP::Data->name('options')->value( SOAP::Data- 
 >name('ReturnSections')->value('Foler,Data,User') ),
   @headers,
);


On Mar 3, 2009, at 4:37 PM, John Springer wrote:

>
> I need to access some remote services via SOAP.  I've never used it  
> before.
> (But I've been in the same room with Dave Winer a couple of times,  
> if that counts for anything.)
> I have some documentation that shows what my queries and responses  
> should
> look like, but I'm not sure how to translate that into SOAP::Lite  
> statements.
>
> Could anyone give me some help with this?
>
> Query Example:
>
> <soapenv:Envelope xmlns:v3="http://thevan.us/Services/V3/"  
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>       <soapenv:Header>
>             <v3:Header>
>                   <v3:APIKey>123456789</v3:APIKey>
>                   <v3:DatabaseMode>MyVoterFile</v3:DatabaseMode>
>             </v3:Header>
>       </soapenv:Header>
>       <soapenv:Body>
>
> 	<v3:GetSavedList>
>                   <v3:SavedListID>500328</v3:SavedListID>
>                   <v3:options>
>                         <v3:ReturnSections>Folder,Data,User</ 
> v3:ReturnSections>
>                   </v3:options>
>             </v3:GetSavedList>
>       </soapenv:Body>
> </soapenv:Envelope>
>
>
> The APIKey is like a password.
> There is a WSDL page for the services, but i'm not sure how that  
> fits into the sample code above.
> J
>
>
> --
>   John Springer
>   Tech Dude
>   Democratic Party of Oregon
>   (503) 239-8635
>
>
>
>
>
>
>
> --
>   John Springer
>   Tech Dude
>   Democratic Party of Oregon
>   (503) 239-8635
>
>
>
>
>
>
>
> --
>   John Springer
>   Tech Dude
>   Democratic Party of Oregon
>   (503) 239-8635
>
>
>
>
>
>
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list



More information about the Pdx-pm-list mailing list