Dec 8th, 2010, 05:06 PM
RESTTemplate not passing credentials
I'm using RESTTemplate to perform a JSON POST to a remote web service. This code works perfectly when running within today on my development box against that remote web service.
However when I move the war to a tomcat instance on another box, I get 401 responses back from the remote service as well as log message indicating that no credentials were found for the the realm.
I've even tried copying my tomcat installation over but still et the 401 responses.
Dec 9th, 2010, 05:24 AM
It turns out that one of my services was communicating to the remote service before I had credentials set. Adding @DependsOn to that service ensured that the correct order on service startup was restored.