JAX-RPC - Valid candidate for JAX-RPC Conversion Tool

Validation from the JAX-RPC Conversion Tool has determined a JAX-RPC web service in this scan is a good candidate for binary conversion to JAX-WS using the JAX-RPC Conversion Tool. This rule flags the use of any JAX-RPC specific packages and configuration files. Also, this rule will flag any use of the jaxrpc-mapping-file tag in XML mapping files. The following table lists Java packages, configuration files and XML mapping files impacted by this rule:

Packages

Configuration Files

XML Mapping Files

  • javax.xml.rpc
  • javax.xml.rpc.encoding
  • javax.xml.rpc.handler
  • javax.xml.rpc.handler.soap
  • javax.xml.rpc.holders
  • javax.xml.rpc.server
  • javax.xml.rpc.soap
  • ibm-webservices-ext.xmi
  • ibm-webservices-bnd.xmi
  • ibm-webservicesclient-ext.xmi
  • ibm-webservicesclient-bnd.xmi
  • ws-security.xml
  • webservices.xml
  • web.xml
  • ejb-jar.xml
  • ibm-webservicesclient-bnd.xmi
  • application.xml

The Java API for XML-based RPC (JAX-RPC) is not supported on Liberty or Liberty Core. The technology is deprecated in WebSphere Application Server traditional V9.0 and might be removed in a later version. The strategic migration path is to use JAX-WS. The relative effort will change based on the the chosen migration path:

The following table compares the four options according to factors that might affect your project.

Project Factors

Option 1

Migrate JAX-RPC web services to JAX-WS web services using the JAX-RPC Conversion Tool

Option 2

Migrate JAX-RPC web services to JAX-WS web services manually

Option 3

Using the Apache Axis 1 JAX-RPC engine on Liberty

Option 4

Using WebSphere Application Server traditional with its native JAX-RPC engine

Supported Solution

Yes

JAX-WS is supported as a configurable feature on all Liberty editions except Liberty Core. Download the WebSphere Liberty JAX-RPC Conversion Tool for Maven and Gradle.

Yes

JAX-WS is supported as a configurable feature on all Liberty editions except Liberty Core.

No

Axis 1 is not supported.

Yes

JAX-RPC is supported on WebSphere Application Server traditional.

Strategic Solution

Yes

JAX-WS is strategic for all Liberty editions except Liberty Core.

Yes

JAX-WS is strategic for all Liberty editions except Liberty Core.

No

Axis 1 is no longer under development.

No

JAX-RPC is deprecated on WebSphere Application Server traditional and might be removed in a later version.

Implementation Complexity

Low

The application was validated for use of the JAX-RPC Conversion Tool. The JAX-RPC services can be converted into JAX-WS webservices by the tool.

High

This option can be complex for large numbers of JAX-RPC clients and web services. Without using the JAX-RPC Conversion Tool to port JAX-RPC services to JAX-WS many changes to the code base are needed.

Low

If the application is already using Axis 1, this option is not complex. Otherwise, this option is of medium complexity.

Medium

Migrating JAX-RPC Web Services to a different engine preserves most of the code base.

Advanced Features

Yes

JAX-WS provides many advanced features such as Annotations, JAXB Binding, and SOAP 1.2.

Yes

JAX-WS provides many advanced features such as Annotations, JAXB Binding, and SOAP 1.2.

No

JAX-RPC lacks many of the advanced features that are in JAX-WS.

No

JAX-RPC lacks many of the advanced features that are in JAX-WS.

Specification Compliance

Yes

Yes

Yes

Although JAX-RPC is still part of Java EE specification, it is deprecated with Java EE 6.

Yes

Although JAX-RPC is still part of Java EE specification, it is deprecated with Java EE 6.

Recommendation

Use this option if the application meets the requirements of the JAX-RPC Conversion Tool.

Use this option if you have a few JAX-RPC web services and the application does not meet the requirements of the JAX-RPC Conversion Tool.

Use this option if your JAX-RPC web services already run on Axis 1.

Use this option if your JAX-RPC web services already run on WebSphere Application Server traditional, or if you have many JAX-RPC web services that do not already run on Axis 1.

Migrate JAX-RPC web services to JAX-WS web services using the JAX-RPC Conversion Tool

Download the JAX-RPC Conversion tool from WebSphere Liberty JAX-RPC Conversion Tool for Maven and Gradle.

For information on migrating applications from JAX-RPC to JAX-WS using the JAX-RPC Conversion tool, see Migrating JAX-RPC applications to Liberty by using Maven or Migrating JAX-RPC applications to Liberty by using Gradle in the online documentation.

Migrate JAX-RPC web services to JAX-WS web services manually

For information on migrating applications from JAX-RPC to JAX-WS, see Web services migration scenarios: JAX-RPC to JAX-WS and JAXB in the online documentation.

For more information on the differences between JAX-RPC and JAX-WS, see JAX-WS application deployment model.

Using the Apache Axis 1 JAX-RPC engine on Liberty

If you already use Axis 1, to use it on Liberty you must include the Axis 1 libraries in the Liberty class path.

If you use an embedded JAX-RPC, you can convert your web services to use Axis 1. The following procedure describes how to migrate a web service from Red Hat JBoss to Axis 1.

  1. Download the Axis 1.0 libraries from the Apache website.
    Note: Axis 2.0 uses JAX-WS and does not support JAX-RPC web services.
  2. Include the Axis libraries in the class path. You can include the libraries either in the server class path or in the WEB-INF/lib directory of the application.
  3. Remove the reference to the web service from the web.xml file.
  4. Add the Axis Admin servlets to the web.xml file. For examples of the web.xml file, see Advanced Installation: adding Axis to your own Webapp on the Apache website.
  5. Regenerate the web services from the WSDL file using the following command:

       java -cp <AXIS LIBRARIES> org.apache.axis.wsdl.WSDL2Java -t    java -cp <AXIS LIBRARIES> org.apache.axis.wsdl.WSDL2Java -t -s -o <Output directory> <WSDL file>

    For more information about this command, see WSDL2Java Reference on the Apache website.

  6. Create an Axis deployment descriptor by creating an XML file called server-config.wsdd in the WEB-INF directory.

    For more information about WSDD configuration elements, see Deployment (WSDD) Reference on the Apache website.

  7. Modify the client code to fit the new environment. Because the server is not used as a container, JNDI references cannot be used. JNDI references must be removed and replaced with direct references to the URL.

    For example, the following method has a JNDI lookup:


    public DemoType getService() throws Exception {

    javax.naming.InitialContext ctx = new javax.naming.InitialContext();

    DemoService service = (DemoService)ctx.lookup("java:comp/env/service/Demo");

    return service.getDemoService();
    }

    The lookup must be replaced:

    private com.ibm.demo.webservices.server.DemoType getService() throws Exception {

    com.ibm.demo.webservices.server.DemoService_ServiceLocator service = new com.ibm.demo.webservices.server.DemoService_ServiceLocator();

    com.ibm.demo.webservices.server.DemoType demoType = service.getDemoService();

    return demoType;

    }

Use WebSphere Application Server traditional with its native JAX-RPC engine

If you want to use the WebSphere Application Server JAX-RPC engine, then you must use WebSphere Application Server traditional. Liberty does not support JAX-RPC. If you want to use Liberty, you must choose one of the other options.

Configuration Only

If JAX-RPC configuration files are detected, but there is no detected use of the JAX-RPC Java API within this application, the configuration files might be from a previous use of the JAX-RPC technology which is no longer needed. Unused configuration can be removed.