The pros of the approach I suggested are:
- The result list is compact and can include whatever metadata you have in a resource-agnostic way
- The client can determine which of the results it can actually handle and only GET the results it can use
- No need to use MIME packaging
The cons are:
- Multiple roundtrips to actually get the content of a result
Marc.
On Oct 31, 2012, at 11:58 AM, Farrukh Najmi wrote:
>
> Hi Marc,
>
> Thank you for your help. I realize this thread is not specifically a wadl question.
>
> Assuming the matching resources may include binary resources (e.g. images) which of these alternatives is better and why? Thanks again.
>
> On 10/31/2012 11:12 AM, Hadley, Marc J wrote:
>> An alternative would be to return a results document that contains a list of matching resources, metadata about each one (including media type) and a link to GET it from. You could use XML, JSON, RDF, whatever for the results document.
>>
>> Marc.
>>
>> On Oct 30, 2012, at 8:12 PM, Farrukh Najmi wrote:
>>
>>> Specifically, I am wondering if response with mediaType=mime/multipart be the best design?
>>>
>>> On 10/30/2012 08:02 PM, Farrukh Najmi wrote:
>>>> Hi Guys,
>>>>
>>>> I am working on a REST interface described by WADL description. A GET operation called "search" needs to be defined that is expected to return a resource that is actually a set of resources that match the specified query. Each resource in the set may be of an arbitrary mediaType.
>>>>
>>>> I am wondering how to specify the wadl:response for such a response.
>>>>
>>>> Any advice?
>>>>
>
> --
> Regards,
> Farrukh Najmi
>
> Web: http://www.wellfleetsoftware.com
>
Dr. Marc J. Hadley <mhadley_at_mitre.org>
Principal Software Systems Engineer
The MITRE Corporation
202 Burlington Road
Bedford, MA 01730-1420