[Launchpad-dev] Launchpad's service WADL clarification
Hi, I am working on a WADL--C# converter and taking Launchpad WADL file as the example. This project is mainly targeted at generating client proxy code for Launchpad. I ran into a few issues: in the request section of WADL, it can contain param[] and representation_type[] both together I can understand that param[] can be used for generating a method which has all the parameters given in param[] For representation_type[] I understood that the method is overloaded and each there are as many overloaded methods as the number of representation_type My doubt comes that, when both param[] and representation_type[] are present in a single request. Let's take we have m param and n representation_type In this case, does all the methods look like? foo(param1, param2,.,paramm, representation_type1) foo(param1, param2,.,paramm, representation_type2) ... .. foo(param1, param2,.,paramm, representation_typen) Or in most situations param[] and representation_type[] wont occur together? Can I safely assume this? I know many people on this list don't deal with development and not many use WADL since they are comfortable with launchpadlib. It would be kind if some launchpad hacker answers this question. If anyone is familiar with WADL, your suggestions are appreciated. If the hacker who wrote Launchpad WADL can answer this, it would be a cherry on the ice. P.S. I had initially sent this mail to launchpad-users instead. Sending it to the correct list now, -- Manish ___ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-dev] Launchpad's service WADL clarification
On 4/25/2010 4:35 PM, James Westby wrote: Do you have an example of an element that has both param and representation_type? Nope. That's why am asking whether such a situation can exist? If this is a theoretical question that I think you can assume this. I think the fuller implementation would be that the parameters defined directly and those in the representation types would never overlap, so that param foo representation_type A param bar representation_type B param baz This means that we have two overloads for this methods . This corrosponds to methodname(foo, bar) methodname(foo,baz) What am considering is that the child of request can contain either param[] or representation_type[] , not both together, which makes param foo1 param foo2 param foo3 AND representation_type foo1 representation_type foo2 representation_type foo3 LEGAL WHEREAS param foo1 representation_type foo2 param foo3 representation_type foo4 representation_type foo5 IS ILLEGAL. More info is is here http://www.w3.org/Submission/wadl/#x3-180002.9 which says that as per the schema param[] and representation_type[] exist together and what I marked ILLEGAL is actually legal as per the schema. Confusion escalated. :( would be legal, but param foo representation_type A param foo would not be. The specification doesn't seem to be explicit about this though. P.S: Sorry for use of ALLCAPS for a few words. It was just for emphasis. ___ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-dev] Launchpad's service WADL clarification
On 4/25/2010 6:25 PM, James Westby wrote: No, it means that the method takes any/all of the union of the parameters defined directly with param or as part of a representation. Meaning in this case the method signature would be methodname(foo, bar, baz) From WADL submission 1. Zero or more |representation| elements - see section 2.11 http://www.w3.org/Submission/wadl/#x3-210002.11. Note that use of |representation| elements is confined to HTTP methods that accept an entity body in the request (e.g., PUT or POST). Sibling |representation| elements represent logically equivalent alternatives, e.g., a particular resource might support multiple XML grammars for a particular request. ___ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-dev] Launchpad's service WADL clarification
On Sun, 25 Apr 2010 19:13:57 +0530, Manish Sinha m...@manishsinha.net wrote: On 4/25/2010 6:25 PM, James Westby wrote: No, it means that the method takes any/all of the union of the parameters defined directly with param or as part of a representation. Meaning in this case the method signature would be methodname(foo, bar, baz) From WADL submission 1. Zero or more |representation| elements - see section 2.11 http://www.w3.org/Submission/wadl/#x3-210002.11. Note that use of |representation| elements is confined to HTTP methods that accept an entity body in the request (e.g., PUT or POST). Sibling |representation| elements represent logically equivalent alternatives, e.g., a particular resource might support multiple XML grammars for a particular request. Ok, so it seems you have a grasp on what is legal in the WADL and not now? Taking in to account that rule and the previous discussion would suggest a complete description of what is allowed by the spec. Thanks, James ___ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp