Hi Luciano,

So to clarify, let's say for example, this is the response header and body provided when someone POSTs or GETs an Atom entry:

HTTP/1.1 201 Created
Date: Fri, 23 Feb 2007 21:17:11 GMT
Content-Type: application/atom+xml;type=entry
ETag: "e180ee84f0671b1"
Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500

<?xml version="1.0" ?>
<entry xmlns="http://www.w3.org/2005/Atom";>
  <title>Atom-Powered Robots Run Amok</title>
  <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
  <updated>2007-02-123T17:09:02Z</updated>
  <author><name>Captain Lansing</name></author>
  <content>It's something moving... solid metal</content>
</entry>          

When someone requests data content in JSON binding, are you expecting this as the equivalent response?

HTTP/1.1 201 Created
Date: Fri, 23 Feb 2007 21:17:11 GMT
Content-Type: application/atom+json;type=entry
ETag: "e180ee84f0671b1"
Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500

{
     "entry": {
         "title": "Atom-Powered Robots Run Amok",
         "id": "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",
         "updated": "2007-02-123T17:09:02Z"
         "author": {
            "name": "Captain Lansing"
         }
         "content": It's something moving... solid metal"
}

Is this what you would expect? Also, is the string for the content-type correct? Or is there some other type expected for Atom with JSON data content?

Luciano Resende wrote:
I'd say we could start by providing ways to send the content expressed
as XML or JSON. We could use the HTTP Accept and Content-Type headers
to allow reference/service to negotiate how the content is expected.


On Fri, Aug 1, 2008 at 2:10 PM, Dan Becker <[EMAIL PROTECTED]> wrote:
One of the recent requests for Tuscany is the need for negotiated content
types for the Atom binding (see
https://issues.apache.org/jira/browse/TUSCANY-2504). It also seems this
support is valid on a broader basis (e.g. HTTP binding).

1) What sort of data bindings do people find most useful for Atom? Obviously
text and xml response bodies would be valuable. Any others especially
desirable?

2) Are there other sorts of content negotiation people would like to see in
Tuscany in general?

--
Thanks, Dan Becker

Reply via email to