From: Tom Andresen <TAndresen@ca...> - 2012-01-18 16:09:50
I'm trying to use SOAP::Lite but having trouble doing a simple request. Here's my code:
use strict ;
use warnings ;
use SOAP::Lite ;
my $endpoint = 'http://hapi-dev.hoovers.com/HooversAPI-34';;
my $tns = 'http://applications.dnb.com/webservice/schema/'; ;
my $sObj = SOAP::Lite->new(uri => $tns, proxy => $endpoint) or die "ERROR";
my $authHeader = SOAP::Header->name("tns:ApiKeyHeader" => SOAP::Header->value(
# create data to pass as method paramaters
my $params = SOAP::Data->name('ns10:uniqueId')->value('10187000000000')->type('');
# request method
$sObj->call('GetCompanyDetailSimple', $params, $authHeader);
When I dump the $sObj I can see in the content the message "Our service has encountered an error."
I feel least confident that I've gotten the header correctly. I know in order for the request to work you need to pass the API-KEY in the header. I was hoping that someone would be able to look at the wsdl and see what I've gotten wrong. The WSDL is too big to print in this space, but it's located at:
Any insight you can lend would be greatly appreciated.
Get latest updates about Open Source Projects, Conferences and News.