웹 서비스 (Dws)를 통해 사이트에 연결하는 Java 응용 프로그램을 통해 SharePoint 2010 라이브러리에 폴더를 생성하려고하는데 ID = 3 (NoAccess, 즉 "사용자가 충분한 권한을 가지고 있지 않다"는 의미로 문서에 따라)SharePoint 2010 createFolder 폴더를 만들지 못합니다.
내 사용자는 라이브러리에 "종합 통제"권한을 가지고 있습니다. 웹 인터페이스를 사용하여 폴더를 만들면 아무런 문제가 없습니다.
나는이 테스트를 만들었습니다. 웹 인터페이스를 통해 폴더를 만든 다음 내 응용 프로그램을 통해 createFolder를 실행했습니다. 이 경우 폴더가 이미 존재 함을 나타내는 메시지가 표시됩니다. 올바른 "site-library-folderTocreate"를 의미합니다.
저는 현재 아이디어가 없기 때문에 SharePoint에 대한 지식이 많지 않으므로 도움이 될 것입니다.
미리 감사드립니다.
A.
일부 추가 데이터 :
사이트 : prueba
라이브러리 : Repositorio DESARROLLO
폴더 : 문서
WSDL : HTTP : // 'localmachine'/ prueba/_vti_bin/Dws.asmx? wsdl
En dpoint : HTTP : //'localmachine'/prueba/_vti_bin/Dws.asmx
폴더 :
죄송합니다 (이미 "% 20"대신 빈 공간이 시도) Repositorio DESARROLLO/문서, 나는 것 같아요 전에 게시해야합니다 : 간단한 버전의 코드.
public void create() {
try {
DwsSoap dwsSoap = getDwsSoap();
createFolder(dwsSoap);
} catch (Exception e) {
logger.error("Nooooooooooo... : " + e.getMessage());
}
}
private DwsSoap getDwsSoap() throws Exception {
URL urlDws = new URL("http://'localmachine'/prueba/_vti_bin/Dws.asmx?wsdl");
Dws dws = new Dws(urlDws, new QName("http://schemas.microsoft.com/sharepoint/soap/dws/", "Dws"));
DwsSoap dwsSoap = dws.getDwsSoap();
BindingProvider bp = (BindingProvider) dwsSoap;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, getProperties().getProperty("username"));
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, getProperties().getProperty("password"));
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://'localmachine'/prueba/_vti_bin/Dws.asmx");
return dwsSoap;
}
private boolean createFolder(DwsSoap p_port) {
try {
String result = p_port.createFolder("Repositorio Desarrollo/docs");
logger.info(result);
return true;
} catch (Exception e) {
logger.error("Some error: " + e.getMessage());
}
return false;
}