You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Elodie Tasia <e....@ever-team.com> on 2002/04/26 10:55:20 UTC

Removing properties (bis)

Hi,

I'm still trying to remove dead properties. I tried with or without setting
the namespace, with WebdavResource.proppatchMethod and PropPatchMethod
class... and nothing works.
I'm still getting a 207 status code, and no property is removed.
Has someone already tried this ? Does have someoen an idea ?

Thanx in advance...



----- Original Message -----
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Group" <sl...@jakarta.apache.org>
Sent: Monday, April 22, 2002 9:39 AM
Subject: Removing properties


Hi,

I noticed that the Slide client APUI's propatchMethod only add or update
properties, and can't remove them, although the PROPATCH does. So I use the
PropPatchMethod class, with the addPropertyToRemove method.
The problem is that, although I can add new properies and change them, the
server answer me that when I try to remove what I've added :

PROPPATCH /files/myfiles/hello.html HTTP/1.1
Content-Length: 138
Content-Type: text/xml; charset=utf-8
Host: localhost
User-Agent: Jakarta HTTP Client/1.0

HTTP/1.1 401 Unauthorized
Content-Type: text/html
Date: Mon, 22 Apr 2002 07:24:03 GMT
Transfer-Encoding: chunked
Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
WWW-Authenticate: Basic realm="Slide DAV Server"

PROPPATCH /files/myfiles/hello.html HTTP/1.1
Content-Length: 138
Authorization: Basic cm9vdDpyb290
Content-Type: text/xml; charset=utf-8
Host: localhost
User-Agent: Jakarta HTTP Client/1.0

HTTP/1.1 207 Multi-Status
Date: Mon, 22 Apr 2002 07:24:04 GMT
Transfer-Encoding: chunked
Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
Set-Cookie: JSESSIONID=277442F2100660B203C012F0D2745151;Path=/

How can I have the authorization ? I tried this with the 'root' login, so I
can't imagine how I could have more rights...

Can someone help ?
Thanx



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Removing properties (bis)

Posted by Sung-Gu <jericho at apache.org>.
----- Original Message ----- 
From: "B. Shadgar" <b....@bristol.ac.uk>

> Where can I find your code and also where can I get the last more stable version of
> Slide?

Please, access the slide cvs-respository, http://jakarta.apache.org/site/cvsindex.html
Or download the slide nightly-build, there is the slide...

> Indeed, is the code able to remove more than one properties from the resource at the
> same time?

Yes.  Please, look into the WebdavResource APIs.

Sung-Gu


accessing file via slide

Posted by Claus Goettfert <cl...@gmx.net>.
hi all,

I use retail slide 1.0.16 and run into problems when trying to access a 
file via slide. I used an example posted previously here but I always get a 
nullpointerexception whatever path variation I try on line

             NodeRevisionDescriptors revisionDescriptors = 
content.retrieve(slideToken, "/files/test.txt");

I use slide out of the box except adding a user for accessing the tomcat 
manager (via tomcat-users.xml) and setting a password for user john in 
/conf/slide/slide.data.

I used the user john to add the "test.txt" file to /files/ via "my network 
places". so there is a file "/files/test.txt" via webdav client and a file 
called "jakarta-slide/server/contentstore/files/test.txt_1.0" even after 
stopping, restarting slide.

additionally changing the "rootpath" in domain.xml doesn't seem to have any 
effect (see below?). slide always stores files in 
jakarta-slide/server/contentstore (slide server started from 
jakarta-slide/server/, the Domain.xml file is also located at 
jakarta-slide/server/Domain.xml).

here is my sourcecode:

<--->
PrintWriter out = response.getWriter();
    try{
             NamespaceAccessToken token = Domain.accessNamespace(new 
SecurityToken(""), "slide");

             Structure structure = token.getStructureHelper();
             Security security = token.getSecurityHelper();
             Lock lock = token.getLockHelper();
             Content content = token.getContentHelper();


             CredentialsToken credToken =
                 new CredentialsToken(new String("john"));
             SlideToken slideToken = new SlideTokenImpl(credToken);

            // structure.create(slideToken, new SubjectNode(), 
"/files/slideTestFolder");

             NodeRevisionDescriptors revisionDescriptors = 
content.retrieve(slideToken, "/files/test.txt");

              } catch (Exception ex) {
              ex.printStackTrace(out);
          }

<-->

when executing the servlet slide throws exceptions like:

ClassCastException: slidestore.reference.MemoryDescriptorsStore
....
ClassCastException: slidestore.reference.FileContentStore
....
ClassCastException: slidestore.reference.DefaultStore
.....

