I'm sorry, I still don't understand the problem here. Why do you need
to differentiate?
The important thing seems to me to decide exactly what you get if you do
a registry.get("/foo;comments"). I would think you'd get a collection
Resource which contains the comments as individual Atom entries.
On the wire, this is EXACTLY the same as when you do
registry.getComments("/foo"). It's just the RemoteRegistry which does
the work of unpacking the resulting Atom collection slightly differently
to return a Resource or a Comment[].
So what's the issue?
--Glen
Paul Fremantle wrote:
Isn't the right way to do this using Accept headers?
The resource is the same, its just the representation that differs.
Paul
Deepal Jayasinghe wrote:
We can use get method of Registry to get resource as well as get
comments and so on , so one can do something like following
registry.get("/c1/c2") --> Return the resource to get resource and
in the same time if he want to get the comments he can use the get
method with the following path
registry.get("/c1/c2;comments) --> Return the resource with comments;
So Registry like JDBC and Secure know how to process that.
However in the Remote registry we have some issues commands when
someone called getComments() . For example when someone use remote
registry and when he calls registry.getComments() we send a request like
http://localhost:8080/wso2registry/c1/c2;comments
And in the meantime he can use the get API to send the same request
(http://localhost:8080/wso2registry/c1/c2;comments),
remoteRegistry.get( http://localhost:8080/wso2registry/c1/c2;comments)
-> wire URL " http://localhost:8080/wso2registry/c1/c2;comments"
remoteRegistry.getComments(http://localhost:8080/wso2registry/c1/c2); ->
wire URL " http://localhost:8080/wso2registry/c1/c2;comments"
so when it come to server side I can not differentiate the two , though
I need to do so.
This problem happen we use the same parameter separator both in APP and
normal registry , if we can use two characters then we can solve the
problem. Therefore at the moment I am using "$" as the parameter
separator in APP (according to the wiki I am supposed to use ";" )
Deepal Jayasinghe wrote:
Hi all ,
I have implemented APP using "$" (considering the mail thread) as the
query parameters , so if you want to get the comments we need to send a
request like
/c1/c2$comments
However when I switch to /c1/c2;comments instead of /c1/c2$comments I
found an issue in the app impl . Because in the registry get api has
support for /c1/c2;comments , so rather than using getComment method
one
can use get method to get the comments. This become big issue when it
come to remote registry , where I can not differentiate the two ,
though
it is required to do so. So how about using a different query parameter
character for get method of the registry API?
-Deepal
I have created a wiki page for registry protocol at
http://www.wso2.org/wiki/display/registry/Registry+Protocol
Registry URL space and the APP based message formats discussed in the
Registry hackathan are included in the wiki.
Thanks,
Chathura
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev