需要有关网络服务“请求模板”的建议图案
我们正在设计一个系统,该系统需要允许构建由来自不同数据源(例如数据库和后台系统)的数据组成的对象,并且正在寻找通过 Web 服务接口促进此功能的方法。
为了满足这一要求,我们建议创建一个“请求”对象作为 Web 服务请求方法的输入参数,以便 Web 服务知道要从哪个源填充对象上的哪些字段,一种“pick n mix”来填充您的返回目的。
如何设计这个“请求模板”对象?它是否合适?
我们需要解决方案来实现以下目标:
必须让消费者清楚 服务方法所期望的内容以及 将返回什么。
消费者必须具有以下可见性: 可以到达哪些地点
构建时的每个字段
请求。明确的关系 响应对象和请求 对象存在。
We are designing a system which needs to allow the construction of objects made up of data, sourced from disparate datasources (databases, and back office systems for example) and are looking at ways to facilitate this functionality across a web service interface.
To service this requirement we propose creating a "request" object as an input parameter for the web service request methods so the web service knows which fields on the object to populate from which source, a sort of "pick n mix" to poulate your return object.
How could this "Request template" object be designed and is it a suitable approach?
We need the solution to achieve the following:
Must be clear to the consumer of the
service what the method expects and
what will be returned.The Consumer must have visibility as
to what locations are available for
each field when constructing the
request.A clear relationship between the
response object and the request
object exists.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否考虑过使用 WCF 并让请求对象使用接口,这样它也可以扩展?
Have you considered using WCF and have the request object use an interface, that way it is extensible as well?