|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
29 + 5 = ?
Subscribe to this entry?

 [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: Tue Jan 31 01:05:52 2023 UTC