CXF amp; Camel : IllegalArgumentException: Get the wrong parameter size to invoke the out service(CXFamp;Camel:IllegalArgumentException:获取错误的参数大小以调用 out 服务)
问题描述
我最近在尝试将 XML 传递给 apache Camel 中的 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 数据格式)需要一个列表.如果不是这种情况,它会解析字符串并将逗号解释为列表分隔符.
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&Camel:IllegalArgumentException:获取错误的参数大小以调用 out 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:CXF&Camel:IllegalArgumentException:获取错误的参数大小以调用 out 服务


基础教程推荐
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 降序排序:Java Map 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01