I'm using PHP 5, and want to call a webservice that is defined sort of like this:
webmethod ( AbstractBase obj );
I'm using a SoapClient (wsdl-based). The web method is expecting a subclass of AbstractBase. Yet, in PHP, calling the soap method gets me this error:
Server was unable to read request. ---> There is an error in XML document ---> The specified type is abstract: name='AbstractBase'
I'm pretty sure the problem is I have to specify the type of the obj parameter in the Soap call - but I can't seem to find the magic word to make it so.
$client = new SoapClient($WSDL, $soapSettings);
$obj = array(
'internal_id' => $internalId,
'external_id' => $externald,
);
$params = array(
'obj' => $obj // How do I say it is of type: DerivedClass?
);
$response = $client->webmethod($params);