public Bus getBus() { return getBus(true); }
/** * Add annotated Interceptors and Features to the Endpoint * @param ep */ protected void initializeAnnotationInterceptors(Endpoint ep, Class<?> cls) { initializeAnnotationInterceptors(ep, new Class<?>[] {cls}); } /**
/** * {@inheritDoc} */ public void setServiceName(QName name) { super.setServiceName(name); serviceFactory.setServiceName(name); }
/** * Checks if a given endpoint has been marked as private. * If yes then its address will be added to a bus list property * Note that client factories might also check the endpoint, ex, * if the endpoint if private then it is likely no service contract * will be available if requested from the remote address hence it has to * be availbale locally or generated from the local source * @param ep endpoint */ @SuppressWarnings("unchecked") protected boolean checkPrivateEndpoint(Endpoint ep) { if (PropertyUtils.isTrue(ep.get(PRIVATE_ENDPOINT))) { List<String> addresses = (List<String>)getBus().getProperty(PRIVATE_ENDPOINTS); if (addresses == null) { addresses = new LinkedList<>(); } addresses.add(getAddress()); bus.setProperty(PRIVATE_ENDPOINTS, addresses); return true; } return false; } /**
svrFactory.setProperties(PropertiesHelper.map(properties)); svrFactory.getProperties(true).put("faultStackTraceEnabled", "true"); if (featuresIds != null) { final List<? extends Feature> features = createFeatures(availableServices, featuresIds); svrFactory.setFeatures(features); + ", please check configuration of service [id=" + databinding + "]"); svrFactory.setDataBinding((DataBinding) instance); svrFactory.setAddress(changedAddress); svrFactory.setPublishedEndpointUrl(publishedUrl);
final org.apache.cxf.endpoint.AbstractEndpointFactory aef = org.apache.cxf.endpoint.AbstractEndpointFactory.class.cast( loader.loadClass("org.apache.cxf.jaxws.JaxWsServerFactoryBean").getConstructor().newInstance()); aef.setBus(bus); aef.setAddress(mapper.map(beanClass));
protected boolean initializeAnnotationInterceptors(AnnotationInterceptors provider, Endpoint ep) { boolean hasAnnotation = false; if (provider.getInFaultInterceptors() != null) { ep.getInFaultInterceptors().addAll(provider.getInFaultInterceptors()); hasAnnotation = true; } if (provider.getInInterceptors() != null) { ep.getInInterceptors().addAll(provider.getInInterceptors()); hasAnnotation = true; } if (provider.getOutFaultInterceptors() != null) { ep.getOutFaultInterceptors().addAll(provider.getOutFaultInterceptors()); hasAnnotation = true; } if (provider.getOutInterceptors() != null) { ep.getOutInterceptors().addAll(provider.getOutInterceptors()); hasAnnotation = true; } if (provider.getFeatures() != null) { getFeatures().addAll(provider.getFeatures()); hasAnnotation = true; } return hasAnnotation; } }
/** * {@inheritDoc} */ public void setBus(Bus bus) { super.setBus(bus); checkBindingFactory(bus); serviceFactory.setBus(bus); }
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); super.setDestinationFactory(df);
/** * Checks if a given endpoint has been marked as private. * If yes then its address will be added to a bus list property * Note that client factories might also check the endpoint, ex, * if the endpoint if private then it is likely no service contract * will be available if requested from the remote address hence it has to * be availbale locally or generated from the local source * @param ep endpoint */ @SuppressWarnings("unchecked") protected boolean checkPrivateEndpoint(Endpoint ep) { if (PropertyUtils.isTrue(ep.get(PRIVATE_ENDPOINT))) { List<String> addresses = (List<String>)getBus().getProperty(PRIVATE_ENDPOINTS); if (addresses == null) { addresses = new LinkedList<>(); } addresses.add(getAddress()); bus.setProperty(PRIVATE_ENDPOINTS, addresses); return true; } return false; } /**
final org.apache.cxf.endpoint.AbstractEndpointFactory aef = org.apache.cxf.endpoint.AbstractEndpointFactory.class.cast( loader.loadClass("org.apache.cxf.jaxws.JaxWsServerFactoryBean").getConstructor().newInstance()); aef.setBus(bus); aef.setAddress(mapper.map(beanClass));
protected boolean initializeAnnotationInterceptors(AnnotationInterceptors provider, Endpoint ep) { boolean hasAnnotation = false; if (provider.getInFaultInterceptors() != null) { ep.getInFaultInterceptors().addAll(provider.getInFaultInterceptors()); hasAnnotation = true; } if (provider.getInInterceptors() != null) { ep.getInInterceptors().addAll(provider.getInInterceptors()); hasAnnotation = true; } if (provider.getOutFaultInterceptors() != null) { ep.getOutFaultInterceptors().addAll(provider.getOutFaultInterceptors()); hasAnnotation = true; } if (provider.getOutInterceptors() != null) { ep.getOutInterceptors().addAll(provider.getOutInterceptors()); hasAnnotation = true; } if (provider.getFeatures() != null) { getFeatures().addAll(provider.getFeatures()); hasAnnotation = true; } return hasAnnotation; } }
/** * {@inheritDoc} */ public void setBus(Bus bus) { super.setBus(bus); checkBindingFactory(bus); serviceFactory.setBus(bus); }
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); super.setDestinationFactory(df);
/** * Checks if a given endpoint has been marked as private. * If yes then its address will be added to a bus list property * Note that client factories might also check the endpoint, ex, * if the endpoint if private then it is likely no service contract * will be available if requested from the remote address hence it has to * be availbale locally or generated from the local source * @param ep endpoint */ @SuppressWarnings("unchecked") protected boolean checkPrivateEndpoint(Endpoint ep) { if (MessageUtils.isTrue(ep.get(PRIVATE_ENDPOINT))) { List<String> addresses = (List<String>)getBus().getProperty(PRIVATE_ENDPOINTS); if (addresses == null) { addresses = new LinkedList<String>(); } addresses.add(getAddress()); bus.setProperty(PRIVATE_ENDPOINTS, addresses); return true; } return false; } /**
public Bus getBus() { return getBus(true); }
/** * Add annotated Interceptors and Features to the Endpoint * @param ep */ protected void initializeAnnotationInterceptors(Endpoint ep, Class<?> cls) { initializeAnnotationInterceptors(ep, new Class<?>[] {cls}); } /**
protected boolean initializeAnnotationInterceptors(AnnotationInterceptors provider, Endpoint ep) { boolean hasAnnotation = false; if (provider.getInFaultInterceptors() != null) { ep.getInFaultInterceptors().addAll(provider.getInFaultInterceptors()); hasAnnotation = true; } if (provider.getInInterceptors() != null) { ep.getInInterceptors().addAll(provider.getInInterceptors()); hasAnnotation = true; } if (provider.getOutFaultInterceptors() != null) { ep.getOutFaultInterceptors().addAll(provider.getOutFaultInterceptors()); hasAnnotation = true; } if (provider.getOutInterceptors() != null) { ep.getOutInterceptors().addAll(provider.getOutInterceptors()); hasAnnotation = true; } if (provider.getFeatures() != null) { getFeatures().addAll(provider.getFeatures()); hasAnnotation = true; } return hasAnnotation; } }
/** * {@inheritDoc} */ public void setServiceName(QName name) { super.setServiceName(name); serviceFactory.setServiceName(name); }
/** * Checks if a given endpoint has been marked as private. * If yes then its address will be added to a bus list property * Note that client factories might also check the endpoint, ex, * if the endpoint if private then it is likely no service contract * will be available if requested from the remote address hence it has to * be availbale locally or generated from the local source * @param ep endpoint */ @SuppressWarnings("unchecked") protected boolean checkPrivateEndpoint(Endpoint ep) { if (MessageUtils.isTrue(ep.get(PRIVATE_ENDPOINT))) { List<String> addresses = (List<String>)getBus().getProperty(PRIVATE_ENDPOINTS); if (addresses == null) { addresses = new LinkedList<String>(); } addresses.add(getAddress()); bus.setProperty(PRIVATE_ENDPOINTS, addresses); return true; } return false; } /**