Search code examples
eclipsetomcateclipse-pluginbpel

Error when running a bpel process in ode


I'm trying to learn to work with bpel. I choose Eclipse Bpel Designer and apache ode (on a tomcat server) in order to experiment. The process I tried to model was a loan process. It has 3 services: a creditRate service (written in eclipse bpel designer and deployed befo-hand an tested that it works), a currency converter service, and the main orchestration process. While I had no errors on deployment when testing the web service from eclipse following errors occur:

ERROR [ExternalService] Error sending message to Axis2 for ODE mex {PartnerRoleMex#hqejbhcnphr87mcnd0np43 [PID {CreditBuletinNamespace}CreditBuletin-137] calling org.apache.ode.bpel.epr.WSAEndpoint@a64453.getRating(...) Status REQUEST} org.apache.ode.axis2.OdeFault: Binding operation not found: service {http://www.webserviceX.NET/}CurrencyConvertor port CurrencyConvertorSoap name getRating. at org.apache.ode.axis2.util.SoapMessageConverter.createSoapRequest(SoapMessageConverter.java:154)

and

Failure during invoke: Error sending message to Axis2 for ODE mex {PartnerRoleMex#hqejbhcnphr87mcnd0np43 [PID {CreditBuletinNamespace}CreditBuletin-137] calling org.apache.ode.bpel.epr.WSAEndpoint@a64453.getRating(...) Status REQUEST} 21:09:14,421 INFO [BpelRuntimeContextImpl] ActivityRecovery: Registering activity 19, failure reason: Error sending message to Axis2 for ODE mex {PartnerRoleMex#hqejbhcnphr87mcnd0np43 [PID {CreditBuletinNamespace}CreditBuletin-137] calling org.apache.ode.bpel.epr.WSAEndpoint@a64453.getRating(...) Status REQUEST} on channel 33

Can someone help me out with a solution? I have searched for some solution but have not found one that works. It may be that due to my poor knowledge I am not searching right or not doing something right. Because this description may be confusing I have attached my solution because I believe they will tell more of what I'm trying to do and how wrong I am doing it. http://www.mediafire.com/?9bjgt44spln1zwr

Thank-you in advance

EDIT: after doing an iterative approach (as sugested in the first answer) it seems that the external conversion service was not responding from ode. This is strange because the service worked from the browser and no error was reported when deplying. Again because of my poor knowledge I believe code speaks better than my phrasing. I have made an eclipse project just with the external currency convertor. Any help / guidance is heartly appreciated. Thank you in advance. http://www.mediafire.com/?56csca1qgt5ka9a


Solution

  • Your CreditRating process works fine, the error lies in the CreditBuletin process. When I test this one with soapUI, I get a selectionFailure. This error in BPEL tells you that something is wrong with a from or to in your process.

    To outline the problem here is a very simplified version of the activities of your CreditBuletin process, reduced to just the initial receive, the final reply and one of your assign activities inbetween. You can paste this into the main sequence of your process to reproduce the problem.

    <bpel:receive name="receiveInput" partnerLink="clientInput" operation="getLoan" portType="tns:CreditBuletinPT" variable="receiveInput" createInstance="yes"></bpel:receive>
    
            <bpel:assign validate="no" name="AssignFinal">
                <bpel:copy>
                    <bpel:from>
                        <bpel:literal>
                            <tns:SumaRON xmlns:tns="CreditBuletinNamespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                <output>0</output>
                            </tns:SumaRON>
                        </bpel:literal>
                    </bpel:from>
                    <bpel:to variable="outputResult" part="parameters"></bpel:to>
                </bpel:copy>
                <bpel:copy>
                    <bpel:from>
                        <![CDATA[$loanWithInterest * bpel:getVariableData('CurrencyRateInputResponse','parameters','ConversionRateResult')]]>
                    </bpel:from>
                    <bpel:to part="parameters" variable="outputResult">
                        <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[output]]>
                        </bpel:query>
                    </bpel:to>
                </bpel:copy>
            </bpel:assign>
    
            <bpel:reply name="outputResult" partnerLink="clientInput" operation="getLoan" portType="tns:CreditBuletinPT" variable="outputResult"></bpel:reply>
    

    You are trying to assign the same variable twice, first with a default initialization. This doesn't make much sense, but for some reason the BPEL editor generates these initializations on default. You get a correct reply, if you change the from statement in the second copy to something else, for instance

    <![CDATA[bpel:getVariableData('receiveInput','parameters','suma')]]>
    

    So, your problem(s) come(s) from your from statements, most likely the ones that use the getVariableData() function. Now, I don't want to repair all expressions in your process (because there are many and that is your task), but I suggest to have a look at all of them. Start with a minimal working process, such as the one above with the from exchanged and do incremental updates of functionality while testing each increment. That way, you will eventually end up with something that works.