I use Apache Camel and SOAP, when I tried to connect to https endpoint, i got:
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
For connection i use route, like this
from(mainJobEndpoint)
.routeId(sourceName)
.filter(method(this, "readyToProcess"))
.process(exchange -> {
setExtractionProcess(extractionProcessService.startProcess(sourceName));
ProcessHistory processHistory = processHistoryService.downloadStart(extractionProcess);
camelContext.getRegistry().bind(sourceName + "downloadStart", processHistory);
exchange.setProperty("downloadStart", processHistory);
})
.process(exchange -> {
LocalDateTime today = LocalDateTime.now();
GetMessageIdsRequest request = new GetMessageIdsRequest();
request.setStartDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(today.minusDays(100).toString()));
request.setEndDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(today.minusDays(1).toString()));
exchange.getIn().setBody(request);
})
.setHeader(CxfConstants.OPERATION_NAME, constant(soapOperationGetMessageIds))
.setHeader(CxfConstants.OPERATION_NAMESPACE, constant(soapOperationNamespace))
.setHeader("Content-type", constant(CONTENT_TYPE))
.to("cxf:bean:cxfBankrupt")
And so on
I think that my problem from sertificates. I can't add my custom sertificate. How can i allow all sertificates or disable verification?