camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Re: Cxf:cxfendpoint & OSGI reference
Date Mon, 08 Dec 2008 13:05:19 GMT

Hi,

Unfortunately, this option does not work. Spring warns me that it cannot
find the class :

[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'reportIncidentEndpoint': Initialization of bean
failed; nested exception is org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [java.lang.String] to required type
[java.lang.Class[]] for property 'interfaces'; nested exception is
java.lang.IllegalArgumentException: Cannot find class
[org.apache.camel.example.reportincident.ReportIncidentService]
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at java.security.AccessController.doPrivileged(Native Method)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
[2008-12-08 13:58:11.963] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
[2008-12-08 13:58:11.978] async-delivery-thread-1                                        
              
System.err E 	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)



Claus Ibsen-2 wrote:
> 
> Hi
> 
> Can you use the # notation for the serivceClass?
>      serviceClass="#myServiceToBeLookedUpInRegistry"
> 
> 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 
> 
> 
> On Mon, Dec 8, 2008 at 12:01 PM, cmoulliard <cmoulliard@gmail.com> wrote:
>>
>> Hi,
>>
>> Is there a way to inject from an OSGI reference the service to be used to
>> process the webservice in cxf:cxfendpoint of Camel ?
>>
>> ex :
>>
>> Using the following syntax, it is possible to inject the OSGI bundle
>> service
>> to the jaws:endpoint of cxf
>>
>>  <osgi:reference id="reportIncidentEndpoint"
>> interface="org.apache.camel.example.reportincident.ReportIncidentService"/>
>>
>> <!-- export the webservice using jaxws -->
>> <jaxws:endpoint id="reportIncident"
>> implementor="#reportIncidentEndpoint"
>> address="/incident"
>> wsdlLocation="/WEB-INF/wsdl/report_incident.xml"
>> endpointName="s:ReportIncidentPort"
>> serviceName="s:ReportIncidentService"
>> xmlns:s="http://reportincident.example.camel.apache.org"/>
>>
>> but with cxf:cxfendpoint, I don't think so ?
>>
>>    <cxf:cxfEndpoint id="reportIncident" address="/incident"
>> wsdlURL="/WEB-INF/wsdl/report_incident.xml"
>>
>> serviceClass="org.apache.camel.example.reportincident.ReportIncidentImpl"
>>                     endpointName="s:ReportIncidentPort"
>>                     serviceName="s:ReportIncidentService"
>>
>> xmlns:s="http://reportincident.example.camel.apache.org"
>>        />
>>
>> With cxf:cxfendpoint, the serviceClass is hardcoded and it is not
>> possible
>> to provide a bean reference.
>>
>> KR,
>>
>> Charles Moulliard
>>
>>
>>
>> -----
>> Enterprise Architect
>>
>> Xpectis
>> 12, route d'Esch
>> L-1470 Luxembourg
>>
>> Phone +352 25 10 70 470
>> Mobile +352 621 45 36 22
>>
>> e-mail : cmoulliard@xpectis.com
>> web site :  www.xpectis.com www.xpectis.com
>> My Blog :  http://cmoulliard.blogspot.com/
>> http://cmoulliard.blogspot.com/
>> --
>> View this message in context:
>> http://www.nabble.com/Cxf%3Acxfendpoint---OSGI-reference-tp20893288s22882p20893288.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 


-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : cmoulliard@xpectis.com
web site :  www.xpectis.com www.xpectis.com 
My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Cxf%3Acxfendpoint---OSGI-reference-tp20893288s22882p20894940.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message