我正在尝试为这个Web服务编写一个客户端
它使用两层身份验证(一个在请求头中,另一个用于服务器中的数据访问),这意味着我需要在头中传递它.这是我试图做的:
class ChannelAdvisorAuth
{
public $DeveloperKey;
public $Password;
public function __construct($key, $pass)
{
$this->DeveloperKey = $key;
$this->Password = $pass;
}
}
$devKey = "user";
$password = "pass";
$soapArr = array(
"trace"=>true,
"exceptions"=>true,
);
$url = "http://soalive.grimaldiwebservices.it/framework/JourneyManager?wsdl";
$client = new SoapClient($url, $soapArr);
echo "client created!";
print_r($client -> __getFunctions());
$auth = new ChannelAdvisorAuth($devKey, $password);
$header = new SoapHeader($url, "APICredentials", $auth, false);
$in0 = array(
"in0" => array(
"user" => "user",
"password" => "pass",
"message-id" => "",
"status" => array("error-code" …
Run Code Online (Sandbox Code Playgroud)