如何使Web服务请求遵循重定向? [英] How to make a Webservice request follow a redirect?

查看:108
本文介绍了如何使Web服务请求遵循重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要访问第三方Web服务。
最近,他们引入了负载均衡器,重定向到服务器。
因此,webservice获得302 - Redirect错误作为响应。

My application neeeds to access a third part web service. Of late, they have introduced a load balancer, which redirects to the server. Because of this the webservice gets a 302 - Redirect error as response.

在SOAPUI中,我能够启用名为Follow Redirect的属性,并且由于此服务遵循重定向并由服务器提供服务。

In the SOAPUI, I was able to enable a property called "Follow Redirect", and because of this service followed the redirect and served by the server.

现在有一个类似的问题,可以在代码中打开,这将使web服务跟随请求?

Now is there a similar propety that can be turned on in the code, which would make the webservice follow the request?

(调用代码是java,web服务是.net)

(The calling code is java and the webservice is in .net)

推荐答案

实现对Web服务的实际调用的库需要支持这一点,并且没有通用的设置方法。

This needs to be supported by the library implementing the actual call to the web service, and there is not a generic way of setting this.

这篇关于如何使Web服务请求遵循重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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