I am testing accessing the sharepoint WS from an axis client (1.4). The axis code is generated ok, but when I do this test I get a 401 (Permission denied) error. I do not know if it is something in the code or if I must have to setup a given permission for the webservices to work.
public static int main() {
String[] destinationUrls = {"https://[sharepoint host]/[sharepoint site]/Test1"};
ListsLocator listsLocator = new ListsLocator();
ListsSoapStub listsStub = (ListsSoapStub) listsLocator.getListsSoap();
listsStub.setUsername("NotMyDomain\\NotMyUser");
listsStub.setPassword("NotMyPassword");
GetListResponseGetListResult result = listsStub.getList("Test1");
for(MessageElement me : result.get_any()) {
System.out.println(me.toString());
}
}
Finally I kinda of worked it out, you can see it in a question I posted in the sharepoint site. Anyway it is kind of deceiving, looks like axis is not capable of correctly generating the bindings and in case of error SP adds some custom XML and axis is incapable of
processing it. Probably I’ll end creating using xmlbinds and parsing the XML in my program.