1.接口访问地址
http://ip:port/admin/services/AdminWebService?wsdl
2.通用jsonParam 及 返回值的定义
本系统只有一个通用接口函数,通过接口标识定义方法的功能。
String executeInterface(String interfaceId, String jsonParam);
查询类接口调用参数说明
| 参数名称 | 参数说明 | 备注信息 |
1 | interfaceId | 接口标识 | 决定方法的类型 |
2 | jsonParam | 查询条件 | Json方式分装的查询条件或待写入数据(例子参考如下) |
{
"param": {},
"authorinize": {
"loginIP": "10.34.2.98",
"userName": "system",
"password": "YWRtaW4xMjM"
},
"pagination": {
"curretnPage": 1,
"pageSize": 10
},
"orders": [ {
"propertyName": "id",
"ascending": "false"
},
{
"propertyName": "category",
"ascending": "true"
}
],
"locale": "zh-CN"
}
3.PHP实现
public $host = "服务器IP";
public $webservice_port =80;
$client = new \SoapClient($this->host . ":" . $this->webservice_port . "/admin/services/AdminWebService?wsdl");
$parmas = [
'arg0' => "admin_001_006", //interfaceId
'arg1' => json_encode( //jsonParam
[
'param' => [
"unitType" => 1,
]
]
),
];
$result = $client->__call('executeInterface', [$parmas]);