09-11-2008 06:50 AM
09-11-2008 07:10 AM
public static void crearEspacio() {
try {
ParentReference parentReference = new ParentReference(
STORE,
null,
"/app:company_home/",
Constants.ASSOC_CONTAINS,
Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, "sample_folder"));
NamedValue[] properties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, "AAA")};
CMLCreate create = new CMLCreate("1", parentReference, null, null, null, Constants.TYPE_FOLDER, properties);
CML cml = new CML();
cml.setCreate(new CMLCreate[]{create});
UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);
System.out.println("ESPACIO CREADO!!");
}
catch (Exception exception)
{
System.out.println("EXCEPTION "+exception.getMessage());
}
}
ParentReference parentReference = new ParentReference(
STORE,
null,
"/app:company_home/AAA",
Constants.ASSOC_CONTAINS,
Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, "sample_folder"));
NamedValue[] properties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, "BBB")};
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>org.alfresco.service.cmr.repository.XPathException: Error executing xpath:
xpath: /app:company_home/</ns1:message>
{http://xml.apache.org/axis/}exceptionName:org.alfresco.repo.webservice.repository.RepositoryFault
{http://xml.apache.org/axis/}stackTrace:
at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:341)
09-11-2008 07:32 AM
Reference padre = results[0].getDestination();
private static ParentReference damePadreRef(Store almacen,Reference carpetaRef){
return new ParentReference(almacen,carpetaRef.getUuid(),carpetaRef.getPath(),Constants.ASSOC_CONTAINS,null);
}
09-11-2008 10:36 AM
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>org.alfresco.service.namespace.InvalidQNameException: Argument qname is mandatory</ns1:message>
{http://xml.apache.org/axis/}exceptionName:org.alfresco.repo.webservice.repository.RepositoryFault
private static ParentReference damePadreRef(Store almacen,Reference carpetaRef){
return new ParentReference(almacen,carpetaRef.getUuid(),carpetaRef.getPath(),Constants.ASSOC_CONTAINS,
Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, "espacio_hijo"));
}
¿a ti te funciona sin definir la QName?
09-12-2008 05:30 AM
Reference refer = new Reference(STORE, null, "/app:company_home/*[@cm:name=\"" + "AAA" + "\"]" + "/*[@cm:name=\"" + "BBB" + "\"]" );
09-30-2008 10:01 AM
09-30-2008 10:40 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.