What is the PHPcoderequire (. soap_libnusoap.php); require (. include. php); ini_set (& quot; soap. wsdl_cache_enabled & quot;, & quot; 1 & quot;); $ s what is the second method of error reading when webservice is called
PHP code
require('./soap_lib/nusoap.php'); require('./include.php'); ini_set("soap.wsdl_cache_enabled", "1");$s = new SoapClient(url_site."/WebServices/Service1.asmx?wsdl"); $s->soap_defencoding = 'UTF-8'; $s->decode_utf8 = false;// $result=$s->call('UserInfo',array('user'=> urldecode($_GET['username']))); $result=$s->UserInfo(array('user'=> urldecode($_GET['username']))); //var_dump($result);exit;// if (!$err=$s->getError()) { // $list=explode(";",$result["UserInfoResult"]);// array_pop($list);// } else { $list=explode(";",$result->UserInfoResult); array_pop($list); ?>
The comments are based on the previous method of calling ws, which is not supported after the host is changed. then, we went to Google and found the second method, but did not specify how to capture the error message.
The cause is that if
$ Result = $ s-> UserInfo (array ('user' => urldecode ($ _ GET ['username']);
No data is executed.
Prompt
Fatal error: Uncaught SoapFault exception: [soap: Server] System. Web. Services. Protocols. SoapException: The Server cannot process the request. ---> System. IndexOutOfRangeException: no row exists at position 0. In System. data. RBTree '1. getNodeByIndex (Int32 userIndex) in System. data. RBTree '1. get_Item (Int32 index) in System. data. dataRowCollection. get_Item (Int32 index) in WebService1.Service1. userInfo (String user) Location
Questions:
If (! $ Err = $ s-> getError () is invalid.
------ Solution --------------------
When will I change my avatar?
------ Solution --------------------
WebService1.Service1. UserInfo (String user)
This is. NET.
User is in STRIN format.