public static boolean validateCertPath(X509Certificate cert,
String serviceURL) {
try {
ValidateRequest request = createValidateRequest();
request.setServiceURI(serviceURL);
QueryKeyBinding keyBinding = createQueryKeyBinding();
keyBinding.setCertValue(cert);
String name = cert.getSubjectDN().getName();
keyBinding.addUseKeyWith(UseKeyWith.PKIX, name);
request.setQueryKeyBinding(keyBinding);
request.addRespondWith(RespondWith.X_509_CERT);
OMElement element = getElement(request);
OMElement result = sendReceive(element, serviceURL);
result = buildElement(result);