Package org.apache.tuscany.spi.loader

Examples of org.apache.tuscany.spi.loader.LoaderException


        RubyComponentType componentType;
        if (resource == null) {
            try {
                componentType = loadByIntrospection(parent, implementation, deploymentContext);
            } catch (InvalidServiceContractException e) {
                throw new LoaderException("Invalid service contract", e);
            }
        } else {
            componentType = loadFromSidefile(resource, deploymentContext);
        }
View Full Code Here


    public void load(CompositeComponent parent, SystemCompositeImplementation implementation,
                     DeploymentContext deploymentContext)
        throws LoaderException {
        URL scdlLocation = implementation.getScdlLocation();
        if (scdlLocation == null) {
            throw new LoaderException("SCDL location not found");
        }
        ClassLoader cl = implementation.getClassLoader();
        deploymentContext = new ChildDeploymentContext(deploymentContext, cl, scdlLocation);
        CompositeComponentType componentType = loadFromSidefile(parent, scdlLocation, deploymentContext);
        implementation.setComponentType(componentType);
View Full Code Here

        if (wsdlLocation != null) {
            try {
                wsdlRegistry.loadDefinition(wsdlLocation, deploymentContext.getClassLoader());
            } catch (IOException e) {
                LoaderException le = new LoaderException(e);
                le.setIdentifier(wsdlLocation);
                throw le;
            } catch (WSDLException e) {
                LoaderException le = new LoaderException(e);
                le.setIdentifier(wsdlLocation);
                throw le;
            }
        }

        PortType portType = getPortType(interfaceURI);
        if (portType == null) {
            throw new MissingResourceException(interfaceURI);
        }
        PortType callback = null;
        if (callbackURI != null) {
            callback = getPortType(callbackURI);
        }
        try {
            WSDLServiceContract contract = introspector.introspect(portType, callback);
            DataType<?> dataType = (DataType<?>) extensions.get(DataType.class);
            if (dataType != null) {
                contract.setDataBinding(dataType.getDataBinding());
            }
            contract.getExtensions().putAll(extensions);
            return contract;
        } catch (InvalidServiceContractException e) {
            LoaderException le = new LoaderException(e);
            le.setIdentifier(wsdlLocation);
            throw le;
        }
    }
View Full Code Here

                return (Document)transformer.transform(is, null);
            } finally {
                is.close();
            }
        } catch (Exception e) {
            throw new LoaderException(e);
        }
    }
View Full Code Here

                            new InvalidValueException("The 'source' has an invalid value");
                        ex.addContextName(source);
                        throw ex;
                    }
                } catch (Exception e) {
                    throw new LoaderException(e);
                }
            } else if (file != null) {
                node = loadFromFile(propValue.getFile(), deploymentContext);
                propValue.setValue(node);
                Property<?> prop =
View Full Code Here

        String text = value.getValue().getDocumentElement().getTextContent();
        try {
            Context context = new InitialContext();
            return new JNDIObjectFactory<T>(context, text);
        } catch (NamingException e) {
            throw new LoaderException(e);
        }
    }
View Full Code Here

            while ((count = reader.read(buffer)) > 0) {
                source.append(buffer, 0, count);
            }
            return source.toString();
        } catch (IOException e) {
            LoaderException le = new LoaderException(e);
            le.setIdentifier(resource);
            throw le;
        } finally {
            try {
                is.close();
            } catch (IOException e) {
View Full Code Here

                } catch (IOException e) {
                    // ignore
                }
            }
        } catch (IOException e) {
            LoaderException sfe = new LoaderException(e);
            sfe.setResourceURI(url.toString());
            throw sfe;
        } catch (XMLStreamException e) {
            LoaderException sfe = new LoaderException(e);
            sfe.setResourceURI(url.toString());
            throw sfe;
        }
    }
View Full Code Here

            try {
                DocumentBuilder documentBuilder = DOMHelper.newDocumentBuilder();
                Document value = StAXUtil.createPropertyValue(reader, property.getXmlType(), documentBuilder);
                propertyValue = new PropertyValue<Type>(name, value);
            } catch (ParserConfigurationException e) {
                throw new LoaderException(e);
            }
        }
        ObjectFactory<Type> objectFactory = propertyFactory.createObjectFactory(property, propertyValue);
        // propertyValue.setValueFactory(new SimplePropertyObjectFactory(property, propertyValue.getValue()));
        propertyValue.setValueFactory(objectFactory);
View Full Code Here

        JavaScriptComponentType componentType;
        if (resource == null) {
            try {
                componentType = loadByIntrospection(parent, implementation, deploymentContext);
            } catch (InvalidServiceContractException e) {
                throw new LoaderException("Invalid service contract", e);
            }
        } else {
            componentType = loadFromSidefile(resource, deploymentContext);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.loader.LoaderException

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.