// Replaces cxf-servlet.xml @Bean // <jaxws:endpoint id="helloWorld" implementor="demo.spring.service.HelloWorldImpl" // address="/HelloWorld"/> public EndpointImpl helloWorldService(LoggingInInterceptor logIn, LoggingOutInterceptor logOut) { EndpointImpl endpoint = new EndpointImpl(getBus(), new HelloWorldService()); endpoint.publish("/helloservice"); endpoint.getServer().getEndpoint().getInInterceptors().add(logIn); endpoint.getServer().getEndpoint().getOutInterceptors().add(logOut); return endpoint; }
protected void initDefaultServant() { servant = new HttpNumberImpl(); String wsdlLocation = "testutils/factory_pattern.wsdl"; String bindingId = null; EndpointImpl ep = new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation); ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort")); ep.publish(); templateEpr = ep.getServer().getDestination().getAddress(); }
private EndpointImpl generateEndPointImpl(Class<?> cl, String endPoint) { Bus bus = (Bus) applicationContext.getBean(Bus.DEFAULT_BUS_ID); if (!bus.getInInterceptors() .contains(applicationContext.getBean(HeaderServiceValidator.class))) { bus.getInInterceptors().add(applicationContext.getBean(HeaderServiceValidator.class)); } Object implementor = applicationContext.getBean(cl); EndpointImpl endpoint = new EndpointImpl(bus, implementor); endpoint.publish(endPoint); endpoint.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor()); endpoint.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor()); return endpoint; }