taverna-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasikrit Damkliang <kasik...@gmail.com>
Subject Re: How can I do POST a workflow doc to Taverna Server?
Date Mon, 28 Nov 2016 05:18:58 GMT
I can POST "Hello World" workflow
<https://www.dropbox.com/s/cd2x9tpk3bzko9t/Hello_World-v1.t2flow?dl=0>
already but when I did 'PUT' a status "Operating" to run, it returned
"java.io.IOException:
Error initialising store of key store: java.security.InvalidKeyException:
Illegal key size." (notebook
<https://www.dropbox.com/s/lgq6uowo6ogug54/test-run-a-workflow-to-taverna-server.ipynb?dl=0>)
It also returned the same error when I have tested on Taverna Workbench.
Can you please demonstrate for running a workflow since posting the
workflow and finally getting the result ? Regards, Kasikrit.

On Mon, Nov 28, 2016 at 1:53 AM, Alan Williams <alaninmcr@googlemail.com>
wrote:

> On 27-Nov-16 17:30, Kasikrit Damkliang wrote:
>
>> Dear All,
>>
>> I tried so many time to POST a workflow doc to my deployed Taverna
>> Server using ipython notebook.
>> <https://www.dropbox.com/s/4xwjz4worow2cui/POST-workflow-to-
>> Taverna-server.ipynb?dl=0>
>>
>
> From the notebook, it looks as if you are doing a Multipart-Encoded File
> post (from the "files=...").
>
> You need to read the workflow in and then just use the string as the data
> for the post.
>
> The Content-type should be application/vnd.taverna.t2flow+xml
>
> How can I do POST a workflow doc to Taverna Server?
>>
>
> Here is some code:
>
> import requests
> from requests.auth import HTTPBasicAuth
> import tavernaplayerclient
> auth=HTTPBasicAuth(user,password) -- the username/password to the server
>
> f = open(path, 'r') -- path to the workflow
> s = f.read()
>
> p = requests.post("http://yourserver/rest/runs",
>                  auth=auth,
>                  data=s,
>                  headers={'accept' : 'text/plain',
>                 'content-type':'application/vnd.taverna.t2flow+xml'})
>
> p.headers['location'] -- gives location of the run
>
> Regards,
>> Kasikrit.
>>
>
> Alan
>
>

Mime
View raw message