jeromeguillaume/ws-soap-calculator

By jeromeguillaume

Updated over 1 year ago

The Calcultator is a SOAP-based web service server with JAVA Spring and Tomcat

Image
Languages & frameworks
Web servers
0

630

jeromeguillaume/ws-soap-calculator repository overview

Calculator SOAP/XML web service

Information

The Calculator is a SOAP-based web service server with JAVA Spring and Tomcat. See https://spring.io/guides/gs/producing-web-service. Following endpoints are available:

  • Add
  • Divide
  • Multiply
  • Subtract

An X-SOAP-Region http response header is added. The value is retrieved from the X_SOAP_REGION environment variable declared in Tomcat container

See the GitGub repo: https://github.com/jeromeguillaume/ws-soap-calculator

Run the Docker image

docker run -d --name ws-soap-calculator --env X_SOAP_REGION=soap1 -p 8080:8080 jeromeguillaume/ws-soap-calculator:latest

Test

Request:

http POST http://localhost:8080/ws \
Content-Type:"text/xml; charset=utf-8" \
--raw '<?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>
    <Add xmlns="http://tempuri.org/">
      <intA>5</intA>
      <intB>7</intB>
    </Add>
  </soap:Body>
</soap:Envelope>'

Response:

HTTP/1.1 200
X-SOAP-Region: soap1
...
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <AddResponse xmlns="http://tempuri.org/">
      <AddResult>12</AddResult>
    </AddResponse>
  </soap:Body>
</soap:Envelope>

WSDL

Access to the WSDL: http://localhost:8080/ws/calculator.wsdl

Tag summary

Content type

Image

Digest

sha256:316dc9174

Size

108 MB

Last updated

over 1 year ago

docker pull jeromeguillaume/ws-soap-calculator