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.
PHP SOAP extension -- sending complex objects
Moderator: General Moderators
Follow-up
Since my last post, I have written a parser which will take the returned arrays from __getTypes() and __getFunctions() and create nested arrays that can be used to send in data for complex objects. I don't particularly like this.
What I was looking for before was something similar to Axis http://ws.apache.org/axis/ to generate code for PHP.
Is this normally how people using PHP would handle SOAP complex objects?
What I was looking for before was something similar to Axis http://ws.apache.org/axis/ to generate code for PHP.
Is this normally how people using PHP would handle SOAP complex objects?
-
Hardcore4Life
- Forum Newbie
- Posts: 14
- Joined: Mon Oct 10, 2005 7:58 am
- Location: Hannover / Germany
- Contact:
i know tjis post is a few days old but ...
--> check this out!
--> check this out!