Custom structure for response from DataService

hkapoor@ciber.com's picture
I am using WSO2 Data service to expose data in mysql as webservice. I want data service to return XML data that conforms to a specific XSD. To elaborate: I used wizard to create data service and when I tested the service I got an XML response (contained in attached file) However I want the output to be in following structure (contained in attached file) How can we achieve this? Can we make WSO2 DataService to return data in the format we expect ?
AttachmentSize
XMLContent.txt603 bytes
dkruitbosch's picture

Hi, I've had the same issue.

Hi, I've had the same issue. Before the 2.0 version of the dataservice product, we used the WSO2 ESB as a proxy to the dataservice and the XSLT mediation to transform both the input and output of the dataservice. We had an existing webservice that fetched data from a database, and we rebuild it using WSO2 dataservices. Now with the carbon feature pack we have the same thing but only one WSO2 instance to manage. It essentially the same thing as our previous setup, but easier and more manageable. Please look at the tutorial for "Adding mediation to WSAS". It can be applied to the dataservices product as well. Hope this helps, Regards, Danny Kruitbosch
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)