Is it possible to query a soap endpoint via odata?

大城市里の小女人 提交于 2019-12-10 13:14:34

问题


I've got a SOAP endpoint:

 <organization URL>/XRMServices/2011/Organization.svc 

I would like to create an odata wrapper around this service, such that when navigating to http://myodataservice/api/Entities$?filter=AccountNumber eq '123123'

It would retrieve data from the SOAP (wsdl) service, but it would allow the client to issue odata queries.

Is it possible to query a SOAP service using ODATA?


回答1:


You could create an OData wrapper around a SOAP endpoint but I don't think that it is worth it.

The OData service would allow filtering, ordering and selecting by all of the properties (amongst other things) and the SOAP service may not allow all of this so your OData service would probably have to go and get all of the data and then post process it which loses the main benefit of OData in that you can do all of the filtering and sorting on the server side. You may as well just get the data client side and filter it there.

If your SOAP service somehow does have all of this support then yes, you could write an OData wrapper for it and get these benefits but it would still be a lot of work to convert all of the different possible queries into something that your SOAP service can handle.

I don't know your reasons for wanting an OData wrapper but it seems like this might be a lot of work for minimal benefit but it all depends on your use case.



来源:https://stackoverflow.com/questions/39415207/is-it-possible-to-query-a-soap-endpoint-via-odata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!