Re: [SOAP] SOAP differences between PHP and Perl
| From: | Shane Caraveo | Date: | Wed, 15 Oct 2003 22:39:01 +0000 |
| Subject: | Re: [SOAP] SOAP differences between PHP and Perl | ||
| References: | 1 2 3 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1116@lists.php.net to get a copy of this message | ||
Jon Drukman wrote:
Shane Caraveo wrote:You need to use the SOAP_Value class: $new = $soapclient->call('{http://soap.rps.com.com}updateSubscription', $params = Array('WsSubscription' => new SOAP_Value($ret,'WsSubscription'))); or something like that. SHaneIf you're not using a wsdl file, you'll have to manually set the soapaction if it is required by the service. You can see my talk slides on talks.php.net which has several examples of that usage.ok i added 'soapaction'=>'http://soap.rps.com.com#updateSubscription' to my options array and that took care of the SoapAction header, but i still get the same errors, so i guess that was not the problem. how would i make PEAR::SOAP output this: <SOAP-ENV:Body> <namesp2:updateSubscription xmlns:namesp2="http://soap.rps.com.com"><WsSubscription xsi:type="namesp3:WsSubscription">instead of this: <SOAP-ENV:Body> <updateSubscription><WsSubscription>the key thing seems to be adding the xsi:type attribute to the WsSubscription element. i assume that means i need to somehow "cast" the PHP array to a specific type, but i don't know how you do that.