users@jax-rpc.java.net

Add Header tp SOAP with SOAPElement API

From: <yawningrascal_at_HOTMAIL.COM>
Date: Wed, 19 Jun 2002 04:54:15 -0600

Hi,

I created a JAX-RPC Service and now I want to add Metadata to the SOAP Header
concerning digital signatures. For that reason I created a SOAPMessageHandler
to intercept the SOAP Message. At this point I want to use the SOAPElement API to add my own header to the Message. First I inspected the SOAP Message
with a TCP/IP Tool and were no headers in my SOAP Requests. (How can I force
JAX-RPC to add an empty standard header to a soap message?). So I tried the following with my handler:

Name nsSignature = se.createName("Signature","ds","http://www.w3.org/2000/09/xmldsig");

se.getHeader().detachNode();
SOAPHeader sh = se.addHeader();
sh.addHeaderElement(nsSignature);

Unfortunately no header appeared in the soap message.
Anyone out there who knows how this could work?
Thanx, Mischa