SOAP
Jeg forsøger at opdatere en SOAP forbindelse til e-conomic, denne kode har virket fint,class economic{
protected $client = null;
private $wsdlURL = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL';
private $trace = 1;
private $exceptions = 1;
public function __construct(){
$this->client = new SoapClient($this->wsdlURL, array('trace' => $this->trace, 'exceptions' => $this->exceptions));
$this->client->Connect(array('agreementNumber' => AGREEMENTNUMBER, 'userName' => USERNAME, 'password' => PASSWORD));
}
public function __destruct(){
$this->client->Disconnect();
}
}
Men nu kræves 'X-EconomicAppIdentifier, og jeg kan ikke få forbindelse, eller en fejlmeddelelse :-(
$client = new SoapClient ( "https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?WSDL", [
'stream_context' => stream_context_create(['http' => ['header' => 'X-EconomicAppIdentifier: YOUR APP IDENTIFIER']])
]);
Er der nogle gode forslag til hvordan jeg kombinere ovenstående kode?