users@jax-rpc.java.net

Adding SOAPHeader children from a NodeList

From: Karr, David <David.Karr_at_wamu.net>
Date: Thu, 04 Dec 2003 13:49:07 -0800

I'm trying to construct a SOAPMessage from a message that is
"soap-like". It has a "header" element and a "body" element, but it
doesn't quite match the SOAP 1.1 schema, so I can't create a SOAPMessage
directly from it.

So, I need to create an empty SOAPMessage and then add pieces to it.
I'm trying to figure out the easiest way to get some of this done. It
appears that I have to take the SOAPHeader object obtained from the
SOAPMessage and use the "addChildElement(SOAPElement)" method from the
SOAPElement base class. It appears that I can't create SOAPElement
objects directly, I have to use the "SOAPFactory.createElement()"
method. This has overloaded versions of "(name)", "(localName)", and
"(localName, prefix, uri)".

It appears that I have to create a SOAPElement using a particular name
(copied from the original), and then manually add the content of that
element.

Isn't there an easier way to do this?

---------------------------------------------------------------------
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