Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP5 consume web service without wsdl
February 14, 2006, 11:41 am
rate this thread
file for this service.
The perl soap client that can call and consume this web service looks
like this (if it helps)
use SOAP::Lite +trace => "debug";
How can this be translated in to something that is easily used in PHP5?
There is no wsdl file describing the web service above.
Re: PHP5 consume web service without wsdl
I'm going to assume that you are using the built-in SOAP library (as
opposed to PEAR or nuSOAP). I'm also going to assume PHP5 and an
To instantiate a new SOAP client:
$client = new SoapClient(null, $args);
The null indicates that there is no WSDL for this client.
The args will be something like:
$args = array(
'soap_version' => SOAP_1_1,
'location' => 'http://example.com/?WebServices ',
'uri' => 'http://example.com /'
Then you can call the methods as:
Don't forget to set try-catch blocks to handle exceptions.
February 14, 2006, 12:16 pm