You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2010/11/09 11:56:07 UTC

[jira] Updated: (TUSCANY-3691) Calculator ws service binding throws Exception

     [ https://issues.apache.org/jira/browse/TUSCANY-3691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws updated TUSCANY-3691:
--------------------------------

    Fix Version/s:     (was: Java-SCA-2.0-Beta1)
                   Java-SCA-2.0-Beta2

Move to Beta2 

> Calculator ws service binding throws Exception
> ----------------------------------------------
>
>                 Key: TUSCANY-3691
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3691
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Tutorial
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: SCA 2.0 snapshot, Calculator WS sample in a Web Application
>            Reporter: antony
>             Fix For: Java-SCA-2.0-Beta2
>
>
> I am trying to execute the calculator webservice example. But when i run this, it throws below error. Can you help on this?
> I have written a webapplication where the web.composite looks as given below. i didnt make any change. I am accessing through sca client factory.
> SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("default")); 
> CalculatorService cs = factory.getService(CalculatorService.class, "CalculatorServiceComponent");
> System.out.println(cs); // prints [Proxy - org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler@1ecfcd9]
> System.out.println(cs.subtract(2, 2)); // prints 0.0
> System.out.println(cs.add(2, 2)); // But this line throws exception java.lang.ArrayIndexOutOfBoundsException: 1
> 	at org.apache.tuscany.sca.databinding.jaxb.JAXBWrapperHandler.setChildren(JAXBWrapperHandler.java:75)
> 	at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform(Input2InputTransformer.java:174)
> web.composite
> --------------------------------
>  <component name="CalculatorServiceComponent">
> 		<implementation.java class="calculator.CalculatorServiceImpl"/>
>         <reference name="addService" >   
>             <binding.ws uri="http://localhost:8085/AddServiceComponent"/>        
>         </reference>  
>         <reference name="subtractService" target="SubtractServiceComponent" />
>         <reference name="multiplyService" target="MultiplyServiceComponent" />
>         <reference name="divideService" target="DivideServiceComponent" />
>     </component>
>     <component name="AddServiceComponent">
>         <implementation.java class="calculator.AddServiceImpl"/>
>         <service name="AddService">
>             <binding.ws uri="http://localhost:8085/AddServiceComponent"/>
>         </service>
>     </component>
>     <component name="SubtractServiceComponent">
>         <implementation.java class="calculator.SubtractServiceImpl"/>
>     </component>
>     <component name="MultiplyServiceComponent">
>         <implementation.java class="calculator.MultiplyServiceImpl"/>
>     </component>
>     <component name="DivideServiceComponent">
>         <implementation.java class="calculator.DivideServiceImpl"/>
>     </component>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.