Search in sources :

Example 1 with FailureLocation

use of org.apache.cxf.tools.validator.internal.model.FailureLocation in project cxf by apache.

the class WSDLRefValidator method isValid.

public boolean isValid() {
    try {
        loadServices();
        collectValidationPoints();
        List<Document> wsdlDocs = getWSDLDocuments();
        for (XNode vNode : vNodes) {
            if (!isExist(wsdlDocs, vNode)) {
                // System.out.println("Fail: " + vNode.getXPath());
                FailureLocation loc = getFailureLocation(wsdlDocs, vNode.getFailurePoint());
                vResults.addError(new Message("FAILED_AT_POINT", LOG, loc.getLocation().getLineNumber(), loc.getLocation().getColumnNumber(), loc.getDocumentURI(), vNode.getPlainText()));
            }
        }
    } catch (Exception e) {
        this.vResults.addError(e.getMessage());
        return false;
    }
    return vResults.isSuccessful();
}
Also used : FailureLocation(org.apache.cxf.tools.validator.internal.model.FailureLocation) XMessage(org.apache.cxf.tools.validator.internal.model.XMessage) Message(org.apache.cxf.common.i18n.Message) XNode(org.apache.cxf.tools.validator.internal.model.XNode) Document(org.w3c.dom.Document) URISyntaxException(java.net.URISyntaxException) ToolException(org.apache.cxf.tools.common.ToolException)

Aggregations

URISyntaxException (java.net.URISyntaxException)1 Message (org.apache.cxf.common.i18n.Message)1 ToolException (org.apache.cxf.tools.common.ToolException)1 FailureLocation (org.apache.cxf.tools.validator.internal.model.FailureLocation)1 XMessage (org.apache.cxf.tools.validator.internal.model.XMessage)1 XNode (org.apache.cxf.tools.validator.internal.model.XNode)1 Document (org.w3c.dom.Document)1