Subject:Reformat SOAP Response Author:Chris Youll Date:18 Jul 2007 10:09 AM
I am working with a COTS application that allows jobs to be exposed as Web services and accessed with a SOAP request. Using Perl I am able to loop through the arrays and produce the results that I need in an HTML page. I think it could be done more efficiently by reformatting the SOAP response with XSLT which would also make it easier for other application to consume Web service.
The SOAP response returns back the field definitions for each element then the actual data. Below is a sample of the SOAP response and an example of what I am trying to accomplish.
A few questions I have about this are:
1. Is it possible to loop through the arrays, (field definitions and data values) and to create the results I am looking for using XSLT?
2. Does this even make sense to do this step to help other applications consume the Web service?
3. Can someone help me get started on the XSLT to do this?
Thank you for any assistance.
What I would like to do is to take the data in the <fieldName> </fieldName> tags and convert them to tags, then put the data within the <value></value> tags inside the corresponding tag.