Hi Malmee, If you have used java built in methods, that would mean your tool would not be required to depend on an external library such as Apache HTTP client as you have mentioned. This is fine for a simple use case. However, please note if you need more functionality, such as support for all HTTP operations, and other capabilities, etc. it would be advisable to use Apache HTTP client or any other suitable existing library without implementing it again by yourself.
For the certificate issue that you are getting, its possible to override the default certificate validation mechanism and plug in your own implementation which can disable certificate validation (for testing purposes). For HTTP Client 4, please see [1]. [1]. http://stackoverflow.com/questions/2703161/how-to-ignore-ssl-certificate-errors-in-apache-httpclient-4-0 On Wed, Dec 16, 2015 at 8:29 PM, Malmee Weerasinghe <mal...@wso2.com> wrote: > Hi All, > > We have developed a HTTPS REST client using java in-built methods which > works properly. [1] This method is configured to allow self signed > certificates. > > When using apache http client we get a certificate error : > javax.net.ssl.SSLPeerUnverifiedException: Host name '192.168.30.227' does > not match the certificate subject provided by the peer (CN=localhost, > O=WSO2, L=Mountain View, ST=CA, C=US). > > What would be a good choice? Using apache HTTP client or java in built > methods. Your suggestions are highly appreciated. > > [1] > https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/RestClient.java > > -- > Malmee Weerasinghe > WSO2 Intern > mobile : (+94)* 71 7601905* | email : <dehan.vith...@aiesec.net> > mal...@wso2.com > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thanks and Regards, Isuru H. +94 716 358 048* <http://wso2.com/>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev