Hi ,
In the client side

getCurrentMessageContext()

does not work , you can get the current operation context from the
service client and from that you can get either in or out message context.
Thanks
Deepal
shirene wrote:
> i try this:
> org.apache.axiom.soap.SOAPHeader header =
> org.apache.axis2.context.MessageContext
>                                        
> .getCurrentMessageContext().getEnvelope().getHeader(); 
>
> but i got this error:-
> "the getCurrentMessageContext() id undefined for MessageContext"
>
> all the static function in MessageContext is not able to access. Do you have
> any idea? :(
>
>
>
> shirene wrote:
>   
>> 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.
>>>
>>>       
>>     
>
>   

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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

Reply via email to