0

I have built a Soap String message without the http header on top.

Is there any spring or Java EE technology that can be used to send the message to a soap server?

I want to have the ability to write to the logs what is sent exactly but also hiding sensitive data in the soap request such as passwords (when it is printed to the logs).

public class SoapRequestTest {

    @Test
    public void createHttp() throws IOException {

        String soapRequest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<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/\">\n" +
                "  <soap:Body>\n" +
                "    <Divide xmlns=\"http://tempuri.org/\">\n" +
                "      <intA>int</intA>\n" +
                "      <intB>int</intB>\n" +
                "    </Divide>\n" +
                "  </soap:Body>\n" +
                "</soap:Envelope>";
    }
}

Now this soap message I want to use when calling the Divide method in http://www.dneonline.com/calculator.asmx?wsdl

0 Answers0