Skip to content

Wrong parameter size to invoke the service with route genrated from wsdl2rest #98

Description

@apupier

When the REST DSL is generated from a wsdl, it creates the route with a wrapper object as payload type but the cxf expects individual elements as the input and throws the following exception:

java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 3, Parameter size 1. Please check if the message body matches the CXFEndpoint POJO Dataformat request.

 <restConfiguration bindingMode="json" component="jetty"
            host="hostname" port="8080"/>
        <rest id="id-a64e53e8-eae9-404c-b07e-d0a07b4f68fc" path="/test">
            <get id="id-7c1e452e-de34-4bad-907a-94cbafc0d6cf"
                outType="org.example.TestRequestResponse"
                type="org.example.TestRequest" uri="/testrequest/{arg0}">
                <to uri="direct:TestRequest"/>
            </get>

steps to reproduce:

  • Use this project to create the SOAP web service.
  • Now open the codeready studio and create a new "Camel REST DLS from WSDL" project and use the WSDL generated from the previous project.  A pre-created project is available here.
  • Now run the second project and send a request to the rest endpoint. Here, you'll notice that it throws the following error: 
    java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 3, Parameter size 1. Please check if the message body matches the CXFEndpoint POJO Dataformat request.

initially reported here https://issues.redhat.com/browse/FUSETOOLS-3369

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions