how to get msgContext? do u hv any sample to share?

Jack Sprat wrote:
> 
> Try the following to access the SOAP header:
> 
> SOAPEnvelope env = msgContext.getEnvelope();
> 
> Regards,
> T
> 
> 
> shirene <[EMAIL PROTECTED]> wrote: 
> Hi,
> Did anyone can help me on how to retrieve the soap header in axis2? 
> Below is my service.xml file details:
> 
> 
>     
> 
> locked="false">ReceiverService
> 
>     
>      
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>          urn:soapRec
>     
> 
> 
> if i use OMElement  as incoming parameter, my web service is working but i
> not able to retrieve the soap header.
> public OMElement soapRec(OMElement element) {}
> 
> In order to retrieve the soap header, i change the function to below
> method:-
> public void soapRec(SOAPEnvelope req, SOAPEnvelope resp){}
> 
> but i get this error when i call the web service:-
> 
> 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> />soapenv:ClientRaw
> Xml provider supports only the methods bearing the signature public
> OMElement &lt;method-name&gt;(OMElement) where the method name can
> be anythingorg.apache.axis2.AxisFault: Raw
> Xml provider supports only the methods bearing the signature public
> OMElement &lt;method-name&gt;(OMElement) where the method name can
> be anything 
>  at
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:95)
>  
>  at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
>  
>  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) 
>  at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
>  
>  at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) 
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) 
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>  
> 
> 
> Is that cos by the invalid "messageReceiver" type? if yes, what shld i
> change it to? 
> 
> 
> 
> 
> 
> 
> 
>        
> ---------------------------------
> Choose the right car based on your needs.  Check out Yahoo! Autos new Car
> Finder tool.
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-SOAP-Header-in-Axis2-tf3900058.html#a11071500
Sent from the Axis - User mailing list archive at Nabble.com.


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

Reply via email to