Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is OData v4 supported? #32

Closed
roygarbriceno opened this issue Jul 6, 2014 · 6 comments
Closed

Is OData v4 supported? #32

roygarbriceno opened this issue Jul 6, 2014 · 6 comments

Comments

@roygarbriceno
Copy link

I'd like to know if v4 of the odata protocol is supported. I tried to use a service created with the new Asp.net Web API 2.2 and I'm getting some problems.

@object
Copy link
Member

object commented Jul 6, 2014

OData v4 protocol is not fully supported, it's planned for Simple.OData.Client v.4 that will be based on Microsoft.OData.Core and will be available within next 3-4 months. But if you have examples of what doesn't properly work now, I can check it out.

@roygarbriceno
Copy link
Author

The problems seem to be deserializing the json result. For example, my service return this, a simple result using web api 2.2 and exception is throw (Im sorry but I dont have my demo at hand, I'll post the exception in a while):

{
"@odata.context":"http://localhost/BusinessManagement/$metadata#Organizations","value":[
{
"@odata.etag":"W/"YmluYXJ5J0FBQUFBQUFBRjNZPSc="","OrganizationId":"523caebc-bcfb-4f5f-bef4-4865bb3f619a","ParentOrganizationId":"00000000-0000-0000-0000-000000000000","OrganizationCode":"01","FiscalId1":"J123456791","FiscalId2":"","Name":"Organizacion 01","CurrencyId":"00000000-0000-0000-0000-000000000000","Observations":"#","CreatedBy":"rbriceno","CreatedById":"c51157ee-b885-4a96-84a2-3feed26c80c3","UtcCreated":"2014-06-16T20:02:19.7639872Z","UpdatedBy":"rbriceno","UpdatedById":"c51157ee-b885-4a96-84a2-3feed26c80c3","UtcUpdated":"2014-06-16T20:02:19.7639872Z","Active":true,"Deleted":false,"Timestamp":"AAAAAAAAF3Y="
}
]
}

Support for OData v4.0 in the future is great, but the problem I'm seeing is that web api 2.1 (which targets OData v3) supports Actions but no Fuctions, the Simple OData Client supports Fuctions but no Actions. Web Api 2.2 supports Actions and Fuctions, but seems to target only OData v4. I say "seems" because according to the documentation both versions are supported but it doesn´t says how to specify which versión to use (Im looking into this).

I really like your client, but I need to solve how to use either functions or actions...

Thanks

Roygar

@object
Copy link
Member

object commented Jul 7, 2014

I see. The problem is that current version of Simple.OData.Client only supports XML as result payload and Web API defaults to JSON. In principle the client should be able to request response as RSS XML, I will have to check what's going on.

@roygarbriceno
Copy link
Author

Ok, in the mean time I reverted to OData v3, I'll have to live without actions nor fuctions for the the moment.... thanks..

@jinhong-
Copy link

jinhong- commented Aug 5, 2014

Any update on this and JSON serialization support?

@object
Copy link
Member

object commented Oct 5, 2014

For you information: I have uploaded a 4.0.0-rc1 of Simple.OData.Client that supports OData V4 protocol and JSON payload. You can give it a try.

@object object closed this as completed Oct 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants