List of usage examples for javax.xml.ws Endpoint publish
public static Endpoint publish(String address, Object implementor)
From source file:com.netsteadfast.greenstep.sys.CxfServerBean.java
private static int publishDefault(List<TbSysWsConfig> configs) { int c = 0;/* w w w.j a v a2s. c o m*/ for (TbSysWsConfig config : configs) { if (!WSConfig.TYPE_SOAP.equals(config.getType()) || StringUtils.isBlank(config.getPublishAddress())) { continue; } try { Endpoint.publish(config.getPublishAddress(), AppContext.getBean(config.getBeanId())); c++; } catch (Exception e) { e.printStackTrace(); } } return c; }
From source file:egovframework.rte.itl.webservice.EgovWebServiceContext.java
public void publishServer(Bus bus) { LOG.debug("Publish Server"); this.bus = bus; BusFactory.setDefaultBus(bus);/*from w w w . j a v a 2 s.c om*/ for (ServerInfo serverInfo : serverList) { LOG.debug("Publish Server (address = \"" + serverInfo.address + "\")"); try { Endpoint.publish(serverInfo.address, serverInfo.serviceImpl); } catch (Throwable e) { LOG.error("Fail in publishing Server (address = \"" + serverInfo.address + "\")", e); } } LOG.debug("Finish publish Server"); }
From source file:org.accada.epcis.repository.query.QueryInitServlet.java
/** * {@inheritDoc}/*from ww w . j a v a2s . co m*/ * * @see org.apache.cxf.transport.servlet.CXFNonSpringServlet#loadBus(javax.servlet.ServletConfig) */ public void loadBus(ServletConfig servletConfig) throws ServletException { super.loadBus(servletConfig); BusFactory.setDefaultBus(getBus()); if (LOG.isDebugEnabled()) { getBus().getInInterceptors().add(new LoggingInInterceptor()); getBus().getOutInterceptors().add(new LoggingOutInterceptor()); getBus().getOutFaultInterceptors().add(new LoggingOutInterceptor()); getBus().getInFaultInterceptors().add(new LoggingInInterceptor()); } EPCISServicePortType service = setupQueryOperationsModule(servletConfig); LOG.debug("Publishing query operations module service at /query"); Endpoint.publish("/query", service); }
From source file:org.apache.camel.component.cxf.CxfProducerTest.java
@BeforeClass public static void startService() throws Exception { // start a simple front service ServerFactoryBean svrBean = new ServerFactoryBean(); svrBean.setAddress(SIMPLE_SERVER_ADDRESS); svrBean.setServiceClass(HelloService.class); svrBean.setServiceBean(new HelloServiceImpl()); svrBean.setBus(CXFBusFactory.getDefaultBus()); svrBean.create();/* w ww.ja v a 2 s . c o m*/ GreeterImpl greeterImpl = new GreeterImpl(); Endpoint.publish(JAXWS_SERVER_ADDRESS, greeterImpl); }
From source file:org.apache.camel.itest.greeter.CamelFileGreeterOneWayTest.java
@BeforeClass public static void startServer() throws Exception { // Start the Greeter Server greeterImpl = new GreeterImpl(); String address = "http://localhost:9000/SoapContext/SoapPort"; endpoint = Endpoint.publish(address, greeterImpl); LOG.info("The WS endpoint is published! "); }
From source file:org.apache.camel.itest.greeter.CamelGreeterTest.java
@BeforeClass public static void startServer() throws Exception { // Start the Greeter Server Object implementor = new GreeterImpl(); String address = "http://localhost:9000/SoapContext/SoapPort"; endpoint = Endpoint.publish(address, implementor); LOG.info("The WS endpoint is published! "); }
From source file:org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.java
private Endpoint publish(String adress, Object implementor) { Endpoint endpoint = Endpoint.publish(adress, implementor); SOAPBinding binding = (SOAPBinding) endpoint.getBinding(); binding.setMTOMEnabled(true);/*from www . j a va 2 s.c om*/ return endpoint; }
From source file:org.apache.cxf.systest.coloc.AbstractColocTest.java
/** * Setup this test case//from ww w.j a v a 2s . c o m */ @Before public void setUp() throws Exception { // initialize Mule Manager URL cxfConfig = null; if (getCxfConfig() != null) { cxfConfig = ClassLoaderUtils.getResource(getCxfConfig(), AbstractColocTest.class); if (cxfConfig == null) { throw new Exception("Make sure " + getCxfConfig() + " is in the CLASSPATH"); } assertTrue(cxfConfig.toExternalForm() != null); } //Bus is shared by client, router and server. SpringBusFactory bf = new SpringBusFactory(); bus = bf.createBus(cxfConfig); BusFactory.setDefaultBus(bus); //Start the Remote Server // the endpoint of the "real" cxf server endpoint = Endpoint.publish(getTransportURI(), getServiceImpl()); }
From source file:org.apache.juddi.api.impl.API_090_SubscriptionListenerIntegrationTest.java
@BeforeClass public static void startManager() throws ConfigurationException { Registry.start();/*from w ww . j a va2 s .c o m*/ try { smtpPort = 9700 + new Random().nextInt(99); httpPort = 9600 + new Random().nextInt(99); System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.host", "localhost"); System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.port", String.valueOf(smtpPort)); System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX + "mail.smtp.from", "jUDDI@example.org"); mailServer = SimpleSmtpServer.start(smtpPort); //bring up the TCK HTTP SubscriptionListener String httpEndpoint = "http://localhost:" + httpPort + "/tcksubscriptionlistener"; System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint); endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl()); logger.debug("Getting auth tokens.."); api010.saveJoePublisher(); UDDISecurityPortType security = new UDDISecurityImpl(); authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword()); Assert.assertNotNull(authInfoJoe); } catch (Exception e) { logger.error(e.getMessage(), e); Assert.fail(e.getMessage()); } }
From source file:org.apache.juddi.api.runtime.CLIServerTest.java
@BeforeClass public static void startManager() throws Exception { Random r = new Random(System.currentTimeMillis()); replUrl = "http://localhost:" + (7000 + r.nextInt(1000)) + "/repl"; replication = Endpoint.publish(replUrl, repl); juddiUrl = "http://localhost:" + (7000 + r.nextInt(1000)) + "/juddi"; juddiapi = Endpoint.publish(juddiUrl, jude); System.out.println("Endpoint up at " + replUrl); System.out.println("Endpoint up at " + juddiUrl); }