如何在soap请求之间保留变量值 [英] How to retain variable values between the soap request

查看:46
本文介绍了如何在soap请求之间保留变量值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



I有一个Web服务,我有一个数据集,


I have a Web Service in which I have a dataset ,

在一个肥皂请求中我填写该数据集并在另一个请求上

我检索数据来自该数据集。

但问题在于另一个请求数据集变空。

如何从新的soap请求中获取数据集中的数据?

推荐答案

这是一个非常糟糕的设计模式。最好的Web服务设计是让他们没有状态。

That is a very bad design pattern. The best design for web services is for them to be without state.

一种设计是将两个请求合并为一个,检索并处理数据集。

One design would be to combine both requests into one, which retrieves and processes the dataset.

如果这不可行,则可以使用会话状态。

If this is not practical, then you can use Session state.

在任何一种情况下,您都应该使用WCF而不是传统的ASMX Web服务。这是一项不应用于新开发的技术。

In either case, you should be using WCF instead of the legacy ASMX web services. This is a technology which should not be used for new development.


这篇关于如何在soap请求之间保留变量值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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