[wp-xmlrpc] Re: [wp-hackers] AtomPub support

marumoto marumoto at gmail.com
Sun Feb 17 18:20:26 GMT 2008


hi

> Reading your site, you haven't made available the source code for your
> test tool?

Not all of the source is available at this point. However, a few days ago,
I made partial source code available to public at Google project.

"base classes for Atom feeds and entries"
http://code.google.com/p/delphi-atom/

> Interesting results. Do  you have detailed reports of each of the issues?

(1) 1. Malformed XML error when GETing a media link entry.

here is the dump.
----------------------------------------------------------------------------------------------------

HTTP/1.1 GET http://example.com/wp/wp-app.php/attachments
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Accept: application/atom+xml,application/atomsvc+xml,application/atomcat+xml
Accept-Charset: UTF-8
Authorization: Basic *************




HTTP/1.1 200 OK
Date: Sun, 17 Feb 2008 17:53:49 GMT
Server: Apache
X-Powered-By: PHP/4.4.6
X-Pingback: http://example.com/wp/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Sun, 17 Feb 2008 17:53:49 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Length: 4962
Content-Disposition: attachment; filename=atom.xml
Content-Type: application/atom+xml


<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="en">
	<id>http://example.com/wp/wp-app.php/attachments</id>
	<updated>2008-02-17T02:50:31Z</updated>
	<title type="text">test</title>
	<subtitle type="text">Just another WordPress weblog</subtitle>
	<link rel="first" type="application/atom+xml"
href="http://example.com/wp/wp-app.php/attachments"/>
	<link rel="last" type="application/atom+xml"
href="http://example.com/wp/wp-app.php/attachments"/>
	<link rel="self" type="application/atom+xml"
href="http://example.com/wp/wp-app.php/attachments"/>
	<rights type="text">Copyright 2008</rights>
	<generator uri="http://wordpress.com/"
version="1.0.5-dc">WordPress.com Atom API</generator>
	<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="en">
		<id>http://example.com/wp/wp-content/uploads/2008/02/garden.jpeg</id>
		<title type="text">garden</title>
		<updated>2008-02-12T12:45:44Z</updated>
		<published>2008-02-12T12:45:44Z</published>
		<app:edited>2008-02-12T12:45:44Z</app:edited>
		<app:control>
			<app:draft>no</app:draft>
		</app:control>
		<author>
			<name>admin</name>
			<email>info at example.com</email>
		</author>
		<link rel="edit-media"
href="http://example.com/wp/wp-app.php/attachment/file/83"/>
		<content type="image/jpeg"
src="http://example.com/wp/wp-content/uploads/2008/02/garden.jpeg"/>
		<link rel="edit" href="http://example.com/wp/wp-app.php/post/83"/>
		<category scheme="http://example.com/wp" term="Uncategorized"/>
		<summary type="text">garden.jpeg</summary>
	</entry>
	<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="en">
		<id>http://example.com/wp/wp-content/uploads/2007/12/bw-uploadstm-900-1.jpg</id>
		<title type="text">bw-uploadstm-900-1.jpg</title>
		<updated>2007-12-19T09:45:33Z</updated>
		<published>2007-12-19T09:45:33Z</published>
		<app:edited>2007-12-19T09:45:33Z</app:edited>
		<app:control>
			<app:draft>no</app:draft>
		</app:control>
		<author>
			<name>admin</name>
			<email>info at example.com</email>
		</author>
		<link rel="edit-media"
href="http://example.com/wp/wp-app.php/attachment/file/80"/>
		<content type="image/jpeg"
src="http://example.com/wp/wp-content/uploads/2007/12/bw-uploadstm-900-1.jpg"/>
		<link rel="edit" href="http://example.com/wp/wp-app.php/post/80"/>
		<category scheme="http://example.com/wp" term="Uncategorized"/>
		<summary type="text">
		</summary>
	</entry>
</feed>


HTTP/1.1 GET http://example.com/wp/wp-app.php/post/83
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Accept: application/atom+xml,application/atomsvc+xml,application/atomcat+xml
Accept-Charset: UTF-8
Authorization: Basic *********




HTTP/1.1 200 OK
Date: Sun, 17 Feb 2008 17:56:39 GMT
Server: Apache
X-Powered-By: PHP/4.4.6
Connection: close
Content-Length: 39
Content-Disposition: attachment; filename=atom.xml
Content-Type: application/atom+xml

<?xml version="1.0" encoding="utf-8"?>


HTTP/1.1 GET http://example.com/wp/wp-app.php/post/80
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Accept: application/atom+xml,application/atomsvc+xml,application/atomcat+xml
Accept-Charset: UTF-8
Authorization: Basic **************==




