public SOAPPartImpl(SOAPMessageImpl parent, Object initialContents, boolean isBodyStream) throws SOAPException{
setMimeHeader(HTTPConstants.HEADER_CONTENT_ID , SessionUtils.generateSessionId());
setMimeHeader(HTTPConstants.HEADER_CONTENT_TYPE , "text/xml");
StAXSOAPModelBuilder stAXSOAPModelBuilder;
msgObject = parent;
try{
if(initialContents instanceof SOAPEnvelope){
((SOAPEnvelopeImpl)initialContents).setOwnerDocument(this);
envelope = initialContents;
} else if(initialContents instanceof InputStream){
//XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader((InputStream)initialContents);
InputStreamReader inr = new InputStreamReader((InputStream)initialContents);
stAXSOAPModelBuilder = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(inr));
org.apache.axis2.soap.SOAPEnvelope omEnv = stAXSOAPModelBuilder.getSOAPEnvelope();
envelope = new SOAPEnvelopeImpl(omEnv);
((SOAPEnvelopeImpl)envelope).setOwnerDocument(this);
}
}catch(Exception e){