Re: [Dspace-tech] REST API for DSpace

2011-06-18 Thread Marianna Mühlhölzer
Hi Bojan,

Many thnaks for the quick answer.

With kind regards,
Marianna
> 
> 
> Am 17.06.2011 13:40, schrieb Marianna Mühlhölzer: 
> > Hi Bojan, 
> > 
> > I want to use the REST Interface for browsing our DSpace repository
> by 
> > title, date and subject. When trying to sort items I get problems
> with 
> > the pagination. The _perpage parameter does not work. Using
> _perpage 
> > alone has no influence on the number of retrieved items. I always
> get 
> > all items. Using a combination of _perpage and _page delivers
> strange 
> > results. For example, _perpage=2&_page=1 gives all items, 
> > _perpage=4&_page=1 gives 4 items, and _perpage=4&_perpage=2 is
> empty. 
> 
> I opened JIRA issue for this problem, this is probably a bug. 
> 
> 
> > I have two further questions: 
> > 
> > 1. The sorting process gives no information about the total number
> of 
> > items in the repository. Therefore, before starting pagination I
> have to 
> > request all items and count them, in order to realize the
> pagination. 
> > Is there a better way to do browsing via REST? 
> 
> This problem is related with DSpace API, as the underlying functions
> do 
> not provide such information. In some big collections this introduces 
> performance problem too, as we need to read bigger portion of data
> than 
> is to be served. Some time ago I posted a patch for this but it do
> not 
> covers Oracle and other RDMBSs completely, so should be considered 
> different way. 
> 
> 
> > 2. The metadata of an item are presented as strings, which is not
> very 
> > comfortable to handle. I would prefer to have them via tag per
> metadata 
> > field. Do you plan to realize something like this? 
> 
> This issue has been rissen by Robin Taylor too. I haven't considered
> it 
> as a problem before. It is currently reported on the JIRA list and
> will 
> probably have a lower priority as there are other issues deemed more 
> important. 
> 
> Thanks/Regards 
> Bojan 
> 
> --
>  
> EditLive Enterprise is the world's most technically advanced content 
> authoring tool. Experience the power of Track Changes, Inline Image 
> Editing and ensure content is compliant with Accessibility Checking. 
> http://p.sf.net/sfu/ephox-dev2dev
> ___ 
> DSpace-tech mailing list 
> [hidden email] 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 
> 
> 
> __
> If you reply to this email, your message will be added to the
> discussion below:
> http://dspace.2283337.n4.nabble.com/REST-API-for-DSpace-tp3343457p3606895.html
>  
> To start a new topic under DSpace - Tech, email ml-node
> +3276945-743330907-242...@n4.nabble.com 
> To unsubscribe from DSpace - Tech, click here. 



--
View this message in context: 
http://dspace.2283337.n4.nabble.com/REST-API-for-DSpace-tp3343457p3607428.html
Sent from the DSpace - Tech mailing list archive at Nabble.com.--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-06-17 Thread Bojan Suzic
Hi Marianna,


Am 17.06.2011 13:40, schrieb Marianna Mühlhölzer:
> Hi Bojan,
>
> I want to use the REST Interface for browsing our DSpace repository by
> title, date and subject. When trying to sort items I get problems with
> the pagination. The _perpage parameter does not work. Using _perpage
> alone has no influence on the number of retrieved items. I always get
> all items. Using a combination of _perpage and _page delivers strange
> results. For example, _perpage=2&_page=1 gives all items,
> _perpage=4&_page=1 gives 4 items, and _perpage=4&_perpage=2 is empty.

I opened JIRA issue for this problem, this is probably a bug.


> I have two further questions:
>
> 1. The sorting process gives no information about the total number of
> items in the repository. Therefore, before starting pagination I have to
> request all items and count them, in order to realize the pagination.
> Is there a better way to do browsing via REST?

This problem is related with DSpace API, as the underlying functions do 
not provide such information. In some big collections this introduces 
performance problem too, as we need to read bigger portion of data than 
is to be served. Some time ago I posted a patch for this but it do not 
covers Oracle and other RDMBSs completely, so should be considered 
different way.


> 2. The metadata of an item are presented as strings, which is not very
> comfortable to handle. I would prefer to have them via tag per metadata
> field. Do you plan to realize something like this?

This issue has been rissen by Robin Taylor too. I haven't considered it 
as a problem before. It is currently reported on the JIRA list and will 
probably have a lower priority as there are other issues deemed more 
important.

Thanks/Regards
Bojan

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-06-17 Thread Marianna Mühlhölzer
Hi Bojan,

I want to use the REST Interface for browsing our DSpace repository by
title, date and subject. When trying to sort items I get problems with
the pagination. The _perpage parameter does not work. Using _perpage
alone has no influence on the number of retrieved items. I always get
all items. Using a combination of _perpage and _page delivers strange
results. For example, _perpage=2&_page=1 gives all items,
_perpage=4&_page=1 gives 4 items, and _perpage=4&_perpage=2 is empty.

I have two further questions:

1. The sorting process gives no information about the total number of
items in the repository. Therefore, before starting pagination I have to
request all items and count them, in order to realize the pagination.
Is there a better way to do browsing via REST?

2. The metadata of an item are presented as strings, which is not very
comfortable to handle. I would prefer to have them via tag per metadata
field. Do you plan to realize something like this?

With regards,
Marianna 


-- 

Marianna Mühlhölzer
Niedersächsische Staats- und Universitätsbibliothek
BibliotheksInformationsSysteme
Platz der Göttinger Sieben 1
37073 Göttingen
Zi.: 2.38
Tel.: +49 (0)551 39-4255
E-Mail: muehlhoel...@sub.uni-goettingen.de


