How-to make a SOAP web service call to a .NET web service w/o "unable to deserialize request" error?

Go To


I am trying to make a web service call from PHP to a SOAP web service with a sample request which looks like this:

<soapenv:Envelope xmlns:soapenv="" xmlns:ws="">

The PHP code being used is:

$soapClient = new SoapClient($wsdlUrl);   
$ap_param = array('PartnerKey'    =>    $PartnerKey, 'Password'    =>    $metapackPassword, 'AvailableOnDate' => '2012-04-03T00:00:00','IncludeStateDetails'=>true, 'State'=>'CA');
$info = $soapClient->__call("SearchMarketplaceSku", $ap_param);

The web service call results in an "Request was not specified properly; server unable to deserialize request" error? What is the problem? Does the $ap_param array need to include all the nested nodes coressponding with the XML? Is there an easier way to make this call using "WSDL" mode?

Thanks for your help

2012-04-04 20:49
by Pawel


PartnerKey and Password has to be in an Array under the key Security:

$ap_param = array(
'Security' => array(
    'PartnerKey'    =>    $PartnerKey,
    'Password'    =>    $metapackPassword
'AvailableOnDate' => '2012-04-03T00:00:00',
'IncludeStateDetails'=>true, 'State'=>'CA'
2012-04-04 20:52
by Maxim Krizhanovsky