[nycphp-talk] PHP 5 SOAP && WSDL
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Fri Aug 11 20:39:36 EDT 2006
On Fri, 11 Aug 2006, Joseph Crawford wrote:
> :) I did check there first and attempted to use them but they just returned
> errors because it's not connecting to the web service. I am not sure what
> is going on but they decided to just use a curl POST to accomplish the task.
You must enable the trace option in your SOAPClient constructor:
$client = new SOAPClient('my.wsdl', array('trace' => true));
I will update the PHP Manual to mention this.
As to whether using cURL is a better alternative, well, I guess if
it's working for you, then it's okay. But even if you manage to create
the SOAP Envelope correctly and POST it, you're still stuck parsing
it, which doesn't sound like a fun job. (Well, I guess it depends if
you're using rpc/encoded or doc/lit.) YMMV.
-adam
--
adam at trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!
More information about the talk
mailing list