/** * Get a WSDLReader. * * @return WSDLReader. * @throws WSDLException * on error. */ private WSDLReader getReader() throws WSDLException { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); ExtensionRegistry registry = wsdlFactory.newPopulatedExtensionRegistry(); wsdlReader.setExtensionRegistry( registry ); wsdlReader.setFeature( "javax.wsdl.verbose", true ); wsdlReader.setFeature( "javax.wsdl.importDocuments", true ); return wsdlReader; }
/** * Get the WSDLFactory object cached in the reader, or use lazy * instantiation if it is not cached yet. */ protected WSDLFactory getWSDLFactory() throws WSDLException { if (factory == null) { factory = (factoryImplName != null) ? WSDLFactory.newInstance(factoryImplName) : WSDLFactory.newInstance(); } return factory; }
/** * Get a new instance of a WSDLFactory. This method * follows (almost) the same basic sequence of steps that JAXP * follows to determine the fully-qualified class name of the * class which implements WSDLFactory. * <p> * The steps in order are: * <ol> * <li>Check the property file META-INF/services/javax.wsdl.factory.WSDLFactory.</li> * <li>Check the javax.wsdl.factory.WSDLFactory system property.</li> * <li>Check the lib/wsdl.properties file in the JRE directory. The key * will have the same name as the above system property.</li> * <li>Use the default class name provided by the implementation.</li> * </ol> * <p> * Once an instance of a WSDLFactory is obtained, invoke * newDefinition(), newWSDLReader(), or newWSDLWriter(), to create * the desired instances. */ public static WSDLFactory newInstance() throws WSDLException { String factoryImplName = findFactoryImplName(); return newInstance(factoryImplName); }
WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
public WSDLFactory run() throws WSDLException{ WSDLFactory factory = WSDLFactory.newInstance(); return factory; } });
public static WSDLFactory getWSDL11Factory() { if (wsdl11Factory == null) { try { wsdl11Factory = WSDLFactory.newInstance(); } catch (WSDLException e) { throw new Fault(e); } } return wsdl11Factory; }
public Definition getDefinition(File wsdlFile) throws Exception { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); return reader.readWSDL(wsdlFile.toURI().toURL().toString()); } }
public Definition getDefinition(File wsdlFile) throws Exception { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); return reader.readWSDL(wsdlFile.toURI().toURL().toString()); } }
public Definition getDefinition(File wsdlFile) throws Exception { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); return reader.readWSDL(wsdlFile.toURI().toURL().toString()); } }
public Definition getDefinition(File wsdlFile) throws Exception { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); return reader.readWSDL(wsdlFile.toURL().toString()); }
public static void serialize(Definition definition, Writer writer) throws WSDLException { WSDLFactory factory = WSDLFactory.newInstance(); WSDLWriter wsdlWriter = factory.newWSDLWriter(); wsdlWriter.writeWSDL(definition, writer); }
public WSDLServiceBuilder(String baseURI, InputSource source) throws WSDLException { this(WSDLFactory.newInstance().newWSDLReader().readWSDL(baseURI, source)); this.definition.setDocumentBaseURI(baseURI); this.systemId = source.getSystemId(); }
/** * Return a DOM tree for the WSDL for a server. * * @param server the server. * @return the DOM tree. * @throws WSDLException */ public Document getWSDLDocument(Server server) throws WSDLException { Definition definition = getWSDLDefinition(server); WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); return writer.getDocument(definition); }
/** * Return a DOM tree for the WSDL for a server. * * @param server the server. * @return the DOM tree. * @throws WSDLException */ public Document getWSDLDocument(Server server) throws WSDLException { Definition definition = getWSDLDefinition(server); WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); return writer.getDocument(definition); }
private void initWSDL() throws ToolException { try { wsdlFactory = WSDLFactory.newInstance(); wsdlDefinition = wsdlFactory.newDefinition(); } catch (WSDLException we) { Message msg = new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG); throw new ToolException(msg, we); } }
/** * Gets the Definition contained in the WSDL document (does not currently support reading * WSDL that is protected with authentication). * @return Definition describing the service(s) * @throws Exception if the definition could not be read */ protected Definition getWSDLDefinition() throws Exception { return WSDLFactory.newInstance().newWSDLReader().readWSDL(getWsdlDocumentUrl()); }
protected Definition getDefinitionFromDescription() { if (description != null) { try { WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); reader.setFeature(Constants.FEATURE_VERBOSE, false); return reader.readWSDL(null, description); } catch (WSDLException ignore) { // Ignore } } return null; }
public WSDLGenerator(WSDLModel model, ProcessorEnvironment penv) { wmodel = model; env = penv; definition = model.getDefinition(); try { wsdlFactory = WSDLFactory.newInstance(); } catch (javax.wsdl.WSDLException e) { throw new ToolException(e.getMessage(), e); } }
private static void loadWsdl(String wsdlUrl, Map<String, Element> schemaMap, List<JibxSchemaResolver> resolvers) throws WSDLException { WSDLFactory factory = WSDLFactory.newInstance(); WSDLReader reader = factory.newWSDLReader(); Definition parentDef = reader.readWSDL(wsdlUrl); JibxSchemaHelper util = new JibxSchemaHelper(BusFactory.getDefaultBus(), schemaMap); util.getSchemas(parentDef, new SchemaCollection(), resolvers); }
public static Definition readWsdl(WSDLLocator locator) { try { final WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); wsdlReader.setFeature("javax.wsdl.verbose", false); wsdlReader.setFeature("javax.wsdl.importDocuments", true); return wsdlReader.readWSDL(locator); } catch (final WsdlException e) { throw e; } catch (final Exception e) { throw new WsdlException("Problem while reading wsdl file at URL : " + locator.getBaseURI(), e); } }