Didn't you see: public void addSOAPHeader(QName soapHeaderQName, String soapHeaderText) and public void addSOAPHeader(OMElement soapHeaderBlock) in MEPClient, which MessageSender should inherit.
How can Axis2 be a powerfull SOAP Processor, if the user is not allowed to add headers to the SOAP message ;-) HTH. Chinthaka Andreas Bobek wrote: >Hi, > >I need a way to add SOAP headers (other than addressing headers) within >MessageSender. Up to now it is not possible, since SOAP headers should >be set in MessageContext, but MessageContext is created not until the >message is sent (prepareTheSOAPEnvelope() which creates the context is >called inside send() in MessageSender). >As a workaround I could inherit from MessageSender and overwrite >prepareTheSOAPEnvelope() with a MessageContext that I create in >advance. > ergg .... I don't like that approach. prepareSOAPEnvelope is not meant for overriding (I should have made that final :-\ ) Chinthaka >Or is there another approach? > >Thank you. >Andreas Bobek. > > >
