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

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


        try {
            final WSDLInterface domwi = (WSDLInterface)wi.clone();
            domwi.resetDataBinding(DOMDataBinding.NAME);
            return domwi;
        } catch(CloneNotSupportedException e) {
            throw new ContributionResolveException(e);
        }
    }
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

                        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

                    // 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

                            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

                                imp.setDefinition(resolved.getDefinition());
                                if (!model.getImportedDefinitions().contains(resolved)) {
                                    model.getImportedDefinitions().add(resolved);
                                }
                            } catch (Exception e) {
                              ContributionResolveException ce = new ContributionResolveException(e);
                              error("ContributionResolveException", resolver, ce);
                                //throw ce;
                            }
                        } 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());
                                    if (!model.getImportedDefinitions().contains(resolved)) {
                                        model.getImportedDefinitions().add(resolved);
                                    }
                                } catch (Exception e) {
                                  ContributionResolveException ce = new ContributionResolveException(e);
                                  error("ContributionResolveException", resolver, ce);
                                    //throw ce;
                                }
                            }
                        }
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;
        }
       
View Full Code Here

                                } // end if
                            } // end for

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

                    } // end for
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.