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:16
Avg. Score:4.4 ± 0.7
Reproduced:13 of 13 (100.0%)
Same Version:10 (76.9%)
Same OS:9 (69.2%)
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-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 24 20:01:27 2020 UTC