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

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


            ic.setInterface(jif.createJavaInterface(c));
            s.setInterfaceContract(ic);
            impl.getServices().add(s);
            impl.setUnresolved(false);
        } catch (Exception ex){
            throw new ContributionResolveException(ex);
        }              
    }
View Full Code Here


                        count++;
                    } // end for

                    if (count == 0) {
                        error(monitor, "PartnerLinkTypeNoRoles", theElement, pLinkElement.getName());
                        throw new ContributionResolveException("partnerLinkType " + pLinkElement.getName() + " has no Roles defined");
                    } else
                        thePLinks.add(pLinkElement);
                } // end if
            } // end for
        } // end for
View Full Code Here

                            // Introspect the WSDL portType and add the resulting WSDLInterface to the resolver
                            try {
                                wsdlInterface = wsdlFactory.createWSDLInterface(wsdlPortType.getElement(), theWSDL, resolver, context.getMonitor());
                                wsdlInterface.setWsdlDefinition(theWSDL);
                            } catch (InvalidInterfaceException e) {
                                ContributionResolveException ce =
                                  new ContributionResolveException("Unable to create WSDLInterface for portType " + portType.getQName(),e);
                                error(context.getMonitor(), "ContributionResolveException", resolver, ce);
                                throw ce;
                            } // end try
                            resolver.addModel(wsdlInterface, context);
                            theInterfaces.add(wsdlInterface);
View Full Code Here

                        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

                    // 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(context.getMonitor().getMessageString(JavaInterfaceProcessor.class.getName(),
                                                                                                                           "interface-javaxml-validation-messages",
                                                                                                                             "ResolvingInterface") +
                                                                                       javaInterface.getName(), e);
                  error(monitor, "InvalidInterfaceException", javaFactory, e);
                    return javaInterface;
                } catch ( Exception e ) {
                  throw new ContributionResolveException(context.getMonitor().getMessageString(JavaInterfaceProcessor.class.getName(),
                                                                                               "interface-javaxml-validation-messages",
                                                                                                 "ResolvingInterface") +
                                                           " " +
                                                           javaInterface.getName(), e );
                } // end try
View Full Code Here

            postJAXWSProcessorResolve(javaInterfaceContract, resolver, context);
         
          checkForbiddenAnnotations(monitor, javaInterfaceContract);
         
        } catch (Exception e) {
            throw new ContributionResolveException(context.getMonitor().getMessageString(JavaInterfaceProcessor.class.getName(),
                                                                                         "interface-javaxml-validation-messages",
                                                                                         "ResolvingInterface") +
                                                   " " +
                                                   javaInterfaceContract.getInterface().toString(), e);
        } // end try
View Full Code Here

       
        Application application;
        try {
            application = (Application) implementation.getApplicationClass().newInstance();
        } catch (Exception e) {
            throw new ContributionResolveException(e);
        }
       
        for(Class<?> rootResourceClass: application.getClasses()) {
            addService(implementation, rootResourceClass);
        }
View Full Code Here

          javaImplementation.setJavaClass(javaClass);
 
          try {
              javaFactory.createJavaImplementation(javaImplementation, javaImplementation.getJavaClass());
          } catch (IntrospectionException e) {
              ContributionResolveException ce = new ContributionResolveException(e);
              error("ContributionResolveException", javaFactory, ce);
              //throw ce;
              return;
          }
 
          javaImplementation.setUnresolved(false);
          mergeComponentType(resolver, javaImplementation);
 
          // FIXME the introspector should always create at least one service
          if (javaImplementation.getServices().isEmpty()) {
              javaImplementation.getServices().add(assemblyFactory.createService());
          }
      } catch (Throwable e ) {
        throw new ContributionResolveException( "Resolving Java implementation: " + javaImplementation.getName(), e);
      } // end try
    } // end method
View Full Code Here

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

        ComponentType ct = springImplementation.getComponentType();
View Full Code Here

                    // Introspect the Java interface and populate the interface and
                    // operations
                    javaFactory.createJavaInterface(javaInterface, javaClass);
               
                } catch (InvalidInterfaceException e) {
                  ContributionResolveException ce = new ContributionResolveException("Resolving Java interface " + javaInterface.getName(), e);
                  //error("ContributionResolveException", javaFactory, ce);
                  error("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);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.processor.ContributionResolveException

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.