Can you try to just deploy the CXF endpoint in the JBOSS? Maybe you can find some clues form CXF wiki [1] and searching on CXF user-list[2] and
[1] http://cwiki.apache.org/CXF20DOC/appserverguide.html [2] http://www.nabble.com/CXF-f16913.html BTW, Can you tell me which JBOSS version are you using? Willem. -----Original Message----- From: Jiorgos Miskakis [mailto:[EMAIL PROTECTED] Sent: Mon 12/3/2007 21:38 To: [email protected] Subject: Re: Camel and CXF O/H Jiang, Ning (Willem) ??????: > Hi, > > To be honest , I didn't write any camel MBean , so I can't give you more > advise here. > But if you have any issue related camel-cxf component, > please ask here or in camel mail list, since I am the writer of that > component, > I will try my best to give you the answer. > > Willem > > > -----Original Message----- > From: Jiorgos Miskakis [mailto:[EMAIL PROTECTED] > Sent: Mon 12/3/2007 20:41 > To: [email protected] > Subject: Re: Camel and CXF > > O/H Jiang, Ning (Willem) ??????: > > FYI The new found cxf-camel issue are Camel-243 and Camel-247. > > Willem. > > -----Original Message----- > From: Jiorgos Miskakis [mailto:[EMAIL PROTECTED] > Sent: Mon 12/3/2007 20:20 > To: [email protected] > Subject: Re: Camel and CXF > > O/H Jiang, Ning (Willem) ??????: > > > Hi, > > What's the camel version are you using? > If you are using camel 1.2.0 , > please try the latest 1.3 snapshot since we fixed several > camel-cxf relate bugs here. > > Willem. > > -----Original Message----- > From: Jiorgos Miskakis [mailto:[EMAIL PROTECTED] > Sent: Mon 12/3/2007 18:44 > To: [email protected] > Subject: Camel and CXF > > Hello everybody, > I'm trying to deploy Camel as a sar in JBoss in order to route > any CXF > messages to a specific endpoint (in my case later will be ejb). > This is the code which i used from the CXF examples but I'm > still > missing something: Any ideas? > > public class Camel extends ServiceMBeanSupport implements > CamelMBean { > /** > * Logger for this class > */ > private static final Logger logger = > Logger.getLogger(Camel.class); > > private static final String ROUTER_ADDRESS = > "http://localhost:8080/WSImplPort" > <http://localhost:8080/WSImplPort> ; > private static final String SERVICE_CLASS = > "serviceClass=impl.WSImplPortType"; > private static final String WSDL_LOCATION = > "wsdlURL=wsdl/mywsdl.wsdl"; > private static final String SERVICE_NAME = > "serviceName=%7bhttp://impl%7dWSImplService"; > private static final String SOAP_OVER_HTTP_ROUTER = > "portName=%7bhttp://impl%7dSoapOverHttpRouter"; > > private static String ROUTER_ENDPOINT_URI = "cxf://" + > ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&" > + > WSDL_LOCATION + "&" > + SERVICE_NAME + "&" + SOAP_OVER_HTTP_ROUTER + > "&dataFormat=POJO"; > > protected void createService() throws Exception { > super.createService(); > logger.warn("creatingService Camel"); > } > > protected void startService() throws Exception { > logger.info("startService Camel"); > super.startService(); > } > > public void create() throws Exception { > super.create(); > logger.warn("creating Camel"); > startCamelService(); > } > > public void start() throws Exception { > logger.warn("starting Camel"); > super.start(); > } > > public void stop() { > super.stop(); > } > > public void startCamelService() throws Exception { > logger.info("startCamelService"); > MyRouteBuilder builder = new MyRouteBuilder(); > builder.configure(); > } > > public class MyRouteBuilder extends RouteBuilder { > > public void configure(){ > from(ROUTER_ENDPOINT_URI).process(new Processor() { > public void process(Exchange exchange) { > logger.info("exchange!!!: "+exchange); > > } > }).to("mock:result"); > } > } > > } > > > > > The Camel Version that I'm using is the 1.2.0. > > > > Ok, thanks, > i'm just checking out from the SVN trunk the new version. Would it be > possible to have an example of Mbean integration of Camel in an Mbean server? > Is the approach that i'm following fine? > > > > Ok, thanks. I did the deployment of the MBean and now i'm getting: 14:31:31,640 INFO [Camel] startCamelService 14:31:31,640 ERROR [STDERR] 3 ??? 2007 2:31:31 ?? org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://impl.mydomain.com}WSImplService from WSDL: wsdl/mywsdl.wsdl 14:31:31,640 ERROR [[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception javax.management.RuntimeErrorException at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:178) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258) at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100) at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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.jav at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IncompatibleClassChangeError at org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLServiceBuilder.java:126) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:230) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:159) at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBea at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryB at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:146) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89) at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:107) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:147) at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:92) at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:79) at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:67) at org.apache.camel.Route.getServicesForRoute(Route.java:72) at org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:466) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:442) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:51) at camel.Camel.startCamelContext(Camel.java:115) at camel.Camel.setUp(Camel.java:96) at Camel.startCamelService(Camel.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) ... 30 more