or warnings like:
org.apache.slide.common.Domain - WARNING - Service memory 
(org.apache.slide.store.StandardStore) access error : 
org.apache.slide.common.SlideException: caus is empty

and a nullpointerexception.

all on line:

             NamespaceAccessToken token = Domain.accessNamespace(new 
SecurityToken(""), "slide");

...

can anyone please give me some hints what is wrong? or point me to some 
examples how to use the slide api (simple file access, property access or 
similar)? i didn't find anything, the examples provided seem to cover some 
other topics.

regards,

claus goettfert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Removing properties (bis)

Posted by "B. Shadgar" <b....@bristol.ac.uk>.
Sung-Gu wrote:

> ----- Original Message -----
> From: "Sung-Gu" <jericho at apache.org>
> >
> > I realized that it didn't be exposed and impleneted yet for WebdavResource.  :(
> > I will look into it...
>
> I've committed the code for that.  ;)
>
>  Sung-Gu
>
> > ----- Original Message -----
> > From: "Elodie Tasia" <e....@ever-team.com>
> > Subject: Removing properties (bis)
> >
> > > I'm still trying to remove dead properties. I tried with or without setting

Dear Sung-Gu,

Where can I find your code and also where can I get the last more stable version of
Slide.
Indeed, is the code able to remove more than one properties from the resource at the
same time.

Thanks indeed;
Bita.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Removing properties (bis)

Posted by Sung-Gu <jericho at apache.org>.
> What was the problem ? I searched but didn't find it... and I'd like to know
> where it was...

Perhaps, you wouldn't subcribe dev.... 
Please, subcribe slide-dev,  then you can get all commit messages.  ;-)
Or refer to http://www.mail-archive.com/index.php3?hunt=slide (somewhat slowly...)

Sung-Gu


Re: Removing properties (bis)

Posted by Elodie Tasia <e....@ever-team.com>.
What was the problem ? I searched but didn't find it... and I'd like to know
where it was...

Thanx for taking care of my problems :o)

----- Original Message -----
From: "Sung-Gu" <je...@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Monday, April 29, 2002 4:22 PM
Subject: Re: Removing properties (bis)


