1. 程式人生 > >Webservice develop and postman call via post method

Webservice develop and postman call via post method

1. Webservice server Publish:

Firstly, need create a interface class:HelloW and an implement calss:HelloWImpl

Second, then can publish a local webservice using javax.xml.ws.Endpoint

2. Call the service via Postman

<?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>     <ser

:sayHello xmlns:ser="http://server.baron.com/">         <arg0>Baron11</arg0>     </ser:sayHello>   </soap:Body> </soap:Envelope>

Please pay attention on the underscore part ":ser", you need add it, otherwise cannot pass the parameter:arg0. 

then when clicked the button "Send", below respone will be displayed:

3. Another tooling SoapUI also can call this webservice: