Postman 测试EAS Webservice接口
1. 访问登录
访问地址:
http://10.10.10.10:6888/ormrpc/services/EASLogin?wsdl
访问方式:post
增加Headers设置
Content-Type=text/xml
SOAPAction=application/soap+xml;charset=utf-8
增加Body 类型:raw 文本类型:xml
<?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>xxxx</userName>
<password>xxxxx</password>
<slnName>eas</slnName>
<dcName>xxxx</dcName>
<language>L2</language>
<dbType>0</dbType>
</pm:login>
</soap:Body>
</soap:Envelope>
返回值:sessionId
返回值示例:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:loginResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://10.10.10.10:6888/ormrpc/services/">
<loginReturn href="#id0"/>
</ns1:loginResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:WSContext" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:client">
<dbType href="#id1"/>
<dcName xsi:type="soapenc:string">xxx</dcName>
<password xsi:type="soapenc:string">xxx</password>
<sessionId xsi:type="soapenc:string">20ec9d42-e639-4f2b-b030-c1ce43a94913</sessionId>
<slnName xsi:type="soapenc:string">eas</slnName>
<userName xsi:type="soapenc:string">xxx</userName>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</multiRef>
</soapenv:Body>
</soapenv:Envelope>
2. 访问方法
访问地址:
http://10.10.10.10:6888/ormrpc/services/WSBaseData?wsdl
访问方式:post
增加Headers设置
Content-Type=text/xml
SOAPAction=application/soap+xml;charset=utf-8
增加Body 类型:raw 文本类型:xml
其中包含登录时返回的SessionId,方法名称为:selectMaterial
<?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:Header>
<ns1:SessionId
xmlns:ns1="http://login.webservice.bos.kingdee.com">
20ec9d42-e639-4f2b-b030-c1ce43a94913
</ns1:SessionId>
</soap:Header>
<soap:Body>
<pm:selectMaterial>
<start>0</start>
<rows>300</rows>
<beginTime>2021-02-19 00:00:00</beginTime>
<endTime>2021-02-19 23:59:59</endTime>
</pm:selectMaterial>
</soap:Body>
</soap:Envelope>