如何使用休息或肥皂获得大回应 [英] how to get big response using rest or soap

查看:73
本文介绍了如何使用休息或肥皂获得大回应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题在java采访中问我。假设响应如此之大,以至于如何在Soap或其他Web服务中获得响应?



你能再详细说明吗?

解决方案

取决于响应的类型。



如果它是一个庞大的列表。我会为请求添加分页。因此,您只需要为每个视图周期提供所需的内容。



如果它是像二进制文件这样的大型对象。我把它分解成易于管理的部分。然后,您可以使用相同的最终结果执行许多较小的请求。由于多个请求的开销,这将花费更长的时间,但整体稳定性会更好。基本上构建自己的下载管理器。


this question ask me in java interview . Suppose response is so big so how to get response in Soap or rest Webservices ?

can u please eloborate more ?

解决方案

Depends on the type of response.

If it was a massive list. I'd add pagination to the request. So you only request what's needed for each view cycle.

If it was a massive object like a binary. I'd break it down into manageable parts. You can then do many smaller requests with the same end result. This would take a bit longer, because of the overhead of multiple requests, but the overall stability would be better. Essentially build your own download manager.


这篇关于如何使用休息或肥皂获得大回应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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