I use the JAXRSClientFactory.create method to create a proxy as follows:
IMyService myService
= JAXRSClientFactory.create("http://myserviceurl/", IMyService.class, "login1", "pwd", null);
and this code is working fine.
After that, I need to use this service with different credentials, and I'm trying to create the same service with different credentials, like this:
IMyService myNewService
= JAXRSClientFactory.create("http://myserviceurl/", IMyService.class, "login2", "pwd", null);
this code works, but works with incorrect credentials (with credentials from the first service). I did not find a way to change it (reset, or clear, or something like this).
And one more detail, this problem is only with digest authorization. With basic, it works well.
Can someone help me with this problem.
Thank.
source
share