camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim.Begun" <>
Subject Camel - CXF parts issue in POJO mode
Date Fri, 14 Aug 2015 20:49:46 GMT
Hi everyone,

Working with Camel-CXF Client endpoint I identified an issue which I cannot
bypass without building custom CXF interceptor.

Camel / Camel-Cxf version:  2.15.1.redhat-620133
CXF version: 3.0.4.redhat-620133


1. Camel-CXF endpoint: dataFormat=POJO

2. WS SEI method in Java:

public void performOperation(
        @WebParam(name = "inParam1", targetNamespace = "")
        String inParam1,
        @WebParam(name = "inParam2",  targetNamespace = "")
        String inParam2,
        @WebParam(mode = WebParam.Mode.OUT, name = "outParam",
targetNamespace = "")<String> outParam

 note: OUT parameter is the last.

 - When Camel message body (either MessageContentsList or Object[] ) has 3
elements for all 3 parts
org.apache.camel.component.cxf.CxfProducer throws exception when prepare
message to CXF

java.lang.IllegalArgumentException: Get the wrong parameter size to invoke
the out service, Expect size 2, Parameter size 3. Please check if the
message body matches the CXFEndpoint POJO Dataformat request.
	at org.apache.camel.component.cxf.CxfProducer.process(

- When Camel message body has two parts onli for IN and INOUT parameters
 CxfProducer is happy :), 
but CXF org.apache.cxf.jaxws.interceptors.HolderInInterceptor is not :(

when it processes received response and tries to set values back to the
holders exception is:

java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
	at java.util.ArrayList.rangeCheck(
	at java.util.ArrayList.get(

Issue is definitelly in Camel CxfProducer.
 When it checks parameters and build placeholders for them  to pass to CXF -
only input message parts counted:

org.apache.camel.component.cxf.CxfProducer line 246: 
int experctMessagePartsSize = boi.getInput().getMessageParts().size();

but guys... there are out parts for holders in boi.getOutput() as well and
CXF expects them...

as workaround I was able to plug CXF interceptor and add lost placeholders
to CXF message.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message