PHP SOAP extension -- sending complex objects
Posted: Tue Apr 12, 2005 12:36 pm
I am testing some web services with a PHP client, using the PHP SOAP extension. (I must use this extension and cannot use PEAR or NuSOAP.) My problem is that the parameters required by the server are complex objects. I am guessing I can use nested arrays for this, but maybe not. I might have to actually create objects to send in.
Either way, the problem is the objects aren't simple, and I need to come up with a way to generate the code for the objects automatically from the WSDL file. I have used __getTypes() and that returns an array with a bunch of structs. Unfortunately, I can't find one thing online that tells how to build a struct in PHP, and the code that is dumped from __getTypes() doesn't seem to take at all.
If anyone has any advice on how I can generate PHP data types from a WSDL file, please give me an answer or a direction.
Either way, the problem is the objects aren't simple, and I need to come up with a way to generate the code for the objects automatically from the WSDL file. I have used __getTypes() and that returns an array with a bunch of structs. Unfortunately, I can't find one thing online that tells how to build a struct in PHP, and the code that is dumped from __getTypes() doesn't seem to take at all.
If anyone has any advice on how I can generate PHP data types from a WSDL file, please give me an answer or a direction.