Creating an axis2/java aar file – HP Integrity NonStop J-Series User Manual

Page 321

Advertising
background image

Axis2/Java has a set of built-in MessageReceivers. Some of them can handle only the XML-In
and XML-Out scenario, and these are called RawXML MessageReceivers. There are other
message receivers called RPC MessageReceivers that can handle JavaBeans, simple Java types,
and XML. The RPC MessageReceivers message receiver is used for the sample
TemperatureConverter web service.

To create the deployment descriptor, complete the following steps:

1.

Create a new directory named META-INF in the <My SASH
Home
>\axis2\gettingstarted\TemperatureConverter

directory on your Windows

system.

2.

Create the services.xml in META-INF directory (using any text editor) on your Windows
system. If you do not want to create your own deployment descriptor file, you can use the
following lines of code to create your services.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup>
<service name="TemperatureConverter">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass">TemperatureConverter</parameter>
<parameter name="useOriginalwsdl">false</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<operation name="f2cConversion"
mep="http://www.w3.org/ns/wsdl/in-out"
namespace="http://ws.apache.org/axis2">
<actionMapping>urn:f2cConversion</actionMapping>
<outputActionMapping>
http://TemperatureConverterPortType/f2cConversionResponse
</outputActionMapping>
</operation>
<operation name="c2fConversion"
mep="http://www.w3.org/ns/wsdl/in-out"
namespace="http://ws.apache.org/axis2">
<actionMapping>urn:c2fConversion</actionMapping>
<outputActionMapping>
http://TemperatureConverterPortType/c2fConversionResponse
</outputActionMapping>
</operation>
</service>
</serviceGroup>

Creating an Axis2/Java AAR File

An Axis2/Java AAR file contains the compiled code of the service implementation class, and
the services.xml file. You can use the JAR utility to create the AAR file for TemperatureConverter.

To create an Axis2/Java AAR file, complete the following steps:

1.

Go to the <My SASH Home>\axis2\gettingstarted\TemperatureConverter
directory using the command:

command prompt> cd <My SASH Home>\axis2\gettingstarted\TemperatureConverter

2.

Create the AAR archive using the command:

command prompt> jar -cvf TemperatureConverter.aar *.class META-INF

The TemperatureConverter.aar file is created in the TemperatureConverter directory.

Deploying the TemperatureConverter Web Service on NonStop

To deploy the TemperatureConverter.aar) file on your NonStop system, complete the following
steps:

Overview of TemperatureConverter

321

Advertising
This manual is related to the following products: