php webservices code error
Posted: Wed Jan 06, 2010 1:43 am
this is the php code i'm running on the server
<?php
require_once('lib/nusoap.php');
$request = "http://www.webserviceX.NET/GetWeather";
$location = "http://www.webservicex.net/globalweather.asmx";
$action = "tns:GetWeatherSoapIn";
//$version = "5.0.1";
$version = "0.7.3";
class mySoap extends SoapClient
{
public function __doRequest($request, $location, $action, $version)
{
$result = parent::__doRequest($request, $location, $action, $version);
//$result = str_replace('<key xsi:type="xsd:int">', '<key xsi:type="xsd:string">', $result);
return $result;
}
}
//$abc = new mySoap(
$res = __doRequest($request, $location, $action, $version);
echo "<br/>weather report info :<br/>".$res;
?>
This is the error :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\Inetpub\vhosts\myw3portal.com\httpdocs\weatherreport.php on line 14
can someone resolve my problem?
<?php
require_once('lib/nusoap.php');
$request = "http://www.webserviceX.NET/GetWeather";
$location = "http://www.webservicex.net/globalweather.asmx";
$action = "tns:GetWeatherSoapIn";
//$version = "5.0.1";
$version = "0.7.3";
class mySoap extends SoapClient
{
public function __doRequest($request, $location, $action, $version)
{
$result = parent::__doRequest($request, $location, $action, $version);
//$result = str_replace('<key xsi:type="xsd:int">', '<key xsi:type="xsd:string">', $result);
return $result;
}
}
//$abc = new mySoap(
$res = __doRequest($request, $location, $action, $version);
echo "<br/>weather report info :<br/>".$res;
?>
This is the error :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\Inetpub\vhosts\myw3portal.com\httpdocs\weatherreport.php on line 14
can someone resolve my problem?