Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1234

OData V2.0: Batch response does not show the umlaut characters correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • V2 2.0.6
    • None
    • odata2-core
    • None

    Description

      When the batch response part is created as below
      List<BatchResponsePart> parts = new ArrayList<BatchResponsePart>();
      String headerValue = "<notification xmlns:ns=\"http://namespace\">"
      + "<code>TEST_MSG/004</code><message>Team ID 'XXX_E'äöü Ö is not in the defined range."
      + "</message><target>Team_Identifier</target><severity>error</severity><details><detail>"
      + "<code>TEST_MSG/010</code><message>"
      + "This is a message text of a business exception raised by the provider.</message><target>"
      + "</target><severity>warning</severity></detail></details></notification>";
      ODataResponse response = ODataResponse.entity("Walter Winter")
      .status(HttpStatusCodes.OK)
      .header("message", headerValue)
      .contentHeader("application/xml")
      .build();
      List<ODataResponse> responses = new ArrayList<ODataResponse>(1);
      responses.add(response);
      parts.add(BatchResponsePart.responses(responses).changeSet(false).build());

      BatchResponseWriter writer = new BatchResponseWriter();
      ODataResponse batchResponse = writer.writeResponse(parts);

      The response batch payload shows the umlaut characters 'äöü Ö incorrectly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramya.vasanth Ramya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: