|
From: Bill B. <bb...@re...> - 2008-07-11 22:47:07
|
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
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|