Package org.apache.woden

Examples of org.apache.woden.ErrorInfo


                            String message,
                            short severity,
                            Exception exception)
    throws WSDLException
    {
        ErrorInfo errorInfo =
            new ErrorInfoImpl(errLoc, errorId, message, exception);

        ErrorHandler eh =
            (fErrorHandler != null) ? fErrorHandler : fDefaultErrorHandler;
       
        if(severity == SEVERITY_WARNING) {
            eh.warning(errorInfo);
        }
        else if(severity == SEVERITY_ERROR) {
            eh.error(errorInfo);
        }
        else if(severity == SEVERITY_FATAL_ERROR) {
            eh.fatalError(errorInfo);
           
            // Fatal error strategy is to terminate with a WSDLException.
           
            if(exception == null) {
                throw new WSDLException(WSDLException.INVALID_WSDL,
                        "Fatal WSDL error:\n" + errorInfo.toString());
            }
            else if(exception instanceof WSDLException) {
                throw (WSDLException)exception;
            }
            else {
View Full Code Here


       
        write(SUCCESS, success);
       
        for(int i = 0; i < errorInfos.size(); i ++) {
           
            ErrorInfo errorInfo = (ErrorInfo) errorInfos.elementAt(i);
            String severity = (String) severities.elementAt(i);
           
            write(severity, errorInfo);
        }
       
View Full Code Here

    public void testInvalidValue() throws Exception
    {
        String attrVal = "#rubbish";
        attr = new IntOrTokenAnyAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL512");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL512' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL512",
                errInfo.getKey());
       
        assertFalse("isValid() should return false", attr.isValid());
        assertFalse("isInt() should return false", attr.isInt());
        assertFalse("isToken() should return false", attr.isToken());
        assertNull("getInt() should return null", attr.getInt());
View Full Code Here

    public void testNullValue() throws Exception
    {
        String attrVal = null;
        attr = new IntOrTokenAnyAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL512");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL512' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL512",
                errInfo.getKey());
       
        assertFalse("isValid() should return false", attr.isValid());
        assertFalse("isInt() should return false", attr.isInt());
        assertFalse("isToken() should return false", attr.isToken());
        assertNull("getInt() should return null", attr.getInt());
View Full Code Here

    public void testNullValue() throws Exception
    {
        String attrVal = null;
        attr = new TokenAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL508");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL508' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL508",
                errInfo.getKey());
       
        assertNull("Attribute value is not null", attr.getToken());
        assertFalse("Attribute value should not be valid", attr.isValid());
    }
View Full Code Here

TOP

Related Classes of org.apache.woden.ErrorInfo

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.