August 27, 201015 yr Does any one have sample code to consume web service using 360 works web service manager in PHP,say for 'AddTwoNumbers' operation? here is code which we wrote require_once('lib/nusoap.php'); $wsdl ="http://servername/websvcmgr.php?wsdl&service=ExampleService"; $client=new soapclient($wsdl, 'wsdl'); $param=array('addend1'=>'15', 'addend2'=>'10'); $result = $client->call('AddTwoNumbers', $param); // Check for a fault if ($client->fault) { echo ' Fault '; print_r($result); echo ''; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo ' Error ' . $err . ''; } else { // Display the result echo ' Result '; print_r($result); echo ''; } } This does execute 'display result' code, but no output value is shown.
September 8, 201015 yr I replied privately to this, here is the PHP code to access our test server if anybody else is trying to do this: <?php $soap = new SoapClient('http://wpeoffice.360works.com/websvcmgr.php?wsdl&Service=ExampleService'); $lookup = $soap->AddTwoNumbers(array("Addend1" => "3", "Addend2" => "4")); print_r( $lookup ); ?>
Create an account or sign in to comment