php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37278 SOAP not respecting uri in __soapCall
Submitted: 2006-05-02 15:04 UTC Modified: 2006-05-25 08:16 UTC
From: jgillis at optaros dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.1.3 OS: debian 3.1/Linux 2.6.16.5
Private report: No CVE-ID: None
 [2006-05-02 15:04 UTC] jgillis at optaros dot com
Description:
------------
I am trying to connect PHP to Bricolage (a CMS) using SOAP.    
Bricolage doesn't seem to have a WSDL, but they do have a    
SOAP interface.    
    
In order to make a request, I must first authenticate them   
make my request. This requires changing namespaces.   
Unfortunately, using a uri parameter when calling   
__soapCall doesn't seem to change the namespace, as I would   
expect.   
  
The code I've included is simplified to show just the  
error, so you don't see me using the default namespace. 

Reproduce code:
---------------
$opts = Array("location" => "http://localhost:8080/soap", "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", "trace"    => 1);

$client = new SoapClient(null, $options);

$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story";

try {
  $ret = $this->__soapCall("list_ids",Array(),Array("uri" => $newNS));
} catch (Exception $e) {
  print $client->__getLastRequest();
}


Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> 

Actual result:
--------------
<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Auth" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> 
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-25 08:16 UTC] dmitry@php.net
Fixed in CVS HEAD, PHP_5_2 and PHP_5_1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC