Deploying a Java provider-mode web service in an Axis2 JVM server

You can deploy an Axis2 application as a provider mode web service in CICS® . These applications are typically generated using JAX-WS and can be hosted in a Java™ enabled pipeline.

You might want to deploy Java applications using this method for one of the following reasons:
  • You have existing investment using Axis2 Handler interfaces.
  • You want to use a CICS pipeline configuration.
Important: Axis2 JVM servers are only supported with Java 8 for CICS TS for z/OS®, Version 5.5.
Note: Axis2-style applications do not use the WEBSERVICE resources. They interact with CICS using the Axis2 programming model and therefore cannot use the some of the CICS web services support. The following services are not fully supported for Axis2-style applications:

Before you begin

You must have a Java application that is suitable for deployment in Axis2, for example a POJO application using JAX-WS. For this task, the following POJO application is used as an example:
/**
				* Simple example
				*/
				@javax.jws.WebService(targetNamespace = "com.ibm.cics.example", name = "pojoExample")
				public class TestAxis2
				{
				public String getMessage(String input)
				{
				return "CICS got this: '" + input + "'";
				}
				}

This application specifies the XML namespace that is used to generate the WSDL, and a name to associate with the web service.

The Java code for this application must be compiled, and the JAX-WS generator run, to package the application into a jar file called TestAxis2.jar . You can do this by issuing the following code:
javac TestAxis2.java
wsgen -cp . TestAxis2 -wsdl
jar -cvf TestAxis2.jar *

The JAX-WS generator also creates a WSDL document and the bindings used by Axis2.

About this task

To deploy an Axis2 web service you must create the pipeline infrastructure for your web services. When you have created the pipeline, you can create your web services. You can reuse the created pipeline for as many web services as you need. The following steps describe how to create the pipeline and web services.
Note: No WEBSERVICE resource is created or installed as part of this task.

Procedure

  1. Create the pipeline infrastructure.
    1. Create a web service infrastructure for a Java pipeline. For more information, see Creating the CICS infrastructure for a SOAP service provider.
    2. Create an Axis2 repository.
      To do this, create a copy of the supplied repository located in $CICS_HOME/lib/pipeline/repository.
    3. Add the <repository> element to your pipeline configuration file. This element must specify the name of the Axis2 repository that you created.
    4. Create and enable a PIPELINE resource.
  2. For each web service associated with the pipeline, repeat the following steps to create the web service.
    1. Deploy the Axis2 application to the Axis2 repository. For example, the jar file created in the example must be deployed to a directory called servicejars in the repository directory. You must create this directory if it does not exist.
    2. Define and install a URIMAP resource for the web service.
      The URIMAP resource must specify the URI and PIPELINE resource associated with the web service. The URI must follow the Axis2 naming conventions for URIs. The default Axis2 naming convention is: / name_of_service Service. name_of_port Port/ suffix , where name_of_service is the name of the web service in the WSDL, name_of_port is the name of the port in the WSDL and suffix is an optional suffix that you can define. For the preceding example, the following URIMAP resource could be used:
      Urimap : EXAMPLE
      Group : EXAMPLE
      STatus : Enabled
      USAge : Pipeline
      SCheme : HTTP
      POrt : No
      HOST : *
      PAth : /TestAxis2Service.pojoExamplePort/example/TestAxis2
      TRansaction : CPIH
      PIpeline : EXAMPLE
      This example assumes that the PIPELINE resource used is called EXAMPLE.

What to do next

Test that your web services run correctly.