webservice
程序员文章站
2022-06-03 08:46:42
...
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); ?>
上一篇: python切片中容易出错的情况
下一篇: Go语言中多字节字符的处理方法详解
推荐阅读
-
ASP.NET使用WebService实现天气预报功能
-
android调用WebService实例分析
-
c#中WebService的介绍及调用方式小结
-
C#发送HttpPost请求来调用WebService的方法
-
php如何调用webservice应用介绍
-
C# 创建、部署和调用WebService简单示例
-
Python开发WebService系列教程之REST,web.py,eurasia,Django
-
idea生成webservice客户端代码(webservice客户端调用方式)
-
MyEclipse开发一个webservice接口
-
webservice技术有哪些(知识点webservice技术)