This is a demo springboot project, that shows how you can emulate the behavior of a soap web service as a black box.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Greg Gauthier 92a4247cd3 add xml document parsing; clean up typos 1 month ago
.mvn/wrapper simple soap emulation mock; initial commit 1 month ago
src add xml document parsing; clean up typos 1 month ago
.gitignore simple soap emulation mock; initial commit 1 month ago
README.md added readme 1 month ago
mvnw simple soap emulation mock; initial commit 1 month ago
mvnw.cmd simple soap emulation mock; initial commit 1 month ago
pom.xml simple soap emulation mock; initial commit 1 month ago

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>