Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to produce a soap web service in spring boot ?

I was following this tutorial of producing soap web service in spring boot,

and it left me a little confused. Like where is the wsdl in the first place ? Is this going to generate the wsdl from the countries.xsd ? I didn't get how it is expected to test web service in soapui without having a wsdl file.

Can anyone help me out.

like image 678
minusSeven Avatar asked Oct 14 '25 13:10

minusSeven


1 Answers

In this tutorial they have followed a Bottom-Up approach. If you want to get the WSDL in this example

http://<host>:<port>/ws/countries.wsdl

To get the country response

$ curl --header "content-type: text/xml" -d @request.xml http://localhost:8080/ws

Below is the request.xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:gs="http://spring.io/guides/gs-producing-web-service">
   <soapenv:Header/>
   <soapenv:Body>
      <gs:getCountryRequest>
         <gs:name>Spain</gs:name>
      </gs:getCountryRequest>
   </soapenv:Body>
</soapenv:Envelope>
like image 149
Jaydeep Rajput Avatar answered Oct 17 '25 03:10

Jaydeep Rajput



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!