If the starting stream you've got represents a SOAP message then you can
directly get the SOAPElement using the
javax.xml.soap.MessageFactory.createMessage(headers, stream) method [
OR, MessageFactory.createMessage() followed by a
setContent(streamsource) on the SOAPPart ]. The saaj-ri implementation
internally builts the SOAP tree using a SAX parser.
Vishal
Sels Wannes wrote:
> Hi,
>
>
>
> I'm using a 3^rd party api that constructs an xml document by using
> SAX. To get that result in a SOAPElement I'm using a built in
> serializer which outputs a String, which I convert to a DOM document
> and putting that in the SOAPElement.
>
>
>
> I was wondering if it is possible to remove this overhead and directly
> build the SOAPElement using SAX?
>
>
>
> Kind Regards,
>
>
>
> Wannes Sels
>
>
>