Thank you It didn't crossed my mind to use Beanshell to include attributes in the XML being sent to the service
Thanks Jorge On 10/01/2010 11:15 AM, Stian Soiland-Reyes wrote: > On Thu, Sep 23, 2010 at 09:55, Jorge de Jesus <[email protected]> wrote: >> Hi to all >> >> I am very happy with Taverna (2.2.0) and congratulations to the Taverna >> development team. >> >> I have a question concerning XML attributes. >> >> I've a service that accepts 2 dummy inputs, Taverna generates the >> following XML that works fine: > > Unfortunately the XML splitters don't currently support XML > attributes. [1] I don't think we currently honour fixed="x" or > default="y" definitions from the WSDL. > > (One question - if the attribute is fixed - why can't the web service > then insert the appropriate default if the attribute is missing..?) > > > Your best workaround at the moment would be to make a beanshell script > generate the XML manually, something like this: > > xml = "<dummy><input1 lang='en'>" + input1 + "</input1> <input2 > lang='de'>" + input2 + "</input2></dummy>"; > > (inputs: "input1", "input2", output: "xml") > > This should work, as long as you don't need to put attributes on the > top-level element <dummy>, which Taverna will replace with > <ns1:ExecuteProcess_dummyprocess> when connected to the web service. > The downside is that you would have to manually add this shim to > workflows. (You could wrap your web service and shims in a nested > workflow, and publish it on myExperiment) > > > Note that as part of the RESTful web service support we'll be building > an XML templating wizard that could make it easier to generate custom > XML. > > > [1] http://www.mygrid.org.uk/dev/issues/browse/T2-1108 > -------------------------------------------------------------------------------- Plymouth Marine Laboratory Registered Office: Prospect Place The Hoe Plymouth PL1 3DH Website: www.pml.ac.uk Registered Charity No. 1091222 PML is a company limited by guarantee registered in England & Wales company number 4178503 -------------------------------------------------------------------------------- This e-mail, its content and any file attachments are confidential. If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail [email protected] and then delete the email without making any copies or using it in any other way. The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated. You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses. -------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ 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/
