I use an existing Web Service that requires HTTP authentication.
I spent hours today trying to find the official way to set the
username and password, and I could not find any documentation, so I
did some reverse-engineering of the Axis2-generated classes and came
up with this code:
String url = "http://admin:pass@exam.../service"
return new WeatherProxy(url).getTemperature();
Please note the "admin:pass" in the URL.
Is it the supported way to do HTTP authentication with Axis 1.4?
While searching on the Web, I have seen a lot of different Java
methods about setting the user and password, but none of these methods
were to be found in the classes wsdl2java generated (Axis 1.4 via
- and classes for each method and type declared in the WSDL