webservice学习三,soapui测试

加入header头验证

1
2
3
4
5
6
7
8
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken >
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ZDg3NDA5NjUyYmNk</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

request和response

request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.riskManage.zstimes.com/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken >
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ZDg3NDA5NjUyYmNk</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<web:helloWord>

<userName>"zhangsan"</userName>
</web:helloWord>
</soapenv:Body>
</soapenv:Envelope>

response

1
2
3
4
5
6
7
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:helloWordResponse xmlns:ns2="http://webservice.riskManage.zstimes.com/">
<return>hello "zhangsan"!!!</return>
</ns2:helloWordResponse>
</soap:Body>
</soap:Envelope>