I use Axis 1.4 to generate java classes from http://10.0.0.22/_vti_bin/Lists.asmx
I use following code to access web service:
javax.xml.rpc.Service service = new ListsLocator();
ListsSoapStub stub = SharePointWSDL.newLists(new URL("http://10.0.0.22/_vti_bin/Lists.asmx"), service);
stub.setUsername(username);
stub.setPassword(password);
com.microsoft.schemas.sharepoint.soap.GetListCollectionResponseGetListCollectionResult lcr = stub.getListCollection();
I get "(401)Unauthorized" error.
How can I use java classes which are generated by Axis to access SharePoint web service?