Thanks Erling. My entry had an edit link, though I didn't create it
explicitly (apparently it was created for me during the initial post). I
actually just got this to work this morning through trial and error... I
added:
RequestOptions options =
client.getDefaultRequestOptions();
options.setUsePostOverride(true);
And voila- suddently I can put!! Who would have known?!!
Thanks again! Have a great wknd!
Jeff
-----Original Message-----
From: Erling Wegger Linde [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2008 9:31 AM
To: [email protected]
Subject: Re: problems "putting" an Entry
Just from reading the first few lines of your post:
I had troubles with putting and deleting on a collection when I first
started using AtomPub, it was often because I had forgotten an "edit"
link in my entry(ies). Maybe that's what you lack too.
- Erling
On Fri, Sep 12, 2008 at 1:58 AM, Jeff Klein <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> I'm having difficulties doing a put to my collection. I can post and
> get ok using AbderaClient, but I'm coming up short doing a get.
>
> Here's my test case:
>
> 1) post (create) an entry using AbderaClient
> 2) do a get on the new entry using the ID obtained in #1
> 3) call setContent on the Entry obtained in #2
> 4) try to update the entry on the server using AbderaClient.put
>
> The resulting ResponseContext object returns CLIENT_ERROR when I call
> response.getType().
>
> Is there something I am doing wrong? Do I need to set some non-default
> RequestOptions?
>
> BTW, when I PUT my entry XML from poster (firefox HTTP client plugin),
> I get the following back from my Abdera server...
>
> <?xml version='1.0' encoding='UTF8'?><error
> xmlns="http://incubator.apache.org/abdera"><code>415</code><message>Me
> di a Type Not Supported</message></error>
>
>
> Oh, one other thing... I am using AbstractEntityCollectionAdapter.
> Just for giggles I overrode putEntry in my subclass, just to see if it
> was getting called, and to see what MimeType was being interpreted as
> on the server (see below). But my log message never showed up in the
logs...
> putEntry() never got called.
>
> Thanks in advance, Jeff
>
> public ResponseContext putEntry(RequestContext request)
>
> {
>
> log.debug("in putEntry(RequestContext)
> mimetype="+request.getContentType());
>
> return super.putEntry(request);
>
> }
>
>
--
Med vennlig hilsen
Erling Wegger Linde