Adding attachments to SOAPMessage fails when writing to outputstream

From: Karr, David <>
Date: Mon, 08 Dec 2003 13:33:06 -0800

I'm now trying to add attachments to my SOAPMessage. We have a
requirement that the "header" of our original non-SOAP message needs to
be stored as an attachment to the SOAPMessage (what a "header" is is
defined by the message type).

So, I did something like this:


Where "headerElem" is an "Element" object. I have a feeling I need to
translate that to a String first. If so, what's the most
straightforward way of converting that directly to a String?

After building this and then trying to write the result to an output
stream, I get the following exception:

Unable to run the JAXP transformer on a stream null

To unsubscribe, e-mail:
For additional commands, e-mail: