Denis,

I'm a bit familiar with SOAP faults (maybe you are using pure HTTP 
request-response, and it that case, I don't know at all if fault handling works 
fine).

Note, as I know (?):
"<ext:faultOnFailure>true</ext:faultOnFailure>"
Will make the workflow state to be fault, but it is not mandatory if the 
workflow catching is a "normal" activity of the workflow.

You should declare your faultHandlers inside a scope (see below). The 
faultVariable is the name of the variable where goes the SOAP fault message, 
the faultMessageType is the definition name declared in your WSDL. Check that 
your service Exception is a real SOAP fault (see below a typical SOAP fault 
sample) and the following sample code works fine with SOAP exception (in that 
sample, it put the SOAP exceptionReport element inside another variable (which 
is used to send to another service).

I hope it helps (sorry if I gave wrong information),

Christophe NOEL
Spacebel

In your BPEL file:
      <bpel:faultHandlers>
        <bpel:catch faultVariable="WPSG-SSEGRIDexceptionReportFaultVar" 
faultMessageType="WPSG-SSEGRID:exceptionReport">
          <bpel:scope bpmn:label="Sync. Exception handling" 
name="Sync._Exception_handling" bpmn:id="_gPDQsEgeEeGe7ZsdO5vehw">
[...]
                <bpel:copy>
                  
<bpel:from>$WPSG-SSEGRIDexceptionReportFaultVar.exception</bpel:from>
                  
<bpel:to>$mpiwpsgExecuteResponseCallbackRequestMsg.parameters/wps:Status/wps:ProcessFailed/ows:ExceptionReport</bpel:to>
                </bpel:copy>

In WSDL operation bindings:
                        <wsdl:fault name="ExceptionReport">
                        <soap:fault use="literal" name="ExceptionReport"/>
                        </wsdl:fault>
In operation portType definition:
                        <wsdl:fault name="ExceptionReport" 
message="wpsx:exceptionReport"></wsdl:fault>
In WSDL message definitions (as example):
                        <wsdl:message name="exceptionReport">
                                <wsdl:part name="exception" 
element="ows:ExceptionReport"/>
                        </wsdl:message>

Sample SOAP fault message:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope";
              xmlns:m="http://www.example.org/timeouts";
              xmlns:xml="http://www.w3.org/XML/1998/namespace";>
 <env:Body>
  <env:Fault>
   <env:Code>
     <env:Value>env:Sender</env:Value>
     <env:Subcode>
      <env:Value>m:MessageTimeout</env:Value>
     </env:Subcode>
   </env:Code>
   <env:Reason>
     <env:Text xml:lang="en">Sender Timeout</env:Text>
   </env:Reason>
   <env:Detail>
     <m:MaxTime>P5M</m:MaxTime>
   </env:Detail>    
  </env:Fault>
 </env:Body>
</env:Envelope>
-----Original Message-----
From: Denis Weerasiri [mailto:[email protected]] 
Sent: vendredi 24 février 2012 05:53
To: [email protected]
Subject: Re: Intercept Web Service invocation fault

On Thu, Feb 23, 2012 at 3:50 PM, Rudy Commenge <[email protected]>wrote:

> Hi,
>
> In a BPEL process, I invoke a Web Service which can return a fault.
> I try to propagate this error to the output of my BPEL process.
>
> That I have done :
>            <ext:failureHandling xmlns:ext="
> http://ode.apache.org/activityRecovery";>
>                <ext:faultOnFailure>true</ext:faultOnFailure>
>            </ext:failureHandling>
>            ...
>            <bpel:faultHandlers>
>                <bpel:catchAll>
>                    <bpel:sequence>
>                        <bpel:rethrow />
>                        <bpel:exit />
>                    </bpel:sequence>
>                </bpel:catchAll>
>            </bpel:faultHandlers>
>            ...
>            <bpel:invoke ....>
>                <bpel:catchAll><bpel:sequence>
>                    <bpel:rethrow />
>                </bpel:sequence></bpel:catchAll>
>            </bpel:invoke>
>
> Currently, this process propagate an "Activity failure" fault, and not 
> the real fault received from the invoked web service.
>
Looking at the process, it's hard to figure out the reason.
Can you attach the console log related to "Activity failure" ?

>
> Ho to do ?
>
> Best regards,
>
> Rudy
>



--
Thanks,
Denis
----------------------------------------------------------
*Denis Weerasiri*
*
*
 <http://wso2.com/>**** <http://wso2.com/>*site: ** 
https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
*blog: **http://ddweerasiri.blogspot.com* <http://ddweerasiri.blogspot.com/>
*
twitter: **http://twitter.com/ddweerasiri* <http://twitter.com/ddweerasiri>*
linked-in: 
**http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>

 ------------------------------------------------------------------------------

E-MAIL DISCLAIMER

The present message may contain confidential and/or legally privileged 
information. If you are not the intended addressee and in case of a 
transmission error, please notify the sender immediately and destroy this 
E-mail. Disclosure, reproduction or distribution of this document and its 
possible attachments is strictly forbidden.

SPACEBEL denies all liability for incomplete, improper, inaccurate, 
intercepted, (partly) destroyed, lost and/or belated transmission of the 
current information given that unencrypted electronic transmission cannot 
currently be guaranteed to be secure or error free.
Upon request or in conformity with formal, contractual agreements, an 
originally signed hard copy will be sent to you to confirm the information 
contained in this E-mail.

SPACEBEL denies all liability where E-mail is used for private use.

SPACEBEL cannot be held responsible for possible viruses that might corrupt 
this message and/or your computer system.
 -------------------------------------------------------------------------------

Reply via email to