|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39406 Wrong namespaces in SOAP request
Submitted: 2006-11-06 20:03 UTC Modified: 2006-11-07 14:06 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mail at martin-probst dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.2.0 OS: MacOS
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:
49 - 25 = ?
Subscribe to this entry?

 [2006-11-06 20:03 UTC] mail at martin-probst dot com
I'm trying to access a web service using a .wsdl file, literal 
style. The wsdl defines two schemata with different namespaces 
where the first one refers to the latter. The message 
parameter in the SOAP envelope gets the wrong namespace.

Reproduce code:
The wsdl contains two schemata:

    <xsd:schema xmlns:xsd="" xmlns:wsdl="" xmlns:xi0="http://targetNS" xmlns:xi1="http://otherNS" targetNamespace="http://targetNS">
      <xsd:import namespace="http://otherNS"/>
      <xsd:element name="EmployeeBasicDataByEmployeeQuery" type="xi1:EmployeeBasicDataByEmployeeQueryMessage"/>
    <xsd:schema xmlns:xsd="" xmlns:wsdl="" xmlns:xi0="http://targetNS" xmlns:xi1="http://otherNS" xmlns="http://otherNS" targetNamespace="http://otherNS">
   <xsd:complexType name="EmployeeBasicDataByEmployeeQueryMessage">
          <xsd:element name="EmployeeBasicDataSelectionByEmployee">

The calling PHP code:
$res = $soap->EmployeeBasicDataByEmployeeQueryResponse_In(
    array("EmployeeBasicDataSelectionByEmployee" => array("EmployeeID" => 10))));
echo $soap->__getLastRequest() . "\n";

I also tried classmaps and various array combinations. If you add another array level (EmployeeBasicDataByEmployeeQuery) the above gives an error (object hasn't 'EmployeeBasicDataSelectionByEmployee' property).

Expected result:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="

Actual result:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-06 20:19 UTC] mail at martin-probst dot com
Btw.: Bug #36547 seems related
And: seems to 
refer to the same bug, providing a really weird and dirty 
 [2006-11-07 14:06 UTC] mail at martin-probst dot com
Turns out this is (most likely) not a problem with the PHP 
SOAP implementation, sorry to bother you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 13:01:25 2023 UTC