Package org.apache.cxf.tools.common

Examples of org.apache.cxf.tools.common.ToolException


        try {
            locURI = new URI(uri);
        } catch (URISyntaxException e) {
            Message msg = new Message("BINDING_LOC_ERROR",
                                      LOG, new Object[] {uri});
            throw new ToolException(msg);
        }

        if (!locURI.isAbsolute()) {
            try {
                String base = URIParserUtil.getAbsoluteURI(bindingFile);
                URI baseURI = new URI(base);
                locURI = baseURI.resolve(locURI);
            } catch (URISyntaxException e) {
                Message msg = new Message("NOT_URI", LOG, new Object[] {bindingFile});
                throw new ToolException(msg, e);
            }

        }
        return locURI.toString();
    }
View Full Code Here


            if (resolvedLocation == null) {
                resolvedLocation = catalogResolver.resolveURI(url);
            }
        } catch (Exception e1) {
            Message msg = new Message("FAILED_RESOLVE_CATALOG", LOG, url);
            throw new ToolException(msg, e1);
        }
        return resolvedLocation;
    }
View Full Code Here

            System.err.println("Error : " + ex.getMessage());
            System.err.println();
            if (isVerboseOn()) {
                ex.printStackTrace();
            }
            throw new ToolException(ex.getMessage(), ex.getCause());
        }      
    }
View Full Code Here

            && (doc.hasParameter(ToolCorbaConstants.CFG_IMPORTSCHEMA))) {
            errors.add(new ErrorVisitor.UserError("Options -n & -T cannot be used together"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
        }
    }
View Full Code Here

            System.err.println("Error : " + ex.getMessage());
            System.err.println();
            if (isVerboseOn()) {
                ex.printStackTrace();
            }
            throw new ToolException(ex.getMessage(), ex.getCause());
        }      
    }
View Full Code Here

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
        }
    }
View Full Code Here

                writeToIDL(def);
            }
        } catch (ToolException ex) {
            throw ex;     
        } catch (JAXBException ex) {
            throw new ToolException(ex);           
        } catch (Exception ex) {
            throw new ToolException(ex);
        }               
    }
View Full Code Here

    private void writeToWSDL(Definition def) throws ToolException {
        try {
            WSDLUtils.writeWSDL(def, outputdir, wsdlOutput);
        } catch (Throwable t) {
            Message msg = new Message("FAIL_TO_WRITE_WSDL", LOG);
            throw new ToolException(msg, t);
        }
    }
View Full Code Here

            buildWSDLDefinition();   
        } catch (WSDLException we) {
            org.apache.cxf.common.i18n.Message msg =
                    new org.apache.cxf.common.i18n.Message(
                    "FAIL_TO_CREATE_WSDL_DEFINITION", LOG);
            throw new ToolException(msg, we);
        }
    }
View Full Code Here

    public void process() throws ToolException {
        idl = getBaseFilename(env.get(ToolCorbaConstants.CFG_IDLFILE).toString());
        try {
            parseIDL();
        } catch (Exception e) {
            throw new ToolException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.ToolException

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.