Hi!
Playing around with Tuscany 2.0M4 and have a problem that I cannot seem
to solve.
Writing a Calculator composite consisting of a Calculator component, an
Addition component and a Subtraction component.
All works well until I want to expose the Calculator as a web service
with the following composite file:
<?xml version="1.0" encoding="UTF-8"?>
<composite
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://ivan.com/soaexamples"
xmlns:ik="http://ivan.com/soaexamples"
name="CalculatorComposite">
<!-- Tried both with and without a <service> element in the Addition
and Subtraction componets. -->
<component name="AdditionComponent">
<implementation.java
class="com.ivan.components.impl.AdditionServiceImpl"/>
<service name="AdditionService">
<interface.java
interface="com.ivan.components.AdditionService"/>
</service>
</component>
<component name="SubtractionComponent">
<implementation.java
class="com.ivan.components.impl.SubtractionServiceImpl"/>
<service name="SubtractionService">
<interface.java
interface="com.ivan.components.SubtractionService"/>
</service>
</component>
<component name="CalculatorComponent">
<implementation.java
class="com.ivan.components.impl.CalculatorServiceImpl"/>
<service name="CalculatorService">
<interface.java
interface="com.ivan.components.CalculatorService" />
</service>
<reference name="additionService" target="AdditionComponent"/>
<reference name="subtractionServ" target="SubtractionComponent"/>
</component>
<!--
Tried both with the uri attribute as below and
requires="SOAP.1_1", but no luck.
Read somewhere that this way, promoting a service, is the
preferred way to declare bindings to a service.
-->
<service name="CalculatorService"
promote="CalculatorComponent/CalculatorService">
<binding.ws uri="http://localhost:8085/CalculatorService"/>
</service>
</composite>
When I start a SCA node containing the above composite, there are no
error messages, but also no log messages telling me, for instance, that
jetty has been started and that the service has been bound to some
address. Neither is there any response from the above URI.
The interesting thing is that I have another example that successfully
exposes a web service with a composite that is similar to the above,
although it totally ignores the value of the uri attribute in the
<binding.ws> element. I have tried over and over again to understand why
this happens, but given up.
One experience I would want to share is that Tuscany is quite poor at
telling me what the problem is in the case of missing libraries. There
are error messages that tell me nothing and I end up "including
everything". Is this an issue of setting some log level or is there
something else that I can do?
Many thanks in advance!
Ivan