serverFactory.setWsdlLocation(wsdlLocation);
svrFactory.setWsdlLocation(wsdlLocation);
svrFactory.setWsdlLocation(wsdlLocation);
public Server publish(final Endpoint endpoint, final Bus bus, final boolean cdiPresent) { final Class<?> clazz = endpoint.getImplementationClass(); final String url = endpoint.getUrl(); //inject resources into WS instance Stream.of(clazz.getDeclaredFields()) .filter(f -> f.getType() == WebServiceContext.class) .forEach(f -> injectWebServiceResource(f, clazz)); final Object targetBean = getBean(clazz, cdiPresent); AnnotationHandlerChainBuilder builder = new AnnotationHandlerChainBuilder(bus); InjectionHelper.injectWebServiceContext(targetBean, KumuluzWebServiceContext.getInstance()); final Invoker invoker = new KumuluzWSInvoker(clazz, targetBean); final JaxWsServerFactoryBean fb = new JaxWsServerFactoryBean(); fb.setBlockPostConstruct(true); fb.setAddress(url); fb.setBus(bus); fb.setServiceClass(clazz); fb.setInvoker(invoker); fb.setHandlers(builder.buildHandlerChainFromClass(clazz, fb.getEndpointName(), fb.getServiceName(), fb.getBindingId())); if (endpoint.wsdlLocation() != null) { //top-down approach fb.setWsdlLocation(endpoint.wsdlLocation()); } Server server = fb.create(); LOG.info("Webservice endpoint published with address=" + fb.getAddress() + ", wsdlLocation=" + fb.getWsdlURL() + ", implementor=" + clazz.getName() + ", serviceName=" + endpoint.serviceName() + ", portName=" + endpoint.portName()); return server; }
protected void run() { try { JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean(); factory.setBus(getBus()); factory.setWsdlLocation("classpath:/swa-mime_jms.wsdl"); factory.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID); factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService")); factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceJMSPort")); factory.setAddress(ADDRESS + broker.getEncodedBrokerURL()); factory.setServiceBean(new SwAServiceImpl()); factory.create().start(); } catch (Exception e) { e.printStackTrace(); Thread.currentThread().interrupt(); } } }
svrFactory.setWsdlLocation(serviceWSDL.toString()); String address = "http://localhost:" + PORT2 + "/DoubleItAsymmetric"; svrFactory.setAddress(address);
protected void run() { String address0 = "http://localhost:" + PORT0 + "/SoapExtHeader/SampleService"; Object implementor1 = new SamplePortTypeImpl(); Endpoint.publish(address0, implementor1); String address1 = "http://localhost:" + PORT1 + "/SoapExtHeader/SampleService"; JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean(); sf.setServiceClass(SamplePortTypeImpl.class); WebServiceClient webService = SampleService.class.getAnnotation(WebServiceClient.class); sf.setServiceName(new QName(webService.targetNamespace(), webService.name())); sf.setWsdlLocation(webService.wsdlLocation()); sf.setAddress(address1); extserver = sf.create(); }
factory.setWsdlLocation(wsdlLoc); factory.setBindingId(binding); factory.setServiceName(new QName(tgtNmspc, svcNm));
protected void run() { SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/server.xml"); setBus(bus); JaxWsServerFactoryBean serviceFactory = new JaxWsServerFactoryBean(); serviceFactory.setBus(bus); serviceFactory.setServiceClass(MessageProviderWithAddressingPolicy.class); serviceFactory.setWsdlLocation("wsdl_systest_wsspec/addr-jaxwsmm.wsdl"); serviceFactory.setAddress(ADDRESS); org.apache.cxf.endpoint.Server provider = serviceFactory.create(); EndpointInfo ei = provider.getEndpoint().getEndpointInfo(); LOG.info("Started server at: " + ei.getAddress()); testInterceptors(bus); }
factory.setWsdlLocation(wsdlLoc); factory.setBindingId(binding); factory.setServiceName(new QName(tgtNmspc, svcNm));