Web Services Development: Validation

This document describes the following:


1. Understanding Web Services Project Validation

OEPE provides a validation utility for your WebLogic Web services projects that you develop in Eclipse IDE. Subject to validation are various artifacts and associations within the project, including compliance with specifications (for example, JSR-224), verification of referenced resources (for example, local and remote), and so on. The validation occurs by the means of a standard Eclipse validator that indicates errors in the Problems view, in the Project Explorer, and as markers in the source view, as Figure 1 and Figure 2 show.



Figure 1.
Errors Displayed in Project Explorer




Figure 2.
Errors Displayed in Source and Markers Views



1.1 Validated Resources

When working with Java Web services in wls.web faceted projects, you can expect the following types of errors to be validated:
  • References:

    • annotations, with the following validation notes:

      • WebService - 1) Evaluate if name is specified as an attribute, in case of explicit service endpoint interface; 2) Evaluate if wsdlLocation declared differently on service endpoint interface and service implementation; 3) Evaluate if the referenced endpoint interface has the WebService annotation; 4) Evaluate if the referenced endpoint interface is an interface.

      • WebMethod - 1) Methods are not overridden; 2) Methods are public; 3) Method return type is not XmlBeans; 4) Method parameters are not XmlBean; 5) Non-WebMethod with WebService annotations;

      • SoapBinding - RPC encoded is not supported.

      • Exclude - Evaluate methods with this annotation for exclusion from WebMethod validation.

      • BindingType - HTTPBinding specified.

      • WebServiceProvider - Attribute wsdlLocation is required for Provider-based Web service when HTTPBinding type is not specified.

  • Runtime artifacts (context path):

    • Oracle WebLogic Server-specific errors.

  • Generated artifacts in synchronization.


1.2 Configuring Project Validation

You can enable or disable validation as follows:
  • Right-click your Web services project in the Project Explorer and select Properties from the drop-down menu. This opens the Properties dialog, as Figure 3 shows.



    Figure 3.
    Properties Dialog - Validation


  • In the Properties dialog, expand the Validation node. The editor pane on the right displays all available validators whose settings you can modify (notice Web Services for WebLogic). From this pane, you can do the following:
    • enable settings specific to your project;
    • enable each particular setting;
    • enable or disable all validators from the list;
    • suspend validation;
    • configure your workspace settings: this option becomes available if you select Suspend all validators, and then click Configure Workspace Settings. This opens the expanded Preferences > Validation dialog that Figure 4 shows.



      Figure 4.
      Properties Dialog - Expanded Validation


      By clicking on Settings > ... for a particular type of validator, you can apply validation filters for this validator, as Figure 5 shows.



      Figure 5.
      Applying Validation Filters


      Note that the default validation filters enable validation of Web services within a WebLogic Web services project (for example, those with the oracle.weblogic.webservices and oracle.weblogic.webservice.clients facets).


2. Related Information