Did you see my response?
http://marc.theaimsgroup.com/?l=soap-user&m=103772521700552&w=2

Scott Nichol

----- Original Message -----
From: "Cyril Vidal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 3:42 AM
Subject: Re: SOAP Apache 2.2 and header blocks.


Hi,

I'm sorry to ask this question again. But I just would like to know if
SOAP Apache is
 supporting insertion of block headers into the envelope.
I think I've done the right things in my code: first create a Header and
populate it with a Vector, then attach it to the envelope via the
instruction envelope.setHeader(header), but I can't check it.

Thanks a lot for your response,
Regards,
Cyril.
_______________________________

Cyril Vidal
Email: [EMAIL PROTECTED]
Web: http://www.planetexml.com
  ----- Original Message -----
  From: Cyril Vidal
  To: [EMAIL PROTECTED]
  Sent: Tuesday, November 19, 2002 12:01 PM
  Subject: SOAP Apache 2.2 and header blocks.


  Hi,



  I have problem to set a Header into a SOAP Message with Apache SOAP
2.2

  Here's the code to add a header to my message, but unfortunately, it
doesn't seem to work.

  When I look at the message by example through TunnelGui, I can't see
my header.

  Does Apache support the Header blocks or not?

  Thanks a lot for your help,

  Regards,

  Cyril.



  // create a vector for collecting the header elements

  Vector headerElements = new Vector();

  // Create a header element in a namespace

  org.w3c.dom.Element headerElement =

  doc.createElementNS(URI,"jaws:MessageHeader");

  headerElement.setAttributeNS(URI,"SOAP-ENV:mustUnderstand","1");

  // Create subnodes within the MessageHeader

  org.w3c.dom.Element ele = doc.createElement("From");

  org.w3c.dom.Text textNode = doc.createTextNode("Me");

  org.w3c.dom.Node tempNode = ele.appendChild(textNode);

  tempNode = headerElement.appendChild(ele);

  ele = doc.createElement("To");

  textNode = doc.createTextNode("You");

  tempNode = ele.appendChild(textNode);

  tempNode = headerElement.appendChild(ele);

  ele = doc.createElement("MessageId");

  textNode = doc.createTextNode("9999");

  tempNode = ele.appendChild(textNode);

  tempNode = headerElement.appendChild(ele);

  headerElements.add(headerElement);

  //Create the SOAP envelope

  org.apache.soap.Envelope envelope = new org.apache.soap.Envelope();

  //Add the SOAP header element to the envelope

  org.apache.soap.Header header = new org.apache.soap.Header();

  header.setHeaderEntries(headerElements);

  envelope.setHeader(header);

  _______________________________

  Cyril Vidal
  Email: [EMAIL PROTECTED]
  Web: http://www.planetexml.com


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

Reply via email to