You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "pawel.jasinski" <pa...@gmail.com> on 2008/08/27 15:50:53 UTC
java.lang.IndexOutOfBoundsException in cxf producer
hi,
i have discovered a consistent way to trigger IndexOutOfBoundsException by
using cxf producer.
I don't want to create JIRA without confirming that I am not doing something
totally against the rules.
I have modified existing unit test to show the exact condition (attached).
I am sure service implementation is ok (can be called with soapui).
Since the exact exception comes from cxf not camel, i also tried to run it
with cxf 2.1.2. No change :-(
New test is called testInvokingJaxWsComplexTypeServerWithParams and is
located in CxfProducerTest.java
Pawel
http://www.nabble.com/file/p19181372/unit-test.patch unit-test.patch
--
View this message in context: http://www.nabble.com/java.lang.IndexOutOfBoundsException-in-cxf-producer-tp19181372s22882p19181372.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by "pawel.jasinski" <pa...@gmail.com>.
thanks!
That was the problem.
Pawel
--
View this message in context: http://www.nabble.com/java.lang.IndexOutOfBoundsException-in-cxf-producer-tp19181372s22882p19185379.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by glawi <ma...@yahoo.fr>.
Thanks for the answer, but I got this illumination this night :) I missed
the Holders.
Ok, everything works now. Thanks again.
--
View this message in context: http://camel.465427.n5.nabble.com/java-lang-IndexOutOfBoundsException-in-cxf-producer-tp468541p4575140.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by Willem Jiang <wi...@gmail.com>.
On 7/8/11 11:15 PM, glawi wrote:
> Hi all, I got the same issue whith Camel 2.7.2.
>
>
> The FrostByteTransformer.applyTreatmentOnInputData code :
> final Incident incident = (Incident)
> inputData.getIn().getBody(Map.class).get(DataMapFields.INCIDENT);
>
> final Execute request = new Execute();
> request.setNumber(incident.getNumber());
> final List<String> req = new ArrayList<String>();
> req.add(incident.getNumber());
> inputData.getOut().setBody(incident.getNumber());
You need to set the request parameter with a Holder.
I just checked the SEI which is generated from your WSDL, the parameter
list should be set like this
Object[] parameter = new Object[3];
parameter[0] = incident.getNumber();
parameter[1] = new Holder<String>();
parameter[2] = new Holder<String>();
MessageContentsList request = new MessageContextsList(paramter);
inputData.getOut().getBody(request);
You should get the response from parameter[1] and parameter[2].
>
>
> And finally the stackTrace following the SOAP request and response traces :
> ATTENTION: Interceptor for
> {http://www.service-now.com}ServiceNow_frostbyte#{http://www.service-now.com}execute
> has thrown exception, unwinding now
> java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.RangeCheck(ArrayList.java:547)
> at java.util.ArrayList.get(ArrayList.java:322)
> at
> org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:67)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:737)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2198)
> at
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
> ...
>
>
>
>
> Have you any idea ?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/java-lang-IndexOutOfBoundsException-in-cxf-producer-tp468541p4565102.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by glawi <ma...@yahoo.fr>.
Hi all, I got the same issue whith Camel 2.7.2.
Here's my WSDL :
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.service-now.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:tns="http://www.service-now.com/frostbyte"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sncns="http://www.service-now.com"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://www.service-now.com/frostbyte"><xsd:element
name="execute"><xsd:complexType><xsd:sequence><xsd:element maxOccurs="1"
minOccurs="0" name="number"
type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:element><xsd:element
name="executeResponse"><xsd:complexType><xsd:sequence><xsd:element
maxOccurs="1" minOccurs="0" name="ci" type="xsd:string"/><xsd:element
maxOccurs="1" minOccurs="0" name="caller"
type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:element></xsd:schema>
</wsdl:types>
<wsdl:message name="executeSoapIn">
<wsdl:part name="frostbyte" element="tns:execute"/>
</wsdl:message>
<wsdl:message name="executeSoapOut">
<wsdl:part name="frostbyte" element="tns:executeResponse"/>
</wsdl:message>
<wsdl:portType name="ServiceNowSoap">
<wsdl:operation name="execute">
<wsdl:input message="sncns:executeSoapIn"/>
<wsdl:output message="sncns:executeSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceNowSoap" type="sncns:ServiceNowSoap">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="execute">
<soap:operation
soapAction="http://www.service-now.com/frostbyte/execute" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServiceNow_frostbyte">
<wsdl:port name="ServiceNowSoap" binding="sncns:ServiceNowSoap">
<soap:address
location="https://arkeadeva.service-now.com/frostbyte.do?SOAP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
And now my route :
from("direct:frostbyte").bean(FrostByteTransformer.class,
"applyTreatmentOnInputData")
.enrich("cxf:bean:snowEndpointFrostbyte?wrapped=true&defaultOperationName=execute&loggingFeatureEnabled=true")
.bean(FrostByteTransformer.class, "applyTreatmentOnOutputData");
The endPoind definition :
<cxf:cxfEndpoint id="snowEndpointFrostbyte"
address="${snow.baseUrl}/frostbyte.do?SOAP" wsdlURL="wsdl/frostbyte.wsdl"
serviceClass="com.servicenow.ws.client.generated.frostbyte.ServiceNowSoap"
endpointName="s:ServiceNowSoap" serviceName="s:ServiceNow_frostbyte"
xmlns:s="http://www.service-now.com" />
The FrostByteTransformer.applyTreatmentOnInputData code :
final Incident incident = (Incident)
inputData.getIn().getBody(Map.class).get(DataMapFields.INCIDENT);
final Execute request = new Execute();
request.setNumber(incident.getNumber());
final List<String> req = new ArrayList<String>();
req.add(incident.getNumber());
inputData.getOut().setBody(incident.getNumber());
And finally the stackTrace following the SOAP request and response traces :
ATTENTION: Interceptor for
{http://www.service-now.com}ServiceNow_frostbyte#{http://www.service-now.com}execute
has thrown exception, unwinding now
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:67)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:737)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2198)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
...
Have you any idea ?
--
View this message in context: http://camel.465427.n5.nabble.com/java-lang-IndexOutOfBoundsException-in-cxf-producer-tp468541p4565102.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by Willem Jiang <wi...@gmail.com>.
Hi
The execption is thrown from the HoderInInterceptor,
Please check the parameter list which you set for the cxf producer.
java.lang.String sequenceId,
java.lang.String shortText,
java.lang.String longText,
com.ruag.poc.didatu.pubsubdidatu.types.MessageType type,
javax.xml.datatype.XMLGregorianCalendar timeOfCreation,
int priority,
javax.xml.ws.Holder<java.lang.String> status,
javax.xml.ws.Holder<javax.xml.datatype.XMLGregorianCalendar>
timeOfConsumption,
javax.xml.ws.Holder<java.lang.String> one,
javax.xml.ws.Holder<java.lang.String> two
You need also add the last four Holders as the parameter into the
parameters list.
Willem
pawel.jasinski wrote:
> hi willem,
>
> i did not provide the stack trace, my fault.
> Below the original stack trace.
> I also tried to add your code, but the execution never reaches this point.
>
> Aug 27, 2008 5:12:20 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
> at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> at java.util.ArrayList.get(ArrayList.java:321)
> at
> org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:63)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
> at
> org.apache.camel.component.cxf.CxfProducer.invokeClient(CxfProducer.java:297)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:203)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176)
> at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149)
> at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86)
> at
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84)
> at
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:64)
> at
> org.apache.camel.component.cxf.CxfProducerTest.sendJaxWsComplexTypeMessage(CxfProducerTest.java:183)
> at
> org.apache.camel.component.cxf.CxfProducerTest.testInvokingJaxWsComplexTypeServerWithParams(CxfProducerTest.java:127)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
> at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> at java.util.ArrayList.get(ArrayList.java:321)
> at
> org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:63)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
> at
> org.apache.camel.component.cxf.CxfProducer.invokeClient(CxfProducer.java:297)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:203)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176)
> at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149)
> at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86)
> at
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84)
> at
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:64)
> at
> org.apache.camel.component.cxf.CxfProducerTest.sendJaxWsComplexTypeMessage(CxfProducerTest.java:183)
> at
> org.apache.camel.component.cxf.CxfProducerTest.testInvokingJaxWsComplexTypeServerWithParams(CxfProducerTest.java:127)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
>
>
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by "pawel.jasinski" <pa...@gmail.com>.
hi willem,
i did not provide the stack trace, my fault.
Below the original stack trace.
I also tried to add your code, but the execution never reaches this point.
Aug 27, 2008 5:12:20 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at
org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:63)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
at
org.apache.camel.component.cxf.CxfProducer.invokeClient(CxfProducer.java:297)
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:203)
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176)
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:64)
at
org.apache.camel.component.cxf.CxfProducerTest.sendJaxWsComplexTypeMessage(CxfProducerTest.java:183)
at
org.apache.camel.component.cxf.CxfProducerTest.testInvokingJaxWsComplexTypeServerWithParams(CxfProducerTest.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at
org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:63)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
at
org.apache.camel.component.cxf.CxfProducer.invokeClient(CxfProducer.java:297)
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:203)
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176)
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:64)
at
org.apache.camel.component.cxf.CxfProducerTest.sendJaxWsComplexTypeMessage(CxfProducerTest.java:183)
at
org.apache.camel.component.cxf.CxfProducerTest.testInvokingJaxWsComplexTypeServerWithParams(CxfProducerTest.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
View this message in context: http://www.nabble.com/java.lang.IndexOutOfBoundsException-in-cxf-producer-tp19181372s22882p19183311.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.lang.IndexOutOfBoundsException in cxf producer
Posted by Willem Jiang <wi...@gmail.com>.
There must be something wrong on your cxf producer side, so you can't
get right result from the result arrays.
Please using the below code to check out the producer's exception.
Exchange exchange = sendJaxWsComplexTypeMessage();
if (exchange.isFailed()) {
Exception ex = exchange.getFault().getBody(Exception.class);
ex.printStackTrace();
}
Willem
pawel.jasinski wrote:
> hi,
>
> i have discovered a consistent way to trigger IndexOutOfBoundsException by
> using cxf producer.
> I don't want to create JIRA without confirming that I am not doing something
> totally against the rules.
> I have modified existing unit test to show the exact condition (attached).
> I am sure service implementation is ok (can be called with soapui).
> Since the exact exception comes from cxf not camel, i also tried to run it
> with cxf 2.1.2. No change :-(
> New test is called testInvokingJaxWsComplexTypeServerWithParams and is
> located in CxfProducerTest.java
>
>
> Pawel
>
> http://www.nabble.com/file/p19181372/unit-test.patch unit-test.patch
>