是否可以通过odata查询soap端点? [英] Is it possible to query a soap endpoint via odata?

查看:77
本文介绍了是否可以通过odata查询soap端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SOAP端点:

I've got a SOAP endpoint:

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

我想围绕此服务创建一个odata包装器,以便在导航到http://myodataservice/api/Entities$?filter=AccountNumber eq '123123'

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

它将从SOAP(wsdl)服务中检索数据,但是它将允许客户端发出odata查询.

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

是否可以使用ODATA查询SOAP服务?

推荐答案

您可以围绕SOAP端点创建OData包装器,但我认为这样做不值得.

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

OData服务将允许按所有属性进行过滤,排序和选择(除其他外),并且SOAP服务可能不允许所有这些,因此您的OData服务可能必须去获取所有数据,然后后处理它失去了OData的主要优点,因为您可以在服务器端进行所有筛选和排序.您也可以只获取数据客户端并在那里进行过滤.

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.

如果您的SOAP服务以某种方式确实具有所有这些支持,那么可以,您可以为其编写OData包装器并获得这些好处,但是要将所有不同的可能查询转换为您可以查询的内容仍然需要大量工作SOAP服务可以处理.

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.

我不知道您想要OData包装器的原因,但看起来这可能需要大量工作才能获得最小的收益,但这全都取决于您的用例.

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.

这篇关于是否可以通过odata查询soap端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