HTTP/1.1 200 OK
Date: Sun, 17 Feb 2008 17:56:41 GMT
Server: Apache
X-Powered-By: PHP/4.4.6
Connection: close
Content-Length: 39
Content-Disposition: attachment; filename=atom.xml
Content-Type: application/atom+xml

<?xml version="1.0" encoding="utf-8"?>

----------------------------------------------------------------------------------------------------
XML parser returns "XML document must have a top level element".
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


(2) 404 Not Found error on GETing a category and a collection
document if "WordPress address" and "Blog address" are different.

----------------------------------------------------------------------------------------------------
GET /wp/wp-app.php/service HTTP/1.1
Proxy-Connection: Keep-Alive
Accept: application/atom+xml,application/atomsvc+xml,application/atomcat+xml
Accept-Charset: UTF-8
Authorization: Basic ******************
User-Agent: AtomLib
Host: example.com
Pragma: no-cache

HTTP/1.1 200 OK
Date: Sun, 17 Feb 2008 17:58:12 GMT
Server: Apache
X-Powered-By: PHP/4.4.6
Connection: close
Content-Length: 700
Content-Disposition: attachment; filename=atom.xml
Content-Type: application/atomsvc+xml

<?xml version="1.0" encoding="utf-8"?>
<service xmlns="http://www.w3.org/2007/app"
xmlns:atom="http://www.w3.org/2005/Atom">
  <workspace>
    <atom:title>WordPress Workspace</atom:title>
    <collection href="http://example.com/HOGEHOGE/wp-app.php/posts">
      <atom:title>WordPress Posts</atom:title>
      <accept>application/atom+xml;type=entry</accept>
      <categories href="http://example.com/HOGEHOGE/wp-app.php/categories" />
    </collection>
    <collection href="http://example.com/HOGEHOGE/wp-app.php/attachments">
      <atom:title>WordPress Media</atom:title>
      <accept>image/*</accept><accept>audio/*</accept><accept>video/*</accept>
    </collection>
  </workspace>
</service>



GET /HOGEHOGE/wp-app.php/categories HTTP/1.1
Proxy-Connection: Keep-Alive
Accept: application/atom+xml,application/atomsvc+xml,application/atomcat+xml
Accept-Charset: UTF-8
Authorization: Basic YWRtaW46b3NoaWVuYWk=
User-Agent: AtomLib
Host: example.com
Pragma: no-cache



HTTP/1.1 404 Not Found
Date: Sun, 17 Feb 2008 17:58:15 GMT
Server: Apache
X-Powered-By: PHP/4.4.6
X-Pingback: http://example.com/wp/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Sun, 17 Feb 2008 17:58:15 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
......
...
..
.
----------------------------------------------------------------------------------------------------

WordPress installation directory:
http://example.com/wp/

mapped directory:
http://example.com/HOGEHOGE/
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------

(3) Entry's published and Edited time stamp is always the same.

POST an entry.

GET the entry. Time stamp is:

	<updated>2007-12-19T09:45:36Z</updated>
	<published>2007-12-19T09:45:26Z</published>
	<app:edited>2007-12-19T09:45:36Z</app:edited>

PUT the entry. Time stamp is:

	<updated>2008-02-17T18:18:16Z</updated>
	<published>2008-02-17T18:18:16Z</published>
	<app:edited>2008-02-17T18:18:16Z</app:edited>

This is obviously wrong.




On Feb 17, 2008 2:43 PM, Lloyd Budd <lloydomattic at gmail.com> wrote:
> On Feb 16, 2008 7:14 PM, marumoto <marumoto at gmail.com> wrote:
> > hi all
> > follow up on the WP's AtomPub support.
> >
> > I released the Atom interop testing client.
> > http://www.witha.jp/eXeries/software/
> > feedback much appreciated.
> >
> > Anyway, does anyone confirm this?
> >
> >  1. Malformed XML error when GETing a media link entry.
> >  2. 404 Not Found error on GETing a category and a collection
> > document if "WordPress address" and "Blog address" are different.
> >  3. Entry's published and Edited time stamp is always the same.
> > published date should stay the same.
> >
> > I confirmed this same behavior at wordpress.com as well.
> > (although AtomPub at wordpress.com has stopped working a few weeks ago)
>
> Marumoto,
>
> Interesting results. Do  you have detailed reports of each of the issues?
>
> Reading your site, you haven't made available the source code for your
> test tool?
>
> Thank you,
> --
> Lloyd Budd | Digital Entomologist | | Skype:foolswisdom
> WordPress.com | WordPress.org | Automattic.com
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>


More information about the wp-xmlrpc mailing list