public Definition getDefinition(String url) throws WSDLException { synchronized (definitionsMap) { if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } } return loadDefinition(url); }
private void registerInitialExtensions(Bus b) throws BusException { registerInitialXmlExtensions(EXTENSIONS_RESOURCE_COMPAT, b); registerInitialXmlExtensions(EXTENSIONS_RESOURCE, b); } private void registerInitialXmlExtensions(String resource, Bus b) throws BusException {
private static void setWSDLManagerStreamWrapper(Bus bus) { ((WSDLManagerImpl) bus.getExtension(WSDLManager.class)).setXMLStreamReaderWrapper(new XMLStreamReaderWrapper() { @Override public XMLStreamReader wrap(XMLStreamReader reader) { return new SysPropExpandingStreamReader(reader); } }); }
registry.mapExtensionTypes(MIMEPart.class, header, clazz); addExtensionAttributeTypes(registry); } catch (WSDLException e) { throw new BusException(e); schemaCacheMap = new CacheMap<Object, ServiceSchemaInfo>(); registerInitialExtensions(b); setBus(b);
registry.mapExtensionTypes(MIMEPart.class, header, clazz); addExtensionAttributeTypes(registry); } catch (WSDLException e) { throw new BusException(e); schemaCacheMap = new CacheMap<>(); setBus(b);
public String registerCallback(W3CEndpointReference w3cRef) { try { WSDLManager manager = new WSDLManagerImpl();
private void setDisableCacheSchema(Bus bus) { if (bus.getExtension(WSDLManager.class) instanceof WSDLManagerImpl) { WSDLManagerImpl wsdlManangerImpl = (WSDLManagerImpl)bus.getExtension(WSDLManager.class); wsdlManangerImpl.setDisableSchemaCache(SecurityActions.getBoolean(JBWS_CXF_DISABLE_SCHEMA_CACHE, true)); } } private Bus getOrCreateBus(String strategy, ClassLoader threadContextClassLoader) {
registry.mapExtensionTypes(MIMEPart.class, header, clazz); addExtensionAttributeTypes(registry); } catch (WSDLException e) { throw new BusException(e); schemaCacheMap = new CacheMap<Object, ServiceSchemaInfo>(); registerInitialExtensions(b); setBus(b);
WSDLManager manager = new WSDLManagerImpl();
mgr.setDisableSchemaCache(true);
public Definition getDefinition(String url) throws WSDLException { synchronized (definitionsMap) { if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } } return loadDefinition(url); }
/** * Add objects to the bus to set up the local transport, soap transport, soap bindings, and WSDL manager. * All you need to test databindings and other type-related operations. * @throws BusException */ public void setUp() throws BusException { SoapBindingFactory bindingFactory = new SoapBindingFactory(); bus.getExtension(BindingFactoryManager.class) .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory); DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); SoapTransportFactory soapDF = new SoapTransportFactory(); soapDF.setBus(bus); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF); dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soapDF); localTransport = new LocalTransportFactory(); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport); dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", localTransport); dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", localTransport); ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class); extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/", localTransport); bus.setExtension(new WSDLManagerImpl(), WSDLManager.class); addNamespace("wsdl", SOAPConstants.WSDL11_NS); addNamespace("wsdlsoap", SOAPConstants.WSDL11_SOAP_NS); addNamespace("xsd", SOAPConstants.XSD); }
private void registerInitialExtensions(Bus b) throws BusException { registerInitialXmlExtensions(EXTENSIONS_RESOURCE_COMPAT, b); registerInitialXmlExtensions(EXTENSIONS_RESOURCE, b); } private void registerInitialXmlExtensions(String resource, Bus b) throws BusException {
public Definition getDefinition(String url) throws WSDLException { synchronized (definitionsMap) { if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } } Definition def = loadDefinition(url); synchronized (definitionsMap) { definitionsMap.put(url, def); } return def; }
public Definition getDefinition(URL url) throws WSDLException { String urlString = url.toString(); synchronized (definitionsMap) { //This needs to use the exact URL object for the cache //as the urlString object is not held onto strongly //and thus, could cause the definition to be garbage //collected. if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } if (definitionsMap.containsKey(urlString)) { return definitionsMap.get(urlString); } } Definition def = loadDefinition(urlString); synchronized (definitionsMap) { //see note about about the url //The loadDefinition call will add it with the //string form, we just need to add it with the //url form (which Sonar will complain about, //but we need to do it) definitionsMap.put(url, def); } return def; }
public Definition getDefinition(URL url) throws WSDLException { String urlString = url.toString(); synchronized (definitionsMap) { //This needs to use the exact URL object for the cache //as the urlString object is not held onto strongly //and thus, could cause the definition to be garbage //collected. if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } if (definitionsMap.containsKey(urlString)) { return definitionsMap.get(urlString); } } Definition def = loadDefinition(urlString); synchronized (definitionsMap) { //see note about about the url //The loadDefinition call will add it with the //string form, we just need to add it with the //url form (which Sonar will complain about, //but we need to do it) definitionsMap.put(url, def); } return def; }