CXF & Camel : IllegalArgumentException: 获取错误的参数大小以调用 out 服务



我最近在尝试将XML传递给apache Camel中的Cxf Webservice时遇到了这个问题。

    Caused by: java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 1, Parameter size 2. Please check if the message body matches the CXFEndpoint POJO Dataformat request.
    at org.apache.camel.component.cxf.CxfProducer.checkParameterSize(CxfProducer.java:241)

其中一个XML标签包含一个逗号,这似乎是问题所在。

结果是,我在交换体中将XML作为字符串传递。但是CxfProducer(在POJO数据格式中)需要一个List。如果不是这种情况,则解析字符串,并将逗号解释为列表分隔符。

我希望它也能帮助到别人!

最新更新