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

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


                    final WSDLDefinition wd = ec.aproc.read(null, new URI(uri), new URL(new URL(c.getLocation()), uri), ctx, WSDLDefinition.class);
                    c.getModelResolver().addModel(wd, ctx);
                    c.getModelResolver().resolveModel(WSDLDefinition.class, wd, ctx);
                    final WSDLObject<PortType> pt = wd.getWSDLObject(PortType.class, new QName(ns, name));
                    if(pt == null)
                        throw new ContributionResolveException("Couldn't find " + name);
                    final WSDLInterface nwi = ec.wif.createWSDLInterface(pt.getElement(), wd, c.getModelResolver(), null);
                    nwi.setWsdlDefinition(wd);
                    nwi.resetDataBinding(DOMDataBinding.NAME);
                    return nwi;
                } catch(Exception e) {
View Full Code Here


              try {
                    Class<?> factoryClass = resolved.getJavaClass();
                    register(factoryClass, importSDO.getHelperContext());
                    importSDO.setUnresolved(false);
                } catch (Exception e) {
                  ContributionResolveException ce = new ContributionResolveException(e);
                  error(context.getMonitor(), "ContributionResolveException", resolver, ce);
                    //throw ce;
                }               
            } else {
              error(context.getMonitor(), "FailToResolveClass", resolver, factoryName);
View Full Code Here

                     error(context.getMonitor(), "FailToResolveLocation", resolver, location);
                    //ContributionResolveException loaderException = new ContributionResolveException("Fail to resolve location: " + location);
                    //throw loaderException;
                }               
            } catch (IOException e) {
              ContributionResolveException ce = new ContributionResolveException(e);
              error(context.getMonitor(), "ContributionResolveException", resolver, ce);
                //throw ce;
            }           
        }
    }
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("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

            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

                    for (Artifact artifact : contribution.getArtifacts()) {
                        if (packageName.equals(artifact.getURI().replace("/", ".")))
                            available = true;
                    }
                    if (!available)
                        throw new ContributionResolveException("[JCI100007] A Java package " + packageName
                            + " that is specified on an export "
                            + "element MUST be contained within the contribution containing the export element.");
                }
            }

            // Resolve all artifact models
            for (Artifact artifact : contribution.getArtifacts()) {
                Object model = artifact.getModel();
                if (model != null) {
                    Artifact oldArtifact = context.setArtifact(artifact);
                    try {
                        artifactProcessor.resolve(model, contributionResolver, context);
                    } catch (Throwable e) {
                        throw new ContributionResolveException(e);
                    } finally {
                        context.setArtifact(oldArtifact);
                    }
                }
            }
View Full Code Here

                    Composite resolved = resolver.resolveModel(Composite.class, include, context);
                    if (!resolved.isUnresolved()) {
                        if ((composite.isLocal() && resolved.isLocal()) || (!composite.isLocal() && !resolved.isLocal())) {
                            composite.getIncludes().set(i, resolved);
                        } else {
                            ContributionResolveException ce =
                                new ContributionResolveException("[ASM60041] Error: Composite " + composite.getName()
                                    + " can only include another composite with the identical @local attribute value");
                            error(monitor, "ContributionResolveException", include, ce);
                        }
                    } else {
                        ContributionResolveException ce =
                            new ContributionResolveException("[ASM60042] Error: Composite " + include.getName()
                                + " is not a valid composite within the domain");
                        error(monitor, "ContributionResolveException", include, ce);
                    }
                }
            }
View Full Code Here

          if (composite != null)
            extensionProcessor.resolve(composite, resolver, context);
      } catch (Throwable e ) {
        // Add information about which composite was being processed when the exception occurred
        String newMessage = "Processing composite " + composite.getName() + ": " + e.getMessage();
        throw new ContributionResolveException( newMessage, e );
      } // end try
    }
View Full Code Here

                }
            }

            impl.setUnresolved(false);
        } catch(InvalidInterfaceException e) {
            throw new ContributionResolveException(e);
        }
    }
View Full Code Here

     */
    static Class<?> resolve(final String name, final ModelResolver res, final ProcessorContext ctx) throws ContributionResolveException {
        final ClassReference cr = res.resolveModel(ClassReference.class, new ClassReference(name), ctx);
        if(cr.getJavaClass() != null)
            return cr.getJavaClass();
        throw new ContributionResolveException(new ClassNotFoundException(name));
    }
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.