PHP SOAP extension -- sending complex objects

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
abertoll
Forum Newbie
Posts: 4
Joined: Tue Apr 12, 2005 12:26 pm
Location: MD

PHP SOAP extension -- sending complex objects

Post by abertoll »

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.
abertoll
Forum Newbie
Posts: 4
Joined: Tue Apr 12, 2005 12:26 pm
Location: MD

Follow-up

Post by abertoll »

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?
Hardcore4Life
Forum Newbie
Posts: 14
Joined: Mon Oct 10, 2005 7:58 am
Location: Hannover / Germany
Contact:

Post by Hardcore4Life »

i know tjis post is a few days old but ...
--> check this out!
Post Reply