I'm giving a lecture in "Web Service Composition" at the Vienna University of 
Technology and I want to use tuscany as an advances technique for system 
configuration. But first of all I've to understand the technology befor 
annoying my students. I've gone through the examples but didn't find any 
solution for my problem.
: 
I have a composite that defines a component and binds it to a Web Service 
outside of my control, somewhere on the Web.
The service is axis2 and generated from a Java class. 
package at.move;
public class MathService {
        public double addiere(double a,double b){
                return a+b;
        }
        public int aufrunden(double a){
                return (int)Math.ceil(a);
        }
}
The Calculaor.composite looks like that:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
           targetNamespace="http://sample";
           xmlns:sample="http://sample";
           name="Calculator">           

    <component name="CalculatorServiceComponent">
                <implementation.java class="calculator.CalculatorServiceImpl"/> 
      
                <reference name="addService">         
            <binding.ws uri="http://localhost:8080/zong/services/MathService"; 
/>        
        </reference>
        <reference name="subtractService" 
target="SubtractServiceComponent"></reference>
        <reference name="multiplyService" 
target="MultiplyServiceComponent"></reference>
        <reference name="divideService" 
target="DivideServiceComponent"></reference>
    </component>

    <component name="SubtractServiceComponent">
        <implementation.java class="calculator.SubtractServiceImpl"/>
    </component>
    ...    
</composite>

The idea is: For the addService and method add() I want to use the The Web 
Service with the method: addiere()
 I need to map the AddService to the MathService and the add method from the 
Calculator to the addiere method from MathService 
 @Reference
    public void setAddService(AddService addService) {
        this.addService = addService;
    }
   public double add(double n1, double n2) {
        return addService.add(n1, n2);
    }

What steps are required in order to achieve such a mapping? Or is this not in 
the intetntion of tuscany and it is not possible?

Many thanks in advance.

 
----------------------------------------------------------------
Dr. Albert Rainer
EC3 - Electronic Commerce Competence Center
www.ec3.at
Donau-City Strasse 1
A-1220 Wien
Tel: +43 1 522 71 71 - 33
Fax: +43 1 522 71 71 - 71


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to