JoseMoreA / mydas

Automatically exported from code.google.com/p/mydas
0 stars 0 forks source link

XML should be the default response #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It has been reported that JSON is the default response when no headers are 
used, it is necessary to modify this so XML will be the default one.

See some emails about that
{quote}
On 8 Aug 2012, at 14:28, Leyla Garcia wrote:

> Hi there,
>
> Not sure if all of you are aware that Jonathan added JSON support in MyDas. 
Recently an issue related to it was raised, see below snips from some mails 
related to it.
>
> If MyDas is not officially supporting JSON because the current implementation 
does not accomplish with that agreed in the last DAS Workshop, then, it should 
be explicitly written somewhere. The mydas page in google code seems to be a 
good place to me. Any thoughts about it?
>
> Also, the default answer should be XML. Jonathan, as you are already familiar 
with the JSON related code, could you please take care of this? Unfortunately 
my hands are full now with the S4 Proxy and soon also with the cache 
implementation update (the current one, oscache, is old, not longer supported, 
and cannot be switch off).
>
> Regards,
>
> Leyla
>
> On 31/07/2012 12:10, Thomas Down wrote:
>> FYI, we've now got a workaround for this in Dalliance. Specifically, we send:
>>
>> Accept: application/xml,*/*
>>
>> ...on all DAS requests, which causes myDAS to send XML while hopefully not 
storing up too many other problems for the future. I still think the myDAS 
conneg logic should change, because it could cause problems for other clients, 
especially browser-based clients.
>>
>> Is there any more information about the status of JSON support?
>>
>> Thomas.
>>
>
> On 31/07/2012 12:27, jwarren wrote:
>> Hi Thomas
>> I agree the default should be xml and I've already talked to Leyla about 
this, I also thought I'd programmed it that way.. with our testing it has 
always behaved in the appropriate manner which is why this hasn't arisen 
before. But obviously it wasn't tested enough!
>> I think all DAS requests should be putting in Accept: "application/xml" in 
the header which should work with MyDAS? Presumably Dalliance was failing as it 
doesn't send this header with requests (which if I recall you said was to keep 
cors request working as adding headers makes it fragile)?
>> I'm a bit confused about the */* you've added?
>> I don't believe the JSON format is stable as it's just the Jackson 
interpretation of the java objects and not the JSON agreed by yourself, Andy J 
and me at the last DAS workshop. Nothing has been done on this since I left the 
DAS project…so it's specced but not implemented in either preserver or mydas.
>> I'd be ok with the JSON being used as is so we at least have an 
implementation whereas if we leave it till it gets implemented correctly it may 
never get implemented at all due to the lack of funding and people working on 
the project at the moment. However I'm guessing Andy J wouldn't be so keen Is 
there any intention in the new funding for this Andy? It would also be good for 
the new ensembl browser to be able to get JSON responses also.
>> Cheers
>> Jonathan. 
{quote}

Original issue reported on code.google.com by leylaj...@gmail.com on 29 Aug 2012 at 9:28

GoogleCodeExporter commented 8 years ago

Original comment by warren.j...@gmail.com on 29 Aug 2012 at 10:12

GoogleCodeExporter commented 8 years ago
MyDAS now sets the content type header to "application/xml;charset=UTF-8"
(See MyDasServlet line 548) in version 1.6.7.

Original comment by philip.j...@gmail.com on 24 Oct 2012 at 3:46