0 Replies Latest reply on May 5, 2016 11:06 AM by santhosh kumar bhogi

    how to get "soapMessage" object from camel exchange

    santhosh kumar bhogi Newbie

      Hi All,


      i tried to get the soapMessage object from camel exchange route. i have below statement to get the soapMessage object but facing null-pointerExcpetions on "soapHeader, soapEnvelope & soapBody".


      (javax.xml.soap.SOAPMessage) soapMessage = (javax.xml.soap.SOAPMessage) exchange.getIn().getBody(List.class).get(0);

               SOAPPart sp = soapMessage.getSOAPPart();

               SOAPEnvelope se = sp.getEnvelope();

               SOAPBody sb = se.getBody();


      It returns soapMessage object as "com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl"


      i am using jboss-EAP6.4 server, Kindly help me.



      Santhosh Kumar