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

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


                    return null;
                }
                latestImportURI = url.toString();
                return XMLDocumentHelper.getInputSource(url);
            } catch (Exception e) {
                throw new ContributionRuntimeException(e);
            }
        }
View Full Code Here


        }
        XSDefinition resolved = null;
        try {
            resolved = aggregate(list);
        } catch (IOException e) {
            throw new ContributionRuntimeException(e);
        }
        if (resolved != null && !resolved.isUnresolved()) {
            if (definition.isUnresolved() && definition.getSchema() == null && modelXSD != null) {
                // Update the unresolved model with schema information and mark it
                // resolved.  This information in the unresolved model is needed when
View Full Code Here

                // find original cause of the problem
                Throwable cause = e;
                while (cause.getCause() != null) {
                    cause = cause.getCause();
                }
                throw new ContributionRuntimeException(cause);
            }
            definition.setSchemaCollection(schemaCollection);
            definition.setSchema(schema);
            definition.setUnresolved(false);
        } else if (definition.getLocation() != null) {
            if (definition.getLocation().getFragment() != null) {
                // It's an inline schema
                return;
            }
            // Read an XSD document
            InputSource xsd = XMLDocumentHelper.getInputSource(definition.getLocation().toURL());
            for (XmlSchema d : schemaCollection.getXmlSchemas()) {
                if (isSameNamespace(d.getTargetNamespace(), definition.getNamespace())) {
                    if (d.getSourceURI().equals(definition.getLocation().toString()))
                        return;
                }
            }
            XmlSchema schema = null;
            try {
                schema = schemaCollection.read(xsd, null);
            } catch (RuntimeException e) {
                // find original cause of the problem
                Throwable cause = e;
                while (cause.getCause() != null) {
                    cause = cause.getCause();
                }
                throw new ContributionRuntimeException(cause);
            }
            definition.setSchemaCollection(schemaCollection);
            definition.setSchema(schema);
        }
    }
View Full Code Here

                    return null;
                }
                latestImportURI = url.toString();
                return XMLDocumentHelper.getInputSource(url);
            } catch (Exception e) {
                throw new ContributionRuntimeException(e);
            }
        }
View Full Code Here

                    return null;
                }
                latestImportURI = url.toString();
                return XMLDocumentHelper.getInputSource(url);
            } catch (Exception e) {
                throw new ContributionRuntimeException(e);
            }
        }
View Full Code Here

        }
        XSDefinition resolved = null;
        try {
            resolved = aggregate(list);
        } catch (IOException e) {
            throw new ContributionRuntimeException(e);
        }
        if (resolved != null && !resolved.isUnresolved()) {
            return modelClass.cast(resolved);
        }
View Full Code Here

            this.wsdlFactory = wsdlFactory;
        } else {
            try {
                this.wsdlFactory = javax.wsdl.factory.WSDLFactory.newInstance();
            } catch (WSDLException e) {
                throw new ContributionRuntimeException(e);
            }
        }
       
        wsdlExtensionRegistry = this.wsdlFactory.newPopulatedExtensionRegistry();
    }
View Full Code Here

            try {
                URL url = new URL(new URL(parentLocation), importLocation);
                latestImportURI = url.toString();
                return new InputSource(url.openStream());
            } catch (Exception e) {
                throw new ContributionRuntimeException(e);
            }
        }
View Full Code Here

                    return null;
                }
                latestImportURI = url.toString();
                return XMLDocumentHelper.getInputSource(url);
            } catch (Exception e) {
                throw new ContributionRuntimeException(e);
            }
        }
View Full Code Here

        }
        XSDefinition resolved = null;
        try {
            resolved = aggregate(list);
        } catch (IOException e) {
            throw new ContributionRuntimeException(e);
        }
        if (resolved != null && !resolved.isUnresolved()) {
            return modelClass.cast(resolved);
        }
View Full Code Here

TOP

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

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.