美文网首页
记录postman 测试 webservices

记录postman 测试 webservices

作者: sixlib | 来源:发表于2018-08-27 09:25 被阅读0次

关于使用postman测试webservices

官方示例

本文中以postman官方博客中是使用实例为例。

the wsdl 部分内容

<wsdl:types>
  <s:schema elementFormDefault="qualified" targetNamespace="http://www.holidaywebservice.com/HolidayService_v2/">
    <s:element name="GetHolidaysAvailable">
      <s:complexType>
        <s:sequence>
         <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
        </s:sequence>
      </s:complexType>
    </s:element>
    <s:simpleType name="Country">
      <s:restriction base="s:string">
        <s:enumeration value="Canada"/>
        <s:enumeration value="GreatBritain"/>
        <s:enumeration value="IrelandNorthern"/>
        <s:enumeration value="IrelandRepublicOf"/>
        <s:enumeration value="Scotland"/>
        <s:enumeration value="UnitedStates"/>
      </s:restriction>
    </s:simpleType>
  </s:schema>
</wsdl:types>

headers

  • 添加 Content-Type:'text/xml';如果接口有其他的headers配置请另行配置。
    headers配置

body

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hs="http://www.holidaywebservice.com/HolidayService_v2/">
 <soapenv:Body>
 <hs:GetHolidaysAvailable>
 <hs:countryCode>Canada</hs:countryCode>
 </hs:GetHolidaysAvailable>
 </soapenv:Body>
</soapenv:Envelope>
结果

相关文章

网友评论

      本文标题:记录postman 测试 webservices

      本文链接:https://www.haomeiwen.com/subject/kvcziftx.html