You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2016/06/14 07:04:40 UTC
[jira] [Comment Edited] (OLINGO-970) Post operation fails when null
value is passed in the payload
[ https://issues.apache.org/jira/browse/OLINGO-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328944#comment-15328944 ]
Michael Bolz edited comment on OLINGO-970 at 6/14/16 7:04 AM:
--------------------------------------------------------------
Hi [~ShankaraG],
as specified in [2.2.6.5.1 Complex Type|https://msdn.microsoft.com/en-us/library/dd541232.aspx] a ComplexType in Atom-based format must be represented as e.g.: {{<d:Address m:type="ODataDemo.Address" m:null="true" />}}
{quote}
If the value of the ComplexType is null, the element MUST be empty and MUST include the m:null attribute set to true, as required by the Common Serialization Rules for XML-based Formats
{quote}
However for JSON {{NULL}} is should be allowed.
I will check and give feedback.
Best Regards, Michael
was (Author: mirbo):
Hi [~ShankaraG],
as specified in [2.2.6.3.4 Complex Type|https://msdn.microsoft.com/en-us/library/dd541326.aspx] a ComplexType
{quote}
An instance of a ComplexType MUST be represented as a Verbose JSON object
{quote}
So {{NULL}} is not allowed.
Best Regards, Michael
> Post operation fails when null value is passed in the payload
> -------------------------------------------------------------
>
> Key: OLINGO-970
> URL: https://issues.apache.org/jira/browse/OLINGO-970
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 2.0.6
> Reporter: Shankara
> Assignee: Michael Bolz
> Labels: bug
> Attachments: 0001-null-check-for-Complex-Type-value.patch
>
>
> Hi,
> When passed null value (in JSON payload) or empty tag (in XML payload) for the value of a Complex Type the call to the post fails throwing null pointer exception in setComplexProperty method for the variable propertyValue. Can we add a null check here so that the call doesn't fail.
> Please refer to the patch attached.
> Example: JSON Payload
> ...
> ComplexType: null,
> ....
> XML Payload
> ...
> <ComplexType />
> ...
> Thanks & Regards
> Shankara G
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)