You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Augusto Diaz <ad...@gmail.com> on 2009/08/05 03:20:08 UTC

Re: How to use the element in BPEL?

Hi Mark,

I cannot access the contents of the fault message. I tried in several
ways but I without succeded. Could you please help me?

Im sending you my BPEL file and the WSDL that defines the fault.

Or if you have a link with an example it would be excellent.

Thanks in advance.



2009/7/30 Ford, Mark <ma...@ll.mit.edu>:
> There are three types of faults:
>
>  *   standard BPEL faults like bpel:selectionFailure. These typically indicate a problem in your process where you've not implemented something correctly
>  *   custom faults that you throw internally with the bpel:throw activity. This can be any type of xml data you want.
>  *   faults resulting from web service invokes. The fault will be defined on the operation that you're invoking. An operation may define multiple faults.
>
> It sounds like you're asking how to access the SOAP fault from an invoke. The short answer is that there is nothing in the spec about SOAP and there are no built in functions to access the faultCode, faultActor, or faultString.
>
> The typical use case here is to define a catch for each fault that is defined on the operation you're invoking. Make sure the name and the fault message/element matches what's defined in the WSDL for the operation. Each catch defined in this way serves as a declaration of a variable of that message/element that is scoped to that catch. When the catch executes, you can access the contents of the fault message/element just like any other variable. Keep in mind, the contents of this variable will be limited to what's defined in the WSDL. If you're familiar with SOAP, then it's probably the first child element of the fault detail element.
>
> On 7/30/09 3:11 AM, "kodeninja" <ko...@gmail.com> wrote:
>
>
>
> Thanks for the pointer, Nelson. However, I'm still not clear on how to catch
> hold of the actual exception trace/error code etc from the fault variable.
> How to access that?
>
> -Kodeninja
> --
> View this message in context: http://www.nabble.com/How-to-use-the-%3Ccatch%3E-element-in-BPEL--tp24719833p24733273.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>
>
>
>
> --
> Mark Ford
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington MA 02420
> (781) 981-1843
>



-- 
Atentamente

L.I. José Augusto Díaz Noriega

Re: How to use the element in BPEL?

Posted by "Ford, Mark" <ma...@ll.mit.edu>.
Your bpel was using a catchAll. You need to define a catch that is specific to the fault you're trying to catch. There's a primer on bpel here:

http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.pdf


On 8/4/09 9:20 PM, "Augusto Diaz" <ad...@gmail.com> wrote:

Hi Mark,

I cannot access the contents of the fault message. I tried in several
ways but I without succeded. Could you please help me?

Im sending you my BPEL file and the WSDL that defines the fault.

Or if you have a link with an example it would be excellent.

Thanks in advance.



2009/7/30 Ford, Mark <ma...@ll.mit.edu>:
> There are three types of faults:
>
>  *   standard BPEL faults like bpel:selectionFailure. These typically indicate a problem in your process where you've not implemented something correctly
>  *   custom faults that you throw internally with the bpel:throw activity. This can be any type of xml data you want.
>  *   faults resulting from web service invokes. The fault will be defined on the operation that you're invoking. An operation may define multiple faults.
>
> It sounds like you're asking how to access the SOAP fault from an invoke. The short answer is that there is nothing in the spec about SOAP and there are no built in functions to access the faultCode, faultActor, or faultString.
>
> The typical use case here is to define a catch for each fault that is defined on the operation you're invoking. Make sure the name and the fault message/element matches what's defined in the WSDL for the operation. Each catch defined in this way serves as a declaration of a variable of that message/element that is scoped to that catch. When the catch executes, you can access the contents of the fault message/element just like any other variable. Keep in mind, the contents of this variable will be limited to what's defined in the WSDL. If you're familiar with SOAP, then it's probably the first child element of the fault detail element.
>
> On 7/30/09 3:11 AM, "kodeninja" <ko...@gmail.com> wrote:
>
>
>
> Thanks for the pointer, Nelson. However, I'm still not clear on how to catch
> hold of the actual exception trace/error code etc from the fault variable.
> How to access that?
>
> -Kodeninja
> --
> View this message in context: http://www.nabble.com/How-to-use-the-%3Ccatch%3E-element-in-BPEL--tp24719833p24733273.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>
>
>
>
> --
> Mark Ford
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington MA 02420
> (781) 981-1843
>



--
Atentamente

L.I. José Augusto Díaz Noriega




--
Mark Ford
MIT Lincoln Laboratory
244 Wood Street
Lexington MA 02420
(781) 981-1843