I am running Camel 2.15.5 and CXF 3.1.5. I have a CXF consumer endpoint that receives requests in MESSAGE data format. I ran into the following error whenever a client sent in a request with a null HTTP header (i.e. a header name is specified but there is no value. It can be any header, e.g. SOAPAction, or FOO). Then the following fault is returned:
<soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Index: 0, Size: 0</faultstring> </soap:Fault> Any help would be greatly appreciated. ================ ID: 1 Address: http://localhost:9003/test.svc Encoding: ISO-8859-1 Http-Method: POST Content-Type: text/xml Headers: {accept-encoding=[gzip,deflate], connection=[keep-alive], Content-Length=[23], content-type=[text/xml], FOO=[], Host=[localhost:9003], User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]} Payload: <elem> <test/> </elem> -------------------------------------- 2016-03-22 20:32:59,515 [qtp86558913-22 ] WARN PhaseInterceptorChain - Interceptor for {http://b2b.com/schema/IS_B2B_CDM/R2_2}CustomerPublish has thrown exception, unwinding now java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.apache.camel.component.cxf.DefaultCxfBinding.propagateHeadersFromCxfToCamel(DefaultCxfBinding.java:552) at org.apache.camel.component.cxf.DefaultCxfBinding.populateExchangeFromCxfRequest(DefaultCxfBinding.java:247) at org.apache.camel.component.cxf.CxfConsumer$1.prepareCamelExchange(CxfConsumer.java:187) at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:86) at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) 2016-03-22 20:32:59,644 [qtp86558913-22 ] INFO Provider - Outbound Message --------------------------- ID: 1 Response-Code: 500 Encoding: ISO-8859-1 Content-Type: text/xml Headers: {} Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Index: 0, Size: 0</faultstring></soap:Fault></soap:Body></soap:Envelope> -- View this message in context: http://camel.465427.n5.nabble.com/java-lang-IndexOutOfBoundsException-in-DefaultCxfBinding-java-when-receiving-null-HTTP-header-tp5779532.html Sent from the Camel - Users mailing list archive at Nabble.com.
