You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ramya (JIRA)" <ji...@apache.org> on 2018/02/09 06:42:00 UTC

[jira] [Created] (OLINGO-1234) OData V2.0: Batch response does not show the umlaut characters correctly

Ramya created OLINGO-1234:
-----------------------------

             Summary: OData V2.0: Batch response does not show the umlaut characters correctly
                 Key: OLINGO-1234
                 URL: https://issues.apache.org/jira/browse/OLINGO-1234
             Project: Olingo
          Issue Type: Bug
          Components: odata2-core
    Affects Versions: V2 2.0.6
            Reporter: Ramya


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)