asmx web服务返回数据集并尝试从php访问 [英] asmx web service return dataset and trying to access from php
本文介绍了asmx web服务返回数据集并尝试从php访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有asmx webservice,它返回一个数据集并尝试使用php从这个webserivice访问一个标签或列..
这是我的代码。
I have asmx webservice, which is returning a dataset and trying to access one tag or column form this webserivice by using php..
This is my code.
$client = new SoapClient("http://192.168.1.30:8080/StudentWebService/StudentResultWebService.asmx?wsdl",array(
"trace" => 1, // enable trace to view what is happening
"exceptions" => 0, // disable exceptions
"cache_wsdl" => 0) // disable any caching on the wsdl, encase you alter the wsdl server
);
$params = array(
"regNo" => 100,
);
$result = $client->GetStudentResult($params);
这将返回一个字符串中的所有数据集列值...
现在该怎么做才能访问一个列值.. ??
and this return all dataset column values in one string...
What to do now to access only one Column value..??
推荐答案
client = new SoapClient( http://192.168.1.30:8080/StudentWebService/StudentResultWebService.asmx?wsdl,array(
trace => 1, // 启用跟踪以查看发生的情况
exceptions => 0, // 禁用例外
cache_wsdl => 0) // 禁用wsdl上的任何缓存,包装你改变wsdl服务器
) ;
client = new SoapClient("http://192.168.1.30:8080/StudentWebService/StudentResultWebService.asmx?wsdl",array( "trace" => 1, // enable trace to view what is happening "exceptions" => 0, // disable exceptions "cache_wsdl" => 0) // disable any caching on the wsdl, encase you alter the wsdl server );
params = array(
regNo => 100,
);
params = array( "regNo" => 100, );
result =
result =
这篇关于asmx web服务返回数据集并尝试从php访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文