You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by Larry Akah <la...@gmail.com> on 2015/07/03 13:26:07 UTC

GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello, now, am posting the body exactly as described without encoding with
json and am getting a 400 bad request message.
Anything that could be done about that?

Cheers


2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> That’s good news. Can’t wait to see it working in the app – let me know
> when you have committed the code. By the way, I think the mailing list
> removes attachments, probably best to either add screenshots to JIRA or
> send links to the screenshots in something like dropbox or google drive.
>
> Cheers,
>
> Ian
>
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 01 July 2015 20:07
> To: dev@taverna.incubator.apache.org
> Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' error and
> app stops.
>
> Great, i think its working. I have tested it from a REST client in chrome
> and i receieved the 201 status code and the structure of the workflow. Find
> here attached a screenshot of the post request.
> Next up, i will be incorporating that into the app.
>
> cheers
>
> 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> Ok, thanks.
> When i try that, i will send my feedback.
>
> Cheers
>
> 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk<mailto:
> ian.dunlop@manchester.ac.uk>>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I think the workflow can just be sent as it is. The request is JSON
> formatted but the things inside the request don't have to be. The
> t2flow/xml can be sent base64 encoded as they are.
>
> Cheers,
>
> Ian
>
> On 30/06/15 12:32, Larry Akah wrote:
> > Hello, The workflows we get from myexperiment are formatted as xml
> > or t2flow files. Do these absolutely need to be converted in json
> > before posting or they can be sent as is?
> >
> > Cheers
> >
> > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > <ia...@manchester.ac.uk>>:
> >
> > Hello,
> >
> > I've had a chat with the taverna player developer and you need to
> > send a request as follows:
> >
> > POST to /workflows.json
> >
> > {"workflow" : {  "document" :
> > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES
> > HERE"}}
> >
> > using HTTP basic auth with username:password base64 encoded in the
> > Authorization header in the request  e.g. Authorization: Basic
> > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because
> > the content type is not being respected for some reason.
> >
> >
> > Here's an example using curl: curl -u your_username -X POST -H
> > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
> > http://taverna-player-server/workflows.json
> >
> > where wf.json is the workflow file, this would then prompt for a
> > passwor d. Hope this helps, please let us know how you get on.
> >
> > Cheers,
> >
> > Ian
> >
> > On 29/06/15 19:23, Larry Akah wrote:
> >>>> I need some help with uploading a workflow to the player. The
> >>>> API doesn't make it seem possible currently. How is it done?
> >>>>
> >>>> cheers
> >>>>
> >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> >>>>
> >>>>> Yes, its not yet ready. i still need to adjust that because
> >>>>> at first , i was using the player to fetch workflows and
> >>>>> derived a run skeleton to use for creating workflows. There
> >>>>> is still some stuff that needs to be fixed there.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> >>>>> <Ia...@manchester.ac.uk>>:
> >>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>> I got a ‘fatal’ error which the emulator reported when
> >>>>>> clicking on ‘create run’:
> >>>>>>
> >>>>>> 06-29 15:25:39.554
> >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> >>>>>> java.lang.NullPointerException: Attempt to invoke
> >>>>>> virtual method 'void android.app.AlertDialog.show()' on a
> >>>>>> null object reference at
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdetai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407)
> >>>>>>
> >>>>>>
> > at
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdetai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289)
> >>>>>>
> >>>>>>
> > at android.os.AsyncTask.finish(AsyncTask.java:636)
> >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> >>>>>> at
> >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java
> :65
> >
> >>>>>>
> 3)
> >>>>>>
> >>>>>>
> > at android.os.Handler.dispatchMessage(Handler.java:102)
> >>>>>> at android.os.Looper.loop(Looper.java:135) at
> >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote
> Ini
> >
> >>>>>>
> t.java:903)
> >>>>>>
> >>>>>>
> > at
> >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> >>>>>>
> >>>>>>
> >>>>>>
> The device reported that the app had stopped running but in
> >>>>>> fact it returned it to the workflows view but all the
> >>>>>> workflows had disappeared from the view. I guess it’s
> >>>>>> probably because this functionality is not ready yet but
> >>>>>> I figured I should report it anyway.
> >>>>>>
> >>>>>> Cheers,
> >>>>>>
> >>>>>> Ian
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> -- *Akah Larry N.H*
> >>>>>
> >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>>>> *www.iceteck.com<http://www.iceteck.com>*
> >>>>>
> >>>>> Developing technologies for emergence and sustainable
> >>>>> development.
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> =RrFl
> -----END PGP SIGNATURE-----
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Here is the body of a certain post request as requested:
{"workflow:"{"document":{"data:application/octet-stream;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48czpzY3VmbCB4bWxuczpzPSJo
IG5hbWU9ImZpZWxkIiBxbmFtZT0ie2h0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hfXN0
ZSBvcHRpb25hbD0idHJ1ZSIgdW5ib3VuZGVkPSJmYWxzZSIgdHlwZW5hbWU9InN0cmluZyIgbmFt
dy53My5vcmcvMjAwMS9YTUxTY2hlbWF9c3RyaW5nIiAvPiAgICAgICAgICAgIDxzOmJhc2V0eXBl
b3V0cHV0X3NwbGl0dGVyIj4gICAgPHM6bG9jYWw+ICAgICAgb3JnLmVtYmwuZWJpLmVzY2llbmNl
PSJzdHJpbmciIG5hbWU9IkNvdW50IiBxbmFtZT0ie2h0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1M
cmluZyIgbmFtZT0iUmV0U3RhcnQiIHFuYW1lPSJ7aHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxT
bmJvdW5kZWQ9ImZhbHNlIiB3cmFwcGVkPSJ0cnVlIiB0eXBlbmFtZT0iSWRMaXN0VHlwZSIgbmFt
ZSIgdW5ib3VuZGVkPSJmYWxzZSIgd3JhcHBlZD0idHJ1ZSIgdHlwZW5hbWU9IlRyYW5zbGF0aW9u
ICAgICAgICAgICAgICAgICAgPHM6YmFzZXR5cGUgb3B0aW9uYWw9ImZhbHNlIiB1bmJvdW5kZWQ9
czphcnJheXR5cGU+ICAgICAgICAgICAgPHM6Y29tcGxleHR5cGUgb3B0aW9uYWw9InRydWUiIHVu
dHJpbmciIG5hbWU9IlRlcm0iIHFuYW1lPSJ7aHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hl
IHR5cGVuYW1lPSJzdHJpbmciIG5hbWU9IkNvdW50IiBxbmFtZT0ie2h0dHA6Ly93d3cudzMub3Jn
U2NoZW1hfXN0cmluZyIgLz4gICAgICAgICAgICA8czpjb21wbGV4dHlwZSBvcHRpb25hbD0idHJ1
aHJhc2VOb3RGb3VuZFswLHVuYm91bmRlZF0iPiAgICAgICAgICAgICAgICAgIDxzOmVsZW1lbnR0
dW5kZWQ9ImZhbHNlIiB0eXBlbmFtZT0ic3RyaW5nIiBuYW1lPSIiIHFuYW1lPSJ7aHR0cDovL3d3
YWxzZSIgdHlwZW5hbWU9InN0cmluZyIgbmFtZT0iIiBxbmFtZT0ie2h0dHA6Ly93d3cudzMub3Jn
LzIwMDEvWE1MU2NoZW1hfXN0cmluZyIgLz4gICAgICAgICAgICAgICAgICA8L3M6ZWxlbWVudHR5
cGU+ICAgICAgICAgICAgICAgIDwvczphcnJheXR5cGU+ICAgICAgICAgICAgICA8L3M6ZWxlbWVu
dHM+ICAgICAgICAgICAgPC9zOmNvbXBsZXh0eXBlPiAgICAgICAgICAgIDxzOmNvbXBsZXh0eXBl
IG9wdGlvbmFsPSJ0cnVlIiB1bmJvdW5kZWQ9ImZhbHNlIiB0eXBlbmFtZT0iV2FybmluZ0xpc3RU
eXBlIiBuYW1lPSJXYXJuaW5nTGlzdCIgcW5hbWU9IntodHRwOi8vd3d3Lm5jYmkubmxtLm5paC5n
b3Yvc29hcC9ldXRpbHMvZXNlYXJjaH1XYXJuaW5nTGlzdFR5cGUiPiAgICAgICAgICAgICAgPHM6
ZWxlbWVudHM+ICAgICAgICAgICAgICAgIDxzOmFycmF5dHlwZSBvcHRpb25hbD0idHJ1ZSIgdW5i
b3VuZGVkPSJ0cnVlIiB3cmFwcGVkPSJ0cnVlIiB0eXBlbmFtZT0iUGhyYXNlSWdub3JlZCIgbmFt
ZT0iUGhyYXNlSWdub3JlZCIgcW5hbWU9IntodHRwOi8vd3d3Lm5jYmkubmxtLm5paC5nb3Yvc29h
cC9ldXRpbHMvZXNlYXJjaH1QaHJhc2VJZ25vcmVkWzAsdW5ib3VuZGVkXSI+ICAgICAgICAgICAg
ICAgICAgPHM6ZWxlbWVudHR5cGU+ICAgICAgICAgICAgICAgICAgICA8czpiYXNldHlwZSBvcHRp
b25hbD0iZmFsc2UiIHVuYm91bmRlZD0iZmFsc2UiIHR5cGVuYW1lPSJzdHJpbmciIG5hbWU9IiIg
cW5hbWU9IntodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYX1zdHJpbmciIC8+ICAgICAg
ICAgICAgICAgICAgPC9zOmVsZW1lbnR0eXBlPiAgICAgICAgICAgICAgICA8L3M6YXJyYXl0eXBl
PiAgICAgICAgICAgICAgICA8czphcnJheXR5cGUgb3B0aW9uYWw9InRydWUiIHVuYm91bmRlZD0i
dHJ1ZSIgd3JhcHBlZD0idHJ1ZSIgdHlwZW5hbWU9IlF1b3RlZFBocmFzZU5vdEZvdW5kIiBuYW1l
PSJRdW90ZWRQaHJhc2VOb3RGb3VuZCIgcW5hbWU9IntodHRwOi8vd3d3Lm5jYmkubmxtLm5paC5n
b3Yvc29hcC9ldXRpbHMvZXNlYXJjaH1RdW90ZWRQaHJhc2VOb3RGb3VuZFswLHVuYm91bmRlZF0i
 PiAgICAgICAgICAgICAgICAgIDxzOmVsZW1lbnR0eXBlPiAgICAgICAgICAgICAgICAgICAgPHM6
 YmFzZXR5cGUgb3B0aW9uYWw9ImZhbHNlIiB1bmJvdW5kZWQ9ImZhbHNlIiB0eXBlbmFtZT0ic3Ry
aW5nIiBuYW1lPSIiIHFuYW1lPSJ7aHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWF9c3Ry
aW5nIiAvPiAgICAgICAgICAgICAgICAgIDwvczplbGVtZW50dHlwZT4gICAgICAgICAgICAgICAg
PC9zOmFycmF5dHlwZT4gICAgICAgICAgICAgICAgPHM6YXJyYXl0eXBlIG9wdGlvbmFsPSJ0cnVl
IiB1bmJvdW5kZWQ9InRydWUiIHdyYXBwZWQ9InRydWUiIHR5cGVuYW1lPSJPdXRwdXRNZXNzYWdl
IiBuYW1lPSJPdXRwdXRNZXNzYWdlIiBxbmFtZT0ie2h0dHA6Ly93d3cubmNiaS5ubG0ubmloLmdv
di9zb2FwL2V1dGlscy9lc2VhcmNofU91dHB1dE1lc3NhZ2VbMCx1bmJvdW5kZWRdIj4gICAgICAg
ICAgICAgICAgICA8czplbGVtZW50dHlwZT4gICAgICAgICAgICAgICAgICAgIDxzOmJhc2V0eXBl
IG9wdGlvbmFsPSJmYWxzZSIgdW5ib3VuZGVkPSJmYWxzZSIgdHlwZW5hbWU9InN0cmluZyIgbmFt
ZT0iIiBxbmFtZT0ie2h0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hfXN0cmluZyIgLz4g
ICAgICAgICAgICAgICAgICA8L3M6ZWxlbWVudHR5cGU+ICAgICAgICAgICAgICAgIDwvczphcnJh
eXR5cGU+ICAgICAgICAgICAgICA8L3M6ZWxlbWVudHM+ICAgICAgICAgICAgPC9zOmNvbXBsZXh0
eXBlPiAgICAgICAgICA8L3M6ZWxlbWVudHM+ICAgICAgICA8L3M6Y29tcGxleHR5cGU+ICAgICAg
PC9zOmV4dGVuc2lvbnM+ICAgIDwvczpsb2NhbD4gIDwvczpwcm9jZXNzb3I+ICA8czpsaW5rIHNv
dXJjZT0iRE9JOnZhbHVlIiBzaW5rPSJlU2VhcmNoX2lucHV0X21lcmdlcjp0ZXJtIiAvPiAgPHM6
bGluayBzb3VyY2U9IkRhdGFiYXNlOnZhbHVlIiBzaW5rPSJlU2VhcmNoX2lucHV0X21lcmdlcjpk
YiIgLz4gIDxzOmxpbmsgc291cmNlPSJlU2VhcmNoX2lucHV0X21lcmdlcjpvdXRwdXQiIHNpbms9
InJ1bl9lU2VhcmNoOnBhcmFtZXRlcnMiIC8+ICA8czpsaW5rIHNvdXJjZT0iZVNlYXJjaF9vdXRw
dXRfc3BsaXR0ZXI6SWRMaXN0IiBzaW5rPSJQTUlEIiAvPiAgPHM6bGluayBzb3VyY2U9ImVTZWFy
Y2hfb3V0cHV0X3NwbGl0dGVyOlF1ZXJ5VHJhbnNsYXRpb24iIHNpbms9InRyYW5zbGF0aW9uIiAv
PiAgPHM6bGluayBzb3VyY2U9ImVTZWFyY2hfb3V0cHV0X3NwbGl0dGVyOlRyYW5zbGF0aW9uU3Rh
Y2siIHNpbms9InN0YWNrIiAvPiAgPHM6bGluayBzb3VyY2U9InJldHR5cGU6dmFsdWUiIHNpbms9
ImVTZWFyY2hfaW5wdXRfbWVyZ2VyOnJldHR5cGUiIC8+ICA8czpsaW5rIHNvdXJjZT0icnVuX2VT
ZWFyY2g6cGFyYW1ldGVycyIgc2luaz0iZVNlYXJjaF9vdXRwdXRfc3BsaXR0ZXI6aW5wdXQiIC8+
ICA8czpzaW5rIG5hbWU9IlBNSUQiIC8+ICA8czpzaW5rIG5hbWU9InN0YWNrIiAvPiAgPHM6c2lu
ayBuYW1lPSJ0cmFuc2xhdGlvbiIgLz48L3M6c2N1Zmw"}}

And from the logcat, i get the message below when i try printing results of
the request:

07-03 13:37:48.733  31651-31677/mobile.taverna.apache.org.tavernamobile
I/System.out﹕ Post Response Code: 400
07-03 13:37:48.733  31651-31677/mobile.taverna.apache.org.tavernamobile
I/System.out﹕ Post response message: Bad Request

Cheers

2015-07-03 13:28 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Unfortunately I can't see your request in the logs for some reason (some
> docker issue that we don't understand). Can you paste the body in an email
> (remember not to include any username/password stuff).
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 12:26
> To: dev@taverna.incubator.apache.org
> Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello, now, am posting the body exactly as described without encoding with
> json and am getting a 400 bad request message.
> Anything that could be done about that?
>
> Cheers
>
>
> 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > That’s good news. Can’t wait to see it working in the app – let me
> > know when you have committed the code. By the way, I think the mailing
> > list removes attachments, probably best to either add screenshots to
> > JIRA or send links to the screenshots in something like dropbox or
> google drive.
> >
> > Cheers,
> >
> > Ian
> >
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 01 July 2015 20:07
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' error
> > and app stops.
> >
> > Great, i think its working. I have tested it from a REST client in
> > chrome and i receieved the 201 status code and the structure of the
> > workflow. Find here attached a screenshot of the post request.
> > Next up, i will be incorporating that into the app.
> >
> > cheers
> >
> > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > Ok, thanks.
> > When i try that, i will send my feedback.
> >
> > Cheers
> >
> > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> <mailto:
> > ian.dunlop@manchester.ac.uk>>:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > I think the workflow can just be sent as it is. The request is JSON
> > formatted but the things inside the request don't have to be. The
> > t2flow/xml can be sent base64 encoded as they are.
> >
> > Cheers,
> >
> > Ian
> >
> > On 30/06/15 12:32, Larry Akah wrote:
> > > Hello, The workflows we get from myexperiment are formatted as xml
> > > or t2flow files. Do these absolutely need to be converted in json
> > > before posting or they can be sent as is?
> > >
> > > Cheers
> > >
> > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > <ia...@manchester.ac.uk>>:
> > >
> > > Hello,
> > >
> > > I've had a chat with the taverna player developer and you need to
> > > send a request as follows:
> > >
> > > POST to /workflows.json
> > >
> > > {"workflow" : {  "document" :
> > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES
> > > HERE"}}
> > >
> > > using HTTP basic auth with username:password base64 encoded in the
> > > Authorization header in the request  e.g. Authorization: Basic
> > > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because the
> > > content type is not being respected for some reason.
> > >
> > >
> > > Here's an example using curl: curl -u your_username -X POST -H
> > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
> > > http://taverna-player-server/workflows.json
> > >
> > > where wf.json is the workflow file, this would then prompt for a
> > > passwor d. Hope this helps, please let us know how you get on.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > On 29/06/15 19:23, Larry Akah wrote:
> > >>>> I need some help with uploading a workflow to the player. The API
> > >>>> doesn't make it seem possible currently. How is it done?
> > >>>>
> > >>>> cheers
> > >>>>
> > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > >>>>
> > >>>>> Yes, its not yet ready. i still need to adjust that because at
> > >>>>> first , i was using the player to fetch workflows and derived a
> > >>>>> run skeleton to use for creating workflows. There is still some
> > >>>>> stuff that needs to be fixed there.
> > >>>>>
> > >>>>> Cheers
> > >>>>>
> > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> > >>>>> <Ia...@manchester.ac.uk>>:
> > >>>>>
> > >>>>>> Hello,
> > >>>>>>
> > >>>>>> I got a ‘fatal’ error which the emulator reported when clicking
> > >>>>>> on ‘create run’:
> > >>>>>>
> > >>>>>> 06-29 15:25:39.554
> > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
> > >>>>>> method 'void android.app.AlertDialog.show()' on a null object
> > >>>>>> reference at
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407)
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289)
> > >>>>>>
> > >>>>>>
> > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > >>>>>> at
> > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.ja
> > >>>>>> va
> > :65
> > >
> > >>>>>>
> > 3)
> > >>>>>>
> > >>>>>>
> > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygo
> > >>>>>> te
> > Ini
> > >
> > >>>>>>
> > t.java:903)
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > The device reported that the app had stopped running but in
> > >>>>>> fact it returned it to the workflows view but all the workflows
> > >>>>>> had disappeared from the view. I guess it’s probably because
> > >>>>>> this functionality is not ready yet but I figured I should
> > >>>>>> report it anyway.
> > >>>>>>
> > >>>>>> Cheers,
> > >>>>>>
> > >>>>>> Ian
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> -- *Akah Larry N.H*
> > >>>>>
> > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > >>>>>
> > >>>>> Developing technologies for emergence and sustainable
> > >>>>> development.
> > >>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>
> > >
> > >
> > >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1
> > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > =RrFl
> > -----END PGP SIGNATURE-----
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
2015-07-07 17:14 GMT+01:00 Larry Akah <la...@gmail.com>:

> Hello,
> Please can i have the complete code snippet that is working at the time? i
> can't seem to find myself. is it that on my repo or somewhere else?
>
> Thanks
>
> 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> I've tried uploading via the app and it all seems to be OK now. I get the
>> response 201 created and you can see the workflows on the player. Not sure
>> how you get the actual response content from the http connection though :)
>> Now all you have to do is figure out how to actually pass in the inputs
>> for the workflow and run it......
>>
>> Also, still not sure what I am logging into on the first screen - does it
>> do anything. Anyway, not as important as getting an actual workflow run
>> working so concentrate on that.
>>
> Login will be originally on myexperiment, but i have to yet completed the
implementation, still trying to get around with workflow upload and run on
the player.

Cheers

