Batch installation deployment Web Service to AXIS Server
Environment: The following software taken first: Tomcat 5.0.282.axis-1_2alpha.zip
Unfolding axis_2alpha.zip to D: / Directory, under the entire directory Copy to Tomcat's WebAPPS under WebApps. Enter http:// localhost: 8080 / axis / you can see the following screen as follows: Axis App deployment is successful:
Apache-axis
Hello! Welcome to Apache-Axis.
What do you want to do today?
Validate the local installation's configurationsee below if this does not work. View the list of deployed Web services Call a local endpoint that list's the caller's http headers (or see its WSDL). Visit the Apache-Axis Home Page Administer Axis [disabled by default for SECURITY REASONS] SOAPMONITOR [Disabled by Default for Security Reasons]
To enable the disabled features, uncomment the appropriate declarations in Web-INF / Web.xml in The WebApplication and Restart IT.
Validating Axis
If the "happyaxis" validation page displays an exception instead of a status page, the likely cause is that you have multiple XML parsers in your classpath. Clean up your classpath by eliminating extraneous parsers.
If you have problems getting axis wiwork, consult the axis wiki and dam..
Then click Validate, check if Axis can work If you have a mistake, you will prompt you less than those packages, and prompt to get these packages there, these packets are divided into two categories of Core (core) and Option (optional) I have one and Core LIB and 2 optioncore: Activation.jar
Option: xmlsec.jarmail.jar
The Internet gets these packages to the LIB of the Axis app or the Tomcat's CommON / lib restart Tomcat can see the prompts that AXIS can work.
Setting an environment variable: Be learning, you can write a file of setPath.bat, set AxisClassPath: I am in the D: / Axis directory, so the setPath file is as follows: setPath.bat
SET AXIS_HOS_LIB =% AXIS_HOME% / libset axisclasspath =% AXIS_LIB% / AXIS.JAR;% AXIS_LIB% / Commons-Discovery.jar;% AXIS_LIB% / Commons-logging.jar;% AXIS_LIB% / JAXRPC. JAR;% AXIS_LIB% / saaj.jar;% AXIS_LIB% / log4j-1.2.8.jar;% AXIS_LIB% / XML-Apis.jar;% AXIS_LIB% / XERCESIMPL.JAR Note the first line and and the second line There should be no space, otherwise it will lead to an AxisclassPath error; implement change BAT
Deploy WebService:
We are going to deploy a file for WebServic under D: / Axis / Samples, now we deploy the Application below the Stock directory under this directory.
Make sure your Tomcat is already started, and your Axis app is already in http: // localhost: 8080 / axis /
Enter the D: / Axis / Samples / Stock directory: java -cp% AxisclassPath% org.apache.axis.client.adminClient -LHTTP: // localhost: 8080 / axis / service / adminservice deploy.wsdd
If there is a mistake such as a classNotFind, check your environment variables (usually there are some spaces, or wrong words) If prompts CONNECT REFUSE, Tomcat is not started, or http: // localhost: 8080 / Axis / Services / AdminService can't work
If you have successfully deployed, you will find a file server-config.wsdd under {axis app} / web-infers, this file is the Web Service's deploy desciptor. Test deployment Web Service:
Go back to the AXIS_HOME directory, execute: java -cp.;% AXISCLASSPATH% Samples.Stock.getquote -LHttp: // localhost: 8080 / axis / servlet / axisservlet -uuser1 -wpass1 xxx
See the results as follows:
D: / axis> java -cp.;% AXISCLASSPATH% Samples.Stock.getQuote -lhttp: // localhost: 808
0 / AXIS / Servlet / AxisServlet -Uuser1 -WPass1 XXX
Log4j: warn no appenders could be found for logger (org.apache.axis.i18n.project
EsourceBundle).
Log4J: Warn Please Initialize The log4j system prot in.
XXX: 55.25
Test
Here is to integrate Axis into your own app.
Advanced Installation: Adding Axis to your OWN WebApp
If you are experienced in web application development, and especially if you wish to add web services to an existing or complex webapp, you can take an alternate approach to running Axis. Instead of adding your classes to the Axis webapp, you can add Axis to your application. The core concepts areAdd axis.jar, wsdl.jar, saaj.jar, jaxrpc.jar and the other dependent libraries to your WAR file. Copy all the Axis Servlet declarations and mappings from axis / WEB-INF / web.xml and add them to your own web.xml Build and deploy your webapp. Run the Axis AdminClient against your own webapp, instead of Axis, by changing the URL you invoke it with. The process is also covered in Chapter 15 of Java Development with Ant Which can be downloaded as a pdf file.