Refine search
/** * JAX-WS **/ @Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(bus, commonService); endpoint.publish("/CommonService"); return endpoint; } }
@Bean public Endpoint dataFilesEndpoint(SpringBus springBus, DataFilesWebService dataFilesWebService) { EndpointImpl endpoint = new EndpointImpl(springBus, dataFilesWebService); endpoint.setWsdlLocation("wsdl/siva-datafiles.wsdl"); endpoint.publish(DATAFILES_ENDPOINT); return endpoint; }
public synchronized ServerImpl getServer(String addr) { if (server == null) { checkProperties(); JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(getImplementorClass()); endpointName = implInfo.getEndpointName(); configureObject(this); endpointName = origEpn; serverFactory.setServiceBean(implementor); serverFactory.setBus(bus); serverFactory.setFeatures(getFeatures()); serverFactory.setInvoker(invoker); serverFactory.setSchemaLocations(schemaLocations); if (getWsdlLocation() != null) { serverFactory.setWsdlURL(getWsdlLocation()); configureObject(serverFactory); org.apache.cxf.endpoint.Endpoint endpoint = getEndpoint(); if (in != null) { endpoint.getInInterceptors().addAll(in); configureObject(endpoint.getService()); configureObject(endpoint); this.service = endpoint.getService(); if (getWsdlLocation() == null) {
public void publish() { publish(getAddress()); }
public void publish(javax.xml.ws.spi.http.HttpContext context) { ServerFactoryBean sf = getServerFactory(); if (sf.getDestinationFactory() == null) { sf.setDestinationFactory(new JAXWSHttpSpiTransportFactory(context)); } publish(context.getPath()); }
@Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus, weatherService()); endpoint.setServiceName(weatherClient().getServiceName()); endpoint.setWsdlLocation(weatherClient().getWSDLDocumentLocation().toString()); endpoint.publish(SERVICE_URL); return endpoint; }
@Test public void testCXF4122() throws Exception { Bus epBus = BusFactory.newInstance().createBus(); BusFactory.setDefaultBus(epBus); URL wsdl = SecurityPolicyTest.class.getResource("DoubleIt.wsdl"); EndpointImpl ep = (EndpointImpl)Endpoint.create(new DoubleItImpl()); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF4122") ); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_CXF4122_ADDRESS); ep.publish(); EndpointInfo ei = ep.getServer().getEndpoint().getEndpointInfo(); setCryptoProperties(ei, "bob.properties", "revocation.properties"); ei.setProperty(SecurityConstants.ENABLE_REVOCATION, Boolean.TRUE); ep.stop(); epBus.shutdown(true); bus.shutdown(true);
String preferIPv6AddressesValue = System.getProperty("java.net.preferIPv6Addresses"); if (!started && client.isAdHoc()) { Bus b = BusFactory.getAndSetThreadDefaultBus(bus); try { udpEndpoint = new EndpointImpl(bus, new WSDiscoveryProvider()); Map<String, Object> props = new HashMap<>(); props.put("jaxws.provider.interpretNullAsOneway", "true"); udpEndpoint.setProperties(props); if ("true".equals(preferIPv6AddressesValue) && "false".equals(preferIPv4StackValue)) { try { udpEndpoint.publish("soap.udp://[FF02::C]:3702"); started = true; } catch (Exception e) { udpEndpoint.publish("soap.udp://239.255.255.250:3702"); started = true; } finally { if (b != bus) { BusFactory.setThreadDefaultBus(b);
protected void run() { setBus(BusFactory.getDefaultBus()); Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/jaxws/add"; //Endpoint.publish(address, implementor); ep = (EndpointImpl) Endpoint.create(implementor); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.setServiceName(new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService")); ep.setEndpointName(new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersNonAnonPort")); String address12 = "http://localhost:" + PORT2 + "/jaxws/soap12/add"; ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address12); }
bus = BusFactory.getDefaultBus(true); CXFServlet cxf = new CXFServlet(); cxf.setBus(bus); BusFactory.setDefaultBus(bus); GreeterImpl impl = new GreeterImpl(); Endpoint.publish("/Greeter", impl); HelloImpl helloImpl = new HelloImpl(); Endpoint.publish("/Hello", helloImpl); ((EndpointImpl)Endpoint.create(helloImpl)).publish("/");
@BeforeClass public static void startServers() throws Exception { bus = BusFactory.getDefaultBus(); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); PooledConnectionFactory cfp = new PooledConnectionFactory(cf); cff = new ConnectionFactoryFeature(cfp); String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort"; Endpoint.publish(address, new HTTPGreeterImpl()); EndpointImpl ep1 = (EndpointImpl)Endpoint.create(new JMSGreeterImpl()); ep1.setBus(bus); ep1.getFeatures().add(cff); ep1.publish(); }
protected void run() { String address; Object implementor = new ServicePortTypeImpl(); address = "http://localhost:" + PORT + "/schemavalidation"; Endpoint ep = Endpoint.create(implementor); Map<String, Object> map = new HashMap<>(); map.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); ep.setProperties(map); ((EndpointImpl)ep).setWsdlLocation("wsdl_systest_jaxws/schemaValidation.wsdl"); ((EndpointImpl)ep).setServiceName(new QName( "http://cxf.apache.org/jaxws/schemavalidation", "service")); ((EndpointImpl)ep).getInInterceptors().add(new LoggingInInterceptor()); ((EndpointImpl)ep).getOutInterceptors().add(new LoggingOutInterceptor()); ep.publish(address); }
Bus bus = BusFactory.getThreadDefaultBus(); JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean(); factory.setWsdlLocation(wsdlLoc); factory.setServiceName(new QName(tgtNmspc, svcNm)); factory.setEndpointName(new QName(tgtNmspc, portNm)); ep = new EndpointImpl(bus, this, factory); ep.publish(addr);
EndpointImpl ep = (EndpointImpl)Endpoint.create(new DoubleItImpl()); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortHttps")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_HTTPS_ADDRESS); ep.publish(); ep.getServer().getEndpoint().getEndpointInfo().setProperty(SecurityConstants.CALLBACK_HANDLER, new ServerPasswordCallback()); Endpoint.publish(POLICY_ADDRESS, new DoubleItImpl()); ep = (EndpointImpl)Endpoint.create(new DoubleItImpl()); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortEncryptThenSign") ); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_ENCSIGN_ADDRESS); ep.publish(); EndpointInfo ei = ep.getServer().getEndpoint().getEndpointInfo(); setCryptoProperties(ei, "bob.properties", "alice.properties"); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSignThenEncrypt") ); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_SIGNENC_ADDRESS); ep.publish(); ei = ep.getServer().getEndpoint().getEndpointInfo(); setCryptoProperties(ei, "bob.properties", "alice.properties"); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSign"));
protected void run() { Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/jaxws/add"; EndpointImpl ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.publish(address); eps.add(ep); eps.add(Endpoint.publish(address + "-provider", new AddNumberProvider())); eps.add(Endpoint.publish(address + "-providernows", new AddNumberProviderNoWsdl())); } public void tearDown() {
protected void run() { setBus(BusFactory.getDefaultBus()); Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/jaxws/addmex"; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.publish(address); } public void tearDown() {
protected void run() { String address; Object implementor = new RPCLitGreeterImpl(); address = "http://localhost:" + PORT + "/SOAPServiceRPCLit/SoapPort"; ep = Endpoint.create(implementor); URL wsdl = getClass().getResource(wsdlLocation); ((EndpointImpl)ep).setWsdlLocation(wsdl.toString()); ((EndpointImpl)ep).getInInterceptors().add(new LoggingInInterceptor()); ((EndpointImpl)ep).getOutInterceptors().add(new LoggingOutInterceptor()); ep.publish(address); }
@BeforeClass public static void startServers() throws Exception { Object implementor = new TestMtomJMSImpl(); bus = BusFactory.getDefaultBus(); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); PooledConnectionFactory cfp = new PooledConnectionFactory(cf); cff = new ConnectionFactoryFeature(cfp); EndpointImpl ep = (EndpointImpl)Endpoint.create(implementor); ep.getFeatures().add(cff); ep.getInInterceptors().add(new TestMultipartMessageInterceptor()); ep.getOutInterceptors().add(new TestAttachmentOutInterceptor()); //ep.getInInterceptors().add(new LoggingInInterceptor()); //ep.getOutInterceptors().add(new LoggingOutInterceptor()); SOAPBinding jaxWsSoapBinding = (SOAPBinding)ep.getBinding(); jaxWsSoapBinding.setMTOMEnabled(true); ep.publish(); }
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); }
public static void publish(String address, Object impl) { EndpointImpl ep = (EndpointImpl)Endpoint.create(impl); ep.setBus(bus); ep.getFeatures().add(cff); ep.publish(address); }