eXist Sessions with OPS

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

eXist Sessions with OPS

Marcus-2
Hi,

i'm using my app with an external exist-db, but i use the rest-api to coomunicat with it. What i noticed is, that the actual session isn't closed after the submissions. So in very short time i got now about 10 sessions, but only one application. Is that correct? Can i explicit lose the connection after the submission?

Another questions is: How can i tell the exist instance i'm talking to with my submissions and through rest, my username and password? At the moment i had to change the rights to "guest", but from now on i have to save internal data and protect them. So i have to use the right-management, but i don#t know how. Could someone help me with that?

Thanks.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Ryan Puddephatt
Hi,
    I don't know about the external exist issue I'm afraid, but you can use the standard to pass user/pass

http://user:pass@url

or on the xforms:submission element you can use @xxforms:username and @xxforms:password

HTH

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com



[hidden email] wrote:
Hi, 

i'm using my app with an external exist-db, but i use the rest-api to coomunicat with it. What i noticed is, that the actual session isn't closed after the submissions. So in very short time i got now about 10 sessions, but only one application. Is that correct? Can i explicit lose the connection after the submission?

Another questions is: How can i tell the exist instance i'm talking to with my submissions and through rest, my username and password? At the moment i had to change the rights to "guest", but from now on i have to save internal data and protect them. So i have to use the right-management, but i don#t know how. Could someone help me with that?

Thanks.

  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Alessandro Vernet
Administrator
In reply to this post by Marcus-2
On 4/3/07, [hidden email] <[hidden email]> wrote:
> Hi,
>
> i'm using my app with an external exist-db, but i use the rest-api to coomunicat with it. What i noticed is, that the actual session isn't closed after the submissions. So in very short time i got now about 10 sessions, but only one application. Is that correct? Can i explicit lose the connection after the submission?

It the session you are talking about on the eXist side? If you have a
request from an authenticated user to Orbeon Forms, if when generating
the page a request is made to eXist, the Authentication header is
forwarded. So this should work as expected if you have the same user
(with the same login/password) setup in eXist.

In general, I have one eXist user for my application and the
application is sending the username/password for that user when doing
requests to eXist. This done with the @xxforms:username and
@xxforms:password mentioned earlier in this thread by Ryan.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi,
i've got no idea how to authenticate a user to orbeon forms.
Within my submission i tried both and none of them worked.
Username: kkbib01
Passowrd: kkbib

<xforms:submission id="delete-document-submission" serialize="false"
method="delete" replace="none" f:url-type="resource"
                       action="http://kkbib01:kkbib@localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>

and

<xforms:submission id="delete-document-submission" serialize="false"
method="delete" replace="none" f:url-type="resource"
xxforms:username="kkbib01" xxforms:password="kkbib"
                       action="http://localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>

Both times i got the following error message:

HTTP Status 403 - Write access to collection denied; user=guest
type Status report
message Write access to collection denied; user=guest
description Access to the specified resource (Write access to collection
denied; user=guest) has been forbidden.

So, this solution does not work with the externam exist-db? Or did i do
something wrong?
Marcus


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Monday, April 09, 2007 10:23 PM
Subject: Re: [ops-users] eXist Sessions with OPS


> On 4/3/07, [hidden email] <[hidden email]> wrote:
>> Hi,
>>
>> i'm using my app with an external exist-db, but i use the rest-api to
>> coomunicat with it. What i noticed is, that the actual session isn't
>> closed after the submissions. So in very short time i got now about 10
>> sessions, but only one application. Is that correct? Can i explicit lose
>> the connection after the submission?
>
> It the session you are talking about on the eXist side? If you have a
> request from an authenticated user to Orbeon Forms, if when generating
> the page a request is made to eXist, the Authentication header is
> forwarded. So this should work as expected if you have the same user
> (with the same login/password) setup in eXist.
>
> In general, I have one eXist user for my application and the
> application is sending the username/password for that user when doing
> requests to eXist. This done with the @xxforms:username and
> @xxforms:password mentioned earlier in this thread by Ryan.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Alessandro Vernet
Administrator
Hi Marcus,

The two ways you mention should work. Are you having this problem with
the "delete" method only, or can you reproduce it when using the "get"
method as well? If you can reproduce this with a "get", you can try
pasting the URL using the http://user:pwd@server syntax in the browser
to see if it works there. Just to check if this is a problem at the
Orbeon Forms level, or at the eXist level.

