SOAP defines a fault as a complex structure consisting of faultcode,
faultstring, detail, etc. It also defines a set of commonly used soapcodes.
Those are all specific to SOAP.

WSDL defines a fault to consist of one message, and complaint with WS-I,
that message has one element part. It then assigns a name to the fault.

The SOAP/WSDL binding associate the SOAP fault detail content -- as a single
element -- with the WSDL message part element, and on the WSDL side give you
the corresponding fault name.

But the faultcode and faultstring are lost in the process, there's no way to
access them at the message level. And the WSDL fault name is not necessarily
equivalent to the faultcode, although sometimes it may be.

BPEL only gives you the WSDL fault handling capabilities, but with the
benefit that it can support multiple protocols, not just the SOAP way of
communicating faults.

Assaf

On 1/5/07, Alex Boisvert <[EMAIL PROTECTED]> wrote:

Hi Alexnader,

Please see replies below.


On 12/22/06, Alexander Logvinov <[EMAIL PROTECTED]> wrote:
>
>  I've got a problem with handling SOAP fault in my BPEL process.
>

[snip]

After a while I've got an error:
>
> 21:44:44,899 | ERROR | pool-3-thread-2 | Receiver                 |
org.apache.ode.jbi.Receiver$1   192 | Error processing JBI message.
> java.lang.AssertionError: todo
>       at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:199)
>       at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:183)
>       at
org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execTransaction(
QuartzSchedulerImpl.java:212)
>       at org.apache.ode.jbi.OdeConsumer.outResponse(OdeConsumer.java
:182)
>       at org.apache.ode.jbi.OdeConsumer.onJbiMessageExchange(
OdeConsumer.java:134)
>       at
org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(
JbiMessageExchangeEventRouter.java:40)
>       at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
>
>
> It seems that it is raised by the following code in OdeConsumer.java
>
>     Fault jbiFlt = jbiMex.getFault();
>     if (jbiFlt != null) {
>
>         // TODO: How are we supposed to figure out the fault type
exactly?
>         throw new AssertionError("todo");
>     }
>


I've just created a new issue on your behalf to implement this:
http://issues.apache.org/jira/browse/ODE-87



Here are my questions:
> - Is there a proper way of handling a fault in a BPEL process in the
> current version of ODE?
>

This scenario works well in with the Axis2 integration but hasn't been
fully
implemented for the JBI integration.


- Can the BPEL process receive the data from faultstring and faultcode
> fields?
>


Yes, the SOAP fault detail should be accessible in the BPEL faultVariable.
The faultcode isn't directly accessible because BPEL is based on WSDL 1.1
/2.0
not SOAP itself.  So you have to define mappings between SOAP faults and
WSDL faults and catch WSDL faults in your process.

Hope this helps,
alex




--
CTO, Intalio
http://www.intalio.com

Reply via email to