[
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","[email protected]":"#Collection(Microsoft.Exchange.Services.OData.Model.Recipient)","ToRecipients":[{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.Recipient","[email protected]":"String","Name":"challen_olingo_client","[email protected]":"String","Address":"[email protected]"}],"[email protected]":"#Microsoft.Exchange.Services.OData.Model.ItemBody","Body":{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.ItemBody","[email protected]":"String","Content":"this
> is a simple email body
> content","[email protected]":"#Microsoft.Exchange.Services.OData.Model.BodyType","ContentType":"Text"},"[email protected]":"String","Subject":"Exchange
> C# client demo 5/22/2014 7:10:25
> AM","[email protected]":"#Microsoft.Exchange.Services.OData.Model.Importance","Importance":"Low","[email protected]":"#Microsoft.Exchange.Services.OData.Model.Recipient","From":{"@odata.type":"#Microsoft.Exchange.Services.OData.Model.Recipient","[email protected]":"String","Name":"admin","[email protected]":"String","Address":"[email protected]"}}
> =====================
> 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:
> "[email protected]":"#Microsoft.Exchange.Services.OData.Model.ItemBody"
--
This message was sent by Atlassian JIRA
(v6.2#6252)