|
|
This rule flags any existing webservices.xml to detect the presence of a J2EE web services
deployment descriptor file for JBoss.
To generate JAX-RPC Web services based on JBoss Java Platform, Enterprise Edition (Java EE) web service deployment descriptors,
the automated fix will create an Ant script that uses the appropriate IBM Ant tasks. This involves scanning the web services deployment
descriptors and configuring the Ant script to generate the required artifacts.
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. Binary scanner detects that the IBM Ant generated file does not already exist in the root folder of the project.
Rule properties:
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
you 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 automated fix generates the Ant script, review it and add any necessary customizations.
Refer to the WebSphere Application Server documentation for guidance on customizing the
IBM Ant tasks. You must run the script using the Ant tools provided by IBM, which are
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.
|
Recommendation: Consider Migrating to JAX-WS
If you are already making changes to your JAX-RPC web services as part of your migration or modernization efforts, we strongly recommend evaluating a move to
JAX-WS (Java API for XML Web Services).
JAX-WS is the successor to JAX-RPC and offers several advantages:
- Modern API design with better support for annotations and integration with Java EE
- Improved interoperability with other web service frameworks and standards
- Better tooling and support in modern application servers and IDEs
- Long-term viability, as JAX-RPC is considered a legacy technology
Migrating to JAX-WS now can reduce future technical debt and align your application with current Java web service standards.
For guidance on migrating from JAX-RPC to JAX-WS, refer to the
Web services migration scenarios: JAX-RPC to JAX-WS and JAXB documentation.