问答

PHP怎么调用这种接口文件

作者:admin 2021-08-04 我要评论

授权 ID 与授权账号联系业务获取 请求地址: http://open.btdair.com :8099/LogisticsService.svc? wsdl 请求方式:POST Header 中包含: Content-Type: text/xm...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

授权 ID 与授权账号联系业务获取
请求地址:http://open.btdair.com:8099/LogisticsService.svc?
wsdl 请求方式:POST
Header 中包含:
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/ILogisticsService/方法名"
错误示例:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <s:Fault> <faultcode>s:Client</faultcode> <faultstring xml:lang="zh-CN">错误消息</faultstring> <detail>
<FaultMessage xmlns="http://schemas.datacontract.org/2004/07/JSON.Logistics.Emmis.Entity"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Message>错误消息</Message> <Type>消息格式(Normal:普通;Unlicensed:无效授权)</Type>
</FaultMessage>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

2.验证用户是否有效
方法名:Verify
提交数据: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <Verify xmlns="http://tempuri.org/"> <clientId>授权ID</clientId> <clientAccount>授权名称</clientAccount>
</Verify>
</s:Body>
</s:Envelope>
返回数据(错误请参考最上方错误示例): <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <VerifyResponse xmlns="http://tempuri.org/"> <VerifyResult>true|false</VerifyResult>
</VerifyResponse>
</s:Body>
</s:Envelope>

3.获取物流方式
方法名:GetLogisticsWay
提交数据: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <GetLogisticsWay xmlns="http://tempuri.org/"/>
</s:Body>
</s:Envelope>
返回数据(错误请参考最上方错误示例): <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetLogisticsWayResponse xmlns="http://tempuri.org/">
<GetLogisticsWayResult xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:string>渠道,例:香港DHL普货</a:string> <a:string>FedEx</a:string> <a:string>瑞典挂号</a:string> <a:string>新加坡平邮</a:string>
</GetLogisticsWayResult>
</GetLogisticsWayResponse>
</s:Body>
</s:Envelope>

###

https://www.php.net/manual/zh...

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • PHP怎么调用这种接口文件

    PHP怎么调用这种接口文件

  • es6模块化不能及时导出对象的子对象怎

    es6模块化不能及时导出对象的子对象怎

  • php算法问题

    php算法问题

  • vue+typescript无法使用this.$options.

    vue+typescript无法使用this.$options.

腾讯云代理商
海外云服务器