3 Replies Latest reply on Jun 6, 2008 10:19 AM by Srgjan Srepfler

    How to activate Aegis instead of JAXB databinding

    Srgjan Srepfler Newbie

      Hi,
      I've created a simple ejb3 stateless session bean and annotated it as a webservice. What I've noticed is that when deployed it uses JAXB as the default, how can I change it to Aegis?

      Thanks,
      Srgjan

        • 1. Re: How to activate Aegis instead of JAXB databinding
          Srgjan Srepfler Newbie

          Ok, I've followed the example here http://jbws.dyndns.org/mediawiki/index.php?title=Stack_CXF_User_Guide created the xml descriptor in META-INF and added this:


          <beans xmlns='http://www.springframework.org/schema/beans'
           xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans'
           xmlns:jaxws='http://cxf.apache.org/jaxws'
           xsi:schemaLocation='http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://cxf.apache.org/jaxws
           http://cxf.apache.org/schemas/jaxws.xsd'>
           <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype" />
           <bean id="jaxws-and-aegis-service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
           <property name="dataBinding" ref="aegisBean" />
           </bean>
          
          
           <!-- one or more jaxws:endpoint EJB3 declarations -->
           <jaxws:endpoint id='EJB3Endpoint' address='/BreakdownReceiverService' implementor='it.linksystem.csai.business.ejb.BreakdownReceiverServiceBean'>
           <jaxws:serviceFactory><ref bean='jaxws-and-aegis-service-factory'/></jaxws:serviceFactory>
           <jaxws:invoker>
           <bean class='org.jboss.wsf.stack.cxf.InvokerEJB3' />
           </jaxws:invoker>
           </jaxws:endpoint>
          </beans>


          When invoking http://localhost:8080/CSAIEAR-1.0-SNAPSHOT-CSAIEJB3-1.0-SNAPSHOT/BreakdownReceiverServiceBean
          I see in the logs the DefaultListableBeanFactory kicking in with defining beans [aegisBean,jaxws-and-aegis-service-factory,org.jboss.wsf.stack.cxf.InvokerEJB3,EJB3Endpoint]; root of factory hierarchy, then the ReflectionServiceFactoryBean, then
          INFO [ServerImpl] Setting the server's publish address to be /BreakdownReceiverService
          and then an error:
          01:50:59,423 ERROR [[BreakdownReceiverServiceBean]] Servlet.service() for servlet BreakdownReceiverServiceBean threw exception
          javax.servlet.ServletException: Cannot obtain destination for: /CSAIEAR-1.0-SNAPSHOT-CSAIEJB3-1.0-SNAPSHOT/BreakdownReceiverServiceBean
          at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:103)
          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:63)
          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:136)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
          at java.lang.Thread.run(Thread.java:619)

          Any ideas?

          • 2. Re: How to activate Aegis instead of JAXB databinding
            Alessio Soldano Master

            Are you using JBoss AS 5.0.0.Beta4 as target container? In this case your issue might be due to http://jira.jboss.org/jira/browse/JBWS-2174 which is solved in JBossWS-CXF release 3.0.2.

            • 3. Re: How to activate Aegis instead of JAXB databinding
              Srgjan Srepfler Newbie

               

              "alessio.soldano@jboss.com" wrote:
              Are you using JBoss AS 5.0.0.Beta4 as target container? In this case your issue might be due to http://jira.jboss.org/jira/browse/JBWS-2174 which is solved in JBossWS-CXF release 3.0.2.


              No, I'm running on JBoss 4.2.2