Package org.apache.tuscany.sca.contribution.processor

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


//            }
           
            return componentType;
           
        } catch (XMLStreamException e) {
          ContributionReadException ce = new ContributionReadException(e);
          error(monitor, "ContributionReadException", inputFactory, ce);
            throw ce;
        } catch (IOException e) {
          ContributionReadException ce = new ContributionReadException(e);
          error(monitor, "ContributionReadException", inputFactory, ce);
            throw ce;
        } finally {
            try {
                if (urlStream != null) {
View Full Code Here


        property.setMustSupply(getBoolean(reader, MUST_SUPPLY));
        property.setXSDElement(getQName(reader, ELEMENT));
        property.setXSDType(getQName(reader, TYPE));
        // MJE added 14/05/2009 - check for both @element and @type being present - disallowed by OASIS Assembly spec
        if( property.getXSDElement() != null && property.getXSDType() != null ) {
          ContributionReadException ce = new ContributionReadException("[ASM40010,ASM60040] Error: property has both @type and @element attribute values - " +
                                                                   property.getName());
          error(context.getMonitor(), "ContributionReadException", property, ce);
        } // end if

    }
View Full Code Here

                documentBuilderFactory = DocumentBuilderFactory.newInstance();
                documentBuilderFactory.setNamespaceAware(true);
            }
            document = documentBuilderFactory.newDocumentBuilder().newDocument();
        } catch (ParserConfigurationException e) {
            ContributionReadException ce = new ContributionReadException(e);
            error(context.getMonitor(), "ContributionReadException", documentBuilderFactory, ce);
            throw ce;
        }

        // Collect the property values as <value> elements under the <property>
View Full Code Here

                    reader.next();
                }
            }
        }
        catch (XMLStreamException e) {
            ContributionReadException ex = new ContributionReadException(e);
            error(context.getMonitor(), "XMLStreamException", reader, ex);
        }
       
        return componentType;
    }
View Full Code Here

                }
            }
            return (T) model;

        } catch (Exception e) {
          ContributionReadException ce = new ContributionReadException(e);
          error(context.getMonitor(), "ContributionReadException", reader, ce);
            throw ce;
        }
    }
View Full Code Here

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

        throws ContributionReadException {
        //System.out.println("Spring TypeLoader - load method start");
        ComponentType componentType = implementation.getComponentType();
        /* Check that there is a component type object already set  */
        if (componentType == null) {
            throw new ContributionReadException("SpringXMLLoader load: implementation has no ComponentType object");
        }
        if (componentType.isUnresolved()) {
            /* Fetch the location of the application-context file from the implementation */
            loadFromXML(implementation, resolver, context);
            if (!componentType.isUnresolved())
View Full Code Here

            beans.addAll(appCxtBeans);
            services.addAll(appCxtServices);
            references.addAll(appCxtReferences);
            scaproperties.addAll(appCxtProperties);
        } catch (Throwable e) {
            throw new ContributionReadException(e);
        }

        /* At this point, the complete application-context.xml file has been read and its contents  */
        /* stored in the lists of beans, services, references.  These are now used to generate      */
        /* the implied componentType for the application context                    */
 
View Full Code Here

                // The resource can be out of scope of the contribution root
                if (parent != null && parent.getLocation() != null) {
                    resource = new URL(new URL(parent.getLocation()), contextPath);
                    return resource;
                }
                throw new ContributionReadException("Location cannot be resloved: " + contextPath);
            }
        } else {
            resource = new URL(contextPath);
        }
        return resource;
View Full Code Here

                } // end while
            }

        } catch (ClassNotFoundException e) {
            // Means that either an interface class, property class or a bean was not found
            throw new ContributionReadException(e);
        } catch (InvalidInterfaceException e) {
            throw new ContributionReadException(e);
        } // end try

        // If we get here, the Spring assembly component type is resolved
        componentType.setUnresolved(false);
        implementation.setComponentType(componentType);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.processor.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.