使用 Postman 测试 EAS webservice

1 篇文章 0 订阅
1 篇文章 0 订阅

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>
调用结果如下:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值