需要阅读Nusoap ComplexType Client [英] Need to read Nusoap ComplexType Client
本文介绍了需要阅读Nusoap ComplexType Client的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从susoap网络服务中读取信息,
服务器端;
$ server-> ;注册('login',
数组('myVar'=>'xsd:string'),
数组('return'=>'tns:ct_adminUser'),
$ namespace,
$ namespace。'#login',
'rpc',
'encoded',
'登录验证!'
);
...
$ server-> wsdl-> addComplexType('MyStruct','complexType','struct', 'all','',
array('val1'=> array('name'=>'val1','type'=>'xsd:int'),
'val2 '=>数组('name'=>'val2','type'=>'xsd:string')
));
函数testFn()
{
返回数组('usrId'=> 1,'usrName'=>'我的名字');
}
我正在使用vb.net而且我可以读取数据,但我正在尝试实现客户端在PHP中,我无法阅读回复。
在PHP客户端中,我有以下代码;
$ result = $ client-> call('testFn',array('myVar'=& gt;'XXXXX')));
echo $ result;
回复是:
数组
如果我将客户更改为以下内容,则不会收到任何内容;
$ result = $ client-& gt; call('testFn',array('myVar'=& amp; amp; gt;'XXXXX')));
echo $ result-> val1;
解决方案
server-> register('login',
array('myVar'=>'xsd:string'),
array('return'=>'tns:ct_adminUser'),
namespace,
namespace。'#login',
'rpc',
'coding',
'登录验证!'
);
...
I need to read information from susoap web service,
Server Side;
$server->register('login', array('myVar' => 'xsd:string'), array('return' => 'tns:ct_adminUser'), $namespace, $namespace . '#login', 'rpc', 'encoded', 'Login validation!' );
...
$server->wsdl->addComplexType('MyStruct','complexType','struct','all','', array( 'val1' => array('name' => 'val1','type' => 'xsd:int'), 'val2' => array('name' => 'val2','type' => 'xsd:string') )); function testFn() { return Array ('usrId' => 1,'usrName' => 'MY NAME'); }
I'm using vb.net and I can read the data but I'm trying to implement the client in PHP and I can't read the response.
In the PHP client I have the following code;
$result = $client->call('testFn',array('myVar' => 'XXXXX'))); echo $result;
The response is;
Array
If I change the client to the following don't receive anything;
$result = $client->call('testFn',array('myVar' => 'XXXXX'))); echo $result->val1;
解决方案
server->register('login', array('myVar' => 'xsd:string'), array('return' => 'tns:ct_adminUser'),
namespace,
namespace . '#login', 'rpc', 'encoded', 'Login validation!' );
...
这篇关于需要阅读Nusoap ComplexType Client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文