Hi Peter,

At first I thought the problem was only because DSpace is not returning XML. 
Then found out, no HTTP header was being passed when requesting the URL in the 
Drupal module. It looks like that want be our only problem.
Thank you for the clarification, we are going to update the module to import 
data using REST.

Thank you all for your help.
Hicham



From: Peter Dietz [mailto:pe...@longsight.com]
Sent: Thursday, June 11, 2015 4:32 PM
To: Alan Orth
Cc: Hicham Zahnan; dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] URL REST Call to return XML

Hi Hicham,

Princeton's Drupal module for DSpace is not compatible with the current version 
of DSpace. The Drupal Module is designed to use the 2011 Google Summer of Code 
REST API. The 2011 GSoC REST API was never merged into the core of DSpace, 
instead a Jersey based REST API was built. So, the Drupal Module would need to 
be updated to work with the new API.

________________
Peter Dietz
Longsight
www.longsight.com<http://www.longsight.com>
pe...@longsight.com<mailto:pe...@longsight.com>
p: 740-599-5005 x809

On Thu, Jun 11, 2015 at 7:01 AM, Alan Orth 
<alan.o...@gmail.com<mailto:alan.o...@gmail.com>> wrote:
You need to set the Accept HTTP header to tell the REST API which format you 
want. From the command line you can do it like this:

$ curl -s -H "Accept: application/xml" http://localhost:8080/rest/communities
I'm not familiar with the DSpace module for Drupal though, so I'm not sure if 
it allows you to configure request headers...
Alan

On Thu, Jun 11, 2015 at 1:11 PM, Hicham Zahnan 
<h...@aub.edu.lb<mailto:h...@aub.edu.lb>> wrote:
Hi,

I’m using a Drupal Module called DSpace, that requires a REST URL to return XML.
My problem is when I use the REST URL i.e. 
(www.abcd.com/rest/communities/6/items<http://www.abcd.com/rest/communities/6/items>),
 into a browser I sometimes get JSON or XML, depending on the browser. Because 
its returning a JSON, its causing the module not to work. So is there a way to 
only get XML through http REST request?

We are using DSpace 5.2

Thank you,
Hicham

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

_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



--
Alan Orth
alan.o...@gmail.com<mailto:alan.o...@gmail.com>
https://alaninkenya.org
https://mjanja.ch
"In heaven all the interesting people are missing." -Friedrich Nietzsche
GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

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

_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to