ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seema Sana <seemas...@gmail.com>
Subject Selection Failure Problem
Date Mon, 20 May 2013 17:04:43 GMT
I am new to Apache ODE and having serious problems even with simple BPEL
compositions :(.

I have a simple BPEL process which receives input from the client and calls
one external web service (currently) risk and assign back the result to the
output variable. I am using eclipse bpel designer, Apache ODE 1.3.5  and
tomcat 6. The variables are initialized properly and the namespace looks
fine. I am sure, any one on this group can point out the mistake.

Thanks,
Sana

BPEL file

///////////////////

<!-- LoanCoverageProcess BPEL Process [Generated by the Eclipse BPEL
Designer] -->

<!-- Date: Thu May 16 14:44:13 CEST 2013 -->

<bpel:process name="LoanCoverageProcess"

         targetNamespace="http://loancoverage"

         suppressJoinFailure="yes"

         xmlns:tns="http://loancoverage"

         xmlns:bpel="
http://docs.oasis-open.org/wsbpel/2.0/process/executable"

         xmlns:ns="http://risk/" xmlns:ns0="http://assess/" xmlns:ns1="
http://www.w3.org/2001/XMLSchema">


    <!-- Import the client WSDL -->

     <bpel:import namespace="http://assess/" location=
"AssessmentService_schema1.xsd" importType="http://www.w3.org/2001/XMLSchema
"></bpel:import>

    <bpel:import namespace="http://assess/" location=
"AssessmentService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></
bpel:import>

   <bpel:import namespace="http://risk/" location="RiskService_schema1.xsd"
importType="http://www.w3.org/2001/XMLSchema"></bpel:import>

    <bpel:import namespace="http://risk/" location="RiskService.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>

    <bpel:import location="LoanCoverageProcessArtifacts.wsdl" namespace="
http://loancoverage"

        importType="http://schemas.xmlsoap.org/wsdl/" />



    <!-- =================================================================
-->

    <!-- PARTNERLINKS
-->

    <!-- List of services participating in this BPEL process
-->

    <!-- =================================================================
-->

    <bpel:partnerLinks>

        <!-- The 'client' role represents the requester of this service. -->

        <bpel:partnerLink name="client"

                     partnerLinkType="tns:LoanCoverageProcess"

                     myRole="LoanCoverageProcessProvider"

                     />



        <bpel:partnerLink name="Approver" partnerLinkType="tns:ApproverPLT"
partnerRole="ApproverRole"></bpel:partnerLink>

        <bpel:partnerLink name="Assessor" partnerLinkType="tns:AssessorPLT"
partnerRole="AssessorRole"></bpel:partnerLink>

    </bpel:partnerLinks>



    <!-- =================================================================
-->

    <!-- VARIABLES
-->

    <!-- List of messages and XML documents used within this BPEL process
-->

    <!-- =================================================================
-->

    <bpel:variables>

        <!-- Reference to the message passed as input during initiation -->

        <bpel:variable name="input"

                  messageType="tns:LoanCoverageProcessRequestMessage"/>



        <!--

          Reference to the message that will be returned to the requester

          -->

        <bpel:variable name="output"

                  messageType="tns:LoanCoverageProcessResponseMessage"/>





        <bpel:variable name="ApproverResponse" messageType=
"ns0:assessResponse"></bpel:variable>

        <bpel:variable name="ApproverRequest" messageType="ns0:assess"></
bpel:variable>



        <bpel:variable name="AssessorResponse" messageType=
"ns:calculateRiskResponse"></bpel:variable>

        <bpel:variable name="AssessorRequest" messageType="ns:calculateRisk"
></bpel:variable>



    </bpel:variables>


    <!-- =================================================================
-->

    <!-- ORCHESTRATION LOGIC
-->

    <!-- Set of activities coordinating the flow of messages across the
-->

    <!-- services integrated within this business process
-->

    <!-- =================================================================
-->

    <bpel:sequence name="main">



        <!-- Receive input from requester.

             Note: This maps to operation defined in
LoanCoverageProcess.wsdl

             -->

        <bpel:receive name="receiveInput" partnerLink="client"

                 portType="tns:LoanCoverageProcess"

                 operation="process" variable="input"

                 createInstance="yes"/>



        <!-- Generate reply to synchronous request -->





        <bpel:if name="If1">

            <bpel:condition><![CDATA[$input.payload/tns:amount <= 10000]]></
bpel:condition>

            <bpel:sequence name="SmallAmount">

                <bpel:assign validate="no" name="assignToAssessor">



                    <bpel:copy>

                        <bpel:from>

                            <bpel:literal>

                                <tns:calculateRisk xmlns:tns="http://risk/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><id>0</id>


                                </tns:calculateRisk>

                            </bpel:literal>

                        </bpel:from>

                        <bpel:to variable="AssessorRequest" part=
"parameters"></bpel:to>

                    </bpel:copy>

                    <bpel:copy>

                        <bpel:from part="payload" variable="input">

                            <bpel:query queryLanguage=
"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:id]]></
bpel:query>

                        </bpel:from>

                        <bpel:to part="parameters" variable=
"AssessorRequest">

                            <bpel:query queryLanguage=
"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[id]]></bpel:query>

                        </bpel:to>

                    </bpel:copy>

                </bpel:assign>

                <bpel:invoke name="queryAssessor" partnerLink="Assessor"
operation="calculateRisk" portType="ns:Risk" inputVariable="AssessorRequest"
 outputVariable="AssessorResponse"></bpel:invoke>





                <bpel:assign validate="no" name="AssignResult">





                    <bpel:copy>

                        <bpel:from>

                            <bpel:literal>

                                <tns:LoanCoverageProcessResponse xmlns:tns="
http://loancoverage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><
tns:result>0</tns:result>


                                </tns:LoanCoverageProcessResponse>

                            </bpel:literal>

                        </bpel:from>

                        <bpel:to variable="output" part="payload"></bpel:to>

                    </bpel:copy>

                    <bpel:copy>

                        <bpel:from part="parameters" variable=
"AssessorResponse">

                            <bpel:query queryLanguage=
"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[risk]]></
bpel:query>

                        </bpel:from>

                        <bpel:to part="payload" variable="output">

                            <bpel:query queryLanguage=
"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></
bpel:query>

                        </bpel:to>

                    </bpel:copy>

                </bpel:assign>

            </bpel:sequence>





        </bpel:if>

        <bpel:reply name="replyOutput"

               partnerLink="client"

               portType="tns:LoanCoverageProcess"

               operation="process"

               variable="output"

               />



    </bpel:sequence>

</bpel:process>


/////////////wsdl file //////////////////////////////////////

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="
http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"xmlns:tns="http://loancoverage"
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="
http://assess/" xmlns:wsdl1="http://risk/"name="LoanCoverageProcess"
targetNamespace="http://loancoverage">


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     TYPE DEFINITION - List of types participating in this BPEL process

     The BPEL Designer will generate default request and response types

     but you can define or import any XML Schema type and use them as part

     of the message types.

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <plnk:partnerLinkType name="ApproverPLT">

    <plnk:role name="ApproverRole" portType="wsdl:Assessment"/>

  </plnk:partnerLinkType>

    <plnk:partnerLinkType name="AssessorPLT">

    <plnk:role name="AssessorRole" portType="wsdl1:Risk"/>

  </plnk:partnerLinkType>

    <import location="AssessmentService.wsdl" namespace="http://assess/"/>

    <import location="RiskService.wsdl" namespace="http://risk/"/>

    <types>

        <schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://loancoverage">


            <element name="LoanCoverageProcessRequest">

                <complexType>

                    <sequence>

                     <element name="id" type="int"/>

                        <element name="amount" type="int"/>

                    </sequence>

                </complexType>

            </element>


            <element name="LoanCoverageProcessResponse">

                <complexType>

                    <sequence>

                        <element name="result" type="int"/>

                    </sequence>

                </complexType>

            </element>

        </schema>

    </types>



<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     MESSAGE TYPE DEFINITION - Definition of the message types used as

     part of the port type defintions

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <message name="LoanCoverageProcessRequestMessage">

        <part element="tns:LoanCoverageProcessRequest" name="payload"/>

    </message>

    <message name="LoanCoverageProcessResponseMessage">

        <part element="tns:LoanCoverageProcessResponse" name="payload"/>

    </message>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     PORT TYPE DEFINITION - A port type groups a set of operations into

     a logical service unit.

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->


    <!-- portType implemented by the LoanCoverageProcess BPEL process -->

    <portType name="LoanCoverageProcess">

        <operation name="process">

            <input message="tns:LoanCoverageProcessRequestMessage"/>

            <output message="tns:LoanCoverageProcessResponseMessage"/>

        </operation>

    </portType>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     PARTNER LINK TYPE DEFINITION

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <plnk:partnerLinkType name="LoanCoverageProcess">

        <plnk:role name="LoanCoverageProcessProvider" portType=
"tns:LoanCoverageProcess"/>

    </plnk:partnerLinkType>




<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     BINDING DEFINITION - Defines the message format and protocol details

     for a web service.

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <binding name="LoanCoverageProcessBinding" type=
"tns:LoanCoverageProcess">

     <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>

     <operation name="process">

     <soap:operation soapAction="http://loancoverage/process"/>

     <input>

     <soap:body use="literal"/>

     </input>

     <output>

     <soap:body use="literal"/>

     </output>

     </operation>

    </binding>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     SERVICE DEFINITION - A service groups a set of ports into

     a service unit.

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <service name="LoanCoverageProcess">

     <port binding="tns:LoanCoverageProcessBinding" name=
"LoanCoverageProcessPort">

     <soap:address location="
http://localhost:8080/ode/processes/LoanCoverageProcess"/>

     </port>

    </service>

</definitions>

////////////schema file risk

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<xs:schema version="1.0" targetNamespace="http://risk/" xmlns:tns="
http://risk/" xmlns:xs="http://www.w3.org/2001/XMLSchema">


  <xs:element name="calculateRisk" type="tns:calculateRisk"/>


  <xs:element name="calculateRiskResponse" type="tns:calculateRiskResponse"
/>


  <xs:complexType name="calculateRisk">

    <xs:sequence>

      <xs:element name="id" type="xs:int"/>

    </xs:sequence>

  </xs:complexType>


  <xs:complexType name="calculateRiskResponse">

    <xs:sequence>

      <xs:element name="risk" type="xs:int"/>

    </xs:sequence>

  </xs:complexType>

</xs:schema>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message