On Thu, Sep 9, 2010 at 3:35 PM, Millies, Sebastian <[email protected]> wrote: > thanks for the explanation. However, when I tested this just now, it didn't > work. Perhaps I misunderstood, or there's a bug in Tuscany. > > What I did was annotate the abstract exception class as follows > > @XmlJavaTypeAdapter(CurrencyConverterExceptionAdapter.class) > public abstract class CurrencyConverterException extends Exception > > and implement the adapter class in the same server-side package, so it can > get imported by the client together with the exception. The adapter simply > serializes the exception to and from a string in the format > "concreteClassName#message". > > On the client side I changed nothing. When I ran this code in Tuscany 1.6 > (calling the server from a different node to make sure the ws-binding is > used), > the unmarshal/marshal methods in the adapter do not even get called. Is there > anything more I have to do except implement the adapter class? I'm sorry if > this is a naive question, but it really sounded so simple in your post. > > -- Sebastian
Hi Sebastien Unfortunately I don't think the @XmlJavaTypeAdapter JAXB annotation is supported in the 1.x code base. If was added to the 2.x code base at r743192 if you want to look it up. The interface test was extended here [1] [1] http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java Regards Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com
