Hi Chinthaka, Thank you for the quick answer. So if I got it right: the Axis2 framework inspects the service class (via reflection?), if the service class provides a setOperationContext(OperationContext opContext) method. Are there any other operation which can be 'magically' called ?
>From a design perspective this looks a bit awkward, because there is no >interface which mandates that my service class has to implement the >corresponding method(s). Instead the contract between my class and Axis2 is >done implicitly and I have to mention it at least at 'JavaDoc level' otherwise >nobody of my developers whould know. I would rather like to see an approach >similar as in Axis 1 (which is similar to the CORBA Current object >approach).But this is only my opinion ... ;-) Nevertheless, thanks for the hint. At least I am now able to get the SOAPHeader. Cheers, Thomas -----Ursprüngliche Nachricht----- Von: Eran Chinthaka [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 14. Juli 2006 11:53 An: axis-user@ws.apache.org Betreff: Re: How to access the SOAPHeader First get access to the message context within the service implementation class following this (http://www.wso2.net/kb/106). Then from the message context you can get access to the soap envelope using msgCtxt.getEnvelope() -- Chinthaka Haug, Thomas wrote: > > > Hi, > > I want to access the SOAPHeader in my service implementation class. > In Axis 1 I have done soemthing like > SOAPHeader header = null; > > //extract the Header from the current SOAP Request > try { > header = (SOAPHeader) > MessageContext.getCurrentContext().getRequestMessage().getSOAPEnvelope().getHeader(); > > } > catch (SOAPException e) { > //do what ever > } > Is there a similar mechanism in Axis2. I have not found a glue so far. > Thanks, > Thomas > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]