--
View this message in context: 
http://dspace.2283337.n4.nabble.com/REST-API-for-DSpace-tp3343457p3605171.html
Sent from the DSpace - Tech mailing list archive at Nabble.com.--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-06-08 Thread Hayden Young
Thanks Bojan

I've updated my DSpace's instance's rest code and am able to retrieve 
the logo as you have outlined below.

Cheers


Hayden

On 06/06/11 20:52, Bojan Suzic wrote:
> Hi Hayden,
>
> For the logo issue you previously mentioned, I have updated the code and
> wiki page info.
>
> /communities/{id} - returns information about particular community
> /communities/{id}/logo - returns corresponding logo id
>
> The logo is considered as bitstream, like other bitstreams in the system
> (licence files, item bitstreams..).
>
> It can be further received through
>
> /bitstream/{id}/receive - returns binary data about bitstream
>
> So that is the way logos are handled.
>
>
> I will look also at the other questions you asked.
>
> Regards
> Bojan
>
>
>
>
>   >  Currently I attempting to display a community's logo using:
>   >
>   >  http://www.domain.tld/dspace/rest/communities/1/logo
>   >
>   >  However no logo is output.
>   >
>
>
> --
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

-- 
Hayden Young
Managing Director
Wijiti Pty Ltd
p. +61 (0) 8 6102 1198
m. +61 (0) 405 520 778
e. haydenyo...@wijiti.com
w. www.wijiti.com
vcard. www.wijiti.com/vcard/haydenyoung.vcf

NOTICE
This e-mail and any attachments are intended for the addressee(s) only and may 
be confidential. They may contain legally privileged or copyright material. You 
should not read, copy, use or disclose them without authorization. If you are 
not the intended recipient please contact the sender as soon as possible by 
return e-mail and then please delete both messages. This notice should not be 
removed.


--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-06-06 Thread Bojan Suzic
Hi Hayden,

For the logo issue you previously mentioned, I have updated the code and 
wiki page info.

/communities/{id} - returns information about particular community
/communities/{id}/logo - returns corresponding logo id

The logo is considered as bitstream, like other bitstreams in the system 
(licence files, item bitstreams..).

It can be further received through

/bitstream/{id}/receive - returns binary data about bitstream

So that is the way logos are handled.


I will look also at the other questions you asked.

Regards
Bojan




 > Currently I attempting to display a community's logo using:
 >
 > http://www.domain.tld/dspace/rest/communities/1/logo
 >
 > However no logo is output.
 >


--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-05-30 Thread Hayden Young
Peter your patch has worked for me thanks.

The next issue seems to be with search; I get the same error when 
executing most searches (although not all).

For example, the following search succeeds:

http://www.wijiti.com:8080/i/testing/rest/search.xml?query=geisha

but most searches don't:

http://www.wijiti.com:8080/i/testing/rest/search.xml?query=example

The error I receive is:

type Status report

message Failure processing entity request (/search.xml): null

description The server encountered an internal error (Failure processing 
entity request (/search.xml): null) that prevented it from fulfilling 
this request.

I see no errors in any of the logs (catalina, localhost or dspace.log).

Could this problem be related?

Cheers


Hayden

On 05/05/11 05:48, Bojan Suzic wrote:
> Hi Peter,
>
>
>> I was looking at the DSpace REST API module today, and I too had errors
>> with getting null when viewing something like:
>> http://localhost:8080/restapi/communities/213.xml
> ...
>> Attached is my patch for fixing that. https://gist.github.com/952058
>> (I'd prefer not sending files to the mailing list, also I didn't see
>> where the rest bug tracker is).
> thank you for the pointing to this issue.
>
>
>> Also, Bojan, I'd like to clean up the "getting-started" wiki page to
>> make it easier to use the rest api. I had to change a few things to get
>> it going. i.e. change 1.6.0-SNAPSHOT to 1.7.1. And I ran it as a module
>> connected to my normal dspace code, so I'd like to add how to run it as
>> a module.
> Also thanks for this part too, and for explanations entered and cleaning
> it out. I will add these changes to the repository.
>
> Also anyone is welcome to put his suggestions/changes/improvements on
> the wiki page, that's why it exists.
>
>
> Regards
> Bojan
>
> --
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

-- 
Hayden Young
Managing Director
Wijiti Pty Ltd
p. +61 (0) 8 6102 1198
m. +61 (0) 405 520 778
e. haydenyo...@wijiti.com
w. www.wijiti.com
vcard. www.wijiti.com/vcard/haydenyoung.vcf

NOTICE
This e-mail and any attachments are intended for the addressee(s) only and may 
be confidential. They may contain legally privileged or copyright material. You 
should not read, copy, use or disclose them without authorization. If you are 
not the intended recipient please contact the sender as soon as possible by 
return e-mail and then please delete both messages. This notice should not be 
removed.


--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-05-04 Thread Bojan Suzic
Hi Peter,


> I was looking at the DSpace REST API module today, and I too had errors
> with getting null when viewing something like:
> http://localhost:8080/restapi/communities/213.xml
...
> Attached is my patch for fixing that. https://gist.github.com/952058
> (I'd prefer not sending files to the mailing list, also I didn't see
> where the rest bug tracker is).

thank you for the pointing to this issue.


> Also, Bojan, I'd like to clean up the "getting-started" wiki page to
> make it easier to use the rest api. I had to change a few things to get
> it going. i.e. change 1.6.0-SNAPSHOT to 1.7.1. And I ran it as a module
> connected to my normal dspace code, so I'd like to add how to run it as
> a module.

Also thanks for this part too, and for explanations entered and cleaning 
it out. I will add these changes to the repository.

