肥皂客户端不在实时服务器上工作

时间:2013-02-12 08:22:12

标签: php json web-services soap-client

我使用soap客户端从.asmx方法获取数据。它在localhost上工作正常,但不能在live server上工作。这是我的代码。

//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","1");
xdebug_disable();
try {
    //instantiate the SOAP client
    $client = new SoapClient("http://ip_address/appName/common/TaskTrackingService.asmx?wsdl");
} catch (Exception $e) {
    exit("Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ip_address/appName/common/TaskTrackingService.asmx?wsdl'");
}

//checking if object is created
if ($client) {
    //updating user in timings 
    //getting data from GetAllEmployeeIntimesByDay method from timesheet 
    $params->month = date('m');
    $params->year = date('Y');
    $params->day = date('d',strtotime('yesterday'));
    $result = $client->GetAllEmployeeIntimesByDay($params)->GetAllEmployeeIntimesByDayResult;
}

0 个答案:

没有答案