Examples of ContributionReadException


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

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

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

                                        }
                                    }
                          }
                        }
                      } catch (Exception e) {
                        throw new ContributionReadException(e);
                      }
                    }
                }
            }           
            //Read inline schemas
            readInlineSchemas(wsdlDef, definition, context);
        } catch (WSDLException e) {
            throw new ContributionReadException(e);
        } catch (XMLStreamException e) {
            throw new ContributionReadException(e);
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }
    }
View Full Code Here

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

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

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

                artifact.setURI(uri);
                artifact.setLocation(file.toURI().toURL().toString());

                artifacts.add(artifact);
            } catch (MalformedURLException e) {
                throw new ContributionReadException(e);
            }
        }

        contribution.getTypes().add(getContributionType());
        return artifacts;
View Full Code Here

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

        // [rfeng] There are cases that the folder contains symbolic links that point to the same physical directory
        Set<File> visited = new HashSet<File>();
        try {
            traverse(artifacts, directory, directory, visited);
        } catch (IOException e) {
            throw new ContributionReadException(e);
        }

        return artifacts;
    }
View Full Code Here

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

        URI uri = null;
        try {
            uri = new URI(contribution.getLocation());
            file = new File(uri);
        } catch (URISyntaxException e) {
            throw new ContributionReadException(e);
        } catch(IllegalArgumentException e) {
            // Hack for file:./a.txt or file:../a/c.wsdl
            return new File(uri.getPath());
        }
        if (!file.exists() || !file.isDirectory()) {
            throw new ContributionReadException(contribution.getLocation());
        }
        return file;
    }
View Full Code Here

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

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

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

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

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

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

            return contribution;

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

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

                if (reader.hasNext()) {
                    reader.next();
                }
            }
        } catch (XMLStreamException e) {
            ContributionReadException ex = new ContributionReadException(e);
            error(context.getMonitor(), "XMLStreamException", reader, ex);
        }

        return contribution;
    }
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.