All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.WSDL4ComplexWsdlReader Maven / Gradle / Ivy

There is a newer version: 2.8.0
Show newest version
/**
 * Copyright (c) 2008-2012 EBM WebSourcing, 2012-2016 Linagora
 * 
 * This program/library is free software: you can redistribute it and/or modify
 * it under the terms of the New BSD License (3-clause license).
 *
 * This program/library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the New BSD License (3-clause license)
 * for more details.
 *
 * You should have received a copy of the New BSD License (3-clause license)
 * along with this program/library; If not, see http://directory.fsf.org/wiki/License:BSD_3Clause/
 * for the New BSD License (3-clause license).
 */
 
package org.ow2.easywsdl.extensions.wsdl4complexwsdl.api;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Map;

import org.ow2.easywsdl.schema.api.absItf.AbsItfSchema;
import org.ow2.easywsdl.wsdl.api.WSDLException;
import org.ow2.easywsdl.wsdl.api.WSDLReader.FeatureConstants;
import org.ow2.easywsdl.wsdl.api.abstractItf.AbsItfDescription;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;

/**
 * This interface describes a collection of methods that enable conversion of a
 * WSDL document (in XML, following the WSDL schema described in the WSDL
 * specification) into a WSDL tag.
 * 
 * @author Nicolas Salatge - EBM WebSourcing
 */
public interface WSDL4ComplexWsdlReader {

    /**
     * Sets the specified feature to the specified value.
     * 

* The minimum features that must be supported are: *

*

* * * * * * * * * * * * * * * * * * * * *
NameDescriptionImplDefault Value
org.ow2.easywsdl.schema.test.verbose
If set to true, status messages will be displayed.
type: boolean - default value: false
org.ow2.easywsdl.schema.test.importDocuments
If set to true, imported WSDL documents will be retrieved and * processed.
type: boolean - default value: true
*
org.ow2.easywsdl.schema.test.pathDirectoryOfImportLocations *
If the location is set, imported WSDL documents will be retrieved at * this location (Set the importDocuments Features at true).
type: String
*

* All feature names must be fully-qualified, Java package style. All names * starting with om.ebmwebsourcing. are reserved for features defined by the * specification. It is recommended that implementation- specific features * be fully-qualified to match the package name of that implementation. For * example: com.abc.featureName * * @param name * the name of the feature to be set. * @param value * the value to set the feature to. * @throws WSDLException * TODO * @see #getFeature(String) */ void setFeature(FeatureConstants name, Object value) throws WSDLException; /** * Gets the value of the specified feature. * * @param name * the name of the feature to get the value of. * @return the value of feature * @throws IllegalArgumentException * if the feature name is not recognized. * @see #setFeature(String, boolean) */ Object getFeature(FeatureConstants name); /** * Gets all features. * * @return the features * @see #setFeature(String, boolean) */ Map getFeatures(); /** *

* Read the WSDL complex definition available at the location identified by * the specified URL, and bind it into a complex {@link Description} object. *

*

* Note: all relative URIs are resolved according to the specified * URL. *

* * @param wsdlURL * an URL pointing to a WSDL definition. * @return the {@link Description} definition. * @throws WSDL4ComplexWsdlException * An error occurs during the parsing or the binding of the WSDL * definition * @throws URISyntaxException * If the URL is not formatted strictly according to to RFC2396 * and cannot be converted to a URI. * @throws IOException * An I/O error occurs openning the URL stream. */ Description read(final URL wsdlURL) throws WSDL4ComplexWsdlException, URISyntaxException, IOException; Description read( URL wsdlURL, Map descImports, Map schemaImports) throws WSDLException; /** *

* Read the WSDL complex definition available at the specified * {@link InputSource}, and bind it into a complex {@link Description} * object. *

*

* Note: To be able to resolve relative URIs, the {@link InputSource} * system identifier must be set. *

* * @param inputSource * an {@link InputSource} pointing to a WSDL definition. * @return the {@link Description} definition.@throws MalformedURLException * The {@link InputSource} system identifier is not a well-formed * URL. * * @throws WSDL4ComplexWsdlException * An error occurs during the parsing or the binding of the WSDL * definition. * @throws MalformedURLException * The {@link InputSource} system identifier is not a * well-formed URL. * @throws URISyntaxException * the {@link InputSource} system identifier is not formatted * strictly according to to RFC2396 and cannot be converted to a * URI. */ Description read(final InputSource wsdlInputSource) throws WSDL4ComplexWsdlException, MalformedURLException, URISyntaxException; /** *

* Read the WSDL complex definition available at the specified DOM {@link Document}, * and bind it into a complex {@link Description} object. *

*

* Note: To be able to resolve relative URIs, the {@link Document} * base URI must be set. *

* * @param document * a DOM {@link Document} pointing to a WSDL definition. * @return the {@link Description} definition. * @throws WSDL4ComplexWsdlException * An error occurs during the parsing or the binding of the WSDL * definition * @throws URISyntaxException * the DOM {@link Document} base URI is not formatted strictly * according to to RFC2396 and cannot be converted to a URI. */ Description read(final Document wsdlDocument) throws WSDL4ComplexWsdlException, URISyntaxException; /** * Read a WSDL document into a WSDL definition. * * @param wslURI * uri of the wsdl * @param inputSource * an InputSource pointing to the WSDL document, an XML document * obeying the WSDL schema. * @return the definition described in the document pointed to by the * InputSource. */ Description read(final InputSource doc, Map descriptionImports, Map schemaImports) throws WSDLException; /* Description readWSDL4ComplexWsdl(URI wsdlURI, WSDLVersionConstants version, InputSource inputSource) throws WSDL4ComplexWsdlException; Description readWSDL4ComplexWsdl(final URI wsdlURI, Map descriptionImports, Map schemaImports) throws WSDLException; Description readWSDL4ComplexWsdl(final URI wsdlURI, WSDLVersionConstants version, InputSource source, Map descriptionImports, Map schemaImports) throws WSDLException; */ }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy