CXF&安培;骆驼:抛出:IllegalArgumentException:得到错误的参数大小来调用出服务 [英] CXF & Camel : IllegalArgumentException: Get the wrong parameter size to invoke the out service
本文介绍了CXF&安培;骆驼:抛出:IllegalArgumentException:得到错误的参数大小来调用出服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近遇到这个问题试图将XML传递给Apache的骆驼内CXF WebService时,来了。
I recently came across this issue when trying to pass an XML to a Cxf Webservice within apache Camel.
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标记的包含逗号,这似乎是问题。
One of the XML tags included a comma, which seems to be the issue.
推荐答案
事实证明,我经过XML作为交换的身体的字符串。但CxfProducer(在POJO数据格式)需要一个列表。如果不是它解析字符串的情况和逗号间得到preTED作为列表分隔符。
As it turned out, I was passing the XML as a string in the body of the exchange. But the CxfProducer (in the POJO data format) expects a List. If it's not the case it parses the String and the comma gets interpreted as a list separator.
我希望这会帮助别人的!
I hope it will help someone else as well!
这篇关于CXF&安培;骆驼:抛出:IllegalArgumentException:得到错误的参数大小来调用出服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文