Albert:

my understanding is that SCA is based on an "automatic" (semantic) mapping.
The method signatures had to be the same. This is not a severe limitation
because at some point 2 interfaces have to match to communicate. The pattern
to compose arbitrary interfaces is to use a mediator component that bridges
the two interfaces. Again, this is not a big limitation, because when you
need to compose arbitrary interfaces, you could have a lot going on in the
mediator (transformation, even some state management...)

JJ-

On Fri, Mar 21, 2008 at 5:53 AM, Albert Rainer <[EMAIL PROTECTED]> wrote:

> 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]
>
>


-- 
Jean-Jacques Dubray
425-445-4467

Reply via email to