[ 
https://issues.apache.org/jira/browse/OLINGO-977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Riccardo Mariani updated OLINGO-977:
------------------------------------
    Description: 
The ODataXmlSerializer component does not call 
writer.writeStartDocument(DEFAULT_CHARSET, "1.0"); in complexCollection() 
method.

The fix
{code}
  XMLStreamWriter writer = 
XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, 
DEFAULT_CHARSET);
++ writer.writeStartDocument(DEFAULT_CHARSET, "1.0");
writer.writeStartElement(METADATA, Constants.VALUE, NS_METADATA);
{code}

Moreover maybe we should add a test to verify the xml format of value returned 
by all methods in the ODataXmlSerializer.

ATTENTION The important effect of the bug is that the xml content is NOT UTF8 
encoded.

  was:
The ODataXmlSerializer component does not call 
writer.writeStartDocument(DEFAULT_CHARSET, "1.0"); in complexCollection() 
method.
The fix
{code}
  XMLStreamWriter writer = 
XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, 
DEFAULT_CHARSET);
++ writer.writeStartDocument(DEFAULT_CHARSET, "1.0");
writer.writeStartElement(METADATA, Constants.VALUE, NS_METADATA);
{code}
Moreover maybe we should add a test to verify the xml format of value returned 
by all methods in the ODataXmlSerializer.


> Missing call "writer.writeStartDocument" in 
> ODataXmlSerializer.complexCollection()
> ----------------------------------------------------------------------------------
>
>                 Key: OLINGO-977
>                 URL: https://issues.apache.org/jira/browse/OLINGO-977
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.2.0
>            Reporter: Riccardo Mariani
>            Priority: Minor
>
> The ODataXmlSerializer component does not call 
> writer.writeStartDocument(DEFAULT_CHARSET, "1.0"); in complexCollection() 
> method.
> The fix
> {code}
>   XMLStreamWriter writer = 
> XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, 
> DEFAULT_CHARSET);
> ++ writer.writeStartDocument(DEFAULT_CHARSET, "1.0");
> writer.writeStartElement(METADATA, Constants.VALUE, NS_METADATA);
> {code}
> Moreover maybe we should add a test to verify the xml format of value 
> returned by all methods in the ODataXmlSerializer.
> ATTENTION The important effect of the bug is that the xml content is NOT UTF8 
> encoded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to