From bc8b8c6c64615214c47f96ac583a6b9395701388 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Fri, 3 Feb 2006 12:25:15 +0000 Subject: [PATCH] - Updated web service client build script to exculde property file from jar - Improved robustness of web service samples git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/webservice/Utils.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/webservice/Utils.java b/source/java/org/alfresco/repo/webservice/Utils.java index 5813a8bf01..693098e402 100644 --- a/source/java/org/alfresco/repo/webservice/Utils.java +++ b/source/java/org/alfresco/repo/webservice/Utils.java @@ -55,6 +55,8 @@ import org.alfresco.service.namespace.QName; import org.alfresco.service.transaction.TransactionService; import org.apache.axis.MessageContext; import org.apache.axis.transport.http.HTTPConstants; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -66,6 +68,9 @@ import org.springframework.web.context.support.WebApplicationContextUtils; public class Utils { public static final String REPOSITORY_SERVICE_NAMESPACE = "http://www.alfresco.org/ws/service/repository/1.0"; + + /** Get the logger for this class */ + private static Log logger = LogFactory.getLog(Utils.class); private Utils() { @@ -188,7 +193,8 @@ public class Utils if (uuid == null || uuid.length() == 0) { rootNodeRef = nodeService.getRootNode(convertToStoreRef(store)); - } else + } + else { rootNodeRef = new NodeRef(convertToStoreRef(store), uuid); } @@ -196,6 +202,11 @@ public class Utils // see if we have a path to further define the node being requested if (path != null && path.length() != 0) { + if (logger.isDebugEnabled() == true) + { + logger.debug("Resolving path: " + path); + } + List nodes = searchService.selectNodes(rootNodeRef, path, null, namespaceService, false); @@ -213,8 +224,14 @@ public class Utils } nodeRef = nodes.get(0); - } else + } + else { + if (logger.isDebugEnabled() == true) + { + logger.debug("There was no path to resolve so using root or specified node"); + } + // if there is no path just use whatever the rootNodeRef currently // is nodeRef = rootNodeRef;