Also anyone is welcome to put his suggestions/changes/improvements on 
the wiki page, that's why it exists.


Regards
Bojan

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-05-02 Thread Tim Donohue
Quick FYI:

Bugs/patches for the REST API can actually be submitted directly to our 
JIRA at:
https://jira.duraspace.org/browse/DS

Just be sure that when you submit the bug/patch, you select the 
"Component" as "REST API (experimental)".

- Tim

On 5/2/2011 1:13 PM, Peter Dietz wrote:
> Hi All,
>
> I was looking at the DSpace REST API module today, and I too had errors
> with getting null when viewing something like:
> http://localhost:8080/restapi/communities/213.xml
>
> *message* _Failure processing entity request (/communities/213.xml): null_
>
> *description* _The server encountered an internal error (Failure
> processing entity request (/communities/4.xml): null) that prevented it
> from fulfilling this request._
>
>
> I don't think it had to do with closing the database connection, but
> instead I think the problem was when you were trying to create a new
> CommunityEntity around the parentCommunity of the current resource,
> without checking if the parentCommunity of the current resource was
> null. I've added a few checks, one for parentCommunity, and another for
> the administrator group, and the rest api is working for me.
>
> Attached is my patch for fixing that. https://gist.github.com/952058
> (I'd prefer not sending files to the mailing list, also I didn't see
> where the rest bug tracker is).
>
> Also, Bojan, I'd like to clean up the "getting-started" wiki page to
> make it easier to use the rest api. I had to change a few things to get
> it going. i.e. change 1.6.0-SNAPSHOT to 1.7.1. And I ran it as a module
> connected to my normal dspace code, so I'd like to add how to run it as
> a module.
>
> For developing the rest api, I would definitely recommend using an IDE
> with a debugger (IntelliJ), it will make exactly what is happening
> crystal clear.
>
> Either way, good luck this summer with the rest api. I imagine you will
> have more support, especially as people would like to use it.
>
> 
> Peter Dietz
>
>
>
> On Tue, Mar 29, 2011 at 11:43 AM, Mark Melia  > wrote:
>
> Hi Bojan,
>
> Thanks for getting back to me on this. I was having an issue whereby I
> was loosing the connection to the DB through the context. In
> investigating this I found the problem was the calling of
> context.complete() in the ItemEntity constructor as the context.complete
> nulls the connection and any other Items created after a search in the
> SearchProvider will no longer have a connection to the Database. I have
> removed the context.complete() call - which will cause problems if this
> is used for updating entities I presume but at present all I interested
> in is search. I think that you may have put this in as a fix to the
> connection leak problem outlined into a previous mail.
>
> Does this sound right to you?
>
> Thanks,
> Mark
>
> --
> Dr. Mark Melia
> Analyst Programmer
> Enovation Solutions Ltd.
> The Friary, Bow Street, Dublin 7.
> Follow us on Twitter: http://twitter.com/enovationire/
> See our blog: http://blog.enovation.ie/
>
> ‘Celebrating 10 years providing high quality solutions to our clients’
>
>
>
> On 23/03/11 14:39, Bojan Suzic wrote:
>  > Hi Mark,
>  >
>  > sorry for late answer. I think this error is related to number of
>  > database connections opened. As you have already noticed in the code,
>  > for each request it creates new Context object, which maintains
>  > connection to the database. Under some circumstances/conditions, I
>  > think this object is not correctly closed at the end of request. I
>  > believe this is causing an error, as after some time it goes over
>  > limit of connections defined by RDBMS and therefore cannot open new
>  > request.
>  > I noticed that error before in some other segments. After thorough
>  > investigation it has been fixed, but now it seems the bug is present
>  > in some other parts too.
>  >
>  > I would suggest to try to increase number of db connections allowed
>  > and to wait until problem gets fixed and updated in the source code..
>  >
>  > Regards
>  > Bojan
>  >
>  >
>  >
>  >> Hi Steve,
>  >>
>  >> Thanks for the reply - the only thing outputted on the logs when the
>  >> request is made is:
>  >>
>  >> 2011-03-15 10:14:15,017 INFO
> org.dspace.rest.providers.UserProvider @
>  >> user:anonymous:ip_addr=:entity_exists:29
>  >>
>  >> Thanks,
>  >> Mark
>  >>
>  >> On 15/03/11 10:16, Steve Swinsburg wrote:
>  >>> A 500 is an internal server error, what do the logs say?
>  >>>
>  >>> cheers,
>  >>> Steve
>  >>>
>  >>>
>  >>> On 15/03/2011, at 9:03 PM, Mark Melia wrote:
>  >>>
>   Hi Bojan,
>  
>   I have taken the latest code from the SVN address above and the
>   

Re: [Dspace-tech] REST API for DSpace

2011-05-02 Thread Peter Dietz
Hi All,

I was looking at the DSpace REST API module today, and I too had errors with
getting null when viewing something like:
http://localhost:8080/restapi/communities/213.xml

*message* *Failure processing entity request (/communities/213.xml): null*

*description* *The server encountered an internal error (Failure processing
entity request (/communities/4.xml): null) that prevented it from fulfilling
this request.*

I don't think it had to do with closing the database connection, but instead
I think the problem was when you were trying to create a new CommunityEntity
around the parentCommunity of the current resource, without checking if the
parentCommunity of the current resource was null. I've added a few checks,
one for parentCommunity, and another for the administrator group, and the
rest api is working for me.

Attached is my patch for fixing that. https://gist.github.com/952058
(I'd prefer not sending files to the mailing list, also I didn't see where
the rest bug tracker is).

