I have tried the first idea gave by Raymond, and now the getFeed() is
working without the mentioned marshal/umarshal problem.

Thanks

On Wed, Jun 18, 2008 at 2:17 AM, Luciano Resende <[EMAIL PROTECTED]>
wrote:

> I guess the Invoker is not available yet, but I committed Douglas last
> patch in java/modules/binding-gdata. I'll try to take a look at this
> tomorrow as well, this should be similar to what we had to do for
> binding-atom-abdera.
>
> On Tue, Jun 17, 2008 at 8:16 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > The main issue here is that we don't know how to handle the databinding
> for
> > the GData. My wide guess is that the pass-by-value interceptor is
> triggered
> > to copy the data to enforce the PBV semantics for the remotable
> interface.
> >
> > Here are a few things you can do to avoid this:
> >
> > 1) Have the GDataBinding invoker to implement DataExchangeSemantics SPI
> and
> > return true for the allowsPassByReference() method.
> > 2) Add a new databinding for GData so that Tuscany knows about GData and
> > handles the copy, marshal/unmarshal of the data correctly.
> >
> > Please point me to the code so that I can give you more suggestions.
> >
> > Thanks,
> > Raymond
> >
> > --------------------------------------------------
> > From: "Douglas Leite" <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 17, 2008 7:02 PM
> > To: "Tuscany-Developers" <[email protected]>
> > Subject: [GSOC] Issues with JAXB at GData binding
> >
> >> I have started to implement the invokers at binding-gdata module. Maybe,
> >> the
> >> simplest operation is retrieve a feed from an specific URI. So, I have
> >> chosen the getFeed() method as the first one to be implemented.
> >>
> >> Trying to think as simple as possible, and using the gdata java client,
> >> the
> >> method follow these steps:
> >>
> >> 1) Set the user credentials;
> >> 2) Get the feed at an URI as a com.google.gdata.data.Feed object;
> >> 3) Pass the feed object to the body of the message object
> >> (org.apache.tuscany.sca.invocation.Message);
> >>
> >> The following piece of code demonstrate it:
> >> *
> >>    //FIXME - Get credentials automatically
> >>    myService.setUserCredentials("[EMAIL PROTECTED]",
> "gsoc2008");
> >>
> >>    Feed feed = (Feed) myService.getFeed(new URL(uri), Feed.class);
> >>
> >>    msg.setBody(feed);*
> >>
> >> However, I am having some issues with marshalling/unmarshalling the Feed
> >> object while passing it to the message body. I got these output:
> >>
> >> Exception in thread "main" java.lang.IllegalArgumentException:
> >> com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of
> >> IllegalAnnotationExceptions
> >> com.google.gdata.data.BaseFeed does not have a no-arg default
> constructor.
> >>   this problem is related to the following location:
> >>       at com.google.gdata.data.BaseFeed
> >>       at com.google.gdata.data.Feed
> >> com.google.gdata.client.Service$GDataRequestFactory is an interface, and
> >> JAXB can't handle interfaces.
> >>   this problem is related to the following location:
> >>       at com.google.gdata.client.Service$GDataRequestFactory
> >>       at public com.google.gdata.client.Service$GDataRequestFactory
> >> com.google.gdata.client.Service.getRequestFactory()
> >>       at com.google.gdata.client.Service
> >>       at public com.google.gdata.client.Service
> >> com.google.gdata.data.BaseEntry.getService()
> >>       at com.google.gdata.data.BaseEntry
> >>       at public java.util.List
> com.google.gdata.data.BaseFeed.getEntries()
> >>       at com.google.gdata.data.BaseFeed
> >>       at com.google.gdata.data.Feed
> >> com.google.gdata.client.Service$GDataRequestFactory does not have a
> no-arg
> >> default constructor.
> >>   this problem is related to the following location:
> >>       at com.google.gdata.client.Service$GDataRequestFactory
> >>       at public com.google.gdata.client.Service$GDataRequestFactory
> >> com.google.gdata.client.Service.getRequestFactory()
> >>       at com.google.gdata.client.Service
> >>       at public com.google.gdata.client.Service
> >> com.google.gdata.data.BaseEntry.getService()
> >>       at com.google.gdata.data.BaseEntry
> >>       at public java.util.List
> com.google.gdata.data.BaseFeed.getEntries()
> >>       at com.google.gdata.data.BaseFeed
> >>       at com.google.gdata.data.Feed
> >>       . . .
> >>
> >> BaseFeed is a super type of Feed, and although it does not have a no-arg
> >> default constructor, the Feed has one.
> >>
> >> Thoughts?
> >>
> >> --
> >> Douglas Siqueira Leite
> >> Computer Science Master's degree student of University of Campinas
> >> (Unicamp)
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
Douglas Siqueira Leite
Computer Science Master's degree student of University of Campinas (Unicamp)

Reply via email to