Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcvezzani/5687520 to your computer and use it in GitHub Desktop.
Save dcvezzani/5687520 to your computer and use it in GitHub Desktop.
Java client snippet for configuration for Apache CXF-enabled client that will be establishing an encrypted connection (SSL via HTTPS) with a server, also powered by Apache CXF.
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
public final class UCIDMServicesClient {
private UCIDMServicesClient() {
}
public static void main(String args[]) throws java.lang.Exception {
...
SpringBusFactory bf = new SpringBusFactory();
URL busFile = UCIDMServicesClient.class.getResource("/ClientConfig.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment