Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #16688 SOAP_Call with 'raw' input-string doesn't work
Submitted: 2009-10-09 20:53 UTC
From: mauz Assigned:
Status: Open Package: SOAP (version 0.12.0)
PHP Version: 5.2.5 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2009-10-09 20:53 UTC] mauz (Hartmut Wilhelms)
Description: ------------ For testing purposes I tried to send a 'raw' SOAP Request to the Server. This doesn't work because the second Parameter of the call function is being converted to an array in function _generate (line 527 of Client.php). When _options['input'] is not 'parse', then this conversion must be reversed in function makeEnvelope (line 910 of Base.php): < $smsg = $method; <= wrong > $smsg = $method[0]; <= corrected Test script: --------------- $wsdl_uri = 'http://domain.de/operation?WSDL'; $client =& new SOAP_Client($wsdl_uri, true); $opts = array ('input' => 'raw', 'trace' => true); $q = ''; $res = $client->call('getAdresse', $q, $opts, ""); print_r($res); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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:Body><ns1:getAdresseElement xmlns:ns1="http://domain.de/types/"><ns1:ID>1199102</ns1:ID></ns1:getAdresseElement> </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: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:Body>Array </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Comments