Examples of ContributionResolveException


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

        if(!wi.isUnresolved())
            return domBound(wi);

        final WSDLDefinition wd = res.resolveModel(WSDLDefinition.class, definition(wi.getName(), wif), ctx);
        if(wd.isUnresolved())
            throw new ContributionResolveException("Couldn't find " + name.getNamespaceURI());

        WSDLObject<PortType> pt = wd.getWSDLObject(PortType.class, name);
        if(pt == null)
            throw new ContributionResolveException("Couldn't find " + name);
        try {
            final WSDLInterface nwi = wif.createWSDLInterface(pt.getElement(), wd, res, ctx.getMonitor());
            nwi.setWsdlDefinition(wd);
            res.addModel(nwi, ctx);
            return domBound(nwi);
        } catch(InvalidInterfaceException e) {
            throw new ContributionResolveException(e);
        }
    }
View Full Code Here

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

        try {
            final WSDLInterface domwi = (WSDLInterface)wi.clone();
            domwi.resetDataBinding(DOMDataBinding.NAME);
            return domwi;
        } catch(CloneNotSupportedException e) {
            throw new ContributionResolveException(e);
        }
    }
View Full Code Here

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

                    // cache the contribution that was used to resolve the Java interface
                    // in case we need it to reolve a referenced WSDL file
                    javaInterface.setContributionContainingClass(classReference.getContributionContainingClass());
               
                } catch (InvalidInterfaceException e) {
                  ContributionResolveException ce = new ContributionResolveException("Resolving Java interface " + javaInterface.getName(), e);
                  //error("ContributionResolveException", javaFactory, ce);
                  error(monitor, "InvalidInterfaceException", javaFactory, e);
                    return javaInterface;
                  //throw ce;
                } catch ( Exception e ) {
                  throw new ContributionResolveException( "Resolving Java interface " + javaInterface.getName(), e );
                } // end try

                // Cache the resolved interface
                javaInterface.setUnresolved(false);
                resolver.addModel(javaInterface, context);
View Full Code Here

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

            postJAXWSProcessorResolve(javaInterfaceContract, resolver, context);
         
          checkForbiddenAnnotations(monitor, javaInterfaceContract);
         
        } catch (Exception e) {
            throw new ContributionResolveException("Resolving Java Interface " + javaInterfaceContract.getInterface()
                .toString(), e);
        } // end try
    }
View Full Code Here

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

                        resource = new URL(new URL(parent.getLocation()), implementation.getLocation());

                        implementation.setLocationURL(resource);

                    } catch (MalformedURLException e) {
                        ContributionResolveException ce = new ContributionResolveException(e);
                        error(context.getMonitor(), "ContributionResolveException", resolver, ce);
                    }
                }
            } else {
                try {
                    implementation.setLocationURL(new URL(resolved.getLocation()));
                } catch (MalformedURLException e) {
                    ContributionResolveException ce = new ContributionResolveException(e);
                    error(context.getMonitor(), "ContributionResolveException", resolver, ce);
                }
            }

            //introspect implementation
View Full Code Here

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

                    // Introspect the Java interface and populate the interface and
                    // operations
                    javaFactory.createJavaInterface(javaInterface, javaClass);
               
                } catch (InvalidInterfaceException e) {
                  ContributionResolveException ce = new ContributionResolveException(e);
                  error("ContributionResolveException", javaFactory, ce);
                    return javaInterface;
                  //throw ce;
                }
View Full Code Here

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

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

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

        // First resolve its class
        ClassReference classReference = new ClassReference(implementation.getPOJOName());
        classReference = resolver.resolveModel(ClassReference.class, classReference);
        Class pojoClass = classReference.getJavaClass();
        if (pojoClass == null) {
            throw new ContributionResolveException("Class could not be resolved: " + implementation.getPOJOName());
        }
        implementation.setPOJOClass(pojoClass);
       
        // Check to see if we have a .componentType file describing the POJO class
        ComponentType componentType = assemblyFactory.createComponentType();
        componentType.setUnresolved(true);
        componentType.setURI(implementation.getURI() + ".componentType");
        componentType = resolver.resolveModel(ComponentType.class, componentType);
        if (!componentType.isUnresolved()) {
           
            // We have a component type description, merge it into the POJO model
            implementation.getServices().addAll(componentType.getServices());
            implementation.getReferences().addAll(componentType.getReferences());
            implementation.getProperties().addAll(componentType.getProperties());
           
        } else {
           
            // We have no component type description, simply introspect the POJO and
            // create a single Service for it
            Service service = assemblyFactory.createService();
            service.setName(pojoClass.getSimpleName());
            JavaInterface javaInterface;
            try {
                javaInterface = javaFactory.createJavaInterface(pojoClass);
            } catch (InvalidInterfaceException e) {
                throw new ContributionResolveException(e);
            }
            JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
            interfaceContract.setInterface(javaInterface);
            service.setInterfaceContract(interfaceContract);
            implementation.getServices().add(service);
View Full Code Here

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

            //validate policysets specified for the attachPoint
            for (PolicySet policySet : policySetAttachPoint.getPolicySets()) {
                appliesTo = policySet.getAppliesTo();
                if ( !policySet.isUnresolved() ) {
                    if (!PolicyValidationUtils.isPolicySetApplicable(scdlFragment, appliesTo, attachPointType)) {
                        throw new ContributionResolveException("Policy Set '" + policySet.getName()
                            + "' does not apply to binding type  "
                            + attachPointType.getName());
        
                    } }
                else {
                    throw new ContributionResolveException("Policy Set '" + policySet.getName()
                           + "' is not defined in this domain  ");
                   
                }
            }
        }
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
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.