Pro.Luv Posted March 28, 2011 Share Posted March 28, 2011 Hi, I'm trying to call a .net(.asmx) webservice and it just doesn't work, I really need help with this. require("nusoap.php"); $client = new nusoap_client('http://www.w3schools.com/webservices/tempconvert.asmx?wsdl', true); $err = $client->getError(); if($err){ Print '<h2>Constructor error</h2><pre>'.$err.'</pre>'; } $param = array('Celsius' => '12') ; //PARAMETERS $function = 'CelsiusToFahrenheit'; //FUNCTION IM CALLING $result = $client->call($function, $param); if ($client->fault) { Print '<h2>Fault</h2><pre>'; print_r($result); Print '</pre>'; } else { $err = $client->getError(); // Check for errors if ($err) { Print '<h2>Error</h2><pre>'.$err.'</pre>'; // Display the error } else { // Display the result Print '<h2>Result</h2><pre>'; print_r($result); Print '</pre>'; } } Thanks ! Quote Link to comment Share on other sites More sharing options...
Ionisis Posted March 30, 2011 Share Posted March 30, 2011 What's the error you're getting? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.