Thanks, Pavel, for pointing me to the right direction.
I found Jakub's blog.
Now, one more question: if the WS I am calling is returning an image, what's
the right way to handle this?
Thanks,
Art
On Wed, Mar 23, 2011 at 3:46 AM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:
> On 03/23/2011 05:20 AM, Arthur Yeo wrote:
>
>> All,
>> In the mix of things, I need one of my WS's to call another WS provided by
>> another organization. In other words, my WS is now playing the role of a web
>> client.
>>
>> What's the best way to do this in Jersey?
>> Do I just stuff Java client code, like making use of the std URL class, in
>> there?
>> Or, Is there something else in Jersey you recommend?
>>
>
> former, you need to create Client and WebResource by yourself, there is
> nothing better yet (but it might be soon).
>
> you might want to cache created client instance in some singleton,
> Client.create() is relatively expensive operation.
>
> Pavel
>
>
>> --
>> Arthur Y.
>>
>
>
--
Arthur Y.