Hmm - I thought that
> URI personResource = uriInfo.getBaseUriBuilder()
> .path(PersonEndpoint.class, "retrieve")
would end put building the combined path from PersonEndpoint
and the retrieve method within it... Are they separate (and your
example the right way to go) because PersonEndpoint could be
a (non-root) subresource?
Thanks!
Moises
On Mar 5, 2010, at 2:05 PM, Marc Hadley wrote:
> If you want to build an absolute URI the best way is to start from UriInfo like this:
>
> @Context UriInfo uriInfo;
>
> URI personResource = uriInfo.getBaseUriBuilder()
> .path(PersonEndpoint.class)
> .path(PersonEndpoint.class, "retrieve")
> .build(personAddressMapping.getPersonId());