FW: [opencms-dev] External_new_upload ... More specific + Cms Obje ct from other webapp??

Vlachogiannis Evangelos evlach at aegean.gr
Wed Oct 8 13:39:02 CEST 2003


Thnx for the reply. 

The cms.login returns admin. But I cannot understand why while I am trying
to create resource I am getting that access denied error...

I do not want to retrieve documents. I d like to have an interface (for ex
uploading) for external programs or forms. I am now trying to modify the
default opencms servlet class for doing this...

Any help/suggestion very welcomed:)

Thnx,
Vangelis


-----Original Message-----
From: M Butcher [mailto:mbutcher at grcomputing.net] 
Sent: Wednesday, October 08, 2003 5:22 AM
To: opencms-dev at opencms.org
Subject: Re: FW: [opencms-dev] External_new_upload ... More specific +
CmsObje ct from other webapp??


Hi Vangelis,

On Tue, 2003-10-07 at 06:40, Vlachogiannis Evangelos wrote:
> To make my question more specific when I am using an CmsObject is it 
> enough to use CmsObject.login ... Method in order to be able to 
> acccess any resource accessible from the logged in user?

CmsObject.login will log the user in and apply access controls... so, yes.
You are right. I am not sure why your code isn't working. What does
cms.loginUser return?

> Another question: Is there a way of getting and using the CmsObject 
> from another web application (serialization?... Any suggestion??) ?
> 

Not that I know of. The closest I could get is trading XML documents with
another application (via a SOAP-like protocol). Since XML is integral to
OpenCMS, it's pretty easy to add on.

I believe someone else on this list used a UNIX shell script with wget to
accomplish this sort of thing, but I don't know the details.

> Thnx Vangelis
> 
> -----Original Message-----
> From: Vlachogiannis Evangelos [mailto:evlach at aegean.gr]
> Sent: Tuesday, October 07, 2003 1:26 AM
> To: 'opencms-dev at opencms.org'
> Subject: [opencms-dev] External_new_upload
> 
> 
> Hi all,
> 
> I am trying to upload/unlock/publish a resource at once from outside 
> jetspeed. I have created a class/action/template (attached) like 
> CmsNewResourceUpload containing the following code:
> 
> cms.loginUser("admin","admin");
> System.out.println("trying to create..."); 
> cms.createResource(currentFolder
> + filename, type.getResourceTypeName(), new Hashtable(), filecontent, 
> + null);
> System.out.println("created..."); cms.unlockResource( currentFolder + 
> filename );
> cms.publishResource( currentFolder + filename);	
> 
> What I am getting is no uploaded file and the following console 
> message:
> 
> step: 2
> filename: New_Text_Document.txt
> currentFolder: /release/
> title: null
> newtype: plain
> overwrite: false
> cancel: false
> Step2@@@@@@@@@
> logged in suc
> trying to create...
> com.opencms.core.CmsException: 1 Access denied. Detailed error: 
> [com.opencms.file.mySql.CmsResourceBroker]
> /default/vfs/release/New_Text_Document.txt.
> 
> Could anyone help me please?
> 
> Thnx in advance,
> Vangelis
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
-- 
M Butcher <mbutcher at grcomputing.net>
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list