如何使 Web 服务请求遵循重定向?

发布于 2024-08-27 10:27:16 字数 233 浏览 3 评论 0原文

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

在 SOAPUI 中,我能够启用一个名为“Follow Redirect”的属性,因为该服务遵循重定向并由服务器提供服务。

现在是否有类似的属性可以在代码中打开,这将使Web服务遵循请求?

(调用代码是java,webservice在.net)

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.

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.

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

慵挽 2024-09-03 10:27:16

这需要由实现对 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文