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

s7@r*Gag1cuL

New Member
I use Axis 1.4 to generate java classes from http://10.0.0.22/_vti_bin/Lists.asmxI use following code to access web service:\[code\]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();\[/code\]I get "(401)Unauthorized" error. How can I use java classes which are generated by Axis to access SharePoint web service?
 
Back
Top