Postman调用webservice服务


 

测试服务地址     http://localhost:8080/cloud-web/user

请求方法            POST

请求Header信息(实际测试,不设置Accept和soapaction,也能成功请求和响应

           Accept                text/xml, multipart/related

          Content-Type      text/xml; charset=utf-8

           soapaction          http://service.com/UserService/getRequest

请求Body信息

<?xml version="1.0" ?>
<S:Envelope
    xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:get
            xmlns:ns2="http://service.com/">
            <arg0>张三</arg0>
        </ns2:get>
    </S:Body>
</S:Envelope>

请求响应信息

<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:getResponse xmlns:ns2="http://service.com/">
            <return>你好,张三</return>
        </ns2:getResponse>
    </S:Body>
</S:Envelope>

 

 

 补充说明:

以上测试使用的webservice服务由JDK1.8(JAX-WS)发布。

猜你喜欢

转载自huangqiqing123.iteye.com/blog/2386319