I think they are blocking pings. Before changing to the NoopHostnameVerifier, I was able to verify I was talking to them because the error message I received back was telling me the security certificate didn't match. The IIS folks even set up a different instance, with a valid cert, then I started getting this error.
As for switching the JDK, that's not really a possibility on an iSeries that I know of. On Sun, Mar 22, 2015 at 5:24 PM, Dan Quaroni <[email protected]> wrote: > A 400 with that error message is just bizarre. But to cover all your > bases, have you tried pinging (or telnetting to port 80) the server from > the iSeries machine? > > Over the years I've tried IBM's JDK and have always found that it fails to > function properly in this edge case or that, but these types of edge cases > come up frequently that IMHO it's not production ready. Can you switch to > Oracle's JDK? > > > > On Sun, Mar 22, 2015 at 5:13 PM, Bill Gottlieb <[email protected]> > wrote: > > > I use HttpClient 4.4 to connect to an IIS https REST web service. When I > > test from my PC everything works fine, returning data from the server > > without issue. I load the same code onto my IBM iSeries and receive the > > following error "HTTP Error 400 - The request hostname is invalid.". > Both > > are using JDK 1.6. The PC uses Oracle's and the iSeries uses IBM's JDK. > > > > The IIS folks have tried to change things on their end, to no avail. > I've > > tried with both of the following from my end, thinking the second would > > work no matter what: > > > > CloseableHttpClient browser = HttpClientBuilder.create().build(); > > CloseableHttpClient browser = > > HttpClients.custom().setSSLHostnameVerifier(new > > NoopHostnameVerifier()).build(); > > > > Does anybody have any ideas that could help me solve this problem? > Thanks! > > > > > > -- > > *Daniel Quaroni* > Principal Software Architect > P: 781.810.2743 > [email protected] > www.invoke.com > See a Demo here <http://www.invoke.com/platform/demo> >
