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 ! Link to comment https://forums.phpfreaks.com/topic/231940-php-webservice/ Share on other sites More sharing options...
Ionisis Posted March 30, 2011 Share Posted March 30, 2011 What's the error you're getting? Link to comment https://forums.phpfreaks.com/topic/231940-php-webservice/#findComment-1194267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.