public SOAPEnvelope createSOAPEnvelope(InputStream in) throws AxisFault {
try {
XMLStreamReader xmlreader =
StAXUtils.createXMLStreamReader(in);
StAXBuilder builder = new StAXSOAPModelBuilder(xmlreader, null);
return (SOAPEnvelope) builder.getDocumentElement();
} catch (Exception e) {
throw new AxisFault(e.getMessage(), e);
}
}
On 7/18/07, Angel Todorov <[EMAIL PROTECTED]> wrote:
Hi guys,
maybe you can give some insight? Thanks very much
Angel
---------- Forwarded message ----------
From: Angel Todorov <[EMAIL PROTECTED]>
Date: Jul 18, 2007 10:19 AM
Subject: [Axis2] SOAPEnvelope from an input stream / OMElement ?
To: [EMAIL PROTECTED]
Hi guys,
We have the requirement to receive the SOAP response as an input stream ,
and thus I would like to create an instance of a SOAPEnvelope given an
InputStream. I have been looking at the AXIOM impl code (soap.*) as well as
the MessageContext's implementation, but found no obvious way to do that,
without significant rewriting of many parts.
The problem is that I don't want Axis2 to write it's own SOAPEnvelope and
body tags - I already have the whole SOAP message (not only the payload) ,
with all namespaces and stuff constructed in the tags , I just want to take
that whole soap envelope and create a SOAPEnvelope out of it.
Is there any simple way to do that ? Thanks.
Creating a SOAPEnvelope instance from an already existing OMElement would
also work.
Regards,
Angel
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]