#49853 [NEW]: Soap Client stream context option is ignored
| From: | rumana024 at yahoo dot com | Date: | Mon, 12 Oct 2009 23:18:29 +0000 |
| Subject: | #49853 [NEW]: Soap Client stream context option is ignored | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143506@lists.php.net to get a copy of this message | ||
From: rumana024 at yahoo dot com
Operating system: Windows XP
PHP version: 5.2SVN-2009-10-12 (SVN)
PHP Bug Type: SOAP related
Bug description: Soap Client stream context option is ignored
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 bug report at http://bugs.php.net/?id=49853&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49853&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49853&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49853&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49853&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49853&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49853&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49853&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49853&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49853&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49853&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49853&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49853&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49853&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49853&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49853&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49853&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49853&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49853&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49853&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49853&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49853&r=mysqlcfg