php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: valer_crisan at yahoo dot com
New email:
PHP Version: OS:

 

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

<SOAP-ENV:Header>
  <SessionHeader><sessionId> ... </sessionId></SessionHeader>
</SOAP-ENV:Header>

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: http://www2.openair.com/wsdl.pl?wsdl

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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-24 23:59 UTC] hradtke@php.net
Please see: http://bugs.php.net/bug.php?id=31755

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

In fact, this is a specific test case for SOAP conformance.  Refer to:
http://www.w3.org/2000/xp/Group/2/03/11/soap-1.2-conformance.html

Test:non-nsqualified-attr-test
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 13:01:27 2025 UTC