1 Reply Latest reply on Jun 18, 2007 4:41 PM by Thomas Diesler

    jbossws 1.2.1 /jboss 4.0.5  : how do i  bypass MessageFactor

    Ashwin Iyer Newbie

      Hi ,
      I have been encountering the following exception over the last couple of days .
      I am aware that the reason for this issue is because of using a different SOAPFactory class, while jboss expects org.jboss.ws.core.soap.SOAPEnvelopeImpl.

      I am trying to run oracle's bpel process on jboss , and the bpel engine needs it's own implementation of SOAPElement/SOAPFactory to process Webservice calls - when i try sending Jboss's SOAPElement , the bpel process fails without any error message

      Is it possible for me to by pass Jboss' MessageFactory/SOAPFactory classes by setting some classloader hierarchy



      java.lang.ClassCastException: oracle.j2ee.ws.saaj.soap.soap11.Element11
      at org.jboss.ws.core.soap.SOAPEnvelopeImpl.(SOAPEnvelopeImpl.java:59)
      at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:116)
      at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:85)
      at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:254)
      at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:179)
      at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:197)
      at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
      at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)


      Thanks,
      Swami

        • 1. Re: jbossws 1.2.1 /jboss 4.0.5  : how do i  bypass MessageFa
          Thomas Diesler Master

           

          /**
           * Load a factory using this ordered lookup procedure
           *
           * <ol>
           * <li>Use the system property
           * <li>Use the properties file "lib/jaxm.properties" in the JRE directory
           * <li>Use the Services API (as detailed in the JAR specification), if available, to determine the classname
           * <li>Use the default factory implementation class
           * </ol>
           *
           * @author Thomas.Diesler@jboss.com
           * @since 14-Dec-2006
           */
          public class SAAJFactoryLoader
          


          Step 3, the Services API uses a classloader. You should probably be able to set the context classloader such that it gives access to the SAAJ impl that you want.

          Please note, JBossWS will only work with its own SAAJ impl.

          Please use the jbossws-2.0 code base