Also you might want to make the query go through Apache tcpmon
(http://ws.apache.org/commons/tcpmon/) to see what authorization gets
sent by Orbeon Forms to eXist.

Alex

On 4/12/07, Marcus <[hidden email]> wrote:

> Hi,
> i've got no idea how to authenticate a user to orbeon forms.
> Within my submission i tried both and none of them worked.
> Username: kkbib01
> Passowrd: kkbib
>
> <xforms:submission id="delete-document-submission" serialize="false"
> method="delete" replace="none" f:url-type="resource"
>                        action="http://kkbib01:kkbib@localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>
>
> and
>
> <xforms:submission id="delete-document-submission" serialize="false"
> method="delete" replace="none" f:url-type="resource"
> xxforms:username="kkbib01" xxforms:password="kkbib"
>                        action="http://localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>
>
> Both times i got the following error message:
>
> HTTP Status 403 - Write access to collection denied; user=guest
> type Status report
> message Write access to collection denied; user=guest
> description Access to the specified resource (Write access to collection
> denied; user=guest) has been forbidden.
>
> So, this solution does not work with the externam exist-db? Or did i do
> something wrong?
> Marcus
>
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, April 09, 2007 10:23 PM
> Subject: Re: [ops-users] eXist Sessions with OPS
>
>
> > On 4/3/07, [hidden email] <[hidden email]> wrote:
> >> Hi,
> >>
> >> i'm using my app with an external exist-db, but i use the rest-api to
> >> coomunicat with it. What i noticed is, that the actual session isn't
> >> closed after the submissions. So in very short time i got now about 10
> >> sessions, but only one application. Is that correct? Can i explicit lose
> >> the connection after the submission?
> >
> > It the session you are talking about on the eXist side? If you have a
> > request from an authenticated user to Orbeon Forms, if when generating
> > the page a request is made to eXist, the Authentication header is
> > forwarded. So this should work as expected if you have the same user
> > (with the same login/password) setup in eXist.
> >
> > In general, I have one eXist user for my application and the
> > application is sending the username/password for that user when doing
> > requests to eXist. This done with the @xxforms:username and
> > @xxforms:password mentioned earlier in this thread by Ryan.
> >
> > Alex
> > --
> > Orbeon Forms - Web 2.0 Forms for the Enterprise
> > http://www.orbeon.com/
> >
> >
>
>
> --------------------------------------------------------------------------------
>
>
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
> > mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi,
the following URL does not work in my browser, should it?
http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/rest//db/kkbib/forms/SIG/1

IE does not send the URL, only without user:pwd@ and then i get the
following error message:

HTTP Status 403 - Not allowed to read resource
type Status report
message Not allowed to read resource
description Access to the specified resource (Not allowed to read resource)
has been forbidden.
Apache Tomcat/5.0

And in Firefox i get the same error message.
Only when i set the properties of the Owner to guest i can get the xml-file
from the DB.

Do you know where i can change the policies or change the properties to get
access to the DB?

Thanxs,
Marcus


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 12:57 AM
Subject: Re: [ops-users] eXist Sessions with OPS


> Hi Marcus,
>
> The two ways you mention should work. Are you having this problem with
> the "delete" method only, or can you reproduce it when using the "get"
> method as well? If you can reproduce this with a "get", you can try
> pasting the URL using the http://user:pwd@server syntax in the browser
> to see if it works there. Just to check if this is a problem at the
> Orbeon Forms level, or at the eXist level.
>
> Also you might want to make the query go through Apache tcpmon
> (http://ws.apache.org/commons/tcpmon/) to see what authorization gets
> sent by Orbeon Forms to eXist.
>
> Alex
>
> On 4/12/07, Marcus <[hidden email]> wrote:
>> Hi,
>> i've got no idea how to authenticate a user to orbeon forms.
>> Within my submission i tried both and none of them worked.
>> Username: kkbib01
>> Passowrd: kkbib
>>
>> <xforms:submission id="delete-document-submission" serialize="false"
>> method="delete" replace="none" f:url-type="resource"
>>
>> action="http://kkbib01:kkbib@localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>
>>
>> and
>>
>> <xforms:submission id="delete-document-submission" serialize="false"
>> method="delete" replace="none" f:url-type="resource"
>> xxforms:username="kkbib01" xxforms:password="kkbib"
>>
>> action="http://localhost:8085/exist/rest//db/kkbib/forms/{{xxforms:instance('parameters-instance')/form-id}}/{{xxforms:instance('documents-instance')/documents/document[index('documents-repeat')]/id}}"/>
>>
>> Both times i got the following error message:
>>
>> HTTP Status 403 - Write access to collection denied; user=guest
>> type Status report
>> message Write access to collection denied; user=guest
>> description Access to the specified resource (Write access to collection
>> denied; user=guest) has been forbidden.
>>
>> So, this solution does not work with the externam exist-db? Or did i do
>> something wrong?
>> Marcus
>>
>>
>> ----- Original Message -----
>> From: "Alessandro Vernet" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, April 09, 2007 10:23 PM
>> Subject: Re: [ops-users] eXist Sessions with OPS
>>
>>
>> > On 4/3/07, [hidden email] <[hidden email]> wrote:
>> >> Hi,
>> >>
>> >> i'm using my app with an external exist-db, but i use the rest-api to
>> >> coomunicat with it. What i noticed is, that the actual session isn't
>> >> closed after the submissions. So in very short time i got now about 10
>> >> sessions, but only one application. Is that correct? Can i explicit
>> >> lose
>> >> the connection after the submission?
>> >
>> > It the session you are talking about on the eXist side? If you have a
>> > request from an authenticated user to Orbeon Forms, if when generating
>> > the page a request is made to eXist, the Authentication header is
>> > forwarded. So this should work as expected if you have the same user
>> > (with the same login/password) setup in eXist.
>> >
>> > In general, I have one eXist user for my application and the
>> > application is sending the username/password for that user when doing
>> > requests to eXist. This done with the @xxforms:username and
>> > @xxforms:password mentioned earlier in this thread by Ryan.
>> >
>> > Alex
>> > --
>> > Orbeon Forms - Web 2.0 Forms for the Enterprise
>> > http://www.orbeon.com/
>> >
>> >
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>> >
>> > --
>> > You receive this message as a subscriber of the [hidden email]
>> > mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>> >
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>
>
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Alessandro Vernet
Administrator
Marcus,

On 4/12/07, Marcus <[hidden email]> wrote:
> Hi,
> the following URL does not work in my browser, should it?
> http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/rest//db/kkbib/forms/SIG/1
>

This syntax works with Firefox. Firefox will just ask you to confirm
you want to login using that username/password.

> And in Firefox i get the same error message.
> Only when i set the properties of the Owner to guest i can get the xml-file
> from the DB.
>
> Do you know where i can change the policies or change the properties to get
> access to the DB?

In which way to you want to change the properties? Do you have a user
"kkbib01" defined in eXist? Are the documents accessible to that user
because they are owned by that user or by a group that contain that
user? You might want to read this section of the eXist documentation:

http://exist.sourceforge.net/security.html

And if anything is unclear, I would encourage you to post on the eXist
mailing list. You are likely to find there people who are more
knowledgeable about eXist :).

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi Alex,
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(
Thanks, Marcus


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 2:43 AM
Subject: Re: [ops-users] eXist Sessions with OPS


> Marcus,
>
> On 4/12/07, Marcus <[hidden email]> wrote:
>> Hi,
>> the following URL does not work in my browser, should it?
>> http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/rest//db/kkbib/forms/SIG/1
>>
>
> This syntax works with Firefox. Firefox will just ask you to confirm
> you want to login using that username/password.
>
>> And in Firefox i get the same error message.
>> Only when i set the properties of the Owner to guest i can get the
>> xml-file
>> from the DB.
>>
>> Do you know where i can change the policies or change the properties to
>> get
>> access to the DB?
>
> In which way to you want to change the properties? Do you have a user
> "kkbib01" defined in eXist? Are the documents accessible to that user
> because they are owned by that user or by a group that contain that
> user? You might want to read this section of the eXist documentation:
>
> http://exist.sourceforge.net/security.html
>
> And if anything is unclear, I would encourage you to post on the eXist
> mailing list. You are likely to find there people who are more
> knowledgeable about eXist :).
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Alessandro Vernet
Administrator
Hi Marcus,

On 4/12/07, Marcus <[hidden email]> wrote:
> as i wrote before, that URL works neither in IE nor in Firefox.
> Of course i have an existing user in exist called "kkbib01" with the
> passowrd: "kkbib"
> Because of that i need to use the username and password, if i don't want to
> change all properties to the "guest"-state. And the user kkbib01 is added to
> the group "dba", so it's a suer that has all rights inside exist.
>
> But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi Alex,

i wrote to the exist-mailing list and hope to get help there, but i tried
the same with your internal exist-db, coming within ops.war and there it
also does not work - sendling the request, directly through the browser. I
added the xmlrpc-servlet to get access via the GUI from exist homepage.
Created a new user "kkbib01" with password "kkbib". Changed my collection to
Owner "kkbib01" the group to "dba", denied read, write and update for "all
users", so only an authenticated user or a memeber of the group could get
access to the collections an the files.
Then i run the url:
http://kkbib01:kkbib@127.0.0.1:8085/ops35/exist/rest/db/kkbib/forms/SIG/1
and id does not work either!

So even your internal exist-db is not configured to accept this
authentication method. I hope to get a tip from the other mailing list how
to solve that problem, but perhaps that helps you to get another idea?
Besides REST, is there another way sending my request to the db to store or
retrieve data? Or do i have to use REST within the action of my submissions?
It seems to be the easiest way, but if it is not possible to protect my data
inside the db, i have to find another way :-((

If you've got any other hints, please let me know! If i got some helpful
tipps from the exist mailinglist, i'll let you know too.
Thanks


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


> Hi Marcus,
>
> On 4/12/07, Marcus <[hidden email]> wrote:
>> as i wrote before, that URL works neither in IE nor in Firefox.
>> Of course i have an existing user in exist called "kkbib01" with the
>> passowrd: "kkbib"
>> Because of that i need to use the username and password, if i don't want
>> to
>> change all properties to the "guest"-state. And the user kkbib01 is added
>> to
>> the group "dba", so it's a suer that has all rights inside exist.
>>
>> But i will try the exist link you gave me and hope to find help there :-(
>
> The eXist documentation and mailing list are your best bet at this
> point. You'll let us know how it goes.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
In reply to this post by Alessandro Vernet
Hi Alex,

i havn't get any answer yet, but looking to some other threads i wonder if
using the webdav-protocol won't do the same as the rest does?
As we know until now, this one doesn't work. neither with the external, nor
the internal exist-db
http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/rest//db/kkbib/forms/SIG/1
But this one does work:
http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/webdav//db/kkbib/forms/SIG/1

At the moment i had only time to test the get-request, and this works fine.
I'll try now the update, store and delete submissions and hope they will
work too. I'll let you know!


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


> Hi Marcus,
>
> On 4/12/07, Marcus <[hidden email]> wrote:
>> as i wrote before, that URL works neither in IE nor in Firefox.
>> Of course i have an existing user in exist called "kkbib01" with the
>> passowrd: "kkbib"
>> Because of that i need to use the username and password, if i don't want
>> to
>> change all properties to the "guest"-state. And the user kkbib01 is added
>> to
>> the group "dba", so it's a suer that has all rights inside exist.
>>
>> But i will try the exist link you gave me and hope to find help there :-(
>
> The eXist documentation and mailing list are your best bet at this
> point. You'll let us know how it goes.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
I knew it couldn't be so easy :-(
There it goes:

HTTP Status 405 - Method is not supported: POST
type Status report
message Method is not supported: POST
description The specified HTTP method is not allowed for the requested
resource (Method is not supported: POST).
Apache Tomcat/5.5.20

So i have to go on with my search :-(
It was worth i try i thought - a pitty it doesn't worked.


----- Original Message -----
From: "Marcus" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 1:47 PM
Subject: Re: [ops-users] eXist Sessions with OPS


> Hi Alex,
>
> i havn't get any answer yet, but looking to some other threads i wonder if
> using the webdav-protocol won't do the same as the rest does?
> As we know until now, this one doesn't work. neither with the external,
> nor
> the internal exist-db
> http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/rest//db/kkbib/forms/SIG/1
> But this one does work:
> http://kkbib01:kkbib@...:8080/exist-1.1.1-newcore/webdav//db/kkbib/forms/SIG/1
>
> At the moment i had only time to test the get-request, and this works
> fine.
> I'll try now the update, store and delete submissions and hope they will
> work too. I'll let you know!
>
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, April 13, 2007 3:04 AM
> Subject: Re: [ops-users] eXist Sessions with OPS
>
>
>> Hi Marcus,
>>
>> On 4/12/07, Marcus <[hidden email]> wrote:
>>> as i wrote before, that URL works neither in IE nor in Firefox.
>>> Of course i have an existing user in exist called "kkbib01" with the
>>> passowrd: "kkbib"
>>> Because of that i need to use the username and password, if i don't want
>>> to
>>> change all properties to the "guest"-state. And the user kkbib01 is
>>> added
>>> to
>>> the group "dba", so it's a suer that has all rights inside exist.
>>>
>>> But i will try the exist link you gave me and hope to find help there
>>> :-(
>>
>> The eXist documentation and mailing list are your best bet at this
>> point. You'll let us know how it goes.
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms for the Enterprise
>> http://www.orbeon.com/
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
In reply to this post by Alessandro Vernet
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if
i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with
http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the
WebDAV-Protocol and there also with using
http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the
error-message, that it is not supported! :-( So here you have to use the
REST-protocol! But "Username" and "Password" are not supported by REST, so i
have to leave the reading-rights for ALL Users, otherwise i always get the
message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than
"guest" you havte to use the WebDAV-Protocol and there you can use
http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki
http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
  http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP
PUT.
 http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV
interfaces for eXist."

I'll search the manual for further information on that, but this are the
facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


> Hi Marcus,
>
> On 4/12/07, Marcus <[hidden email]> wrote:
>> as i wrote before, that URL works neither in IE nor in Firefox.
>> Of course i have an existing user in exist called "kkbib01" with the
>> passowrd: "kkbib"
>> Because of that i need to use the username and password, if i don't want
>> to
>> change all properties to the "guest"-state. And the user kkbib01 is added
>> to
>> the group "dba", so it's a suer that has all rights inside exist.
>>
>> But i will try the exist link you gave me and hope to find help there :-(
>
> The eXist documentation and mailing list are your best bet at this
> point. You'll let us know how it goes.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Ryan Puddephatt
Marcus,
    I'm sure I use REST Authentication, but I'll have to check my code at home, because I don't use exist at work.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the WebDAV-Protocol and there also with using http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the error-message, that it is not supported! :-( So here you have to use the REST-protocol! But "Username" and "Password" are not supported by REST, so i have to leave the reading-rights for ALL Users, otherwise i always get the message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than "guest" you havte to use the WebDAV-Protocol and there you can use http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
 http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP PUT.
http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV interfaces for eXist."

I'll search the manual for further information on that, but this are the facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message ----- From: "Alessandro Vernet" [hidden email]
To: [hidden email]
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


Hi Marcus,

On 4/12/07, Marcus [hidden email] wrote:
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/




--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi Ryan,
if you could use the REST Authentication, please let me know exactly how your submissons look like and where to authenticate the User! I tested now for a whole day every combination i could think of, and those i wrote last time where the only solutions that worked here :-(
 
Thanks a lot,
Marcus
 
----- Original Message -----
Sent: Friday, April 13, 2007 3:09 PM
Subject: Re: [ops-users] eXist Sessions with OPS

Marcus,
    I'm sure I use REST Authentication, but I'll have to check my code at home, because I don't use exist at work.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the WebDAV-Protocol and there also with using http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the error-message, that it is not supported! :-( So here you have to use the REST-protocol! But "Username" and "Password" are not supported by REST, so i have to leave the reading-rights for ALL Users, otherwise i always get the message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than "guest" you havte to use the WebDAV-Protocol and there you can use http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
 http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP PUT.
http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV interfaces for eXist."

I'll search the manual for further information on that, but this are the facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message ----- From: "Alessandro Vernet" [hidden email]
To: [hidden email]
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


Hi Marcus,

On 4/12/07, Marcus [hidden email] wrote:
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/




--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
In reply to this post by Ryan Puddephatt
Hi Ryan,
did you took a look at home and checked your code?
Would be pleased to finish that problem with your help.
Thanks,
 
Marcus
 
----- Original Message -----
Sent: Friday, April 13, 2007 3:09 PM
Subject: Re: [ops-users] eXist Sessions with OPS

Marcus,
    I'm sure I use REST Authentication, but I'll have to check my code at home, because I don't use exist at work.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the WebDAV-Protocol and there also with using http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the error-message, that it is not supported! :-( So here you have to use the REST-protocol! But "Username" and "Password" are not supported by REST, so i have to leave the reading-rights for ALL Users, otherwise i always get the message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than "guest" you havte to use the WebDAV-Protocol and there you can use http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
 http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP PUT.
http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV interfaces for eXist."

I'll search the manual for further information on that, but this are the facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message ----- From: "Alessandro Vernet" [hidden email]
To: [hidden email]
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


Hi Marcus,

On 4/12/07, Marcus [hidden email] wrote:
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/




--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Ryan Puddephatt
Marcus,
    Sorry I had forgotten to do that, luckily I am at home now :-)

In my page I have

<xforms:instance id="some-instance" src="/exist/rest/db/application/file"
    xxforms:username="user" xxforms:password="pass"/>

In my web.xml I have

<servlet-mapping>
    <servlet-name>exist-rest-servlet</servlet-name>
    <url-pattern>/exist/rest/*</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>exist-rest-servlet</servlet-name>
    <servlet-class>org.exist.http.servlets.EXistServlet</servlet-class>
    <init-param>
       <param-name>dynamic-content-type</param-name>
       <param-value>yes</param-name>
    </init-param>
    <init-param>
       <param-name>basedir</param-name>
       <param-value>WEB-INF/</param-value>
    </init-param>
    <init-param>
       <param-name>configuration</param-name>
       <param-value>exist-conf.xml</param-value>
    </init-param>
    <init-param>
       <param-name>start</param-name>
       <param-value>true</param-name>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>

I've attached my exist-conf.xml see if that is different from you. Although I don't a recent version of OF, I am using a new version of Exist and it works fine!

HTH

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi Ryan,
did you took a look at home and checked your code?
Would be pleased to finish that problem with your help.
Thanks,
 
Marcus
 
----- Original Message -----
Sent: Friday, April 13, 2007 3:09 PM
Subject: Re: [ops-users] eXist Sessions with OPS

Marcus,
    I'm sure I use REST Authentication, but I'll have to check my code at home, because I don't use exist at work.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the WebDAV-Protocol and there also with using http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the error-message, that it is not supported! :-( So here you have to use the REST-protocol! But "Username" and "Password" are not supported by REST, so i have to leave the reading-rights for ALL Users, otherwise i always get the message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than "guest" you havte to use the WebDAV-Protocol and there you can use http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
 http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP PUT.
http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV interfaces for eXist."

I'll search the manual for further information on that, but this are the facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message ----- From: "Alessandro Vernet" [hidden email]
To: [hidden email]
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


Hi Marcus,

On 4/12/07, Marcus [hidden email] wrote:
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/




--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

<?xml version="1.0" encoding="UTF-8"?>

<!--
        This is the central configuration file for the database. If the database
    is running in a servlet-context, the configuration file will be read from
    the WEB-INF directory of the web application. Otherwise, the configuration
    is read from the directory specified by the exist.home system property.
-->
<exist>


    <!-- Configures the cluster configuration
        - protocol:
        defines a protocol stack. Refers the jgroups protocol stack.
        - dbaUser:
        defines the user used by the cluster for the replica.
        - dbaPassword:
        defines the user password used by the cluster for the replica.
   -->
    <cluster protocol="UDP:PING" dbaUser="admin" dbaPassword=""/>

    <!-- Configures the database backend:
        - database:
            selects a database backend. Currently, "native" and "native_cluster"
            are the only valid setting.
        - files:
            path to the directory where database files are
            stored.
        - cacheSize:
            the maximum amount of memory to use for database page buffers.
            Each database file has an associated page buffer for B+-tree and
            data pages. However, the memory specified via cacheSize is shared
            between all page buffers. It represents an absolute maximum, which
            would be occupied if all page buffers were completely full.
        - free_mem_min:
            minimum amount of free memory in percent during indexing. The
            database will start to flush its internal buffers whenever
            free memory drops below the specified limit.
        - pageSize:
            the size of one page on the disk. This is the smallest unit
            transferred from and to the database files. Should be a multiple of
            the operating system's file system page size (usually 4096).
    -->

    <!-- The settings below are very conservative to avoid out-of-memory
    exceptions on machines with limited memory (256MB). Increase the
    buffer settings for elements_buffers and words_buffers if you have
    some more memory to waste. -->
        <db-connection database="native" files="exist-data"
                pageSize="4096" cacheSize="64M" free_mem_min="5">

        <!-- Settings for the database connection pool:
            - sync-period
                defines how often the database will flush its
                internal buffers to disk. The sync thread will interrupt
                normal database operation after the specified number of
                milliseconds and write all dirty pages to disk.
            - min: minimum number of connections to keep alive.
            - max: maximum number of connections allowed.
                        - wait-before-shutdown:
                            defines how long the database instance will wait for running
                            operations to complete before it forces a shutdown.
        -->
                <pool min="1" max="20" sync-period="120000" wait-before-shutdown="120000"/>

                <recovery enabled="yes" sync-on-commit="no"
            size="10M" journal-dir="exist-data"/>

                <watchdog query-timeout="-1" output-size-limit="10000"/>

                <!--system-task class="org.exist.storage.DataBackup" period="120000">
                        <parameter name="output-dir" value="backup"/>
                </system-task-->
    </db-connection>

    <!-- Default settings for the serializer. Most of these can be changed
    by client code:

    - enable-xinclude:
        should the database expand XInclude tags by default?
    - enable-xsl:
        should the database evaluate XSL processing instructions
        when serializing documents?
    - indent:
        should the serializer pretty-print (indent) XML?
    - match-tagging-elements:
    - match-tagging-attributes:

    - add-exist-id:
        for debugging: add an exist:id attribute to every element, showing
        the internal node identifier (as a long int) assigned to this node.
        Possible values are: "none", "element", "all". "all" displays the node
        of every element node; "element" displays the id only for the root nodes
        of the returned XML fragments.
    -->
    <serializer enable-xinclude="yes" enable-xsl="no"
                indent="yes" add-exist-id="none" match-tagging-elements="yes"
        match-tagging-attributes="no"/>

        <!-- During XUpdates, the database needs to do a partial reindex of the
        document whenever the internal node-id structure has changed. Reindex
        runs can occur quite frequently and slow down the XUpdate process.

        Frequent reindex runs can be avoided by leaving some space between the
        numeric identifiers assigned to every node. Future insertions will first
        fill up these spare identifiers, so no reindex is required.

        The "growth-factor" attribute determines the number of spare ids to be
        inserted whenever the node id scheme is recomputed after an XUpdate.
        Increase the setting to have less reindex runs. However, you have to
        be aware that leaving spare ids also limits the maximum size of a
        document that can be indexed.

        "enable-consistency-checks" is for debugging only. If the parameter
        is set to "yes", a consistency check will be run on every modified
        document after every XUpdate request. It checks if the
        persistent DOM is complete and all pointers in the structural
        index point to valid storage addresses containing valid nodes.

    "allowed-fragmentation" defines the maximum number of page splits allowed within a
    document before a defragmentation run will be triggered.
        -->

        <xupdate growth-factor="20" allowed-fragmentation="20"
                enable-consistency-checks="no"/>

    <xquery>
        <builtin-modules>
            <module uri="http://exist-db.org/xquery/util"
                class="org.exist.xquery.functions.util.UtilModule"/>
            <module uri="http://exist-db.org/xquery/transform"
                class="org.exist.xquery.functions.transform.TransformModule"/>
            <module uri="http://exist-db.org/xquery/xmldb"
                class="org.exist.xquery.functions.xmldb.XMLDBModule"/>
            <module uri="http://exist-db.org/xquery/request"
                class="org.exist.xquery.functions.request.RequestModule"/>
            <module uri="http://exist-db.org/xquery/response"
             class="org.exist.xquery.functions.response.ResponseModule"/>
            <module uri="http://exist-db.org/xquery/text"
                class="org.exist.xquery.functions.text.TextModule"/>
            <module uri="http://exist-db.org/xquery/examples"
                class="org.exist.xquery.modules.example.ExampleModule"/>
            <module uri="http://exist-db.org/xquery/validation"
                class="org.exist.xquery.functions.validation.ValidationModule"/>
            <module uri="http://exist-db.org/xquery/session"
            class="org.exist.xquery.functions.session.SessionModule"/>
        </builtin-modules>
    </xquery>

    <!--
        Settings for the indexer:
        - suppress-whitespace
            should leading or trailing whitespace be removed from a text
            node? Set to "leading", "trailing", "both" or "none". Changing
            the parameter will only have an effect on newly loaded files, not
            old ones.
        - caseSensitive
            should equality comparisons between strings be case-sensitive or
            insensitive: "yes" or "no".
        - validation
            should XML source files be validated against a schema or DTD before
            storing them? The setting is passed to the XML parser. The actual
            effects depend on the parser you use. eXist comes with Xerces which can
            validate against both: schemas and DTDs. Possible values: "yes",
            "no", "auto". "auto" will leave validation to the parser.
        - stemming
            eXist includes a very simple english language stemmer, based on Porter's algorithm.
            Set the "stemming"-option to "true" if you would like to use stemming. This does
            only work for english.
        - index-depth
            defines the maximum nesting depth of nodes which will be indexed
            in the DOM index. Nodes below the specified nesting depth will
            not be indexed in the DOM file. This has only an effect when
            retrieving query results or for some types of XPath subexpressions, like
            equality comparisons.
        - suppress-whitespace-mixed-content
            preserve the white space inside a mixed content node
    -->
    <indexer stemming="no" caseSensitive="yes" suppress-whitespace="both"
        index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer"
        track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no">

                <!-- where's the file containing a list of stopwords to be ignored
         by the parser. -->
                <stopwords file="stopword"/>

                <!-- default index settings. Default settings apply if there's no collection-specific
                configuration for a collection.
        -->
        <index>
                        <fulltext default="all" attributes="true">
                                <exclude path="/auth"/>
                        </fulltext>
                </index>

        <!-- Specify the location of one or more catalog files.
        Catalogs are used to resolve external entities in XML documents.
        -->
        <!--
                <entity-resolver>
                        <catalog file="exist-catalog.xml"/>
                </entity-resolver>
        -->
    </indexer>

</exist>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: eXist Sessions with OPS

Marcus-2
Hi Ryan,
in your lines there are no explicit submissons, so i think all you do is reading that "instance" from your exist-db, right? And normaly exist saves all data with "-rwur-ur-u" permissons, so reading should be no problem with that rights-managment. Did you test it also with "-rwurwu---" or even "-rwu------"??? So that only the user (and the users-group) have access rights?
 
And am i right, that you load your instance out of the exist-db? Or what is the src-tag for?
 
Marcus
 
 
----- Original Message -----
Sent: Tuesday, April 17, 2007 12:29 AM
Subject: Re: [ops-users] eXist Sessions with OPS

Marcus,
    Sorry I had forgotten to do that, luckily I am at home now :-)

In my page I have

<xforms:instance id="some-instance" src="/exist/rest/db/application/file"
    xxforms:username="user" xxforms:password="pass"/>

In my web.xml I have

<servlet-mapping>
    <servlet-name>exist-rest-servlet</servlet-name>
    <url-pattern>/exist/rest/*</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>exist-rest-servlet</servlet-name>
    <servlet-class>org.exist.http.servlets.EXistServlet</servlet-class>
    <init-param>
       <param-name>dynamic-content-type</param-name>
       <param-value>yes</param-name>
    </init-param>
    <init-param>
       <param-name>basedir</param-name>
       <param-value>WEB-INF/</param-value>
    </init-param>
    <init-param>
       <param-name>configuration</param-name>
       <param-value>exist-conf.xml</param-value>
    </init-param>
    <init-param>
       <param-name>start</param-name>
       <param-value>true</param-name>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>

I've attached my exist-conf.xml see if that is different from you. Although I don't a recent version of OF, I am using a new version of Exist and it works fine!

HTH

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi Ryan,
did you took a look at home and checked your code?
Would be pleased to finish that problem with your help.
Thanks,
 
Marcus
 
----- Original Message -----
Sent: Friday, April 13, 2007 3:09 PM
Subject: Re: [ops-users] eXist Sessions with OPS

Marcus,
    I'm sure I use REST Authentication, but I'll have to check my code at home, because I don't use exist at work.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi,
so I found out the following until now:

1. "Username" and "Password" are not supported by REST. It doesn't matter if i use the internal or the external exist-db! It does not work!
Neither with xxforms:username="kkbib01" xxforms:password="kkbib" nor with http://kkbib01:kkbib@localhost..... Both versions fail!

2. "Username" and "Password" work as far as i can reproduce only with the WebDAV-Protocol and there also with using http://kkbib01:kkbib@localhost.....

3. The "Post"-Method does not work with the webdav-protocol. There i get the error-message, that it is not supported! :-( So here you have to use the REST-protocol! But "Username" and "Password" are not supported by REST, so i have to leave the reading-rights for ALL Users, otherwise i always get the message "permission denied" when trying to access one of these files!

4. So, for storing, updating or deleting files with another user than "guest" you havte to use the WebDAV-Protocol and there you can use http://kkbib01:kkbib@localhost.....
That works quite well.

I found the following resource on the Wiki http://en.wikibooks.org/wiki/XForms/eXist
"The key is to put the word "rest" in the URL:
 http://localhost:8080/exist/rest/db/home/juser/test/data.xml
when doing a read but put the word "webdav" in the path when doing an HTTP PUT.
http://localhost:8080/exist/webdav/db/home/juser/test/data.xml
That is all there is too it!
For more information see the eXist manual on using the REST and WebDAV interfaces for eXist."

I'll search the manual for further information on that, but this are the facts i just found out.
Just to keep you informed for now,
Marcus


----- Original Message ----- From: "Alessandro Vernet" [hidden email]
To: [hidden email]
Sent: Friday, April 13, 2007 3:04 AM
Subject: Re: [ops-users] eXist Sessions with OPS


Hi Marcus,

On 4/12/07, Marcus [hidden email] wrote:
as i wrote before, that URL works neither in IE nor in Firefox.
Of course i have an existing user in exist called "kkbib01" with the
passowrd: "kkbib"
Because of that i need to use the username and password, if i don't want to
change all properties to the "guest"-state. And the user kkbib01 is added to
the group "dba", so it's a suer that has all rights inside exist.

But i will try the exist link you gave me and hope to find help there :-(

The eXist documentation and mailing list are your best bet at this
point. You'll let us know how it goes.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/




--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


<?xml version="1.0" encoding="UTF-8"?>

<!--
This is the central configuration file for the database. If the database
    is running in a servlet-context, the configuration file will be read from
    the WEB-INF directory of the web application. Otherwise, the configuration
    is read from the directory specified by the exist.home system property.
-->
<exist>


    <!-- Configures the cluster configuration
        - protocol:
        defines a protocol stack. Refers the jgroups protocol stack.
        - dbaUser:
        defines the user used by the cluster for the replica.
        - dbaPassword:
        defines the user password used by the cluster for the replica.
   -->
    <cluster protocol="UDP:PING" dbaUser="admin" dbaPassword=""/>

    <!-- Configures the database backend:
        - database:
            selects a database backend. Currently, "native" and "native_cluster"
            are the only valid setting.
        - files:
            path to the directory where database files are
            stored.
        - cacheSize:
            the maximum amount of memory to use for database page buffers.
            Each database file has an associated page buffer for B+-tree and
            data pages. However, the memory specified via cacheSize is shared
            between all page buffers. It represents an absolute maximum, which
            would be occupied if all page buffers were completely full.
        - free_mem_min:
            minimum amount of free memory in percent during indexing. The
            database will start to flush its internal buffers whenever
            free memory drops below the specified limit.
        - pageSize:
            the size of one page on the disk. This is the smallest unit
            transferred from and to the database files. Should be a multiple of
            the operating system's file system page size (usually 4096).
    -->

    <!-- The settings below are very conservative to avoid out-of-memory
    exceptions on machines with limited memory (256MB). Increase the
    buffer settings for elements_buffers and words_buffers if you have
    some more memory to waste. -->
<db-connection database="native" files="exist-data"
pageSize="4096" cacheSize="64M" free_mem_min="5">

        <!-- Settings for the database connection pool:
            - sync-period
                defines how often the database will flush its
                internal buffers to disk. The sync thread will interrupt
                normal database operation after the specified number of
                milliseconds and write all dirty pages to disk.
            - min: minimum number of connections to keep alive.
            - max: maximum number of connections allowed.
- wait-before-shutdown:
    defines how long the database instance will wait for running
    operations to complete before it forces a shutdown.
        -->
<pool min="1" max="20" sync-period="120000" wait-before-shutdown="120000"/>

<recovery enabled="yes" sync-on-commit="no"
            size="10M" journal-dir="exist-data"/>

<watchdog query-timeout="-1" output-size-limit="10000"/>

<!--system-task class="org.exist.storage.DataBackup" period="120000">
<parameter name="output-dir" value="backup"/>
</system-task-->
    </db-connection>

    <!-- Default settings for the serializer. Most of these can be changed
    by client code:

    - enable-xinclude:
        should the database expand XInclude tags by default?
    - enable-xsl:
        should the database evaluate XSL processing instructions
        when serializing documents?
    - indent:
        should the serializer pretty-print (indent) XML?
    - match-tagging-elements:
    - match-tagging-attributes:

    - add-exist-id:
        for debugging: add an exist:id attribute to every element, showing
        the internal node identifier (as a long int) assigned to this node.
        Possible values are: "none", "element", "all". "all" displays the node
        of every element node; "element" displays the id only for the root nodes
        of the returned XML fragments.
    -->
    <serializer enable-xinclude="yes" enable-xsl="no"
indent="yes" add-exist-id="none" match-tagging-elements="yes"
        match-tagging-attributes="no"/>

<!-- During XUpdates, the database needs to do a partial reindex of the
document whenever the internal node-id structure has changed. Reindex
runs can occur quite frequently and slow down the XUpdate process.

Frequent reindex runs can be avoided by leaving some space between the
numeric identifiers assigned to every node. Future insertions will first
fill up these spare identifiers, so no reindex is required.

The "growth-factor" attribute determines the number of spare ids to be
inserted whenever the node id scheme is recomputed after an XUpdate.
Increase the setting to have less reindex runs. However, you have to
be aware that leaving spare ids also limits the maximum size of a
document that can be indexed.

"enable-consistency-checks" is for debugging only. If the parameter
is set to "yes", a consistency check will be run on every modified
document after every XUpdate request. It checks if the
persistent DOM is complete and all pointers in the structural
index point to valid storage addresses containing valid nodes.

    "allowed-fragmentation" defines the maximum number of page splits allowed within a
    document before a defragmentation run will be triggered.
-->

<xupdate growth-factor="20" allowed-fragmentation="20"
enable-consistency-checks="no"/>

    <xquery>
        <builtin-modules>
            <module uri="http://exist-db.org/xquery/util"
                class="org.exist.xquery.functions.util.UtilModule"/>
            <module uri="http://exist-db.org/xquery/transform"
                class="org.exist.xquery.functions.transform.TransformModule"/>
            <module uri="http://exist-db.org/xquery/xmldb"
                class="org.exist.xquery.functions.xmldb.XMLDBModule"/>
            <module uri="http://exist-db.org/xquery/request"
                class="org.exist.xquery.functions.request.RequestModule"/>
            <module uri="http://exist-db.org/xquery/response"
             class="org.exist.xquery.functions.response.ResponseModule"/>
            <module uri="http://exist-db.org/xquery/text"
                class="org.exist.xquery.functions.text.TextModule"/>
            <module uri="http://exist-db.org/xquery/examples"
                class="org.exist.xquery.modules.example.ExampleModule"/>
            <module uri="http://exist-db.org/xquery/validation"
                class="org.exist.xquery.functions.validation.ValidationModule"/>
            <module uri="http://exist-db.org/xquery/session"
            class="org.exist.xquery.functions.session.SessionModule"/>
        </builtin-modules>
    </xquery>

    <!--
        Settings for the indexer:
        - suppress-whitespace
            should leading or trailing whitespace be removed from a text
            node? Set to "leading", "trailing", "both" or "none". Changing
            the parameter will only have an effect on newly loaded files, not
            old ones.
        - caseSensitive
            should equality comparisons between strings be case-sensitive or
            insensitive: "yes" or "no".
        - validation
            should XML source files be validated against a schema or DTD before
            storing them? The setting is passed to the XML parser. The actual
            effects depend on the parser you use. eXist comes with Xerces which can
            validate against both: schemas and DTDs. Possible values: "yes",
            "no", "auto". "auto" will leave validation to the parser.
        - stemming
            eXist includes a very simple english language stemmer, based on Porter's algorithm.
            Set the "stemming"-option to "true" if you would like to use stemming. This does
            only work for english.
        - index-depth
            defines the maximum nesting depth of nodes which will be indexed
            in the DOM index. Nodes below the specified nesting depth will
            not be indexed in the DOM file. This has only an effect when
            retrieving query results or for some types of XPath subexpressions, like
            equality comparisons.
        - suppress-whitespace-mixed-content
            preserve the white space inside a mixed content node
    -->
    <indexer stemming="no" caseSensitive="yes" suppress-whitespace="both"
index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer"
track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no">

<!-- where's the file containing a list of stopwords to be ignored
         by the parser. -->
<stopwords file="stopword"/>

<!-- default index settings. Default settings apply if there's no collection-specific
configuration for a collection.
        -->
        <index>
<fulltext default="all" attributes="true">
<exclude path="/auth"/>
</fulltext>
</index>

        <!-- Specify the location of one or more catalog files.
        Catalogs are used to resolve external entities in XML documents.
        -->
        <!--
<entity-resolver>
<catalog file="exist-catalog.xml"/>
</entity-resolver>
        -->
    </indexer>

</exist>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws