将PHP SOAP调用转换为Perl
我试着用这个,php中看起来很简单的soap调用:将PHP SOAP调用转换为Perl,php,perl,soap,Php,Perl,Soap,我试着用这个,php中看起来很简单的soap调用: $params->Context->ServiceAccountContext = $serviceAccountContext; //this is a string $params->Query = "test"; // invoke service $researchService = new SoapClient($serviceurl); $response = $r
$params->Context->ServiceAccountContext = $serviceAccountContext; //this is a string
$params->Query = "test";
// invoke service
$researchService = new SoapClient($serviceurl);
$response = $researchService->DoFunction($params)->DoFunctionResult;
但我在SOAP::Lite方面的经验似乎有限,如下所示:
my $serviceAccountContext ='teststring';
my $soap = SOAP::Lite
-> uri($serviceurl)
-> proxy($serviceurl)
;
my $header = SOAP::Header->name("ServiceAccountContext" =>' $serviceAccountContext', "Query"=>'test');
my $method = SOAP::Data->name('DoFunction');
my $responset = $soap->call($method, $header);
返回一个404,这是不幸的,因为它在php中工作。我觉得我错过了一些非常基本的东西。如果有人能伸出援手,那就太棒了。谢谢。您确定每个屏幕都有不同的设置吗?上下文->ServiceAccountContext与ServiceAccountContext?