I have a xml document, i want to attach it inside SOAP body i.e. i want to make it as SOAP body, for that i am using this code (Consider the parsing is done by dom parser and i have a Document object as doc.)
SOAPEnvelope envelope = new SOAPEnvelope(); SOAPBody sBody = (SOAPBody)envelope.getBody(); sBody.addDocument(doc);
But i am getting this Exception - local part cannot be "null" when creating a QName at javax.xml.namespace.QName.<init>(Unknown Source)
Can some body guide me on this or can suggest some alternative approach.