|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-05-25 08:16 UTC] dmitry@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
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>