@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
package helloservice.endpoint; import javax.xml.ws.Endpoint; public class Server { protected Server() throws Exception { System.out.println("Starting Server"); Object implementor = new Hello(); String address = "http://localhost:9000/SoapContext/SoapPort"; Endpoint.publish(address, implementor); } public static void main(String args[]) throws Exception { new Server(); System.out.println("Server ready..."); Thread.sleep(5 * 60 * 1000); System.out.println("Server exiting"); System.exit(0); } }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
javax.xml.ws.Endpoint.publish("http://localhost:8000/myService/", myServiceImplementation);
@Override public Endpoint createAndPublishEndpoint(String url, Object implementor) { Endpoint ep = createEndpoint(null, implementor); ep.publish(url); return ep; } //new in 2.2
public Endpoint createAndPublishEndpoint(String address, Object implementor, WebServiceFeature ... features) { Endpoint ep = createEndpoint(null, implementor, features); ep.publish(address); return ep; }
import java.io.*; import javax.xml.ws.*; import javax.xml.ws.http.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; @WebServiceProvider @ServiceMode(value = Service.Mode.PAYLOAD) public class Server implements Provider<Source> { public Source invoke(Source request) { return new StreamSource(new StringReader("<p>Hello There!</p>")); } public static void main(String[] args) throws InterruptedException { String address = "http://127.0.0.1:8080/"; Endpoint.create(HTTPBinding.HTTP_BINDING, new Server()).publish(address); System.out.println("Service running at " + address); System.out.println("Type [CTRL]+[C] to quit!"); Thread.sleep(Long.MAX_VALUE); } }
protected void run() { Object implementor = new HelloImpl(); String address = "http://localhost:" + PORT + "/hello"; Endpoint.publish(address, implementor); }
protected void run() { Object implementor = new NoBodyPartsImpl(); String address = "http://localhost:" + PORT + "/NoBodyParts/NoBodyPartsService"; Endpoint.publish(address, implementor); }
private void doPublish(String url, Object obj) { Endpoint ep = Endpoint.create(obj); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback()); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES, "bob.properties"); if (streaming) { ep.getProperties().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true"); } ep.publish(url); }
protected void run() { // set the configuration file SpringBusFactory factory = new SpringBusFactory(); Bus bus = factory.createBus("org/apache/cxf/systest/source/cxf.xml"); BusFactory.setDefaultBus(bus); setBus(bus); Endpoint.publish("http://localhost:" + PORT + "/SoapContext/SoapPort", new GreeterImpl()); Endpoint.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort", new PutLastTradePriceImpl()); }
protected void run() { Object implementor = new HWSoapMessageDocProvider(); Endpoint ep = Endpoint.create(implementor); Map<String, Object> map = new HashMap<>(); map.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); ep.setProperties(map); ((EndpointImpl)ep).getInInterceptors().add(new LoggingInInterceptor()); ((EndpointImpl)ep).getOutInterceptors().add(new LoggingOutInterceptor()); ep.publish(ADDRESS); }
protected void run() { SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-inline-policy.xml"); BusFactory.setDefaultBus(bus); setBus(bus); GreeterImpl implementor = new GreeterImpl(); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; ep = Endpoint.publish(address, implementor); LOG.info("Published greeter endpoint."); testInterceptors(bus); }
protected void run() { setBus(new SpringBusFactory().createBus("org/apache/cxf/systest/factory_pattern/cxf.xml")); implementor = new HttpNumberFactoryImpl(getBus(), PORT); ep = Endpoint.publish(FACTORY_ADDRESS, implementor); } public void tearDown() throws Exception {