Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
Java-SCA-1.5.1
-
None
Description
If a service is exposed using binding.ws only and a proxy to that service is obtained by calling SCAClient.getService(), the proxy throws IndexOutOfBoundsException when invoked. If a <binding.sca/> element is added to the service, the proxy works correctly.
To reproduce this problem, modify
svn.apache.org/repos/asf/tuscany/sandbox/travelsample/contributions/payment-java/src/main/resources/payment.composite
to remove the <binding.sca/> element on the Payment service, then build the payment-java module. This produces the following stack trace.
Running scatours.payment.PaymentTestCase
09-Sep-2009 10:32:27 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: null
09-Sep-2009 10:32:28 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution: file:/F:/book/samp16/travelsample/contributions/paym
ent-java/./target/classes/
09-Sep-2009 10:32:29 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution: file:/F:/book/samp16/travelsample/contributions/paym
ent-java/../../contributions/creditcard-payment-jaxb/target/classes/
09-Sep-2009 10:32:29 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: null
09-Sep-2009 10:32:30 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap
ping
INFO: Added Servlet mapping: http://Angels:8081/Payment
09-Sep-2009 10:32:30 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap
ping
INFO: Added Servlet mapping: http://Angels:8082/CreditCardPayment
09-Sep-2009 10:32:30 org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: null
09-Sep-2009 10:32:30 org.apache.tuscany.sca.http.jetty.JettyServer removeServlet
Mapping
INFO: Removed Servlet mapping: /Payment
09-Sep-2009 10:32:30 org.apache.tuscany.sca.http.jetty.JettyServer removeServlet
Mapping
INFO: Removed Servlet mapping: /CreditCardPayment
Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 2.434 sec <<< FA
ILURE!
testPayment(scatours.payment.PaymentTestCase) Time elapsed: 0.062 sec <<< ERRO
R!
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.tuscany.sca.core.databinding.transformers.Input2InputTrans
former.transform(Input2InputTransformer.java:249)
at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTrans
former.transform(Input2InputTransformer.java:45)
at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(Mediator
Impl.java:113)
at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediateInput(Med
iatorImpl.java:431)
at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterc
eptor.invoke(DataTransformationInterceptor.java:65)
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
KInvocationHandler.java:346)
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
KInvocationHandler.java:193)
at $Proxy49.makePaymentMember(Unknown Source)
at scatours.payment.PaymentTestCase.testPayment(PaymentTestCase.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework
Method.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal
lable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe
thod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMet
hod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.
java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja
va:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun
ner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun
ner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.
java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja
va:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:308)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:879)
Results :
Tests in error:
testPayment(scatours.payment.PaymentTestCase)
Tests run: 2, Failures: 0, Errors: 1, Skipped: 1