Hi Freeman,
I tried that. However, I get the following exception. Do you have any idea
what the cause could be?
16.04.2008 22:25:16 sun.reflect.NativeMethodAccessorImpl invoke0
SCHWERWIEGEND: Nested in
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'echoService': Initialization of bean failed; nested exception is
org.springframework.beans.TypeMismatchException: Failed to convert property
value of type [java.util.ArrayList] to required type [java.util.List] for
property 'features'; nested exception is java.lang.IllegalArgumentException:
Cannot convert value of type [org.apache.cxf.ws.policy.PolicyBean] to
required type [org.apache.cxf.feature.AbstractFeature] for property
'features[0]': no matching editors or conversion strategy found
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'echoService': Unsatisfied dependency expressed
through constructor argument with index 2 of type [java.lang.String]:
Ambiguous constructor argument types - did you specify the correct bean
references as constructor arguments?
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'echoService': Unsatisfied dependency expressed
through constructor argument with index 2 of type [java.lang.String]:
Ambiguous constructor argument types - did you specify the correct bean
references as constructor arguments?
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'echoService': Unsatisfied dependency expressed
through constructor argument with index 2 of type
[org.apache.cxf.jaxws.JaxWsServerFactoryBean]: Ambiguous constructor
argument types - did you specify the correct bean references as constructor
arguments?:
java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.cxf.ws.policy.PolicyBean] to required type
[org.apache.cxf.feature.AbstractFeature] for property 'features[0]': no
matching editors or conversion strategy found
at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:238)
at
org.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:432)
at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:209)
at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
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:217)
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:729)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
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.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at com.example.Server.<init>(Server.java:40)
at com.example.Server.main(Server.java:47)
Freeman Fang wrote:
>
> Hi Gerhard,
>
> I'm not expert of ws-policy, but add spring configure to jaxws:endpoint
> per as below just works for me
> <jaxws:features>
> <wsp:Policy>
> <wsrm:RMAssertion>
> <wsrm:InactivityTimeout Milliseconds="600000"/>
> <wsrm:AcknowledgementInterval Milliseconds="200" />
> </wsrm:RMAssertion>
> <wsam:Addressing>
> <wsp:Policy/>
> </wsam:Addressing>
> <mtom:OptimizedMimeSerialization />
> </wsp:Policy>
> </jaxws:features>
> Also you need add namespace definition
> xmlns:wsp="http://www.w3.org/2006/07/ws-policy"
> xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
> xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"
>
> xmlns:mtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"
>
--
View this message in context:
http://www.nabble.com/CXF%2C-WS-Policy-and-Spring-tp16718063p16732889.html
Sent from the cxf-user mailing list archive at Nabble.com.