Quick Review:Ajax
Developing Simple Web Service

Within service element there is parameter element, which specifies the name of the java class as a web service implementation. In the above example, parameter element with name attribute as “ServiceClass” is provided the name of the java class “examples.axis2.HelloWorldService” with full path.

Within service element there is another element <operation>, which specifies the name of operation i.e. the name of the method created in the web service implementation class. This element has child element <messageReceiver> which specifies the message receiver that is to be used for that operation. In the above example, we have set the name of the operation as “sayHello”.

Step 4: Create the Web Service Archive: (HelloWorldService.aar)

Next step for developing web service with Axis2 is to create “.aar” (Axis Archive) file. For our example, we have created “HelloWorldService.aar”.

In the above steps we have created two files:

  1.” file in “examples\axis2” folder and
  2. “services.xml” in “META-INF” folder.

Now create .aar file we can use jar tool in command prompt. Navigate to the path in the command prompt where these above two folders have been saved and run the following command:

Jar cvf HelloWorldService.aar META-INF sample

This will create “HelloWorldService.aar” file in the current directory.

May 2008 | Java Jazz Up | 18
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

, 31, 32, 33, 34, 35, 36, 37 Download PDF