问题
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 of the same. Its urgent, any help would be highly appreciated.
回答1:
You can set
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _url);
where url is the real URl (after redirection).
回答2:
Get a handle of HttpUrlConnection.setforwardRedirect(true)
来源:https://stackoverflow.com/questions/2581486/webservice-follow-redirect-false-error-302-jaxws