Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 46129 invoked from network); 26 Jan 2009 15:55:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jan 2009 15:55:24 -0000 Received: (qmail 83805 invoked by uid 500); 26 Jan 2009 15:55:24 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 83715 invoked by uid 500); 26 Jan 2009 15:55:24 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 83704 invoked by uid 500); 26 Jan 2009 15:55:24 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 83701 invoked by uid 99); 26 Jan 2009 15:55:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 07:55:24 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 15:55:22 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3E6A2234C48B for ; Mon, 26 Jan 2009 07:55:00 -0800 (PST) Message-ID: <2007158342.1232985300231.JavaMail.jira@brutus> Date: Mon, 26 Jan 2009 07:55:00 -0800 (PST) From: "Charles Moulliard (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry In-Reply-To: <1991895960.1231919459439.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48954#action_48954 ] Charles Moulliard commented on CAMEL-1254: ------------------------------------------ @Willem, I have made a test but unfortunately, the following syntax does not work if I try to deploy my WAR in a OSGI server like Spring DM remark : ReportIncidentEndpoint is the interface generated by wsdl2java. Error : [2009-01-26 16:47:29.199] async-delivery-thread-1 e.server.web.dm.ServerOsgiBundleXmlWebApplicationContext.unknown E Refresh error org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportIncidentEndpoint' defined in OSGi resource[classpath:camel-context.xml|bnd.id=84|bnd.sym=org.apache.camel.example.reportincident.web]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.camel.example.reportincident.service.ReportIncidentEndpoint]: Specified class is an interface at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:148) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:73) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:136) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at com.springsource.server.servlet.tomcat.TomcatServletContainer.addContext(TomcatServletContainer.java:948) 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:597) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy43.addContext(Unknown Source) at com.springsource.server.web.core.WebModulePersonality.deploy(WebModulePersonality.java:391) at com.springsource.server.deployer.core.module.AbstractModule.deploy(AbstractModule.java:235) at com.springsource.server.deployer.core.module.StandardModule.onStarted(StandardModule.java:572) at com.springsource.server.deployer.core.module.DeployerBundleListener$2$1.run(DeployerBundleListener.java:148) at com.springsource.server.concurrent.core.ExecutorServiceDelegate$StatisticsGatheringRunnable.run(ExecutorServiceDelegate.java:137) at com.springsource.server.concurrent.core.ServerThreadPoolExecutor$1.run(ServerThreadPoolExecutor.java:145) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) As you can see, Spring does not support to instantiate an interface in this case ? > camel-cxf: URI option for serviceClass does not support lookup in registry > -------------------------------------------------------------------------- > > Key: CAMEL-1254 > URL: https://issues.apache.org/activemq/browse/CAMEL-1254 > Project: Apache Camel > Issue Type: Improvement > Components: camel-cxf > Affects Versions: 1.5.0 > Reporter: Claus Ibsen > Assignee: William Tam > Priority: Minor > > Having an endpoint such as: > {code} > String cxfEndpoint = "cxf://http://localhost:8080/part-five/webservices/incident" > + "?serviceClass=org.apache.camel.example.reportincident.ReportIncidentEndpoint" > + "&wsdlURL=report_incident.wsdl"; > {code} > The serviceClass option currently only supports defining a FQN for the class. > I think we need to support Registry lookup as well using the # notation. So you can do: > {code} > String cxfEndpoint = "cxf://http://localhost:8080/part-five/webservices/incident" > + "?serviceClass=#reportService" > + "&wsdlURL=report_incident.wsdl"; > {code} > And then have it defined in Spring XML: > {code} > > {code} > The # notation is already supported if you use the cxf Spring XML configuration. We need this in the Java DSL as well. > Sorry if it already exists. But I got a hint from a Camel end user that it didn't -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.