(1)设置url,注:?wsdl不要加在后面
(2)设置请求模式:post
(3)设置Header:添加Content-Type,值为text/xml;charset=utf-8
(4)设置Body
勾选raw,以JSON(application/json)格式进行传输,设置XML。Body中输入需要传输的JSON格式的数据。例子如下,
<?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/">
<soap:Body>
<getJlry xmlns="http://tempuri.org/">
<in0>JlApp</in0>
<in1>141163E20F9DDABBBE23CDEC871F3231</in1>
<in2>3208032004111111-HE-001</in2>
</getJlry>
</soap:Body>
</soap:Envelope>
一切设置完毕后,点击 Send 按钮,这样就会调用指定的接口,并执行内部的方法,根据返回结果来测试功能的正确与否。
- 注:getJlry 是方法名,in0 in1 in2是参数名
(5)返回结果
返回结果依然是JSON格式。
- 1
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ns1:getJlryResponse xmlns:ns1="http://webservice">
<ns1:out><?xml version="1.0" encoding="GBK"?>
<attendanceData>
<people>
<IdHDPhoto>LzlqLzRBQVFTa1pKUmdBQkFRRUFBQUFBQUFELzJ3QkRBQVlFQlFZRkJBWUdCUVlIQndZSUNoQUtD
Z2tKQ2hRT0R3d1FGeFFZR0JjVQ0KRmhZYUhTVWZHaHNqSEJZV0lDd2dJeVluS1NvcEdSOHRNQzBv
TUNVb0tTai8yd0JEQVFjSEJ3b0lDaE1LQ2hNb0doWWFLQ2dvS0Nnbw0KS0Nnb0tDZ29LQ2dvS0Nn
b0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2ovd0FBUkNBSGdBb0FE
QVNJQQ0KQWhFQkF4RUIvOFFBSHdBQUFRVUJBUUVCQVFFQUFBQUFBQUFBQUFFQ0F3UUZCZ2NJQ1Fv
TC84UUF0UkFBQWdFREF3SUVBd1VGQkFRQQ0KQUFGOUFRSURBQVFSQlJJaE1VRUdFMUZoQnlKeEZE
S0JrYUVJSTBLeHdSVlMwZkFrTTJKeWdna0tGaGNZR1JvbEppY29LU28wTlRZMw0KT0RrNlEwUkZS
a2RJU1VwVFZGVldWMWhaV21Oa1pXWm5hR2xxYzNSMWRuZDRlWHFEaElXR2g0aUppcEtUbEpXV2w1
aVptcUtqcEtXbQ0KcDZpcHFyS3p0TFcydDdpNXVzTER4TVhHeDhqSnl0TFQxTlhXMTlqWjJ1SGk0
SFhwVDNCckswKzF1ZnNvTGFoY3VUM1pzL3dBNm1Na3NKd1pXZjYxMw0KS255YUdjaXpPd2p0Mko2
OGZ6cFVCQ1ZWRzY3SURzUUFjNHE2T2xWMEpHR2lsSW9wRFAvWg==</IdPhoto>
</people>
</attendanceData></ns1:out>
</ns1:getJlryResponse>
</soap:Body>
</soap:Envelope>
Postman测试接口还是很清晰直观的(数据加密了)。