2 Replies Latest reply on May 7, 2014 10:15 AM by arnaud antoine

    java.lang.ClassNotFoundException: org.apache.cxf.jaxws.context.WrappedMessageContext

    arnaud antoine Newbie

      Hi everybody. I m migrating all my webservice from Jboss Eap 5.1 to Jboss Eap 6.1.

      I would like to get the soap message. With Jboss EAP 5.1 i used to do this :


      import javax.xml.soap.SOAPMessage;

      import javax.xml.ws.WebServiceContext;

      import javax.xml.ws.handler.soap.SOAPMessageContext;


          WebServiceContext wsContext;


      SOAPMessageContext context = (SOAPMessageContext) wsContext    .getMessageContext();
         SOAPMessage message = context.getMessage();
         ByteArrayOutputStream out = new ByteArrayOutputStream();

      String strMsg = "";


                  strMsg = new String(out.toByteArray());


      This is not working anymore in Jboss EAP 6.1. If i understood good, it s because in Jboss EAP 5.1 it s Axis Framework and on Jboss EAP 6.1 it's Cxf Framework


      I looked aroud and i tried this :


      import javax.xml.ws.WebServiceContext;

      import javax.xml.ws.handler.MessageContext;

      import javax.xml.ws.handler.soap.SOAPMessageContext;

      import org.apache.cxf.jaxws.context.WrappedMessageContext;

      import org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl;

      import org.apache.cxf.message.Message;


          WebServiceContext wsContext;


         MessageContext ctx = wsContext.getMessageContext();

              WrappedMessageContext wmc = (WrappedMessageContext) wsContext.getMessageContext();

              Message msg = wmc.getWrappedMessage();

              SOAPMessageContextImpl smci = new SOAPMessageContextImpl(msg);



      I put this depedency :




      and i got this message : Caused by: java.lang.NoClassDefFoundError: org/apache/cxf/jaxws/context/WrappedMessageContext


      Somebody as an idea why it's not working or how to get the soapMessage on Jboss EAP 6.1 ?


      Thanks everybody for your time

      Best regards,