My company publishes a set of .NET webservices available via SOAP. I need to tie my PHP application into these, but I'm bumping up against a problem that I can't find a solution for. One of the services I need to access has a signature of Advertiser CreateAdvertiser ( Advertiser advertiser )
.
How can I pass an instance of an object that I don't have (Advertiser)? I've tried creating an instance of stdClass()
and assigning the required properties of the .NET Advertiser, but that's not flying. Somehow, I need to compose an object that the service will recognize and pass that along. Any ideas on how to go about that?
I'm using the SoapClient class for PHP, of course.
Much appreciated.
UPDATE: After a lot of trial and error, I've finally found that the first part of the problem is that no parameters are being passed - neither simple scalars nor complex types. I've tried using named params: array ( 'name1' => 'val1', 'name2' => 'val2' )
and unnamed, but a dump of __getLastRequest
shows an empty method call:
...<SOAP-ENV:Body><ns1:CreateAdvertiser/></SOAP-ENV:Body>...
I need to solve that problem before worrying about the next one, I think.