[Registry-dev] APP

Glen Daniels glen at wso2.com
Mon Dec 17 22:38:11 PST 2007


Hi folks:

I think we have some APP issues.

This evening I wrote this test code:

         RemoteRegistry reg = new RemoteRegistry(new 
URL("http://localhost:8090/wso2registry"));
         Resource resource = new Resource();
         resource.setDirectory(true);
         resource.setAuthorUserName("system");
         reg.put("/d1", resource);

Which generated this on the wire:

---

POST /wso2registry/atom/d1 HTTP/1.1
Accept-Encoding: gzip, deflate
Accept-Charset: utf-8, *;q=0.5
Accept: application/atom+xml;type=entry, application/atom+xml;type=feed, 
application/atom+xml, application/atomsvc+xml, application/atomcat+xml, 
application/xml, text/xml, */*
User-Agent: Abdera/v0.3.0-incubating
Host: localhost:8090
Expect: 100-continue
Content-Length: 157
Content-Type: application/atom+xml;type=entry

<entry xmlns="http://www.w3.org/2005/Atom" directory="true"><title 
type="text">/d1</title><summary type="text" 
/><author><name>system</name></author></entry>

---

When creating a new entry, you're supposed to POST to the collection URL 
(i.e. /wso2registry/atom), with a "slug" header indicating your 
preferred name for the new resource.  Then you get back something with a 
  Location: header containing the full URL.  See 
http://bitworking.org/projects/atom/draft-ietf-atompub-protocol-17.html#crwp. 
  Can we fix this?  And look carefully at the rest of the protocol 
interactions to make sure they're to spec?  (and add more JavaDocs? :))

This is why I want to change the put() API to return a String (the real 
path) and take a suggested path rather than an assumed one.

Thanks,
--Glen



More information about the Registry-dev mailing list