本文主要是介绍使用 Postman 测试 EAS webservice,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1. EAS webservice
EAS WSDL 如下:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://10.10.10.10:6890/ormrpc/services/EASLogin"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://10.10.10.10:6890/ormrpc/services/EASLogin"
xmlns:intf="http://10.10.10.10:6890/ormrpc/services/EASLogin"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:client"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema targetNamespace="urn:client" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="WSContext"><sequence><element name="dbType" type="xsd:int"/><element name="dcName" nillable="true" type="xsd:string"/><element name="password" nillable="true" type="xsd:string"/><element name="sessionId" nillable="true" type="xsd:string"/><element name="slnName" nillable="true" type="xsd:string"/><element name="userName" nillable="true" type="xsd:string"/></sequence></complexType></schema></wsdl:types><wsdl:message name="loginResponse"><wsdl:part name="loginReturn" type="tns1:WSContext"></wsdl:part></wsdl:message><wsdl:message name="loginRequest"><wsdl:part name="userName" type="xsd:string"></wsdl:part><wsdl:part name="password" type="xsd:string"></wsdl:part><wsdl:part name="slnName" type="xsd:string"></wsdl:part><wsdl:part name="dcName" type="xsd:string"></wsdl:part><wsdl:part name="language" type="xsd:string"></wsdl:part><wsdl:part name="dbType" type="xsd:int"></wsdl:part></wsdl:message><wsdl:portType name="EASLoginProxy"><wsdl:operation name="login" parameterOrder="userName password slnName dcName language dbType"><wsdl:input message="impl:loginRequest" name="loginRequest"></wsdl:input><wsdl:output message="impl:loginResponse" name="loginResponse"></wsdl:output></wsdl:operation></wsdl:portType><wsdl:binding name="EASLoginSoapBinding" type="impl:EASLoginProxy"><wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="login"><wsdlsoap:operation soapAction=""/><wsdl:input name="loginRequest"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://login.webservice.bos.kingdee.com" use="encoded"/></wsdl:input><wsdl:output name="loginResponse"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.10.10.10:6890/ormrpc/services/EASLogin" use="encoded"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="EASLoginProxyService"><wsdl:port binding="impl:EASLoginSoapBinding" name="EASLogin"><wsdlsoap:address location="http://10.10.10.10:6890/ormrpc/services/EASLogin"/></wsdl:port></wsdl:service>
</wsdl:definitions>
2. Postman
使用Postman调用webservice接口时,需要将注意设置Post参数如下:
Headers 参数
Content-Type = text/xml
SOAPAction = application/soap+xml;charset=utf-8
Body
使用raw格式,内容如下:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"xmlns:pm="http://10.10.10.10:6888/ormrpc/services/"><soap:Body><pm:login><userName>username</userName><password>password</password><slnName>eas</slnName><dcName>A001</dcName><language>L2</language><dbType>0</dbType></pm:login></soap:Body>
</soap:Envelope>
调用结果如下:
这篇关于使用 Postman 测试 EAS webservice的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!