Web Service Composition using BPEL4WS

Hi all,

 

I am trying to understand WS composition using BPEL4WS. If here it is not
the exactly place to post this kind of message, please tell me the right
list.  

 

I've tried to create an example using BPEL4WS, and I have inspired in the
paper "Service-Oriented Composition in BPEL4WS" and I've tried to use the
composition example. I want to do a Calculator composition, that it is
composed for 3 services: Addition, Subtraction and Multiplication. 

Each one has 2 inputs parameters and 1 output parameters. I am doing in a
sequence way. Actually I want to give 2 parameters like 5 and 3, and I want
that my calculator do each operation and gives me a result. But the result
of each one of the operation will be the input of the next one, like this: 

 

5+3=8 so the next one will be 8-3=5, and so the multiplication will be
5*3=15, and the result (output parameter) will be 15 for the user. 

 

I've tried to do something like this:

<process name="CalculatorString" 

         targetNamespace="urn:calc:CalculatorService"

         xmlns:tns="urn:calc:CalculatorService"

         xmlns:saddit="http://localhost:8080/bpel/Addition.jws">

         xmlns:ssubt="http://localhost:8080/bpel/Subtraction.jws">

         xmlns:smult="http://localhost:8080/bpel/Multiplication.jws">

         xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">

 

   <!--variables>

      <variable name="a" messageType="tns:StringMessageType"/>

      <variable name="b" messageType="tns:StringMessageType"/>

      <variable name="c" messageType="tns:StringMessageType"/>

   </variables-->

   

   <containers>

    <container name="a" 

               messageType="sadd:a"/>

    <container name="b" 

               messageType="sadd:b"/>

    <container name="c" 

               messageType="sadd:c"/>

    <container name="d" 

               messageType="ssubt:d"/>

    <container name="e" 

               messageType="ssubt:e"/>

    <container name="f" 

               messageType="ssubt:f"/>

    <container name="g" 

               messageType="smult:g"/>

    <container name="h" 

               messageType="smult:h"/>

    <container name="i" 

               messageType="smult:i"/>

               

  </containers>

 

 

   <partners>

      <partner name="addition" 

               serviceLinkType="tns:AdditionSLT"/>

      <partner name="multiplication" 

               serviceLinkType="tns:MultiplicationSLT"/>

      <partner name="subtraction" 

               serviceLinkType="tns:SubtractionSLT"/>

               

   </partners>

    

   <sequence>

 

    <receive name="AdditionReceive" partner="addition" 

             portType="tns:AdditionPT" 

             operation="add" container="a"

             createInstance="yes">

     <correlations>

       <correlation set="SSN" initiation="yes">

     </correlations>

     

    </receive>

        <receive name="AdditionReceive" partner="addition" 

             portType="tns:AdditionPT" 

             operation="add" container="b"

             createInstance="yes">

     <correlations>

       <correlation set="SSN" initiation="yes">

     </correlations>

     

    </receive>  

 

    <invoke name="getAddition" partner="Addition" 

            portType="sadd:AdditionPT" 

            operation="add"

            inputContainer="a"  

            inputContainer="b"  

            outputContainer="c">

    </invoke>

    

 

    <assign name="mapData">

      <copy>

        <from container="c" part="SSN"/>

        <to container="d" part="SSN"/>

      </copy>

    </assign>

 

    <invoke name="getSubtraction" partner="Subtraction" 

            portType="ssubt:SubtractionPT" 

            operation="subtract"

            inputContainer="d"  

            inputContainer="e"              

            outputContainer="f">

    </invoke>

    

    <assign name="mapData">

      <copy>

        <from container="f" part="SSN"/>

        <to container="g" part="SSN"/>

      </copy>

    </assign>

    

            <invoke name="getMultiplication" partner="Multiplication" 

            portType="smult:MultiplicationPT" 

            operation="multiply"

            inputContainer="g"  

            inputContainer="h"              

            outputContainer="i">

    </invoke>

            

            <reply name="replyC" partner="multiplication" 

             portType="MultiplicationPT" 

             operation="multiply" container="i"

    </reply>

    

  </sequence>

</process>

 

 

I do not want to have effectively the calculator web service, I want that it
be only logically, not physically created. I want that the calculator is
only a composition, a logical composition, but actually it seems to be a
service to the user. 

 

I am using the BPWS4J 2.0, and I want to invoke a service Calculator with 2
input parameter and 1 output parameter that will be the result. The others
parameters d,e, g, h will be accumulated in the services' execution. 

 

And even more, when I deploy my service I have this error message:

----------------------------------------------------
Ouch, something went wrong while deploying the process. Here's the error I
got:

Error loading WSDL: WSDLException: faultCode=CONFIGURATION_ERROR: Problem
instantiating factory implementation.:
org.apache.wsif.wsdl.WSIFWSDLFactoryImpl

 

 

I am really lost and I have tried many things. Is my Calculator.bpel right?
Which method I call in BPWS4J, the first method of my Addition service or
the last one? 

 

 

Thanks in advance,

Daniela

Received on Friday, 8 October 2004 14:33:00 UTC