Hi,

I did some debugging and it turned out that the problem is caused by the PassByValueInterceptor.copy(). The interface is remotable and Abdera's object model doesn't conform to the JAXB default Java2WSDL mapping, neither does it implement java.io.Serializable.

There are a few things we can do:

1) Have the feed service binding provider to indicate that it allows pass by reference as the feed data is exchanged over HTTP and pass-by-value is achieved on the transport. (This is related to the ongoing discussion on pass-by-value).

2) Adjust the PassByInterceptor to use clone() to copy if none of the registered databindings can handle it and data implements Cloneable. (Abdera's object model implements Cloneable).

3) Add a new databinding for Abdera's Feed Object Model. This way, we will have better control for the data transformation as well as copy.

I'll check in a fix for 1 & 2 to get you going and refactor it when the PBV discussion is settled.

Thanks,
Raymond

----- Original Message ----- From: "Luciano Resende" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, February 21, 2008 5:27 PM
Subject: Databinding exceptions ? Abdera model objects missing no-arg default constructor. was Re: Support for Atom using Apache Abdera


I have started making progress on the porting binding-feed-atom to use
Apache Abdera, but trying to make a end-to-end invocation to retrieve
a collection, I have started to get some exceptions. After some debug,
this is looking to me related to databinding transformations requiring
default no-arg constructors.  Could someone with more experience on
the databinding framework give me some hints here, is this indeed the
databinding transformations happening during the invocation, and any
possible workaround.

SEVERE: Servlet.service() for servlet /customer/* threw exception
java.lang.IllegalArgumentException:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 25 counts of
IllegalAnnotationExceptions
org.apache.abdera.model.Collection is an interface, and JAXB can't
handle interfaces.
this problem is related to the following location:
at org.apache.abdera.model.Collection
at public org.apache.abdera.model.Collection
org.apache.abdera.parser.stax.FOMSource.getCollection()
at org.apache.abdera.parser.stax.FOMSource
at org.apache.abdera.parser.stax.FOMFeed
org.apache.abdera.model.Collection does not have a no-arg default constructor.
this problem is related to the following location:
at org.apache.abdera.model.Collection
at public org.apache.abdera.model.Collection
org.apache.abdera.parser.stax.FOMSource.getCollection()
at org.apache.abdera.parser.stax.FOMSource
at org.apache.abdera.parser.stax.FOMFeed


On Wed, Feb 20, 2008 at 3:37 PM, Jean-Sebastien Delfino
<[EMAIL PROTECTED]> wrote:
Luciano Resende wrote:
 [snip]

> I'll start by copying the current binding-feed
 > module
 [snip]

 I made a few minor changes to binding-feed today as I'm trying to use it
to provide ATOMPub access to the contribution workspace that I'm working on.

 The changes are in SVN r629625, r629626, r629651, r629652 and provide
 support for passing Hrefs and ids in new ATOM entries.


--
 Jean-Sebastien

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





--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

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



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

Reply via email to