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

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


    private static File directory(URL url) throws ContributionReadException {
        File file;
        try {
            file = new File(url.toURI());
        } catch (URISyntaxException e) {
            throw new ContributionReadException(e);
        }
        if (!file.exists() || !file.isDirectory()) {
            throw new ContributionReadException(url.toString());
        }
        return file;
    }
View Full Code Here


            } else {
                url = new URL("jar:" + contributionURL.toExternalForm() + "!/" + artifact);
            }
            return url;
        } catch (MalformedURLException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

               
            } finally {
                jar.close();
            }
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

            ContributionMetadata contribution = (ContributionMetadata)staxProcessor.read(reader);

            return contribution;
           
        } catch (XMLStreamException e) {
          ContributionReadException ex = new ContributionReadException(e);
          error("XMLStreamException", inputFactory, ex);
          throw ex;
        } catch (IOException e) {
          ContributionReadException ex = new ContributionReadException(e);
          error("IOException", inputFactory, ex);
            throw ex;
        } finally {
            try {
                if (urlStream != null) {
View Full Code Here

                    reader.next();
                }
            }
        }
        catch (XMLStreamException e) {
            ContributionReadException ex = new ContributionReadException(e);
            error("XMLStreamException", reader, ex);
        }
       
        return contribution;
    }
View Full Code Here

                    reader.next();
                }
            }
        }
        catch (XMLStreamException e) {
            ContributionReadException ex = new ContributionReadException(e);
            error("XMLStreamException", reader, ex);
        }
       
        return javaImport;
    }
View Full Code Here

            switch (event) {
                case START_ELEMENT: {
                    if (END_POINT_REFERENCE.equals(reader.getName().getLocalPart())) {
                        if (wsdlElement != null && (wsdlElementIsBinding == null || !wsdlElementIsBinding)) {
                          error("MustUseWsdlBinding", reader, wsdlElement);
                            throw new ContributionReadException(wsdlElement + " must use wsdl.binding when using wsa:EndpointReference");
                        }
                        wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader));
                    } else if (Constants.OPERATION_QNAME.equals(reader.getName())) {
                        confOp = configuredOperationProcessor.read(reader);
                        if (confOp != null) {
View Full Code Here

                    reader.next();
                }
            }
        }
        catch (XMLStreamException e) {
            ContributionReadException ex = new ContributionReadException(e);
            error("XMLStreamException", reader, ex);
        }
       
        return constrainingType;
    }
View Full Code Here

        try {
            WSDLDefinition definition = indexRead(artifactURL);
            definition.setURI(artifactURI);
            return definition;
        } catch (Exception e) {
          ContributionReadException ce = new ContributionReadException(e);
          error("ContributionReadException", artifactURL, ce);
            //throw ce;
          return null;
        }
    }
View Full Code Here

                }
            }
            return model;

        } catch (Exception e) {
          ContributionReadException ce = new ContributionReadException(e);
          error("ContributionReadException", reader, ce);
            throw ce;
        }
    }
View Full Code Here

TOP

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

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.