J2EE Validators
This table lists the validators that are available for the different project types and gives a brief description of each validator.
Validator name Description Application Client Validator The Application Client Validator validates the following Application Client project resources:
- Deployment descriptor (application-client.xml)
- EJB references
- Resource references
DTD Validator The DTD validator determines whether the current state of a DTD is semantically valid. XML files are validated according to the the XML specification Extensible Markup Language (XML) 1.0 from the W3C Web site. As well, the DTD validator checks for errors such as references to entities and elements that do not exist. EAR Validator The EAR Validator validates the following:
- EAR deployment descriptor (application.xml)
- EJB references of all module projects in the enterprise application project
- Security roles
- Resource references
- Manifest files for all contained or referenced modules and utility JAR files
- Target server consistency between the enterprise application project and any utility and module projects
- Existence of projects for each module defined in enterprise application
Note that the EAR Validator only ensures the validity and dependency of the module projects with respect to the enterprise application project.
EJB Validator The EJB Validator verifies that enterprise beans contained in an EJB project comply with the Sun Enterprise JavaBeans Specifications (1.1, 2.0, and 2.1), depending on the level of the bean. Code validation for the EJB 1.0 specification is not supported. Specifically, the EJB Validator validates the following resources:
- Java .class files that are members of an enterprise bean (home interface, remote interface, enterprise bean class, and, if the bean is an entity bean, the key class)
- ejb-jar.xml
- ibm-ejb-jar-ext.xmi (associations, finders, and WebSphere component inheritance)
This validator is not available in Rational Web Developer.
Connector Validator The Connector validator checks for invalid J2EE specification levels in connector projects. EJB XML Validator The EJB XML validator is a specialized form of the XML validator. It checks for well-formed and valid XML. The EJB XML differs from the XML validator in its treatment of the ejb-jar.xml file. During development, the EJB XML Validator validates ejb-jar.xml only if at least one bean exists; before deployment ejb-jar.xml is always validated. HTML Syntax Validator The HTML Syntax Validator validates HTML basic syntax and HTML DTD compliance in the following Web project resources:
- HTML files
- JSP files
JSP Validator The JSP Validator validates JSP files in a project by translating them into the corresponding Java code and then checking the Java code for compile errors. JSR-109 Web Services Validator The JSR-109 validator examines Web services deployment descriptors in J2EE modules and measures their compliance to major rules of the JSR-109 v1.0 specification. The validator examines:
- References to WSDL files
- References to JAX-RPC mapping files
- References to Web module deployment descriptors (web.xml)
- References to EJB module deployment descriptors (ejb-jar.xml)
- Correct configuration of Web modules (web.xml) containing Web services
- Correct configuration of EJB modules (ejb-jar.xml) containing Web services
The Web services deployment descriptors, webservices.xml file, webservicesclient.xml file, and the JAX-RPC mapping file are defined by JSR-109, "Web Services for J2EE, Version 1.0", available at http://jcp.org/aboutJava/communityprocess/final/jsr109/index.html.
Map Validator Validates any EJB to RDB maps that are contained in an EJB project. This validator is not available in WebSphere Studio Site Developer.
Static Web and Publishing Servers Configuration Validator The Static Web and Publishing Servers Configuration Validator verifies that:
- The projects defined in the configuration of the Static Web Publishing Server or J2EE Publishing Server exist in the workbench
- The Alias path defined in the Static Web Publishing Server configuration is being used by a static web project in the workbench
Struts Configuration File Validator The Struts Configuration File Validator validates configured Struts configuration files according to the description provided by the struts-config.dtd file. This validator catches additional semantic errors that a staight XML validation against the DTD cannot catch, for example:
- contents of a CDATA block (for example %Integer ENTITY)
- dependent attributes within an element definition
- duplicate element definitions
WAR Validator The WAR Validator validates the following web project resources:
- Deployment descriptor (web.xml)
- Servlets
- Security roles
- Servlet & servlet mappings
- EJB references
WebSphere Server Configuration Validator The WebSphere Server Configuration Validator validates server configuration files that are contained in a server project by:
- Checking the syntax of the server configuration file against the rules that are defined by the configuration model in WebSphere Application Server.
- Checking whether the project defined in the server configuration file is consistent with the resources defined in the workbench.
Note that automatic code validation is not supported for the WebSphere Server Configuration Validator in this release.
WSDL Validator The WSDL validator checks the following in WSDL files:
- XML syntax
- XML Schema types in the <types> section
- Referential integrity of the various constructs in WSDL
The validator also includes an extension point to allow other validators to be plugged into the WSDL validation to provide additional verification of the WSDL file. Through this mechanism, interoperability is checked by validating a WSDL file against WS-I Profiles.
This validator is not available in WebSphere Studio Site Developer.
WS-I Message Validator WS-I Message validator checks SOAP messages against WS-I Profiles. A user can capture and verify SOAP messages using the TCP/IP Monitor. The validator checks a message log that is saved as a project resource (.wsimsg). The log conforms to a format as specified by WS-I. XML Schema Validator The XML schema validator determines whether the current state of an XML schema file is semantically valid. XML schemas are validated according to the XML Schema specification XML Schema Part 1: Structures from the W3C Web site. XML Validator The XML validator ensures that an XML file is well-formed. It also verifies if an XML file is valid - that is, it follows the constraints established in the DTD or XML schema the XML file is associated with. XSL Validator The XSL validator ensures that the XSL file is well-formed. It tries to detect any static errors, that is, an error that can be detected in a style sheet before execution starts.
Parent topic
Validating code in enterprise applications
Related tasks
Validating code in enterprise applications
Related reference
Common validation errors and solutions