How do I build a SOAP web service in Spring Boot?… here is a solution to the problem.
How do I build a SOAP web service in Spring Boot?
I’m learning a tutorial for producing soap web service in spring boot
This confuses me a bit. Like where is WSDL in the first place? Does this generate wsdl from countries.xsd? I don’t know how to test a web service in soapui without a wsdl file.
Can anyone help me.
Solution
In this tutorial, they take a bottom-up approach. If you want to get WSDL in this example
http://<host>:<port>/ws/countries.wsdl
Get national responses
$ curl --header "content-type: text/xml" -d @request.xml http://localhost:8080/ws
Here 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>