[OTDev] validating web services

Nina Jeliazkova nina at acad.bg
Wed Apr 21 12:36:00 CEST 2010


Hi Martin,

Martin Guetlein wrote:
> Hi Pantelis,
>
> when building a model, it seems that your service directly returns the
> task object (See curl example below).
> I think according to the API a task uri should be returned?
>
>   
We have in API the following :

    http://opentox.org/dev/apis/api-1.1/AsyncTask

    A resource that creates an asynchronous task (e.g. large dataset
    upload, model creation, model prediction) should return HTTP status
    code 202 and task representation (URI(s) if /Accept:text/uri-list/ ,
    or RDF/XML if /Accept:application/rdf+xml/) in the response body, as
    specified by the HTTP protocol.

This means, both URI and RDF representation of the task object are valid
responses, and Accept: header defines which one is returned.   We
havent' yet specified what is the default, if there is no Accept: header
- perhaps uri-list ?

Of course we might change the current spec, if necessary.

Best regards,
Nina
> Best regards,
> Martin
>
>
> $ curl -d prediction_feature=\
> "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/103141" \
> -d dataset_uri=\
> "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"\
> http://opentox.ntua.gr:3003algorithm/mlr
>
> ->
>
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xmlns:ot="http://www.opentox.org/api/1.1#"
>     xmlns:ota="http://www.opentox.org/algorithmTypes.owl/#"
>     xmlns:owl="http://www.w3.org/2002/07/owl#"
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
>     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
>   <rdf:Description
> rdf:about="http://purl.org/dc/elements/1.1/relation">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://purl.org/dc/elements/1.1/identifier">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://purl.org/dc/elements/1.1/contributor">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://www.opentox.org/api/1.1#hasStatus">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://purl.org/dc/elements/1.1/rights">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://purl.org/dc/elements/1.1/creator">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://www.opentox.org/api/1.1#Task">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://purl.org/dc/elements/1.1/date">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://opentox.ntua.gr:3003/task/4982aa8d-ed3e-4954-a76a-2807e46a123f">
>     <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">YAQP
> Task</dc:title>
>     <dc:contributor
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.org</dc:contributor>
>     <ot:hasStatus
> rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Running</ot:hasStatus>
>     <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.ntua.gr:3003</dc:source>
>     <dc:relation
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.org</dc:relation>
>     <dc:creator
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.ntua.gr:3003</dc:creator>
>     <dc:publisher
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.ntua.gr:3003</dc:publisher>
>     <dc:identifier
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://opentox.ntua.gr:3003/task/4982aa8d-ed3e-4954-a76a-2807e46a123f</dc:identifier>
>     <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">Wed
> Apr 21 02:48:30 EDT 2010</dc:date>
>     <dc:rights rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://www.gnu.org/licenses/</dc:rights>
>     <rdf:type rdf:resource="http://www.opentox.org/api/1.1#Task"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://purl.org/dc/elements/1.1/publisher">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description
> rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://purl.org/dc/elements/1.1/source">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://purl.org/dc/elements/1.1/title">
>     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
>   </rdf:Description>
> </rdf:RDF>
>
>
>
>
>
>
>
> On Tue, Apr 20, 2010 at 5:08 PM, chung <chvng at mail.ntua.gr> wrote:
>   
>> Dear Martin, All,
>>  I have made some changes regarding the NTUA services to provide full
>> compatibility with the recent changes in the Task API. I was a bit
>> dubious as to whether I should deploy the new version of the services
>> lest these would ruin the integration with ToxPredict. So I deployed the
>> latest version of YAQP on another URI: http://opentox.ntua.gr:3003 (Note
>> the different port: its 3003 instead of 3000).
>>
>> @Martin: Could you please try the validation services using the above
>> URI? (Hope this works...). Note that there are some changes as far as
>> the redirections are concerned! Let me know if you encounter any
>> problems and we'll be in touch to make the services work.
>>
>> @Nina: Could you please check if the new services are compliant with the
>> new API (status codes, response messages, RDF content etc)? Then we
>> could officially switch to the new API.
>>
>> Best regards,
>> Pantelis
>>
>> On Mon, 2010-04-19 at 18:29 +0200, Martin Guetlein wrote:
>>     
>>> Dear All,
>>>
>>> I created a new website that makes it easier for you to get your
>>> models and the validation web service working together:
>>> http://opentox.informatik.uni-freiburg.de/validation/nightly
>>> This website is for developers of OT web services and shows the
>>> results of a daily validation of your model web service/s. So far it
>>> is only a first initial version, it will be extended further.
>>>
>>> To all developers: please send to me URIs of models and/or datasets to
>>> extend the tests.
>>>
>>> Best regards,
>>> Martin
>>>
>>>
>>>       
>> _______________________________________________
>> Development mailing list
>> Development at opentox.org
>> http://www.opentox.org/mailman/listinfo/development
>>
>>     
>
>
>
>   




More information about the Development mailing list