|  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: -
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jeff at nd4c dot com
New email:
PHP Version: OS:


 [2012-03-23 19:58 UTC] jeff at nd4c dot com
From manual page:
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,
                               'hello world'));

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


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 11:01:28 2024 UTC