On Tue, Apr 21, 2009 at 12:09 PM, L. J.W <[email protected]> wrote:
> Hi simon,I mean that in server provider,if a service method throw a
> BizRuntimeException,how to catch this BizRuntimeException in service
> consumer(maybe java or .net),consumer not know BizRuntimeException class at
> all.
> need parse and analyse the fault soap message ?It seems a bit ugly,any
> beautiful resolution exist?any example?
>
> On Tue, Apr 21, 2009 at 5:29 PM, Simon Laws <[email protected]>
> wrote:
>>
>> On Tue, Apr 21, 2009 at 9:50 AM, L. J.W <[email protected]> wrote:
>> > Hi all,how can I process exception in tuscany,for example:service
>> > provide
>> > throw BizRuntimeException when process bizMethod,service consumer(don't
>> > know
>> > BizRuntimeException at all ) can only receive:
>> >
>> > org.osoa.sca.ServiceRuntimeException:
>> > org.apache.tuscany.sca.interfacedef.util.FaultException:
>> > com.wiscom.tuscany.demo.baseinfo.BizException
>> >
>> > any framework or util to process this common issue?
>> >
>> > Thanks.
>>
>> Hi
>>
>> It's not clear if you are trying to understand a limitation of the
>> Tuscany runtime or if this is the way that your application is
>> structured.
>>
>> Are you saying that the service is implemented to throw
>> BizRuntimeException but that the service interface, as described to
>> the consumer of the service, can only see BizException?
>>
>> Regards
>>
>> Simon
>
>

If you have a service that a consumer is going to use then the
consumer needs to understand the interface of the service. Including
the exceptions that can be thrown. In SCA we support several different
interface languages including inteface.java and interface.wsdl. If you
provide the consumer with a Java interface file, and the consumer is
implemented in Java, then they could use this straight off. If WSDL is
provided then the consumer will need to generate interfaces
appropriate for the environment in which they operate. Which eve route
is taken the interface should describe the exceptions that the service
is able to return and hence the consumer should be able to take the
appropriate action.

Have you spotted some deficiencies in Tuscany in this area?

Regards

Simon

Reply via email to