Page 1 of 1

How can i replace an XML element (Web Services Transformer)

Posted: Tue Sep 08, 2009 12:58 am
by srinivas2705
Hi,
I am developing a job which calls a web Service via the Web Services transformer. The Web Service gives an XML as an output Response. I am able to generate the response from the Web Service. Now i want to replace one of the elements in the XML which i have got and call another webService which stores it back into the database.
The Other Web Service mentioned above is also working fine. Instead of manually changing or using : sed command i want to check if we can use the Transformer for replacing the element.

Please respond in case you know how to do it.

Posted: Tue Sep 08, 2009 5:37 am
by eostic
...just one? ...if it's not a HUGE xml document, I would just pass it into a Transformer and do it there... especially a BASIC Transformer. The BASIC Transformer is chock full of text functions that make pulling out a single string between delimieters (in this case, tags) fairly easy. You could also do a combination...XMLInput will mostly easily get you the single value of the element.....but for something like this I probably wouldn't bother with XMLOutput to write it back --- I'd just zap it with a selection of UV/Basic functions. Others in this forum can better suggest "which" functions to choose, but I know there are some good ones, like FIELD and others.

Ernie

Posted: Tue Sep 08, 2009 4:44 pm
by ray.wurlod
... or use a server job, which avoids the overheads of a parallel job.