[OTDev] NTUA WebServices

Vedrin Jeliazkov vedrin.jeliazkov at gmail.com
Fri Aug 20 12:39:34 CEST 2010


Hi Christoph,

Nina is flying to ACS' fall national meeting in Boston right now. I'll
try to answer your queries on her behalf. Nina could provide further
details (if needed) as soon as she gets a chance to open her mailbox.

On 20 August 2010 12:03, Christoph Helma <helma at in-silico.ch> wrote:
> Excerpts from Nina Jeliazkova's message of Mon Aug 16 17:27:03 +0200 2010:
>> curl -X POST -d dataset_uri=$dataset_uri -d model_uri=$model_uri
>> http://apps.ideaconsult.net:8080/ambit2/algorithm/superservice
>>
>> Returns task URL.
>
> Thanks! I have tried with
>
> curl -X POST -d dataset_uri=http://ot-dev.in-silico.ch/dataset/356 -d model_uri=http://apps.ideaconsult.net:8080/ambit2/algorithm/J48 http://apps.ideaconsult.net:8080/ambit2/algorithm/superservice
>
> which returns the RDF (not task URI):

Yes, according to the current API, RDF is returned by default. If you
prefer to receive a uri-list, then you should add a corresponding
Accept header to the POST request:

- - - - - - - - 8< - - - - - - - -
vedrin at ambit:~$ curl -X POST -H "Accept:text/uri-list" -d
dataset_uri=http://ot-dev.in-silico.ch/dataset/356 -d
model_uri=http://apps.ideaconsult.net:8080/ambit2/algorithm/J48
http://apps.ideaconsult.net:8080/ambit2/algorithm/superservice
http://apps.ideaconsult.net:8080/ambit2/task/33ca80be-2d2b-47c0-bc89-0c9fdb706016
- - - - - - - - 8< - - - - - - - -

> The task URI returns:
> ch at zx81:~$ curl http://apps.ideaconsult.net:8080/ambit2/task/7828f743-05f6-46c0-94fe-91e1ed75ab25

[...]

>        <ot:errorCode
> rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
>        >500</ot:errorCode>

[...]

> I guess, I would have to specify also the target feature URI
> (http://ot-dev.in-silico.ch/toxcreate/feature#hamster_carc in this
> case), how would I do that?

Well, you could have a look at a somehow similar working example
(without a superservice invocation though) here:

http://ambit.uni-plovdiv.bg/cgi-bin/smokeping.cgi?target=IDEA.Algorithms.J48ModCreation

I tried to follow this example with the relevant feature URI in your
case (http://ot-dev.in-silico.ch/toxcreate/feature#hamster_carc), but
got the same error as the one you've reported above. I don't have a
clue what's going wrong ... One possible culprit is that this feature
cannot be found:

- - - - - - - - 8< - - - - - - - -
vedrin at ambit:~$ curl 'http://ot-dev.in-silico.ch/toxcreate/feature#hamster_carc'
<h1>Not Found</h1>vedrin at ambit:~$
- - - - - - - - 8< - - - - - - - -

... but again, I'm not sure whether this is expected or not (I noticed
that in fact http://ot-dev.in-silico.ch/toxcreate/feature#hamster_carc
is available in http://ot-dev.in-silico.ch/dataset/356). It is not
clear either whether there's only one single reason for the failure or
an accumulation of several issues. I guess Nina will have to shed some
light on this.

Kind regards,
Vedrin

PS: In such situations it would be nice to have more specific error
messages (and yes, this is not the first time I make this
observation...)



More information about the Development mailing list