Hi,
Did anyone can help me on how to retrieve the soap header in axis2? 
Below is my service.xml file details:

<service name="TestService" style="message">
    <parameter name="ServiceClass"
locked="false">ReceiverService</parameter>
    <operation name="soapRec">
        <messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
         <actionMapping>urn:soapRec</actionMapping>
    </operation>
</service>

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:-

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header
/><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Raw
Xml provider supports only the methods bearing the signature public
OMElement &amp;lt;method-name&amp;gt;(OMElement) where the method name can
be anything</faultstring><detail><Exception>org.apache.axis2.AxisFault: Raw
Xml provider supports only the methods bearing the signature public
OMElement &amp;lt;method-name&amp;gt;(OMElement) where the method name can
be anything&#13;
        at
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:95)&#13;
        at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)&#13;
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)&#13;
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)&#13;
        at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)&#13;
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)&#13;
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)&#13;
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)&#13;


Is that cos by the invalid "messageReceiver" type? if yes, what shld i
change it to? 






-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-SOAP-Header-in-Axis2-tf3900058.html#a11056343
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