DSS json convert issue for partial queries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

DSS json convert issue for partial queries

Yasas Karunarathna
This post has NOT been accepted by the mailing list yet.
Hi there,

I have created a data service using DSS as below.

table schema : id(int), config_key(varchar), value(varchar), description(varchar)

DSS configuration:

   <query id="select_configs" useConfig="enki_ds">
      <sql>select ? from configs</sql>
      <result element="Entries" rowName="Entry">
         <element column="id" name="id" optional="true" xsdType="integer"/>
         <element column="config_key" name="config_key" optional="true" xsdType="string"/>
         <element column="value" name="value" optional="true" xsdType="string"/>
         <element column="description" name="description" optional="true" xsdType="string"/>
   <operation name="select_configs_operation">
      <call-query href="select_configs">
         <with-param name="param0" query-param="param0"/>

SOAP request:
         <dat:param0>id, value</dat:param0>

  here we can pass parameters with any column combination like
     id, value

SOAP response:

      <Entries xmlns="http://ws.wso2.org/dataservice">

Problem :

When I add the header 'Accept : application/json' to make it the response json, it will return below error

    "Fault": {
        "faultcode": "soapenv:Server",
        "faultstring": "Error while writing to the output stream using JsonWriter",
        "detail": ""

Am doing something wrong? Please help...