Hello
Using Axis2.1.4.1, and in order to recover methods name of a web service
within a handler code, I tried to access to the SOAP message and extract
it from the SOAPBody. Then, I tried to use "SOAPBodyElement" Class
as shown below :
*****
SOAPEnvelope soapenv = messageContext.getEnvelope();
SOAPBodyElement soapb = (SOAPBodyElement) soapenv.getFirstElement();
String methodname = soapb.getLocalName();
************
but when I invoke the web service to which I engaged the module that
contains the above-mentioned handler, an exception launch :
****
org.apache.axiom.soap.impl.llom.soap12.SOAP12HeaderImpl cannot be cast
to org.apache.axiom.soap.impl.llom.SOAPBodyElement
****
and when I tried to convert "SOAPBodyElement" to "SOAPBodyImpl" it
launch the same exception but this time
****
org.apache.axiom.soap.impl.llom.soap12.SOAP12HeaderImpl cannot be cast
to org.apache.axiom.soap.impl.llom.SOAPBodyImpl
****
If you have any idea, don't hesitate to help me with, please
thanks
--
Asma MÂALEJ BESBES
Laboratoire LAAS - CNRS
Toulouse - France
Tèl: +33 (0)5 61 33 62 63
Mobile: +33 (0)6 72 18 36 56
E-mail: [email protected]