Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5189 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

  • 2 weeks later...
Posted

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 );

?>

This topic is 5189 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.