ID: 49853
Updated by: sjoerd@php.net
Reported By: rumana024 at yahoo dot com
Status: Open
Bug Type: SOAP related
Operating System: Windows XP
PHP Version: 5.2SVN-2009-10-12 (SVN)
New Comment:
Thank you for your bug report.
Please try 'http' as wrapper name instead of 'https'.
Previous Comments:
------------------------------------------------------------------------
[2009-10-12 23:18:28] rumana024 at yahoo dot com
Description:
------------
Hi:
I am using PHP Soap PHP-SOAP/5.2.9-2 to connect to a web service. Part
of the reqiurment is that , few http headers need to be as part of the
request, but not part of the soap envelope. I am using the stream
context option and add the http headers with that option. Unfortunately,
the stream context is not being read at all.
Reproduce code:
---------------
Here is my code
$opts = array(
'https'=>array(
'method'=>"GET",
'header'=>'X-SECURITY-USERID: seller_1253314668_biz_api1.x.com\r\n'
.
'X-SECURITY-PASSWORD: 1253314679\r\n' .
'X-SECURITY-SIGNATURE:
AtQaNHC.hbpghF5uGCRO99PVY6a2ASO58V7ki3.SAb3vQzBlBAxEyi0b\r\n' .
'X-SERVICE-VERSION: 1.2.0\r\n' .
'X-MESSAGE-PROTOCOL: SOAP11\r\n' .
'X-REQUEST-SOURCE: PLATFORM_JAVA_SOAP_SAMPLE_V1\r\n' .
'X-APPLICATION-ID: APP-80W284485P519543T\r\n'));
$context = stream_context_create($opts);
$soapClient = new SoapClient(null,array('location' =>
"https://svcs.sandbox.x.com/AP/Method1/",
'uri' =>
"http://svcs.x.com/types/ap",
'soap_version' => SOAP_1_1,
'trace' => 1, 'stream_context' => $context));
Expected result:
----------------
Security Credential are going as HTTP Headers and the Http headers are
contained in the context parameter. I get the result Invalid User name
and Password. So the context is not going through at all.
I know for sure the credentials are valid.
I know other option parameter like 'location', 'uri' are working.Please
advice how to fix this problem.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49853&edit=1