Context ctx = new InitialContext();
// retrieve the connection factory from JNDI
//
CXFConnectionFactory factory = (CXFConnectionFactory)ctx.lookup(EIS_JNDI_NAME);
URL wsdlLocation = getClass().getResource("/wsdl/hello_world.wsdl");
QName serviceName =
new QName("http://apache.org/hello_world_soap_http", "SOAPService");
QName portName = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
// create the connection
//
CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo(Greeter.class,
wsdlLocation,
serviceName,
portName);
return (Connection)factory.getConnection(requestInfo);
}