Problemas com Post no HTTPClient+SSL

0 respostas
Lord

Fala pessoal !!!

Estou com problemas em fazer Post com certificados digitais.

meu código é o seguinte :

try{
        HttpClient client = ConnectionHTTP.connection();
        PostMethod method = new PostMethod("https://site_do_cliente");
        method.addParameter("A","valorA");
        method.addParameter("B","valorB");
        method.addParameter("C","valorC");

        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
				new DefaultHttpMethodRetryHandler(5, true));

        client.executeMethod(method);
        byte[] retorno = method.getResponseBody();

        System.out.println(new String(retorno));
}
catch (HttpException e) {
	e.printStackTrace();
} catch (IOException e) {
        e.printStackTrace();
} finally {
	method.releaseConnection();
}

E na execução do método tenha a seguinte Exceção:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

vlw !!!

Criado 26 de novembro de 2008
Respostas 0
Participantes 1