abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: exception handling post response
Date Thu, 25 Oct 2007 19:59:46 GMT
The response from typepad is invalid.  The namespace is wrong; it is
supposed to be http://www.w3.org/2005/Atom

> <entry xmlns="http://purl.org/atom/ns#"

- James

Woody Anderson wrote:
> Hello, so i'm currently posting directly to a typepad.com url (can't
> seem to get introspection working with typepad, which is a separate
> issue)
> 
> so i create a post:
> 
>        response = client.post(.....);
>        org.apache.abdera.model.Document<Entry> doc = response.getDocument();
>        Entry entry = doc.getRoot();
> 
> so i get this exception:
> java.lang.ClassCastException: org.apache.abdera.parser.stax.FOMExtensibleElement
> at the "entry = getRoot()" line
> 
> which is pretty odd i think.
> 
> i get back a 201 "created" response: Headers follow:
> HTTP/1.1 201 Created
> Date: Thu, 25 Oct 2007 19:28:18 GMT
> Server: Apache
> Location: http://www.typepad.com/t/atom/weblog/blog_id=123456789/entry_id=40686808
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> Last-Modified: Thu, 25 Oct 2007 19:28:20 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
> Content-Type: application/atom+xml
> Via: 1.1 www.typepad.com (Apache/2.2.3)
> Vary: Accept-Encoding,User-Agent
> Content-Encoding: gzip
> Content-Length: 501
> Connection: close
> 
> 
> here's the wireshark'd response payload:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <entry xmlns="http://purl.org/atom/ns#"
> xmlns:default="http://www.w3.org/1999/xhtml"
> xmlns:post="http://sixapart.com/atom/post#">
>   <title xmlns="http://purl.org/atom/ns#">Example Title</title>
>   <summary xmlns="http://purl.org/atom/ns#"></summary>
>   <content xmlns="http://purl.org/atom/ns#"
> xmlns:default="http://www.w3.org/1999/xhtml" mode="xml">
>     <div xmlns="http://www.w3.org/1999/xhtml"><p>Example Text</p>null</div>
>   </content>
>   <issued xmlns="http://purl.org/atom/ns#">2007-10-25T12:20:05-07:00</issued>
>   <link xmlns="http://purl.org/atom/ns#" rel="alternate"
> href="http://example.typepad.com/eg/2007/10/example-title.html"
> title="HTML" type="text/html"/>
>   <id xmlns="http://purl.org/atom/ns#">tag:typepad.com,2003:post-40686452</id>
>   <post:convertLineBreaks
> xmlns:post="http://sixapart.com/atom/post#">true</post:convertLineBreaks>
>   <author xmlns="http://purl.org/atom/ns#">
>     <name xmlns="http://purl.org/atom/ns#">joey joe joe</name>
>   </author>
>   <link xmlns="http://purl.org/atom/ns#" rel="service.edit"
> href="http://www.typepad.com/t/atom/weblog/blog_id=123456789/entry_id=40686452"
> title="Example Title" type="application/atom+xml"/>
> </entry>
> 
> 
> which seems quite parseable and looks to be an Entry to me.
> any thoughts?
> 
> oh, and i'm using release .6
> -w
> 

Mime
View raw message