Adam � 

Yes, you are correct:

call.addHeader(new SOAPHeaderElement(namespace,"conversationId",value));

Note, the header defined is a complex type, so you have to next
<conversationId> inside <StartHeader>, then add <StartHeader> to the
Call object.

For instance:

        // <StartHeader xmlns="http://openuri.org/soap/conversation/";>
        SOAPHeaderElement oEl = null;


try {
oEl = new
SOAPHeaderElement("http://openuri.org/soap/conversation/","StartHeader";,
null);
oEl.addChildElement(new SOAPHeaderElement(null,"conversationID","151"));
oEl.addChildElement(new
SOAPHeaderElement(null,"defaultCallbackLocation","http://localhost:8081/
axis/services/StateHeader"));
      }
        catch (javax.xml.soap.SOAPException e) {
              e.printStackTrace();
              throw new java.rmi.RemoteException();
      }
        call.addHeader(oEl);


If you get the Axis/BEA conversation glue working, I�d love to see the
sample code posted.....  I had issues getting it to work because Axis
appends a default namespace, and BEA expects no namespace prefix. 

Is there any way to turn off the namespace prefixing when Axis generates
XML???

/Chris

-----Original Message-----
From: Adam Greene [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 5:59 PM
To: [EMAIL PROTECTED]
Subject: How do I add stuff to the headers

I need to be able to add a value to the SOAP header called
conversationID, so that I can get BEA to work with Apache AXIS, but I
cannot figure out how to do that.� What must I do, I figure it has
something to do with the addHeader method on the Call.


Reply via email to