关于使用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>
结果
网友评论