You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org> on 2014/07/30 09:55:38 UTC

[jira] [Resolved] (OLINGO-390) Client JSON serializer should correctly output complex value's odata.type

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

Francesco Chicchiriccò resolved OLINGO-390.
-------------------------------------------

    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=17544d2d1c870987155ef1697bf4b625a8bbac5b

> Client JSON serializer should correctly output complex value's odata.type
> -------------------------------------------------------------------------
>
>                 Key: OLINGO-390
>                 URL: https://issues.apache.org/jira/browse/OLINGO-390
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: V4 4.0.0-beta-01
>            Reporter: Challen
>            Assignee: Francesco Chicchiriccò
>             Fix For: V4 4.0.0-beta-01
>
>
> POST https://xxxxx.com/EWS/OData/Me/Drafts/Messages HTTP/1.1
> Accept: application/json;odata.metadata=full
> Content-Type: application/json;odata.metadata=full
> OData-MaxVersion: 4.0
> OData-Version: 4.0
> Content-Length: 1126
> Host: sdfpilot.outlook.com
> Connection: Keep-Alive
> User-Agent: Apache-Olingo/0.1.0-SNAPSHOT
> Cookie: ClientId=JHXVWTV0KATKXYEW
> Cookie2: $Version=1
> Authorization: Basic b2RhdGF0ZXN0QG9hdXRoMy5jY3NjdHAubmV0OlBhJCR3MHJk
> {"@odata.type":"#Microsoft.Exchange.Services.OData.Model.Message","ToRecipients@odata.type":"#Collection(Microsoft.Exchange.Services.OData.Model.Recipient)","ToRecipients":[{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.Recipient","Name@odata.type":"String","Name":"challen_olingo_client","Address@odata.type":"String","Address":"challenh@microsoft.com"}],"Body@odata.type":"#Microsoft.Exchange.Services.OData.Model.ItemBody","Body":{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.ItemBody","Content@odata.type":"String","Content":"this is a simple email body content","ContentType@odata.type":"#Microsoft.Exchange.Services.OData.Model.BodyType","ContentType":"Text"},"Subject@odata.type":"String","Subject":"Exchange C# client demo 5/22/2014 7:10:25 AM","Importance@odata.type":"#Microsoft.Exchange.Services.OData.Model.Importance","Importance":"Low","From@odata.type":"#Microsoft.Exchange.Services.OData.Model.Recipient","From":{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.Recipient","Name@odata.type":"String","Name":"admin","Address@odata.type":"String","Address":"admin@oauth3.ccsctp.net"}}
> ===================== 
> the response will be error :
> message=A complex property with an 'odata.type' property annotation was found. Complex properties must not have the 'odata.type' property annotation, instead the 'odata.type' should be specified as an instance annotation in the complex value.
> ===================== 
> cause: 'Body' is complex value, its odata.type should only be specified within its value, instead of: "Body@odata.type":"#Microsoft.Exchange.Services.OData.Model.ItemBody"



--
This message was sent by Atlassian JIRA
(v6.2#6252)