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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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