private static PesResource getResourceProxy(EndpointReferenceType resourceEPR, String clientKeystorePath, String password, CertificateTrustValidator validator) {
ProxyFactory proxyFactory;
EndpointReferenceType pesEpr;
PesResource pesResourceProxy;
try {
proxyFactory = createProxyFactory(clientKeystorePath, password, validator);
pesResourceProxy = proxyFactory.createProxy(resourceEPR, PesResource.class);