I've finally gotten around to building this dspace-rest module. So here are
some technical notes on my getting started.

The only surprise was to have to implement a method in dspace-api
ItemIterator.skip()

Otherwise the module/pom wiring went pretty smoothly. I've pasted my git
diff's to both dspace-source, and to dspace-rest into a GitHub Gist:
https://gist.github.com/3109012



Once maven compiled successfully, I edited my IntelliJ Tomcat Deploy
configuration to add the dspace-rest:war.

Then, I ran into HTTP 500 errors when trying to view data from the rest
api. It was as helix mentioned that by default it
wants /devel/dspace/config/dspace.cfg.

To make it use my real dspace.cfg, I had to edit
dspace-rest/src/main/webapp/WEB-INF/web.xml

   <context-param>
     <param-name>dspace-config</param-name>
-    <param-value>${dspace.dir}/config/dspace.cfg</param-value>
     <!-- <param-value>/dspace/config/dspace.cfg</param-value> -->
+    <param-value>/dspace/config/dspace.cfg</param-value>
   </context-param>


Additionally, I found that hard-coding the above dspace-config setting
wasn't taking, and found that I also had to comment out some directory
overriding...
dspace-rest/src/main/java/org/dspace/rest/servlet/DS16DirectServlet.java

         // for dev testing only COMMENT IN WORKING ENVIRONMENT
-        if (config.contains("dspace.dir")) {
-            config = "/devel/dspace/config/dspace.cfg";
-        }
+        //if (config.contains("dspace.dir")) {
+        //    config = "/devel/dspace/config/dspace.cfg";
+        //}

After that, things started working, and I could use the REST API to get
real data.

Once I have some experience with the rest-api and build some psuedo-client
app then I'll hopefully have some more feedback.

But, cheers to HedTek, I'm glad that you've been able to take the
initiative to make some progress on getting us closer to a usable REST API.
I read the README, and there is a fair amount of limitations / known
issues. So hopefully we can continue to polish what you've built here, and
hopefully that can be called REST v1.0, and then as that gets used, and we
have more effort around a refactoring or a rewrite, maybe we can work on a
REST v2.0, especially as you mentioned some technical difficulties with
working with the Sakai architecture.

I will admit that having not managed the evolution of an API between
versions. I'm not sure if you would rename the API from v1 to v2 when you
do underneath implementation changes (i.e. compatible), and preserve the
existing endpoints and functionalities, or do you change the Rest API
version number when you change the endpoints / returned-data format. I'm
guessing the latter.

Peter Dietz



On Wed, Jul 11, 2012 at 2:30 AM, helix84 <heli...@centrum.sk> wrote:

> On Wed, Jul 11, 2012 at 8:20 AM, Hayden Young <haydenyo...@wijiti.com>
> wrote:
> > Hi
> >
> > Okay we'll research these issues further and come up with some solutions.
> >
> > So the compiled version of the REST API does work despite the mismatches
> and
> > some build issues?
>
> Yes, it does. I didn't find any problems so far (only the conceptual
> problem with listing users I mentioned).
>
> Regards,
> ~~helix84
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Dspace-devel mailing list
> Dspace-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to