You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org> on 2006/10/19 19:37:36 UTC

[jira] Commented: (TUSCANY-875) Databinding not able to transform when a java component is invoking a web service

    [ http://issues.apache.org/jira/browse/TUSCANY-875?page=comments#action_12443592 ] 
            
Venkatakrishnan commented on TUSCANY-875:
-----------------------------------------

Hi Raymond,

I was also trying to see if the calculator sample can be exposed as a webservice.  I did that successfully.  Then I tried to invoke this from a standalone sca client.   Here are my observations: -

- When I invoke the divide service that has two arguments, I encountered the same exception as Jojo.  Also I figured out that there is some incompatibility with respect to Input2Input transformation with source type (java) containing two arguments and the target type  (webservice) containing only one argument (prob. since it is wrapped style).  All this is on the client. 

- then I tried calling another service with just one argument.  This time around the call crossed client but encountered exceptions on the server side.  On ther server side the SimpleType2JavaTransformer ends up passing a null simpleType to the SimpleTypeMapperExtension.  There seems to be some problem in extracting  the type info.

- Venkat



> Databinding not able to transform when a java component is invoking a web service
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-875
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-875
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Common
>    Affects Versions: Java-M2
>         Environment: M2 - Branch, Web service sample hosted in Tomcat 5.5.20
>            Reporter: Jojo Joseph
>         Assigned To: Raymond Feng
>             Fix For: Java-M2
>
>         Attachments: calculator-combo.zip, calculator-ws.zip
>
>
> I have an axis2 based SCA service hosted in Tomcat, and a java component trying to invoke this service using a referene. The interface method I am using is :
>     double divide(double n1, double n2);
> I am getting the following exception:
> rg.apache.tuscany.spi.wire.InvocationRuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> 	at org.apache.tuscany.core.databinding.impl.DataBindingInteceptor.invoke(DataBindingInteceptor.java:76)
> 	at org.apache.tuscany.spi.wire.AbstractOutboundInvocationHandler.invoke(AbstractOutboundInvocationHandler.java:60)
> 	at org.apache.tuscany.core.wire.jdk.JDKOutboundInvocationHandler.invoke(JDKOutboundInvocationHandler.java:121)
> 	at $Proxy20.divide(Unknown Source)
> 	at calculator.CalculatorServiceImpl.divide(CalculatorServiceImpl.java:84)
> 	at calculator.client.CalculatorClient.main(CalculatorClient.java:53)
> 	at calculator.CalculatorTestCase.testCalculatorClient(CalculatorTestCase.java:55)
> 	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:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	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:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	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)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> 	at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> 	at java.util.ArrayList.get(ArrayList.java:321)
> 	at org.apache.tuscany.core.databinding.impl.Input2InputTransformer.transform(Input2InputTransformer.java:199)
> 	at org.apache.tuscany.core.databinding.impl.Input2InputTransformer.transform(Input2InputTransformer.java:1)
> 	at org.apache.tuscany.core.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:95)
> 	at org.apache.tuscany.core.databinding.impl.DataBindingInteceptor.transform(DataBindingInteceptor.java:105)
> 	at org.apache.tuscany.core.databinding.impl.DataBindingInteceptor.invoke(DataBindingInteceptor.java:69)
> 	at org.apache.tuscany.spi.wire.AbstractOutboundInvocationHandler.invoke(AbstractOutboundInvocationHandler.java:60)
> 	at org.apache.tuscany.core.wire.jdk.JDKOutboundInvocationHandler.invoke(JDKOutboundInvocationHandler.java:121)
> 	at $Proxy24.divide(Unknown Source)
> 	at calculator.DivideServiceImpl.divide(DivideServiceImpl.java:34)
> 	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 org.apache.tuscany.core.wire.PojoTargetInvoker.invokeTarget(PojoTargetInvoker.java:63)
> 	at org.apache.tuscany.core.wire.PojoTargetInvoker.invoke(PojoTargetInvoker.java:72)
> 	at org.apache.tuscany.core.wire.InvokerInterceptor.invoke(InvokerInterceptor.java:44)
> 	at org.apache.tuscany.core.wire.SynchronousBridgingInterceptor.invoke(SynchronousBridgingInterceptor.java:41)
> 	at org.apache.tuscany.core.databinding.impl.DataBindingInteceptor.invoke(DataBindingInteceptor.java:71)
> 	... 24 more
> I will attach the code sampes shortly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org