This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I wrote a client application that uses two different web services. Both web services are created using Basic Authentication. They have different user_names and passwords, but must be deployed on the same application server. I must invoked methods of these web services one after another.The problem occures when I invokes mehods of second web service. No matter which of service would be first or second. The problem occurs on second calling. I got this exception:
EXCEPTION: java.rmi.RemoteException: HTTP Status-Code 403: Access to the requested resource has been denied; nested exception is: HTTP Status-Code 403: Access to the requested resource has been denied at com.softlets.insurelet.security.InsureletSecurityServiceSEI_Stub.login(InsureletSecurityServiceSEI_Stub.java:89) at com.softlets.insurelet.test.TestRefundPolicy.main(TestRefundPolicy.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ...........
IMPORTANT: Everything worked fine until I started to install this application using Java Web Start.
MY ASSUMPTION: It's likely to me that web start executes my application in some environment where it caches the first web service's username and password and applies it to the second web service. Because, if I run both web services on my local machine and set ENDPOINT_ADDRESS_PROPERTY to different values (first - localhost:8080, second - 192.168.0.21:8080) everything works fine.