Details
-
Test
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Java-SCA-2.0-M5
-
None
-
SCA 2.0 snapshot, Calculator WS sample in a Web Application
Description
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>