Also, Bojan, I'd like to clean up the "getting-started" wiki page to make it
easier to use the rest api. I had to change a few things to get it going.
i.e. change 1.6.0-SNAPSHOT to 1.7.1. And I ran it as a module connected to
my normal dspace code, so I'd like to add how to run it as a module.

For developing the rest api, I would definitely recommend using an IDE with
a debugger (IntelliJ), it will make exactly what is happening crystal clear.

Either way, good luck this summer with the rest api. I imagine you will have
more support, especially as people would like to use it.


Peter Dietz



On Tue, Mar 29, 2011 at 11:43 AM, Mark Melia wrote:

> Hi Bojan,
>
> Thanks for getting back to me on this. I was having an issue whereby I
> was loosing the connection to the DB through the context. In
> investigating this I found the problem was the calling of
> context.complete() in the ItemEntity constructor as the context.complete
> nulls the connection and any other Items created after a search in the
> SearchProvider will no longer have a connection to the Database. I have
> removed the context.complete() call - which will cause problems if this
> is used for updating entities I presume but at present all I interested
> in is search. I think that you may have put this in as a fix to the
> connection leak problem outlined into a previous mail.
>
> Does this sound right to you?
>
> Thanks,
> Mark
>
> --
> Dr. Mark Melia
> Analyst Programmer
> Enovation Solutions Ltd.
> The Friary, Bow Street, Dublin 7.
> Follow us on Twitter: http://twitter.com/enovationire/
> See our blog: http://blog.enovation.ie/
>
> ‘Celebrating 10 years providing high quality solutions to our clients’
>
>
>
> On 23/03/11 14:39, Bojan Suzic wrote:
> > Hi Mark,
> >
> > sorry for late answer. I think this error is related to number of
> > database connections opened. As you have already noticed in the code,
> > for each request it creates new Context object, which maintains
> > connection to the database. Under some circumstances/conditions, I
> > think this object is not correctly closed at the end of request. I
> > believe this is causing an error, as after some time it goes over
> > limit of connections defined by RDBMS and therefore cannot open new
> > request.
> > I noticed that error before in some other segments. After thorough
> > investigation it has been fixed, but now it seems the bug is present
> > in some other parts too.
> >
> > I would suggest to try to increase number of db connections allowed
> > and to wait until problem gets fixed and updated in the source code..
> >
> > Regards
> > Bojan
> >
> >
> >
> >> Hi Steve,
> >>
> >> Thanks for the reply - the only thing outputted on the logs when the
> >> request is made is:
> >>
> >> 2011-03-15 10:14:15,017 INFO org.dspace.rest.providers.UserProvider @
> >> user:anonymous:ip_addr=:entity_exists:29
> >>
> >> Thanks,
> >> Mark
> >>
> >> On 15/03/11 10:16, Steve Swinsburg wrote:
> >>> A 500 is an internal server error, what do the logs say?
> >>>
> >>> cheers,
> >>> Steve
> >>>
> >>>
> >>> On 15/03/2011, at 9:03 PM, Mark Melia wrote:
> >>>
>  Hi Bojan,
> 
>  I have taken the latest code from the SVN address above and the
>  authentication issue is still there. I am not sure how you are able to
>  over come it without changing the code in the AbstractBaseProvider. I
>  have made the change you suggested - rather than just removing the
>  exception throw. (I can send you a patch file if you would like?)
> 
>  On another note - I am stil trying to get details for a specific
>  community I am doing this by calling the URL -
> 
>  http://localhost:8080/rest/communities/29.xml
> 
> 
>  as outlined below. Can you tell me if I am doing this correct - I am
>  still getting HTTP Status 500. If I have time I will look more deeply
>  into this - if you have no ideas on what is causing it?
> 

Re: [Dspace-tech] REST API for DSpace

2011-03-29 Thread Mark Melia
Hi Bojan,

Thanks for getting back to me on this. I was having an issue whereby I 
was loosing the connection to the DB through the context. In 
investigating this I found the problem was the calling of 
context.complete() in the ItemEntity constructor as the context.complete 
nulls the connection and any other Items created after a search in the 
SearchProvider will no longer have a connection to the Database. I have 
removed the context.complete() call - which will cause problems if this 
is used for updating entities I presume but at present all I interested 
in is search. I think that you may have put this in as a fix to the 
connection leak problem outlined into a previous mail.

Does this sound right to you?

Thanks,
Mark

-- 
Dr. Mark Melia
Analyst Programmer
Enovation Solutions Ltd.
The Friary, Bow Street, Dublin 7.
Follow us on Twitter: http://twitter.com/enovationire/
See our blog: http://blog.enovation.ie/

‘Celebrating 10 years providing high quality solutions to our clients’



On 23/03/11 14:39, Bojan Suzic wrote:
> Hi Mark,
>
> sorry for late answer. I think this error is related to number of 
> database connections opened. As you have already noticed in the code, 
> for each request it creates new Context object, which maintains 
> connection to the database. Under some circumstances/conditions, I 
> think this object is not correctly closed at the end of request. I 
> believe this is causing an error, as after some time it goes over 
> limit of connections defined by RDBMS and therefore cannot open new 
> request.
> I noticed that error before in some other segments. After thorough 
> investigation it has been fixed, but now it seems the bug is present 
> in some other parts too.
>
> I would suggest to try to increase number of db connections allowed 
> and to wait until problem gets fixed and updated in the source code..
>
> Regards
> Bojan
>
>
>
>> Hi Steve,
>>
>> Thanks for the reply - the only thing outputted on the logs when the
>> request is made is:
>>
>> 2011-03-15 10:14:15,017 INFO org.dspace.rest.providers.UserProvider @
>> user:anonymous:ip_addr=:entity_exists:29
>>
>> Thanks,
>> Mark
>>
>> On 15/03/11 10:16, Steve Swinsburg wrote:
>>> A 500 is an internal server error, what do the logs say?
>>>
>>> cheers,
>>> Steve
>>>
>>>
>>> On 15/03/2011, at 9:03 PM, Mark Melia wrote:
>>>
 Hi Bojan,

 I have taken the latest code from the SVN address above and the
 authentication issue is still there. I am not sure how you are able to
 over come it without changing the code in the AbstractBaseProvider. I
 have made the change you suggested - rather than just removing the
 exception throw. (I can send you a patch file if you would like?)

 On another note - I am stil trying to get details for a specific
 community I am doing this by calling the URL -

 http://localhost:8080/rest/communities/29.xml


 as outlined below. Can you tell me if I am doing this correct - I am
 still getting HTTP Status 500. If I have time I will look more deeply
 into this - if you have no ideas on what is causing it?

 Thanks,
 Mark


 On 14/03/11 16:14, Mark Melia wrote:
