CXF & Camel : IllegalArgumentException: Get the wrong parameter size to invoke the out service

爱⌒轻易说出口 提交于 2019-12-24 05:55:08

问题


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)

One of the XML tags included a comma, which seems to be the issue.


回答1:


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!



来源:https://stackoverflow.com/questions/24032319/cxf-camel-illegalargumentexception-get-the-wrong-parameter-size-to-invoke-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!