11 Replies Latest reply: Jul 1, 2011 2:32 PM by Gary Brown RSS

ode activityFauilre

jonny 69 Newbie

Hi everyone,

 

I'm using JbossEsb 4.9 and riftsaw 2.2.0 Final and I have two simple process with one invoke. Each process invoke different web services. Each invoke throws SOAP Fault but only in one process I'm able to catch this fault using ode extension. Only one different thing I've noticed, is missing namespace alias in throwing fault. This is responses which I'm getting back in process execution:

 

Ok response:

 

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

    <env:Header></env:Header>

    <env:Body>

        <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

            <faultcode>env:Server</faultcode>

            <faultstring>MyNewFaultTypeException [info=ERROR_INFO, error=FATAL_ERROR]</faultstring>

            <detail>

                <ns2:MyNewFaultTypeException xmlns:ns2='http://test.pl/ws/test'>

                    <error>FATAL_ERROR</error>

                    <info>ERROR_INFO</info>

                </ns2:MyNewFaultTypeException>

            </detail>

        </env:Fault>

    </env:Body>

</env:Envelope>

 

This response I can't catch:

 

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

    <env:Body>

        <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

            <faultcode>env:Server</faultcode>

            <faultstring/>

            <detail>

                <fault xmlns='http://xx.com/content' xmlns:xx='http://xx.com'>

                    <code>1</code>

                    <message>message</message>

                </fault>

            </detail>

        </env:Fault>

    </env:Body>

</env:Envelope>

 

 

In reponse form process I'm getting

 

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

<env:Header/>

<env:Body>

  <env:Fault>

   <faultcode xmlns:valueNS='http://ode.apache.org/activityRecovery'>valueNS:activityFailure</faultcode>

  </env:Fault>

</env:Body>

</env:Envelope>

 

Is it some bug in riftsaw, ode ? Any Idea

  • 1. Re: ode activityFauilre
    Gary Brown Master

    This would be an ODE issue, as it is related to the core state machine execution. Do you have a testcase that you can submit to reproduce this problem?

     

    It might also be worth raising the issue on the ODE user forum.

     

    Regards

    Gary

  • 2. Re: ode activityFauilre
    jonny 69 Newbie

    Yes I've a testcase but I need some time to prepare webservices. Now it's working on my private interfaces which I rather do not give access to them, but I can try to do that. And I have another question, is it possible to catch soap fault which is not explicit declare in requested ws method?

  • 3. Re: ode activityFauilre
    Gary Brown Master

    Yes it should be possible to catch a SOAP fault - the catched fault does not necessarily need to be associated with an operation - its possible that a fault can just be thrown within the process.

     

    As long as there is a QName to identify the fault it should be possible - having said that we don't have any examples that demonstrate this.

     

    Regards

    Gary

  • 4. Re: ode activityFauilre
    jonny 69 Newbie

    I'm not sure but I'm almost sure that I can only catch that fault in catchAll activity and I can not get specific information form fault. I'll check that tommorow and give you response. Maybe I do something wrong or should use some extension to get that information from response fault. I wish you have any example ...:(

    Anyway Thanks for your help

  • 5. Re: ode activityFauilre
    jonny 69 Newbie

    Hi again,

     

    I'll check that issue, and I noticed that I don't know how catch soap fault if there is not explicit declare in ws method. Maybe I should declare some fault message variable but how ? There is no such variable in ws .... Could you help me more with that issue ?

  • 6. Re: ode activityFauilre
    Gary Brown Master

    You could try defining the faultVariable name and then provide the type of the fault in the faultElement field?

  • 7. Re: ode activityFauilre
    jonny 69 Newbie

    I'm trying but I always get back: Fault response: faultType=(unknown)

  • 8. Re: ode activityFauilre
    Gary Brown Master

    Might have to stick with the catchAll then. Anyone else got any suggestions?

  • 9. Re: ode activityFauilre
    Andrzej Zińczuk Newbie

    Hi all,

     

    is there any chance to recognize and use fault fields in catchAll block then? Is there any variable or something to this?

     

    How such an exception can be caught and faultcode value "fault:FAULT_005" recoginized?

     

    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

       <env:Header/>

       <env:Body>

          <env:Fault xmlns:fault="http://test.com/somespace">

             <faultcode>fault:FAULT_005</faultcode>

             <faultstring>wrong input data</faultstring>

             <detail>Correct format is: XXXX.</detail>

          </env:Fault>

       </env:Body>

    </env:Envelope>

  • 10. Re: ode activityFauilre
    Andrzej Zińczuk Newbie

    So is it possible to handle such situation, or not?

     

    I've googled that topic, there are some solutions provided in oracle bpel and I can't find anything about riftsaw. Maybe it rare situation, but still, it is general exception which can be throws by service according to soap spec.

     

    any help will be appreciated.

  • 11. Re: ode activityFauilre
    Gary Brown Master

    Best place to ask would be the ODE user forum.