> Hi Bojan,
>
> Thanks a million for your reply. I am thinking maybe I do have an
> earlier version of the code - Today I tried to get details on one
> particular collection using
>
> http://localhost:8080/rest/communities/29.xml - this resulted in 
> an error -
> HTTP Status 500 - Failure processing entity request
> (/communities/29.xml): null
>
> I will have to check the version I am running.
>
> Thanks again for your help.
> Mark
>
> On 14/03/11 15:51, Bojan Suzic wrote:
>> Hi Mark,
>>
>> I have just checked it and tried to reproduce locally.
>> So I tried the following:
>>
>> http://localhost:8080/rest/search.xml?query=test - got normal 
>> results
>>
>> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com 
>> - got
>> exception 403, we have user but password is not provided
>>
>> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com&pass=correct_password
>>  
>>
>> - got normal results again as the correct password is provided with
>> the user in the query
>>
>> So, the code you are referring to is executed only if user or 
>> pass are
>> provided in the query. If they are not provided, it uses anonymous
>> user and further should not execute this code.
>>
>> Maybe you are using some older version from svn? The actual 
>> version is
>> available at
>> http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/.
>>  
>>
>>
>> Also if this problem still persists, could you then try to change 
>> this
>> code to look like this:
>>
>> if (!(user.equals("")) {
>> try {
>> ...
>> } catch () ...
>>
>

Re: [Dspace-tech] REST API for DSpace

2011-03-23 Thread Bojan Suzic
Hi Mark,

sorry for late answer. I think this error is related to number of 
database connections opened. As you have already noticed in the code, 
for each request it creates new Context object, which maintains 
connection to the database. Under some circumstances/conditions, I think 
this object is not correctly closed at the end of request. I believe 
this is causing an error, as after some time it goes over limit of 
connections defined by RDBMS and therefore cannot open new request.
I noticed that error before in some other segments. After thorough 
investigation it has been fixed, but now it seems the bug is present in 
some other parts too.

I would suggest to try to increase number of db connections allowed and 
to wait until problem gets fixed and updated in the source code..

Regards
Bojan



> Hi Steve,
>
> Thanks for the reply - the only thing outputted on the logs when the
> request is made is:
>
> 2011-03-15 10:14:15,017 INFO  org.dspace.rest.providers.UserProvider @
> user:anonymous:ip_addr=:entity_exists:29
>
> Thanks,
> Mark
>
> On 15/03/11 10:16, Steve Swinsburg wrote:
>> A 500 is an internal server error, what do the logs say?
>>
>> cheers,
>> Steve
>>
>>
>> On 15/03/2011, at 9:03 PM, Mark Melia wrote:
>>
>>> Hi Bojan,
>>>
>>> I have taken the latest code from the SVN address above and the
>>> authentication issue is still there. I am not sure how you are able to
>>> over come it without changing the code in the AbstractBaseProvider. I
>>> have made the change you suggested - rather than just removing the
>>> exception throw. (I can send you a patch file if you would like?)
>>>
>>> On another note - I am stil trying to get details for a specific
>>> community I am doing this by calling the URL -
>>>
>>> http://localhost:8080/rest/communities/29.xml
>>>
>>>
>>> as outlined below. Can you tell me if I am doing this correct - I am
>>> still getting HTTP Status 500. If I have time I will look more deeply
>>> into this - if you have no ideas on what is causing it?
>>>
>>> Thanks,
>>> Mark
>>>
>>>
>>> On 14/03/11 16:14, Mark Melia wrote:
 Hi Bojan,

 Thanks a million for your reply. I am thinking maybe I do have an
 earlier version of the code - Today I tried to get details on one
 particular collection using

 http://localhost:8080/rest/communities/29.xml - this resulted in an error -
 HTTP Status 500 - Failure processing entity request
 (/communities/29.xml): null

 I will have to check the version I am running.

 Thanks again for your help.
 Mark

 On 14/03/11 15:51, Bojan Suzic wrote:
> Hi Mark,
>
> I have just checked it and tried to reproduce locally.
> So I tried the following:
>
> http://localhost:8080/rest/search.xml?query=test - got normal results
>
> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com - got
> exception 403, we have user but password is not provided
>
> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com&pass=correct_password
> - got normal results again as the correct password is provided with
> the user in the query
>
> So, the code you are referring to is executed only if user or pass are
> provided in the query. If they are not provided, it uses anonymous
> user and further should not execute this code.
>
> Maybe you are using some older version from svn? The actual version is
> available at
> http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/.
>
> Also if this problem still persists, could you then try to change this
> code to look like this:
>
> if (!(user.equals("")) {
> try {
>  ...
> } catch () ...
>
> }
>
> It could be that underlying code treats blank user differently.
>
> Kind regards
> Bojan
>
>
>
>
>> The action I am calling is the search rest call I am making is search -
>> http://localhost:8080/dspace/search.xml?query=testitem
>> When this is called it looks like the method refreshParams is called in
>> the AbstractBaseProvider class. This method checks if the user is logged
>> in and throws an EntityException if the user is not logged in, which is
>> the case for my search.
>>
>> try {
>> EPerson eUser = EPerson.findByEmail(context, user);
>> if ((eUser.canLogIn())&& (eUser.checkPassword(pass))) {
>> context.setCurrentUser(eUser);
>> loggedUser = eUser.getName();
>> } else {
>> throw new EntityException("Bad username or password", user, 403);
>> }
>>
>> Any idea would be much appreciated. We are creating a plug-in for Moodle
>> 2.0 so that DSpace can be used as a repository.
 --
 Colocation vs. Managed Hosting
 A question and answer guide to determining the best fit
 for your organization - today and in

Re: [Dspace-tech] REST API for DSpace

2011-03-15 Thread Steve Swinsburg
A 500 is an internal server error, what do the logs say?

cheers,
Steve


On 15/03/2011, at 9:03 PM, Mark Melia wrote:

> Hi Bojan,
> 
> I have taken the latest code from the SVN address above and the 
> authentication issue is still there. I am not sure how you are able to 
> over come it without changing the code in the AbstractBaseProvider. I 
> have made the change you suggested - rather than just removing the 
> exception throw. (I can send you a patch file if you would like?)
> 
> On another note - I am stil trying to get details for a specific 
> community I am doing this by calling the URL -
> 
> http://localhost:8080/rest/communities/29.xml
> 
> 
> as outlined below. Can you tell me if I am doing this correct - I am 
> still getting HTTP Status 500. If I have time I will look more deeply 
> into this - if you have no ideas on what is causing it?
> 
> Thanks,
> Mark
> 
> 
> On 14/03/11 16:14, Mark Melia wrote:
>> Hi Bojan,
>> 
>> Thanks a million for your reply. I am thinking maybe I do have an
>> earlier version of the code - Today I tried to get details on one
>> particular collection using
>> 
>> http://localhost:8080/rest/communities/29.xml - this resulted in an error -
>> HTTP Status 500 - Failure processing entity request
>> (/communities/29.xml): null
>> 
>> I will have to check the version I am running.
>> 
>> Thanks again for your help.
>> Mark
>> 
>> On 14/03/11 15:51, Bojan Suzic wrote:
>>> Hi Mark,
>>> 
>>> I have just checked it and tried to reproduce locally.
>>> So I tried the following:
>>> 
>>> http://localhost:8080/rest/search.xml?query=test - got normal results
>>> 
>>> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com - got
>>> exception 403, we have user but password is not provided
>>> 
>>> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com&pass=correct_password
>>> - got normal results again as the correct password is provided with
>>> the user in the query
>>> 
>>> So, the code you are referring to is executed only if user or pass are
>>> provided in the query. If they are not provided, it uses anonymous
>>> user and further should not execute this code.
>>> 
>>> Maybe you are using some older version from svn? The actual version is
>>> available at
>>> http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/.
>>> 
>>> Also if this problem still persists, could you then try to change this
>>> code to look like this:
>>> 
>>> if (!(user.equals("")) {
>>>   try {
>>>...
>>>   } catch () ...
>>> 
>>> }
>>> 
>>> It could be that underlying code treats blank user differently.
>>> 
>>> Kind regards
>>> Bojan
>>> 
>>> 
>>> 
>>> 
 The action I am calling is the search rest call I am making is search -
 http://localhost:8080/dspace/search.xml?query=testitem
 When this is called it looks like the method refreshParams is called in
 the AbstractBaseProvider class. This method checks if the user is logged
 in and throws an EntityException if the user is not logged in, which is
 the case for my search.
 
 try {
 EPerson eUser = EPerson.findByEmail(context, user);
 if ((eUser.canLogIn())&&   (eUser.checkPassword(pass))) {
 context.setCurrentUser(eUser);
 loggedUser = eUser.getName();
 } else {
 throw new EntityException("Bad username or password", user, 403);
 }
 
 Any idea would be much appreciated. We are creating a plug-in for Moodle
 2.0 so that DSpace can be used as a repository.
>> --
>> Colocation vs. Managed Hosting
>> A question and answer guide to determining the best fit
>> for your organization - today and in the future.
>> http://p.sf.net/sfu/internap-sfd2d
>> ___
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 
> --
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-15 Thread Mark Melia
Hi Steve,

Thanks for the reply - the only thing outputted on the logs when the 
request is made is:

2011-03-15 10:14:15,017 INFO  org.dspace.rest.providers.UserProvider @ 
user:anonymous:ip_addr=:entity_exists:29

Thanks,
Mark

On 15/03/11 10:16, Steve Swinsburg wrote:
> A 500 is an internal server error, what do the logs say?
>
> cheers,
> Steve
>
>
> On 15/03/2011, at 9:03 PM, Mark Melia wrote:
>
>> Hi Bojan,
>>
>> I have taken the latest code from the SVN address above and the
>> authentication issue is still there. I am not sure how you are able to
>> over come it without changing the code in the AbstractBaseProvider. I
>> have made the change you suggested - rather than just removing the
>> exception throw. (I can send you a patch file if you would like?)
>>
>> On another note - I am stil trying to get details for a specific
>> community I am doing this by calling the URL -
>>
>> http://localhost:8080/rest/communities/29.xml
>>
>>
>> as outlined below. Can you tell me if I am doing this correct - I am
>> still getting HTTP Status 500. If I have time I will look more deeply
>> into this - if you have no ideas on what is causing it?
>>
>> Thanks,
>> Mark
>>
>>
>> On 14/03/11 16:14, Mark Melia wrote:
>>> Hi Bojan,
>>>
>>> Thanks a million for your reply. I am thinking maybe I do have an
>>> earlier version of the code - Today I tried to get details on one
>>> particular collection using
>>>
>>> http://localhost:8080/rest/communities/29.xml - this resulted in an error -
>>> HTTP Status 500 - Failure processing entity request
>>> (/communities/29.xml): null
>>>
>>> I will have to check the version I am running.
>>>
>>> Thanks again for your help.
>>> Mark
>>>
>>> On 14/03/11 15:51, Bojan Suzic wrote:
 Hi Mark,

 I have just checked it and tried to reproduce locally.
 So I tried the following:

 http://localhost:8080/rest/search.xml?query=test - got normal results

 http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com - got
 exception 403, we have user but password is not provided

 http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com&pass=correct_password
 - got normal results again as the correct password is provided with
 the user in the query

 So, the code you are referring to is executed only if user or pass are
 provided in the query. If they are not provided, it uses anonymous
 user and further should not execute this code.

 Maybe you are using some older version from svn? The actual version is
 available at
 http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/.

 Also if this problem still persists, could you then try to change this
 code to look like this:

 if (!(user.equals("")) {
try {
 ...
} catch () ...

 }

 It could be that underlying code treats blank user differently.

 Kind regards
 Bojan




> The action I am calling is the search rest call I am making is search -
> http://localhost:8080/dspace/search.xml?query=testitem
> When this is called it looks like the method refreshParams is called in
> the AbstractBaseProvider class. This method checks if the user is logged
> in and throws an EntityException if the user is not logged in, which is
> the case for my search.
>
> try {
> EPerson eUser = EPerson.findByEmail(context, user);
> if ((eUser.canLogIn())&&(eUser.checkPassword(pass))) {
> context.setCurrentUser(eUser);
> loggedUser = eUser.getName();
> } else {
> throw new EntityException("Bad username or password", user, 403);
> }
>
> Any idea would be much appreciated. We are creating a plug-in for Moodle
> 2.0 so that DSpace can be used as a repository.
>>> --
>>> Colocation vs. Managed Hosting
>>> A question and answer guide to determining the best fit
>>> for your organization - today and in the future.
>>> http://p.sf.net/sfu/internap-sfd2d
>>> ___
>>> DSpace-tech mailing list
>>> DSpace-tech@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>> --
>> Colocation vs. Managed Hosting
>> A question and answer guide to determining the best fit
>> for your organization - today and in the future.
>> http://p.sf.net/sfu/internap-sfd2d
>> ___
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_

Re: [Dspace-tech] REST API for DSpace

2011-03-14 Thread Mark Melia
Hi Bojan,

Thanks a million for your reply. I am thinking maybe I do have an 
earlier version of the code - Today I tried to get details on one 
particular collection using

http://localhost:8080/rest/communities/29.xml - this resulted in an error -
HTTP Status 500 - Failure processing entity request 
(/communities/29.xml): null

I will have to check the version I am running.

Thanks again for your help.
Mark

On 14/03/11 15:51, Bojan Suzic wrote:
> Hi Mark,
>
> I have just checked it and tried to reproduce locally.
> So I tried the following:
>
> http://localhost:8080/rest/search.xml?query=test - got normal results
>
> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com - got 
> exception 403, we have user but password is not provided
>
> http://localhost:8080/rest/search.xml?query=test&user=x...@xxx.com&pass=correct_password
>  
> - got normal results again as the correct password is provided with 
> the user in the query
>
> So, the code you are referring to is executed only if user or pass are 
> provided in the query. If they are not provided, it uses anonymous 
> user and further should not execute this code.
>
> Maybe you are using some older version from svn? The actual version is 
> available at 
> http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/.
>
> Also if this problem still persists, could you then try to change this 
> code to look like this:
>
> if (!(user.equals("")) {
>   try {
>...
>   } catch () ...
>
> }
>
> It could be that underlying code treats blank user differently.
>
> Kind regards
> Bojan
>
>
>
>
>> The action I am calling is the search rest call I am making is search -
>> http://localhost:8080/dspace/search.xml?query=testitem
>> When this is called it looks like the method refreshParams is called in
>> the AbstractBaseProvider class. This method checks if the user is logged
>> in and throws an EntityException if the user is not logged in, which is
>> the case for my search.
>>
>> try {
>> EPerson eUser = EPerson.findByEmail(context, user);
>> if ((eUser.canLogIn())&&  (eUser.checkPassword(pass))) {
>> context.setCurrentUser(eUser);
>> loggedUser = eUser.getName();
>> } else {
>> throw new EntityException("Bad username or password", user, 403);
>> }
>>
>> Any idea would be much appreciated. We are creating a plug-in for Moodle
>> 2.0 so that DSpace can be used as a repository.

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-14 Thread Bojan Suzic
Am 11.03.2011 00:58, schrieb Kim Shepherd:

> Also, kudos to Bojan for continuing to support his work. Sounds like I
> need to give it another go :-)

Thanks :) but I would suggest you to wait a little bit.. I will soon 
release it as RC, then it would provide better stability and probably 
fit your needs.
As I said before, I am trying to support it outside GSoC and to make it 
useful for community. I still need to do some optimizations and 
refactoring. And if I remember correctly, you missed HTTP auth option?

Kind regards
Bojan

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-11 Thread Chris Hawkins
I'm sorry, I don't. We are not actually building a repository but developing 
software that will communicate with repositories. So our dspace server is only 
for testing and development. 


Chris 

- Original Message -


Hi Chris, 


Do you have a public-facing repository that is making use of this? It would be 
great to see it in action. 
I feel I may be a bit "behind the times" as far as this project goes..! 


Also, kudos to Bojan for continuing to support his work. Sounds like I need to 
give it another go :-) 


Cheers, 


Kim 


On 11 March 2011 02:14, Chris Hawkins < chawk...@bplinux.com > wrote: 


I have used it and so far it works perfectly. Our test repository does not use 
authentication and the plugin seems to work fine. 

Chris 




- Original Message - 
> Hello everyone, 
> 
> Just wondering if anyone else has played around with Bojan Suzic's 
> great 
> REST API extension? I am trying to allow for REST queries to be done 
> on 
> my DSpace. With our DSpace anonymous users can search. It seems to me 
> that you must log in as an authenticated user to do anything with the 
> plug-in, is this correct? 
> 
> Thanks for any help you can provide, 
> Mark 
> 
> --
>  
> Colocation vs. Managed Hosting 
> A question and answer guide to determining the best fit 
> for your organization - today and in the future. 
> http://p.sf.net/sfu/internap-sfd2d 
> ___ 
> DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech 

-- 
Colocation vs. Managed Hosting 
A question and answer guide to determining the best fit 
for your organization - today and in the future. 
http://p.sf.net/sfu/internap-sfd2d 
___ 
DSpace-tech mailing list 
DSpace-tech@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/dspace-tech 


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-10 Thread Kim Shepherd
Hi Chris,

Do you have a public-facing repository that is making use of this? It would
be great to see it in action.
I feel I may be a bit "behind the times" as far as this project goes..!

Also, kudos to Bojan for continuing to support his work. Sounds like I need
to give it another go :-)

Cheers,

Kim

On 11 March 2011 02:14, Chris Hawkins  wrote:

> I have used it and so far it works perfectly. Our test repository does not
> use authentication and the plugin seems to work fine.
>
> Chris
>
> - Original Message -
> > Hello everyone,
> >
> > Just wondering if anyone else has played around with Bojan Suzic's
> > great
> > REST API extension? I am trying to allow for REST queries to be done
> > on
> > my DSpace. With our DSpace anonymous users can search. It seems to me
> > that you must log in as an authenticated user to do anything with the
> > plug-in, is this correct?
> >
> > Thanks for any help you can provide,
> > Mark
> >
> >
> --
> > Colocation vs. Managed Hosting
> > A question and answer guide to determining the best fit
> > for your organization - today and in the future.
> > http://p.sf.net/sfu/internap-sfd2d
> > ___
> > DSpace-tech mailing list
> > DSpace-tech@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
> --
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-10 Thread Mark Melia
Hi Bojan and Chris,

Thanks for your reply.

The action I am calling is the search rest call I am making is search - 
http://localhost:8080/dspace/search.xml?query=testitem
When this is called it looks like the method refreshParams is called in 
the AbstractBaseProvider class. This method checks if the user is logged 
in and throws an EntityException if the user is not logged in, which is 
the case for my search.

try {
EPerson eUser = EPerson.findByEmail(context, user);
if ((eUser.canLogIn()) && (eUser.checkPassword(pass))) {
context.setCurrentUser(eUser);
loggedUser = eUser.getName();
} else {
throw new EntityException("Bad username or password", user, 403);
}

Any idea would be much appreciated. We are creating a plug-in for Moodle 
2.0 so that DSpace can be used as a repository.

Thanks,
Mark

-- 
Dr. Mark Melia
Analyst
Enovation Solutions Ltd.
The Friary, Bow Street, Dublin 7.
Follow us on Twitter: http://twitter.com/enovationire/
See our blog: http://blog.enovation.ie/

‘Celebrating 10 years providing high quality solutions to our clients’




On 09/03/11 18:49, Bojan Suzic wrote:
> Hi Mark,
>
> no, it is not necessary to be logged in order to search.
> By my understanding, you have already installed the extension and it
> requires a user to be logged in order to search?
> If that is the case then please send your configuration description
> direct to me, the message/action you tried and the server response.
>
> Regards
> Bojan
>
>
>> Just wondering if anyone else has played around with Bojan Suzic's great
>> REST API extension? I am trying to allow for REST queries to be done on
>> my DSpace. With our DSpace anonymous users can search. It seems to me
>> that you must log in as an authenticated user to do anything with the
>> plug-in, is this correct?
> --
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-10 Thread Chris Hawkins
I have used it and so far it works perfectly. Our test repository does not use 
authentication and the plugin seems to work fine.

Chris

- Original Message -
> Hello everyone,
> 
> Just wondering if anyone else has played around with Bojan Suzic's
> great
> REST API extension? I am trying to allow for REST queries to be done
> on
> my DSpace. With our DSpace anonymous users can search. It seems to me
> that you must log in as an authenticated user to do anything with the
> plug-in, is this correct?
> 
> Thanks for any help you can provide,
> Mark
> 
> --
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] REST API for DSpace

2011-03-09 Thread Bojan Suzic
Hi Mark,

no, it is not necessary to be logged in order to search.
By my understanding, you have already installed the extension and it 
requires a user to be logged in order to search?
If that is the case then please send your configuration description 
direct to me, the message/action you tried and the server response.

Regards
Bojan


> Just wondering if anyone else has played around with Bojan Suzic's great
> REST API extension? I am trying to allow for REST queries to be done on
> my DSpace. With our DSpace anonymous users can search. It seems to me
> that you must log in as an authenticated user to do anything with the
> plug-in, is this correct?

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech