/** * This will be called to configure the WSDLReader instance. */ public void configureReaderInstance(WSDLReader reader) throws WSDLException { // prevent the WSDLReader instance from using the System.out // stream for messages and logging reader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false); WSDLFactory factory = WSDLFactory.newInstance(); ExtensionRegistry extRegistry = reader.getExtensionRegistry(); if (extRegistry == null) { extRegistry = factory.newPopulatedExtensionRegistry(); } WSDLUtil.registerDefaultExtensionAttributeTypes(extRegistry); reader.setExtensionRegistry(extRegistry); }
/** * This will be called to configure the WSDLReader instance. */ public void configureReaderInstance(WSDLReader reader) throws WSDLException { // prevent the WSDLReader instance from using the System.out // stream for messages and logging reader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false); WSDLFactory factory = WSDLFactory.newInstance(); ExtensionRegistry extRegistry = reader.getExtensionRegistry(); if (extRegistry == null) { extRegistry = factory.newPopulatedExtensionRegistry(); } WSDLUtil.registerDefaultExtensionAttributeTypes(extRegistry); reader.setExtensionRegistry(extRegistry); }
/** * Creates a new WSDLReader and configures it with a {@link WSDLFactory#newPopulatedExtensionRegistry()} if it does not specify an extension registry. * The method will register default extension attribute types in WSDLReader's {@link WSDLReader#getExtensionRegistry() extensionRegistry}, * see {@link #registerDefaultExtensionAttributeTypes(ExtensionRegistry)}. * * @return The newly created WSDLReader instance. * @throws WSDLException */ public static WSDLReader newWSDLReaderWithPopulatedExtensionRegistry() throws WSDLException { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); ExtensionRegistry extensionRegistry = reader.getExtensionRegistry(); if (extensionRegistry == null) { extensionRegistry = wsdlFactory.newPopulatedExtensionRegistry(); } WSDLUtil.registerDefaultExtensionAttributeTypes(extensionRegistry); reader.setExtensionRegistry(extensionRegistry); return reader; } }
/** * Creates a new WSDLReader and configures it with a {@link WSDLFactory#newPopulatedExtensionRegistry()} if it does not specify an extension registry. * The method will register default extension attribute types in WSDLReader's {@link WSDLReader#getExtensionRegistry() extensionRegistry}, * see {@link #registerDefaultExtensionAttributeTypes(ExtensionRegistry)}. * * @return The newly created WSDLReader instance. * @throws WSDLException */ public static WSDLReader newWSDLReaderWithPopulatedExtensionRegistry() throws WSDLException { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); ExtensionRegistry extensionRegistry = reader.getExtensionRegistry(); if (extensionRegistry == null) { extensionRegistry = wsdlFactory.newPopulatedExtensionRegistry(); } WSDLUtil.registerDefaultExtensionAttributeTypes(extensionRegistry); reader.setExtensionRegistry(extensionRegistry); return reader; } }