Hi,

I am currently trying to utilise some .NET XML Web Services using the CakePHP framework.

I have some of the methods in the Web services working fine but having a little difficulty in one particular method.

My PHP code so far is as follows:

PHP Code:
$client = new SoapClient(null, array(
'uri' => "http://xxx.xxx.co.uk/xmlservices/v1.0",
'location' => 'http://xxx/xxx/xxx.asmx',
'trace' => 1
));

$xmlSource 'files/xml-scheme-templates/temp.xml';

$xmlData simplexml_load_file($xmlSource);

$var = new SoapVar($xmlDataSOAP_ENC_OBJECT);

$result $client->__soapCall('GetPrivateQuote'
array(
new 
SoapParam($var'PolicyPrivate')
), 
array(
'soapaction' => 'http://xxx.xxx.co.uk/xmlservices/v1.0/GetPrivateQuote')
);

print_r($result);

echo 
'<br /><br />';

print_r($client->__getLastRequest());

echo 
'<br /><br />';

print_r($client->__getLastRequestHeaders());

echo 
'<br /><br />';

print_r($client->__getLastResponse()); 
The error I am getting is:

Code:
ErrorProcessMessage: Object reference not set to an instance of an object.
The XML that is passed in before SOAP wraps it works fine, so I know the XML is accepted by our internal system. Just not when SOAP is part of the equation.

The documentation for this method "GetPrivateQuote" is:

Code:
Request parameter: _object (of type PolicyPrivate)
Response: _object (of type QuotationCollection)
A service to retrieve a collection of quotations for private policies based on details provided within the parameter.
Can anyone help please?

Thanks