Hi Joerg,The problem seems to be that the parameter value you are trying to send needs to be URL-encoded.
The workaround is to use GET for your REST service in Taverna and to manually encode the dataset_uri parameter value, i.e. add the following string as the REST service's URL template:
http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression?dataset_uri=http%3a%2f%2fapps.ideaconsult.net%3a8080%2fFambit%2fFdataset%2f91010%0d%0awhere "http%3a%2f%2fapps.ideaconsult.net%3a8080%2fFambit%2fFdataset%2f91010%0d%0a" is the value you wish to pass as a parameter (i.e. http://apps.ideaconsult.net:8080/Fambit/Fdataset/91010) but URL-encoded.
In Taverna 2.3, there will be an option to tick for users to say whether they want their parameters encoded or not.
For some reason, the POST option does not work even with the parameter url-encoded. We will investigate it - thank you for reporting this issue.
I am attaching the workflow (for Taverna 2.2) for you to have a look at. Regards, Alex On 31/01/2011 13:45, Joerg Wicker wrote:
Hi everyone, I am trying to access a REST webservice with the REST plugin. I want to do a simple POST. With curl, I do curl --data-urlencode -X POST http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression?dataset_uri=http://apps.ideaconsult.net:8080/Fambit/Fdataset/91010 or curl -X POST http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression -d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/91010" And it works as expected. When I try to do the same with the REST plugin in Taverna, using http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression?dataset_uri={dataset} as URL template, I get a 500 response from the server. (I would expect a 400 as another parameter is still missing in the call). Looking through the logs, I can see that the dataset_uri parameter is not send to the server correctly. It occurs in the logs but is not interpreted as a parameter. I get the same results when using curl without the "--data-urlencode" option. Can I send the parameters like this in a POST in Taverna? Or is there another way to send them? Thanks for any help, Joerg -- Dipl.-Bioinf. Joerg Wicker room: MI 01.09.043 Technische Universitaet Muenchen phone: +49-89-289-19440 Institut fuer Informatik/I12 fax: +49-89-289-19414 Boltzmannstr. 3 email: [email protected] D-85748 Garching b. Muenchen, Germany http://wwwkramer.in.tum.de/wicker/ ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ taverna-users mailing list [email protected] [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/
<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="f3c6e169-9b4e-41b2-a6cb-0d7a3e8a648e" role="top"><name>Workflow6</name><inputPorts /><outputPorts><port><name>REST_Service_responseBody</name><annotations /></port><port><name>REST_Service_status</name><annotations /></port></outputPorts><processors><processor><name>REST_Service</name><inputPorts /><outputPorts><port><name>responseBody</name><depth>0</depth><granularDepth>0</granularDepth></port><port><name>status</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.ui-activities</group><artifact>rest-activity</artifact><version>0.3.1</version></raven><class>net.sf.taverna.t2.activities.rest.RESTActivity</class><inputMap /><outputMap><map from="status" to="status" /><map from="responseBody" to="responseBody" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean xmlns=""> <httpMethod>GET</httpMethod> <urlSignature>http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression?dataset_uri=http%3a%2f%2fapps.ideaconsult.net%3a8080%2fFambit%2fFdataset%2f91010%0d%0a</urlSignature> <acceptsHeaderValue>application/xml</acceptsHeaderValue> <contentTypeForUpdates>text/plain</contentTypeForUpdates> <outgoingDataFormat>String</outgoingDataFormat> <sendHTTPExpectRequestHeader>false</sendHTTPExpectRequestHeader> <showRedirectionOutputPort>false</showRedirectionOutputPort> <activityInputs /> </net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns=""> <maxJobs>1</maxJobs> </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns=""> <backoffFactor>1.0</backoffFactor> <initialDelay>1000</initialDelay> <maxDelay>5000</maxDelay> <maxRetries>0</maxRetries> </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross /></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="dataflow"><port>REST_Service_responseBody</port></sink><source type="processor"><processor>REST_Service</processor><port>responseBody</port></source></datalink><datalink><sink type="dataflow"><port>REST_Service_status</port></sink><source type="processor"><processor>REST_Service</processor><port>status</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>365ed2e0-d8db-456d-959e-015136426453</identification> </annotationBean> <date>2011-01-31 15:18:57.586 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>4a364def-622f-41c2-892a-dc4dad61fd7e</identification> </annotationBean> <date>2011-01-31 14:40:48.988 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>e3eb6c87-e197-498e-96cd-97ed07c903ba</identification> </annotationBean> <date>2011-01-31 15:11:06.73 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>9d688fc5-5242-46c7-8bb1-c155becd003b</identification> </annotationBean> <date>2011-01-31 15:18:44.961 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>ec1b46f9-e085-45c7-8cae-2955c7d79f9a</identification> </annotationBean> <date>2011-01-31 15:08:14.603 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>8f0731b6-0a9a-4e17-a630-7e34c2122c86</identification> </annotationBean> <date>2011-01-31 15:11:22.432 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>f3c6e169-9b4e-41b2-a6cb-0d7a3e8a648e</identification> </annotationBean> <date>2011-01-31 15:19:19.406 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>4ac38abe-6d4d-40d7-a6c9-069da1ead52b</identification> </annotationBean> <date>2011-01-31 15:10:30.793 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns=""> <annotationAssertions> <net.sf.taverna.t2.annotation.AnnotationAssertionImpl> <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion"> <identification>6150e513-a21b-4f04-ba87-4e6ba0f57042</identification> </annotationBean> <date>2011-01-31 14:40:34.363 GMT</date> <creators /> <curationEventList /> </net.sf.taverna.t2.annotation.AnnotationAssertionImpl> </annotationAssertions> </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ taverna-users mailing list [email protected] [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/
