【发布时间】:2012-06-11 19:24:01
【问题描述】:
我什么都试过了!我正在使用这个WSDL,只是想进行身份验证。我不断收到此错误:
在消息 '' 上指定的 SOAP 操作与 HTTP 不匹配 SOAP 操作,“http://tempuri.org/IPSShipCarrier/Authenticate”
这是我的代码:
$options = array(
"soap_version" => SOAP_1_2,
"trace"=>1,
'UserName'=>'blahremoved',
'Password'=>'blahremoved',
'AuthToken'=>'blahremoved',
'SOAPAction'=>'http://tempuri.org/IPSShipCarrier/Authenticate',
'Action'=>'http://tempuri.org/IPSShipCarrier/Authenticate',
'uri'=>'http://tempuri.org/IPSShipCarrier/Authenticate',
'exceptions'=>true );
$client = new SoapClient( "http://test.psdataservices.com/PSShipCarrierAPI/PSShipCarrier.svc?WSDL", $options );
$auth = array(
'UserName'=>'blahremoved',
'Password'=>'blahremoved',
'AuthToken'=>'blahremoved',
'SOAPAction'=>'http://tempuri.org/IPSShipCarrier/Authenticate',
'Action'=>"Authenticate"
);
$header = new SoapHeader('http://tempuri.org/IPSShipCarrier/Authenticate','Authenticate',$auth,false);
$client->__setSoapHeaders($header);
$params = new StdClass;
$params->Action = "http://tempuri.org/IPSShipCarrier/Authenticate";
$params->SOAPAction = "http://tempuri.org/IPSShipCarrier/Authenticate";
$params->UserName = "blahremoved";
$params->Password = "blahremoved";
$params->AuthToken = "blahremoved";
$client->Authenticate($params);
让我知道你的想法?
【问题讨论】:
标签: php soap soap-client soapheader