This is a demo springboot project, that shows how you can emulate the behavior of a soap web service as a black box.
Go to file
Greg Gauthier 0a924ba74d add xml highlights to example input, response. 2024-03-03 21:56:45 +00:00
.mvn/wrapper simple soap emulation mock; initial commit 2021-04-08 20:45:09 +01:00
src add xml document parsing; clean up typos 2021-04-09 22:03:56 +01:00
.gitignore simple soap emulation mock; initial commit 2021-04-08 20:45:09 +01:00
.java-version add jenv java config 2021-12-17 14:51:47 +00:00
README.md add xml highlights to example input, response. 2024-03-03 21:56:45 +00:00
mvnw simple soap emulation mock; initial commit 2021-04-08 20:45:09 +01:00
mvnw.cmd simple soap emulation mock; initial commit 2021-04-08 20:45:09 +01:00
pom.xml simple soap emulation mock; initial commit 2021-04-08 20:45:09 +01:00

README.md

SOAPMOCK

This is a demo springboot project, that shows how you can emulate the behavior of a soap web service as a black box. I have written it to be compatible with Java 1.8. So, it should work well with older systems.

Build:

mvn clean install

Run:

mvn spring-boot:run

The server will start on http://localhost:8080

Configure your client (Postman, Insomnia, or whatever) to send this body in a POST to url /call1:

<?xml version = "1.0"?>
<SOAP-ENV:Envelope
        xmlns:SOAP-ENV = "http://www.w3.org/2001/12/soap-envelope"
        SOAP-ENV:encodingStyle = "http://www.w3.org/2001/12/soap-encoding">

    <SOAP-ENV:Body xmlns:m = "http://www.xyz.org/quotations">
        <m:GetQuotation>
            <m:QuotationsName>MicroSoft</m:QuotationsName>
        </m:GetQuotation>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

You should get this in response:

<?xml version = "1.0"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV = "http://www.w3.org/2001/12/soap-envelope"
        SOAP-ENV:encodingStyle = "http://www.w3.org/2001/12/soap-encoding">
  <SOAP-ENV:Body
    xmlns:m = "http://www.xyz.org/quotations">
    <m:GetQuotationResponse>
      <m:Quotation>Here is the quotation</m:Quotation>
    </m:GetQuotationResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>