Deploying a Java Class as a Web Service - XML

Next, you need to deploy a Java class as an Axis-based Web service.

To deploy this credit card validation Web service, just copy the file to the TOMCAT_HOME\webapps\axis directory and change its extension from .java to .jws. Doing this deploys the Web service so that it is ready for use. As you can see, deploying a Web service does not require a change in the code.

When a client application invokes a service as deployed in the preceding manner, the Axis SOAP toolkit automatically locates the file, compiles the class, and converts SOAP calls to your Java service class.

It is important to note that the service name corresponds to the name of the .jws file. Therefore, when the .jws file is requested, the Web server invokes the Axis engine, a servlet that is located in the TOMCAT_HOME\ webapps\ axis\ WEB-INF directory.

Whenever Tomcat or any J2EE-compliant Web server encounters a .jws file in the Axis context, it invokes the AxisServlet. The AxisServlet then invokes the corresponding .jws file.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

XML Topics