Results 1 to 2 of 2

Thread: How can I get the full Soap message inside of AbstractDomPayloadEndpoint ?

  1. #1
    Join Date
    Sep 2007
    Posts
    15

    Default How can I get the full Soap message inside of AbstractDomPayloadEndpoint ?

    I am new to this Spring-WS, so please be nice.

    I have my own endpoint implementation:

    public class MyEndpoint extends AbstractDomPayloadEndpoint
    {

    }

    Is there anyway I can get the whole Soap request message like:

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:schema="http://www.mycompany.com/service">
    <soap:Body>
    .....
    </soap:Body>
    </soap:Envelope>

    Thanks
    Bobby

  2. #2
    Join Date
    Sep 2007
    Posts
    15

    Default got it...

    SOAPMessage message = MessageFactory.newInstance().createMessage();
    SOAPPart sp = message.getSOAPPart();
    Element imported = (Element) sp.importNode(requestElement, true);
    SOAPBody sb = message.getSOAPBody();
    sb.appendChild(imported);
    message.writeTo(System.out);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •