Examples of ContributionResolveException


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

        if (providedIntent.isUnresolved()) {
          providedIntent = resolver.resolveModel(Intent.class, providedIntent);
          if (!providedIntent.isUnresolved()) {
            mayProvide.add(providedIntent);
          } else {
            throw new ContributionResolveException(
                "May Provide Intent - " + providedIntent
                    + " not found for ExtensionType "
                    + extensionType);

          }
View Full Code Here

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

                            WSDLDefinition resolved;
                            try {
                                resolved = read(null, uri, uri.toURL());
                                imp.setDefinition(resolved.getDefinition());
                            } catch (Exception e) {
                                throw new ContributionResolveException(e);
                            }
                        } else {
                            if (location.startsWith("/")) {
                                // This is a relative URI against a contribution
                                location = location.substring(1);
                                // TODO: Need to resolve it against the contribution
                            } else {
                                // This is a relative URI against the WSDL document
                                URI baseURI = URI.create(model.getDefinition().getDocumentBaseURI());
                                URI locationURI = baseURI.resolve(location);
                                WSDLDefinition resolved;
                                try {
                                    resolved = read(null, locationURI, locationURI.toURL());
                                    imp.setDefinition(resolved.getDefinition());
                                } catch (Exception e) {
                                    throw new ContributionResolveException(e);
                                }
                            }
                        }
                    }
                }
View Full Code Here

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

        if (resolved.getLocation() != null) {
            try {
                implementation.setLocationURL(new URL(resolved.getLocation()));
                implementation.setUnresolved(false);
            } catch (IOException e) {
                throw new ContributionResolveException(e);
            }
        }
    }
View Full Code Here

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

    public void resolve(NotificationImplementationImpl impl, ModelResolver resolver) throws ContributionResolveException {
        ComponentType componentType = resolver.resolveModel(ComponentType.class, impl.getComponentType());
       
        if (componentType.isUnresolved()) {
            throw new ContributionResolveException("ComponentType still unresolved");
        }
        impl.setComponentType(componentType);
        impl.setUnresolved(false);
    }
View Full Code Here

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

                        try {
                            wsdlDefinition.setDefinition(portType.getDefinition());
                            wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
                            wsdlInterface.setWsdlDefinition(wsdlDefinition);
                        } catch (InvalidInterfaceException e) {
                            throw new ContributionResolveException(e);
                        }
                        resolver.addModel(wsdlInterface);
                    }
                }
            }
View Full Code Here

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

                    //java implementation).  This has to be consolidated in to the component.
                    copyPoliciesToComponent(component, implementation, resolver, false);
                   
                    component.setImplementation(implementation);
                } catch ( PolicyValidationException e ) {
                    throw new ContributionResolveException("PolicyValidation exception when processing implementation of component '"
                                                           + component.getName() + "' due to " + e.getMessage(), e);
                }
           
            }
        }
View Full Code Here

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

         if (policy.getCallbackHandlerClassName() != null) {
             ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName());
             classReference = resolver.resolveModel(ClassReference.class, classReference);
             Class callbackClass = classReference.getJavaClass();
             if (callbackClass == null) {
                 throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName()));
             }
             policy.setCallbackHandlerClass(callbackClass);
         }
    }
View Full Code Here

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

                WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
                WSDLInterface wsdlInterface;
                try {
                    wsdlInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver);
                } catch (InvalidInterfaceException e) {
                    throw new ContributionResolveException(e);
                }
                interfaceContract.setInterface(wsdlInterface);
                model.setBindingInterfaceContract(interfaceContract);
            }
        }
View Full Code Here

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

        ClassReference classReference = new ClassReference(javaImplementation.getName());
        classReference = resolver.resolveModel(ClassReference.class, classReference);
        Class javaClass = classReference.getJavaClass();
        if (javaClass == null) {
            throw new ContributionResolveException(new ClassNotFoundException(javaImplementation.getName()));
        }
        javaImplementation.setJavaClass(javaClass);
        javaImplementation.setUnresolved(false);

        try {
            javaFactory.createJavaImplementation(javaImplementation, javaImplementation.getJavaClass());
        } catch (IntrospectionException e) {
            throw new ContributionResolveException(e);
        }

        mergeComponentType(resolver, javaImplementation);

        // FIXME the introspector should always create at least one service
View Full Code Here

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

            new SpringXMLComponentTypeLoader(assemblyFactory, javaFactory, policyFactory);
        try {
            // Load the Spring Implementation information from its application context file...
            springLoader.load(springImplementation);
        } catch (ContributionReadException e) {
            throw new ContributionResolveException(e);
        }

        ComponentType ct = springImplementation.getComponentType();
        if (ct.isUnresolved()) {
            // If the introspection fails to resolve, try to find a side file...
            ComponentType componentType = resolver.resolveModel(ComponentType.class, ct);
            if (componentType.isUnresolved()) {
                throw new ContributionResolveException(
                                                       "SpringArtifactProcessor: unable to resolve componentType for Spring component");
            }
            springImplementation.setComponentType(componentType);

            springImplementation.setUnresolved(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.