This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
The error message says wrong hostname, it is not true, when i try to send web service request to this ip address endpoint using SOAPUI, it works, but it throws error in my Java web service client. Some one please help.
Thanks
Kasi
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
What happens if you use 65.167.11.140 as the hostname, like the error message suggests?
IP ending in 140 is the actual value, i wanted to change it when i post it publicly. Same error as mentioned above. Please help.
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
posted
0
Hi!
Since you use HTTPS, Java will verify the host name against the CN in the certificate.
I suspect that the CN in the certificate is the host name and in this case requests will work.
When you change it to the IP, it will not match the CN and thus fails.
There is a way to work around this during development by including the following code block in the client of the web service:
In your case, you should either insert the IP instead of localhost in the verify method, or modify the method to always return true.
Hope this solves your problems!
Kasi Viswan
Ranch Hand
Joined: Sep 27, 2008
Posts: 42
posted
0
Ivan,
Thanks a million, This issue was splitting my head for days.
Setting verify method in the client to always return true worked. Now i am able to use ip addresses instead of server names.