[Axis2-0.94] add SOAP header at server-side

2006-02-27 Thread Andreas Bobek
Hi,

I have a service with a in-out operation which is treated by
RawXMLINOutMessageReceiver.
I want to add a SOAP header in the response envelope, but
RawXMLINOutMessageReceiver calls the operation method
(signature: public OMElement operationName(OMElement body)) inside
invokeBusinessLogic() first, and afterwards it creates a new SOAP envelope
for the new message context. So I cannot access
newMsgCtxt.getEnvelope.getHeader.addChild... inside my operation handler
method.

How can I add a SOAP header at server-side?
Thanks, Andreas Bobek.




Re: [Axis2-0.94] add SOAP header at server-side

2006-02-27 Thread Chathura Herath
Hi,
The Axis2 programming model does not anticipate you to manipulate SOAP
headers in the web service implementation(i.e. inside your operation)
Header manipulation is normally done in the handler chain(INFLOW or
OUTFLOW) using Axis2 handlers. In this case i believe you need to
write an handler and add it to the OUTFLOW and deploy it as a module.
Have a look at the logging module example here.
http://ws.apache.org/axis2/0_94/userguide4.html

Engine will pass a message context to the Axis2 Handler's invoke
method, where you could do what you want.

HTH
Chathura


On 2/27/06, Andreas Bobek [EMAIL PROTECTED] wrote:
 Hi,

 I have a service with a in-out operation which is treated by
 RawXMLINOutMessageReceiver.
 I want to add a SOAP header in the response envelope, but
 RawXMLINOutMessageReceiver calls the operation method
 (signature: public OMElement operationName(OMElement body)) inside
 invokeBusinessLogic() first, and afterwards it creates a new SOAP envelope
 for the new message context. So I cannot access
 newMsgCtxt.getEnvelope.getHeader.addChild... inside my operation handler
 method.

 How can I add a SOAP header at server-side?
 Thanks, Andreas Bobek.





--
Chathura Herath
http://chathurah.blogspot.com/


AW: [Axis2-0.94] add SOAP header at server-side

2006-02-27 Thread Andreas Bobek
Ok, I'll do it this way.

Thank you, Andreas.

 
 Hi,
 The Axis2 programming model does not anticipate you to 
 manipulate SOAP headers in the web service 
 implementation(i.e. inside your operation) Header 
 manipulation is normally done in the handler chain(INFLOW or
 OUTFLOW) using Axis2 handlers. In this case i believe you 
 need to write an handler and add it to the OUTFLOW and deploy 
 it as a module.
 Have a look at the logging module example here.
 http://ws.apache.org/axis2/0_94/userguide4.html
 
 Engine will pass a message context to the Axis2 Handler's 
 invoke method, where you could do what you want.
 
 HTH
 Chathura
 
 
 On 2/27/06, Andreas Bobek [EMAIL PROTECTED] wrote:
  Hi,
 
  I have a service with a in-out operation which is treated by 
  RawXMLINOutMessageReceiver.
  I want to add a SOAP header in the response envelope, but 
  RawXMLINOutMessageReceiver calls the operation method
  (signature: public OMElement operationName(OMElement body)) inside
  invokeBusinessLogic() first, and afterwards it creates a new SOAP 
  envelope for the new message context. So I cannot access 
  newMsgCtxt.getEnvelope.getHeader.addChild... inside my operation 
  handler method.
 
  How can I add a SOAP header at server-side?
  Thanks, Andreas Bobek.
 
 
 
 
 
 --
 Chathura Herath
 http://chathurah.blogspot.com/