test1();
function test1()
{
$url = "http://bcsz.xms.foxhis.com:8080/ItfServerWS/XmsWS?wsdl";//正式地址
// $url = "http://xms.foxhis.com:922/ItfServerWS/XmsWS?wsdl";//测试地址
$postjson = '{"param":{"begin":"2015-12-17","end":"2015-12-18","rmtype":"","ratecode":""},"hotelid":"G000001","pwd":"foxhis","cmmcode":"WEB","user":"foxhis","rq":"rminfo"}';
try {
$client = new SoapClient($url, array("trace" => true, "connection_timeout" => 100));
// var_dump($client->__getFunctions());//列出所有的功能
logE('传入的json', $postjson);
$return = $client->__call('getRoomAmount',array('arg0' => $postjson));//从接口地址获得的数据
logE('接收的值', $return);
$result = $return->return;
logE('返回的json', $result);
return $result;
} catch (SOAPFault $e) {
print_r('Exception:' . $e);
return null;
}
}
这是请求wsdl接口的测试方法;
为什么请求测试地址能正常返回值;
请求正式地址就不行了;
求助~~~~~~
代码贴上,求帮忙,急
function test1()
{
$url = "http://bcsz.xms.foxhis.com:8080/ItfServerWS/XmsWS?wsdl";//正式地址
// $url = "http://xms.foxhis.com:922/ItfServerWS/XmsWS?wsdl";//测试地址
$postjson = '{"param":{"begin":"2015-12-17","end":"2015-12-18","rmtype":"","ratecode":""},"hotelid":"G000001","pwd":"foxhis","cmmcode":"WEB","user":"foxhis","rq":"rminfo"}';
try {
$client = new SoapClient($url, array("trace" => true, "connection_timeout" => 100));
// var_dump($client->__getFunctions());//列出所有的功能
logE('传入的json', $postjson);
$return = $client->__call('getRoomAmount',array('arg0' => $postjson));//从接口地址获得的数据
logE('接收的值', $return);
$result = $return->return;
logE('返回的json', $result);
return $result;
} catch (SOAPFault $e) {
print_r('Exception:' . $e);
return null;
}
}
这是请求wsdl接口的测试方法;
为什么请求测试地址能正常返回值;
请求正式地址就不行了;
求助~~~~~~
代码贴上,求帮忙,急