|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-02-13 02:41 UTC] wico at cnh dot nl
Description:
------------
$data = new soapParam('test1', 'data1');
$data = new soapParam('test2', 'data2');
$data = new soapParam('test3', 'data3');
// works correctly:
$soap->function($data);
// outputs:
<function>
<test1>data</test1>
<test2>data</test2>
<test3>data</test3>
</function>
// produces wrong output
$soap->__call('function', $data);
$soap->__soapCall('function', $data);
// outputs:
<function />
<test2>data</test2>
<test3>data</test3>
in short it closes the function tag right away but continues with putting the arguments in the xml (after removing the first argument)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
I have very similar problem, using WSDL mode and document/literal. I have a method 'ping' with single parameter 'message', called like this : $c = new SoapClient('my.wsdl'); $ret = $c->__soapCall('ping', array('message' => 'test')); This sends to server this SOAP message: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:EARCHIV"><SOAP-ENV:Body><ns1:ping/></SOAP-ENV:Body></SOAP-ENV:Envelope> Note the 'message' parameter is completely ignored and not included in the output. Using $c->ping(array('message' => 'test')) works, but I need __soapCall() in order to be able to send request headers. I can provide the WSDL file upon request.I have found a workaround for this: You can give the parameter as $ret = $c->__soapCall('ping', array('parameters'=>array('message' => 'test'))); That worked for me.