Hi all,
i got an problem to call an Webservice thats need some HTTP-Headers
to work.
I try to call something like this:
$opts = array(
'http'=>array(
'header'=>
"X-AAC-ID: MYUSER\\r\
" .
"X-AAC-KEY: MYKEY\\r\
"
)
);
$ctx = stream_context_create($opts);
$client = new SoapClient(null,
array(
'stream_context' => $ctx,
'location'=>'http://serviceurl',
'uri'=> 'serviceuri',
'features'=> SOAP_SINGLE_ELEMENT_ARRAYS,
'encoding' => 'utf-8',
'trace' => true,
'proxy_host' => "proxy",
'proxy_port' => 8080,
));
$params = array(
new SoapParam('LOGIN:testuser','UserID'),
new SoapParam('xxx','ASCID'),
new SoapParam('SESSION','APIID')
);
$result = $client->__soapCall("SessionCreateTrusted",$params);
i always get -> “No permission” because the missing http headers.
I also try to change
$opts = array(
'http'=>array( [...]
to:
$opts = array(
'ssl'=>array( [...]
or:
$opts = array(
'https'=>array( [...]
always the same - the header looks like this:
REQUEST-Header:
POST http://myhost
Host: myhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://myhost/wsdl/1.1/SessionManagement_1.0#SessionCreateTrusted"
Content-Length: 654
none of the ACC-Headers is set.
Can anynow give me some advice ?
THX!