I'm trying to call to a SOAP WebService using PHP SoapClient, connecting with a WSDL and all is fine and dandy. But when I pass my parameters to make my call, I realized (using "__getLastRequest()") that the params wasn't placed inside my "MyFunction" but rather outside..
PHP code:
$client = new SoapClient("http://wsdlurl.com?WSDL", array("trace" => 1));
$soapMessage = array(
'DealerCode' => 'Val0',
'AscNumber' => 'Val1',
'CustOrderNumber' => 'Val2',
'OrderDate' => 'Val3',
'OrderType' => 'Val4',
'ModelCode' => 'Val5',
'ObjectName' => 'Val6',
'BrandName' => 'Val7',
'SerialNumber' => 'Val8',
'Name' => 'Val9',
'Address' => 'Val10',
'PostalCode' => 'Val11',
'Town' => 'Val12',
'TelephoneNR' => 'Val13',
'EmailAddress' => 'Val14',
'Company' => 'Val15',
'DoorCode' => 'Val16',
'CustFaultDescription' => 'Val17',
'InWarranty' => 'Val18',
'PurchaseDate' => 'Val19',
'FaultCode' => 'Val20',
'GeneralMessage' => 'Val21'
);
$result = $client->__soapCall('MyFunction', $soapMessage);
$request = $client->__getLastRequest();
Results in this request being sent??
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.url.com/">
<SOAP-ENV:Body>
<ns1:MyFunction/>
<param1>Val1</param1>
<param2>Val2</param2>
<param3>Val3</param3>
<param4>Val4</param4>
<param5>Val5</param5>
<param6>Val6</param6>
<param7>Val7</param7>
<param8>Val8</param8>
<param9>Val9</param9>
<param10>Val10</param10>
<param11>Val11</param11>
<param12>Val12</param12>
<param13>Val13</param13>
<param14>Val14</param14>
<param15>Val15</param15>
<param16>Val16</param16>
<param17>Val17</param17>
<param18>Val18</param18>
<param19>Val19</param19>
<param20>Val20</param20>
<param21>Val21</param21>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>