0

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.

Community
  • 1
  • 1
frappuccino
  • 171
  • 5
  • 15

2 Answers2

5

You can set

requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _url);

where url is the real URl (after redirection).

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Vinh Vo
  • 161
  • 2
  • 7
0

Get a handle of HttpUrlConnection.setforwardRedirect(true)

frappuccino
  • 171
  • 5
  • 15
  • Correct, but according to the Javadoc it already defaults to `true` so there should be no need to call this method. – peterh Dec 28 '13 at 22:52