cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPConfigSource??

soeursourire
Champ in-the-making
Champ in-the-making
Hi!

I am trying to read a XML file that is stored in Company_Home by its http url however I have this error :

caused by:
org.alfresco.config.ConfigException: Failed to parse config stream

caused by:
org.dom4j.DocumentException: Error on line 31 of document : Open quote is expected for attribute "width" associated with an element type "table". Nested exception: Open quote is expected for attribute "width" associated with an element type "table".


I get this error when I am doing this:
XMLConfigService svc = new XMLConfigService(new HTTPConfigSource(http://localhost:8080/alfresco/download/direct/workspace/SpacesStore/4cc5bdbc-c323-11da-9641-7f540d7...));
svc.init();


Although I do not have error while doing this with the same xml file:

XMLConfigService svc = new XMLConfigService(new FileConfigSource("./src/projects/web-client/source/web/WEB-INF/EF_Config_Pages.xml"));
svc.init();       


Cannot I use XMLConfigService with a url? What do I do wrong here?
Thanks
34 REPLIES 34

soeursourire
Champ in-the-making
Champ in-the-making
Is it possible to checkout my xml file into my local system? which classes can I use (CheckinCheckOutBean?)? Can I do a checkout on a nodeRef without using the filename? Else I will have the same problem of permissions if I need to use the url isn't it?

soeursourire
Champ in-the-making
Champ in-the-making
I am trying to use this CheckinCheckOutBean service in order to copy the file into my system ( I do not know if that will resolve my problem yet) but I do not manage to get the service, I was trying as follow but it seems I have FTP socket error:

ApplicationContext app = ApplicationContextHelper.getApplicationContext();

ServiceRegistry registry = (ServiceRegistry)app.getBean(ServiceRegistry.SERVICE_REGISTRY);

CheckinCheckoutBean checkinCheckoutBeanService = (CheckinCheckoutBean)registry.getCheckOutCheckInService();

What do I do wrong?
Thanks in advance

soeursourire
Champ in-the-making
Champ in-the-making
I used Spring with this service and it is oki:

private CheckOutCheckInService checkOutCheckInService;

But now I get into troubles… it is not possible to create a working copy of my node (the xml file) in my system? To use the method checkout I need to give a nodeRef for the working copy but I guess I cannot give a nodeRef for a xml file in my system (I would like to copy it in my WEBINF of WebClient for example)?

* @param nodeRef   a reference to the node to checkout
* @param destinationParentNodeRef  the destination node reference for the working
* copy
* @param destinationAssocTypeQName      the destination child assoc type for the working
*copy
* @param destinationAssocQName         the destination child assoc qualified name for
*the working copy
* @return                     node reference to the created working copy
*/
public NodeRef checkout(
            NodeRef nodeRef,
            NodeRef destinationParentNodeRef,
            QName destinationAssocTypeQName,
            QName destinationAssocQName);

soeursourire
Champ in-the-making
Champ in-the-making
I am lost, I do not understand! I have a record (xml file) stored in the folder Guest of admin spaces (so everybody should have access to this file right?) then I should not have permission problems.
However when I want to checkout this file in the same folder, I have no problem while doing that as admin:
NodeRef workingCopyRef = checkOutCheckInService.checkout(recordRef);

But that fails at this point when I am connected as a user. If everyboday has access to Guest folder any user should be able to checkout inside no? And I checked: recordRef is not null. So what is wrong here? Why does that not work and what can I do to make it working?

Thanks in advance

soeursourire
Champ in-the-making
Champ in-the-making
I maybe wrote too fast… if I give coordinator right to everybody in guest space that seems to work fine
Getting started

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.