THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
import javax.xml.ws.Endpoint; ... @Override public void loadBus(ServletConfig servletConfig) throws ServletException { super.loadBus(servletConfig); // You could add the endpoint publish codes here Bus bus = cxf.getBus(); BusFactory.setDefaultBus(bus); Endpoint.publish("/Greeter", new GreeterImpl()); // You can als use the simple frontend API to do this ServerFactoryBean factroy = new ServerFactoryBean(); factory.setBus(bus); factory.setServiceClass(GreeterImpl.class); factory.setAddress("/Greeter"); factory.create(); } |
If you are using the Jetty as the embedded servlet engine, you could publish endpoint like this:
...