Examples of assertValid()


Examples of br.com.caelum.stella.validation.TituloEleitoralValidator.assertValid()

        ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
        ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
        TituloEleitoralValidator validator = new TituloEleitoralValidator(producer);

        try {
            validator.assertValid(value.toString());
        } catch (InvalidStateException e) {
            List<ValidationMessage> messages = e.getInvalidMessages();
            String firstErrorMessage = messages.remove(0).getMessage();
            registerAllMessages(facesContext, uiComponent, messages);
            throw new ValidatorException(new FacesMessage(firstErrorMessage));
View Full Code Here

Examples of com.iggroup.oss.restdoclet.doclet.type.Service.assertValid()

         Service service =
            new Service(identifier, multiUriMappings.get(uri), new Controller(
               controller.getType(), controller.getJavadoc(), matches));
         services.add(service);
         service.assertValid();
         JiBXUtils.marshallService(service,
            ServiceUtils.serviceFile(dirs, identifier));
         identifier++;
      }
View Full Code Here

Examples of com.iggroup.oss.restdoclet.doclet.type.Services.assertValid()

            list.addController(controller);
         }
      }

      LOG.info("Marshalling services...");
      list.assertValid();
      JiBXUtils.marshallServices(list, ServiceUtils.servicesFile(dirs));
   }

   /**
    * Packages and deploys the web-application.
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:9002/serviceWithCustomNS?wsdl");
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:9002/serviceWithCustomNS?wsdl");
        dom = XMLUtils.parse(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
}
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

    public void testGeneratedWsdlNs() throws Exception {
        URL url = new URL("http://localhost:" + PORT + "/aegisJaxWsWSDLNS?wsdl");
        Document dom = XMLUtils.parse(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertValid(
                         "//wsdl:definitions[@targetNamespace"
                         + "='http://v1_1_2.rtf2pdf.doc.ws.daisy.marbes.cz']",
                         dom);
        //should be a targetNamespace for "http://wo.rtf2pdf.doc.ws.daisy.marbes.cz"
        //as VO type specified in the SEI
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

                         "//wsdl:definitions[@targetNamespace"
                         + "='http://v1_1_2.rtf2pdf.doc.ws.daisy.marbes.cz']",
                         dom);
        //should be a targetNamespace for "http://wo.rtf2pdf.doc.ws.daisy.marbes.cz"
        //as VO type specified in the SEI
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace"
                         + "='http://wo.rtf2pdf.doc.ws.daisy.marbes.cz']",
                         dom);
    }
   
    @Test
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
        dom = XMLUtils.parse(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
   
    @Test
    public void testCollection() throws Exception {
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities.assertValid()

        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
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.