php代码
<?php $url = "url?WSDL"; $client = new SoapClient($url); $params = array( 'szLoginName_IN'=>'monkeytest3050', 'szFPWD_IN'=>'qwe123', ); $res = $client->__soapCall("UserWSLogin",array('parameters'=>$params)); if($res->UserWSLoginResult === true) { switch($res->uAWI_OUT) { case 0: $result['REV'] = true; $result['DATA'] = array( 'uUserID_OUT'=>$res->uUserID_OUT, 'szNickName_OUT'=>$res->szNickName_OUT, 'uFigureID_OUT'=>$res->uFigureID_OUT ); break; case 20: $result['REV'] = false; $result['MSG'] = "用户密码错误"; break; case 2: $result['REV'] = false; $result['MSG'] = $res->szPromptText_OUT; break; default: $result['REV'] = false; $result['MSG'] = "未定义错误:ws[".$res->uAWI_OUT."]"; break; } } else { $result['REV'] = false; $result['MSG'] = "调用服务失败,请稍后再试"; } var_dump($result); ?>