|
From: Adam J. <Ada...@ge...> - 2008-07-12 04:03:14
|
Perfect, thanks for the timely responses.
I think I was getting hung up on wanting to keep the interface of the
resource the same as the client.
Once I separated the two, things look good.
Cheers,
Adam
On 11/07/08 3:47 PM, "Bill Burke" <bb...@re...> wrote:
>
>
> Adam Jordens wrote:
>> Heh. I was wondering if I was going to confuse anyone.
>>
>> Essentially what I want to do is have the value of a Response (with a status
>> of 303) returned to the caller of the client framework.
>>
>> From what I had seen (and read?), if the client framework caller wanted
>> access to the actual response itself, it needed to be actually returned as a
>> ClientResponse. Am I mistaken?
>>
>> The interaction is as follows:
>>
>> Client A (via ClientFramework) POSTS to the '/searches/' resource and gets a
>> ClientResponse (or Response) back with a status code and ideally an entity.
>>
>
> The client and server would be seperate classes/interfaces:
>
> client
>
> @Path("/search")
> public interface SearchEngineClient {
>
>
> @POST
> @ConsumeMime("application/xml")
> @ProduceMime("*/*")
> ClientResponse<Long> createSearch(ExtQuery);
> }
>
>
> server:
>
> @Path("/search")
> public class SearchEngine {
>
> @POST
> @ConsumeMime("application/xml")
> @ProduceMime("*/*")
> Response createSearch(ExtQuery) {
> ...
> }
> }
>
>
> Is the problem that you can't get at a ClientResponse that has no entity
> within it?
>
> Bill
|