Hello Jon,

Thank you so much for your reply - I am using JMS and the envelope XML part
is also generated by XMlBeans.

<header> ... </header>
<body>  [[CDATA ...  </body>

The document above is generated with the setBody(Strong someXML.).

But the document escapes the XML  markup   " < "  , "</", etc.

I will check to see if it works,

Thank you again for your reply.

Harring.

On 6/19/07, Baker, Jon <[EMAIL PROTECTED]> wrote:

I am not sure how your web service is implemented. Maybe this will
help.

I am using the SAAJ api. In my case the soap body simply contains a
complete xml document that is written against a preexisting schema. I
create the document using the XmlBeans code I complied against my
preexisting schema. I then add the document to the SOAPBody using the
SAAJ api and the XmlBeans getDomNode() method to get the root node of
my document. Here is the code I am using:

// get the SOAPBody and add the result xbean document.
SOAPMessage message = messageFactory.createMessage();
SOAPBody body = message.getSOAPBody();
Node node = xbeanDoc.getXXX().getDomNode(); // where XXX is the rot
element name
Document doc = node.getOwnerDocument();
bodyElement = body.addDocument(doc);

Hope that helps,

Jon

============================================
Jonathan O. Baker
The MITRE Corporation
Email: [EMAIL PROTECTED]


>-----Original Message-----
>From: Harring Figueiredo [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 19, 2007 11:51 AM
>To: user@xmlbeans.apache.org
>Subject: Writing the XML Object to a SOAP envelope.
>
>
>Hello All,
>
>How can I write the XML document to the envelope of another
>XML (say Soap) as the body content?
>
>If I do an  object.toString(), the XML is not escaped.
>
>Thank you for any help.
>
>harringf
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to