Thought I'm mention:

I'm in the process of adding support for generating exceptions from faults
in the Axis2 W2J.  This addresses one or more JIRAs that have been opened.
  My code basically works but I need to merge with the latest code and
clean up a bit.     I don't want to stop anyone from doing a better job ;)
but if someone is looking for something to do I thought I'd mention that I'm
getting close to completing this.   Maybe in a week or so it will be
ready.

I modeled the generated exception after the JAX-WS spec's statements on the
subject.   That is, the wrapper exception defines a getFaultInfo() which
returns the fault SDO, and it is Tuscany-sensitive in producing the
FAULT_ELEMENT QName field.  It seems to be compatible with the Tuscany Axis2
binding and DataBinding code.

Scott



On 4/3/07, Raymond Feng <[EMAIL PROTECTED]> wrote:

Hi, Corville.

Please see my comments inline.

Thanks,
Raymond

----- Original Message -----
From: "Corville Allen" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Monday, April 02, 2007 7:32 PM
Subject: Implementing support for Business Exceptions


> Hello,
>
> I have a few questions on this support.
>
> I've looked at
> http://cwiki.apache.org/confluence/display/TUSCANY/BusinessExceptionsbut
> there are still some gaps that I don't quite understand how to implement
> this support.
>
> Is the support only for checked exceptions on a java interface?

As defined by the SCA spec, only checked exceptions are handled as
business
exceptions for java interfaces. For WSDL, faults are supported.

>
> Does this mean that for a WSDL we should generate java interfaces?
>

It depends on what databinding is used for WSDL. For example, if JAXB is
used, then the JAX-WS codegen will generate Java exceptions to represent
the
faults based on the JAX-WS spec. If SDO is used, we assume a similar
mapping
rule as JAXB since the SDO spec doesn't touch this area.

If the same fault in represented in different databindings, Tuscany can
transform them based on the interface contract.

> Does this require a specific wsdl2java generator?
>

I assume so.

> How do you go about propagating an exception up the chain?
>

The business exception is carried in the Message body and it can be set by
calling Message.setBodyWithFault().

> What are the options for a transport binding to propagate one of the
> checked
> exceptions up the change?
>

I think it is binding-specific. For the binding.axis2, we propagate the
fault in SOAP messages.

> Do you just create an InvocationRuntimeException with the checked
> exception
> as the cause?
>
>
> -Corville
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to