|  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
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: 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-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 09:03:34 2021 UTC