vikramjitsaha / biojs

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

Chebi compound without using proxy..doesnt work... #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi! I have setup a local proxy so when you make a request to:

metabolights/chebiwebservice/*

it will make the request to:

http://www.ebi.ac.uk/webservices/chebi/2.0/test/

Therefore, I have configured the Chebi Compound component with: 
"metabolights/chebiwebservice/getCompleteEntity?chebiId="

It works fine in the browser but the component is getting empty data.

I SOLVED THIS DOING:

In _requestDetails: function( opt ){

Added:
            // Data type
            httpRequest.dataType = "text";

just before:

            jQuery.ajax(httpRequest);

So, in both cases (using the proxy or not using it) the request type is set to 
"text".

It works here, but you might have a better solution...;-)

Saludos!

Original issue reported on code.google.com by p.conesa.mingo on 7 Aug 2013 at 9:12

GoogleCodeExporter commented 9 years ago
Good job! thank you Pablo. I'll have a look on that. 

I think other option would be to set a param called mimeType="text" in the 
GET/POST request sent to proxy. In this way, you tell what data type are 
expected from proxy.   

Original comment by john...@gmail.com on 8 Aug 2013 at 2:01

GoogleCodeExporter commented 9 years ago
Hi! I think Rafa will commit the fix, talk to him if you want implement the way 
you are suggesting.

Thanks anyway.

Original comment by p.conesa.mingo on 8 Aug 2013 at 2:10

GoogleCodeExporter commented 9 years ago
Great! this issue will be assigned to Rafa then.

Thanks.

Original comment by john...@gmail.com on 8 Aug 2013 at 2:14

GoogleCodeExporter commented 9 years ago
Thanks guys! The change Pablo suggested works. I did committed to github. 
https://github.com/biojs/biojs/commit/c27504eda23eab5427ba489d45ebd23fbb33f7c9

Original comment by rajido@gmail.com on 8 Aug 2013 at 4:46