Do not use JBoss web services deployment descriptor
This rule flags any existing webservices.xml to detect the presence of a J2EE web services deployment descriptor file for JBoss. In the source scanner, the quick fix produces an Ant script with specific IBM Ant tasks. Those tasks generate JAX-RPC Web services based on JBoss Java Platform, Enterprise Edition (Java EE) web service deployment descriptors. The quick fix scans the web services deployment descriptors and produces an Ant script.

Conditions for triggering the rule:
This rule detects the presence of JAX-RPC web services based on the following criteria:
a. The presence of the J2EE web services deployment descriptor file webservices.xml
b. In the source scanner it detects that the IBM Ant generated file does not already exist in the root folder of the project.

Rule properties:
The properties within this rule only affect the quick fix. You must provide correct values for the rule properties. To change the values of the properties for this rule, select the rule in the Software Analyzer Configurations window. Then use the fields in the Properties tab. The properties for this rule are:
  • Generated Ant script Name
    This is the name of the new Ant script that will be generated.  The file name must be a valid file name.  The value must not include any forward or backward slashes.  The generated file will be in the root folder of the project.
    Default value: build-ibm-ws.xml

  • Generation Folder Name :
    This is the name of the folder in which generated artifacts are placed.   The value must not include any forward or backward slashes.  The generation folder is in the root folder of the project.
    Default value: ibm-ws-gen

Ant classpath:
The ant class path is calculated from the Eclipse project.  It is important to verify that all the elements necessary for compilation are on the Eclipse class path.

JAX-RPC services defined in webservices.xml file
Based on the information and type of services defined in the webservices.xml file, an Ant script is generated to reproduce the JAXRPC Service.

  • Generated Ant Targets:
    The generated Ant script contains targets to generate the WSDL file and the JAX-RPC service.
    The WSDL generation target is only generated if the quick fix cannot locate the WSDL file as defined in the element <wsdl-file>.
    The WSDL generation tagret (if created) has the name: genWSDL_ssss where ssss is the name of the service as defined in the element, <webservice-description-name>.
    The Service generation targets have the name, genService_pppp, where pppp is the name of port as defined by the element, <port-component-name>.

IBM WebSphere Application Server Ant tasks
IBM WebSphere(R) Application Server includes Ant tasks like java2wsdl and wsdl2java to generate the necessary artifacts for JAX-RPC services.  The generated Ant script uses these tasks to build the service. Additional information on these tasks can be obtained from the WebSphere Application Server documentation.

Running the Ant script
After the quick fix produces the Ant script, view the script, and add additional customizations if necessary. Consult the WebSphere Application Server documentation for additional customization for the IBM Ant tasks. You must run the script using the Ant tools provided by IBM that is included with IBM WebSphere Application Server.  The IBM Ant script can be run from:
  • WAS_HOME\bin\ws_ant.bat on Windows(R) operating systems
  • WAS_HOME\bin\ws_ant.sh on UNIX(R) operating systems
Example: c:\IBM\AppServer\bin\ws_ant.bat -f c:\eclipse\MyProject\ibm-ws-gen.xml genService_TestService

When the Ant targets are run, the produced artifacts reside in the generation folder.  You can inspect the generated code, deployment descriptors, and then add these artifacts to their modules.