[Registry-dev] APP

Sanjiva Weerawarana sanjiva at wso2.com
Tue Dec 18 09:58:45 PST 2007


Are we not using Abdera on the client side? (Looks like we are given the 
user agent header.) So doesn't Abdera do the right thing for this??

Also, I noticed that in the code below we connect to the registry at one 
URL but the base URL for the Atom stuff has "/atom" added to the reg URL 
passed in. Is that right? Should we not say the base URL is 
.../wso2registry/atom instead?

Sanjiva.

Glen Daniels wrote:
> 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
> 
> _______________________________________________
> Registry-dev mailing list
> Registry-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
> 

-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: sanjiva at wso2.com; cell: +1 650 265 8311 | +94 77 787 6880

"Oxygenating the Web Service Platform."



More information about the Registry-dev mailing list