19 parameters?!?!? Jeesh… I think I'd be strongly considering running wsdl2java with the -bareMethods parameters to flip to bare mode. Seriously, consider it.
We'd likely need a test case for this. When you are getting that many parameters, there is definitely some possibilities of getting some ordering mixed up, particularly if there is a mix of headers and non-headers and in/outs, etc…. Dan On Jun 17, 2013, at 8:13 PM, Tim Olson <[email protected]> wrote: > Our CXF client consistently gets an IndexOutOfBoundsException > (java.lang.IndexOutOfBoundsException: > Index: 19, Size: 19) when handling a SOAP response which otherwise looks > valid. We're using CXF 2.7.5 with the wsdl2java Maven plugin to generate > client wrapper code. > > The stack trace goes from > HolderInInterceptor:69<http://svn.apache.org/repos/asf/cxf/tags/cxf-2.7.5/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java> > > if (client) { > List<Holder<?>> outHolders = > CastUtils.cast((List<?>)message.getExchange() > .getOutMessage().get(CLIENT_HOLDERS)); > for (MessagePartInfo part : parts) { > if (part.getIndex() != 0 && part.getTypeClass() != null) { > @SuppressWarnings("unchecked") > Holder<Object> holder = > (Holder<Object>)outHolders.get(part.getIndex() - 1); > if (holder != null) {* > holder.value = inObjects.get(part);* > inObjects.put(part, holder); > } > } > } > } > > > to > MessageContentsList:80<http://svn.apache.org/repos/asf/cxf/tags/cxf-2.7.5/api/src/main/java/org/apache/cxf/message/MessageContentsList.java> > > public Object get(MessagePartInfo key) { > Object o = *super.get(key.getIndex())*; > return o == REMOVED_MARKER ? null : o; > } > > > and then > java.lang.IndexOutOfBoundsException: Index: 19, Size: 19 > at java.util.ArrayList.RangeCheck(ArrayList.java:547) > at java.util.ArrayList.get(ArrayList.java:322) > at > org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80) > at > org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69) > ... > > In other areas of the code, the MessagePartInfo indices seem to be > converted from 1-based indices to 0-based, but that's not happening here. > Should the line in MessageContentsList be changed to * > super.get(key.getIndex()-1)*? Otherwise, I am at a loss for debugging this > further. > > Unfortunately, I can't share the WSDL or SOAP, since our partner considers > it proprietary, but I can try to offer generic answers to any questions. > The WSDL they give us is *massive* and not easy to boil down into a small > test case (about 100 XSD's, many complex types). > > > Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Index: 19, > Size: 19 > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:155) > *[elided]* > Caused by: java.lang.IndexOutOfBoundsException: Index: 19, Size: 19 > at java.util.ArrayList.RangeCheck(ArrayList.java:547) > at java.util.ArrayList.get(ArrayList.java:322) > at > org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80) > at > org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) > at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133) > ... 10 more > > > Thanks for any ideas, > Tim -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
