org.apache.cxf.interceptor.Fault: Index: 1, Size: 1 - CXF client - FUSE 4.1
maxfuse Dec 7, 2009 10:06 AMHi,
we are using Fuse ESB 4.1.0.2 with Camel 1.6.1.0-fuse and CXF 2.2.2.1-fuse; in one of our bundles we have defined a CXF client with datamode set to POJO, because we need MTOM and that seems to be the only supported way to achieve it (http://camel.apache.org/cxf.html).
Our customer's WSDL (see below) has an implicit header for authentication data (the header is defined in the wsdl:binding section but not in the wsdl:portType).
We use the maven cxf-codegen-plugin to execute wsdl2java to generate client sources.
The problem arises when - from one of our routes - we generate a message and send it to the cxf client bean; before it even reaches the server we get the following exception and then the exchange is routed to the dead letter queue:
11:52:24,685 | WARN | nerContainer-973 | PhaseInterceptorChain | org.apache.cxf.endpoint.ClientImpl 471 | Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Index: 1, Size: 1
at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:119)
...
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.intersec.schema.mcms._3.SingleMms_WrapperTypeHelper1.createWrapperObject(Unknown Source)
at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:103)
... 39 more
Of course the com.intersec package has to do with the cxf-generated client code.
Now, I've dug a bit but the only relevant result I could find is a cxf issue with out-of-band headers that was fixed in cxf 2.0.3:
https://issues.apache.org/jira/browse/CXF-1129
Not sure if what I'm seeing in our route is our error somewhere, a new issue with cxf or a regression, so I've tried with the workaround suggested in the cxf Jira entry (running the wsdl2java with '-exsh true'), unfortunately with no results (same error).
Any pointers anyone?
Relevant parts of our source code:
CXF client definition
();
Header identityHeader = new Header(new QName("com.intersec.schema.mcms._3", "callerIdentity"), identity, new JAXBDataBinding(CallerIdentity.class));
headers.add(identityHeader);
x.getOut().setHeader(Header.HEADER_LIST, headers);
x.getOut().setBody(params);
x.getOut().setHeader(Client.REQUEST_CONTEXT , requestContext);
x.getOut().setHeader(CxfConstants.OPERATION_NAME, "singleMms");
}
})
// web service request
.to("cxf:bean:" + getCxfEndpointId())
...
Max
Edited by: maxfuse on Dec 7, 2009 2:09 PM
Edited by: maxfuse on Dec 7, 2009 3:05 PM
-
MCMS.wsdl 43.5 KB