>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 07 July 2015 12:25
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> player
>>
>> ok, i will try that.
>>
>> Thanks
>>
>> 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>> > Hello,
>> >
>> > I changed the encoding part to this:
>> >
>> > String data = "{\"document\":\"data:application/octet-stream;base64,"
>> > +
>> >
>> > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
>> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>> >
>> > Basically I did a string replace on the Base64 encoded workflow using
>> > .replace('-', '+')
>> >
>> > Then I tried uploading to the player and it worked. I haven't figured
>> > out what your app does with the response but the request was
>> > successful on the player.
>> >
>> > Cheers,
>> >
>> > Ian
>> >
>> > -----Original Message-----
>> > From: Larry Akah [mailto:larryakah@gmail.com]
>> > Sent: 07 July 2015 11:58
>> > To: dev@taverna.incubator.apache.org
>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > player
>> >
>> > Hello,
>> > Wait, but i am trying to upload workflow id 34 even with the '+' used
>> > and i still get the 'Internal Server Error'. This is the base64
>> > encoded
>> > workflow:
>> >
>> >
>> >
>> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>> > >
>> >
>> > This is the code am using to test the upload
>> >
>> >    String data =
>> > "{\"document\":\"data:application/octet-stream;base64," +
>> > >
>> > >
>> > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sb
>> > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZ
>> > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9I
>> > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV
>> > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zd
>> > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3c
>> > uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
>> > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21
>> > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlc
>> > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA
>> > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ
>> > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9
>> > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zO
>> > nNjdWZsPgoKCg=="+"\"}";
>> > >                 String post = "{\"workflow\":"+data+"}";
>> > >
>> > >                 System.out.println("BODY=>"+post);
>> > >                 connection.setRequestMethod("POST");
>> > >                 connection.setRequestProperty("Authorization",
>> > basicAuth);
>> > >                 connection.setRequestProperty("Content-Type",
>> > > "application/json");
>> > >                 connection.setRequestProperty("Content-Encoding",
>> > "UTF-8");
>> > >                 connection.setUseCaches (false);
>> > >                 connection.setDoOutput(true);
>> > >                 connection.connect(); //send request
>> > >
>> > >                 DataOutputStream dos = new
>> > > DataOutputStream(connection.getOutputStream());
>> > >
>> > >                 dos.writeBytes(post);//write post data which is a
>> > > formatted json data representing body of workflow
>> > >               //  dos.writeChars(post);
>> > >                // dos.write(post.getBytes("UTF-8"));
>> > >                // dos.writeUTF(post);
>> > >
>> > >                 dos.flush();
>> > >                 dos.close();
>> > >
>> > >                 System.out.println("Post Response Code:
>> > > "+connection.getResponseCode());
>> > >                 System.out.println("Post response message:
>> > > "+connection.getResponseMessage());
>> > >                 connection.disconnect();
>> > >
>> >
>> > Cheers
>> >
>> > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
>> >
>> > > Ah, ok. Let me try some options out but i think the former would
>> > > require a new implementation of android's base64 because i have
>> > > tried all the possible options and they all give error.
>> > >
>> > > Cheers
>> > >
>> > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> > >
>> > >> Hello,
>> > >>
>> > >> We think we have figured out the issue with the encoding. Java
>> > >> Base64 uses a '-' instead of a '+' when encoding. Command line in
>> > >> Linux and Ruby expect a '+'. When we converted the raw Base64
>> > >> encoded workflow from the android request and changed all the '-'
>> characters to a '+'
>> > it works ok.
>> > >> So either we need to figure out how to tell Java to use '+' instead
>> > >> of
>> > '-'
>> > >> or we change the encoded workflow string using string replace
>> > >> before adding it to the request string.
>> > >>
>> > >> Lots of thanks to Finn for helping me to debug this.
>> > >>
>> > >> Cheers,
>> > >>
>> > >> Ian
>> > >>
>> > >> -----Original Message-----
>> > >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > >> Sent: 07 July 2015 11:37
>> > >> To: dev@taverna.incubator.apache.org
>> > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
>> > >> Taverna player
>> > >>
>> > >> Is it possible that i get the body of the request that the player
>> > >> is actually receiving?
>> > >>
>> > >> Cheers
>> > >>
>> > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>> > >>
>> > >> > workflow id number 34 is the workflow i've been working with
>> > >> >
>> > >> >
>> > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ian.Dunlop@manchester.ac.uk
>> >:
>> > >> >
>> > >> >> Hello,
>> > >> >>
>> > >> >> It's hard to tell from the logs if the output relates to what
>> > >> >> you are doing, what workflow are you trying to upload. The logs
>> > >> >> are full of "parser
>> > >> >> error: PCDATA invalid Char value ". Maybe there are characters
>> > >> >> in it that the tavern player XML parser cannot read. Anyone else
>> > >> >> have any
>> > >> ideas.
>> > >> >>
>> > >> >> Cheers,
>> > >> >>
>> > >> >> Ian
>> > >> >>
>> > >> >> -----Original Message-----
>> > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > >> >> Sent: 06 July 2015 17:52
>> > >> >> To: dev@taverna.incubator.apache.org
>> > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
>> > >> >> Taverna player
>> > >> >>
>> > >> >> What do the server logs reveal from the recent requests just few
>> > >> >> moments ago? I could use some help from them.
>> > >> >>
>> > >> >>
>> > >> >> Cheers
>> > >> >>
>> > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>> > >> >>
>> > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> > >> >> >
>> > >> >> >> Hello,
>> > >> >> >>
>> > >> >> >> I just sent workflow 16 to the taverna player by base64
>> > >> >> >> encoding it on the command line and using curl and it all
>> > >> >> >> worked ok. Here is the
>> > >> >> >> base64 version
>> > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe
>> > >> >> >> you need to ensure it is UTF-8 character set.
>> > >> >> >>
>> > >> >> >
>> > >> >> > Also that it is not broken into lines. That file correctly
>> > >> >> > keeps the
>> > >> >> > base64 all in one line. Some base64 methods will, by default,
>> > >> >> > break it into human-friendly lines which can be confusing for
>> > >> >> > the reading
>> > >> system.
>> > >> >> >
>> > >> >> >  Cheers,
>> > >> >> >>
>> > >> >> >> Ian
>> > >> >> >>
>> > >> >> >
>> > >> >> > Alan
>> > >> >> >
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> *Akah Larry N.H*
>> > >> >>
>> > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > >> >> *www.iceteck.com*
>> > >> >>
>> > >> >> Developing technologies for emergence and sustainable development.
>> > >> >>
>> > >> >
>> > >> >
>> > >> >
>> > >> > --
>> > >> > *Akah Larry N.H*
>> > >> >
>> > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > >> > *www.iceteck.com*
>> > >> >
>> > >> > Developing technologies for emergence and sustainable development.
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >> --
>> > >> *Akah Larry N.H*
>> > >>
>> > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > >> *www.iceteck.com*
>> > >>
>> > >> Developing technologies for emergence and sustainable development.
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > *Akah Larry N.H*
>> > >
>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > *www.iceteck.com*
>> > >
>> > > Developing technologies for emergence and sustainable development.
>> > >
>> > >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom*
>> > *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <ia...@manchester.ac.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Excellent work. I probably will not be able to have a proper look and
feedback until next week.

Cheers,

Ian

On 08/07/15 22:28, Larry Akah wrote:
> Hello, Workflow runs are now possible. Just grab the latest code
> from my repository. Details and history of the run will be coming
> up in next commits.
> 
> Cheers
> 
> 2015-07-08 11:57 GMT+01:00 Ian Dunlop
> <Ia...@manchester.ac.uk>:
> 
>> Hello,
>> 
>> Works ok for me with your code fragment: 
>> http://heater.cs.man.ac.uk:3000/workflows/12
>> 
>> 07-08 10:54:03.023
>> 2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕ 
>> BODY=>{"workflow":{"document":"data:application/octet-stream;base64,P
HdvcmtmbG93IHhtbG5zPSJodHRwOi8vdGF2ZXJuYS5zZi5uZXQvMjAwOC94bWwvdDJmbG93I
iB2ZXJzaW9uPSIxIiBwcm9kdWNlZEJ5PSJ0YXZlcm5hLTIuMy4wIj48ZGF0YWZsb3cgaWQ9I
mYzODgzZTBjLTRkYTQtNGQ2Yi1iYzE2LTBlMmNlYmFkNGY2NSIgcm9sZT0idG9wIj48bmFtZ
T5QYXRod2F5c2FuZEdlbmVhbm5vdGF0aW9uc2ZvclFUTHJlZ2lvbjwvbmFtZT48aW5wdXRQb
3J0cz48cG9ydD48bmFtZT5jaHJvbW9zb21lX25hbWU8L25hbWU+PGRlcHRoPjA8L2RlcHRoP
jxncmFudWxhckRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0a
W9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3Rhd
Glvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb
25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0a
W9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyL
mFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3JpcHRpb24iPiAgICAgI
CAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtM
DUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyY
XRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFub
m90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZ
i50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb
25fY2hhaW4+PGFubm90YXRpb25fY2hhaW4gZW5jb2Rpbmc9InhzdHJlYW0iPjxuZXQuc2Yud
GF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGwgeG1sbnM9IiI+ICA8Y
W5ub3RhdGlvbkFzc2VydGlvbnM+ICAgIDxuZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uL
kFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgICAgIDxhbm5vdGF0aW9uQmVhbiBjbGFzcz0ib
mV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5hbm5vdGF0aW9uYmVhbnMuTWltZVR5cGUiP
iAgICAgICAgPHRleHQ+dGV4dC9wbGFpbjwvdGV4dD4gICAgICA8L2Fubm90YXRpb25CZWFuP
iAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y
3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2Z
XJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0a
W9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvb
kNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvc
nQ+PG5hbWU+c3RhcnRfcG9zaXRpb248L25hbWU+PGRlcHRoPjA8L2RlcHRoPjxncmFudWxhc
kRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0aW9uX2NoYWluI
GVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vd
GF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8b
mV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gI
CAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb
24uYW5ub3RhdGlvbmJlYW5zLk1pbWVUeXBlIj4gICAgICAgIDx0ZXh0PnRleHQvcGxhaW48L
3RleHQ+ICAgICAgPC9hbm5vdGF0aW9uQmVhbj4gICAgICA8ZGF0ZT4yMDExLTA0LTA1IDEwO
jMzOjMzLjg1NiBCU1Q8L2RhdGU+ICAgICAgPGNyZWF0b3JzIC8+ICAgICAgPGN1cmF0aW9uR
XZlbnRMaXN0IC8+ICAgIDwvbmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0a
W9uQXNzZXJ0aW9uSW1wbD4gIDwvYW5ub3RhdGlvbkFzc2VydGlvbnM+PC9uZXQuc2YudGF2Z
XJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGw+PC9hbm5vdGF0aW9uX2NoY
WluPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVyb
mEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90Y
XRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vd
GF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZ
i50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3Jpc
HRpb24iPiAgICAgICAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkY
XRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgL
z4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hb
m5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0a
W9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wb
D48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvcnQ+PG5hbWU+Z
W5kX3Bvc2l0aW9uPC9uYW1lPjxkZXB0aD4wPC9kZXB0aD48Z3JhbnVsYXJEZXB0aD4wPC9nc
mFudWxhckRlcHRoPjxhbm5vdGF0aW9ucz48YW5ub3RhdGlvbl9jaGFpbiBlbmNvZGluZz0ie
HN0cmVhbSI+PG5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluS
W1wbCB4bWxucz0iIj4gIDxhbm5vdGF0aW9uQXNzZXJ0aW9ucz4gICAgPG5ldC5zZi50YXZlc
m5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkFzc2VydGlvbkltcGw+ICAgICAgPGFubm90Y
XRpb25CZWFuIGNsYXNzPSJuZXQuc2YudGF
>>
>> 
07-08 10:54:07.145    2264-2271/mobile.taverna.apache.org.tavernamobile
>> W/art﹕ Suspending all threads took: 5.732ms 07-08 10:54:07.396
>> 2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕
>> Post Response Code: 201 07-08 10:54:07.397
>> 2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕
>> Post response message: Created
>> 
>> Cheers,
>> 
>> Ian
>> 
>> -----Original Message----- From: Larry Akah
>> [mailto:larryakah@gmail.com] Sent: 08 July 2015 11:36 To:
>> dev@taverna.incubator.apache.org Subject: Re: GSOC Taverna
>> Mobile: Uploading workflows to the Taverna player
>> 
>> Hello, Please checkout this gist here: 
>> https://gist.github.com/larrytech7/957cc61a3bdd82e3e030 Normally
>> this is what should work, but i still can't get the desired 
>> result. I have checkout for missing or broken connections
>> however, i still get no results. There maybe something am missing
>> out on. Could you run yours once again so that i see the workflow
>> on the player, i have deleted all the workflows previously
>> uploaded.
>> 
>> thanks
>> 
>> 2015-07-08 11:05 GMT+01:00 Larry Akah <la...@gmail.com>:
>> 
>>> ok, checking it out
>>> 
>>> 2015-07-08 11:02 GMT+01:00 Ian Dunlop
>>> <Ia...@manchester.ac.uk>:
>>> 
>>>> Hello,
>>>> 
>>>> I only changed one tiny bit of your code in the 
>>>> WorkflowdetailsFragment class. Look at this gist:
>>>> 
>>>> https://gist.github.com/ianwdunlop/2c3615e9094827fabd83
>>>> 
>>>> You might be running into issues with the http connection
>>>> closing during debug mode which I encountered yesterday.  It
>>>> will cause a broken pipe exception. You may have to run the
>>>> app as normal when testing this or maybe move your
>>>> breakpoints to after the connection has
>> sent the request.
>>>> 
>>>> Cheers,
>>>> 
>>>> Ian
>>>> 
>>>> -----Original Message----- From: Larry Akah
>>>> [mailto:larryakah@gmail.com] Sent: 08 July 2015 10:52 To:
>>>> dev@taverna.incubator.apache.org Subject: Re: GSOC Taverna
>>>> Mobile: Uploading workflows to the Taverna player
>>>> 
>>>> Hello, I've done that but i still don't get any workflow
>>>> created on the player. point me to the snippet that you
>>>> have.
>>>> 
>>>> Thanks
>>>> 
>>>> 2015-07-08 10:29 GMT+01:00 Ian Dunlop
>>>> <Ia...@manchester.ac.uk>:
>>>> 
>>>>> Hello,
>>>>> 
>>>>> It's just the line that encodes the workflow that I changed
>>>>> by telling it to change all the '-' characters to a '+'
>>>>> 
>>>>> String data =
>>>>> "{\"document\":\"data:application/octet-stream;base64," +
>>>>> Base64.encodeToString(sb.toString().getBytes("UTF-8"), 
>>>>> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Ian
>>>>> 
>>>>> -----Original Message----- From: Larry Akah
>>>>> [mailto:larryakah@gmail.com] Sent: 07 July 2015 17:14 To:
>>>>> dev@taverna.incubator.apache.org Subject: Re: GSOC Taverna
>>>>> Mobile: Uploading workflows to the Taverna player
>>>>> 
>>>>> Hello, Please can i have the complete code snippet that is
>>>>> working at the time? i can't seem to find myself. is it
>>>>> that on my repo or somewhere
>>>> else?
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> 2015-07-07 14:34 GMT+01:00 Ian Dunlop
>>>>> <Ia...@manchester.ac.uk>:
>>>>> 
>>>>>> Hello,
>>>>>> 
>>>>>> I've tried uploading via the app and it all seems to be
>>>>>> OK now. I get the response 201 created and you can see
>>>>>> the workflows on the
>>>> player.
>>>>>> Not sure how you get the actual response content from the
>>>>>> http connection though :) Now all you have to do is
>>>>>> figure out how to actually pass in the inputs for the
>>>>>> workflow and run it......
>>>>>> 
>>>>>> Also, still not sure what I am logging into on the first
>>>>>> screen - does it do anything. Anyway, not as important as
>>>>>> getting an actual workflow run working so concentrate on
>>>>>> that.
>>>>>> 
>>>>>> Cheers,
>>>>>> 
>>>>>> Ian
>>>>>> 
>>>>>> -----Original Message----- From: Larry Akah
>>>>>> [mailto:larryakah@gmail.com] Sent: 07 July 2015 12:25 To:
>>>>>> dev@taverna.incubator.apache.org Subject: Re: GSOC
>>>>>> Taverna Mobile: Uploading workflows to the Taverna
>>>>>> player
>>>>>> 
>>>>>> ok, i will try that.
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> 2015-07-07 12:10 GMT+01:00 Ian Dunlop
>>>>>> <Ian.Dunlop@manchester.ac.uk
>>> :
>>>>>> 
>>>>>>> Hello,
>>>>>>> 
>>>>>>> I changed the encoding part to this:
>>>>>>> 
>>>>>>> String data =
>>>> "{\"document\":\"data:application/octet-stream;base64,"
>>>>>>> +
>>>>>>> 
>>>>>>> Base64.encodeToString(sb.toString().getBytes("UTF-8"), 
>>>>>>> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+')
>>>>>>> +"\"}";
>>>>>>> 
>>>>>>> Basically I did a string replace on the Base64 encoded
>>>>>>> workflow using .replace('-', '+')
>>>>>>> 
>>>>>>> Then I tried uploading to the player and it worked. I
>>>>>>> haven't figured out what your app does with the
>>>>>>> response but the request was successful on the player.
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> 
>>>>>>> Ian
>>>>>>> 
>>>>>>> -----Original Message----- From: Larry Akah
>>>>>>> [mailto:larryakah@gmail.com] Sent: 07 July 2015 11:58 
>>>>>>> To: dev@taverna.incubator.apache.org Subject: Re: GSOC
>>>>>>> Taverna Mobile: Uploading workflows to the Taverna
>>>>>>> player
>>>>>>> 
>>>>>>> Hello, Wait, but i am trying to upload workflow id 34
>>>>>>> even with the '+' used and i still get the 'Internal
>>>>>>> Server Error'. This is the base64 encoded workflow:
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sb
nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlc
nNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVyb
jpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yP
SIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgY
m9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuL
mFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb
2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgI
DxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJb
WFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZ
T0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsI
iAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9I
nZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>>>>>>>>
>>>>>>>
>>>>>>>
>> 
This is the code am using to test the upload
>>>>>>> 
>>>>>>> String data = 
>>>>>>> "{\"document\":\"data:application/octet-stream;base64,"
>>>>>>> +
>>>>>>>> 
>>>>>>>> 
>>>>>>> "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zm
>>>>>>>
>>>>>>> 
wge
>>>>>>> G1 sb 
>>>>>>> nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxw
>>>>>>>
>>>>>>> 
aGE
>>>>>>> iI HZ 
>>>>>>> lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIG
>>>>>>>
>>>>>>> 
xza
>>>>>>> WQ 9I 
>>>>>>> nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05T
>>>>>>>
>>>>>>> 
MCI
>>>>>>> gY XV 
>>>>>>> 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ1
>>>>>>>
>>>>>>> 
0aG9yPSIiIHRpdGxlPSIiIC8+9Db
>>>>>>> 0aG9yPSIiIHRpdGxlPSIiIC8+25 
>>>>>>> 0aG9yPSIiIHRpdGxlPSIiIC8+zd 
>>>>>>> GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6
>>>>>>>
>>>>>>> 
Ly9
>>>>>>> 3d 3c
>>>>>>> 
>>>> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3Rhbn
Q+C
>>>>>>>
>>>> 
iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdl
>>>>>>> X2Z yb 21 
>>>>>>> fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbH
>>>>>>>
>>>>>>> 
dvc
>>>>>>> mt lc 
>>>>>>> nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nv
>>>>>>>
>>>>>>> 
nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+cj4
>>>>>>> nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI 
>>>>>>> nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA 
>>>>>>> 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZX
>>>>>>>
>>>>>>> 
Rfa
>>>>>>> W1 hZ 
>>>>>>> 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2Vf
>>>>>>>
>>>>>>> 
ZnJ
>>>>>>> vb V9 
>>>>>>> VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz
>>>>>>>
>>>>>>> 
4KP
>>>>>>> C9 zO nNjdWZsPgoKCg=="+"\"}";
>>>>>>>> String post = "{\"workflow\":"+data+"}";
>>>>>>>> 
>>>>>>>> System.out.println("BODY=>"+post); 
>>>>>>>> connection.setRequestMethod("POST");
>>>>>>>> 
>>>>>>>> connection.setRequestProperty("Authorization",
>>>>>>> basicAuth);
>>>>>>>> connection.setRequestProperty("Content-Type", 
>>>>>>>> "application/json");
>>>>>>>> 
>>>>>>>> connection.setRequestProperty("Content-Encoding",
>>>>>>> "UTF-8");
>>>>>>>> connection.setUseCaches (false); 
>>>>>>>> connection.setDoOutput(true); connection.connect();
>>>>>>>> //send request
>>>>>>>> 
>>>>>>>> DataOutputStream dos = new 
>>>>>>>> DataOutputStream(connection.getOutputStream());
>>>>>>>> 
>>>>>>>> dos.writeBytes(post);//write post data which is a
>>>>>>>> formatted json data representing body of workflow //
>>>>>>>> dos.writeChars(post); //
>>>>>>>> dos.write(post.getBytes("UTF-8")); //
>>>>>>>> dos.writeUTF(post);
>>>>>>>> 
>>>>>>>> dos.flush(); dos.close();
>>>>>>>> 
>>>>>>>> System.out.println("Post Response Code: 
>>>>>>>> "+connection.getResponseCode()); 
>>>>>>>> System.out.println("Post response message: 
>>>>>>>> "+connection.getResponseMessage()); 
>>>>>>>> connection.disconnect();
>>>>>>>> 
>>>>>>> 
>>>>>>> Cheers
>>>>>>> 
>>>>>>> 2015-07-07 11:45 GMT+01:00 Larry Akah
>>>>>>> <la...@gmail.com>:
>>>>>>> 
>>>>>>>> Ah, ok. Let me try some options out but i think the
>>>>>>>> former would require a new implementation of
>>>>>>>> android's base64 because i have tried all the
>>>>>>>> possible options and they all give
>> error.
>>>>>>>> 
>>>>>>>> Cheers
>>>>>>>> 
>>>>>>>> 2015-07-07 11:41 GMT+01:00 Ian Dunlop <
>>>> Ian.Dunlop@manchester.ac.uk>:
>>>>>>>> 
>>>>>>>>> Hello,
>>>>>>>>> 
>>>>>>>>> We think we have figured out the issue with the
>>>>>>>>> encoding. Java Base64 uses a '-' instead of a '+'
>>>>>>>>> when encoding. Command line in Linux and Ruby
>>>>>>>>> expect a '+'. When we converted the raw Base64
>>>>>>>>> encoded workflow from the android request and
>>>>>>>>> changed all
>>>> the '-'
>>>>>> characters to a '+'
>>>>>>> it works ok.
>>>>>>>>> So either we need to figure out how to tell Java to
>>>>>>>>> use '+' instead of
>>>>>>> '-'
>>>>>>>>> or we change the encoded workflow string using
>>>>>>>>> string replace before adding it to the request
>>>>>>>>> string.
>>>>>>>>> 
>>>>>>>>> Lots of thanks to Finn for helping me to debug
>>>>>>>>> this.
>>>>>>>>> 
>>>>>>>>> Cheers,
>>>>>>>>> 
>>>>>>>>> Ian
>>>>>>>>> 
>>>>>>>>> -----Original Message----- From: Larry Akah
>>>>>>>>> [mailto:larryakah@gmail.com] Sent: 07 July 2015
>>>>>>>>> 11:37 To: dev@taverna.incubator.apache.org Subject:
>>>>>>>>> Re: GSOC Taverna Mobile: Uploading workflows to
>>>>>>>>> the Taverna player
>>>>>>>>> 
>>>>>>>>> Is it possible that i get the body of the request
>>>>>>>>> that the player is actually receiving?
>>>>>>>>> 
>>>>>>>>> Cheers
>>>>>>>>> 
>>>>>>>>> 2015-07-07 11:36 GMT+01:00 Larry Akah
>>>>>>>>> <la...@gmail.com>:
>>>>>>>>> 
>>>>>>>>>> workflow id number 34 is the workflow i've been
>>>>>>>>>> working with
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 2015-07-07 10:27 GMT+01:00 Ian Dunlop 
>>>>>>>>>> <Ian.Dunlop@manchester.ac.uk
>>>>>>> :
>>>>>>>>>> 
>>>>>>>>>>> Hello,
>>>>>>>>>>> 
>>>>>>>>>>> It's hard to tell from the logs if the output
>>>>>>>>>>> relates to what you are doing, what workflow
>>>>>>>>>>> are you trying to upload. The logs are full of
>>>>>>>>>>> "parser error: PCDATA invalid Char value ".
>>>>>>>>>>> Maybe there are characters in it that the
>>>>>>>>>>> tavern player XML parser cannot read. Anyone
>>>>>>>>>>> else have any
>>>>>>>>> ideas.
>>>>>>>>>>> 
>>>>>>>>>>> Cheers,
>>>>>>>>>>> 
>>>>>>>>>>> Ian
>>>>>>>>>>> 
>>>>>>>>>>> -----Original Message----- From: Larry Akah
>>>>>>>>>>> [mailto:larryakah@gmail.com] Sent: 06 July 2015
>>>>>>>>>>> 17:52 To: dev@taverna.incubator.apache.org 
>>>>>>>>>>> Subject: Re: GSOC Taverna Mobile: Uploading
>>>>>>>>>>> workflows to the Taverna player
>>>>>>>>>>> 
>>>>>>>>>>> What do the server logs reveal from the recent
>>>>>>>>>>> requests just few moments ago? I could use some
>>>>>>>>>>> help from them.
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> Cheers
>>>>>>>>>>> 
>>>>>>>>>>> 2015-07-06 12:22 GMT+01:00 alaninmcr <
>>>> alaninmcr@googlemail.com>:
>>>>>>>>>>> 
>>>>>>>>>>>> On 06/07/2015 12:03, Ian Dunlop wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I just sent workflow 16 to the taverna
>>>>>>>>>>>>> player by base64 encoding it on the command
>>>>>>>>>>>>> line and using curl and it all worked ok.
>>>>>>>>>>>>> Here is the base64 version 
>>>>>>>>>>>>> https://dl.dropboxusercontent.com/u/4958764/wf16.base6
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
4 Maybe you need to ensure it is UTF-8 character set.
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Also that it is not broken into lines. That
>>>>>>>>>>>> file correctly keeps the base64 all in one
>>>>>>>>>>>> line. Some base64 methods will, by default,
>>>>>>>>>>>> break it into human-friendly lines which can 
>>>>>>>>>>>> be confusing for the reading
>>>>>>>>> system.
>>>>>>>>>>>> 
>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Ian
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Alan
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> -- *Akah Larry N.H*
>>>>>>>>>>> 
>>>>>>>>>>> *Lead Software Engineer @ GiftedMom* *Founder
>>>>>>>>>>> IceTeck Inc* *www.iceteck.com*
>>>>>>>>>>> 
>>>>>>>>>>> Developing technologies for emergence and
>>>>>>>>>>> sustainable
>>>>> development.
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- *Akah Larry N.H*
>>>>>>>>>> 
>>>>>>>>>> *Lead Software Engineer @ GiftedMom* *Founder
>>>>>>>>>> IceTeck Inc* *www.iceteck.com*
>>>>>>>>>> 
>>>>>>>>>> Developing technologies for emergence and
>>>>>>>>>> sustainable
>>>> development.
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -- *Akah Larry N.H*
>>>>>>>>> 
>>>>>>>>> *Lead Software Engineer @ GiftedMom* *Founder
>>>>>>>>> IceTeck Inc* *www.iceteck.com*
>>>>>>>>> 
>>>>>>>>> Developing technologies for emergence and
>>>>>>>>> sustainable
>>>> development.
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- *Akah Larry N.H*
>>>>>>>> 
>>>>>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck
>>>>>>>> Inc* *www.iceteck.com*
>>>>>>>> 
>>>>>>>> Developing technologies for emergence and
>>>>>>>> sustainable
>> development.
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- *Akah Larry N.H*
>>>>>>> 
>>>>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck
>>>>>>> Inc* *www.iceteck.com*
>>>>>>> 
>>>>>>> Developing technologies for emergence and sustainable
>>>>>>> development.
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- *Akah Larry N.H*
>>>>>> 
>>>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck
>>>>>> Inc* *www.iceteck.com*
>>>>>> 
>>>>>> Developing technologies for emergence and sustainable
>>>>>> development.
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> -- *Akah Larry N.H*
>>>>> 
>>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* 
>>>>> *www.iceteck.com*
>>>>> 
>>>>> Developing technologies for emergence and sustainable
>>>>> development.
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> -- *Akah Larry N.H*
>>>> 
>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* 
>>>> *www.iceteck.com*
>>>> 
>>>> Developing technologies for emergence and sustainable
>>>> development.
>>>> 
>>> 
>>> 
>>> 
>>> -- *Akah Larry N.H*
>>> 
>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* 
>>> *www.iceteck.com*
>>> 
>>> Developing technologies for emergence and sustainable
>>> development.
>>> 
>>> 
>> 
>> 
>> -- *Akah Larry N.H*
>> 
>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* 
>> *www.iceteck.com*
>> 
>> Developing technologies for emergence and sustainable
>> development.
>> 
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVnl3IAAoJEPK45GBX+Cy5bWgH+gPHSdLV/jVveE1vdy/hEVTi
ZbKHv9MtIeL3O/OhSZvTbJtTkMKP8hTRJN4FSS7rGaaVfiPFD5A+TEolT8Tnm+9o
5zDMy9n+luSKbNyX+my1JJvCeYyyOaBPClzHXMgeXrHRGyaf0bsj9l0mG+Z40IAA
j0hky0u3HrdO3AuAmZMhFuYxeX3h0kAiWPv32u5NdsBqhaAsj2EEEh9uHYvOdIAm
dyhLTdgIuhnCOnj2Wu1TWTWXmFP0Ax6yxFTQnGNmI36tEuod5YeAUGbzCH9AkcNg
fFgSzwMSBAsqFIgLLkCBy+uWDLtBCDO2G8NzBFucPseLxroVF52aMo5slyHuhdI=
=V6Mx
-----END PGP SIGNATURE-----

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Hello,
Workflow runs are now possible. Just grab the latest code from my
repository.
Details and history of the run will be coming up in next commits.

Cheers

2015-07-08 11:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Works ok for me with your code fragment:
> http://heater.cs.man.ac.uk:3000/workflows/12
>
> 07-08 10:54:03.023    2264-2325/mobile.taverna.apache.org.tavernamobile
> I/System.out﹕
> BODY=>{"workflow":{"document":"data:application/octet-stream;base64,PHdvcmtmbG93IHhtbG5zPSJodHRwOi8vdGF2ZXJuYS5zZi5uZXQvMjAwOC94bWwvdDJmbG93IiB2ZXJzaW9uPSIxIiBwcm9kdWNlZEJ5PSJ0YXZlcm5hLTIuMy4wIj48ZGF0YWZsb3cgaWQ9ImYzODgzZTBjLTRkYTQtNGQ2Yi1iYzE2LTBlMmNlYmFkNGY2NSIgcm9sZT0idG9wIj48bmFtZT5QYXRod2F5c2FuZEdlbmVhbm5vdGF0aW9uc2ZvclFUTHJlZ2lvbjwvbmFtZT48aW5wdXRQb3J0cz48cG9ydD48bmFtZT5jaHJvbW9zb21lX25hbWU8L25hbWU+PGRlcHRoPjA8L2RlcHRoPjxncmFudWxhckRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3JpcHRpb24iPiAgICAgICAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PGFubm90YXRpb25fY2hhaW4gZW5jb2Rpbmc9InhzdHJlYW0iPjxuZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGwgeG1sbnM9IiI+ICA8YW5ub3RhdGlvbkFzc2VydGlvbnM+ICAgIDxuZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgICAgIDxhbm5vdGF0aW9uQmVhbiBjbGFzcz0ibmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5hbm5vdGF0aW9uYmVhbnMuTWltZVR5cGUiPiAgICAgICAgPHRleHQ+dGV4dC9wbGFpbjwvdGV4dD4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvcnQ+PG5hbWU+c3RhcnRfcG9zaXRpb248L25hbWU+PGRlcHRoPjA8L2RlcHRoPjxncmFudWxhckRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLk1pbWVUeXBlIj4gICAgICAgIDx0ZXh0PnRleHQvcGxhaW48L3RleHQ+ICAgICAgPC9hbm5vdGF0aW9uQmVhbj4gICAgICA8ZGF0ZT4yMDExLTA0LTA1IDEwOjMzOjMzLjg1NiBCU1Q8L2RhdGU+ICAgICAgPGNyZWF0b3JzIC8+ICAgICAgPGN1cmF0aW9uRXZlbnRMaXN0IC8+ICAgIDwvbmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gIDwvYW5ub3RhdGlvbkFzc2VydGlvbnM+PC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGw+PC9hbm5vdGF0aW9uX2NoYWluPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3JpcHRpb24iPiAgICAgICAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvcnQ+PG5hbWU+ZW5kX3Bvc2l0aW9uPC9uYW1lPjxkZXB0aD4wPC9kZXB0aD48Z3JhbnVsYXJEZXB0aD4wPC9ncmFudWxhckRlcHRoPjxhbm5vdGF0aW9ucz48YW5ub3RhdGlvbl9jaGFpbiBlbmNvZGluZz0ieHN0cmVhbSI+PG5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbCB4bWxucz0iIj4gIDxhbm5vdGF0aW9uQXNzZXJ0aW9ucz4gICAgPG5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkFzc2VydGlvbkltcGw+ICAgICAgPGFubm90YXRpb25CZWFuIGNsYXNzPSJuZXQuc2YudGF
> 07-08 10:54:07.145    2264-2271/mobile.taverna.apache.org.tavernamobile
> W/art﹕ Suspending all threads took: 5.732ms
> 07-08 10:54:07.396    2264-2325/mobile.taverna.apache.org.tavernamobile
> I/System.out﹕ Post Response Code: 201
> 07-08 10:54:07.397    2264-2325/mobile.taverna.apache.org.tavernamobile
> I/System.out﹕ Post response message: Created
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 08 July 2015 11:36
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
> Please checkout this gist here:
> https://gist.github.com/larrytech7/957cc61a3bdd82e3e030
> Normally this is what should work, but i still can't get the desired
> result. I have checkout for missing or broken connections however, i still
> get no results. There maybe something am missing out on.
> Could you run yours once again so that i see the workflow on the player, i
> have deleted all the workflows previously uploaded.
>
> thanks
>
> 2015-07-08 11:05 GMT+01:00 Larry Akah <la...@gmail.com>:
>
> > ok, checking it out
> >
> > 2015-07-08 11:02 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> >> Hello,
> >>
> >> I only changed one tiny bit of your code in the
> >> WorkflowdetailsFragment class. Look at this gist:
> >>
> >> https://gist.github.com/ianwdunlop/2c3615e9094827fabd83
> >>
> >> You might be running into issues with the http connection closing
> >> during debug mode which I encountered yesterday.  It will cause a
> >> broken pipe exception. You may have to run the app as normal when
> >> testing this or maybe move your breakpoints to after the connection has
> sent the request.
> >>
> >> Cheers,
> >>
> >> Ian
> >>
> >> -----Original Message-----
> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> Sent: 08 July 2015 10:52
> >> To: dev@taverna.incubator.apache.org
> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> >> player
> >>
> >> Hello,
> >> I've done that but i still don't get any workflow created on the player.
> >> point me to the snippet that you have.
> >>
> >> Thanks
> >>
> >> 2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >>
> >> > Hello,
> >> >
> >> > It's just the line that encodes the workflow that I changed by
> >> > telling it to change all the '-' characters to a '+'
> >> >
> >> > String data = "{\"document\":\"data:application/octet-stream;base64,"
> >> > + Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> >> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> >> >
> >> > Cheers,
> >> >
> >> > Ian
> >> >
> >> > -----Original Message-----
> >> > From: Larry Akah [mailto:larryakah@gmail.com]
> >> > Sent: 07 July 2015 17:14
> >> > To: dev@taverna.incubator.apache.org
> >> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >> > Taverna player
> >> >
> >> > Hello,
> >> > Please can i have the complete code snippet that is working at the
> >> > time? i can't seem to find myself. is it that on my repo or
> >> > somewhere
> >> else?
> >> >
> >> > Thanks
> >> >
> >> > 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >> >
> >> > > Hello,
> >> > >
> >> > > I've tried uploading via the app and it all seems to be OK now. I
> >> > > get the response 201 created and you can see the workflows on the
> >> player.
> >> > > Not sure how you get the actual response content from the http
> >> > > connection though :) Now all you have to do is figure out how to
> >> > > actually pass in the inputs for the workflow and run it......
> >> > >
> >> > > Also, still not sure what I am logging into on the first screen -
> >> > > does it do anything. Anyway, not as important as getting an
> >> > > actual workflow run working so concentrate on that.
> >> > >
> >> > > Cheers,
> >> > >
> >> > > Ian
> >> > >
> >> > > -----Original Message-----
> >> > > From: Larry Akah [mailto:larryakah@gmail.com]
> >> > > Sent: 07 July 2015 12:25
> >> > > To: dev@taverna.incubator.apache.org
> >> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >> > > Taverna player
> >> > >
> >> > > ok, i will try that.
> >> > >
> >> > > Thanks
> >> > >
> >> > > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ian.Dunlop@manchester.ac.uk
> >:
> >> > >
> >> > > > Hello,
> >> > > >
> >> > > > I changed the encoding part to this:
> >> > > >
> >> > > > String data =
> >> "{\"document\":\"data:application/octet-stream;base64,"
> >> > > > +
> >> > > >
> >> > > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> >> > > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> >> > > >
> >> > > > Basically I did a string replace on the Base64 encoded workflow
> >> > > > using .replace('-', '+')
> >> > > >
> >> > > > Then I tried uploading to the player and it worked. I haven't
> >> > > > figured out what your app does with the response but the
> >> > > > request was successful on the player.
> >> > > >
> >> > > > Cheers,
> >> > > >
> >> > > > Ian
> >> > > >
> >> > > > -----Original Message-----
> >> > > > From: Larry Akah [mailto:larryakah@gmail.com]
> >> > > > Sent: 07 July 2015 11:58
> >> > > > To: dev@taverna.incubator.apache.org
> >> > > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >> > > > Taverna player
> >> > > >
> >> > > > Hello,
> >> > > > Wait, but i am trying to upload workflow id 34 even with the '+'
> >> > > > used and i still get the 'Internal Server Error'. This is the
> >> > > > base64 encoded
> >> > > > workflow:
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> >> > > > >
> >> > > >
> >> > > > This is the code am using to test the upload
> >> > > >
> >> > > >    String data =
> >> > > > "{\"document\":\"data:application/octet-stream;base64," +
> >> > > > >
> >> > > > >
> >> > > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zm
> >> > > > wge
> >> > > > G1
> >> > > > sb
> >> > > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxw
> >> > > > aGE
> >> > > > iI
> >> > > > HZ
> >> > > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIG
> >> > > > xza
> >> > > > WQ
> >> > > > 9I
> >> > > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05T
> >> > > > MCI
> >> > > > gY
> >> > > > XV
> >> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ1
> >> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+9Db
> >> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+25
> >> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
> >> > > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6
> >> > > > Ly9
> >> > > > 3d
> >> > > > 3c
> >> > > >
> >> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> >> > > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdl
> >> > > > X2Z
> >> > > > yb
> >> > > > 21
> >> > > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbH
> >> > > > dvc
> >> > > > mt
> >> > > > lc
> >> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nv
> >> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+cj4
> >> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI
> >> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
> >> > > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZX
> >> > > > Rfa
> >> > > > W1
> >> > > > hZ
> >> > > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2Vf
> >> > > > ZnJ
> >> > > > vb
> >> > > > V9
> >> > > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz
> >> > > > 4KP
> >> > > > C9
> >> > > > zO
> >> > > > nNjdWZsPgoKCg=="+"\"}";
> >> > > > >                 String post = "{\"workflow\":"+data+"}";
> >> > > > >
> >> > > > >                 System.out.println("BODY=>"+post);
> >> > > > >                 connection.setRequestMethod("POST");
> >> > > > >
> >> > > > > connection.setRequestProperty("Authorization",
> >> > > > basicAuth);
> >> > > > >                 connection.setRequestProperty("Content-Type",
> >> > > > > "application/json");
> >> > > > >
> >> > > > > connection.setRequestProperty("Content-Encoding",
> >> > > > "UTF-8");
> >> > > > >                 connection.setUseCaches (false);
> >> > > > >                 connection.setDoOutput(true);
> >> > > > >                 connection.connect(); //send request
> >> > > > >
> >> > > > >                 DataOutputStream dos = new
> >> > > > > DataOutputStream(connection.getOutputStream());
> >> > > > >
> >> > > > >                 dos.writeBytes(post);//write post data which
> >> > > > > is a formatted json data representing body of workflow
> >> > > > >               //  dos.writeChars(post);
> >> > > > >                // dos.write(post.getBytes("UTF-8"));
> >> > > > >                // dos.writeUTF(post);
> >> > > > >
> >> > > > >                 dos.flush();
> >> > > > >                 dos.close();
> >> > > > >
> >> > > > >                 System.out.println("Post Response Code:
> >> > > > > "+connection.getResponseCode());
> >> > > > >                 System.out.println("Post response message:
> >> > > > > "+connection.getResponseMessage());
> >> > > > >                 connection.disconnect();
> >> > > > >
> >> > > >
> >> > > > Cheers
> >> > > >
> >> > > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> >> > > >
> >> > > > > Ah, ok. Let me try some options out but i think the former
> >> > > > > would require a new implementation of android's base64
> >> > > > > because i have tried all the possible options and they all give
> error.
> >> > > > >
> >> > > > > Cheers
> >> > > > >
> >> > > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <
> >> Ian.Dunlop@manchester.ac.uk>:
> >> > > > >
> >> > > > >> Hello,
> >> > > > >>
> >> > > > >> We think we have figured out the issue with the encoding.
> >> > > > >> Java
> >> > > > >> Base64 uses a '-' instead of a '+' when encoding. Command
> >> > > > >> line in Linux and Ruby expect a '+'. When we converted the
> >> > > > >> raw
> >> > > > >> Base64 encoded workflow from the android request and changed
> >> > > > >> all
> >> the '-'
> >> > > characters to a '+'
> >> > > > it works ok.
> >> > > > >> So either we need to figure out how to tell Java to use '+'
> >> > > > >> instead of
> >> > > > '-'
> >> > > > >> or we change the encoded workflow string using string
> >> > > > >> replace before adding it to the request string.
> >> > > > >>
> >> > > > >> Lots of thanks to Finn for helping me to debug this.
> >> > > > >>
> >> > > > >> Cheers,
> >> > > > >>
> >> > > > >> Ian
> >> > > > >>
> >> > > > >> -----Original Message-----
> >> > > > >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> > > > >> Sent: 07 July 2015 11:37
> >> > > > >> To: dev@taverna.incubator.apache.org
> >> > > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >> > > > >> Taverna player
> >> > > > >>
> >> > > > >> Is it possible that i get the body of the request that the
> >> > > > >> player is actually receiving?
> >> > > > >>
> >> > > > >> Cheers
> >> > > > >>
> >> > > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> >> > > > >>
> >> > > > >> > workflow id number 34 is the workflow i've been working
> >> > > > >> > with
> >> > > > >> >
> >> > > > >> >
> >> > > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop
> >> > > > >> > <Ian.Dunlop@manchester.ac.uk
> >> > > >:
> >> > > > >> >
> >> > > > >> >> Hello,
> >> > > > >> >>
> >> > > > >> >> It's hard to tell from the logs if the output relates to
> >> > > > >> >> what you are doing, what workflow are you trying to upload.
> >> > > > >> >> The logs are full of "parser
> >> > > > >> >> error: PCDATA invalid Char value ". Maybe there are
> >> > > > >> >> characters in it that the tavern player XML parser cannot
> >> > > > >> >> read. Anyone else have any
> >> > > > >> ideas.
> >> > > > >> >>
> >> > > > >> >> Cheers,
> >> > > > >> >>
> >> > > > >> >> Ian
> >> > > > >> >>
> >> > > > >> >> -----Original Message-----
> >> > > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> > > > >> >> Sent: 06 July 2015 17:52
> >> > > > >> >> To: dev@taverna.incubator.apache.org
> >> > > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to
> >> > > > >> >> the Taverna player
> >> > > > >> >>
> >> > > > >> >> What do the server logs reveal from the recent requests
> >> > > > >> >> just few moments ago? I could use some help from them.
> >> > > > >> >>
> >> > > > >> >>
> >> > > > >> >> Cheers
> >> > > > >> >>
> >> > > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <
> >> alaninmcr@googlemail.com>:
> >> > > > >> >>
> >> > > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> >> > > > >> >> >
> >> > > > >> >> >> Hello,
> >> > > > >> >> >>
> >> > > > >> >> >> I just sent workflow 16 to the taverna player by
> >> > > > >> >> >> base64 encoding it on the command line and using curl
> >> > > > >> >> >> and it all worked ok. Here is the
> >> > > > >> >> >> base64 version
> >> > > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base6
> >> > > > >> >> >> 4 Maybe you need to ensure it is UTF-8 character set.
> >> > > > >> >> >>
> >> > > > >> >> >
> >> > > > >> >> > Also that it is not broken into lines. That file
> >> > > > >> >> > correctly keeps the
> >> > > > >> >> > base64 all in one line. Some base64 methods will, by
> >> > > > >> >> > default, break it into human-friendly lines which can
> >> > > > >> >> > be confusing for the reading
> >> > > > >> system.
> >> > > > >> >> >
> >> > > > >> >> >  Cheers,
> >> > > > >> >> >>
> >> > > > >> >> >> Ian
> >> > > > >> >> >>
> >> > > > >> >> >
> >> > > > >> >> > Alan
> >> > > > >> >> >
> >> > > > >> >>
> >> > > > >> >>
> >> > > > >> >>
> >> > > > >> >> --
> >> > > > >> >> *Akah Larry N.H*
> >> > > > >> >>
> >> > > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck
> >> > > > >> >> Inc*
> >> > > > >> >> *www.iceteck.com*
> >> > > > >> >>
> >> > > > >> >> Developing technologies for emergence and sustainable
> >> > development.
> >> > > > >> >>
> >> > > > >> >
> >> > > > >> >
> >> > > > >> >
> >> > > > >> > --
> >> > > > >> > *Akah Larry N.H*
> >> > > > >> >
> >> > > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > > > >> > *www.iceteck.com*
> >> > > > >> >
> >> > > > >> > Developing technologies for emergence and sustainable
> >> development.
> >> > > > >> >
> >> > > > >> >
> >> > > > >>
> >> > > > >>
> >> > > > >> --
> >> > > > >> *Akah Larry N.H*
> >> > > > >>
> >> > > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > > > >> *www.iceteck.com*
> >> > > > >>
> >> > > > >> Developing technologies for emergence and sustainable
> >> development.
> >> > > > >>
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > *Akah Larry N.H*
> >> > > > >
> >> > > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > > > > *www.iceteck.com*
> >> > > > >
> >> > > > > Developing technologies for emergence and sustainable
> development.
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > *Akah Larry N.H*
> >> > > >
> >> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > > > *www.iceteck.com*
> >> > > >
> >> > > > Developing technologies for emergence and sustainable development.
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > *Akah Larry N.H*
> >> > >
> >> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > > *www.iceteck.com*
> >> > >
> >> > > Developing technologies for emergence and sustainable development.
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > *Akah Larry N.H*
> >> >
> >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > *www.iceteck.com*
> >> >
> >> > Developing technologies for emergence and sustainable development.
> >> >
> >>
> >>
> >>
> >> --
> >> *Akah Larry N.H*
> >>
> >> *Lead Software Engineer @ GiftedMom*
> >> *Founder IceTeck Inc*
> >> *www.iceteck.com*
> >>
> >> Developing technologies for emergence and sustainable development.
> >>
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Works ok for me with your code fragment: http://heater.cs.man.ac.uk:3000/workflows/12

07-08 10:54:03.023    2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕ BODY=>{"workflow":{"document":"data:application/octet-stream;base64,PHdvcmtmbG93IHhtbG5zPSJodHRwOi8vdGF2ZXJuYS5zZi5uZXQvMjAwOC94bWwvdDJmbG93IiB2ZXJzaW9uPSIxIiBwcm9kdWNlZEJ5PSJ0YXZlcm5hLTIuMy4wIj48ZGF0YWZsb3cgaWQ9ImYzODgzZTBjLTRkYTQtNGQ2Yi1iYzE2LTBlMmNlYmFkNGY2NSIgcm9sZT0idG9wIj48bmFtZT5QYXRod2F5c2FuZEdlbmVhbm5vdGF0aW9uc2ZvclFUTHJlZ2lvbjwvbmFtZT48aW5wdXRQb3J0cz48cG9ydD48bmFtZT5jaHJvbW9zb21lX25hbWU8L25hbWU+PGRlcHRoPjA8L2RlcHRoPjxncmFudWxhckRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3JpcHRpb24iPiAgICAgICAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PGFubm90YXRpb25fY2hhaW4gZW5jb2Rpbmc9InhzdHJlYW0iPjxuZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGwgeG1sbnM9IiI+ICA8YW5ub3RhdGlvbkFzc2VydGlvbnM+ICAgIDxuZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgICAgIDxhbm5vdGF0aW9uQmVhbiBjbGFzcz0ibmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5hbm5vdGF0aW9uYmVhbnMuTWltZVR5cGUiPiAgICAgICAgPHRleHQ+dGV4dC9wbGFpbjwvdGV4dD4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvcnQ+PG5hbWU+c3RhcnRfcG9zaXRpb248L25hbWU+PGRlcHRoPjA8L2RlcHRoPjxncmFudWxhckRlcHRoPjA8L2dyYW51bGFyRGVwdGg+PGFubm90YXRpb25zPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLk1pbWVUeXBlIj4gICAgICAgIDx0ZXh0PnRleHQvcGxhaW48L3RleHQ+ICAgICAgPC9hbm5vdGF0aW9uQmVhbj4gICAgICA8ZGF0ZT4yMDExLTA0LTA1IDEwOjMzOjMzLjg1NiBCU1Q8L2RhdGU+ICAgICAgPGNyZWF0b3JzIC8+ICAgICAgPGN1cmF0aW9uRXZlbnRMaXN0IC8+ICAgIDwvbmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gIDwvYW5ub3RhdGlvbkFzc2VydGlvbnM+PC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25DaGFpbkltcGw+PC9hbm5vdGF0aW9uX2NoYWluPjxhbm5vdGF0aW9uX2NoYWluIGVuY29kaW5nPSJ4c3RyZWFtIj48bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQ2hhaW5JbXBsIHhtbG5zPSIiPiAgPGFubm90YXRpb25Bc3NlcnRpb25zPiAgICA8bmV0LnNmLnRhdmVybmEudDIuYW5ub3RhdGlvbi5Bbm5vdGF0aW9uQXNzZXJ0aW9uSW1wbD4gICAgICA8YW5ub3RhdGlvbkJlYW4gY2xhc3M9Im5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uYW5ub3RhdGlvbmJlYW5zLkZyZWVUZXh0RGVzY3JpcHRpb24iPiAgICAgICAgPHRleHQgLz4gICAgICA8L2Fubm90YXRpb25CZWFuPiAgICAgIDxkYXRlPjIwMTEtMDQtMDUgMTA6MzM6MzMuODU2IEJTVDwvZGF0ZT4gICAgICA8Y3JlYXRvcnMgLz4gICAgICA8Y3VyYXRpb25FdmVudExpc3QgLz4gICAgPC9uZXQuc2YudGF2ZXJuYS50Mi5hbm5vdGF0aW9uLkFubm90YXRpb25Bc3NlcnRpb25JbXBsPiAgPC9hbm5vdGF0aW9uQXNzZXJ0aW9ucz48L25ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbD48L2Fubm90YXRpb25fY2hhaW4+PC9hbm5vdGF0aW9ucz48L3BvcnQ+PHBvcnQ+PG5hbWU+ZW5kX3Bvc2l0aW9uPC9uYW1lPjxkZXB0aD4wPC9kZXB0aD48Z3JhbnVsYXJEZXB0aD4wPC9ncmFudWxhckRlcHRoPjxhbm5vdGF0aW9ucz48YW5ub3RhdGlvbl9jaGFpbiBlbmNvZGluZz0ieHN0cmVhbSI+PG5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkNoYWluSW1wbCB4bWxucz0iIj4gIDxhbm5vdGF0aW9uQXNzZXJ0aW9ucz4gICAgPG5ldC5zZi50YXZlcm5hLnQyLmFubm90YXRpb24uQW5ub3RhdGlvbkFzc2VydGlvbkltcGw+ICAgICAgPGFubm90YXRpb25CZWFuIGNsYXNzPSJuZXQuc2YudGF
07-08 10:54:07.145    2264-2271/mobile.taverna.apache.org.tavernamobile W/art﹕ Suspending all threads took: 5.732ms
07-08 10:54:07.396    2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕ Post Response Code: 201
07-08 10:54:07.397    2264-2325/mobile.taverna.apache.org.tavernamobile I/System.out﹕ Post response message: Created

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 08 July 2015 11:36
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,
Please checkout this gist here:
https://gist.github.com/larrytech7/957cc61a3bdd82e3e030
Normally this is what should work, but i still can't get the desired result. I have checkout for missing or broken connections however, i still get no results. There maybe something am missing out on.
Could you run yours once again so that i see the workflow on the player, i have deleted all the workflows previously uploaded.

thanks

2015-07-08 11:05 GMT+01:00 Larry Akah <la...@gmail.com>:

> ok, checking it out
>
> 2015-07-08 11:02 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> I only changed one tiny bit of your code in the 
>> WorkflowdetailsFragment class. Look at this gist:
>>
>> https://gist.github.com/ianwdunlop/2c3615e9094827fabd83
>>
>> You might be running into issues with the http connection closing 
>> during debug mode which I encountered yesterday.  It will cause a 
>> broken pipe exception. You may have to run the app as normal when 
>> testing this or maybe move your breakpoints to after the connection has sent the request.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 08 July 2015 10:52
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
>> player
>>
>> Hello,
>> I've done that but i still don't get any workflow created on the player.
>> point me to the snippet that you have.
>>
>> Thanks
>>
>> 2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>> > Hello,
>> >
>> > It's just the line that encodes the workflow that I changed by 
>> > telling it to change all the '-' characters to a '+'
>> >
>> > String data = "{\"document\":\"data:application/octet-stream;base64,"
>> > + Base64.encodeToString(sb.toString().getBytes("UTF-8"),
>> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>> >
>> > Cheers,
>> >
>> > Ian
>> >
>> > -----Original Message-----
>> > From: Larry Akah [mailto:larryakah@gmail.com]
>> > Sent: 07 July 2015 17:14
>> > To: dev@taverna.incubator.apache.org
>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>> > Taverna player
>> >
>> > Hello,
>> > Please can i have the complete code snippet that is working at the 
>> > time? i can't seem to find myself. is it that on my repo or 
>> > somewhere
>> else?
>> >
>> > Thanks
>> >
>> > 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> >
>> > > Hello,
>> > >
>> > > I've tried uploading via the app and it all seems to be OK now. I 
>> > > get the response 201 created and you can see the workflows on the
>> player.
>> > > Not sure how you get the actual response content from the http 
>> > > connection though :) Now all you have to do is figure out how to 
>> > > actually pass in the inputs for the workflow and run it......
>> > >
>> > > Also, still not sure what I am logging into on the first screen - 
>> > > does it do anything. Anyway, not as important as getting an 
>> > > actual workflow run working so concentrate on that.
>> > >
>> > > Cheers,
>> > >
>> > > Ian
>> > >
>> > > -----Original Message-----
>> > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > Sent: 07 July 2015 12:25
>> > > To: dev@taverna.incubator.apache.org
>> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>> > > Taverna player
>> > >
>> > > ok, i will try that.
>> > >
>> > > Thanks
>> > >
>> > > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> > >
>> > > > Hello,
>> > > >
>> > > > I changed the encoding part to this:
>> > > >
>> > > > String data =
>> "{\"document\":\"data:application/octet-stream;base64,"
>> > > > +
>> > > >
>> > > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
>> > > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>> > > >
>> > > > Basically I did a string replace on the Base64 encoded workflow 
>> > > > using .replace('-', '+')
>> > > >
>> > > > Then I tried uploading to the player and it worked. I haven't 
>> > > > figured out what your app does with the response but the 
>> > > > request was successful on the player.
>> > > >
>> > > > Cheers,
>> > > >
>> > > > Ian
>> > > >
>> > > > -----Original Message-----
>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > Sent: 07 July 2015 11:58
>> > > > To: dev@taverna.incubator.apache.org
>> > > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>> > > > Taverna player
>> > > >
>> > > > Hello,
>> > > > Wait, but i am trying to upload workflow id 34 even with the '+'
>> > > > used and i still get the 'Internal Server Error'. This is the
>> > > > base64 encoded
>> > > > workflow:
>> > > >
>> > > >
>> > > >
>> > >
>> >
>> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>> > > > >
>> > > >
>> > > > This is the code am using to test the upload
>> > > >
>> > > >    String data =
>> > > > "{\"document\":\"data:application/octet-stream;base64," +
>> > > > >
>> > > > >
>> > > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zm
>> > > > wge
>> > > > G1
>> > > > sb
>> > > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxw
>> > > > aGE
>> > > > iI
>> > > > HZ
>> > > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIG
>> > > > xza
>> > > > WQ
>> > > > 9I
>> > > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05T
>> > > > MCI
>> > > > gY
>> > > > XV
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ1
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+9Db
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+25
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
>> > > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6
>> > > > Ly9
>> > > > 3d
>> > > > 3c
>> > > >
>> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
>> > > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdl
>> > > > X2Z
>> > > > yb
>> > > > 21
>> > > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbH
>> > > > dvc
>> > > > mt
>> > > > lc
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nv
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+cj4
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
>> > > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZX
>> > > > Rfa
>> > > > W1
>> > > > hZ
>> > > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2Vf
>> > > > ZnJ
>> > > > vb
>> > > > V9
>> > > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz
>> > > > 4KP
>> > > > C9
>> > > > zO
>> > > > nNjdWZsPgoKCg=="+"\"}";
>> > > > >                 String post = "{\"workflow\":"+data+"}";
>> > > > >
>> > > > >                 System.out.println("BODY=>"+post);
>> > > > >                 connection.setRequestMethod("POST");
>> > > > >                 
>> > > > > connection.setRequestProperty("Authorization",
>> > > > basicAuth);
>> > > > >                 connection.setRequestProperty("Content-Type",
>> > > > > "application/json");
>> > > > >
>> > > > > connection.setRequestProperty("Content-Encoding",
>> > > > "UTF-8");
>> > > > >                 connection.setUseCaches (false);
>> > > > >                 connection.setDoOutput(true);
>> > > > >                 connection.connect(); //send request
>> > > > >
>> > > > >                 DataOutputStream dos = new 
>> > > > > DataOutputStream(connection.getOutputStream());
>> > > > >
>> > > > >                 dos.writeBytes(post);//write post data which 
>> > > > > is a formatted json data representing body of workflow
>> > > > >               //  dos.writeChars(post);
>> > > > >                // dos.write(post.getBytes("UTF-8"));
>> > > > >                // dos.writeUTF(post);
>> > > > >
>> > > > >                 dos.flush();
>> > > > >                 dos.close();
>> > > > >
>> > > > >                 System.out.println("Post Response Code:
>> > > > > "+connection.getResponseCode());
>> > > > >                 System.out.println("Post response message:
>> > > > > "+connection.getResponseMessage());
>> > > > >                 connection.disconnect();
>> > > > >
>> > > >
>> > > > Cheers
>> > > >
>> > > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
>> > > >
>> > > > > Ah, ok. Let me try some options out but i think the former 
>> > > > > would require a new implementation of android's base64 
>> > > > > because i have tried all the possible options and they all give error.
>> > > > >
>> > > > > Cheers
>> > > > >
>> > > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <
>> Ian.Dunlop@manchester.ac.uk>:
>> > > > >
>> > > > >> Hello,
>> > > > >>
>> > > > >> We think we have figured out the issue with the encoding. 
>> > > > >> Java
>> > > > >> Base64 uses a '-' instead of a '+' when encoding. Command 
>> > > > >> line in Linux and Ruby expect a '+'. When we converted the 
>> > > > >> raw
>> > > > >> Base64 encoded workflow from the android request and changed 
>> > > > >> all
>> the '-'
>> > > characters to a '+'
>> > > > it works ok.
>> > > > >> So either we need to figure out how to tell Java to use '+'
>> > > > >> instead of
>> > > > '-'
>> > > > >> or we change the encoded workflow string using string 
>> > > > >> replace before adding it to the request string.
>> > > > >>
>> > > > >> Lots of thanks to Finn for helping me to debug this.
>> > > > >>
>> > > > >> Cheers,
>> > > > >>
>> > > > >> Ian
>> > > > >>
>> > > > >> -----Original Message-----
>> > > > >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > >> Sent: 07 July 2015 11:37
>> > > > >> To: dev@taverna.incubator.apache.org
>> > > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>> > > > >> Taverna player
>> > > > >>
>> > > > >> Is it possible that i get the body of the request that the 
>> > > > >> player is actually receiving?
>> > > > >>
>> > > > >> Cheers
>> > > > >>
>> > > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>> > > > >>
>> > > > >> > workflow id number 34 is the workflow i've been working 
>> > > > >> > with
>> > > > >> >
>> > > > >> >
>> > > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop 
>> > > > >> > <Ian.Dunlop@manchester.ac.uk
>> > > >:
>> > > > >> >
>> > > > >> >> Hello,
>> > > > >> >>
>> > > > >> >> It's hard to tell from the logs if the output relates to 
>> > > > >> >> what you are doing, what workflow are you trying to upload.
>> > > > >> >> The logs are full of "parser
>> > > > >> >> error: PCDATA invalid Char value ". Maybe there are 
>> > > > >> >> characters in it that the tavern player XML parser cannot 
>> > > > >> >> read. Anyone else have any
>> > > > >> ideas.
>> > > > >> >>
>> > > > >> >> Cheers,
>> > > > >> >>
>> > > > >> >> Ian
>> > > > >> >>
>> > > > >> >> -----Original Message-----
>> > > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > >> >> Sent: 06 July 2015 17:52
>> > > > >> >> To: dev@taverna.incubator.apache.org
>> > > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to 
>> > > > >> >> the Taverna player
>> > > > >> >>
>> > > > >> >> What do the server logs reveal from the recent requests 
>> > > > >> >> just few moments ago? I could use some help from them.
>> > > > >> >>
>> > > > >> >>
>> > > > >> >> Cheers
>> > > > >> >>
>> > > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <
>> alaninmcr@googlemail.com>:
>> > > > >> >>
>> > > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> > > > >> >> >
>> > > > >> >> >> Hello,
>> > > > >> >> >>
>> > > > >> >> >> I just sent workflow 16 to the taverna player by 
>> > > > >> >> >> base64 encoding it on the command line and using curl 
>> > > > >> >> >> and it all worked ok. Here is the
>> > > > >> >> >> base64 version
>> > > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base6
>> > > > >> >> >> 4 Maybe you need to ensure it is UTF-8 character set.
>> > > > >> >> >>
>> > > > >> >> >
>> > > > >> >> > Also that it is not broken into lines. That file 
>> > > > >> >> > correctly keeps the
>> > > > >> >> > base64 all in one line. Some base64 methods will, by 
>> > > > >> >> > default, break it into human-friendly lines which can 
>> > > > >> >> > be confusing for the reading
>> > > > >> system.
>> > > > >> >> >
>> > > > >> >> >  Cheers,
>> > > > >> >> >>
>> > > > >> >> >> Ian
>> > > > >> >> >>
>> > > > >> >> >
>> > > > >> >> > Alan
>> > > > >> >> >
>> > > > >> >>
>> > > > >> >>
>> > > > >> >>
>> > > > >> >> --
>> > > > >> >> *Akah Larry N.H*
>> > > > >> >>
>> > > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck 
>> > > > >> >> Inc*
>> > > > >> >> *www.iceteck.com*
>> > > > >> >>
>> > > > >> >> Developing technologies for emergence and sustainable
>> > development.
>> > > > >> >>
>> > > > >> >
>> > > > >> >
>> > > > >> >
>> > > > >> > --
>> > > > >> > *Akah Larry N.H*
>> > > > >> >
>> > > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >> > *www.iceteck.com*
>> > > > >> >
>> > > > >> > Developing technologies for emergence and sustainable
>> development.
>> > > > >> >
>> > > > >> >
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> *Akah Larry N.H*
>> > > > >>
>> > > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >> *www.iceteck.com*
>> > > > >>
>> > > > >> Developing technologies for emergence and sustainable
>> development.
>> > > > >>
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > *Akah Larry N.H*
>> > > > >
>> > > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > > *www.iceteck.com*
>> > > > >
>> > > > > Developing technologies for emergence and sustainable development.
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > *Akah Larry N.H*
>> > > >
>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > *www.iceteck.com*
>> > > >
>> > > > Developing technologies for emergence and sustainable development.
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > *Akah Larry N.H*
>> > >
>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > *www.iceteck.com*
>> > >
>> > > Developing technologies for emergence and sustainable development.
>> > >
>> >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Hello,
Please checkout this gist here:
https://gist.github.com/larrytech7/957cc61a3bdd82e3e030
Normally this is what should work, but i still can't get the desired
result. I have checkout for missing or broken connections however, i still
get no results. There maybe something am missing out on.
Could you run yours once again so that i see the workflow on the player, i
have deleted all the workflows previously uploaded.

thanks

2015-07-08 11:05 GMT+01:00 Larry Akah <la...@gmail.com>:

> ok, checking it out
>
> 2015-07-08 11:02 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> I only changed one tiny bit of your code in the WorkflowdetailsFragment
>> class. Look at this gist:
>>
>> https://gist.github.com/ianwdunlop/2c3615e9094827fabd83
>>
>> You might be running into issues with the http connection closing during
>> debug mode which I encountered yesterday.  It will cause a broken pipe
>> exception. You may have to run the app as normal when testing this or maybe
>> move your breakpoints to after the connection has sent the request.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 08 July 2015 10:52
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> player
>>
>> Hello,
>> I've done that but i still don't get any workflow created on the player.
>> point me to the snippet that you have.
>>
>> Thanks
>>
>> 2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>> > Hello,
>> >
>> > It's just the line that encodes the workflow that I changed by telling
>> > it to change all the '-' characters to a '+'
>> >
>> > String data = "{\"document\":\"data:application/octet-stream;base64,"
>> > + Base64.encodeToString(sb.toString().getBytes("UTF-8"),
>> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>> >
>> > Cheers,
>> >
>> > Ian
>> >
>> > -----Original Message-----
>> > From: Larry Akah [mailto:larryakah@gmail.com]
>> > Sent: 07 July 2015 17:14
>> > To: dev@taverna.incubator.apache.org
>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > player
>> >
>> > Hello,
>> > Please can i have the complete code snippet that is working at the
>> > time? i can't seem to find myself. is it that on my repo or somewhere
>> else?
>> >
>> > Thanks
>> >
>> > 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> >
>> > > Hello,
>> > >
>> > > I've tried uploading via the app and it all seems to be OK now. I
>> > > get the response 201 created and you can see the workflows on the
>> player.
>> > > Not sure how you get the actual response content from the http
>> > > connection though :) Now all you have to do is figure out how to
>> > > actually pass in the inputs for the workflow and run it......
>> > >
>> > > Also, still not sure what I am logging into on the first screen -
>> > > does it do anything. Anyway, not as important as getting an actual
>> > > workflow run working so concentrate on that.
>> > >
>> > > Cheers,
>> > >
>> > > Ian
>> > >
>> > > -----Original Message-----
>> > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > Sent: 07 July 2015 12:25
>> > > To: dev@taverna.incubator.apache.org
>> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > > player
>> > >
>> > > ok, i will try that.
>> > >
>> > > Thanks
>> > >
>> > > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> > >
>> > > > Hello,
>> > > >
>> > > > I changed the encoding part to this:
>> > > >
>> > > > String data =
>> "{\"document\":\"data:application/octet-stream;base64,"
>> > > > +
>> > > >
>> > > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
>> > > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>> > > >
>> > > > Basically I did a string replace on the Base64 encoded workflow
>> > > > using .replace('-', '+')
>> > > >
>> > > > Then I tried uploading to the player and it worked. I haven't
>> > > > figured out what your app does with the response but the request
>> > > > was successful on the player.
>> > > >
>> > > > Cheers,
>> > > >
>> > > > Ian
>> > > >
>> > > > -----Original Message-----
>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > Sent: 07 July 2015 11:58
>> > > > To: dev@taverna.incubator.apache.org
>> > > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
>> > > > Taverna player
>> > > >
>> > > > Hello,
>> > > > Wait, but i am trying to upload workflow id 34 even with the '+'
>> > > > used and i still get the 'Internal Server Error'. This is the
>> > > > base64 encoded
>> > > > workflow:
>> > > >
>> > > >
>> > > >
>> > >
>> >
>> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>> > > > >
>> > > >
>> > > > This is the code am using to test the upload
>> > > >
>> > > >    String data =
>> > > > "{\"document\":\"data:application/octet-stream;base64," +
>> > > > >
>> > > > >
>> > > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zmwge
>> > > > G1
>> > > > sb
>> > > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGE
>> > > > iI
>> > > > HZ
>> > > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxza
>> > > > WQ
>> > > > 9I
>> > > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCI
>> > > > gY
>> > > > XV
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+25
>> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
>> > > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly9
>> > > > 3d
>> > > > 3c
>> > > >
>> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
>> > > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Z
>> > > > yb
>> > > > 21
>> > > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvc
>> > > > mt
>> > > > lc
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI
>> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
>> > > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfa
>> > > > W1
>> > > > hZ
>> > > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJ
>> > > > vb
>> > > > V9
>> > > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KP
>> > > > C9
>> > > > zO
>> > > > nNjdWZsPgoKCg=="+"\"}";
>> > > > >                 String post = "{\"workflow\":"+data+"}";
>> > > > >
>> > > > >                 System.out.println("BODY=>"+post);
>> > > > >                 connection.setRequestMethod("POST");
>> > > > >                 connection.setRequestProperty("Authorization",
>> > > > basicAuth);
>> > > > >                 connection.setRequestProperty("Content-Type",
>> > > > > "application/json");
>> > > > >
>> > > > > connection.setRequestProperty("Content-Encoding",
>> > > > "UTF-8");
>> > > > >                 connection.setUseCaches (false);
>> > > > >                 connection.setDoOutput(true);
>> > > > >                 connection.connect(); //send request
>> > > > >
>> > > > >                 DataOutputStream dos = new
>> > > > > DataOutputStream(connection.getOutputStream());
>> > > > >
>> > > > >                 dos.writeBytes(post);//write post data which is
>> > > > > a formatted json data representing body of workflow
>> > > > >               //  dos.writeChars(post);
>> > > > >                // dos.write(post.getBytes("UTF-8"));
>> > > > >                // dos.writeUTF(post);
>> > > > >
>> > > > >                 dos.flush();
>> > > > >                 dos.close();
>> > > > >
>> > > > >                 System.out.println("Post Response Code:
>> > > > > "+connection.getResponseCode());
>> > > > >                 System.out.println("Post response message:
>> > > > > "+connection.getResponseMessage());
>> > > > >                 connection.disconnect();
>> > > > >
>> > > >
>> > > > Cheers
>> > > >
>> > > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
>> > > >
>> > > > > Ah, ok. Let me try some options out but i think the former would
>> > > > > require a new implementation of android's base64 because i have
>> > > > > tried all the possible options and they all give error.
>> > > > >
>> > > > > Cheers
>> > > > >
>> > > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <
>> Ian.Dunlop@manchester.ac.uk>:
>> > > > >
>> > > > >> Hello,
>> > > > >>
>> > > > >> We think we have figured out the issue with the encoding. Java
>> > > > >> Base64 uses a '-' instead of a '+' when encoding. Command line
>> > > > >> in Linux and Ruby expect a '+'. When we converted the raw
>> > > > >> Base64 encoded workflow from the android request and changed all
>> the '-'
>> > > characters to a '+'
>> > > > it works ok.
>> > > > >> So either we need to figure out how to tell Java to use '+'
>> > > > >> instead of
>> > > > '-'
>> > > > >> or we change the encoded workflow string using string replace
>> > > > >> before adding it to the request string.
>> > > > >>
>> > > > >> Lots of thanks to Finn for helping me to debug this.
>> > > > >>
>> > > > >> Cheers,
>> > > > >>
>> > > > >> Ian
>> > > > >>
>> > > > >> -----Original Message-----
>> > > > >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > >> Sent: 07 July 2015 11:37
>> > > > >> To: dev@taverna.incubator.apache.org
>> > > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
>> > > > >> Taverna player
>> > > > >>
>> > > > >> Is it possible that i get the body of the request that the
>> > > > >> player is actually receiving?
>> > > > >>
>> > > > >> Cheers
>> > > > >>
>> > > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>> > > > >>
>> > > > >> > workflow id number 34 is the workflow i've been working with
>> > > > >> >
>> > > > >> >
>> > > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop
>> > > > >> > <Ian.Dunlop@manchester.ac.uk
>> > > >:
>> > > > >> >
>> > > > >> >> Hello,
>> > > > >> >>
>> > > > >> >> It's hard to tell from the logs if the output relates to
>> > > > >> >> what you are doing, what workflow are you trying to upload.
>> > > > >> >> The logs are full of "parser
>> > > > >> >> error: PCDATA invalid Char value ". Maybe there are
>> > > > >> >> characters in it that the tavern player XML parser cannot
>> > > > >> >> read. Anyone else have any
>> > > > >> ideas.
>> > > > >> >>
>> > > > >> >> Cheers,
>> > > > >> >>
>> > > > >> >> Ian
>> > > > >> >>
>> > > > >> >> -----Original Message-----
>> > > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > >> >> Sent: 06 July 2015 17:52
>> > > > >> >> To: dev@taverna.incubator.apache.org
>> > > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
>> > > > >> >> Taverna player
>> > > > >> >>
>> > > > >> >> What do the server logs reveal from the recent requests just
>> > > > >> >> few moments ago? I could use some help from them.
>> > > > >> >>
>> > > > >> >>
>> > > > >> >> Cheers
>> > > > >> >>
>> > > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <
>> alaninmcr@googlemail.com>:
>> > > > >> >>
>> > > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> > > > >> >> >
>> > > > >> >> >> Hello,
>> > > > >> >> >>
>> > > > >> >> >> I just sent workflow 16 to the taverna player by base64
>> > > > >> >> >> encoding it on the command line and using curl and it all
>> > > > >> >> >> worked ok. Here is the
>> > > > >> >> >> base64 version
>> > > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64
>> > > > >> >> >> Maybe you need to ensure it is UTF-8 character set.
>> > > > >> >> >>
>> > > > >> >> >
>> > > > >> >> > Also that it is not broken into lines. That file correctly
>> > > > >> >> > keeps the
>> > > > >> >> > base64 all in one line. Some base64 methods will, by
>> > > > >> >> > default, break it into human-friendly lines which can be
>> > > > >> >> > confusing for the reading
>> > > > >> system.
>> > > > >> >> >
>> > > > >> >> >  Cheers,
>> > > > >> >> >>
>> > > > >> >> >> Ian
>> > > > >> >> >>
>> > > > >> >> >
>> > > > >> >> > Alan
>> > > > >> >> >
>> > > > >> >>
>> > > > >> >>
>> > > > >> >>
>> > > > >> >> --
>> > > > >> >> *Akah Larry N.H*
>> > > > >> >>
>> > > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >> >> *www.iceteck.com*
>> > > > >> >>
>> > > > >> >> Developing technologies for emergence and sustainable
>> > development.
>> > > > >> >>
>> > > > >> >
>> > > > >> >
>> > > > >> >
>> > > > >> > --
>> > > > >> > *Akah Larry N.H*
>> > > > >> >
>> > > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >> > *www.iceteck.com*
>> > > > >> >
>> > > > >> > Developing technologies for emergence and sustainable
>> development.
>> > > > >> >
>> > > > >> >
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> *Akah Larry N.H*
>> > > > >>
>> > > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >> *www.iceteck.com*
>> > > > >>
>> > > > >> Developing technologies for emergence and sustainable
>> development.
>> > > > >>
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > *Akah Larry N.H*
>> > > > >
>> > > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > > *www.iceteck.com*
>> > > > >
>> > > > > Developing technologies for emergence and sustainable development.
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > *Akah Larry N.H*
>> > > >
>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > *www.iceteck.com*
>> > > >
>> > > > Developing technologies for emergence and sustainable development.
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > *Akah Larry N.H*
>> > >
>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > *www.iceteck.com*
>> > >
>> > > Developing technologies for emergence and sustainable development.
>> > >
>> >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom*
>> > *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
ok, checking it out

2015-07-08 11:02 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I only changed one tiny bit of your code in the WorkflowdetailsFragment
> class. Look at this gist:
>
> https://gist.github.com/ianwdunlop/2c3615e9094827fabd83
>
> You might be running into issues with the http connection closing during
> debug mode which I encountered yesterday.  It will cause a broken pipe
> exception. You may have to run the app as normal when testing this or maybe
> move your breakpoints to after the connection has sent the request.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 08 July 2015 10:52
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
> I've done that but i still don't get any workflow created on the player.
> point me to the snippet that you have.
>
> Thanks
>
> 2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > It's just the line that encodes the workflow that I changed by telling
> > it to change all the '-' characters to a '+'
> >
> > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > + Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 07 July 2015 17:14
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > Hello,
> > Please can i have the complete code snippet that is working at the
> > time? i can't seem to find myself. is it that on my repo or somewhere
> else?
> >
> > Thanks
> >
> > 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > I've tried uploading via the app and it all seems to be OK now. I
> > > get the response 201 created and you can see the workflows on the
> player.
> > > Not sure how you get the actual response content from the http
> > > connection though :) Now all you have to do is figure out how to
> > > actually pass in the inputs for the workflow and run it......
> > >
> > > Also, still not sure what I am logging into on the first screen -
> > > does it do anything. Anyway, not as important as getting an actual
> > > workflow run working so concentrate on that.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > -----Original Message-----
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 07 July 2015 12:25
> > > To: dev@taverna.incubator.apache.org
> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > > player
> > >
> > > ok, i will try that.
> > >
> > > Thanks
> > >
> > > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > >
> > > > Hello,
> > > >
> > > > I changed the encoding part to this:
> > > >
> > > > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > > > +
> > > >
> > > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> > > >
> > > > Basically I did a string replace on the Base64 encoded workflow
> > > > using .replace('-', '+')
> > > >
> > > > Then I tried uploading to the player and it worked. I haven't
> > > > figured out what your app does with the response but the request
> > > > was successful on the player.
> > > >
> > > > Cheers,
> > > >
> > > > Ian
> > > >
> > > > -----Original Message-----
> > > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > > Sent: 07 July 2015 11:58
> > > > To: dev@taverna.incubator.apache.org
> > > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > > > Taverna player
> > > >
> > > > Hello,
> > > > Wait, but i am trying to upload workflow id 34 even with the '+'
> > > > used and i still get the 'Internal Server Error'. This is the
> > > > base64 encoded
> > > > workflow:
> > > >
> > > >
> > > >
> > >
> >
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> > > > >
> > > >
> > > > This is the code am using to test the upload
> > > >
> > > >    String data =
> > > > "{\"document\":\"data:application/octet-stream;base64," +
> > > > >
> > > > >
> > > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zmwge
> > > > G1
> > > > sb
> > > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGE
> > > > iI
> > > > HZ
> > > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxza
> > > > WQ
> > > > 9I
> > > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCI
> > > > gY
> > > > XV
> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db
> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+25
> > > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
> > > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly9
> > > > 3d
> > > > 3c
> > > >
> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> > > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Z
> > > > yb
> > > > 21
> > > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvc
> > > > mt
> > > > lc
> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4
> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI
> > > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
> > > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfa
> > > > W1
> > > > hZ
> > > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJ
> > > > vb
> > > > V9
> > > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KP
> > > > C9
> > > > zO
> > > > nNjdWZsPgoKCg=="+"\"}";
> > > > >                 String post = "{\"workflow\":"+data+"}";
> > > > >
> > > > >                 System.out.println("BODY=>"+post);
> > > > >                 connection.setRequestMethod("POST");
> > > > >                 connection.setRequestProperty("Authorization",
> > > > basicAuth);
> > > > >                 connection.setRequestProperty("Content-Type",
> > > > > "application/json");
> > > > >
> > > > > connection.setRequestProperty("Content-Encoding",
> > > > "UTF-8");
> > > > >                 connection.setUseCaches (false);
> > > > >                 connection.setDoOutput(true);
> > > > >                 connection.connect(); //send request
> > > > >
> > > > >                 DataOutputStream dos = new
> > > > > DataOutputStream(connection.getOutputStream());
> > > > >
> > > > >                 dos.writeBytes(post);//write post data which is
> > > > > a formatted json data representing body of workflow
> > > > >               //  dos.writeChars(post);
> > > > >                // dos.write(post.getBytes("UTF-8"));
> > > > >                // dos.writeUTF(post);
> > > > >
> > > > >                 dos.flush();
> > > > >                 dos.close();
> > > > >
> > > > >                 System.out.println("Post Response Code:
> > > > > "+connection.getResponseCode());
> > > > >                 System.out.println("Post response message:
> > > > > "+connection.getResponseMessage());
> > > > >                 connection.disconnect();
> > > > >
> > > >
> > > > Cheers
> > > >
> > > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> > > >
> > > > > Ah, ok. Let me try some options out but i think the former would
> > > > > require a new implementation of android's base64 because i have
> > > > > tried all the possible options and they all give error.
> > > > >
> > > > > Cheers
> > > > >
> > > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ian.Dunlop@manchester.ac.uk
> >:
> > > > >
> > > > >> Hello,
> > > > >>
> > > > >> We think we have figured out the issue with the encoding. Java
> > > > >> Base64 uses a '-' instead of a '+' when encoding. Command line
> > > > >> in Linux and Ruby expect a '+'. When we converted the raw
> > > > >> Base64 encoded workflow from the android request and changed all
> the '-'
> > > characters to a '+'
> > > > it works ok.
> > > > >> So either we need to figure out how to tell Java to use '+'
> > > > >> instead of
> > > > '-'
> > > > >> or we change the encoded workflow string using string replace
> > > > >> before adding it to the request string.
> > > > >>
> > > > >> Lots of thanks to Finn for helping me to debug this.
> > > > >>
> > > > >> Cheers,
> > > > >>
> > > > >> Ian
> > > > >>
> > > > >> -----Original Message-----
> > > > >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > > >> Sent: 07 July 2015 11:37
> > > > >> To: dev@taverna.incubator.apache.org
> > > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > > > >> Taverna player
> > > > >>
> > > > >> Is it possible that i get the body of the request that the
> > > > >> player is actually receiving?
> > > > >>
> > > > >> Cheers
> > > > >>
> > > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> > > > >>
> > > > >> > workflow id number 34 is the workflow i've been working with
> > > > >> >
> > > > >> >
> > > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop
> > > > >> > <Ian.Dunlop@manchester.ac.uk
> > > >:
> > > > >> >
> > > > >> >> Hello,
> > > > >> >>
> > > > >> >> It's hard to tell from the logs if the output relates to
> > > > >> >> what you are doing, what workflow are you trying to upload.
> > > > >> >> The logs are full of "parser
> > > > >> >> error: PCDATA invalid Char value ". Maybe there are
> > > > >> >> characters in it that the tavern player XML parser cannot
> > > > >> >> read. Anyone else have any
> > > > >> ideas.
> > > > >> >>
> > > > >> >> Cheers,
> > > > >> >>
> > > > >> >> Ian
> > > > >> >>
> > > > >> >> -----Original Message-----
> > > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > > >> >> Sent: 06 July 2015 17:52
> > > > >> >> To: dev@taverna.incubator.apache.org
> > > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > > > >> >> Taverna player
> > > > >> >>
> > > > >> >> What do the server logs reveal from the recent requests just
> > > > >> >> few moments ago? I could use some help from them.
> > > > >> >>
> > > > >> >>
> > > > >> >> Cheers
> > > > >> >>
> > > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <alaninmcr@googlemail.com
> >:
> > > > >> >>
> > > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> > > > >> >> >
> > > > >> >> >> Hello,
> > > > >> >> >>
> > > > >> >> >> I just sent workflow 16 to the taverna player by base64
> > > > >> >> >> encoding it on the command line and using curl and it all
> > > > >> >> >> worked ok. Here is the
> > > > >> >> >> base64 version
> > > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64
> > > > >> >> >> Maybe you need to ensure it is UTF-8 character set.
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > Also that it is not broken into lines. That file correctly
> > > > >> >> > keeps the
> > > > >> >> > base64 all in one line. Some base64 methods will, by
> > > > >> >> > default, break it into human-friendly lines which can be
> > > > >> >> > confusing for the reading
> > > > >> system.
> > > > >> >> >
> > > > >> >> >  Cheers,
> > > > >> >> >>
> > > > >> >> >> Ian
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > Alan
> > > > >> >> >
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >> --
> > > > >> >> *Akah Larry N.H*
> > > > >> >>
> > > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > >> >> *www.iceteck.com*
> > > > >> >>
> > > > >> >> Developing technologies for emergence and sustainable
> > development.
> > > > >> >>
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > --
> > > > >> > *Akah Larry N.H*
> > > > >> >
> > > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > >> > *www.iceteck.com*
> > > > >> >
> > > > >> > Developing technologies for emergence and sustainable
> development.
> > > > >> >
> > > > >> >
> > > > >>
> > > > >>
> > > > >> --
> > > > >> *Akah Larry N.H*
> > > > >>
> > > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > >> *www.iceteck.com*
> > > > >>
> > > > >> Developing technologies for emergence and sustainable development.
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *Akah Larry N.H*
> > > > >
> > > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > > *www.iceteck.com*
> > > > >
> > > > > Developing technologies for emergence and sustainable development.
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > *Akah Larry N.H*
> > > >
> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > *www.iceteck.com*
> > > >
> > > > Developing technologies for emergence and sustainable development.
> > > >
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I only changed one tiny bit of your code in the WorkflowdetailsFragment class. Look at this gist:

https://gist.github.com/ianwdunlop/2c3615e9094827fabd83

You might be running into issues with the http connection closing during debug mode which I encountered yesterday.  It will cause a broken pipe exception. You may have to run the app as normal when testing this or maybe move your breakpoints to after the connection has sent the request.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 08 July 2015 10:52
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,
I've done that but i still don't get any workflow created on the player.
point me to the snippet that you have.

Thanks

2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> It's just the line that encodes the workflow that I changed by telling 
> it to change all the '-' characters to a '+'
>
> String data = "{\"document\":\"data:application/octet-stream;base64," 
> + Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 17:14
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Hello,
> Please can i have the complete code snippet that is working at the 
> time? i can't seem to find myself. is it that on my repo or somewhere else?
>
> Thanks
>
> 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I've tried uploading via the app and it all seems to be OK now. I 
> > get the response 201 created and you can see the workflows on the player.
> > Not sure how you get the actual response content from the http 
> > connection though :) Now all you have to do is figure out how to 
> > actually pass in the inputs for the workflow and run it......
> >
> > Also, still not sure what I am logging into on the first screen - 
> > does it do anything. Anyway, not as important as getting an actual 
> > workflow run working so concentrate on that.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 07 July 2015 12:25
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> > player
> >
> > ok, i will try that.
> >
> > Thanks
> >
> > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > I changed the encoding part to this:
> > >
> > > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > > +
> > >
> > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> > >
> > > Basically I did a string replace on the Base64 encoded workflow 
> > > using .replace('-', '+')
> > >
> > > Then I tried uploading to the player and it worked. I haven't 
> > > figured out what your app does with the response but the request 
> > > was successful on the player.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > -----Original Message-----
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 07 July 2015 11:58
> > > To: dev@taverna.incubator.apache.org
> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> > > Taverna player
> > >
> > > Hello,
> > > Wait, but i am trying to upload workflow id 34 even with the '+'
> > > used and i still get the 'Internal Server Error'. This is the 
> > > base64 encoded
> > > workflow:
> > >
> > >
> > >
> >
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> > > >
> > >
> > > This is the code am using to test the upload
> > >
> > >    String data =
> > > "{\"document\":\"data:application/octet-stream;base64," +
> > > >
> > > >
> > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1Zmwge
> > > G1
> > > sb
> > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGE
> > > iI
> > > HZ
> > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxza
> > > WQ
> > > 9I
> > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCI
> > > gY
> > > XV
> > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db
> > > 0aG9yPSIiIHRpdGxlPSIiIC8+25
> > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
> > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly9
> > > 3d
> > > 3c
> > > uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Z
> > > yb
> > > 21
> > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvc
> > > mt
> > > lc
> > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4
> > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+KI
> > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
> > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfa
> > > W1
> > > hZ
> > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJ
> > > vb
> > > V9
> > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KP
> > > C9
> > > zO
> > > nNjdWZsPgoKCg=="+"\"}";
> > > >                 String post = "{\"workflow\":"+data+"}";
> > > >
> > > >                 System.out.println("BODY=>"+post);
> > > >                 connection.setRequestMethod("POST");
> > > >                 connection.setRequestProperty("Authorization",
> > > basicAuth);
> > > >                 connection.setRequestProperty("Content-Type",
> > > > "application/json");
> > > >                 
> > > > connection.setRequestProperty("Content-Encoding",
> > > "UTF-8");
> > > >                 connection.setUseCaches (false);
> > > >                 connection.setDoOutput(true);
> > > >                 connection.connect(); //send request
> > > >
> > > >                 DataOutputStream dos = new 
> > > > DataOutputStream(connection.getOutputStream());
> > > >
> > > >                 dos.writeBytes(post);//write post data which is 
> > > > a formatted json data representing body of workflow
> > > >               //  dos.writeChars(post);
> > > >                // dos.write(post.getBytes("UTF-8"));
> > > >                // dos.writeUTF(post);
> > > >
> > > >                 dos.flush();
> > > >                 dos.close();
> > > >
> > > >                 System.out.println("Post Response Code:
> > > > "+connection.getResponseCode());
> > > >                 System.out.println("Post response message:
> > > > "+connection.getResponseMessage());
> > > >                 connection.disconnect();
> > > >
> > >
> > > Cheers
> > >
> > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> > >
> > > > Ah, ok. Let me try some options out but i think the former would 
> > > > require a new implementation of android's base64 because i have 
> > > > tried all the possible options and they all give error.
> > > >
> > > > Cheers
> > > >
> > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > > >
> > > >> Hello,
> > > >>
> > > >> We think we have figured out the issue with the encoding. Java
> > > >> Base64 uses a '-' instead of a '+' when encoding. Command line 
> > > >> in Linux and Ruby expect a '+'. When we converted the raw 
> > > >> Base64 encoded workflow from the android request and changed all the '-'
> > characters to a '+'
> > > it works ok.
> > > >> So either we need to figure out how to tell Java to use '+'
> > > >> instead of
> > > '-'
> > > >> or we change the encoded workflow string using string replace 
> > > >> before adding it to the request string.
> > > >>
> > > >> Lots of thanks to Finn for helping me to debug this.
> > > >>
> > > >> Cheers,
> > > >>
> > > >> Ian
> > > >>
> > > >> -----Original Message-----
> > > >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > >> Sent: 07 July 2015 11:37
> > > >> To: dev@taverna.incubator.apache.org
> > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> > > >> Taverna player
> > > >>
> > > >> Is it possible that i get the body of the request that the 
> > > >> player is actually receiving?
> > > >>
> > > >> Cheers
> > > >>
> > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> > > >>
> > > >> > workflow id number 34 is the workflow i've been working with
> > > >> >
> > > >> >
> > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop 
> > > >> > <Ian.Dunlop@manchester.ac.uk
> > >:
> > > >> >
> > > >> >> Hello,
> > > >> >>
> > > >> >> It's hard to tell from the logs if the output relates to 
> > > >> >> what you are doing, what workflow are you trying to upload. 
> > > >> >> The logs are full of "parser
> > > >> >> error: PCDATA invalid Char value ". Maybe there are 
> > > >> >> characters in it that the tavern player XML parser cannot 
> > > >> >> read. Anyone else have any
> > > >> ideas.
> > > >> >>
> > > >> >> Cheers,
> > > >> >>
> > > >> >> Ian
> > > >> >>
> > > >> >> -----Original Message-----
> > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > >> >> Sent: 06 July 2015 17:52
> > > >> >> To: dev@taverna.incubator.apache.org
> > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> > > >> >> Taverna player
> > > >> >>
> > > >> >> What do the server logs reveal from the recent requests just 
> > > >> >> few moments ago? I could use some help from them.
> > > >> >>
> > > >> >>
> > > >> >> Cheers
> > > >> >>
> > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> > > >> >>
> > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> > > >> >> >
> > > >> >> >> Hello,
> > > >> >> >>
> > > >> >> >> I just sent workflow 16 to the taverna player by base64 
> > > >> >> >> encoding it on the command line and using curl and it all 
> > > >> >> >> worked ok. Here is the
> > > >> >> >> base64 version
> > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64
> > > >> >> >> Maybe you need to ensure it is UTF-8 character set.
> > > >> >> >>
> > > >> >> >
> > > >> >> > Also that it is not broken into lines. That file correctly 
> > > >> >> > keeps the
> > > >> >> > base64 all in one line. Some base64 methods will, by 
> > > >> >> > default, break it into human-friendly lines which can be 
> > > >> >> > confusing for the reading
> > > >> system.
> > > >> >> >
> > > >> >> >  Cheers,
> > > >> >> >>
> > > >> >> >> Ian
> > > >> >> >>
> > > >> >> >
> > > >> >> > Alan
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> *Akah Larry N.H*
> > > >> >>
> > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> >> *www.iceteck.com*
> > > >> >>
> > > >> >> Developing technologies for emergence and sustainable
> development.
> > > >> >>
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > *Akah Larry N.H*
> > > >> >
> > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> > *www.iceteck.com*
> > > >> >
> > > >> > Developing technologies for emergence and sustainable development.
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> *Akah Larry N.H*
> > > >>
> > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> *www.iceteck.com*
> > > >>
> > > >> Developing technologies for emergence and sustainable development.
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > *Akah Larry N.H*
> > > >
> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > *www.iceteck.com*
> > > >
> > > > Developing technologies for emergence and sustainable development.
> > > >
> > > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Hello,
I've done that but i still don't get any workflow created on the player.
point me to the snippet that you have.

Thanks

2015-07-08 10:29 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> It's just the line that encodes the workflow that I changed by telling it
> to change all the '-' characters to a '+'
>
> String data = "{\"document\":\"data:application/octet-stream;base64," +
> Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 17:14
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
> Please can i have the complete code snippet that is working at the time? i
> can't seem to find myself. is it that on my repo or somewhere else?
>
> Thanks
>
> 2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I've tried uploading via the app and it all seems to be OK now. I get
> > the response 201 created and you can see the workflows on the player.
> > Not sure how you get the actual response content from the http
> > connection though :) Now all you have to do is figure out how to
> > actually pass in the inputs for the workflow and run it......
> >
> > Also, still not sure what I am logging into on the first screen - does
> > it do anything. Anyway, not as important as getting an actual workflow
> > run working so concentrate on that.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 07 July 2015 12:25
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > ok, i will try that.
> >
> > Thanks
> >
> > 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > I changed the encoding part to this:
> > >
> > > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > > +
> > >
> > > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> > >
> > > Basically I did a string replace on the Base64 encoded workflow
> > > using .replace('-', '+')
> > >
> > > Then I tried uploading to the player and it worked. I haven't
> > > figured out what your app does with the response but the request was
> > > successful on the player.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > -----Original Message-----
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 07 July 2015 11:58
> > > To: dev@taverna.incubator.apache.org
> > > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > > player
> > >
> > > Hello,
> > > Wait, but i am trying to upload workflow id 34 even with the '+'
> > > used and i still get the 'Internal Server Error'. This is the base64
> > > encoded
> > > workflow:
> > >
> > >
> > >
> >
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> > > >
> > >
> > > This is the code am using to test the upload
> > >
> > >    String data =
> > > "{\"document\":\"data:application/octet-stream;base64," +
> > > >
> > > >
> > > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1
> > > sb
> > > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiI
> > > HZ
> > > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ
> > > 9I
> > > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgY
> > > XV
> > > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25
> > > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
> > > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d
> > > 3c
> > > uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> > > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb
> > > 21
> > > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmt
> > > lc
> > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KI
> > > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
> > > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1
> > > hZ
> > > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvb
> > > V9
> > > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9
> > > zO
> > > nNjdWZsPgoKCg=="+"\"}";
> > > >                 String post = "{\"workflow\":"+data+"}";
> > > >
> > > >                 System.out.println("BODY=>"+post);
> > > >                 connection.setRequestMethod("POST");
> > > >                 connection.setRequestProperty("Authorization",
> > > basicAuth);
> > > >                 connection.setRequestProperty("Content-Type",
> > > > "application/json");
> > > >                 connection.setRequestProperty("Content-Encoding",
> > > "UTF-8");
> > > >                 connection.setUseCaches (false);
> > > >                 connection.setDoOutput(true);
> > > >                 connection.connect(); //send request
> > > >
> > > >                 DataOutputStream dos = new
> > > > DataOutputStream(connection.getOutputStream());
> > > >
> > > >                 dos.writeBytes(post);//write post data which is a
> > > > formatted json data representing body of workflow
> > > >               //  dos.writeChars(post);
> > > >                // dos.write(post.getBytes("UTF-8"));
> > > >                // dos.writeUTF(post);
> > > >
> > > >                 dos.flush();
> > > >                 dos.close();
> > > >
> > > >                 System.out.println("Post Response Code:
> > > > "+connection.getResponseCode());
> > > >                 System.out.println("Post response message:
> > > > "+connection.getResponseMessage());
> > > >                 connection.disconnect();
> > > >
> > >
> > > Cheers
> > >
> > > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> > >
> > > > Ah, ok. Let me try some options out but i think the former would
> > > > require a new implementation of android's base64 because i have
> > > > tried all the possible options and they all give error.
> > > >
> > > > Cheers
> > > >
> > > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > > >
> > > >> Hello,
> > > >>
> > > >> We think we have figured out the issue with the encoding. Java
> > > >> Base64 uses a '-' instead of a '+' when encoding. Command line in
> > > >> Linux and Ruby expect a '+'. When we converted the raw Base64
> > > >> encoded workflow from the android request and changed all the '-'
> > characters to a '+'
> > > it works ok.
> > > >> So either we need to figure out how to tell Java to use '+'
> > > >> instead of
> > > '-'
> > > >> or we change the encoded workflow string using string replace
> > > >> before adding it to the request string.
> > > >>
> > > >> Lots of thanks to Finn for helping me to debug this.
> > > >>
> > > >> Cheers,
> > > >>
> > > >> Ian
> > > >>
> > > >> -----Original Message-----
> > > >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > >> Sent: 07 July 2015 11:37
> > > >> To: dev@taverna.incubator.apache.org
> > > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > > >> Taverna player
> > > >>
> > > >> Is it possible that i get the body of the request that the player
> > > >> is actually receiving?
> > > >>
> > > >> Cheers
> > > >>
> > > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> > > >>
> > > >> > workflow id number 34 is the workflow i've been working with
> > > >> >
> > > >> >
> > > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop
> > > >> > <Ian.Dunlop@manchester.ac.uk
> > >:
> > > >> >
> > > >> >> Hello,
> > > >> >>
> > > >> >> It's hard to tell from the logs if the output relates to what
> > > >> >> you are doing, what workflow are you trying to upload. The
> > > >> >> logs are full of "parser
> > > >> >> error: PCDATA invalid Char value ". Maybe there are characters
> > > >> >> in it that the tavern player XML parser cannot read. Anyone
> > > >> >> else have any
> > > >> ideas.
> > > >> >>
> > > >> >> Cheers,
> > > >> >>
> > > >> >> Ian
> > > >> >>
> > > >> >> -----Original Message-----
> > > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> > > >> >> Sent: 06 July 2015 17:52
> > > >> >> To: dev@taverna.incubator.apache.org
> > > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > > >> >> Taverna player
> > > >> >>
> > > >> >> What do the server logs reveal from the recent requests just
> > > >> >> few moments ago? I could use some help from them.
> > > >> >>
> > > >> >>
> > > >> >> Cheers
> > > >> >>
> > > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> > > >> >>
> > > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> > > >> >> >
> > > >> >> >> Hello,
> > > >> >> >>
> > > >> >> >> I just sent workflow 16 to the taverna player by base64
> > > >> >> >> encoding it on the command line and using curl and it all
> > > >> >> >> worked ok. Here is the
> > > >> >> >> base64 version
> > > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64
> > > >> >> >> Maybe you need to ensure it is UTF-8 character set.
> > > >> >> >>
> > > >> >> >
> > > >> >> > Also that it is not broken into lines. That file correctly
> > > >> >> > keeps the
> > > >> >> > base64 all in one line. Some base64 methods will, by
> > > >> >> > default, break it into human-friendly lines which can be
> > > >> >> > confusing for the reading
> > > >> system.
> > > >> >> >
> > > >> >> >  Cheers,
> > > >> >> >>
> > > >> >> >> Ian
> > > >> >> >>
> > > >> >> >
> > > >> >> > Alan
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> *Akah Larry N.H*
> > > >> >>
> > > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> >> *www.iceteck.com*
> > > >> >>
> > > >> >> Developing technologies for emergence and sustainable
> development.
> > > >> >>
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > *Akah Larry N.H*
> > > >> >
> > > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> > *www.iceteck.com*
> > > >> >
> > > >> > Developing technologies for emergence and sustainable development.
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> *Akah Larry N.H*
> > > >>
> > > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >> *www.iceteck.com*
> > > >>
> > > >> Developing technologies for emergence and sustainable development.
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > *Akah Larry N.H*
> > > >
> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > *www.iceteck.com*
> > > >
> > > > Developing technologies for emergence and sustainable development.
> > > >
> > > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

It's just the line that encodes the workflow that I changed by telling it to change all the '-' characters to a '+'

String data = "{\"document\":\"data:application/octet-stream;base64," + Base64.encodeToString(sb.toString().getBytes("UTF-8"), Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 07 July 2015 17:14
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,
Please can i have the complete code snippet that is working at the time? i can't seem to find myself. is it that on my repo or somewhere else?

Thanks

2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I've tried uploading via the app and it all seems to be OK now. I get 
> the response 201 created and you can see the workflows on the player. 
> Not sure how you get the actual response content from the http 
> connection though :) Now all you have to do is figure out how to 
> actually pass in the inputs for the workflow and run it......
>
> Also, still not sure what I am logging into on the first screen - does 
> it do anything. Anyway, not as important as getting an actual workflow 
> run working so concentrate on that.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 12:25
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> ok, i will try that.
>
> Thanks
>
> 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I changed the encoding part to this:
> >
> > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > +
> >
> > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> >
> > Basically I did a string replace on the Base64 encoded workflow 
> > using .replace('-', '+')
> >
> > Then I tried uploading to the player and it worked. I haven't 
> > figured out what your app does with the response but the request was 
> > successful on the player.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 07 July 2015 11:58
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> > player
> >
> > Hello,
> > Wait, but i am trying to upload workflow id 34 even with the '+' 
> > used and i still get the 'Internal Server Error'. This is the base64 
> > encoded
> > workflow:
> >
> >
> >
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> > >
> >
> > This is the code am using to test the upload
> >
> >    String data =
> > "{\"document\":\"data:application/octet-stream;base64," +
> > >
> > >
> > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1
> > sb 
> > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiI
> > HZ 
> > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ
> > 9I 
> > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgY
> > XV
> > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25
> > 0aG9yPSIiIHRpdGxlPSIiIC8+zd
> > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d
> > 3c
> > uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb
> > 21 
> > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmt
> > lc
> > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KI
> > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CA
> > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1
> > hZ
> > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvb
> > V9 
> > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9
> > zO
> > nNjdWZsPgoKCg=="+"\"}";
> > >                 String post = "{\"workflow\":"+data+"}";
> > >
> > >                 System.out.println("BODY=>"+post);
> > >                 connection.setRequestMethod("POST");
> > >                 connection.setRequestProperty("Authorization",
> > basicAuth);
> > >                 connection.setRequestProperty("Content-Type",
> > > "application/json");
> > >                 connection.setRequestProperty("Content-Encoding",
> > "UTF-8");
> > >                 connection.setUseCaches (false);
> > >                 connection.setDoOutput(true);
> > >                 connection.connect(); //send request
> > >
> > >                 DataOutputStream dos = new 
> > > DataOutputStream(connection.getOutputStream());
> > >
> > >                 dos.writeBytes(post);//write post data which is a 
> > > formatted json data representing body of workflow
> > >               //  dos.writeChars(post);
> > >                // dos.write(post.getBytes("UTF-8"));
> > >                // dos.writeUTF(post);
> > >
> > >                 dos.flush();
> > >                 dos.close();
> > >
> > >                 System.out.println("Post Response Code:
> > > "+connection.getResponseCode());
> > >                 System.out.println("Post response message:
> > > "+connection.getResponseMessage());
> > >                 connection.disconnect();
> > >
> >
> > Cheers
> >
> > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> >
> > > Ah, ok. Let me try some options out but i think the former would 
> > > require a new implementation of android's base64 because i have 
> > > tried all the possible options and they all give error.
> > >
> > > Cheers
> > >
> > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > >
> > >> Hello,
> > >>
> > >> We think we have figured out the issue with the encoding. Java
> > >> Base64 uses a '-' instead of a '+' when encoding. Command line in 
> > >> Linux and Ruby expect a '+'. When we converted the raw Base64 
> > >> encoded workflow from the android request and changed all the '-'
> characters to a '+'
> > it works ok.
> > >> So either we need to figure out how to tell Java to use '+' 
> > >> instead of
> > '-'
> > >> or we change the encoded workflow string using string replace 
> > >> before adding it to the request string.
> > >>
> > >> Lots of thanks to Finn for helping me to debug this.
> > >>
> > >> Cheers,
> > >>
> > >> Ian
> > >>
> > >> -----Original Message-----
> > >> From: Larry Akah [mailto:larryakah@gmail.com]
> > >> Sent: 07 July 2015 11:37
> > >> To: dev@taverna.incubator.apache.org
> > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> > >> Taverna player
> > >>
> > >> Is it possible that i get the body of the request that the player 
> > >> is actually receiving?
> > >>
> > >> Cheers
> > >>
> > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> > >>
> > >> > workflow id number 34 is the workflow i've been working with
> > >> >
> > >> >
> > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop 
> > >> > <Ian.Dunlop@manchester.ac.uk
> >:
> > >> >
> > >> >> Hello,
> > >> >>
> > >> >> It's hard to tell from the logs if the output relates to what 
> > >> >> you are doing, what workflow are you trying to upload. The 
> > >> >> logs are full of "parser
> > >> >> error: PCDATA invalid Char value ". Maybe there are characters 
> > >> >> in it that the tavern player XML parser cannot read. Anyone 
> > >> >> else have any
> > >> ideas.
> > >> >>
> > >> >> Cheers,
> > >> >>
> > >> >> Ian
> > >> >>
> > >> >> -----Original Message-----
> > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> > >> >> Sent: 06 July 2015 17:52
> > >> >> To: dev@taverna.incubator.apache.org
> > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> > >> >> Taverna player
> > >> >>
> > >> >> What do the server logs reveal from the recent requests just 
> > >> >> few moments ago? I could use some help from them.
> > >> >>
> > >> >>
> > >> >> Cheers
> > >> >>
> > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> > >> >>
> > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> > >> >> >
> > >> >> >> Hello,
> > >> >> >>
> > >> >> >> I just sent workflow 16 to the taverna player by base64 
> > >> >> >> encoding it on the command line and using curl and it all 
> > >> >> >> worked ok. Here is the
> > >> >> >> base64 version
> > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 
> > >> >> >> Maybe you need to ensure it is UTF-8 character set.
> > >> >> >>
> > >> >> >
> > >> >> > Also that it is not broken into lines. That file correctly 
> > >> >> > keeps the
> > >> >> > base64 all in one line. Some base64 methods will, by 
> > >> >> > default, break it into human-friendly lines which can be 
> > >> >> > confusing for the reading
> > >> system.
> > >> >> >
> > >> >> >  Cheers,
> > >> >> >>
> > >> >> >> Ian
> > >> >> >>
> > >> >> >
> > >> >> > Alan
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> *Akah Larry N.H*
> > >> >>
> > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> >> *www.iceteck.com*
> > >> >>
> > >> >> Developing technologies for emergence and sustainable development.
> > >> >>
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > *Akah Larry N.H*
> > >> >
> > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> > *www.iceteck.com*
> > >> >
> > >> > Developing technologies for emergence and sustainable development.
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> *Akah Larry N.H*
> > >>
> > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> *www.iceteck.com*
> > >>
> > >> Developing technologies for emergence and sustainable development.
> > >>
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> > >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Hello,
Please can i have the complete code snippet that is working at the time? i
can't seem to find myself. is it that on my repo or somewhere else?

Thanks

2015-07-07 14:34 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I've tried uploading via the app and it all seems to be OK now. I get the
> response 201 created and you can see the workflows on the player. Not sure
> how you get the actual response content from the http connection though :)
> Now all you have to do is figure out how to actually pass in the inputs
> for the workflow and run it......
>
> Also, still not sure what I am logging into on the first screen - does it
> do anything. Anyway, not as important as getting an actual workflow run
> working so concentrate on that.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 12:25
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> ok, i will try that.
>
> Thanks
>
> 2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I changed the encoding part to this:
> >
> > String data = "{\"document\":\"data:application/octet-stream;base64,"
> > +
> >
> > Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> > Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
> >
> > Basically I did a string replace on the Base64 encoded workflow using
> > .replace('-', '+')
> >
> > Then I tried uploading to the player and it worked. I haven't figured
> > out what your app does with the response but the request was
> > successful on the player.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 07 July 2015 11:58
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > Hello,
> > Wait, but i am trying to upload workflow id 34 even with the '+' used
> > and i still get the 'Internal Server Error'. This is the base64
> > encoded
> > workflow:
> >
> >
> >
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> > >
> >
> > This is the code am using to test the upload
> >
> >    String data =
> > "{\"document\":\"data:application/octet-stream;base64," +
> > >
> > >
> > "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sb
> > nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZ
> > lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9I
> > nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV
> > 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zd
> > GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3c
> > uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> > iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21
> > fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlc
> > nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA
> > 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ
> > 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9
> > VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zO
> > nNjdWZsPgoKCg=="+"\"}";
> > >                 String post = "{\"workflow\":"+data+"}";
> > >
> > >                 System.out.println("BODY=>"+post);
> > >                 connection.setRequestMethod("POST");
> > >                 connection.setRequestProperty("Authorization",
> > basicAuth);
> > >                 connection.setRequestProperty("Content-Type",
> > > "application/json");
> > >                 connection.setRequestProperty("Content-Encoding",
> > "UTF-8");
> > >                 connection.setUseCaches (false);
> > >                 connection.setDoOutput(true);
> > >                 connection.connect(); //send request
> > >
> > >                 DataOutputStream dos = new
> > > DataOutputStream(connection.getOutputStream());
> > >
> > >                 dos.writeBytes(post);//write post data which is a
> > > formatted json data representing body of workflow
> > >               //  dos.writeChars(post);
> > >                // dos.write(post.getBytes("UTF-8"));
> > >                // dos.writeUTF(post);
> > >
> > >                 dos.flush();
> > >                 dos.close();
> > >
> > >                 System.out.println("Post Response Code:
> > > "+connection.getResponseCode());
> > >                 System.out.println("Post response message:
> > > "+connection.getResponseMessage());
> > >                 connection.disconnect();
> > >
> >
> > Cheers
> >
> > 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
> >
> > > Ah, ok. Let me try some options out but i think the former would
> > > require a new implementation of android's base64 because i have
> > > tried all the possible options and they all give error.
> > >
> > > Cheers
> > >
> > > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > >
> > >> Hello,
> > >>
> > >> We think we have figured out the issue with the encoding. Java
> > >> Base64 uses a '-' instead of a '+' when encoding. Command line in
> > >> Linux and Ruby expect a '+'. When we converted the raw Base64
> > >> encoded workflow from the android request and changed all the '-'
> characters to a '+'
> > it works ok.
> > >> So either we need to figure out how to tell Java to use '+' instead
> > >> of
> > '-'
> > >> or we change the encoded workflow string using string replace
> > >> before adding it to the request string.
> > >>
> > >> Lots of thanks to Finn for helping me to debug this.
> > >>
> > >> Cheers,
> > >>
> > >> Ian
> > >>
> > >> -----Original Message-----
> > >> From: Larry Akah [mailto:larryakah@gmail.com]
> > >> Sent: 07 July 2015 11:37
> > >> To: dev@taverna.incubator.apache.org
> > >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > >> Taverna player
> > >>
> > >> Is it possible that i get the body of the request that the player
> > >> is actually receiving?
> > >>
> > >> Cheers
> > >>
> > >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> > >>
> > >> > workflow id number 34 is the workflow i've been working with
> > >> >
> > >> >
> > >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ian.Dunlop@manchester.ac.uk
> >:
> > >> >
> > >> >> Hello,
> > >> >>
> > >> >> It's hard to tell from the logs if the output relates to what
> > >> >> you are doing, what workflow are you trying to upload. The logs
> > >> >> are full of "parser
> > >> >> error: PCDATA invalid Char value ". Maybe there are characters
> > >> >> in it that the tavern player XML parser cannot read. Anyone else
> > >> >> have any
> > >> ideas.
> > >> >>
> > >> >> Cheers,
> > >> >>
> > >> >> Ian
> > >> >>
> > >> >> -----Original Message-----
> > >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> > >> >> Sent: 06 July 2015 17:52
> > >> >> To: dev@taverna.incubator.apache.org
> > >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> > >> >> Taverna player
> > >> >>
> > >> >> What do the server logs reveal from the recent requests just few
> > >> >> moments ago? I could use some help from them.
> > >> >>
> > >> >>
> > >> >> Cheers
> > >> >>
> > >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> > >> >>
> > >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> > >> >> >
> > >> >> >> Hello,
> > >> >> >>
> > >> >> >> I just sent workflow 16 to the taverna player by base64
> > >> >> >> encoding it on the command line and using curl and it all
> > >> >> >> worked ok. Here is the
> > >> >> >> base64 version
> > >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe
> > >> >> >> you need to ensure it is UTF-8 character set.
> > >> >> >>
> > >> >> >
> > >> >> > Also that it is not broken into lines. That file correctly
> > >> >> > keeps the
> > >> >> > base64 all in one line. Some base64 methods will, by default,
> > >> >> > break it into human-friendly lines which can be confusing for
> > >> >> > the reading
> > >> system.
> > >> >> >
> > >> >> >  Cheers,
> > >> >> >>
> > >> >> >> Ian
> > >> >> >>
> > >> >> >
> > >> >> > Alan
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> *Akah Larry N.H*
> > >> >>
> > >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> >> *www.iceteck.com*
> > >> >>
> > >> >> Developing technologies for emergence and sustainable development.
> > >> >>
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > *Akah Larry N.H*
> > >> >
> > >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> > *www.iceteck.com*
> > >> >
> > >> > Developing technologies for emergence and sustainable development.
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> *Akah Larry N.H*
> > >>
> > >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >> *www.iceteck.com*
> > >>
> > >> Developing technologies for emergence and sustainable development.
> > >>
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> > >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I've tried uploading via the app and it all seems to be OK now. I get the response 201 created and you can see the workflows on the player. Not sure how you get the actual response content from the http connection though :)
Now all you have to do is figure out how to actually pass in the inputs for the workflow and run it......

Also, still not sure what I am logging into on the first screen - does it do anything. Anyway, not as important as getting an actual workflow run working so concentrate on that.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 07 July 2015 12:25
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

ok, i will try that.

Thanks

2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I changed the encoding part to this:
>
> String data = "{\"document\":\"data:application/octet-stream;base64," 
> +
>
> Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>
> Basically I did a string replace on the Base64 encoded workflow using 
> .replace('-', '+')
>
> Then I tried uploading to the player and it worked. I haven't figured 
> out what your app does with the response but the request was 
> successful on the player.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 11:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Hello,
> Wait, but i am trying to upload workflow id 34 even with the '+' used 
> and i still get the 'Internal Server Error'. This is the base64 
> encoded
> workflow:
>
>
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> >
>
> This is the code am using to test the upload
>
>    String data = 
> "{\"document\":\"data:application/octet-stream;base64," +
> >
> >
> "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sb
> nM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZ
> lcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9I
> nVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV
> 0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zd
> GFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3c
> uY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+C
> iAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21
> fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlc
> nMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA
> 8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ
> 2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9
> VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zO
> nNjdWZsPgoKCg=="+"\"}";
> >                 String post = "{\"workflow\":"+data+"}";
> >
> >                 System.out.println("BODY=>"+post);
> >                 connection.setRequestMethod("POST");
> >                 connection.setRequestProperty("Authorization",
> basicAuth);
> >                 connection.setRequestProperty("Content-Type",
> > "application/json");
> >                 connection.setRequestProperty("Content-Encoding",
> "UTF-8");
> >                 connection.setUseCaches (false);
> >                 connection.setDoOutput(true);
> >                 connection.connect(); //send request
> >
> >                 DataOutputStream dos = new 
> > DataOutputStream(connection.getOutputStream());
> >
> >                 dos.writeBytes(post);//write post data which is a 
> > formatted json data representing body of workflow
> >               //  dos.writeChars(post);
> >                // dos.write(post.getBytes("UTF-8"));
> >                // dos.writeUTF(post);
> >
> >                 dos.flush();
> >                 dos.close();
> >
> >                 System.out.println("Post Response Code:
> > "+connection.getResponseCode());
> >                 System.out.println("Post response message:
> > "+connection.getResponseMessage());
> >                 connection.disconnect();
> >
>
> Cheers
>
> 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
>
> > Ah, ok. Let me try some options out but i think the former would 
> > require a new implementation of android's base64 because i have 
> > tried all the possible options and they all give error.
> >
> > Cheers
> >
> > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> >> Hello,
> >>
> >> We think we have figured out the issue with the encoding. Java 
> >> Base64 uses a '-' instead of a '+' when encoding. Command line in 
> >> Linux and Ruby expect a '+'. When we converted the raw Base64 
> >> encoded workflow from the android request and changed all the '-' characters to a '+'
> it works ok.
> >> So either we need to figure out how to tell Java to use '+' instead 
> >> of
> '-'
> >> or we change the encoded workflow string using string replace 
> >> before adding it to the request string.
> >>
> >> Lots of thanks to Finn for helping me to debug this.
> >>
> >> Cheers,
> >>
> >> Ian
> >>
> >> -----Original Message-----
> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> Sent: 07 July 2015 11:37
> >> To: dev@taverna.incubator.apache.org
> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> >> Taverna player
> >>
> >> Is it possible that i get the body of the request that the player 
> >> is actually receiving?
> >>
> >> Cheers
> >>
> >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> >>
> >> > workflow id number 34 is the workflow i've been working with
> >> >
> >> >
> >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >> >
> >> >> Hello,
> >> >>
> >> >> It's hard to tell from the logs if the output relates to what 
> >> >> you are doing, what workflow are you trying to upload. The logs 
> >> >> are full of "parser
> >> >> error: PCDATA invalid Char value ". Maybe there are characters 
> >> >> in it that the tavern player XML parser cannot read. Anyone else 
> >> >> have any
> >> ideas.
> >> >>
> >> >> Cheers,
> >> >>
> >> >> Ian
> >> >>
> >> >> -----Original Message-----
> >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> >> Sent: 06 July 2015 17:52
> >> >> To: dev@taverna.incubator.apache.org
> >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
> >> >> Taverna player
> >> >>
> >> >> What do the server logs reveal from the recent requests just few 
> >> >> moments ago? I could use some help from them.
> >> >>
> >> >>
> >> >> Cheers
> >> >>
> >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> >> >>
> >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> >> >> >
> >> >> >> Hello,
> >> >> >>
> >> >> >> I just sent workflow 16 to the taverna player by base64 
> >> >> >> encoding it on the command line and using curl and it all 
> >> >> >> worked ok. Here is the
> >> >> >> base64 version
> >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe 
> >> >> >> you need to ensure it is UTF-8 character set.
> >> >> >>
> >> >> >
> >> >> > Also that it is not broken into lines. That file correctly 
> >> >> > keeps the
> >> >> > base64 all in one line. Some base64 methods will, by default, 
> >> >> > break it into human-friendly lines which can be confusing for 
> >> >> > the reading
> >> system.
> >> >> >
> >> >> >  Cheers,
> >> >> >>
> >> >> >> Ian
> >> >> >>
> >> >> >
> >> >> > Alan
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> *Akah Larry N.H*
> >> >>
> >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> >> *www.iceteck.com*
> >> >>
> >> >> Developing technologies for emergence and sustainable development.
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Akah Larry N.H*
> >> >
> >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > *www.iceteck.com*
> >> >
> >> > Developing technologies for emergence and sustainable development.
> >> >
> >> >
> >>
> >>
> >> --
> >> *Akah Larry N.H*
> >>
> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> *www.iceteck.com*
> >>
> >> Developing technologies for emergence and sustainable development.
> >>
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
ok, i will try that.

Thanks

2015-07-07 12:10 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I changed the encoding part to this:
>
> String data = "{\"document\":\"data:application/octet-stream;base64," +
>
> Base64.encodeToString(sb.toString().getBytes("UTF-8"),
> Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";
>
> Basically I did a string replace on the Base64 encoded workflow using
> .replace('-', '+')
>
> Then I tried uploading to the player and it worked. I haven't figured out
> what your app does with the response but the request was successful on the
> player.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 11:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
> Wait, but i am trying to upload workflow id 34 even with the '+' used and
> i still get the 'Internal Server Error'. This is the base64 encoded
> workflow:
>
>
> PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
> >
>
> This is the code am using to test the upload
>
>    String data = "{\"document\":\"data:application/octet-stream;base64," +
> >
> >
> "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg=="+"\"}";
> >                 String post = "{\"workflow\":"+data+"}";
> >
> >                 System.out.println("BODY=>"+post);
> >                 connection.setRequestMethod("POST");
> >                 connection.setRequestProperty("Authorization",
> basicAuth);
> >                 connection.setRequestProperty("Content-Type",
> > "application/json");
> >                 connection.setRequestProperty("Content-Encoding",
> "UTF-8");
> >                 connection.setUseCaches (false);
> >                 connection.setDoOutput(true);
> >                 connection.connect(); //send request
> >
> >                 DataOutputStream dos = new
> > DataOutputStream(connection.getOutputStream());
> >
> >                 dos.writeBytes(post);//write post data which is a
> > formatted json data representing body of workflow
> >               //  dos.writeChars(post);
> >                // dos.write(post.getBytes("UTF-8"));
> >                // dos.writeUTF(post);
> >
> >                 dos.flush();
> >                 dos.close();
> >
> >                 System.out.println("Post Response Code:
> > "+connection.getResponseCode());
> >                 System.out.println("Post response message:
> > "+connection.getResponseMessage());
> >                 connection.disconnect();
> >
>
> Cheers
>
> 2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:
>
> > Ah, ok. Let me try some options out but i think the former would
> > require a new implementation of android's base64 because i have tried
> > all the possible options and they all give error.
> >
> > Cheers
> >
> > 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> >> Hello,
> >>
> >> We think we have figured out the issue with the encoding. Java Base64
> >> uses a '-' instead of a '+' when encoding. Command line in Linux and
> >> Ruby expect a '+'. When we converted the raw Base64 encoded workflow
> >> from the android request and changed all the '-' characters to a '+'
> it works ok.
> >> So either we need to figure out how to tell Java to use '+' instead of
> '-'
> >> or we change the encoded workflow string using string replace before
> >> adding it to the request string.
> >>
> >> Lots of thanks to Finn for helping me to debug this.
> >>
> >> Cheers,
> >>
> >> Ian
> >>
> >> -----Original Message-----
> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> Sent: 07 July 2015 11:37
> >> To: dev@taverna.incubator.apache.org
> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> >> player
> >>
> >> Is it possible that i get the body of the request that the player is
> >> actually receiving?
> >>
> >> Cheers
> >>
> >> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
> >>
> >> > workflow id number 34 is the workflow i've been working with
> >> >
> >> >
> >> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >> >
> >> >> Hello,
> >> >>
> >> >> It's hard to tell from the logs if the output relates to what you
> >> >> are doing, what workflow are you trying to upload. The logs are
> >> >> full of "parser
> >> >> error: PCDATA invalid Char value ". Maybe there are characters in
> >> >> it that the tavern player XML parser cannot read. Anyone else have
> >> >> any
> >> ideas.
> >> >>
> >> >> Cheers,
> >> >>
> >> >> Ian
> >> >>
> >> >> -----Original Message-----
> >> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> >> Sent: 06 July 2015 17:52
> >> >> To: dev@taverna.incubator.apache.org
> >> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >> >> Taverna player
> >> >>
> >> >> What do the server logs reveal from the recent requests just few
> >> >> moments ago? I could use some help from them.
> >> >>
> >> >>
> >> >> Cheers
> >> >>
> >> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> >> >>
> >> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> >> >> >
> >> >> >> Hello,
> >> >> >>
> >> >> >> I just sent workflow 16 to the taverna player by base64
> >> >> >> encoding it on the command line and using curl and it all
> >> >> >> worked ok. Here is the
> >> >> >> base64 version
> >> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe
> >> >> >> you need to ensure it is UTF-8 character set.
> >> >> >>
> >> >> >
> >> >> > Also that it is not broken into lines. That file correctly keeps
> >> >> > the
> >> >> > base64 all in one line. Some base64 methods will, by default,
> >> >> > break it into human-friendly lines which can be confusing for
> >> >> > the reading
> >> system.
> >> >> >
> >> >> >  Cheers,
> >> >> >>
> >> >> >> Ian
> >> >> >>
> >> >> >
> >> >> > Alan
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> *Akah Larry N.H*
> >> >>
> >> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> >> *www.iceteck.com*
> >> >>
> >> >> Developing technologies for emergence and sustainable development.
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Akah Larry N.H*
> >> >
> >> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >> > *www.iceteck.com*
> >> >
> >> > Developing technologies for emergence and sustainable development.
> >> >
> >> >
> >>
> >>
> >> --
> >> *Akah Larry N.H*
> >>
> >> *Lead Software Engineer @ GiftedMom*
> >> *Founder IceTeck Inc*
> >> *www.iceteck.com*
> >>
> >> Developing technologies for emergence and sustainable development.
> >>
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I changed the encoding part to this:

String data = "{\"document\":\"data:application/octet-stream;base64," +
                        Base64.encodeToString(sb.toString().getBytes("UTF-8"), Base64.URL_SAFE|Base64.NO_WRAP).replace('-', '+') +"\"}";

Basically I did a string replace on the Base64 encoded workflow using .replace('-', '+')
              
Then I tried uploading to the player and it worked. I haven't figured out what your app does with the response but the request was successful on the player.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 07 July 2015 11:58
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,
Wait, but i am trying to upload workflow id 34 even with the '+' used and i still get the 'Internal Server Error'. This is the base64 encoded workflow:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>

This is the code am using to test the upload

   String data = "{\"document\":\"data:application/octet-stream;base64," +
>
> "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg=="+"\"}";
>                 String post = "{\"workflow\":"+data+"}";
>
>                 System.out.println("BODY=>"+post);
>                 connection.setRequestMethod("POST");
>                 connection.setRequestProperty("Authorization", basicAuth);
>                 connection.setRequestProperty("Content-Type",
> "application/json");
>                 connection.setRequestProperty("Content-Encoding", "UTF-8");
>                 connection.setUseCaches (false);
>                 connection.setDoOutput(true);
>                 connection.connect(); //send request
>
>                 DataOutputStream dos = new 
> DataOutputStream(connection.getOutputStream());
>
>                 dos.writeBytes(post);//write post data which is a 
> formatted json data representing body of workflow
>               //  dos.writeChars(post);
>                // dos.write(post.getBytes("UTF-8"));
>                // dos.writeUTF(post);
>
>                 dos.flush();
>                 dos.close();
>
>                 System.out.println("Post Response Code:
> "+connection.getResponseCode());
>                 System.out.println("Post response message:
> "+connection.getResponseMessage());
>                 connection.disconnect();
>

Cheers

2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:

> Ah, ok. Let me try some options out but i think the former would 
> require a new implementation of android's base64 because i have tried 
> all the possible options and they all give error.
>
> Cheers
>
> 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> We think we have figured out the issue with the encoding. Java Base64 
>> uses a '-' instead of a '+' when encoding. Command line in Linux and 
>> Ruby expect a '+'. When we converted the raw Base64 encoded workflow 
>> from the android request and changed all the '-' characters to a '+'  it works ok.
>> So either we need to figure out how to tell Java to use '+' instead of '-'
>> or we change the encoded workflow string using string replace before 
>> adding it to the request string.
>>
>> Lots of thanks to Finn for helping me to debug this.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 07 July 2015 11:37
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
>> player
>>
>> Is it possible that i get the body of the request that the player is 
>> actually receiving?
>>
>> Cheers
>>
>> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>>
>> > workflow id number 34 is the workflow i've been working with
>> >
>> >
>> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> >
>> >> Hello,
>> >>
>> >> It's hard to tell from the logs if the output relates to what you 
>> >> are doing, what workflow are you trying to upload. The logs are 
>> >> full of "parser
>> >> error: PCDATA invalid Char value ". Maybe there are characters in 
>> >> it that the tavern player XML parser cannot read. Anyone else have 
>> >> any
>> ideas.
>> >>
>> >> Cheers,
>> >>
>> >> Ian
>> >>
>> >> -----Original Message-----
>> >> From: Larry Akah [mailto:larryakah@gmail.com]
>> >> Sent: 06 July 2015 17:52
>> >> To: dev@taverna.incubator.apache.org
>> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>> >> Taverna player
>> >>
>> >> What do the server logs reveal from the recent requests just few 
>> >> moments ago? I could use some help from them.
>> >>
>> >>
>> >> Cheers
>> >>
>> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>> >>
>> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> >> >
>> >> >> Hello,
>> >> >>
>> >> >> I just sent workflow 16 to the taverna player by base64 
>> >> >> encoding it on the command line and using curl and it all 
>> >> >> worked ok. Here is the
>> >> >> base64 version
>> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe 
>> >> >> you need to ensure it is UTF-8 character set.
>> >> >>
>> >> >
>> >> > Also that it is not broken into lines. That file correctly keeps 
>> >> > the
>> >> > base64 all in one line. Some base64 methods will, by default, 
>> >> > break it into human-friendly lines which can be confusing for 
>> >> > the reading
>> system.
>> >> >
>> >> >  Cheers,
>> >> >>
>> >> >> Ian
>> >> >>
>> >> >
>> >> > Alan
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> *Akah Larry N.H*
>> >>
>> >> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> >> *www.iceteck.com*
>> >>
>> >> Developing technologies for emergence and sustainable development.
>> >>
>> >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>> >
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Hello,
Wait, but i am trying to upload workflow id 34 even with the '+' used and i
still get the 'Internal Server Error'. This is the base64 encoded workflow:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg==
>

This is the code am using to test the upload

   String data = "{\"document\":\"data:application/octet-stream;base64," +
>
> "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHM6c2N1ZmwgeG1sbnM6cz0iaHR0cDovL29yZy5lbWJsLmViaS5lc2NpZW5jZS94c2N1ZmwvMC4xYWxwaGEiIHZlcnNpb249IjAuMiIgbG9nPSIwIj4KICA8czp3b3JrZmxvd2Rlc2NyaXB0aW9uIGxzaWQ9InVybjpsc2lkOnd3dy5teWdyaWQub3JnLnVrOm9wZXJhdGlvbjpLNlpDRzZJV05TMCIgYXV0aG9yPSIiIHRpdGxlPSIiIC8+CiAgPHM6cHJvY2Vzc29yIG5hbWU9IlN0cmluZ19Db25zdGFudCIgYm9yaW5nPSJ0cnVlIj4KICAgIDxzOnN0cmluZ2NvbnN0YW50Pmh0dHA6Ly93d3cuY3MubWFuLmFjLnVrL35nb2RlcmlzYS9QaG90by5qcGc8L3M6c3RyaW5nY29uc3RhbnQ+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpwcm9jZXNzb3IgbmFtZT0iR2V0X2ltYWdlX2Zyb21fVVJMIj4KICAgIDxzOmxvY2FsPm9yZy5lbWJsLmViaS5lc2NpZW5jZS5zY3VmbHdvcmtlcnMuamF2YS5XZWJJbWFnZUZldGNoZXI8L3M6bG9jYWw+CiAgPC9zOnByb2Nlc3Nvcj4KICA8czpsaW5rIHNvdXJjZT0iU3RyaW5nX0NvbnN0YW50OnZhbHVlIiBzaW5rPSJHZXRfaW1hZ2VfZnJvbV9VUkw6dXJsIiAvPgogIDxzOmxpbmsgc291cmNlPSJHZXRfaW1hZ2VfZnJvbV9VUkw6aW1hZ2UiIHNpbms9InZpeiIgLz4KICA8czpzaW5rIG5hbWU9InZpeiIgLz4KPC9zOnNjdWZsPgoKCg=="+"\"}";
>                 String post = "{\"workflow\":"+data+"}";
>
>                 System.out.println("BODY=>"+post);
>                 connection.setRequestMethod("POST");
>                 connection.setRequestProperty("Authorization", basicAuth);
>                 connection.setRequestProperty("Content-Type",
> "application/json");
>                 connection.setRequestProperty("Content-Encoding", "UTF-8");
>                 connection.setUseCaches (false);
>                 connection.setDoOutput(true);
>                 connection.connect(); //send request
>
>                 DataOutputStream dos = new
> DataOutputStream(connection.getOutputStream());
>
>                 dos.writeBytes(post);//write post data which is a
> formatted json data representing body of workflow
>               //  dos.writeChars(post);
>                // dos.write(post.getBytes("UTF-8"));
>                // dos.writeUTF(post);
>
>                 dos.flush();
>                 dos.close();
>
>                 System.out.println("Post Response Code:
> "+connection.getResponseCode());
>                 System.out.println("Post response message:
> "+connection.getResponseMessage());
>                 connection.disconnect();
>

Cheers

2015-07-07 11:45 GMT+01:00 Larry Akah <la...@gmail.com>:

> Ah, ok. Let me try some options out but i think the former would require a
> new implementation of android's base64 because i have tried all the
> possible options and they all give error.
>
> Cheers
>
> 2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> We think we have figured out the issue with the encoding. Java Base64
>> uses a '-' instead of a '+' when encoding. Command line in Linux and Ruby
>> expect a '+'. When we converted the raw Base64 encoded workflow from the
>> android request and changed all the '-' characters to a '+'  it works ok.
>> So either we need to figure out how to tell Java to use '+' instead of '-'
>> or we change the encoded workflow string using string replace before adding
>> it to the request string.
>>
>> Lots of thanks to Finn for helping me to debug this.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 07 July 2015 11:37
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> player
>>
>> Is it possible that i get the body of the request that the player is
>> actually receiving?
>>
>> Cheers
>>
>> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>>
>> > workflow id number 34 is the workflow i've been working with
>> >
>> >
>> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> >
>> >> Hello,
>> >>
>> >> It's hard to tell from the logs if the output relates to what you are
>> >> doing, what workflow are you trying to upload. The logs are full of
>> >> "parser
>> >> error: PCDATA invalid Char value ". Maybe there are characters in it
>> >> that the tavern player XML parser cannot read. Anyone else have any
>> ideas.
>> >>
>> >> Cheers,
>> >>
>> >> Ian
>> >>
>> >> -----Original Message-----
>> >> From: Larry Akah [mailto:larryakah@gmail.com]
>> >> Sent: 06 July 2015 17:52
>> >> To: dev@taverna.incubator.apache.org
>> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> >> player
>> >>
>> >> What do the server logs reveal from the recent requests just few
>> >> moments ago? I could use some help from them.
>> >>
>> >>
>> >> Cheers
>> >>
>> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>> >>
>> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> >> >
>> >> >> Hello,
>> >> >>
>> >> >> I just sent workflow 16 to the taverna player by base64 encoding
>> >> >> it on the command line and using curl and it all worked ok. Here
>> >> >> is the
>> >> >> base64 version
>> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
>> >> >> need to ensure it is UTF-8 character set.
>> >> >>
>> >> >
>> >> > Also that it is not broken into lines. That file correctly keeps
>> >> > the
>> >> > base64 all in one line. Some base64 methods will, by default, break
>> >> > it into human-friendly lines which can be confusing for the reading
>> system.
>> >> >
>> >> >  Cheers,
>> >> >>
>> >> >> Ian
>> >> >>
>> >> >
>> >> > Alan
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> *Akah Larry N.H*
>> >>
>> >> *Lead Software Engineer @ GiftedMom*
>> >> *Founder IceTeck Inc*
>> >> *www.iceteck.com*
>> >>
>> >> Developing technologies for emergence and sustainable development.
>> >>
>> >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom*
>> > *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>> >
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Ah, ok. Let me try some options out but i think the former would require a
new implementation of android's base64 because i have tried all the
possible options and they all give error.

Cheers

2015-07-07 11:41 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> We think we have figured out the issue with the encoding. Java Base64 uses
> a '-' instead of a '+' when encoding. Command line in Linux and Ruby expect
> a '+'. When we converted the raw Base64 encoded workflow from the android
> request and changed all the '-' characters to a '+'  it works ok. So either
> we need to figure out how to tell Java to use '+' instead of '-' or we
> change the encoded workflow string using string replace before adding it to
> the request string.
>
> Lots of thanks to Finn for helping me to debug this.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 07 July 2015 11:37
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Is it possible that i get the body of the request that the player is
> actually receiving?
>
> Cheers
>
> 2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:
>
> > workflow id number 34 is the workflow i've been working with
> >
> >
> > 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> >> Hello,
> >>
> >> It's hard to tell from the logs if the output relates to what you are
> >> doing, what workflow are you trying to upload. The logs are full of
> >> "parser
> >> error: PCDATA invalid Char value ". Maybe there are characters in it
> >> that the tavern player XML parser cannot read. Anyone else have any
> ideas.
> >>
> >> Cheers,
> >>
> >> Ian
> >>
> >> -----Original Message-----
> >> From: Larry Akah [mailto:larryakah@gmail.com]
> >> Sent: 06 July 2015 17:52
> >> To: dev@taverna.incubator.apache.org
> >> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> >> player
> >>
> >> What do the server logs reveal from the recent requests just few
> >> moments ago? I could use some help from them.
> >>
> >>
> >> Cheers
> >>
> >> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
> >>
> >> > On 06/07/2015 12:03, Ian Dunlop wrote:
> >> >
> >> >> Hello,
> >> >>
> >> >> I just sent workflow 16 to the taverna player by base64 encoding
> >> >> it on the command line and using curl and it all worked ok. Here
> >> >> is the
> >> >> base64 version
> >> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
> >> >> need to ensure it is UTF-8 character set.
> >> >>
> >> >
> >> > Also that it is not broken into lines. That file correctly keeps
> >> > the
> >> > base64 all in one line. Some base64 methods will, by default, break
> >> > it into human-friendly lines which can be confusing for the reading
> system.
> >> >
> >> >  Cheers,
> >> >>
> >> >> Ian
> >> >>
> >> >
> >> > Alan
> >> >
> >>
> >>
> >>
> >> --
> >> *Akah Larry N.H*
> >>
> >> *Lead Software Engineer @ GiftedMom*
> >> *Founder IceTeck Inc*
> >> *www.iceteck.com*
> >>
> >> Developing technologies for emergence and sustainable development.
> >>
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

We think we have figured out the issue with the encoding. Java Base64 uses a '-' instead of a '+' when encoding. Command line in Linux and Ruby expect a '+'. When we converted the raw Base64 encoded workflow from the android request and changed all the '-' characters to a '+'  it works ok. So either we need to figure out how to tell Java to use '+' instead of '-' or we change the encoded workflow string using string replace before adding it to the request string.

Lots of thanks to Finn for helping me to debug this.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 07 July 2015 11:37
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Is it possible that i get the body of the request that the player is actually receiving?

Cheers

2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:

> workflow id number 34 is the workflow i've been working with
>
>
> 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> It's hard to tell from the logs if the output relates to what you are 
>> doing, what workflow are you trying to upload. The logs are full of 
>> "parser
>> error: PCDATA invalid Char value ". Maybe there are characters in it 
>> that the tavern player XML parser cannot read. Anyone else have any ideas.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 06 July 2015 17:52
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
>> player
>>
>> What do the server logs reveal from the recent requests just few 
>> moments ago? I could use some help from them.
>>
>>
>> Cheers
>>
>> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>>
>> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> >
>> >> Hello,
>> >>
>> >> I just sent workflow 16 to the taverna player by base64 encoding 
>> >> it on the command line and using curl and it all worked ok. Here 
>> >> is the
>> >> base64 version
>> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you 
>> >> need to ensure it is UTF-8 character set.
>> >>
>> >
>> > Also that it is not broken into lines. That file correctly keeps 
>> > the
>> > base64 all in one line. Some base64 methods will, by default, break 
>> > it into human-friendly lines which can be confusing for the reading system.
>> >
>> >  Cheers,
>> >>
>> >> Ian
>> >>
>> >
>> > Alan
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Is it possible that i get the body of the request that the player is
actually receiving?

Cheers

2015-07-07 11:36 GMT+01:00 Larry Akah <la...@gmail.com>:

> workflow id number 34 is the workflow i've been working with
>
>
> 2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> It's hard to tell from the logs if the output relates to what you are
>> doing, what workflow are you trying to upload. The logs are full of "parser
>> error: PCDATA invalid Char value ". Maybe there are characters in it that
>> the tavern player XML parser cannot read. Anyone else have any ideas.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 06 July 2015 17:52
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> player
>>
>> What do the server logs reveal from the recent requests just few moments
>> ago? I could use some help from them.
>>
>>
>> Cheers
>>
>> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>>
>> > On 06/07/2015 12:03, Ian Dunlop wrote:
>> >
>> >> Hello,
>> >>
>> >> I just sent workflow 16 to the taverna player by base64 encoding it
>> >> on the command line and using curl and it all worked ok. Here is the
>> >> base64 version
>> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
>> >> need to ensure it is UTF-8 character set.
>> >>
>> >
>> > Also that it is not broken into lines. That file correctly keeps the
>> > base64 all in one line. Some base64 methods will, by default, break it
>> > into human-friendly lines which can be confusing for the reading system.
>> >
>> >  Cheers,
>> >>
>> >> Ian
>> >>
>> >
>> > Alan
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
workflow id number 34 is the workflow i've been working with


2015-07-07 10:27 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> It's hard to tell from the logs if the output relates to what you are
> doing, what workflow are you trying to upload. The logs are full of "parser
> error: PCDATA invalid Char value ". Maybe there are characters in it that
> the tavern player XML parser cannot read. Anyone else have any ideas.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 06 July 2015 17:52
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> What do the server logs reveal from the recent requests just few moments
> ago? I could use some help from them.
>
>
> Cheers
>
> 2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:
>
> > On 06/07/2015 12:03, Ian Dunlop wrote:
> >
> >> Hello,
> >>
> >> I just sent workflow 16 to the taverna player by base64 encoding it
> >> on the command line and using curl and it all worked ok. Here is the
> >> base64 version
> >> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
> >> need to ensure it is UTF-8 character set.
> >>
> >
> > Also that it is not broken into lines. That file correctly keeps the
> > base64 all in one line. Some base64 methods will, by default, break it
> > into human-friendly lines which can be confusing for the reading system.
> >
> >  Cheers,
> >>
> >> Ian
> >>
> >
> > Alan
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

It's hard to tell from the logs if the output relates to what you are doing, what workflow are you trying to upload. The logs are full of "parser error: PCDATA invalid Char value ". Maybe there are characters in it that the tavern player XML parser cannot read. Anyone else have any ideas.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 06 July 2015 17:52
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

What do the server logs reveal from the recent requests just few moments ago? I could use some help from them.


Cheers

2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:

> On 06/07/2015 12:03, Ian Dunlop wrote:
>
>> Hello,
>>
>> I just sent workflow 16 to the taverna player by base64 encoding it 
>> on the command line and using curl and it all worked ok. Here is the
>> base64 version
>> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you 
>> need to ensure it is UTF-8 character set.
>>
>
> Also that it is not broken into lines. That file correctly keeps the
> base64 all in one line. Some base64 methods will, by default, break it 
> into human-friendly lines which can be confusing for the reading system.
>
>  Cheers,
>>
>> Ian
>>
>
> Alan
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
What do the server logs reveal from the recent requests just few moments
ago? I could use some help from them.


Cheers

2015-07-06 12:22 GMT+01:00 alaninmcr <al...@googlemail.com>:

> On 06/07/2015 12:03, Ian Dunlop wrote:
>
>> Hello,
>>
>> I just sent workflow 16 to the taverna player by base64 encoding it
>> on the command line and using curl and it all worked ok. Here is the
>> base64 version
>> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
>> need to ensure it is UTF-8 character set.
>>
>
> Also that it is not broken into lines. That file correctly keeps the
> base64 all in one line. Some base64 methods will, by default, break it into
> human-friendly lines which can be confusing for the reading system.
>
>  Cheers,
>>
>> Ian
>>
>
> Alan
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by alaninmcr <al...@googlemail.com>.
On 06/07/2015 12:03, Ian Dunlop wrote:
> Hello,
>
> I just sent workflow 16 to the taverna player by base64 encoding it
> on the command line and using curl and it all worked ok. Here is the
> base64 version
> https://dl.dropboxusercontent.com/u/4958764/wf16.base64 Maybe you
> need to ensure it is UTF-8 character set.

Also that it is not broken into lines. That file correctly keeps the 
base64 all in one line. Some base64 methods will, by default, break it 
into human-friendly lines which can be confusing for the reading system.

> Cheers,
>
> Ian

Alan

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Ok, i will do that and report back, but so far the latest error i get is an
'internal server error' with error code 500.

Cheers

2015-07-06 6:03 GMT-05:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I just sent workflow 16 to the taverna player by base64 encoding it on the
> command line and using curl and it all worked ok. Here is the base64
> version https://dl.dropboxusercontent.com/u/4958764/wf16.base64
> Maybe you need to ensure it is UTF-8 character set.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> Sent: 06 July 2015 11:53
> To: dev@taverna.incubator.apache.org
> Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
>
> I think you are using Linux so why not test it using the command line
> base64 encoder and then send it to the player with curl. Something like
> base64 FILENAME.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 04 July 2015 10:42
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> 2015-07-04 9:22 GMT+01:00 Alan Williams <al...@googlemail.com>:
>
> > On 04-Jul-15 01:58, Larry Akah wrote:
> >
> >> i have been able to identify a major issue which is with the Base64
> >> encoding of the workflow data. The encoding doesn't seem to perform
> >> properly
> >>
> >
> > Do you have an example?
> >
> This link shows what is currently operating as a request to upload a
> workflow.
>
> https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java
> Looking at the WorkflowProcessTask, you will see that i have put the
> base64 encoded(encoded by php's base64 function) string directly as a
> string rather than have it encoded by the util.base64 method. This produces
> a 'Internal Server error' and status code 500. But when i use the
> util.base64 method, i get a 'Bad Request' response message and response
> code of 400.
>
> >
> >  However, now i get a 'Internal Server Error' message, error code 500
> > for
> >> the workflow with id 34 encoded encoded using PHP's base64 encode
> >> function
> >>
> >
> > I am confused. Where does PHP come into your Android App?
>
> Not that i use it in the android app, but i was trying out different
> base64 encoding schemes.
>
>
> >
> >
> >  and used as a raw string in the post body.
> >> What correct java implementation for the base64 encoding can one use?
> >>
> >
> > What is wrong with the android.util.Base64 ? You possibly need to try
> > different options such as NO_WRAP.
> >
> Ok, i will try the options.
>
>
> >
> >  Cheers
> >>
> >
> > Alan
> >
> > Thanks
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I just sent workflow 16 to the taverna player by base64 encoding it on the command line and using curl and it all worked ok. Here is the base64 version https://dl.dropboxusercontent.com/u/4958764/wf16.base64
Maybe you need to ensure it is UTF-8 character set.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk] 
Sent: 06 July 2015 11:53
To: dev@taverna.incubator.apache.org
Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,

I think you are using Linux so why not test it using the command line base64 encoder and then send it to the player with curl. Something like base64 FILENAME.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com]
Sent: 04 July 2015 10:42
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

2015-07-04 9:22 GMT+01:00 Alan Williams <al...@googlemail.com>:

> On 04-Jul-15 01:58, Larry Akah wrote:
>
>> i have been able to identify a major issue which is with the Base64 
>> encoding of the workflow data. The encoding doesn't seem to perform 
>> properly
>>
>
> Do you have an example?
>
This link shows what is currently operating as a request to upload a workflow.
https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java
Looking at the WorkflowProcessTask, you will see that i have put the base64 encoded(encoded by php's base64 function) string directly as a string rather than have it encoded by the util.base64 method. This produces a 'Internal Server error' and status code 500. But when i use the util.base64 method, i get a 'Bad Request' response message and response code of 400.

>
>  However, now i get a 'Internal Server Error' message, error code 500 
> for
>> the workflow with id 34 encoded encoded using PHP's base64 encode 
>> function
>>
>
> I am confused. Where does PHP come into your Android App?

Not that i use it in the android app, but i was trying out different base64 encoding schemes.


>
>
>  and used as a raw string in the post body.
>> What correct java implementation for the base64 encoding can one use?
>>
>
> What is wrong with the android.util.Base64 ? You possibly need to try 
> different options such as NO_WRAP.
>
Ok, i will try the options.


>
>  Cheers
>>
>
> Alan
>
> Thanks



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I think you are using Linux so why not test it using the command line base64 encoder and then send it to the player with curl. Something like base64 FILENAME.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 04 July 2015 10:42
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

2015-07-04 9:22 GMT+01:00 Alan Williams <al...@googlemail.com>:

> On 04-Jul-15 01:58, Larry Akah wrote:
>
>> i have been able to identify a major issue which is with the Base64 
>> encoding of the workflow data. The encoding doesn't seem to perform 
>> properly
>>
>
> Do you have an example?
>
This link shows what is currently operating as a request to upload a workflow.
https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java
Looking at the WorkflowProcessTask, you will see that i have put the base64 encoded(encoded by php's base64 function) string directly as a string rather than have it encoded by the util.base64 method. This produces a 'Internal Server error' and status code 500. But when i use the util.base64 method, i get a 'Bad Request' response message and response code of 400.

>
>  However, now i get a 'Internal Server Error' message, error code 500 
> for
>> the workflow with id 34 encoded encoded using PHP's base64 encode 
>> function
>>
>
> I am confused. Where does PHP come into your Android App?

Not that i use it in the android app, but i was trying out different base64 encoding schemes.


>
>
>  and used as a raw string in the post body.
>> What correct java implementation for the base64 encoding can one use?
>>
>
> What is wrong with the android.util.Base64 ? You possibly need to try 
> different options such as NO_WRAP.
>
Ok, i will try the options.


>
>  Cheers
>>
>
> Alan
>
> Thanks



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
2015-07-04 9:22 GMT+01:00 Alan Williams <al...@googlemail.com>:

> On 04-Jul-15 01:58, Larry Akah wrote:
>
>> i have been able to identify a major issue which is with the Base64
>> encoding of the workflow data. The encoding doesn't seem to perform
>> properly
>>
>
> Do you have an example?
>
This link shows what is currently operating as a request to upload a
workflow.
https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java
Looking at the WorkflowProcessTask, you will see that i have put the base64
encoded(encoded by php's base64 function) string directly as a string
rather than have it encoded by the util.base64 method. This produces a
'Internal Server error' and status code 500. But when i use the util.base64
method, i get a 'Bad Request' response message and response code of 400.

>
>  However, now i get a 'Internal Server Error' message, error code 500 for
>> the workflow with id 34 encoded encoded using PHP's base64 encode function
>>
>
> I am confused. Where does PHP come into your Android App?

Not that i use it in the android app, but i was trying out different base64
encoding schemes.


>
>
>  and used as a raw string in the post body.
>> What correct java implementation for the base64 encoding can one use?
>>
>
> What is wrong with the android.util.Base64 ? You possibly need to try
> different options such as NO_WRAP.
>
Ok, i will try the options.


>
>  Cheers
>>
>
> Alan
>
> Thanks



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Alan Williams <al...@googlemail.com>.
On 04-Jul-15 01:58, Larry Akah wrote:
> i have been able to identify a major issue which is with the Base64
> encoding of the workflow data. The encoding doesn't seem to perform properly

Do you have an example?

> However, now i get a 'Internal Server Error' message, error code 500 for
> the workflow with id 34 encoded encoded using PHP's base64 encode function

I am confused. Where does PHP come into your Android App?

> and used as a raw string in the post body.
> What correct java implementation for the base64 encoding can one use?

What is wrong with the android.util.Base64 ? You possibly need to try 
different options such as NO_WRAP.

> Cheers

Alan


Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
i have been able to identify a major issue which is with the Base64
encoding of the workflow data. The encoding doesn't seem to perform properly
However, now i get a 'Internal Server Error' message, error code 500 for
the workflow with id 34 encoded encoded using PHP's base64 encode function
and used as a raw string in the post body.
What correct java implementation for the base64 encoding can one use?

Cheers

2015-07-03 19:30 GMT+01:00 Larry Akah <la...@gmail.com>:

> Workflow with id 16 is a t2flow workflow. I have used this one but the
> issue still seems to persist. error code 400 and response message 'bad
> Request'.
> It's strange. Normally, i would even expect an Internal Server error for
> invalid workflows or so , but this one is different.
>
> cheers
>
> 2015-07-03 17:09 GMT+01:00 Larry Akah <la...@gmail.com>:
>
>> Haven't really had to deal with such a situation. Still searching ...
>>
>> cheers
>>
>> 2015-07-03 17:09 GMT+01:00 Larry Akah <la...@gmail.com>:
>>
>>> Ok.
>>> Thanks will do that. Now , i get a 400 error code and a 'bad request'
>>> error message when using 'POST' as a request method for the http
>>> connection. When i use GET everything seems to be fine. so am just
>>> wondering why the request is going bad with a POST.
>>>
>>> Cheers
>>>
>>> 2015-07-03 17:05 GMT+01:00 alaninmcr <al...@googlemail.com>:
>>>
>>>> On 03/07/2015 16:27, Larry Akah wrote:
>>>>
>>>>> Could you guide me more, because according to documentation here:
>>>>> http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i
>>>>> don't
>>>>> see what i need to specify to get only t2 workflows.
>>>>>
>>>>
>>>> You can certainly check if they are t2 workflows by looking at the
>>>> content type of an individual workflow. It should have
>>>>
>>>> <content-type>application/vnd.taverna.t2flow+xml</content-type>
>>>>
>>>> and not
>>>>
>>>> <content-type>application/vnd.taverna.scufl+xml</content-type>
>>>>
>>>> So, you can get all the workflows and then filter out all of them
>>>> except t2 ones. I think there is a better way but cannot remember it
>>>> (Friday afternoon).
>>>>
>>>>  Cheers
>>>>>
>>>>
>>>> Alan
>>>>
>>>
>>>
>>>
>>> --
>>> *Akah Larry N.H*
>>>
>>> *Lead Software Engineer @ GiftedMom*
>>> *Founder IceTeck Inc*
>>> *www.iceteck.com*
>>>
>>> Developing technologies for emergence and sustainable development.
>>>
>>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Workflow with id 16 is a t2flow workflow. I have used this one but the
issue still seems to persist. error code 400 and response message 'bad
Request'.
It's strange. Normally, i would even expect an Internal Server error for
invalid workflows or so , but this one is different.

cheers

2015-07-03 17:09 GMT+01:00 Larry Akah <la...@gmail.com>:

> Haven't really had to deal with such a situation. Still searching ...
>
> cheers
>
> 2015-07-03 17:09 GMT+01:00 Larry Akah <la...@gmail.com>:
>
>> Ok.
>> Thanks will do that. Now , i get a 400 error code and a 'bad request'
>> error message when using 'POST' as a request method for the http
>> connection. When i use GET everything seems to be fine. so am just
>> wondering why the request is going bad with a POST.
>>
>> Cheers
>>
>> 2015-07-03 17:05 GMT+01:00 alaninmcr <al...@googlemail.com>:
>>
>>> On 03/07/2015 16:27, Larry Akah wrote:
>>>
>>>> Could you guide me more, because according to documentation here:
>>>> http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i
>>>> don't
>>>> see what i need to specify to get only t2 workflows.
>>>>
>>>
>>> You can certainly check if they are t2 workflows by looking at the
>>> content type of an individual workflow. It should have
>>>
>>> <content-type>application/vnd.taverna.t2flow+xml</content-type>
>>>
>>> and not
>>>
>>> <content-type>application/vnd.taverna.scufl+xml</content-type>
>>>
>>> So, you can get all the workflows and then filter out all of them except
>>> t2 ones. I think there is a better way but cannot remember it (Friday
>>> afternoon).
>>>
>>>  Cheers
>>>>
>>>
>>> Alan
>>>
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Haven't really had to deal with such a situation. Still searching ...

cheers

2015-07-03 17:09 GMT+01:00 Larry Akah <la...@gmail.com>:

> Ok.
> Thanks will do that. Now , i get a 400 error code and a 'bad request'
> error message when using 'POST' as a request method for the http
> connection. When i use GET everything seems to be fine. so am just
> wondering why the request is going bad with a POST.
>
> Cheers
>
> 2015-07-03 17:05 GMT+01:00 alaninmcr <al...@googlemail.com>:
>
>> On 03/07/2015 16:27, Larry Akah wrote:
>>
>>> Could you guide me more, because according to documentation here:
>>> http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i
>>> don't
>>> see what i need to specify to get only t2 workflows.
>>>
>>
>> You can certainly check if they are t2 workflows by looking at the
>> content type of an individual workflow. It should have
>>
>> <content-type>application/vnd.taverna.t2flow+xml</content-type>
>>
>> and not
>>
>> <content-type>application/vnd.taverna.scufl+xml</content-type>
>>
>> So, you can get all the workflows and then filter out all of them except
>> t2 ones. I think there is a better way but cannot remember it (Friday
>> afternoon).
>>
>>  Cheers
>>>
>>
>> Alan
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Ok.
Thanks will do that. Now , i get a 400 error code and a 'bad request' error
message when using 'POST' as a request method for the http connection. When
i use GET everything seems to be fine. so am just wondering why the request
is going bad with a POST.

Cheers

2015-07-03 17:05 GMT+01:00 alaninmcr <al...@googlemail.com>:

> On 03/07/2015 16:27, Larry Akah wrote:
>
>> Could you guide me more, because according to documentation here:
>> http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i
>> don't
>> see what i need to specify to get only t2 workflows.
>>
>
> You can certainly check if they are t2 workflows by looking at the content
> type of an individual workflow. It should have
>
> <content-type>application/vnd.taverna.t2flow+xml</content-type>
>
> and not
>
> <content-type>application/vnd.taverna.scufl+xml</content-type>
>
> So, you can get all the workflows and then filter out all of them except
> t2 ones. I think there is a better way but cannot remember it (Friday
> afternoon).
>
>  Cheers
>>
>
> Alan
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by alaninmcr <al...@googlemail.com>.
On 03/07/2015 16:27, Larry Akah wrote:
> Could you guide me more, because according to documentation here:
> http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i don't
> see what i need to specify to get only t2 workflows.

You can certainly check if they are t2 workflows by looking at the 
content type of an individual workflow. It should have

<content-type>application/vnd.taverna.t2flow+xml</content-type>

and not

<content-type>application/vnd.taverna.scufl+xml</content-type>

So, you can get all the workflows and then filter out all of them except 
t2 ones. I think there is a better way but cannot remember it (Friday 
afternoon).

> Cheers

Alan

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Could you guide me more, because according to documentation here:
http://wiki.myexperiment.org/index.php/Developer:WorkflowsResource i don't
see what i need to specify to get only t2 workflows.

Cheers

2015-07-03 16:21 GMT+01:00 alaninmcr <al...@googlemail.com>:

> On 03/07/2015 16:15, Larry Akah wrote:
>
>> am using workflows ending with .xml but they are t1 workflows.
>>
>
> Use t2 workflows. (You can get myExperiment to only return t2 workflows.)
>
> Alan
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by alaninmcr <al...@googlemail.com>.
On 03/07/2015 16:15, Larry Akah wrote:
> am using workflows ending with .xml but they are t1 workflows.

Use t2 workflows. (You can get myExperiment to only return t2 workflows.)

Alan


Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
am using workflows ending with .xml but they are t1 workflows.

2015-07-03 16:08 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I've just tried a T1 workflow and I don't think they work in the player.
> Got a 500 error back.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> Sent: 03 July 2015 16:03
> To: dev@taverna.incubator.apache.org
> Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
>
> Maybe you should try a T2 workflow like the basic xkcd one
> http://www.myexperiment.org/workflows/824.html
> I wonder if it's because you are trying a T1 workflow. The T1 workflows
> end in .xml and the T2 .t2flow. They are both XML though so don't worry
> about it. I don't know  if the player can do a T1 workflow.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> Sent: 03 July 2015 15:51
> To: dev@taverna.incubator.apache.org
> Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
>
> Have you tried sending the workflow using curl by putting the request ie
> {"workflow" : {  "document":"data:application/octet-stream;base64,BASE64
> ENCODE WORKFLOW GOES HERE"}} in a file eg wf.json and send using curl
> --verbose -u your_taverna_player_email_address -X POST -H "Content-Type:
> application/json" -d@wf.json http://heater .
> cs.man.ac.uk:3000/workflows.json
>
> If that works then it must be something in the code causing issues with
> the request. I'm going to have a look at the code but it is unlikely I will
> be able to properly debug today.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 15:38
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> The string data validates well with the online validator.
>
> 2015-07-03 15:24 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > Here is the output from my curl request which shows all the request
> > and response headers. There aren't really many headers needed. Check
> > your Authorization one....
> >
> > curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type:
> > application/json" -d@wf_enc2.json http://heater
> > .cs.man.ac.uk:3000/workflows.json Enter host password for user
> > 'ian.dunlop@manchester.ac.uk':
> > * Hostname was NOT found in DNS cache
> > *   Trying 130.88.193.100...
> > * Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
> > * Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> > > POST /workflows.json HTTP/1.1
> > > Authorization: <removed :) >
> > > User-Agent: curl/7.37.1
> > > Host: heater.cs.man.ac.uk:3000
> > > Accept: */*
> > > Content-Type: application/json
> > > Content-Length: 39759
> > > Expect: 100-continue
> > >
> > * Done waiting for 100-continue
> > < HTTP/1.1 201 Created
> > < X-Frame-Options: ALLOWALL
> > < X-Xss-Protection: 1; mode=block
> > < X-Content-Type-Options: nosniff
> > < X-Ua-Compatible: chrome=1
> > < Location: http://heater.cs.man.ac.uk:3000/workflows/2
> > < Content-Type: application/json; charset=utf-8 < Etag:
> > "61640e9efd5cbb04b9735c09dd228077"
> > < Cache-Control: max-age=0, private, must-revalidate < X-Request-Id:
> > d1dd1043-c78b-447d-9533-ee18ad581608
> > < X-Runtime: 0.902580
> > * Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted <
> > Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) < Date: Fri, 03 Jul 2015
> > 12:36:34 GMT < Content-Length: 386 < Connection: Keep-Alive <
> > * Connection #0 to host heater.cs.man.ac.uk left intact
> > {"id":2,"title":"Fetch today's xkcd comic","description":"Use the
> > local java plugins and some filtering operations to f etch the comic
> > strip image from http://xkcd.com/\n\nBased on the FetchDailyDilbert
> > workflow.","url":"http://heater.cs.m
> > an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian
> > Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
> > ":"2015-07-03T12:36:34.020Z"}
> >
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: alaninmcr [mailto:alaninmcr@googlemail.com]
> > Sent: 03 July 2015 14:58
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > Larry,
> >
> > It is worth using a tool like http://jsonlint.com/ to validate the
> > format of the JSON you are sending.
> >
> > Alan
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I've just tried a T1 workflow and I don't think they work in the player. Got a 500 error back.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk] 
Sent: 03 July 2015 16:03
To: dev@taverna.incubator.apache.org
Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,

Maybe you should try a T2 workflow like the basic xkcd one http://www.myexperiment.org/workflows/824.html
I wonder if it's because you are trying a T1 workflow. The T1 workflows end in .xml and the T2 .t2flow. They are both XML though so don't worry about it. I don't know  if the player can do a T1 workflow.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
Sent: 03 July 2015 15:51
To: dev@taverna.incubator.apache.org
Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,

Have you tried sending the workflow using curl by putting the request ie {"workflow" : {  "document":"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}} in a file eg wf.json and send using curl --verbose -u your_taverna_player_email_address -X POST -H "Content-Type: application/json" -d@wf.json http://heater .cs.man.ac.uk:3000/workflows.json

If that works then it must be something in the code causing issues with the request. I'm going to have a look at the code but it is unlikely I will be able to properly debug today.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com]
Sent: 03 July 2015 15:38
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

The string data validates well with the online validator.

2015-07-03 15:24 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Here is the output from my curl request which shows all the request 
> and response headers. There aren't really many headers needed. Check 
> your Authorization one....
>
> curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type:
> application/json" -d@wf_enc2.json http://heater 
> .cs.man.ac.uk:3000/workflows.json Enter host password for user
> 'ian.dunlop@manchester.ac.uk':
> * Hostname was NOT found in DNS cache
> *   Trying 130.88.193.100...
> * Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
> * Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> > POST /workflows.json HTTP/1.1
> > Authorization: <removed :) >
> > User-Agent: curl/7.37.1
> > Host: heater.cs.man.ac.uk:3000
> > Accept: */*
> > Content-Type: application/json
> > Content-Length: 39759
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 201 Created
> < X-Frame-Options: ALLOWALL
> < X-Xss-Protection: 1; mode=block
> < X-Content-Type-Options: nosniff
> < X-Ua-Compatible: chrome=1
> < Location: http://heater.cs.man.ac.uk:3000/workflows/2
> < Content-Type: application/json; charset=utf-8 < Etag: 
> "61640e9efd5cbb04b9735c09dd228077"
> < Cache-Control: max-age=0, private, must-revalidate < X-Request-Id: 
> d1dd1043-c78b-447d-9533-ee18ad581608
> < X-Runtime: 0.902580
> * Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted <
> Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) < Date: Fri, 03 Jul 2015
> 12:36:34 GMT < Content-Length: 386 < Connection: Keep-Alive <
> * Connection #0 to host heater.cs.man.ac.uk left intact 
> {"id":2,"title":"Fetch today's xkcd comic","description":"Use the 
> local java plugins and some filtering operations to f etch the comic 
> strip image from http://xkcd.com/\n\nBased on the FetchDailyDilbert 
> workflow.","url":"http://heater.cs.m
> an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian
> Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
> ":"2015-07-03T12:36:34.020Z"}
>
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: alaninmcr [mailto:alaninmcr@googlemail.com]
> Sent: 03 July 2015 14:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Larry,
>
> It is worth using a tool like http://jsonlint.com/ to validate the 
> format of the JSON you are sending.
>
> Alan
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Maybe you should try a T2 workflow like the basic xkcd one http://www.myexperiment.org/workflows/824.html
I wonder if it's because you are trying a T1 workflow. The T1 workflows end in .xml and the T2 .t2flow. They are both XML though so don't worry about it. I don't know  if the player can do a T1 workflow.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk] 
Sent: 03 July 2015 15:51
To: dev@taverna.incubator.apache.org
Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,

Have you tried sending the workflow using curl by putting the request ie {"workflow" : {  "document":"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}} in a file eg wf.json and send using curl --verbose -u your_taverna_player_email_address -X POST -H "Content-Type: application/json" -d@wf.json http://heater .cs.man.ac.uk:3000/workflows.json

If that works then it must be something in the code causing issues with the request. I'm going to have a look at the code but it is unlikely I will be able to properly debug today.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com]
Sent: 03 July 2015 15:38
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

The string data validates well with the online validator.

2015-07-03 15:24 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Here is the output from my curl request which shows all the request 
> and response headers. There aren't really many headers needed. Check 
> your Authorization one....
>
> curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type:
> application/json" -d@wf_enc2.json http://heater 
> .cs.man.ac.uk:3000/workflows.json Enter host password for user
> 'ian.dunlop@manchester.ac.uk':
> * Hostname was NOT found in DNS cache
> *   Trying 130.88.193.100...
> * Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
> * Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> > POST /workflows.json HTTP/1.1
> > Authorization: <removed :) >
> > User-Agent: curl/7.37.1
> > Host: heater.cs.man.ac.uk:3000
> > Accept: */*
> > Content-Type: application/json
> > Content-Length: 39759
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 201 Created
> < X-Frame-Options: ALLOWALL
> < X-Xss-Protection: 1; mode=block
> < X-Content-Type-Options: nosniff
> < X-Ua-Compatible: chrome=1
> < Location: http://heater.cs.man.ac.uk:3000/workflows/2
> < Content-Type: application/json; charset=utf-8 < Etag: 
> "61640e9efd5cbb04b9735c09dd228077"
> < Cache-Control: max-age=0, private, must-revalidate < X-Request-Id: 
> d1dd1043-c78b-447d-9533-ee18ad581608
> < X-Runtime: 0.902580
> * Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted <
> Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) < Date: Fri, 03 Jul 2015
> 12:36:34 GMT < Content-Length: 386 < Connection: Keep-Alive <
> * Connection #0 to host heater.cs.man.ac.uk left intact 
> {"id":2,"title":"Fetch today's xkcd comic","description":"Use the 
> local java plugins and some filtering operations to f etch the comic 
> strip image from http://xkcd.com/\n\nBased on the FetchDailyDilbert 
> workflow.","url":"http://heater.cs.m
> an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian
> Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
> ":"2015-07-03T12:36:34.020Z"}
>
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: alaninmcr [mailto:alaninmcr@googlemail.com]
> Sent: 03 July 2015 14:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Larry,
>
> It is worth using a tool like http://jsonlint.com/ to validate the 
> format of the JSON you are sending.
>
> Alan
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Have you tried sending the workflow using curl by putting the request ie {"workflow" : {  "document":"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}} in a file eg wf.json and send using 
curl --verbose -u your_taverna_player_email_address -X POST -H "Content-Type: application/json" -d@wf.json http://heater .cs.man.ac.uk:3000/workflows.json

If that works then it must be something in the code causing issues with the request. I'm going to have a look at the code but it is unlikely I will be able to properly debug today.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 03 July 2015 15:38
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

The string data validates well with the online validator.

2015-07-03 15:24 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Here is the output from my curl request which shows all the request 
> and response headers. There aren't really many headers needed. Check 
> your Authorization one....
>
> curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type:
> application/json" -d@wf_enc2.json http://heater 
> .cs.man.ac.uk:3000/workflows.json Enter host password for user 
> 'ian.dunlop@manchester.ac.uk':
> * Hostname was NOT found in DNS cache
> *   Trying 130.88.193.100...
> * Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
> * Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> > POST /workflows.json HTTP/1.1
> > Authorization: <removed :) >
> > User-Agent: curl/7.37.1
> > Host: heater.cs.man.ac.uk:3000
> > Accept: */*
> > Content-Type: application/json
> > Content-Length: 39759
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 201 Created
> < X-Frame-Options: ALLOWALL
> < X-Xss-Protection: 1; mode=block
> < X-Content-Type-Options: nosniff
> < X-Ua-Compatible: chrome=1
> < Location: http://heater.cs.man.ac.uk:3000/workflows/2
> < Content-Type: application/json; charset=utf-8 < Etag: 
> "61640e9efd5cbb04b9735c09dd228077"
> < Cache-Control: max-age=0, private, must-revalidate < X-Request-Id: 
> d1dd1043-c78b-447d-9533-ee18ad581608
> < X-Runtime: 0.902580
> * Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted < 
> Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) < Date: Fri, 03 Jul 2015 
> 12:36:34 GMT < Content-Length: 386 < Connection: Keep-Alive <
> * Connection #0 to host heater.cs.man.ac.uk left intact 
> {"id":2,"title":"Fetch today's xkcd comic","description":"Use the 
> local java plugins and some filtering operations to f etch the comic 
> strip image from http://xkcd.com/\n\nBased on the FetchDailyDilbert 
> workflow.","url":"http://heater.cs.m
> an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian
> Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
> ":"2015-07-03T12:36:34.020Z"}
>
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: alaninmcr [mailto:alaninmcr@googlemail.com]
> Sent: 03 July 2015 14:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Larry,
>
> It is worth using a tool like http://jsonlint.com/ to validate the 
> format of the JSON you are sending.
>
> Alan
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
The string data validates well with the online validator.

2015-07-03 15:24 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Here is the output from my curl request which shows all the request and
> response headers. There aren't really many headers needed. Check your
> Authorization one....
>
> curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type:
> application/json" -d@wf_enc2.json http://heater
> .cs.man.ac.uk:3000/workflows.json
> Enter host password for user 'ian.dunlop@manchester.ac.uk':
> * Hostname was NOT found in DNS cache
> *   Trying 130.88.193.100...
> * Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
> * Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> > POST /workflows.json HTTP/1.1
> > Authorization: <removed :) >
> > User-Agent: curl/7.37.1
> > Host: heater.cs.man.ac.uk:3000
> > Accept: */*
> > Content-Type: application/json
> > Content-Length: 39759
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 201 Created
> < X-Frame-Options: ALLOWALL
> < X-Xss-Protection: 1; mode=block
> < X-Content-Type-Options: nosniff
> < X-Ua-Compatible: chrome=1
> < Location: http://heater.cs.man.ac.uk:3000/workflows/2
> < Content-Type: application/json; charset=utf-8
> < Etag: "61640e9efd5cbb04b9735c09dd228077"
> < Cache-Control: max-age=0, private, must-revalidate
> < X-Request-Id: d1dd1043-c78b-447d-9533-ee18ad581608
> < X-Runtime: 0.902580
> * Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted
> < Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
> < Date: Fri, 03 Jul 2015 12:36:34 GMT
> < Content-Length: 386
> < Connection: Keep-Alive
> <
> * Connection #0 to host heater.cs.man.ac.uk left intact
> {"id":2,"title":"Fetch today's xkcd comic","description":"Use the local
> java plugins and some filtering operations to f
> etch the comic strip image from http://xkcd.com/\n\nBased on the
> FetchDailyDilbert workflow.","url":"http://heater.cs.m
> an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian
> Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
> ":"2015-07-03T12:36:34.020Z"}
>
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: alaninmcr [mailto:alaninmcr@googlemail.com]
> Sent: 03 July 2015 14:58
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Larry,
>
> It is worth using a tool like http://jsonlint.com/ to validate the format
> of the JSON you are sending.
>
> Alan
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Here is the output from my curl request which shows all the request and response headers. There aren't really many headers needed. Check your Authorization one....

curl --verbose -u ian.dunlop@manchester.ac.uk -X POST -H "Content-Type: application/json" -d@wf_enc2.json http://heater
.cs.man.ac.uk:3000/workflows.json
Enter host password for user 'ian.dunlop@manchester.ac.uk':
* Hostname was NOT found in DNS cache
*   Trying 130.88.193.100...
* Connected to heater.cs.man.ac.uk (130.88.193.100) port 3000 (#0)
* Server auth using Basic with user 'ian.dunlop@manchester.ac.uk'
> POST /workflows.json HTTP/1.1
> Authorization: <removed :) >
> User-Agent: curl/7.37.1
> Host: heater.cs.man.ac.uk:3000
> Accept: */*
> Content-Type: application/json
> Content-Length: 39759
> Expect: 100-continue
>
* Done waiting for 100-continue
< HTTP/1.1 201 Created
< X-Frame-Options: ALLOWALL
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Ua-Compatible: chrome=1
< Location: http://heater.cs.man.ac.uk:3000/workflows/2
< Content-Type: application/json; charset=utf-8
< Etag: "61640e9efd5cbb04b9735c09dd228077"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: d1dd1043-c78b-447d-9533-ee18ad581608
< X-Runtime: 0.902580
* Server WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) is not blacklisted
< Server: WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
< Date: Fri, 03 Jul 2015 12:36:34 GMT
< Content-Length: 386
< Connection: Keep-Alive
<
* Connection #0 to host heater.cs.man.ac.uk left intact
{"id":2,"title":"Fetch today's xkcd comic","description":"Use the local java plugins and some filtering operations to f
etch the comic strip image from http://xkcd.com/\n\nBased on the FetchDailyDilbert workflow.","url":"http://heater.cs.m
an.ac.uk:3000/workflows/2.json","user":{"id":2,"name":"Ian Dunlop"},"created_at":"2015-07-03T12:36:34.020Z","updated_at
":"2015-07-03T12:36:34.020Z"}


Cheers,

Ian

-----Original Message-----
From: alaninmcr [mailto:alaninmcr@googlemail.com] 
Sent: 03 July 2015 14:58
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Larry,

It is worth using a tool like http://jsonlint.com/ to validate the format of the JSON you are sending.

Alan


Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by alaninmcr <al...@googlemail.com>.
Larry,

It is worth using a tool like http://jsonlint.com/ to validate the 
format of the JSON you are sending.

Alan


Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
ok, checkout my repository.
The code is exactly as it should be. Am worried the error is really not
from the data sent over the http. Maybe some more headers are required.

thanks

2015-07-03 14:28 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Pretty much except the keys need quotes around them. Something like this:
> String post = "{\"workflow\":
> {\"document\":\"data:application/octet-stream;base64,\""+Base64.encodeToString(sb.toString().getBytes(),
> Base64.DEFAULT)+"\"}}\"";
>
> I think you need to escape the quotes inside the json formatted request
> inside the java string  but when this is sent across the wire the escaping
> will not be there.
> When you System.out.println(post) it should show you it as it will send it
> without any escaping (I think, haven't got an IDE handy to check this).
>
> So, it might actually be that you had it right earlier, it's too hard to
> tell it from reading inside an email  - would be easier to look at the code
> in your repo.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 14:14
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> So, you are saying the string should look like this?
>
> String post =
>
> {workflow:{document:data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
> Base64.DEFAULT)+"}}";
>
> I get the error code: 400 and message: 'Bad request'
>
> Might want to have a look at the following code snippet:
>
>                 String basicAuth = Base64.encodeToString(new
> > String("username:password").getBytes(), Base64.DEFAULT);
> >
>                 URL posturl = new URL(playerurl);
> >                 HttpURLConnection connection = (HttpURLConnection)
> > posturl.openConnection();
> >                 connection.setRequestProperty("Authorization",
> basicAuth);
> >                 connection.setRequestProperty("Content-Type",
> > "application/json");
> >                 connection.setRequestMethod("POST");
> >                 connection.connect(); //send request
> >
>
>
> >                 DataOutputStream dos = new
> > DataOutputStream(connection.getOutputStream());
> >                 dos.writeBytes(post);//write post data which is a
> > formatted json data representing body of workflow
> >                 //dos.writeUTF("");
> >                 dos.flush();
> >                 dos.close();
> >
> Cheers
>
>
> 2015-07-03 14:04 GMT+01:00 Larry Akah <la...@gmail.com>:
>
> > the code is already in my repository
> >
> > 2015-07-03 14:01 GMT+01:00 Larry Akah <la...@gmail.com>:
> >
> >> Ok, let me try that.
> >>
> >> Thanks
> >>
> >> 2015-07-03 13:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >>
> >>> Hello,
> >>>
> >>> There should be no encoding in the request, there should be no /",
> >>> it's just a plain string. I think you are getting confused by the
> >>> JSON. The request is not JSON encoded, it is JSON formatted ie. Key
> >>> value pairs. Look at the request I included in this thread and use
> >>> it as a template in your code.  I guess the http connection will
> >>> send it across the wire with whatever encoding is required by http.
> >>>
> >>> {"workflow" : {  "document"
> >>> :"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES
> >>> HERE"}}
> >>>
> >>> PS. Don't forget to sync your code with github as often as you can
> >>> so we can help you out with things like this much easier.
> >>>
> >>> Cheers,
> >>>
> >>> Ian
> >>>
> >>> -----Original Message-----
> >>> From: Larry Akah [mailto:larryakah@gmail.com]
> >>> Sent: 03 July 2015 13:52
> >>> To: dev@taverna.incubator.apache.org
> >>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> >>> player
> >>>
> >>> Am no longer using the json. i have simply constructed the body as a
> >>> string:
> >>>
> >>>  String data =
> >>>
> >>> "{\"document\":\"data:application/octet-stream;base64,"+Base64.encod
> >>> eToString(sb.toString().getBytes(),
> >>> Base64.DEFAULT)+"\"}";
> >>>
> >>>  String post = "{\"workflow:\""+data+"}";
> >>>
> >>> then i write the 'post' string to the player url
> >>>
> >>> Cheers
> >>>
> >>>
> >>> 2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >>>
> >>> > Hello,
> >>> >
> >>> > Maybe the JSONObject postJson or
> >>> > dos.writeBytes(postJson.toString());
> >>> > in
> >>> > https://github.com/larrytech7/incubator-taverna-mobile/blob/master
> >>> > /app
> >>> > /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails
> >>> > /Wor kflowdetailFragment.java is not doing what you think it
> >>> > should. Try creating the request as a string rather than using the
> >>> > JSONObject. It is just a string like in my message below.
> >>> >
> >>> > Cheers,
> >>> >
> >>> > Ian
> >>> >
> >>> > -----Original Message-----
> >>> > From: Larry Akah [mailto:larryakah@gmail.com]
> >>> > Sent: 03 July 2015 13:47
> >>> > To: dev@taverna.incubator.apache.org
> >>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the
> >>> > Taverna player
> >>> >
> >>> > I did the same thing with a Chrome REST client and it worked ok,
> >>> > but from the java request, i don't seem to figure out exactly what
> >>> > could be happening behind the scenes.
> >>> >
> >>> > 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >>> >
> >>> > > Hello,
> >>> > >
> >>> > > I just tried sending a workflow using curl with the request
> >>> > > formatted like below and the player is working ok and sent back
> >>> > > the correct
> >>> > response.
> >>> > >
> >>> > > {"workflow" : {  "document" :
> >>> > > "data:application/octet-stream;base64,BASE64
> >>> > > ENCODE WORKFLOW GOES HERE"}}
> >>> > >
> >>> > > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded
> >>> > > version of the workflow with no url encoding.
> >>> > >
> >>> > > Cheers,
> >>> > >
> >>> > > Ian
> >>> > >
> >>> > > -----Original Message-----
> >>> > > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> >>> > > Sent: 03 July 2015 13:29
> >>> > > To: dev@taverna.incubator.apache.org
> >>> > > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the
> >>> > > Taverna player
> >>> > >
> >>> > > Hello,
> >>> > >
> >>> > > Unfortunately I can't see your request in the logs for some
> >>> > > reason (some docker issue that we don't understand). Can you
> >>> > > paste the body in an email (remember not to include any
> username/password stuff).
> >>> > >
> >>> > > Cheers,
> >>> > >
> >>> > > Ian
> >>> > >
> >>> > > -----Original Message-----
> >>> > > From: Larry Akah [mailto:larryakah@gmail.com]
> >>> > > Sent: 03 July 2015 12:26
> >>> > > To: dev@taverna.incubator.apache.org
> >>> > > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna
> >>> > > player
> >>> > >
> >>> > > Hello, now, am posting the body exactly as described without
> >>> > > encoding with json and am getting a 400 bad request message.
> >>> > > Anything that could be done about that?
> >>> > >
> >>> > > Cheers
> >>> > >
> >>> > >
> >>> > > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ian.Dunlop@manchester.ac.uk
> >:
> >>> > >
> >>> > > > Hello,
> >>> > > >
> >>> > > > That’s good news. Can’t wait to see it working in the app –
> >>> > > > let me know when you have committed the code. By the way, I
> >>> > > > think the mailing list removes attachments, probably best to
> >>> > > > either add screenshots to JIRA or send links to the
> >>> > > > screenshots in something like dropbox or
> >>> > > google drive.
> >>> > > >
> >>> > > > Cheers,
> >>> > > >
> >>> > > > Ian
> >>> > > >
> >>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
> >>> > > > Sent: 01 July 2015 20:07
> >>> > > > To: dev@taverna.incubator.apache.org
> >>> > > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
> >>> > > > error and app stops.
> >>> > > >
> >>> > > > Great, i think its working. I have tested it from a REST
> >>> > > > client in chrome and i receieved the 201 status code and the
> >>> > > > structure of the workflow. Find here attached a screenshot of
> the post request.
> >>> > > > Next up, i will be incorporating that into the app.
> >>> > > >
> >>> > > > cheers
> >>> > > >
> >>> > > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com
> <mailto:
> >>> > > > larryakah@gmail.com>>:
> >>> > > > Ok, thanks.
> >>> > > > When i try that, i will send my feedback.
> >>> > > >
> >>> > > > Cheers
> >>> > > >
> >>> > > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop
> >>> > > > <ian.dunlop@manchester.ac.uk
> >>> > > <mailto:
> >>> > > > ian.dunlop@manchester.ac.uk>>:
> >>> > > > -----BEGIN PGP SIGNED MESSAGE-----
> >>> > > > Hash: SHA1
> >>> > > >
> >>> > > > Hello,
> >>> > > >
> >>> > > > I think the workflow can just be sent as it is. The request is
> >>> > > > JSON formatted but the things inside the request don't have to
> be.
> >>> > > > The t2flow/xml can be sent base64 encoded as they are.
> >>> > > >
> >>> > > > Cheers,
> >>> > > >
> >>> > > > Ian
> >>> > > >
> >>> > > > On 30/06/15 12:32, Larry Akah wrote:
> >>> > > > > Hello, The workflows we get from myexperiment are formatted
> >>> > > > > as xml or t2flow files. Do these absolutely need to be
> >>> > > > > converted in json before posting or they can be sent as is?
> >>> > > > >
> >>> > > > > Cheers
> >>> > > > >
> >>> > > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> >>> > > > > <ian.dunlop@manchester.ac.uk<mailto:ian.dunlop@manchester.ac
> >>> > > > > .uk
> >>> >>:
> >>> > > > >
> >>> > > > > Hello,
> >>> > > > >
> >>> > > > > I've had a chat with the taverna player developer and you
> >>> > > > > need to send a request as follows:
> >>> > > > >
> >>> > > > > POST to /workflows.json
> >>> > > > >
> >>> > > > > {"workflow" : {  "document" :
> >>> > > > > "data:application/octet-stream;base64,BASE64 ENCODED
> >>> > > > > WORKFLOW GOES HERE"}}
> >>> > > > >
> >>> > > > > using HTTP basic auth with username:password base64 encoded
> >>> > > > > in the Authorization header in the request  e.g. Authorization:
> >>> > > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify
> >>> > > > > .json because the content type is not being respected for some
> reason.
> >>> > > > >
> >>> > > > >
> >>> > > > > Here's an example using curl: curl -u your_username -X POST
> >>> > > > > -H
> >>> > > > > "Content-Type: application/json"
> >>> > > > > -d@wf.json<ma...@wf.json>
> >>> > > > > http://taverna-player-server/workflows.json
> >>> > > > >
> >>> > > > > where wf.json is the workflow file, this would then prompt
> >>> > > > > for a passwor d. Hope this helps, please let us know how you
> get on.
> >>> > > > >
> >>> > > > > Cheers,
> >>> > > > >
> >>> > > > > Ian
> >>> > > > >
> >>> > > > > On 29/06/15 19:23, Larry Akah wrote:
> >>> > > > >>>> I need some help with uploading a workflow to the player.
> >>> > > > >>>> The API doesn't make it seem possible currently. How is it
> done?
> >>> > > > >>>>
> >>> > > > >>>> cheers
> >>> > > > >>>>
> >>> > > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah
> >>> > > > >>>> <larryakah@gmail.com
> >>> > <mailto:
> >>> > > > larryakah@gmail.com>>:
> >>> > > > >>>>
> >>> > > > >>>>> Yes, its not yet ready. i still need to adjust that
> >>> > > > >>>>> because at first , i was using the player to fetch
> >>> > > > >>>>> workflows and derived a run skeleton to use for creating
> >>> > > > >>>>> workflows. There is still some stuff that needs to be
> fixed there.
> >>> > > > >>>>>
> >>> > > > >>>>> Cheers
> >>> > > > >>>>>
> >>> > > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> >>> > > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@mancheste
> >>> > > > >>>>> r.ac
> >>> > > > >>>>> .uk
> >>> > >>:
> >>> > > > >>>>>
> >>> > > > >>>>>> Hello,
> >>> > > > >>>>>>
> >>> > > > >>>>>> I got a ‘fatal’ error which the emulator reported when
> >>> > > > >>>>>> clicking on ‘create run’:
> >>> > > > >>>>>>
> >>> > > > >>>>>> 06-29 15:25:39.554
> >>> > > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> >>> > > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> >>> > > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> >>> > > > >>>>>> java.lang.NullPointerException: Attempt to invoke
> >>> > > > >>>>>> virtual method 'void android.app.AlertDialog.show()' on
> >>> > > > >>>>>> a null object reference at
> >>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Wor
> >>> > > > >>>>>> kflo
> >>> > > > >>>>>> wd
> >>> > > > >>>>>> et
> >>> > > > >>>>>> ai
> >>> > > > lFr
> >>> > > > >
> >>> > > > >>>>>>
> >>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.ja
> >>> > > > va:4
> >>> > > > 07
> >>> > > > )
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > > at
> >>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Wor
> >>> > > > >>>>>> kflo
> >>> > > > >>>>>> wd
> >>> > > > >>>>>> et
> >>> > > > >>>>>> ai
> >>> > > > lFr
> >>> > > > >
> >>> > > > >>>>>>
> >>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.ja
> >>> > > > va:2
> >>> > > > 89
> >>> > > > )
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> >>> > > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> >>> > > > >>>>>> at
> >>> > > > >>>>>>
> >>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
> >>> > > > >>>>>> ja
> >>> > > > >>>>>> va
> >>> > > > :65
> >>> > > > >
> >>> > > > >>>>>>
> >>> > > > 3)
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > > at android.os.Handler.dispatchMessage(Handler.java:102)
> >>> > > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> >>> > > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:525
> >>> > > > >>>>>> 7) at java.lang.reflect.Method.invoke(Native Method) at
> >>> > > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> >>> > > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.
> >>> > > > >>>>>> run(
> >>> > > > >>>>>> Zy
> >>> > > > >>>>>> go
> >>> > > > >>>>>> te
> >>> > > > Ini
> >>> > > > >
> >>> > > > >>>>>>
> >>> > > > t.java:903)
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > > at
> >>> > > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java
> >>> > > > >>>>>> :698
> >>> > > > >>>>>> )
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > >>>>>>
> >>> > > > The device reported that the app had stopped running but in
> >>> > > > >>>>>> fact it returned it to the workflows view but all the
> >>> > > > >>>>>> workflows had disappeared from the view. I guess it’s
> >>> > > > >>>>>> probably because this functionality is not ready yet
> >>> > > > >>>>>> but I figured I should report it anyway.
> >>> > > > >>>>>>
> >>> > > > >>>>>> Cheers,
> >>> > > > >>>>>>
> >>> > > > >>>>>> Ian
> >>> > > > >>>>>>
> >>> > > > >>>>>
> >>> > > > >>>>>
> >>> > > > >>>>>
> >>> > > > >>>>> -- *Akah Larry N.H*
> >>> > > > >>>>>
> >>> > > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck
> >>> > > > >>>>> Inc*
> >>> > > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> >>> > > > >>>>>
> >>> > > > >>>>> Developing technologies for emergence and sustainable
> >>> > > > >>>>> development.
> >>> > > > >>>>>
> >>> > > > >>>>>
> >>> > > > >>>>
> >>> > > > >>>>
> >>> > > > >>
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > -----BEGIN PGP SIGNATURE-----
> >>> > > > Version: GnuPG v1
> >>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOM
> >>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+fY
> >>> > > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeq
> >>> > > > p+
> >>> > > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcER
> >>> > > > l8
> >>> > > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF
> >>> > > > 35
> >>> > > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP
> >>> > > > 1X
> >>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wb
> >>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+s=
> >>> > > > =RrFl
> >>> > > > -----END PGP SIGNATURE-----
> >>> > > >
> >>> > > >
> >>> > > >
> >>> > > > --
> >>> > > > *Akah Larry N.H*
> >>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>> > > > *www.iceteck.com<http://www.iceteck.com>*
> >>> > > >
> >>> > > > Developing technologies for emergence and sustainable
> development.
> >>> > > >
> >>> > > >
> >>> > > >
> >>> > > > --
> >>> > > > *Akah Larry N.H*
> >>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>> > > > *www.iceteck.com<http://www.iceteck.com>*
> >>> > > >
> >>> > > > Developing technologies for emergence and sustainable
> development.
> >>> > > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > *Akah Larry N.H*
> >>> > >
> >>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>> > > *www.iceteck.com*
> >>> > >
> >>> > > Developing technologies for emergence and sustainable development.
> >>> > >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > *Akah Larry N.H*
> >>> >
> >>> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>> > *www.iceteck.com*
> >>> >
> >>> > Developing technologies for emergence and sustainable development.
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> *Akah Larry N.H*
> >>>
> >>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>> *www.iceteck.com*
> >>>
> >>> Developing technologies for emergence and sustainable development.
> >>>
> >>
> >>
> >>
> >> --
> >> *Akah Larry N.H*
> >>
> >> *Lead Software Engineer @ GiftedMom*
> >> *Founder IceTeck Inc*
> >> *www.iceteck.com*
> >>
> >> Developing technologies for emergence and sustainable development.
> >>
> >>
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by alaninmcr <al...@googlemail.com>.
On 03/07/2015 14:28, Ian Dunlop wrote:
> Hello,
>
> Pretty much except the keys need quotes around them. Something like this:
> String post = "{\"workflow\": {\"document\":\"data:application/octet-stream;base64,\""+Base64.encodeToString(sb.toString().getBytes(),

You should not call getBytes on a String without specifying the 
character set you want to use. It will default to the platform's 
character set; this causes difficult to debug errors.

Alan

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Pretty much except the keys need quotes around them. Something like this:
String post = "{\"workflow\": {\"document\":\"data:application/octet-stream;base64,\""+Base64.encodeToString(sb.toString().getBytes(),
Base64.DEFAULT)+"\"}}\"";

I think you need to escape the quotes inside the json formatted request inside the java string  but when this is sent across the wire the escaping will not be there.
When you System.out.println(post) it should show you it as it will send it without any escaping (I think, haven't got an IDE handy to check this).

So, it might actually be that you had it right earlier, it's too hard to tell it from reading inside an email  - would be easier to look at the code in your repo. 

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 03 July 2015 14:14
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

So, you are saying the string should look like this?

String post =
{workflow:{document:data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
Base64.DEFAULT)+"}}";

I get the error code: 400 and message: 'Bad request'

Might want to have a look at the following code snippet:

                String basicAuth = Base64.encodeToString(new
> String("username:password").getBytes(), Base64.DEFAULT);
>
                URL posturl = new URL(playerurl);
>                 HttpURLConnection connection = (HttpURLConnection) 
> posturl.openConnection();
>                 connection.setRequestProperty("Authorization", basicAuth);
>                 connection.setRequestProperty("Content-Type",
> "application/json");
>                 connection.setRequestMethod("POST");
>                 connection.connect(); //send request
>


>                 DataOutputStream dos = new 
> DataOutputStream(connection.getOutputStream());
>                 dos.writeBytes(post);//write post data which is a 
> formatted json data representing body of workflow
>                 //dos.writeUTF("");
>                 dos.flush();
>                 dos.close();
>
Cheers


2015-07-03 14:04 GMT+01:00 Larry Akah <la...@gmail.com>:

> the code is already in my repository
>
> 2015-07-03 14:01 GMT+01:00 Larry Akah <la...@gmail.com>:
>
>> Ok, let me try that.
>>
>> Thanks
>>
>> 2015-07-03 13:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>>> Hello,
>>>
>>> There should be no encoding in the request, there should be no /", 
>>> it's just a plain string. I think you are getting confused by the 
>>> JSON. The request is not JSON encoded, it is JSON formatted ie. Key 
>>> value pairs. Look at the request I included in this thread and use 
>>> it as a template in your code.  I guess the http connection will 
>>> send it across the wire with whatever encoding is required by http.
>>>
>>> {"workflow" : {  "document"
>>> :"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES 
>>> HERE"}}
>>>
>>> PS. Don't forget to sync your code with github as often as you can 
>>> so we can help you out with things like this much easier.
>>>
>>> Cheers,
>>>
>>> Ian
>>>
>>> -----Original Message-----
>>> From: Larry Akah [mailto:larryakah@gmail.com]
>>> Sent: 03 July 2015 13:52
>>> To: dev@taverna.incubator.apache.org
>>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
>>> player
>>>
>>> Am no longer using the json. i have simply constructed the body as a
>>> string:
>>>
>>>  String data =
>>>
>>> "{\"document\":\"data:application/octet-stream;base64,"+Base64.encod
>>> eToString(sb.toString().getBytes(),
>>> Base64.DEFAULT)+"\"}";
>>>
>>>  String post = "{\"workflow:\""+data+"}";
>>>
>>> then i write the 'post' string to the player url
>>>
>>> Cheers
>>>
>>>
>>> 2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>>
>>> > Hello,
>>> >
>>> > Maybe the JSONObject postJson or 
>>> > dos.writeBytes(postJson.toString());
>>> > in
>>> > https://github.com/larrytech7/incubator-taverna-mobile/blob/master
>>> > /app 
>>> > /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails
>>> > /Wor kflowdetailFragment.java is not doing what you think it 
>>> > should. Try creating the request as a string rather than using the 
>>> > JSONObject. It is just a string like in my message below.
>>> >
>>> > Cheers,
>>> >
>>> > Ian
>>> >
>>> > -----Original Message-----
>>> > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > Sent: 03 July 2015 13:47
>>> > To: dev@taverna.incubator.apache.org
>>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the 
>>> > Taverna player
>>> >
>>> > I did the same thing with a Chrome REST client and it worked ok, 
>>> > but from the java request, i don't seem to figure out exactly what 
>>> > could be happening behind the scenes.
>>> >
>>> > 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>> >
>>> > > Hello,
>>> > >
>>> > > I just tried sending a workflow using curl with the request 
>>> > > formatted like below and the player is working ok and sent back 
>>> > > the correct
>>> > response.
>>> > >
>>> > > {"workflow" : {  "document" :
>>> > > "data:application/octet-stream;base64,BASE64
>>> > > ENCODE WORKFLOW GOES HERE"}}
>>> > >
>>> > > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded 
>>> > > version of the workflow with no url encoding.
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Ian
>>> > >
>>> > > -----Original Message-----
>>> > > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
>>> > > Sent: 03 July 2015 13:29
>>> > > To: dev@taverna.incubator.apache.org
>>> > > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the 
>>> > > Taverna player
>>> > >
>>> > > Hello,
>>> > >
>>> > > Unfortunately I can't see your request in the logs for some 
>>> > > reason (some docker issue that we don't understand). Can you 
>>> > > paste the body in an email (remember not to include any username/password stuff).
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Ian
>>> > >
>>> > > -----Original Message-----
>>> > > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > > Sent: 03 July 2015 12:26
>>> > > To: dev@taverna.incubator.apache.org
>>> > > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna 
>>> > > player
>>> > >
>>> > > Hello, now, am posting the body exactly as described without 
>>> > > encoding with json and am getting a 400 bad request message.
>>> > > Anything that could be done about that?
>>> > >
>>> > > Cheers
>>> > >
>>> > >
>>> > > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>> > >
>>> > > > Hello,
>>> > > >
>>> > > > That’s good news. Can’t wait to see it working in the app – 
>>> > > > let me know when you have committed the code. By the way, I 
>>> > > > think the mailing list removes attachments, probably best to 
>>> > > > either add screenshots to JIRA or send links to the 
>>> > > > screenshots in something like dropbox or
>>> > > google drive.
>>> > > >
>>> > > > Cheers,
>>> > > >
>>> > > > Ian
>>> > > >
>>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > > > Sent: 01 July 2015 20:07
>>> > > > To: dev@taverna.incubator.apache.org
>>> > > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
>>> > > > error and app stops.
>>> > > >
>>> > > > Great, i think its working. I have tested it from a REST 
>>> > > > client in chrome and i receieved the 201 status code and the 
>>> > > > structure of the workflow. Find here attached a screenshot of the post request.
>>> > > > Next up, i will be incorporating that into the app.
>>> > > >
>>> > > > cheers
>>> > > >
>>> > > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
>>> > > > larryakah@gmail.com>>:
>>> > > > Ok, thanks.
>>> > > > When i try that, i will send my feedback.
>>> > > >
>>> > > > Cheers
>>> > > >
>>> > > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop 
>>> > > > <ian.dunlop@manchester.ac.uk
>>> > > <mailto:
>>> > > > ian.dunlop@manchester.ac.uk>>:
>>> > > > -----BEGIN PGP SIGNED MESSAGE-----
>>> > > > Hash: SHA1
>>> > > >
>>> > > > Hello,
>>> > > >
>>> > > > I think the workflow can just be sent as it is. The request is 
>>> > > > JSON formatted but the things inside the request don't have to be.
>>> > > > The t2flow/xml can be sent base64 encoded as they are.
>>> > > >
>>> > > > Cheers,
>>> > > >
>>> > > > Ian
>>> > > >
>>> > > > On 30/06/15 12:32, Larry Akah wrote:
>>> > > > > Hello, The workflows we get from myexperiment are formatted 
>>> > > > > as xml or t2flow files. Do these absolutely need to be 
>>> > > > > converted in json before posting or they can be sent as is?
>>> > > > >
>>> > > > > Cheers
>>> > > > >
>>> > > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop 
>>> > > > > <ian.dunlop@manchester.ac.uk<mailto:ian.dunlop@manchester.ac
>>> > > > > .uk
>>> >>:
>>> > > > >
>>> > > > > Hello,
>>> > > > >
>>> > > > > I've had a chat with the taverna player developer and you 
>>> > > > > need to send a request as follows:
>>> > > > >
>>> > > > > POST to /workflows.json
>>> > > > >
>>> > > > > {"workflow" : {  "document" :
>>> > > > > "data:application/octet-stream;base64,BASE64 ENCODED 
>>> > > > > WORKFLOW GOES HERE"}}
>>> > > > >
>>> > > > > using HTTP basic auth with username:password base64 encoded 
>>> > > > > in the Authorization header in the request  e.g. Authorization:
>>> > > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify 
>>> > > > > .json because the content type is not being respected for some reason.
>>> > > > >
>>> > > > >
>>> > > > > Here's an example using curl: curl -u your_username -X POST 
>>> > > > > -H
>>> > > > > "Content-Type: application/json" 
>>> > > > > -d@wf.json<ma...@wf.json> 
>>> > > > > http://taverna-player-server/workflows.json
>>> > > > >
>>> > > > > where wf.json is the workflow file, this would then prompt 
>>> > > > > for a passwor d. Hope this helps, please let us know how you get on.
>>> > > > >
>>> > > > > Cheers,
>>> > > > >
>>> > > > > Ian
>>> > > > >
>>> > > > > On 29/06/15 19:23, Larry Akah wrote:
>>> > > > >>>> I need some help with uploading a workflow to the player. 
>>> > > > >>>> The API doesn't make it seem possible currently. How is it done?
>>> > > > >>>>
>>> > > > >>>> cheers
>>> > > > >>>>
>>> > > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah 
>>> > > > >>>> <larryakah@gmail.com
>>> > <mailto:
>>> > > > larryakah@gmail.com>>:
>>> > > > >>>>
>>> > > > >>>>> Yes, its not yet ready. i still need to adjust that 
>>> > > > >>>>> because at first , i was using the player to fetch 
>>> > > > >>>>> workflows and derived a run skeleton to use for creating 
>>> > > > >>>>> workflows. There is still some stuff that needs to be fixed there.
>>> > > > >>>>>
>>> > > > >>>>> Cheers
>>> > > > >>>>>
>>> > > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop 
>>> > > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@mancheste
>>> > > > >>>>> r.ac
>>> > > > >>>>> .uk
>>> > >>:
>>> > > > >>>>>
>>> > > > >>>>>> Hello,
>>> > > > >>>>>>
>>> > > > >>>>>> I got a ‘fatal’ error which the emulator reported when 
>>> > > > >>>>>> clicking on ‘create run’:
>>> > > > >>>>>>
>>> > > > >>>>>> 06-29 15:25:39.554
>>> > > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
>>> > > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
>>> > > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
>>> > > > >>>>>> java.lang.NullPointerException: Attempt to invoke 
>>> > > > >>>>>> virtual method 'void android.app.AlertDialog.show()' on 
>>> > > > >>>>>> a null object reference at 
>>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Wor
>>> > > > >>>>>> kflo
>>> > > > >>>>>> wd
>>> > > > >>>>>> et
>>> > > > >>>>>> ai
>>> > > > lFr
>>> > > > >
>>> > > > >>>>>>
>>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.ja
>>> > > > va:4
>>> > > > 07
>>> > > > )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at
>>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Wor
>>> > > > >>>>>> kflo
>>> > > > >>>>>> wd
>>> > > > >>>>>> et
>>> > > > >>>>>> ai
>>> > > > lFr
>>> > > > >
>>> > > > >>>>>>
>>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.ja
>>> > > > va:2
>>> > > > 89
>>> > > > )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
>>> > > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
>>> > > > >>>>>> at
>>> > > > >>>>>>
>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
>>> > > > >>>>>> ja
>>> > > > >>>>>> va
>>> > > > :65
>>> > > > >
>>> > > > >>>>>>
>>> > > > 3)
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at android.os.Handler.dispatchMessage(Handler.java:102)
>>> > > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
>>> > > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:525
>>> > > > >>>>>> 7) at java.lang.reflect.Method.invoke(Native Method) at
>>> > > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at 
>>> > > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.
>>> > > > >>>>>> run(
>>> > > > >>>>>> Zy
>>> > > > >>>>>> go
>>> > > > >>>>>> te
>>> > > > Ini
>>> > > > >
>>> > > > >>>>>>
>>> > > > t.java:903)
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at
>>> > > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java
>>> > > > >>>>>> :698
>>> > > > >>>>>> )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > The device reported that the app had stopped running but in
>>> > > > >>>>>> fact it returned it to the workflows view but all the 
>>> > > > >>>>>> workflows had disappeared from the view. I guess it’s 
>>> > > > >>>>>> probably because this functionality is not ready yet 
>>> > > > >>>>>> but I figured I should report it anyway.
>>> > > > >>>>>>
>>> > > > >>>>>> Cheers,
>>> > > > >>>>>>
>>> > > > >>>>>> Ian
>>> > > > >>>>>>
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>> -- *Akah Larry N.H*
>>> > > > >>>>>
>>> > > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck 
>>> > > > >>>>> Inc*
>>> > > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
>>> > > > >>>>>
>>> > > > >>>>> Developing technologies for emergence and sustainable 
>>> > > > >>>>> development.
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>
>>> > > > >>>>
>>> > > > >>
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > -----BEGIN PGP SIGNATURE-----
>>> > > > Version: GnuPG v1
>>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOM
>>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+fY
>>> > > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeq
>>> > > > p+
>>> > > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcER
>>> > > > l8
>>> > > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF
>>> > > > 35 
>>> > > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP
>>> > > > 1X
>>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wb
>>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+s=
>>> > > > =RrFl
>>> > > > -----END PGP SIGNATURE-----
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > *Akah Larry N.H*
>>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > > *www.iceteck.com<http://www.iceteck.com>*
>>> > > >
>>> > > > Developing technologies for emergence and sustainable development.
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > *Akah Larry N.H*
>>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > > *www.iceteck.com<http://www.iceteck.com>*
>>> > > >
>>> > > > Developing technologies for emergence and sustainable development.
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > *Akah Larry N.H*
>>> > >
>>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > *www.iceteck.com*
>>> > >
>>> > > Developing technologies for emergence and sustainable development.
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > *Akah Larry N.H*
>>> >
>>> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > *www.iceteck.com*
>>> >
>>> > Developing technologies for emergence and sustainable development.
>>> >
>>>
>>>
>>>
>>> --
>>> *Akah Larry N.H*
>>>
>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> *www.iceteck.com*
>>>
>>> Developing technologies for emergence and sustainable development.
>>>
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
So, you are saying the string should look like this?

String post =
{workflow:{document:data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
Base64.DEFAULT)+"}}";

I get the error code: 400 and message: 'Bad request'

Might want to have a look at the following code snippet:

                String basicAuth = Base64.encodeToString(new
> String("username:password").getBytes(), Base64.DEFAULT);
>
                URL posturl = new URL(playerurl);
>                 HttpURLConnection connection = (HttpURLConnection)
> posturl.openConnection();
>                 connection.setRequestProperty("Authorization", basicAuth);
>                 connection.setRequestProperty("Content-Type",
> "application/json");
>                 connection.setRequestMethod("POST");
>                 connection.connect(); //send request
>


>                 DataOutputStream dos = new
> DataOutputStream(connection.getOutputStream());
>                 dos.writeBytes(post);//write post data which is a
> formatted json data representing body of workflow
>                 //dos.writeUTF("");
>                 dos.flush();
>                 dos.close();
>
Cheers


2015-07-03 14:04 GMT+01:00 Larry Akah <la...@gmail.com>:

> the code is already in my repository
>
> 2015-07-03 14:01 GMT+01:00 Larry Akah <la...@gmail.com>:
>
>> Ok, let me try that.
>>
>> Thanks
>>
>> 2015-07-03 13:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>>> Hello,
>>>
>>> There should be no encoding in the request, there should be no /", it's
>>> just a plain string. I think you are getting confused by the JSON. The
>>> request is not JSON encoded, it is JSON formatted ie. Key value pairs. Look
>>> at the request I included in this thread and use it as a template in your
>>> code.  I guess the http connection will send it across the wire with
>>> whatever encoding is required by http.
>>>
>>> {"workflow" : {  "document"
>>> :"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}}
>>>
>>> PS. Don't forget to sync your code with github as often as you can so we
>>> can help you out with things like this much easier.
>>>
>>> Cheers,
>>>
>>> Ian
>>>
>>> -----Original Message-----
>>> From: Larry Akah [mailto:larryakah@gmail.com]
>>> Sent: 03 July 2015 13:52
>>> To: dev@taverna.incubator.apache.org
>>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>>> player
>>>
>>> Am no longer using the json. i have simply constructed the body as a
>>> string:
>>>
>>>  String data =
>>>
>>> "{\"document\":\"data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
>>> Base64.DEFAULT)+"\"}";
>>>
>>>  String post = "{\"workflow:\""+data+"}";
>>>
>>> then i write the 'post' string to the player url
>>>
>>> Cheers
>>>
>>>
>>> 2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>>
>>> > Hello,
>>> >
>>> > Maybe the JSONObject postJson or dos.writeBytes(postJson.toString());
>>> > in
>>> > https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app
>>> > /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/Wor
>>> > kflowdetailFragment.java is not doing what you think it should. Try
>>> > creating the request as a string rather than using the JSONObject. It
>>> > is just a string like in my message below.
>>> >
>>> > Cheers,
>>> >
>>> > Ian
>>> >
>>> > -----Original Message-----
>>> > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > Sent: 03 July 2015 13:47
>>> > To: dev@taverna.incubator.apache.org
>>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>>> > player
>>> >
>>> > I did the same thing with a Chrome REST client and it worked ok, but
>>> > from the java request, i don't seem to figure out exactly what could
>>> > be happening behind the scenes.
>>> >
>>> > 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>> >
>>> > > Hello,
>>> > >
>>> > > I just tried sending a workflow using curl with the request
>>> > > formatted like below and the player is working ok and sent back the
>>> > > correct
>>> > response.
>>> > >
>>> > > {"workflow" : {  "document" :
>>> > > "data:application/octet-stream;base64,BASE64
>>> > > ENCODE WORKFLOW GOES HERE"}}
>>> > >
>>> > > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded
>>> > > version of the workflow with no url encoding.
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Ian
>>> > >
>>> > > -----Original Message-----
>>> > > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
>>> > > Sent: 03 July 2015 13:29
>>> > > To: dev@taverna.incubator.apache.org
>>> > > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna
>>> > > player
>>> > >
>>> > > Hello,
>>> > >
>>> > > Unfortunately I can't see your request in the logs for some reason
>>> > > (some docker issue that we don't understand). Can you paste the body
>>> > > in an email (remember not to include any username/password stuff).
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Ian
>>> > >
>>> > > -----Original Message-----
>>> > > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > > Sent: 03 July 2015 12:26
>>> > > To: dev@taverna.incubator.apache.org
>>> > > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna
>>> > > player
>>> > >
>>> > > Hello, now, am posting the body exactly as described without
>>> > > encoding with json and am getting a 400 bad request message.
>>> > > Anything that could be done about that?
>>> > >
>>> > > Cheers
>>> > >
>>> > >
>>> > > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>> > >
>>> > > > Hello,
>>> > > >
>>> > > > That’s good news. Can’t wait to see it working in the app – let me
>>> > > > know when you have committed the code. By the way, I think the
>>> > > > mailing list removes attachments, probably best to either add
>>> > > > screenshots to JIRA or send links to the screenshots in something
>>> > > > like dropbox or
>>> > > google drive.
>>> > > >
>>> > > > Cheers,
>>> > > >
>>> > > > Ian
>>> > > >
>>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
>>> > > > Sent: 01 July 2015 20:07
>>> > > > To: dev@taverna.incubator.apache.org
>>> > > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
>>> > > > error and app stops.
>>> > > >
>>> > > > Great, i think its working. I have tested it from a REST client in
>>> > > > chrome and i receieved the 201 status code and the structure of
>>> > > > the workflow. Find here attached a screenshot of the post request.
>>> > > > Next up, i will be incorporating that into the app.
>>> > > >
>>> > > > cheers
>>> > > >
>>> > > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
>>> > > > larryakah@gmail.com>>:
>>> > > > Ok, thanks.
>>> > > > When i try that, i will send my feedback.
>>> > > >
>>> > > > Cheers
>>> > > >
>>> > > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
>>> > > <mailto:
>>> > > > ian.dunlop@manchester.ac.uk>>:
>>> > > > -----BEGIN PGP SIGNED MESSAGE-----
>>> > > > Hash: SHA1
>>> > > >
>>> > > > Hello,
>>> > > >
>>> > > > I think the workflow can just be sent as it is. The request is
>>> > > > JSON formatted but the things inside the request don't have to be.
>>> > > > The t2flow/xml can be sent base64 encoded as they are.
>>> > > >
>>> > > > Cheers,
>>> > > >
>>> > > > Ian
>>> > > >
>>> > > > On 30/06/15 12:32, Larry Akah wrote:
>>> > > > > Hello, The workflows we get from myexperiment are formatted as
>>> > > > > xml or t2flow files. Do these absolutely need to be converted in
>>> > > > > json before posting or they can be sent as is?
>>> > > > >
>>> > > > > Cheers
>>> > > > >
>>> > > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
>>> > > > > <ian.dunlop@manchester.ac.uk<mailto:ian.dunlop@manchester.ac.uk
>>> >>:
>>> > > > >
>>> > > > > Hello,
>>> > > > >
>>> > > > > I've had a chat with the taverna player developer and you need
>>> > > > > to send a request as follows:
>>> > > > >
>>> > > > > POST to /workflows.json
>>> > > > >
>>> > > > > {"workflow" : {  "document" :
>>> > > > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW
>>> > > > > GOES HERE"}}
>>> > > > >
>>> > > > > using HTTP basic auth with username:password base64 encoded in
>>> > > > > the Authorization header in the request  e.g. Authorization:
>>> > > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json
>>> > > > > because the content type is not being respected for some reason.
>>> > > > >
>>> > > > >
>>> > > > > Here's an example using curl: curl -u your_username -X POST -H
>>> > > > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
>>> > > > > http://taverna-player-server/workflows.json
>>> > > > >
>>> > > > > where wf.json is the workflow file, this would then prompt for a
>>> > > > > passwor d. Hope this helps, please let us know how you get on.
>>> > > > >
>>> > > > > Cheers,
>>> > > > >
>>> > > > > Ian
>>> > > > >
>>> > > > > On 29/06/15 19:23, Larry Akah wrote:
>>> > > > >>>> I need some help with uploading a workflow to the player. The
>>> > > > >>>> API doesn't make it seem possible currently. How is it done?
>>> > > > >>>>
>>> > > > >>>> cheers
>>> > > > >>>>
>>> > > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com
>>> > <mailto:
>>> > > > larryakah@gmail.com>>:
>>> > > > >>>>
>>> > > > >>>>> Yes, its not yet ready. i still need to adjust that because
>>> > > > >>>>> at first , i was using the player to fetch workflows and
>>> > > > >>>>> derived a run skeleton to use for creating workflows. There
>>> > > > >>>>> is still some stuff that needs to be fixed there.
>>> > > > >>>>>
>>> > > > >>>>> Cheers
>>> > > > >>>>>
>>> > > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
>>> > > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@manchester.ac
>>> > > > >>>>> .uk
>>> > >>:
>>> > > > >>>>>
>>> > > > >>>>>> Hello,
>>> > > > >>>>>>
>>> > > > >>>>>> I got a ‘fatal’ error which the emulator reported when
>>> > > > >>>>>> clicking on ‘create run’:
>>> > > > >>>>>>
>>> > > > >>>>>> 06-29 15:25:39.554
>>> > > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
>>> > > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
>>> > > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
>>> > > > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
>>> > > > >>>>>> method 'void android.app.AlertDialog.show()' on a null
>>> > > > >>>>>> object reference at
>>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
>>> > > > >>>>>> wd
>>> > > > >>>>>> et
>>> > > > >>>>>> ai
>>> > > > lFr
>>> > > > >
>>> > > > >>>>>>
>>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:4
>>> > > > 07
>>> > > > )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at
>>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
>>> > > > >>>>>> wd
>>> > > > >>>>>> et
>>> > > > >>>>>> ai
>>> > > > lFr
>>> > > > >
>>> > > > >>>>>>
>>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:2
>>> > > > 89
>>> > > > )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
>>> > > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
>>> > > > >>>>>> at
>>> > > > >>>>>>
>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
>>> > > > >>>>>> ja
>>> > > > >>>>>> va
>>> > > > :65
>>> > > > >
>>> > > > >>>>>>
>>> > > > 3)
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at android.os.Handler.dispatchMessage(Handler.java:102)
>>> > > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
>>> > > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
>>> > > > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
>>> > > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
>>> > > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
>>> > > > >>>>>> Zy
>>> > > > >>>>>> go
>>> > > > >>>>>> te
>>> > > > Ini
>>> > > > >
>>> > > > >>>>>>
>>> > > > t.java:903)
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > > at
>>> > > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698
>>> > > > >>>>>> )
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > >>>>>>
>>> > > > The device reported that the app had stopped running but in
>>> > > > >>>>>> fact it returned it to the workflows view but all the
>>> > > > >>>>>> workflows had disappeared from the view. I guess it’s
>>> > > > >>>>>> probably because this functionality is not ready yet but I
>>> > > > >>>>>> figured I should report it anyway.
>>> > > > >>>>>>
>>> > > > >>>>>> Cheers,
>>> > > > >>>>>>
>>> > > > >>>>>> Ian
>>> > > > >>>>>>
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>> -- *Akah Larry N.H*
>>> > > > >>>>>
>>> > > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
>>> > > > >>>>>
>>> > > > >>>>> Developing technologies for emergence and sustainable
>>> > > > >>>>> development.
>>> > > > >>>>>
>>> > > > >>>>>
>>> > > > >>>>
>>> > > > >>>>
>>> > > > >>
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > -----BEGIN PGP SIGNATURE-----
>>> > > > Version: GnuPG v1
>>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
>>> > > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
>>> > > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
>>> > > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
>>> > > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
>>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
>>> > > > =RrFl
>>> > > > -----END PGP SIGNATURE-----
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > *Akah Larry N.H*
>>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > > *www.iceteck.com<http://www.iceteck.com>*
>>> > > >
>>> > > > Developing technologies for emergence and sustainable development.
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > *Akah Larry N.H*
>>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > > *www.iceteck.com<http://www.iceteck.com>*
>>> > > >
>>> > > > Developing technologies for emergence and sustainable development.
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > *Akah Larry N.H*
>>> > >
>>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>>> > > *www.iceteck.com*
>>> > >
>>> > > Developing technologies for emergence and sustainable development.
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > *Akah Larry N.H*
>>> >
>>> > *Lead Software Engineer @ GiftedMom*
>>> > *Founder IceTeck Inc*
>>> > *www.iceteck.com*
>>> >
>>> > Developing technologies for emergence and sustainable development.
>>> >
>>>
>>>
>>>
>>> --
>>> *Akah Larry N.H*
>>>
>>> *Lead Software Engineer @ GiftedMom*
>>> *Founder IceTeck Inc*
>>> *www.iceteck.com*
>>>
>>> Developing technologies for emergence and sustainable development.
>>>
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
the code is already in my repository

2015-07-03 14:01 GMT+01:00 Larry Akah <la...@gmail.com>:

> Ok, let me try that.
>
> Thanks
>
> 2015-07-03 13:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
>> Hello,
>>
>> There should be no encoding in the request, there should be no /", it's
>> just a plain string. I think you are getting confused by the JSON. The
>> request is not JSON encoded, it is JSON formatted ie. Key value pairs. Look
>> at the request I included in this thread and use it as a template in your
>> code.  I guess the http connection will send it across the wire with
>> whatever encoding is required by http.
>>
>> {"workflow" : {  "document" :"data:application/octet-stream;base64,BASE64
>> ENCODE WORKFLOW GOES HERE"}}
>>
>> PS. Don't forget to sync your code with github as often as you can so we
>> can help you out with things like this much easier.
>>
>> Cheers,
>>
>> Ian
>>
>> -----Original Message-----
>> From: Larry Akah [mailto:larryakah@gmail.com]
>> Sent: 03 July 2015 13:52
>> To: dev@taverna.incubator.apache.org
>> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> player
>>
>> Am no longer using the json. i have simply constructed the body as a
>> string:
>>
>>  String data =
>>
>> "{\"document\":\"data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
>> Base64.DEFAULT)+"\"}";
>>
>>  String post = "{\"workflow:\""+data+"}";
>>
>> then i write the 'post' string to the player url
>>
>> Cheers
>>
>>
>> 2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>>
>> > Hello,
>> >
>> > Maybe the JSONObject postJson or dos.writeBytes(postJson.toString());
>> > in
>> > https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app
>> > /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/Wor
>> > kflowdetailFragment.java is not doing what you think it should. Try
>> > creating the request as a string rather than using the JSONObject. It
>> > is just a string like in my message below.
>> >
>> > Cheers,
>> >
>> > Ian
>> >
>> > -----Original Message-----
>> > From: Larry Akah [mailto:larryakah@gmail.com]
>> > Sent: 03 July 2015 13:47
>> > To: dev@taverna.incubator.apache.org
>> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > player
>> >
>> > I did the same thing with a Chrome REST client and it worked ok, but
>> > from the java request, i don't seem to figure out exactly what could
>> > be happening behind the scenes.
>> >
>> > 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> >
>> > > Hello,
>> > >
>> > > I just tried sending a workflow using curl with the request
>> > > formatted like below and the player is working ok and sent back the
>> > > correct
>> > response.
>> > >
>> > > {"workflow" : {  "document" :
>> > > "data:application/octet-stream;base64,BASE64
>> > > ENCODE WORKFLOW GOES HERE"}}
>> > >
>> > > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded
>> > > version of the workflow with no url encoding.
>> > >
>> > > Cheers,
>> > >
>> > > Ian
>> > >
>> > > -----Original Message-----
>> > > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
>> > > Sent: 03 July 2015 13:29
>> > > To: dev@taverna.incubator.apache.org
>> > > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > > player
>> > >
>> > > Hello,
>> > >
>> > > Unfortunately I can't see your request in the logs for some reason
>> > > (some docker issue that we don't understand). Can you paste the body
>> > > in an email (remember not to include any username/password stuff).
>> > >
>> > > Cheers,
>> > >
>> > > Ian
>> > >
>> > > -----Original Message-----
>> > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > Sent: 03 July 2015 12:26
>> > > To: dev@taverna.incubator.apache.org
>> > > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna
>> > > player
>> > >
>> > > Hello, now, am posting the body exactly as described without
>> > > encoding with json and am getting a 400 bad request message.
>> > > Anything that could be done about that?
>> > >
>> > > Cheers
>> > >
>> > >
>> > > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>> > >
>> > > > Hello,
>> > > >
>> > > > That’s good news. Can’t wait to see it working in the app – let me
>> > > > know when you have committed the code. By the way, I think the
>> > > > mailing list removes attachments, probably best to either add
>> > > > screenshots to JIRA or send links to the screenshots in something
>> > > > like dropbox or
>> > > google drive.
>> > > >
>> > > > Cheers,
>> > > >
>> > > > Ian
>> > > >
>> > > > From: Larry Akah [mailto:larryakah@gmail.com]
>> > > > Sent: 01 July 2015 20:07
>> > > > To: dev@taverna.incubator.apache.org
>> > > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
>> > > > error and app stops.
>> > > >
>> > > > Great, i think its working. I have tested it from a REST client in
>> > > > chrome and i receieved the 201 status code and the structure of
>> > > > the workflow. Find here attached a screenshot of the post request.
>> > > > Next up, i will be incorporating that into the app.
>> > > >
>> > > > cheers
>> > > >
>> > > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
>> > > > larryakah@gmail.com>>:
>> > > > Ok, thanks.
>> > > > When i try that, i will send my feedback.
>> > > >
>> > > > Cheers
>> > > >
>> > > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
>> > > <mailto:
>> > > > ian.dunlop@manchester.ac.uk>>:
>> > > > -----BEGIN PGP SIGNED MESSAGE-----
>> > > > Hash: SHA1
>> > > >
>> > > > Hello,
>> > > >
>> > > > I think the workflow can just be sent as it is. The request is
>> > > > JSON formatted but the things inside the request don't have to be.
>> > > > The t2flow/xml can be sent base64 encoded as they are.
>> > > >
>> > > > Cheers,
>> > > >
>> > > > Ian
>> > > >
>> > > > On 30/06/15 12:32, Larry Akah wrote:
>> > > > > Hello, The workflows we get from myexperiment are formatted as
>> > > > > xml or t2flow files. Do these absolutely need to be converted in
>> > > > > json before posting or they can be sent as is?
>> > > > >
>> > > > > Cheers
>> > > > >
>> > > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
>> > > > > <ian.dunlop@manchester.ac.uk<mailto:ian.dunlop@manchester.ac.uk
>> >>:
>> > > > >
>> > > > > Hello,
>> > > > >
>> > > > > I've had a chat with the taverna player developer and you need
>> > > > > to send a request as follows:
>> > > > >
>> > > > > POST to /workflows.json
>> > > > >
>> > > > > {"workflow" : {  "document" :
>> > > > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW
>> > > > > GOES HERE"}}
>> > > > >
>> > > > > using HTTP basic auth with username:password base64 encoded in
>> > > > > the Authorization header in the request  e.g. Authorization:
>> > > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json
>> > > > > because the content type is not being respected for some reason.
>> > > > >
>> > > > >
>> > > > > Here's an example using curl: curl -u your_username -X POST -H
>> > > > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
>> > > > > http://taverna-player-server/workflows.json
>> > > > >
>> > > > > where wf.json is the workflow file, this would then prompt for a
>> > > > > passwor d. Hope this helps, please let us know how you get on.
>> > > > >
>> > > > > Cheers,
>> > > > >
>> > > > > Ian
>> > > > >
>> > > > > On 29/06/15 19:23, Larry Akah wrote:
>> > > > >>>> I need some help with uploading a workflow to the player. The
>> > > > >>>> API doesn't make it seem possible currently. How is it done?
>> > > > >>>>
>> > > > >>>> cheers
>> > > > >>>>
>> > > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com
>> > <mailto:
>> > > > larryakah@gmail.com>>:
>> > > > >>>>
>> > > > >>>>> Yes, its not yet ready. i still need to adjust that because
>> > > > >>>>> at first , i was using the player to fetch workflows and
>> > > > >>>>> derived a run skeleton to use for creating workflows. There
>> > > > >>>>> is still some stuff that needs to be fixed there.
>> > > > >>>>>
>> > > > >>>>> Cheers
>> > > > >>>>>
>> > > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
>> > > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@manchester.ac
>> > > > >>>>> .uk
>> > >>:
>> > > > >>>>>
>> > > > >>>>>> Hello,
>> > > > >>>>>>
>> > > > >>>>>> I got a ‘fatal’ error which the emulator reported when
>> > > > >>>>>> clicking on ‘create run’:
>> > > > >>>>>>
>> > > > >>>>>> 06-29 15:25:39.554
>> > > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
>> > > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
>> > > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
>> > > > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
>> > > > >>>>>> method 'void android.app.AlertDialog.show()' on a null
>> > > > >>>>>> object reference at
>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
>> > > > >>>>>> wd
>> > > > >>>>>> et
>> > > > >>>>>> ai
>> > > > lFr
>> > > > >
>> > > > >>>>>>
>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:4
>> > > > 07
>> > > > )
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > > at
>> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
>> > > > >>>>>> wd
>> > > > >>>>>> et
>> > > > >>>>>> ai
>> > > > lFr
>> > > > >
>> > > > >>>>>>
>> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:2
>> > > > 89
>> > > > )
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
>> > > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
>> > > > >>>>>> at
>> > > > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
>> > > > >>>>>> ja
>> > > > >>>>>> va
>> > > > :65
>> > > > >
>> > > > >>>>>>
>> > > > 3)
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > > at android.os.Handler.dispatchMessage(Handler.java:102)
>> > > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
>> > > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
>> > > > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
>> > > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
>> > > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
>> > > > >>>>>> Zy
>> > > > >>>>>> go
>> > > > >>>>>> te
>> > > > Ini
>> > > > >
>> > > > >>>>>>
>> > > > t.java:903)
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > > at
>> > > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698
>> > > > >>>>>> )
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > >>>>>>
>> > > > The device reported that the app had stopped running but in
>> > > > >>>>>> fact it returned it to the workflows view but all the
>> > > > >>>>>> workflows had disappeared from the view. I guess it’s
>> > > > >>>>>> probably because this functionality is not ready yet but I
>> > > > >>>>>> figured I should report it anyway.
>> > > > >>>>>>
>> > > > >>>>>> Cheers,
>> > > > >>>>>>
>> > > > >>>>>> Ian
>> > > > >>>>>>
>> > > > >>>>>
>> > > > >>>>>
>> > > > >>>>>
>> > > > >>>>> -- *Akah Larry N.H*
>> > > > >>>>>
>> > > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
>> > > > >>>>>
>> > > > >>>>> Developing technologies for emergence and sustainable
>> > > > >>>>> development.
>> > > > >>>>>
>> > > > >>>>>
>> > > > >>>>
>> > > > >>>>
>> > > > >>
>> > > > >
>> > > > >
>> > > > >
>> > > > -----BEGIN PGP SIGNATURE-----
>> > > > Version: GnuPG v1
>> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
>> > > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
>> > > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
>> > > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
>> > > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
>> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
>> > > > =RrFl
>> > > > -----END PGP SIGNATURE-----
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > *Akah Larry N.H*
>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > *www.iceteck.com<http://www.iceteck.com>*
>> > > >
>> > > > Developing technologies for emergence and sustainable development.
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > *Akah Larry N.H*
>> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > > *www.iceteck.com<http://www.iceteck.com>*
>> > > >
>> > > > Developing technologies for emergence and sustainable development.
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > *Akah Larry N.H*
>> > >
>> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
>> > > *www.iceteck.com*
>> > >
>> > > Developing technologies for emergence and sustainable development.
>> > >
>> >
>> >
>> >
>> > --
>> > *Akah Larry N.H*
>> >
>> > *Lead Software Engineer @ GiftedMom*
>> > *Founder IceTeck Inc*
>> > *www.iceteck.com*
>> >
>> > Developing technologies for emergence and sustainable development.
>> >
>>
>>
>>
>> --
>> *Akah Larry N.H*
>>
>> *Lead Software Engineer @ GiftedMom*
>> *Founder IceTeck Inc*
>> *www.iceteck.com*
>>
>> Developing technologies for emergence and sustainable development.
>>
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>
>


-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Ok, let me try that.

Thanks

2015-07-03 13:57 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> There should be no encoding in the request, there should be no /", it's
> just a plain string. I think you are getting confused by the JSON. The
> request is not JSON encoded, it is JSON formatted ie. Key value pairs. Look
> at the request I included in this thread and use it as a template in your
> code.  I guess the http connection will send it across the wire with
> whatever encoding is required by http.
>
> {"workflow" : {  "document" :"data:application/octet-stream;base64,BASE64
> ENCODE WORKFLOW GOES HERE"}}
>
> PS. Don't forget to sync your code with github as often as you can so we
> can help you out with things like this much easier.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 13:52
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Am no longer using the json. i have simply constructed the body as a
> string:
>
>  String data =
>
> "{\"document\":\"data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
> Base64.DEFAULT)+"\"}";
>
>  String post = "{\"workflow:\""+data+"}";
>
> then i write the 'post' string to the player url
>
> Cheers
>
>
> 2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > Maybe the JSONObject postJson or dos.writeBytes(postJson.toString());
> > in
> > https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app
> > /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/Wor
> > kflowdetailFragment.java is not doing what you think it should. Try
> > creating the request as a string rather than using the JSONObject. It
> > is just a string like in my message below.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 03 July 2015 13:47
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > I did the same thing with a Chrome REST client and it worked ok, but
> > from the java request, i don't seem to figure out exactly what could
> > be happening behind the scenes.
> >
> > 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > I just tried sending a workflow using curl with the request
> > > formatted like below and the player is working ok and sent back the
> > > correct
> > response.
> > >
> > > {"workflow" : {  "document" :
> > > "data:application/octet-stream;base64,BASE64
> > > ENCODE WORKFLOW GOES HERE"}}
> > >
> > > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded
> > > version of the workflow with no url encoding.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > -----Original Message-----
> > > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> > > Sent: 03 July 2015 13:29
> > > To: dev@taverna.incubator.apache.org
> > > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > > player
> > >
> > > Hello,
> > >
> > > Unfortunately I can't see your request in the logs for some reason
> > > (some docker issue that we don't understand). Can you paste the body
> > > in an email (remember not to include any username/password stuff).
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > -----Original Message-----
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 03 July 2015 12:26
> > > To: dev@taverna.incubator.apache.org
> > > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > > player
> > >
> > > Hello, now, am posting the body exactly as described without
> > > encoding with json and am getting a 400 bad request message.
> > > Anything that could be done about that?
> > >
> > > Cheers
> > >
> > >
> > > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> > >
> > > > Hello,
> > > >
> > > > That’s good news. Can’t wait to see it working in the app – let me
> > > > know when you have committed the code. By the way, I think the
> > > > mailing list removes attachments, probably best to either add
> > > > screenshots to JIRA or send links to the screenshots in something
> > > > like dropbox or
> > > google drive.
> > > >
> > > > Cheers,
> > > >
> > > > Ian
> > > >
> > > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > > Sent: 01 July 2015 20:07
> > > > To: dev@taverna.incubator.apache.org
> > > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
> > > > error and app stops.
> > > >
> > > > Great, i think its working. I have tested it from a REST client in
> > > > chrome and i receieved the 201 status code and the structure of
> > > > the workflow. Find here attached a screenshot of the post request.
> > > > Next up, i will be incorporating that into the app.
> > > >
> > > > cheers
> > > >
> > > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > > > larryakah@gmail.com>>:
> > > > Ok, thanks.
> > > > When i try that, i will send my feedback.
> > > >
> > > > Cheers
> > > >
> > > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> > > <mailto:
> > > > ian.dunlop@manchester.ac.uk>>:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Hello,
> > > >
> > > > I think the workflow can just be sent as it is. The request is
> > > > JSON formatted but the things inside the request don't have to be.
> > > > The t2flow/xml can be sent base64 encoded as they are.
> > > >
> > > > Cheers,
> > > >
> > > > Ian
> > > >
> > > > On 30/06/15 12:32, Larry Akah wrote:
> > > > > Hello, The workflows we get from myexperiment are formatted as
> > > > > xml or t2flow files. Do these absolutely need to be converted in
> > > > > json before posting or they can be sent as is?
> > > > >
> > > > > Cheers
> > > > >
> > > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > > > <ia...@manchester.ac.uk>>:
> > > > >
> > > > > Hello,
> > > > >
> > > > > I've had a chat with the taverna player developer and you need
> > > > > to send a request as follows:
> > > > >
> > > > > POST to /workflows.json
> > > > >
> > > > > {"workflow" : {  "document" :
> > > > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW
> > > > > GOES HERE"}}
> > > > >
> > > > > using HTTP basic auth with username:password base64 encoded in
> > > > > the Authorization header in the request  e.g. Authorization:
> > > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json
> > > > > because the content type is not being respected for some reason.
> > > > >
> > > > >
> > > > > Here's an example using curl: curl -u your_username -X POST -H
> > > > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
> > > > > http://taverna-player-server/workflows.json
> > > > >
> > > > > where wf.json is the workflow file, this would then prompt for a
> > > > > passwor d. Hope this helps, please let us know how you get on.
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Ian
> > > > >
> > > > > On 29/06/15 19:23, Larry Akah wrote:
> > > > >>>> I need some help with uploading a workflow to the player. The
> > > > >>>> API doesn't make it seem possible currently. How is it done?
> > > > >>>>
> > > > >>>> cheers
> > > > >>>>
> > > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com
> > <mailto:
> > > > larryakah@gmail.com>>:
> > > > >>>>
> > > > >>>>> Yes, its not yet ready. i still need to adjust that because
> > > > >>>>> at first , i was using the player to fetch workflows and
> > > > >>>>> derived a run skeleton to use for creating workflows. There
> > > > >>>>> is still some stuff that needs to be fixed there.
> > > > >>>>>
> > > > >>>>> Cheers
> > > > >>>>>
> > > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> > > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@manchester.ac
> > > > >>>>> .uk
> > >>:
> > > > >>>>>
> > > > >>>>>> Hello,
> > > > >>>>>>
> > > > >>>>>> I got a ‘fatal’ error which the emulator reported when
> > > > >>>>>> clicking on ‘create run’:
> > > > >>>>>>
> > > > >>>>>> 06-29 15:25:39.554
> > > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > > > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
> > > > >>>>>> method 'void android.app.AlertDialog.show()' on a null
> > > > >>>>>> object reference at
> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
> > > > >>>>>> wd
> > > > >>>>>> et
> > > > >>>>>> ai
> > > > lFr
> > > > >
> > > > >>>>>>
> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:4
> > > > 07
> > > > )
> > > > >>>>>>
> > > > >>>>>>
> > > > > at
> > > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
> > > > >>>>>> wd
> > > > >>>>>> et
> > > > >>>>>> ai
> > > > lFr
> > > > >
> > > > >>>>>>
> > > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:2
> > > > 89
> > > > )
> > > > >>>>>>
> > > > >>>>>>
> > > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > > > >>>>>> at
> > > > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
> > > > >>>>>> ja
> > > > >>>>>> va
> > > > :65
> > > > >
> > > > >>>>>>
> > > > 3)
> > > > >>>>>>
> > > > >>>>>>
> > > > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > > > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> > > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
> > > > >>>>>> Zy
> > > > >>>>>> go
> > > > >>>>>> te
> > > > Ini
> > > > >
> > > > >>>>>>
> > > > t.java:903)
> > > > >>>>>>
> > > > >>>>>>
> > > > > at
> > > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698
> > > > >>>>>> )
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > The device reported that the app had stopped running but in
> > > > >>>>>> fact it returned it to the workflows view but all the
> > > > >>>>>> workflows had disappeared from the view. I guess it’s
> > > > >>>>>> probably because this functionality is not ready yet but I
> > > > >>>>>> figured I should report it anyway.
> > > > >>>>>>
> > > > >>>>>> Cheers,
> > > > >>>>>>
> > > > >>>>>> Ian
> > > > >>>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> -- *Akah Larry N.H*
> > > > >>>>>
> > > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > > > >>>>>
> > > > >>>>> Developing technologies for emergence and sustainable
> > > > >>>>> development.
> > > > >>>>>
> > > > >>>>>
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1
> > > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > > > =RrFl
> > > > -----END PGP SIGNATURE-----
> > > >
> > > >
> > > >
> > > > --
> > > > *Akah Larry N.H*
> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > *www.iceteck.com<http://www.iceteck.com>*
> > > >
> > > > Developing technologies for emergence and sustainable development.
> > > >
> > > >
> > > >
> > > > --
> > > > *Akah Larry N.H*
> > > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > > *www.iceteck.com<http://www.iceteck.com>*
> > > >
> > > > Developing technologies for emergence and sustainable development.
> > > >
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > >
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

There should be no encoding in the request, there should be no /", it's just a plain string. I think you are getting confused by the JSON. The request is not JSON encoded, it is JSON formatted ie. Key value pairs. Look at the request I included in this thread and use it as a template in your code.  I guess the http connection will send it across the wire with whatever encoding is required by http.

{"workflow" : {  "document" :"data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}}

PS. Don't forget to sync your code with github as often as you can so we can help you out with things like this much easier.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 03 July 2015 13:52
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Am no longer using the json. i have simply constructed the body as a string:

 String data =
"{\"document\":\"data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
Base64.DEFAULT)+"\"}";

 String post = "{\"workflow:\""+data+"}";

then i write the 'post' string to the player url

Cheers


2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Maybe the JSONObject postJson or dos.writeBytes(postJson.toString()); 
> in 
> https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app
> /src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/Wor
> kflowdetailFragment.java is not doing what you think it should. Try 
> creating the request as a string rather than using the JSONObject. It 
> is just a string like in my message below.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 13:47
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> I did the same thing with a Chrome REST client and it worked ok, but 
> from the java request, i don't seem to figure out exactly what could 
> be happening behind the scenes.
>
> 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I just tried sending a workflow using curl with the request 
> > formatted like below and the player is working ok and sent back the 
> > correct
> response.
> >
> > {"workflow" : {  "document" :
> > "data:application/octet-stream;base64,BASE64
> > ENCODE WORKFLOW GOES HERE"}}
> >
> > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded 
> > version of the workflow with no url encoding.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> > Sent: 03 July 2015 13:29
> > To: dev@taverna.incubator.apache.org
> > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> > player
> >
> > Hello,
> >
> > Unfortunately I can't see your request in the logs for some reason 
> > (some docker issue that we don't understand). Can you paste the body 
> > in an email (remember not to include any username/password stuff).
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 03 July 2015 12:26
> > To: dev@taverna.incubator.apache.org
> > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> > player
> >
> > Hello, now, am posting the body exactly as described without 
> > encoding with json and am getting a 400 bad request message.
> > Anything that could be done about that?
> >
> > Cheers
> >
> >
> > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > That’s good news. Can’t wait to see it working in the app – let me 
> > > know when you have committed the code. By the way, I think the 
> > > mailing list removes attachments, probably best to either add 
> > > screenshots to JIRA or send links to the screenshots in something 
> > > like dropbox or
> > google drive.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 01 July 2015 20:07
> > > To: dev@taverna.incubator.apache.org
> > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
> > > error and app stops.
> > >
> > > Great, i think its working. I have tested it from a REST client in 
> > > chrome and i receieved the 201 status code and the structure of 
> > > the workflow. Find here attached a screenshot of the post request.
> > > Next up, i will be incorporating that into the app.
> > >
> > > cheers
> > >
> > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > > larryakah@gmail.com>>:
> > > Ok, thanks.
> > > When i try that, i will send my feedback.
> > >
> > > Cheers
> > >
> > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> > <mailto:
> > > ian.dunlop@manchester.ac.uk>>:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hello,
> > >
> > > I think the workflow can just be sent as it is. The request is 
> > > JSON formatted but the things inside the request don't have to be. 
> > > The t2flow/xml can be sent base64 encoded as they are.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > On 30/06/15 12:32, Larry Akah wrote:
> > > > Hello, The workflows we get from myexperiment are formatted as 
> > > > xml or t2flow files. Do these absolutely need to be converted in 
> > > > json before posting or they can be sent as is?
> > > >
> > > > Cheers
> > > >
> > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > > <ia...@manchester.ac.uk>>:
> > > >
> > > > Hello,
> > > >
> > > > I've had a chat with the taverna player developer and you need 
> > > > to send a request as follows:
> > > >
> > > > POST to /workflows.json
> > > >
> > > > {"workflow" : {  "document" :
> > > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW 
> > > > GOES HERE"}}
> > > >
> > > > using HTTP basic auth with username:password base64 encoded in 
> > > > the Authorization header in the request  e.g. Authorization: 
> > > > Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json 
> > > > because the content type is not being respected for some reason.
> > > >
> > > >
> > > > Here's an example using curl: curl -u your_username -X POST -H
> > > > "Content-Type: application/json" -d@wf.json<ma...@wf.json> 
> > > > http://taverna-player-server/workflows.json
> > > >
> > > > where wf.json is the workflow file, this would then prompt for a 
> > > > passwor d. Hope this helps, please let us know how you get on.
> > > >
> > > > Cheers,
> > > >
> > > > Ian
> > > >
> > > > On 29/06/15 19:23, Larry Akah wrote:
> > > >>>> I need some help with uploading a workflow to the player. The 
> > > >>>> API doesn't make it seem possible currently. How is it done?
> > > >>>>
> > > >>>> cheers
> > > >>>>
> > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com
> <mailto:
> > > larryakah@gmail.com>>:
> > > >>>>
> > > >>>>> Yes, its not yet ready. i still need to adjust that because 
> > > >>>>> at first , i was using the player to fetch workflows and 
> > > >>>>> derived a run skeleton to use for creating workflows. There 
> > > >>>>> is still some stuff that needs to be fixed there.
> > > >>>>>
> > > >>>>> Cheers
> > > >>>>>
> > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop 
> > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@manchester.ac
> > > >>>>> .uk
> >>:
> > > >>>>>
> > > >>>>>> Hello,
> > > >>>>>>
> > > >>>>>> I got a ‘fatal’ error which the emulator reported when 
> > > >>>>>> clicking on ‘create run’:
> > > >>>>>>
> > > >>>>>> 06-29 15:25:39.554
> > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual 
> > > >>>>>> method 'void android.app.AlertDialog.show()' on a null 
> > > >>>>>> object reference at 
> > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
> > > >>>>>> wd
> > > >>>>>> et
> > > >>>>>> ai
> > > lFr
> > > >
> > > >>>>>>
> > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:4
> > > 07
> > > )
> > > >>>>>>
> > > >>>>>>
> > > > at
> > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflo
> > > >>>>>> wd
> > > >>>>>> et
> > > >>>>>> ai
> > > lFr
> > > >
> > > >>>>>>
> > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:2
> > > 89
> > > )
> > > >>>>>>
> > > >>>>>>
> > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > > >>>>>> at
> > > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
> > > >>>>>> ja
> > > >>>>>> va
> > > :65
> > > >
> > > >>>>>>
> > > 3)
> > > >>>>>>
> > > >>>>>>
> > > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at 
> > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
> > > >>>>>> Zy
> > > >>>>>> go
> > > >>>>>> te
> > > Ini
> > > >
> > > >>>>>>
> > > t.java:903)
> > > >>>>>>
> > > >>>>>>
> > > > at
> > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698
> > > >>>>>> )
> > > >>>>>>
> > > >>>>>>
> > > >>>>>>
> > > The device reported that the app had stopped running but in
> > > >>>>>> fact it returned it to the workflows view but all the 
> > > >>>>>> workflows had disappeared from the view. I guess it’s 
> > > >>>>>> probably because this functionality is not ready yet but I 
> > > >>>>>> figured I should report it anyway.
> > > >>>>>>
> > > >>>>>> Cheers,
> > > >>>>>>
> > > >>>>>> Ian
> > > >>>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> -- *Akah Larry N.H*
> > > >>>>>
> > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > > >>>>>
> > > >>>>> Developing technologies for emergence and sustainable 
> > > >>>>> development.
> > > >>>>>
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>
> > > >
> > > >
> > > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1
> > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > > =RrFl
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com<http://www.iceteck.com>*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com<http://www.iceteck.com>*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
Am no longer using the json. i have simply constructed the body as a string:

 String data =
"{\"document\":\"data:application/octet-stream;base64,"+Base64.encodeToString(sb.toString().getBytes(),
Base64.DEFAULT)+"\"}";

 String post = "{\"workflow:\""+data+"}";

then i write the 'post' string to the player url

Cheers


2015-07-03 13:48 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> Maybe the JSONObject postJson or dos.writeBytes(postJson.toString()); in
> https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java
> is not doing what you think it should. Try creating the request as a string
> rather than using the JSONObject. It is just a string like in my message
> below.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 13:47
> To: dev@taverna.incubator.apache.org
> Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> I did the same thing with a Chrome REST client and it worked ok, but from
> the java request, i don't seem to figure out exactly what could be
> happening behind the scenes.
>
> 2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > I just tried sending a workflow using curl with the request formatted
> > like below and the player is working ok and sent back the correct
> response.
> >
> > {"workflow" : {  "document" :
> > "data:application/octet-stream;base64,BASE64
> > ENCODE WORKFLOW GOES HERE"}}
> >
> > Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded version
> > of the workflow with no url encoding.
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> > Sent: 03 July 2015 13:29
> > To: dev@taverna.incubator.apache.org
> > Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > Hello,
> >
> > Unfortunately I can't see your request in the logs for some reason
> > (some docker issue that we don't understand). Can you paste the body
> > in an email (remember not to include any username/password stuff).
> >
> > Cheers,
> >
> > Ian
> >
> > -----Original Message-----
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 03 July 2015 12:26
> > To: dev@taverna.incubator.apache.org
> > Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna
> > player
> >
> > Hello, now, am posting the body exactly as described without encoding
> > with json and am getting a 400 bad request message.
> > Anything that could be done about that?
> >
> > Cheers
> >
> >
> > 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
> >
> > > Hello,
> > >
> > > That’s good news. Can’t wait to see it working in the app – let me
> > > know when you have committed the code. By the way, I think the
> > > mailing list removes attachments, probably best to either add
> > > screenshots to JIRA or send links to the screenshots in something
> > > like dropbox or
> > google drive.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > From: Larry Akah [mailto:larryakah@gmail.com]
> > > Sent: 01 July 2015 20:07
> > > To: dev@taverna.incubator.apache.org
> > > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal'
> > > error and app stops.
> > >
> > > Great, i think its working. I have tested it from a REST client in
> > > chrome and i receieved the 201 status code and the structure of the
> > > workflow. Find here attached a screenshot of the post request.
> > > Next up, i will be incorporating that into the app.
> > >
> > > cheers
> > >
> > > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > > larryakah@gmail.com>>:
> > > Ok, thanks.
> > > When i try that, i will send my feedback.
> > >
> > > Cheers
> > >
> > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> > <mailto:
> > > ian.dunlop@manchester.ac.uk>>:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hello,
> > >
> > > I think the workflow can just be sent as it is. The request is JSON
> > > formatted but the things inside the request don't have to be. The
> > > t2flow/xml can be sent base64 encoded as they are.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > On 30/06/15 12:32, Larry Akah wrote:
> > > > Hello, The workflows we get from myexperiment are formatted as xml
> > > > or t2flow files. Do these absolutely need to be converted in json
> > > > before posting or they can be sent as is?
> > > >
> > > > Cheers
> > > >
> > > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > > <ia...@manchester.ac.uk>>:
> > > >
> > > > Hello,
> > > >
> > > > I've had a chat with the taverna player developer and you need to
> > > > send a request as follows:
> > > >
> > > > POST to /workflows.json
> > > >
> > > > {"workflow" : {  "document" :
> > > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES
> > > > HERE"}}
> > > >
> > > > using HTTP basic auth with username:password base64 encoded in the
> > > > Authorization header in the request  e.g. Authorization: Basic
> > > > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because
> > > > the content type is not being respected for some reason.
> > > >
> > > >
> > > > Here's an example using curl: curl -u your_username -X POST -H
> > > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
> > > > http://taverna-player-server/workflows.json
> > > >
> > > > where wf.json is the workflow file, this would then prompt for a
> > > > passwor d. Hope this helps, please let us know how you get on.
> > > >
> > > > Cheers,
> > > >
> > > > Ian
> > > >
> > > > On 29/06/15 19:23, Larry Akah wrote:
> > > >>>> I need some help with uploading a workflow to the player. The
> > > >>>> API doesn't make it seem possible currently. How is it done?
> > > >>>>
> > > >>>> cheers
> > > >>>>
> > > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com
> <mailto:
> > > larryakah@gmail.com>>:
> > > >>>>
> > > >>>>> Yes, its not yet ready. i still need to adjust that because at
> > > >>>>> first , i was using the player to fetch workflows and derived
> > > >>>>> a run skeleton to use for creating workflows. There is still
> > > >>>>> some stuff that needs to be fixed there.
> > > >>>>>
> > > >>>>> Cheers
> > > >>>>>
> > > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> > > >>>>> <Ian.Dunlop@manchester.ac.uk<mailto:Ian.Dunlop@manchester.ac.uk
> >>:
> > > >>>>>
> > > >>>>>> Hello,
> > > >>>>>>
> > > >>>>>> I got a ‘fatal’ error which the emulator reported when
> > > >>>>>> clicking on ‘create run’:
> > > >>>>>>
> > > >>>>>> 06-29 15:25:39.554
> > > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
> > > >>>>>> method 'void android.app.AlertDialog.show()' on a null object
> > > >>>>>> reference at
> > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowd
> > > >>>>>> et
> > > >>>>>> ai
> > > lFr
> > > >
> > > >>>>>>
> > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407
> > > )
> > > >>>>>>
> > > >>>>>>
> > > > at
> > > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowd
> > > >>>>>> et
> > > >>>>>> ai
> > > lFr
> > > >
> > > >>>>>>
> > > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289
> > > )
> > > >>>>>>
> > > >>>>>>
> > > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > > >>>>>> at
> > > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
> > > >>>>>> ja
> > > >>>>>> va
> > > :65
> > > >
> > > >>>>>>
> > > 3)
> > > >>>>>>
> > > >>>>>>
> > > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> > > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zy
> > > >>>>>> go
> > > >>>>>> te
> > > Ini
> > > >
> > > >>>>>>
> > > t.java:903)
> > > >>>>>>
> > > >>>>>>
> > > > at
> > > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> > > >>>>>>
> > > >>>>>>
> > > >>>>>>
> > > The device reported that the app had stopped running but in
> > > >>>>>> fact it returned it to the workflows view but all the
> > > >>>>>> workflows had disappeared from the view. I guess it’s
> > > >>>>>> probably because this functionality is not ready yet but I
> > > >>>>>> figured I should report it anyway.
> > > >>>>>>
> > > >>>>>> Cheers,
> > > >>>>>>
> > > >>>>>> Ian
> > > >>>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> -- *Akah Larry N.H*
> > > >>>>>
> > > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > > >>>>>
> > > >>>>> Developing technologies for emergence and sustainable
> > > >>>>> development.
> > > >>>>>
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>
> > > >
> > > >
> > > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1
> > > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > > =RrFl
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com<http://www.iceteck.com>*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> > >
> > >
> > > --
> > > *Akah Larry N.H*
> > > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > > *www.iceteck.com<http://www.iceteck.com>*
> > >
> > > Developing technologies for emergence and sustainable development.
> > >
> >
> >
> >
> > --
> > *Akah Larry N.H*
> >
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Maybe the JSONObject postJson or dos.writeBytes(postJson.toString()); in https://github.com/larrytech7/incubator-taverna-mobile/blob/master/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowdetailFragment.java is not doing what you think it should. Try creating the request as a string rather than using the JSONObject. It is just a string like in my message below.

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 03 July 2015 13:47
To: dev@taverna.incubator.apache.org
Subject: Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

I did the same thing with a Chrome REST client and it worked ok, but from the java request, i don't seem to figure out exactly what could be happening behind the scenes.

2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I just tried sending a workflow using curl with the request formatted 
> like below and the player is working ok and sent back the correct response.
>
> {"workflow" : {  "document" : 
> "data:application/octet-stream;base64,BASE64
> ENCODE WORKFLOW GOES HERE"}}
>
> Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded version 
> of the workflow with no url encoding.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> Sent: 03 July 2015 13:29
> To: dev@taverna.incubator.apache.org
> Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Hello,
>
> Unfortunately I can't see your request in the logs for some reason 
> (some docker issue that we don't understand). Can you paste the body 
> in an email (remember not to include any username/password stuff).
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 12:26
> To: dev@taverna.incubator.apache.org
> Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna 
> player
>
> Hello, now, am posting the body exactly as described without encoding 
> with json and am getting a 400 bad request message.
> Anything that could be done about that?
>
> Cheers
>
>
> 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > That’s good news. Can’t wait to see it working in the app – let me 
> > know when you have committed the code. By the way, I think the 
> > mailing list removes attachments, probably best to either add 
> > screenshots to JIRA or send links to the screenshots in something 
> > like dropbox or
> google drive.
> >
> > Cheers,
> >
> > Ian
> >
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 01 July 2015 20:07
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' 
> > error and app stops.
> >
> > Great, i think its working. I have tested it from a REST client in 
> > chrome and i receieved the 201 status code and the structure of the 
> > workflow. Find here attached a screenshot of the post request.
> > Next up, i will be incorporating that into the app.
> >
> > cheers
> >
> > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > Ok, thanks.
> > When i try that, i will send my feedback.
> >
> > Cheers
> >
> > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> <mailto:
> > ian.dunlop@manchester.ac.uk>>:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > I think the workflow can just be sent as it is. The request is JSON 
> > formatted but the things inside the request don't have to be. The 
> > t2flow/xml can be sent base64 encoded as they are.
> >
> > Cheers,
> >
> > Ian
> >
> > On 30/06/15 12:32, Larry Akah wrote:
> > > Hello, The workflows we get from myexperiment are formatted as xml 
> > > or t2flow files. Do these absolutely need to be converted in json 
> > > before posting or they can be sent as is?
> > >
> > > Cheers
> > >
> > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > <ia...@manchester.ac.uk>>:
> > >
> > > Hello,
> > >
> > > I've had a chat with the taverna player developer and you need to 
> > > send a request as follows:
> > >
> > > POST to /workflows.json
> > >
> > > {"workflow" : {  "document" :
> > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES 
> > > HERE"}}
> > >
> > > using HTTP basic auth with username:password base64 encoded in the 
> > > Authorization header in the request  e.g. Authorization: Basic 
> > > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because 
> > > the content type is not being respected for some reason.
> > >
> > >
> > > Here's an example using curl: curl -u your_username -X POST -H
> > > "Content-Type: application/json" -d@wf.json<ma...@wf.json> 
> > > http://taverna-player-server/workflows.json
> > >
> > > where wf.json is the workflow file, this would then prompt for a 
> > > passwor d. Hope this helps, please let us know how you get on.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > On 29/06/15 19:23, Larry Akah wrote:
> > >>>> I need some help with uploading a workflow to the player. The 
> > >>>> API doesn't make it seem possible currently. How is it done?
> > >>>>
> > >>>> cheers
> > >>>>
> > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > >>>>
> > >>>>> Yes, its not yet ready. i still need to adjust that because at 
> > >>>>> first , i was using the player to fetch workflows and derived 
> > >>>>> a run skeleton to use for creating workflows. There is still 
> > >>>>> some stuff that needs to be fixed there.
> > >>>>>
> > >>>>> Cheers
> > >>>>>
> > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> > >>>>> <Ia...@manchester.ac.uk>>:
> > >>>>>
> > >>>>>> Hello,
> > >>>>>>
> > >>>>>> I got a ‘fatal’ error which the emulator reported when 
> > >>>>>> clicking on ‘create run’:
> > >>>>>>
> > >>>>>> 06-29 15:25:39.554
> > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual 
> > >>>>>> method 'void android.app.AlertDialog.show()' on a null object 
> > >>>>>> reference at 
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowd
> > >>>>>> et
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407
> > )
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowd
> > >>>>>> et
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289
> > )
> > >>>>>>
> > >>>>>>
> > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > >>>>>> at
> > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.
> > >>>>>> ja
> > >>>>>> va
> > :65
> > >
> > >>>>>>
> > 3)
> > >>>>>>
> > >>>>>>
> > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at 
> > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zy
> > >>>>>> go
> > >>>>>> te
> > Ini
> > >
> > >>>>>>
> > t.java:903)
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > The device reported that the app had stopped running but in
> > >>>>>> fact it returned it to the workflows view but all the 
> > >>>>>> workflows had disappeared from the view. I guess it’s 
> > >>>>>> probably because this functionality is not ready yet but I 
> > >>>>>> figured I should report it anyway.
> > >>>>>>
> > >>>>>> Cheers,
> > >>>>>>
> > >>>>>> Ian
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> -- *Akah Larry N.H*
> > >>>>>
> > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > >>>>>
> > >>>>> Developing technologies for emergence and sustainable 
> > >>>>> development.
> > >>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>
> > >
> > >
> > >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1
> > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > =RrFl
> > -----END PGP SIGNATURE-----
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

Re: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Larry Akah <la...@gmail.com>.
I did the same thing with a Chrome REST client and it worked ok, but from
the java request, i don't seem to figure out exactly what could be
happening behind the scenes.

2015-07-03 13:39 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> I just tried sending a workflow using curl with the request formatted like
> below and the player is working ok and sent back the correct response.
>
> {"workflow" : {  "document" : "data:application/octet-stream;base64,BASE64
> ENCODE WORKFLOW GOES HERE"}}
>
> Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded version of
> the workflow with no url encoding.
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk]
> Sent: 03 July 2015 13:29
> To: dev@taverna.incubator.apache.org
> Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello,
>
> Unfortunately I can't see your request in the logs for some reason (some
> docker issue that we don't understand). Can you paste the body in an email
> (remember not to include any username/password stuff).
>
> Cheers,
>
> Ian
>
> -----Original Message-----
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 03 July 2015 12:26
> To: dev@taverna.incubator.apache.org
> Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna player
>
> Hello, now, am posting the body exactly as described without encoding with
> json and am getting a 400 bad request message.
> Anything that could be done about that?
>
> Cheers
>
>
> 2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:
>
> > Hello,
> >
> > That’s good news. Can’t wait to see it working in the app – let me
> > know when you have committed the code. By the way, I think the mailing
> > list removes attachments, probably best to either add screenshots to
> > JIRA or send links to the screenshots in something like dropbox or
> google drive.
> >
> > Cheers,
> >
> > Ian
> >
> > From: Larry Akah [mailto:larryakah@gmail.com]
> > Sent: 01 July 2015 20:07
> > To: dev@taverna.incubator.apache.org
> > Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' error
> > and app stops.
> >
> > Great, i think its working. I have tested it from a REST client in
> > chrome and i receieved the 201 status code and the structure of the
> > workflow. Find here attached a screenshot of the post request.
> > Next up, i will be incorporating that into the app.
> >
> > cheers
> >
> > 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > Ok, thanks.
> > When i try that, i will send my feedback.
> >
> > Cheers
> >
> > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk
> <mailto:
> > ian.dunlop@manchester.ac.uk>>:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > I think the workflow can just be sent as it is. The request is JSON
> > formatted but the things inside the request don't have to be. The
> > t2flow/xml can be sent base64 encoded as they are.
> >
> > Cheers,
> >
> > Ian
> >
> > On 30/06/15 12:32, Larry Akah wrote:
> > > Hello, The workflows we get from myexperiment are formatted as xml
> > > or t2flow files. Do these absolutely need to be converted in json
> > > before posting or they can be sent as is?
> > >
> > > Cheers
> > >
> > > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > > <ia...@manchester.ac.uk>>:
> > >
> > > Hello,
> > >
> > > I've had a chat with the taverna player developer and you need to
> > > send a request as follows:
> > >
> > > POST to /workflows.json
> > >
> > > {"workflow" : {  "document" :
> > > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES
> > > HERE"}}
> > >
> > > using HTTP basic auth with username:password base64 encoded in the
> > > Authorization header in the request  e.g. Authorization: Basic
> > > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because the
> > > content type is not being respected for some reason.
> > >
> > >
> > > Here's an example using curl: curl -u your_username -X POST -H
> > > "Content-Type: application/json" -d@wf.json<ma...@wf.json>
> > > http://taverna-player-server/workflows.json
> > >
> > > where wf.json is the workflow file, this would then prompt for a
> > > passwor d. Hope this helps, please let us know how you get on.
> > >
> > > Cheers,
> > >
> > > Ian
> > >
> > > On 29/06/15 19:23, Larry Akah wrote:
> > >>>> I need some help with uploading a workflow to the player. The API
> > >>>> doesn't make it seem possible currently. How is it done?
> > >>>>
> > >>>> cheers
> > >>>>
> > >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> > larryakah@gmail.com>>:
> > >>>>
> > >>>>> Yes, its not yet ready. i still need to adjust that because at
> > >>>>> first , i was using the player to fetch workflows and derived a
> > >>>>> run skeleton to use for creating workflows. There is still some
> > >>>>> stuff that needs to be fixed there.
> > >>>>>
> > >>>>> Cheers
> > >>>>>
> > >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> > >>>>> <Ia...@manchester.ac.uk>>:
> > >>>>>
> > >>>>>> Hello,
> > >>>>>>
> > >>>>>> I got a ‘fatal’ error which the emulator reported when clicking
> > >>>>>> on ‘create run’:
> > >>>>>>
> > >>>>>> 06-29 15:25:39.554
> > >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> > >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> > >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> > >>>>>> java.lang.NullPointerException: Attempt to invoke virtual
> > >>>>>> method 'void android.app.AlertDialog.show()' on a null object
> > >>>>>> reference at
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407)
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> > >>>>>> ai
> > lFr
> > >
> > >>>>>>
> > agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289)
> > >>>>>>
> > >>>>>>
> > > at android.os.AsyncTask.finish(AsyncTask.java:636)
> > >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> > >>>>>> at
> > >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.ja
> > >>>>>> va
> > :65
> > >
> > >>>>>>
> > 3)
> > >>>>>>
> > >>>>>>
> > > at android.os.Handler.dispatchMessage(Handler.java:102)
> > >>>>>> at android.os.Looper.loop(Looper.java:135) at
> > >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> > >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> > >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at
> > >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygo
> > >>>>>> te
> > Ini
> > >
> > >>>>>>
> > t.java:903)
> > >>>>>>
> > >>>>>>
> > > at
> > >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > The device reported that the app had stopped running but in
> > >>>>>> fact it returned it to the workflows view but all the workflows
> > >>>>>> had disappeared from the view. I guess it’s probably because
> > >>>>>> this functionality is not ready yet but I figured I should
> > >>>>>> report it anyway.
> > >>>>>>
> > >>>>>> Cheers,
> > >>>>>>
> > >>>>>> Ian
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> -- *Akah Larry N.H*
> > >>>>>
> > >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> > >>>>> *www.iceteck.com<http://www.iceteck.com>*
> > >>>>>
> > >>>>> Developing technologies for emergence and sustainable
> > >>>>> development.
> > >>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>
> > >
> > >
> > >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1
> > iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> > SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> > rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> > xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> > iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> > wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> > =RrFl
> > -----END PGP SIGNATURE-----
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
> >
> >
> > --
> > *Akah Larry N.H*
> > *Lead Software Engineer @ GiftedMom*
> > *Founder IceTeck Inc*
> > *www.iceteck.com<http://www.iceteck.com>*
> >
> > Developing technologies for emergence and sustainable development.
> >
>
>
>
> --
> *Akah Larry N.H*
>
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com*
>
> Developing technologies for emergence and sustainable development.
>



-- 
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

I just tried sending a workflow using curl with the request formatted like below and the player is working ok and sent back the correct response.

{"workflow" : {  "document" : "data:application/octet-stream;base64,BASE64 ENCODE WORKFLOW GOES HERE"}}

Where BASE64 ENCODE WORKFLOW GOES HERE is the BASE 64 encoded version of the workflow with no url encoding.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk] 
Sent: 03 July 2015 13:29
To: dev@taverna.incubator.apache.org
Subject: RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello,

Unfortunately I can't see your request in the logs for some reason (some docker issue that we don't understand). Can you paste the body in an email (remember not to include any username/password stuff).

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com]
Sent: 03 July 2015 12:26
To: dev@taverna.incubator.apache.org
Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello, now, am posting the body exactly as described without encoding with json and am getting a 400 bad request message.
Anything that could be done about that?

Cheers


2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> That’s good news. Can’t wait to see it working in the app – let me 
> know when you have committed the code. By the way, I think the mailing 
> list removes attachments, probably best to either add screenshots to 
> JIRA or send links to the screenshots in something like dropbox or google drive.
>
> Cheers,
>
> Ian
>
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 01 July 2015 20:07
> To: dev@taverna.incubator.apache.org
> Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' error 
> and app stops.
>
> Great, i think its working. I have tested it from a REST client in 
> chrome and i receieved the 201 status code and the structure of the 
> workflow. Find here attached a screenshot of the post request.
> Next up, i will be incorporating that into the app.
>
> cheers
>
> 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> Ok, thanks.
> When i try that, i will send my feedback.
>
> Cheers
>
> 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk<mailto:
> ian.dunlop@manchester.ac.uk>>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I think the workflow can just be sent as it is. The request is JSON 
> formatted but the things inside the request don't have to be. The 
> t2flow/xml can be sent base64 encoded as they are.
>
> Cheers,
>
> Ian
>
> On 30/06/15 12:32, Larry Akah wrote:
> > Hello, The workflows we get from myexperiment are formatted as xml 
> > or t2flow files. Do these absolutely need to be converted in json 
> > before posting or they can be sent as is?
> >
> > Cheers
> >
> > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > <ia...@manchester.ac.uk>>:
> >
> > Hello,
> >
> > I've had a chat with the taverna player developer and you need to 
> > send a request as follows:
> >
> > POST to /workflows.json
> >
> > {"workflow" : {  "document" :
> > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES 
> > HERE"}}
> >
> > using HTTP basic auth with username:password base64 encoded in the 
> > Authorization header in the request  e.g. Authorization: Basic 
> > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because the 
> > content type is not being respected for some reason.
> >
> >
> > Here's an example using curl: curl -u your_username -X POST -H
> > "Content-Type: application/json" -d@wf.json<ma...@wf.json> 
> > http://taverna-player-server/workflows.json
> >
> > where wf.json is the workflow file, this would then prompt for a 
> > passwor d. Hope this helps, please let us know how you get on.
> >
> > Cheers,
> >
> > Ian
> >
> > On 29/06/15 19:23, Larry Akah wrote:
> >>>> I need some help with uploading a workflow to the player. The API 
> >>>> doesn't make it seem possible currently. How is it done?
> >>>>
> >>>> cheers
> >>>>
> >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> >>>>
> >>>>> Yes, its not yet ready. i still need to adjust that because at 
> >>>>> first , i was using the player to fetch workflows and derived a 
> >>>>> run skeleton to use for creating workflows. There is still some 
> >>>>> stuff that needs to be fixed there.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> >>>>> <Ia...@manchester.ac.uk>>:
> >>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>> I got a ‘fatal’ error which the emulator reported when clicking 
> >>>>>> on ‘create run’:
> >>>>>>
> >>>>>> 06-29 15:25:39.554
> >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> >>>>>> java.lang.NullPointerException: Attempt to invoke virtual 
> >>>>>> method 'void android.app.AlertDialog.show()' on a null object 
> >>>>>> reference at 
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> >>>>>> ai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407)
> >>>>>>
> >>>>>>
> > at
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> >>>>>> ai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289)
> >>>>>>
> >>>>>>
> > at android.os.AsyncTask.finish(AsyncTask.java:636)
> >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> >>>>>> at
> >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.ja
> >>>>>> va
> :65
> >
> >>>>>>
> 3)
> >>>>>>
> >>>>>>
> > at android.os.Handler.dispatchMessage(Handler.java:102)
> >>>>>> at android.os.Looper.loop(Looper.java:135) at
> >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at 
> >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygo
> >>>>>> te
> Ini
> >
> >>>>>>
> t.java:903)
> >>>>>>
> >>>>>>
> > at
> >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> >>>>>>
> >>>>>>
> >>>>>>
> The device reported that the app had stopped running but in
> >>>>>> fact it returned it to the workflows view but all the workflows 
> >>>>>> had disappeared from the view. I guess it’s probably because 
> >>>>>> this functionality is not ready yet but I figured I should 
> >>>>>> report it anyway.
> >>>>>>
> >>>>>> Cheers,
> >>>>>>
> >>>>>> Ian
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> -- *Akah Larry N.H*
> >>>>>
> >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>>>> *www.iceteck.com<http://www.iceteck.com>*
> >>>>>
> >>>>> Developing technologies for emergence and sustainable 
> >>>>> development.
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> =RrFl
> -----END PGP SIGNATURE-----
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.

RE: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Posted by Ian Dunlop <Ia...@manchester.ac.uk>.
Hello,

Unfortunately I can't see your request in the logs for some reason (some docker issue that we don't understand). Can you paste the body in an email (remember not to include any username/password stuff).

Cheers,

Ian

-----Original Message-----
From: Larry Akah [mailto:larryakah@gmail.com] 
Sent: 03 July 2015 12:26
To: dev@taverna.incubator.apache.org
Subject: GSOC Taverna Mobile: Uploading workflows to the Taverna player

Hello, now, am posting the body exactly as described without encoding with json and am getting a 400 bad request message.
Anything that could be done about that?

Cheers


2015-07-02 10:23 GMT+01:00 Ian Dunlop <Ia...@manchester.ac.uk>:

> Hello,
>
> That’s good news. Can’t wait to see it working in the app – let me 
> know when you have committed the code. By the way, I think the mailing 
> list removes attachments, probably best to either add screenshots to 
> JIRA or send links to the screenshots in something like dropbox or google drive.
>
> Cheers,
>
> Ian
>
> From: Larry Akah [mailto:larryakah@gmail.com]
> Sent: 01 July 2015 20:07
> To: dev@taverna.incubator.apache.org
> Subject: Re: gsoc taverna mobile - creating a run causes 'fatal' error 
> and app stops.
>
> Great, i think its working. I have tested it from a REST client in 
> chrome and i receieved the 201 status code and the structure of the 
> workflow. Find here attached a screenshot of the post request.
> Next up, i will be incorporating that into the app.
>
> cheers
>
> 2015-06-30 6:39 GMT-05:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> Ok, thanks.
> When i try that, i will send my feedback.
>
> Cheers
>
> 2015-06-30 6:35 GMT-05:00 Ian Dunlop <ian.dunlop@manchester.ac.uk<mailto:
> ian.dunlop@manchester.ac.uk>>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I think the workflow can just be sent as it is. The request is JSON 
> formatted but the things inside the request don't have to be. The 
> t2flow/xml can be sent base64 encoded as they are.
>
> Cheers,
>
> Ian
>
> On 30/06/15 12:32, Larry Akah wrote:
> > Hello, The workflows we get from myexperiment are formatted as xml 
> > or t2flow files. Do these absolutely need to be converted in json 
> > before posting or they can be sent as is?
> >
> > Cheers
> >
> > 2015-06-30 5:11 GMT-05:00 Ian Dunlop
> > <ia...@manchester.ac.uk>>:
> >
> > Hello,
> >
> > I've had a chat with the taverna player developer and you need to 
> > send a request as follows:
> >
> > POST to /workflows.json
> >
> > {"workflow" : {  "document" :
> > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES 
> > HERE"}}
> >
> > using HTTP basic auth with username:password base64 encoded in the 
> > Authorization header in the request  e.g. Authorization: Basic 
> > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because the 
> > content type is not being respected for some reason.
> >
> >
> > Here's an example using curl: curl -u your_username -X POST -H
> > "Content-Type: application/json" -d@wf.json<ma...@wf.json> 
> > http://taverna-player-server/workflows.json
> >
> > where wf.json is the workflow file, this would then prompt for a 
> > passwor d. Hope this helps, please let us know how you get on.
> >
> > Cheers,
> >
> > Ian
> >
> > On 29/06/15 19:23, Larry Akah wrote:
> >>>> I need some help with uploading a workflow to the player. The API 
> >>>> doesn't make it seem possible currently. How is it done?
> >>>>
> >>>> cheers
> >>>>
> >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <larryakah@gmail.com<mailto:
> larryakah@gmail.com>>:
> >>>>
> >>>>> Yes, its not yet ready. i still need to adjust that because at 
> >>>>> first , i was using the player to fetch workflows and derived a 
> >>>>> run skeleton to use for creating workflows. There is still some 
> >>>>> stuff that needs to be fixed there.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop
> >>>>> <Ia...@manchester.ac.uk>>:
> >>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>> I got a ‘fatal’ error which the emulator reported when clicking 
> >>>>>> on ‘create run’:
> >>>>>>
> >>>>>> 06-29 15:25:39.554
> >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile
> >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process:
> >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216
> >>>>>> java.lang.NullPointerException: Attempt to invoke virtual 
> >>>>>> method 'void android.app.AlertDialog.show()' on a null object 
> >>>>>> reference at 
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> >>>>>> ai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407)
> >>>>>>
> >>>>>>
> > at
> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdet
> >>>>>> ai
> lFr
> >
> >>>>>>
> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289)
> >>>>>>
> >>>>>>
> > at android.os.AsyncTask.finish(AsyncTask.java:636)
> >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177)
> >>>>>> at
> >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.ja
> >>>>>> va
> :65
> >
> >>>>>>
> 3)
> >>>>>>
> >>>>>>
> > at android.os.Handler.dispatchMessage(Handler.java:102)
> >>>>>> at android.os.Looper.loop(Looper.java:135) at
> >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257)
> >>>>>> at java.lang.reflect.Method.invoke(Native Method) at
> >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at 
> >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygo
> >>>>>> te
> Ini
> >
> >>>>>>
> t.java:903)
> >>>>>>
> >>>>>>
> > at
> >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
> >>>>>>
> >>>>>>
> >>>>>>
> The device reported that the app had stopped running but in
> >>>>>> fact it returned it to the workflows view but all the workflows 
> >>>>>> had disappeared from the view. I guess it’s probably because 
> >>>>>> this functionality is not ready yet but I figured I should 
> >>>>>> report it anyway.
> >>>>>>
> >>>>>> Cheers,
> >>>>>>
> >>>>>> Ian
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> -- *Akah Larry N.H*
> >>>>>
> >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc*
> >>>>> *www.iceteck.com<http://www.iceteck.com>*
> >>>>>
> >>>>> Developing technologies for emergence and sustainable 
> >>>>> development.
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY
> SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+
> rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8
> xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35
> iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X
> wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs=
> =RrFl
> -----END PGP SIGNATURE-----
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>
>
>
> --
> *Akah Larry N.H*
> *Lead Software Engineer @ GiftedMom*
> *Founder IceTeck Inc*
> *www.iceteck.com<http://www.iceteck.com>*
>
> Developing technologies for emergence and sustainable development.
>



--
*Akah Larry N.H*

*Lead Software Engineer @ GiftedMom*
*Founder IceTeck Inc*
*www.iceteck.com*

Developing technologies for emergence and sustainable development.