> I've made a mistake...  sorry...  :(
>
> I hope now it works fine...
>
> Sung-Gu
>
>
> ----- Original Message -----
> From: "Elodie Tasia" <e....@ever-team.com>
> To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> Sent: Monday, April 29, 2002 6:43 PM
> Subject: Re: Removing properties (bis)
>
>
> > Great ! I've just downloaded the code and I'm testing it.
> > What I can see is : when I create a new property, its complete name
begins
> > with "ns0:" (with Slide server). I suppose it's normal.
> > When I change its value, it works well, but when I want to delete it,
even
> > with the new code, it doesn't work at all.
> > Did you already succed in deleting a property ?
> >
> > Thanx in advance.
> >
> >
> > ----- Original Message -----
> > From: "Sung-Gu" <je...@ever-team.com>
> > To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> > Sent: Friday, April 26, 2002 6:04 PM
> > Subject: Re: Removing properties (bis)
> >
> >
> > > ----- Original Message -----
> > > From: "Sung-Gu" <jericho at apache.org>
> > > >
> > > > I realized that it didn't be exposed and impleneted yet for
> > WebdavResource.  :(
> > > > I will look into it...
> > >
> > > I've committed the code for that.  ;)
> > >
> > >  Sung-Gu
> > >
> > > > ----- Original Message -----
> > > > From: "Elodie Tasia" <e....@ever-team.com>
> > > > Subject: Removing properties (bis)
> > > >
> > > > > I'm still trying to remove dead properties. I tried with or
without
> > setting
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Removing properties (bis)

Posted by Sung-Gu <jericho at apache.org>.
I've made a mistake...  sorry...  :(

I hope now it works fine... 

Sung-Gu


----- Original Message ----- 
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Monday, April 29, 2002 6:43 PM
Subject: Re: Removing properties (bis)


> Great ! I've just downloaded the code and I'm testing it.
> What I can see is : when I create a new property, its complete name begins
> with "ns0:" (with Slide server). I suppose it's normal.
> When I change its value, it works well, but when I want to delete it, even
> with the new code, it doesn't work at all.
> Did you already succed in deleting a property ?
> 
> Thanx in advance.
> 
> 
> ----- Original Message -----
> From: "Sung-Gu" <je...@ever-team.com>
> To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> Sent: Friday, April 26, 2002 6:04 PM
> Subject: Re: Removing properties (bis)
> 
> 
> > ----- Original Message -----
> > From: "Sung-Gu" <jericho at apache.org>
> > >
> > > I realized that it didn't be exposed and impleneted yet for
> WebdavResource.  :(
> > > I will look into it...
> >
> > I've committed the code for that.  ;)
> >
> >  Sung-Gu
> >
> > > ----- Original Message -----
> > > From: "Elodie Tasia" <e....@ever-team.com>
> > > Subject: Removing properties (bis)
> > >
> > > > I'm still trying to remove dead properties. I tried with or without
> setting


Re: Removing properties (bis)

Posted by Elodie Tasia <e....@ever-team.com>.
Great ! I've just downloaded the code and I'm testing it.
What I can see is : when I create a new property, its complete name begins
with "ns0:" (with Slide server). I suppose it's normal.
When I change its value, it works well, but when I want to delete it, even
with the new code, it doesn't work at all.
Did you already succed in deleting a property ?

Thanx in advance.


----- Original Message -----
From: "Sung-Gu" <je...@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, April 26, 2002 6:04 PM
Subject: Re: Removing properties (bis)


> ----- Original Message -----
> From: "Sung-Gu" <jericho at apache.org>
> >
> > I realized that it didn't be exposed and impleneted yet for
WebdavResource.  :(
> > I will look into it...
>
> I've committed the code for that.  ;)
>
>  Sung-Gu
>
> > ----- Original Message -----
> > From: "Elodie Tasia" <e....@ever-team.com>
> > Subject: Removing properties (bis)
> >
> > > I'm still trying to remove dead properties. I tried with or without
setting
>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Removing properties (bis)

Posted by Sung-Gu <jericho at apache.org>.
----- Original Message ----- 
From: "Sung-Gu" <jericho at apache.org>
>
> I realized that it didn't be exposed and impleneted yet for WebdavResource.  :(
> I will look into it...  

I've committed the code for that.  ;)
 
 Sung-Gu

> ----- Original Message ----- 
> From: "Elodie Tasia" <e....@ever-team.com>
> Subject: Removing properties (bis)
>
> > I'm still trying to remove dead properties. I tried with or without setting



Re: Removing properties (bis)

Posted by Sung-Gu <jericho at apache.org>.
I realized that it didn't be exposed and impleneted yet for WebdavResource.  :(
I will look into it...  

Sung-Gu

----- Original Message ----- 
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, April 26, 2002 5:55 PM
Subject: Removing properties (bis)


> Hi,
> 
> I'm still trying to remove dead properties. I tried with or without setting
> the namespace, with WebdavResource.proppatchMethod and PropPatchMethod
> class... and nothing works.
> I'm still getting a 207 status code, and no property is removed.
> Has someone already tried this ? Does have someoen an idea ?
> 
> Thanx in advance...
> 
> 
> 
> ----- Original Message -----
> From: "Elodie Tasia" <e....@ever-team.com>
> To: "Slide Group" <sl...@jakarta.apache.org>
> Sent: Monday, April 22, 2002 9:39 AM
> Subject: Removing properties
> 
> 
> Hi,
> 
> I noticed that the Slide client APUI's propatchMethod only add or update
> properties, and can't remove them, although the PROPATCH does. So I use the
> PropPatchMethod class, with the addPropertyToRemove method.
> The problem is that, although I can add new properies and change them, the
> server answer me that when I try to remove what I've added :
> 
> PROPPATCH /files/myfiles/hello.html HTTP/1.1
> Content-Length: 138
> Content-Type: text/xml; charset=utf-8
> Host: localhost
> User-Agent: Jakarta HTTP Client/1.0
> 
> HTTP/1.1 401 Unauthorized
> Content-Type: text/html
> Date: Mon, 22 Apr 2002 07:24:03 GMT
> Transfer-Encoding: chunked
> Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
> WWW-Authenticate: Basic realm="Slide DAV Server"
> 
> PROPPATCH /files/myfiles/hello.html HTTP/1.1
> Content-Length: 138
> Authorization: Basic cm9vdDpyb290
> Content-Type: text/xml; charset=utf-8
> Host: localhost
> User-Agent: Jakarta HTTP Client/1.0
> 
> HTTP/1.1 207 Multi-Status
> Date: Mon, 22 Apr 2002 07:24:04 GMT
> Transfer-Encoding: chunked
> Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
> Set-Cookie: JSESSIONID=277442F2100660B203C012F0D2745151;Path=/
> 
> How can I have the authorization ? I tried this with the 'root' login, so I
> can't imagine how I could have more rights...
> 
> Can someone help ?
> Thanx
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
>