Hi,

I'm trying to embed a document in to the SOAPBody. I'm using the following
code

    DOMSource src = new DOMSource(doc); // Document doc
    MessageFactory mf = MessageFactory.newInstance();
    SOAPMessage soapMsg = mf.createMessage();
    soapMsg.getSOAPPart().setContent(src);
    return soapMsg;

But SOAPPart.setContent(src) seems to overwrite the entire SOAPMessage
instead of the SOAPBody alone.
How do I acheive embedding Document in to SOAPBody. I'm using Axis1.1.
Any pointers will be of great help.

Regards
Kumar Raj

<<attachment: winmail.dat>>

Reply via email to