PHP Client with Jade Web Services

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

PHP Client with Jade Web Services

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:53 pm

by Anonymous >> Wed, 11 May 2005 11:24:49 GMT

Has anyone managed to develop a php web service client for a Jade Web Service?

I ve created a simple php page that attempts to use the Jade Erewhon Demo System but have been unsuccessful.

Can anyone show me a snippet of code in php that can connect to a Jade Web service and sucessfully call a method with a valid resonse?

Thanks

ascribe
Posts: 16
Joined: Mon Sep 14, 2009 1:51 pm
Location: Australia
Contact:

Re: PHP Client with Jade Web Services

Postby ascribe » Tue Oct 06, 2009 4:49 pm

Here goes

$client = new soapclient("http://localhost/RefoutWebServices.wsdl", array('trace' => true)); //or where the wsdl file is kept
$results = "";
$id = "some name";
try{
$results = $client->getClient(array('name' => $id));
}catch(Exception $e){
echo ($e->getMessage());
}

Note: getClient is the name of Jade's method you wanna call, 'name' is the name of the parameter you defined in when creating getClient method

You can use
var_dump($client->__getFunctions()); to see which methods are available
echo '<p/>Request : <br/><xmp>',$client->__getLastRequest(), '</xmp>'; to view the request being made
echo '<p/>Response : <br/><xmp>',$client->__getLastResponse(), '</xmp>'; to view the response


good luck


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 6 guests