Accessing a rest web service using http get, Contract-first approach – HP Integrity NonStop J-Series User Manual

Page 336

Advertising
background image

The following output is displayed on the console.

<ns:c2fConvertionResponse
xmlns:ns="http://ws.apache.org/axis2">
<ns:return>39.2</ns:return>
</ns:c2fConvertionResponse>
<ns:f2cConvertionResponse
xmlns:ns="http://ws.apache.org/axis2">
<ns:return>-15.555555555555555</ns:return>
</ns:f2cConvertionResponse>

Figure 124

shows the output in the console.

Figure 124 Console

Accessing a REST Web Service using HTTP GET

You can access the Axis2/Java based web services using HTTP GET. The generic REST based URL
format to access a web service is:

http://<IP Address of the iTP WebServer>:<port#>/<servlet directory>/axis2/services/<Service name>/<Method
name
>?<service parameters>=<paameter value>

Figure 125

shows the address format to access the TemperatueConverter web service using the

REST method.

Figure 125 Java Eclipse SDK - Options

Contract-First approach

This section describes the steps to develop, set up, deploy, and run the TemperatureConverter web
service and its client, using Contract-First approach. The following tasks are described:

1.

“Developing the TemperatureConverter Web Service on Windows” (page 337)

2.

“Deploying the TemperatureConverter Web Service on NonStop” (page 339)

3.

“Running the TemperatureConverter Web Service on NonStop” (page 340)

4.

“Developing the TemperatureConverter Client on Windows using the Eclipse Galileo IDE”
(page 342)

5.

“Modifying the Client Stub File” (page 344)

6.

“Running the TemperatureConverter Client on Windows” (page 345)

336 Getting Started with Axis2/Java

Advertising
This manual is related to the following products: