php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61495 SoapClient::getNameSpace
Submitted: 2012-03-23 19:58 UTC Modified: -
Votes:17
Avg. Score:4.5 ± 0.7
Reproduced:14 of 14 (100.0%)
Same Version:11 (78.6%)
Same OS:10 (71.4%)
From: jeff at nd4c dot com Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant OS: ALL
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-03-23 19:58 UTC] jeff at nd4c dot com
Description:
------------
---
From manual page: http://www.php.net/soapheader.soapheader
---
SoapHeader::SoapHeader ( 
  string $namespace , <----- we need to pass the $namespace!!!
  string $name 
  [, mixed $data [, bool $mustunderstand = false [, string $actor ]]] )

SoapHeader requires passing the namespace for the header.  The namespace would normally be specified in the wsdl file which is passed to the SoapClient constructor.  If the wsdl file changes its namespace (which is allowed) there is no way to know without first downloading and parsing the file.  This is counter productive since we need to pass the link to SoapClient anyway.

My feature request is to be able to call a new SoapClient method (maybe called getNameSpace) that will return the namespace specified in the parsed wsdl file.  Obviously this is only for wsdl based SoapClients.

Test script:
---------------
No test script since the feature is not implemented yet..

Expected result:
----------------
$client = new SoapClient($pathToWsdlFile);
$client->__soapCall("SomeFunction", array($a, $b, $c), NULL,
                new SoapHeader($client->getNameSpace,
                               'echoMeStringRequest',
                               'hello world'));

Actual result:
--------------
$client = new SoapClient($pathToWsdlFile);
$client->__soapCall("SomeFunction", array($a, $b, $c), NULL,
                new SoapHeader('namespace',
                               'echoMeStringRequest',
                               'hello world'));

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 12:01:28 2024 UTC