camel自带的例子:camel-example-cxf-tomcat
运行OK。
但是把WebService接口方法的返回值由对象改为List,
当然,实现中也调整为返回List。
但执行错误:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.apache.camel.example.cxf.incident.OutputReportIncident cannot be cast to java.util.List
同样的,含有List返回值的WebService,如果使用CXF发布和实现,执行正常。
<jaxws:endpoint id="foo" implementorClass="my.FooImpl" address="/foo" />
但是调整为camel发布的方式:
<bean id="fooImpl" class="my.FooImpl"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:/foo?serviceClass=my.IFoo"/>
<to uri="bean:fooImpl"/>
</route>
</camelContext>
就会出现cannot be cast to java.util.List的错误。
如果把List返回方式改为普通对象,就执行正常。
有人帮看一下吗?
多谢!