private void registerWSDLExtensibilityPlugins(ExtensionRegistry registry) { Properties initialExtensions = null; try { initialExtensions = PropertiesLoaderUtils.loadAllProperties(WSDL_PLUGIN_RESOURCE, Thread .currentThread().getContextClassLoader()); } catch (IOException ex) { throw new RuntimeException(ex); } for (Iterator<?> it = initialExtensions.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); String pluginClz = initialExtensions.getProperty(key); try { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Registering : " + pluginClz + " for type: " + key); } WSDLExtensibilityPlugin plugin = (WSDLExtensibilityPlugin)ClassLoaderUtils.loadClass(pluginClz, getClass()). newInstance(); plugin.setExtensionRegistry(registry); wsdlPlugins.put(key, plugin); } catch (Exception ex) { LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex); } } } }
private ExtensibilityElement getXMLBody(Class<?> clz, String operationName) throws ToolException { if (extReg == null) { extReg = wsdlFactory.newPopulatedExtensionRegistry(); } Map<String, Object> args = new HashMap<>(); args.put(QName.class.getName(), new QName(wsdlDefinition.getTargetNamespace(), operationName)); args.put(Class.class.getName(), clz); try { return getWSDLPlugin("xml", clz).createExtension(args); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG); throw new ToolException(msg); } }
private void registerWSDLExtensibilityPlugins(ExtensionRegistry registry) { Properties initialExtensions = null; try { initialExtensions = PropertiesLoaderUtils.loadAllProperties(WSDL_PLUGIN_RESOURCE, Thread .currentThread().getContextClassLoader()); } catch (IOException ex) { throw new RuntimeException(ex); } for (Iterator<?> it = initialExtensions.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); String pluginClz = initialExtensions.getProperty(key); try { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Registering : " + pluginClz + " for type: " + key); } WSDLExtensibilityPlugin plugin = (WSDLExtensibilityPlugin)ClassLoaderUtils.loadClass(pluginClz, getClass()). newInstance(); plugin.setExtensionRegistry(registry); wsdlPlugins.put(key, plugin); } catch (Exception ex) { LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex); } } } }
private ExtensibilityElement getXMLBody(Class<?> clz, String operationName) throws ToolException { if (extReg == null) { extReg = wsdlFactory.newPopulatedExtensionRegistry(); } Map<String, Object> args = new HashMap<>(); args.put(QName.class.getName(), new QName(wsdlDefinition.getTargetNamespace(), operationName)); args.put(Class.class.getName(), clz); try { return getWSDLPlugin("xml", clz).createExtension(args); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG); throw new ToolException(msg); } }
private void registerWSDLExtensibilityPlugins(ExtensionRegistry registry) { Properties initialExtensions = null; try { initialExtensions = PropertiesLoaderUtils.loadAllProperties(WSDL_PLUGIN_RESOURCE, Thread .currentThread().getContextClassLoader()); } catch (IOException ex) { throw new RuntimeException(ex); } for (Iterator<?> it = initialExtensions.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); String pluginClz = initialExtensions.getProperty(key); try { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Registering : " + pluginClz + " for type: " + key); } WSDLExtensibilityPlugin plugin = (WSDLExtensibilityPlugin)ClassLoaderUtils.loadClass(pluginClz, getClass()). newInstance(); plugin.setExtensionRegistry(registry); wsdlPlugins.put(key, plugin); } catch (Exception ex) { LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex); } } } }
private void setAddrElement() throws ToolException { Address address = AddressFactory.getInstance().getAddresser("xml"); for (Map.Entry<String, String> entry : address.getNamespaces(env).entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin generator = getWSDLPlugin("xml", Port.class); try { ExtensibilityElement extElement = generator.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG); throw new ToolException(msg); } }
private void registerWSDLExtensibilityPlugins(ExtensionRegistry registry) { Properties initialExtensions = null; try { initialExtensions = PropertiesLoaderUtils.loadAllProperties(WSDL_PLUGIN_RESOURCE, Thread .currentThread().getContextClassLoader()); } catch (IOException ex) { throw new RuntimeException(ex); } for (Iterator<?> it = initialExtensions.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); String pluginClz = initialExtensions.getProperty(key); try { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Registering : " + pluginClz + " for type: " + key); } WSDLExtensibilityPlugin plugin = (WSDLExtensibilityPlugin)ClassLoaderUtils.loadClass(pluginClz, getClass()). newInstance(); plugin.setExtensionRegistry(registry); wsdlPlugins.put(key, plugin); } catch (Exception ex) { LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex); } } } }
private void setAddrElement() throws ToolException { Address address = AddressFactory.getInstance().getAddresser("xml"); for (Map.Entry<String, String> entry : address.getNamespaces(env).entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin generator = getWSDLPlugin("xml", Port.class); try { ExtensibilityElement extElement = generator.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG); throw new ToolException(msg); } }
private void setXMLBindingExtElement() throws ToolException { if (extReg == null) { extReg = wsdlFactory.newPopulatedExtensionRegistry(); } try { binding.addExtensibilityElement(getWSDLPlugin("xml", Binding.class).createExtension(null)); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG); throw new ToolException(msg, wse); } }
private void setXMLBindingExtElement() throws ToolException { if (extReg == null) { extReg = wsdlFactory.newPopulatedExtensionRegistry(); } try { binding.addExtensibilityElement(getWSDLPlugin("xml", Binding.class).createExtension(null)); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG); throw new ToolException(msg, wse); } }
private void setAddrElement() throws ToolException { String transport = (String)env.get(ToolConstants.CFG_TRANSPORT); Address address = AddressFactory.getInstance().getAddresser(transport); Map<String, String> ns = address.getNamespaces(env); for (Map.Entry<String, String> entry : ns.entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin plugin = getWSDLPlugin(transport, Port.class); try { ExtensibilityElement extElement = plugin.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAP_ADDRESS", LOG); throw new ToolException(msg, wse); } } }
private void setAddrElement() throws ToolException { String transport = (String)env.get(ToolConstants.CFG_TRANSPORT); Address address = AddressFactory.getInstance().getAddresser(transport); Map<String, String> ns = address.getNamespaces(env); for (Map.Entry<String, String> entry : ns.entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin plugin = getWSDLPlugin(transport, Port.class); try { ExtensibilityElement extElement = plugin.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAP_ADDRESS", LOG); throw new ToolException(msg, wse); } } }