我在使用.Net 编写的网络服务时遇到了烦人的困难。wsdl可以找到:http ://services.odeontours.com.tr/OdeonWebService.asmx?wsdl
我想调用 CategoryList 函数,它的服务描述可以在这里找到 我相信它返回一个变量 .net DataSet 数据类型..
我已经使用 wsdl2php 生成了包装类。可以在这里找到
和代码:
error_reporting(E_ALL);
ini_set('display_errors', 1);
include_once './OdeonWebService.php';
$odeonClient = new OdeonWebService();
$auth = new AuthHeader();
$auth->PartnerID = 434;
$auth->UserName = 'xmlReaderGoral';
$auth->Password = "856UD..";
$catListParams = new CategoryList();
$catListRes = $odeonClient->CategoryList($catListParams)->CategoryListResult;
print var_dump($catListRes);
?>
它告诉我:
致命错误:未捕获的 SoapFault 异常:[soap:Server] 服务器无法处理请求。---> 对象引用未设置为对象的实例。
顺便说一句,在服务描述中,我注意到我应该按标题传递 AuthHeader。我不知道该怎么做。。
我究竟做错了什么??
提前致谢..