i've created self-signed certificate using keytool for web serivce security. But i'm unable to implement from the client side. When i'm giving "dn=localhost" it's working fine. But when i'm giving other than that it's throwing me error as : java.io.IOException: HTTPS hostname wrong: should be <192.168.2.36> I don't know what's the problem. Could any tell me where i'm wrong. In the CN i've given my ip address. Please help me out. Do i need to do something else?