3

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" 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>

Error:

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

I get this error consistently while creating proxy-service in mule with the wsdl being referenced from the classpath

Andrew Stubbs
  • 4,322
  • 3
  • 29
  • 48
shrinathM
  • 362
  • 3
  • 22

2 Answers2

0

It seems like you don't have correct imports for spring. If you are not sure about the correct namespace and location, simply remove the cxf component from the flow and then add it again. By doing this way, it will add/import the correct schema's.

Hope this helps.

Anil Kumar
  • 68
  • 1
  • 1
  • 6
0

This issue seems to be caused by using the CXF processor in proxy-service mode. Apparently this mode can't use/set any Service Class model. So simply leave the Service Class field blank.

Yuri
  • 4,254
  • 1
  • 29
  • 46