You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@taverna.apache.org by Kasikrit Damkliang <ka...@gmail.com> on 2016/11/27 17:30:35 UTC
How can I do POST a workflow doc to Taverna Server?
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>
How can I do POST a workflow doc to Taverna Server?
Regards,
Kasikrit.
Re: How can I do POST a workflow doc to Taverna Server?
Posted by Kasikrit Damkliang <ka...@gmail.com>.
I've solved the problem for confirming Stian's post also.
Thanks you all, Alan and Stian.
On Mon, Nov 28, 2016 at 4:35 PM, Alan Williams <al...@googlemail.com>
wrote:
> To confirm Stian's post, I have just run Hello World from IPython and it
> worked OK.
>
> Alan
>
>
Re: How can I do POST a workflow doc to Taverna Server?
Posted by Alan Williams <al...@googlemail.com>.
To confirm Stian's post, I have just run Hello World from IPython and it
worked OK.
Alan
Re: How can I do POST a workflow doc to Taverna Server?
Posted by Stian Soiland-Reyes <st...@apache.org>.
It sounds like the server is unable to initialise the encrypted password
store for Taverna.
Perhaps you need to install the JCE policy for Java on the server?
Download for Java 8:
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
I'm afraid Oracle don't have very detailed install documentation, look at
the included README in the JCE download.
On 28 Nov 2016 5:19 am, "Kasikrit Damkliang" <ka...@gmail.com> wrote:
>
> 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 <al...@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
>>
>>
>
Re: How can I do POST a workflow doc to Taverna Server?
Posted by Kasikrit Damkliang <ka...@gmail.com>.
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 <al...@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
>
>
Re: How can I do POST a workflow doc to Taverna Server?
Posted by Alan Williams <al...@googlemail.com>.
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