开发者

Webservice Follow Redirect False - Error 302 (JAXWS)

开发者 https://www.devze.com 2022-12-25 23:27 出处:网络
This is a link to a question I had asked two days back, How to make a Webservice request follow a redirect?

This is a link to a question I had asked two days back,

How to make a Webservice request follow a redirect?

I am using jaxws library.

The service forms the URL, and then internally creates the HTTPURLConnection. If I can grab hold of the connection I would be able to set the followRedirect to true.

But not getting a handle开发者_如何学JAVA of the same. Its urgent, any help would be highly appreciated.


You can set

requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _url);

where url is the real URl (after redirection).


Get a handle of HttpUrlConnection.setforwardRedirect(true)

0

精彩评论

暂无评论...
验证码 换一张
取 消