Package org.apache.tuscany.sca.contribution.service

Examples of org.apache.tuscany.sca.contribution.service.ContributionReadException


//            }
           
            return componentType;
           
        } catch (XMLStreamException e) {
            throw new ContributionReadException(e);
        } catch (IOException e) {
            throw new ContributionReadException(e);
        } finally {
            try {
                if (urlStream != null) {
                    urlStream.close();
                    urlStream = null;
View Full Code Here


    public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
        try {
            return indexRead(artifactURL);
        } catch (Exception e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

        File directory = directory(contributionURL);
        File file = new File(directory, artifact);
        try {
            return file.toURI().toURL();
        } catch (MalformedURLException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

        File directory = directory(contributionURL);
        List<String> artifacts = new ArrayList<String>();
        try {
            traverse(artifacts, directory, directory);
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }
        return artifacts;
    }
View Full Code Here

    private static File directory(URL url) throws ContributionReadException {
        File file;
        try {
            file = new File(url.toURI());
        } catch (URISyntaxException e) {
            throw new ContributionReadException(e);
        }
        if (!file.exists() || !file.isDirectory()) {
            throw new ContributionReadException(url.toString());
        }
        return file;
    }
View Full Code Here

            } else {
                url = new URL("jar:" + contributionURL.toExternalForm() + "!/" + artifact);
            }
            return url;
        } catch (MalformedURLException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

               
            } finally {
                jar.close();
            }
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

            wsdlDef.setDefinition(definition);

            //Read inline schemas
            readInlineSchemas(wsdlDef, definition);
        } catch (WSDLException e) {
            throw new ContributionReadException(e);
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

    public XSDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
        try {
            return indexRead(artifactURL);
        } catch (Exception e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

        // Read a qname in the form:
        // namespace#wsdl.interface(name)
        int index = uri.indexOf('#');
        if (index == -1) {
            throw new ContributionReadException("Invalid WSDL interface attribute: " + uri);
        }
        String namespace = uri.substring(0, index);
        String name = uri.substring(index + 1);
        name = name.substring("wsdl.interface(".length(), name.length() - 1);
        wsdlInterface.setName(new QName(namespace, name));
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.service.ContributionReadException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.