小编lof*_*ffa的帖子

使用Java DSL的Camel CXF POJO模式

我有一个预先存在的Web服务"connect"(SOAP)我想在不使用Swing框架的情况下调用它.我已经使用cxf/wsdl2java工具跟踪了联系第一个开发生成我的java文件.

我希望从java对象中提取userName和密码,并将其放在SOAP对象中,然后发送到我的localhost Web服务上.

将Connect对象作为正文发送到"direct:start"时,我得到一个异常......

Caused by: java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 2, Parameter size 1. Please check if the message body matches the CXFEndpoint POJO Dataformat request.
Run Code Online (Sandbox Code Playgroud)

我已经检查过第一个参数实际上是传入的Connect对象的一个​​实例.

我是否需要在其中一个类中添加一些额外的注释,测试方法是无效的还是
我应该遵循的替代模式?

public class TestConnectCXF extends CamelTestSupport
{
    @Override
    protected RouteBuilder createRouteBuilder() throws Exception
    {
        return new RouteBuilder()
        {
            String cxfAddressLine = "cxf:http://localhost:8081/nuxeo/webservices/privateadservice?wsdlURL=wsdl/privateadservice.wsdl" //
                    + "&dataFormat=POJO" //
                    + "&serviceClass=com.sandbox.camelfeed.PrivateAdServiceInterface" //
                    + "&serviceName={http://ws.sandboxtest.com/}PrivateAdService" //
                    + "&synchronous=true" //
                    + "&loggingFeatureEnabled=true" //
                    + "&portName={http://ws.sandboxtest.com/}PrivateAdServiceInterfacePort";
            @Override
            public void …
Run Code Online (Sandbox Code Playgroud)

soap cxf apache-camel

7
推荐指数
1
解决办法
5083
查看次数

标签 统计

apache-camel ×1

cxf ×1

soap ×1