Java Anypoint Mule Studio 3.5:org.springframework.beans.NotWritablePropertyException在使用代理服务时
My mule.xml:Java Anypoint Mule Studio 3.5:org.springframework.beans.NotWritablePropertyException在使用代理服务时,java,spring,mule-studio,mule-component,Java,Spring,Mule Studio,Mule Component,My mule.xml: <?xml version="1.0" encoding="UTF-8"?> <mule namespaces..> <flow name="smsFlow1" doc:name="smsFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" path="send" do
<?xml version="1.0" encoding="UTF-8"?>
<mule namespaces..>
<flow name="smsFlow1" doc:name="smsFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" path="send" doc:name="HTTP"/>
<cxf:proxy-service payload="body" doc:name="CXF" serviceClass="com.sample.service.doService_Service" soapVersion="1.2"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
我在mule中创建代理服务时一直遇到这个错误,wsdl是从类路径引用的。看起来spring没有正确的导入。如果您不确定正确的名称空间和位置,只需从流中删除cxf组件,然后再次添加它。通过这种方式,它将添加/导入正确的模式
希望这有帮助。此问题似乎是在代理服务模式下使用CXF处理器造成的。显然,此模式不能使用/设置任何服务类模型。因此,只需将服务类字段留空。请注意,即使在3.9.0中也存在此问题。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'serviceClass' of bean class [org.mule.module.cxf.config.ProxyServiceFactoryBean]: Bean property 'serviceClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1427)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
... 45 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'serviceClass' of bean class [org.mule.module.cxf.config.ProxyServiceFactoryBean]: Bean property 'serviceClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1424)
... 49 more