[
https://issues.apache.org/jira/browse/OLINGO-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142834#comment-15142834
]
Ramesh Reddy commented on OLINGO-878:
-------------------------------------
I considering an approach where if there is a custom "Term" exists
"xml10-incompatible-char-replacement" with no default value, which has
"appliesTo" value of "PropertyValue ReturnType". Then the schema needs to
define this in an annotation for the Term with constant expression of string
that is the replacement character.
{code}
<Term Name="xml10-incompatible-char-replacement" Type="Edm.String"
AppliesTo="PropertyValue ReturnType">
<Annotation Term="Core.Description" String="Replacement character for
invalid characters in the XML 1.0 Atom payload"/>
</Term>
<Annotation Term="xml10-incompatible-char-replacement" String="xxx"/>
{code}
This way Olingo framework can provide the functionality, but will not enforce
on the service developer. If they want this functionality then they would need
to define above in their $metadata, by this way we can avoid forcing the
developer to create a custom serializer. If this ever can make it into "core"
vocabulary, then we can adjust nomenclature for it.
If the above annotation is not available, then the behavior will be same as
today.
> XML 1.0 invalid characters not supported in Odata Atom feed
> -----------------------------------------------------------
>
> Key: OLINGO-878
> URL: https://issues.apache.org/jira/browse/OLINGO-878
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: (Java) V4 4.0.0-beta-01
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: (Java) V4 4.2.0
>
>
> XML 1.0 does not support parsing of some of the control characters in string
> based properties, thus not eliminating or replacing them could possibly end
> up with error.
> For complete details of the issue, please see
> https://issues.jboss.org/browse/TEIID-2757
> Olingo AtomSerializer should be written to provide options such that user can
> avoid such characters in the payload. Since JSON supports unicode characters
> this should be fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)