users@jax-rpc.java.net

RE: Adding attachments to SOAPMessage fails when writing to outputstream

From: Karr, David <david.karr_at_wamu.net>
Date: Mon, 08 Dec 2003 14:47:25 -0800

I resolved this. I tried wrapping my element with a "DOMSource" object.
That appears to work.

-----Original Message-----
From: Karr, David
Sent: Monday, December 08, 2003 1:33 PM
To: users_at_jax-rpc.dev.java.net
Subject: Adding attachments to SOAPMessage fails when writing to
outputstream


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:

        soapMessage.
            addAttachmentPart(result.createAttachmentPart(headerElem,
                                                          "text/xml"));

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: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net