|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46424 Can't define a header without namespaces
Submitted: 2008-10-29 21:55 UTC Modified: 2008-11-24 23:59 UTC
From: valer_crisan at yahoo dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.2.6 OS: Linux/Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: valer_crisan at yahoo dot com
New email:
PHP Version: OS:


 [2008-10-29 21:55 UTC] valer_crisan at yahoo dot com
I am unable to create a header that doesn't have a namespace. I need to create a header in the form:

  <SessionHeader><sessionId> ... </sessionId></SessionHeader>

but the API forces me to specify a namespace for the header in the SOAPHeader constructor and it doesn't accept null or empty string.

You can find the related WSDL here:

Reproduce code:
$header = new SoapHeader('', 'SessionHeader', $sessVar);

Expected result:
The header <SessionHeader><sessionId> ... </sessionId></SessionHeader> is created.

Actual result:
Error: "SoapHeader::SoapHeader(): Invalid parameters. Invalid namespace" is thrown.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-24 23:59 UTC]
Please see:

dmitry: "SOAP specification doesn't allow non-namespace-qualified headers."

In fact, this is a specific test case for SOAP conformance.  Refer to:

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 04:03:49 2023 UTC