use of com.ibm.maximo.wsdl.shsimpinc.SHSIMPINC in project opennms by OpenNMS.
the class TsrmTicketerPlugin method getService.
private SHSIMPINCPortType getService() {
final SHSIMPINC service = new SHSIMPINC();
port = service.getSHSIMPINCSOAP12Port();
final Client cxfClient = ClientProxy.getClient(port);
try {
cxfClient.getRequestContext().put(Message.ENDPOINT_ADDRESS, getProperties().getProperty("tsrm.url"));
final HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
String stictSSL = getProperties().getProperty("tsrm.ssl.strict");
if (!Boolean.parseBoolean(stictSSL)) {
LOG.debug("Disabling strict SSL checking.");
// Accept all certificates
final TrustManager[] simpleTrustManager = new TrustManager[] { new AnyServerX509TrustManager() };
final TLSClientParameters tlsParams = new TLSClientParameters();
tlsParams.setTrustManagers(simpleTrustManager);
tlsParams.setDisableCNCheck(true);
http.setTlsClientParameters(tlsParams);
}
} catch (IOException e) {
LOG.error("Unable to load tsrm properties ", e);
}
// Log incoming and outgoing requests
LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
loggingInInterceptor.setPrettyLogging(true);
cxfClient.getInInterceptors().add(loggingInInterceptor);
LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
loggingOutInterceptor.setPrettyLogging(true);
cxfClient.getOutInterceptors().add(loggingOutInterceptor);
return port;
}
Aggregations