Get '(401)Unauthorized' error when calling SharePoint web service


New Member
I use Axis 1.4 to generate java classes from use following code to access web service:\[code\]javax.xml.rpc.Service service = new ListsLocator();ListsSoapStub stub = SharePointWSDL.newLists(new URL(""), service);stub.setUsername(username);stub.setPassword(password); lcr = stub.getListCollection();\[/code\]I get "(401)Unauthorized" error. How can I use java classes which are generated by Axis to access SharePoint web service?