You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Angel Todorov <at...@gmail.com> on 2007/07/18 10:45:50 UTC

Fwd: [Axis2] SOAPEnvelope from an input stream / OMElement ?

Hi guys,

maybe you can give some insight?  Thanks very much

Angel

---------- Forwarded message ----------
From: Angel Todorov <at...@gmail.com>
Date: Jul 18, 2007 10:19 AM
Subject: [Axis2] SOAPEnvelope from an input stream / OMElement ?
To: axis-user@ws.apache.org

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

Re: [Axis2] SOAPEnvelope from an input stream / OMElement ?

Posted by Angel Todorov <at...@gmail.com>.
Hi Davanum,

Thanks, that's exactly what I've been looking for.

Regards,
Angel

On 7/18/07, Davanum Srinivas <da...@gmail.com> wrote:
>
>     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 <at...@gmail.com> wrote:
> > Hi guys,
> >
> > maybe you can give some insight?  Thanks very much
> >
> > Angel
> >
> > ---------- Forwarded message ----------
> > From: Angel Todorov <at...@gmail.com>
> > Date: Jul 18, 2007 10:19 AM
> > Subject: [Axis2] SOAPEnvelope from an input stream / OMElement ?
> > To: axis-user@ws.apache.org
> >
> > 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: commons-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: commons-dev-help@ws.apache.org
>
>

Re: [Axis2] SOAPEnvelope from an input stream / OMElement ?

Posted by Davanum Srinivas <da...@gmail.com>.
    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 <at...@gmail.com> wrote:
> Hi guys,
>
> maybe you can give some insight?  Thanks very much
>
> Angel
>
> ---------- Forwarded message ----------
> From: Angel Todorov <at...@gmail.com>
> Date: Jul 18, 2007 10:19 AM
> Subject: [Axis2] SOAPEnvelope from an input stream / OMElement ?
> To: axis-user@ws.apache.org
>
> 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: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org