Uploaded image for project: 'ZZZ-WSO2 Data Services Server'
  1. ZZZ-WSO2 Data Services Server
  2. DS-1209

Invalid Staring element for GET operation with Accept Header, when result having the same element name in two places

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.1-RC1, 3.5.1
    • Component/s: None
    • Labels:
      None
    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      If I have a GET resource defined, and query is as follows,

                     <sql>SELECT  NAME, AGE, LOCATION FROM TABLE WHERE ID=:id</sql>
            <result outputType="json">{"NAMES":{"NAME":[{ "NAME":"$NAME", "AGE":"$AGE", "LOCATION":"$LOCATION"}]}}</result>
      

      Because of the 'NAME' appears in two different places, it throws an error
      StaticOutputElement.execute_DS Code: UNKNOWN_ERROR_Nested Exception:-javax.xml.stream.XMLStreamException: Invalid Staring element

      Operation should be invoked with Accept Header as application json, as follows..

       curl -X GET -H "Accept:application/json" http://url:port/services/names/1/
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                madhawag@wso2.com Madhawa Gunasekara
                Reporter:
                sajith@wso2.com Sajith Kariyawasam
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: