Anypoint Mule Studio 3.5: org.springframework.beans.NotWritablePropertyException при использовании службы прокси

Мой мул.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" 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>

Ошибка:

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

Я постоянно получаю эту ошибку при создании прокси-сервиса в муле с ссылкой на wsdl из пути к классам


person shrinathM    schedule 10.07.2014    source источник
comment
Просто примечание, эта проблема присутствует даже в 3.9.0.   -  person Yuri    schedule 08.02.2018


Ответы (2)


Кажется, у вас нет правильного импорта для весны. Если вы не уверены в правильности пространства имен и местоположения, просто удалите компонент cxf из потока, а затем добавьте его снова. Поступая таким образом, он добавит/импортирует правильную схему.

Надеюсь это поможет.

person Anil Kumar    schedule 06.07.2016

Эта проблема, по-видимому, вызвана использованием процессора CXF в режиме proxy-service. По-видимому, этот режим не может использовать/устанавливать какую-либо модель Service Class. Поэтому просто оставьте поле Класс обслуживания пустым.

person Yuri    schedule 08.02.2018