Java Note 2

Source: Internet
Author: User

How to support soap

Download soap and decompress it to the corresponding directory,
Install Apache
The soap procedure is as follows:

1. Download the related configuration web server: (Tomcat is used as the Web server here)

Apache SOAP requires Apache xerces (Java) version 1.1.2 or later. It supports dom (Document Object Model) level.
2. namespace is supported. To download xerces-j-bin.1.2.0.zip to the apachewebsite, use the xercesfor version 1.2. Http://xml.apache.org/dist/xerces-j)
This file is an XML analyzer. Because the library or jar attached to the server is not used, you need to add it to classpath.
If you put xerces. jar into classpath, the Java code running in Tomcat may also find the wrong interface, because
In the shell script/batch command file that starts tomcat, xerces. jar is placed at the end of classpath.

Edit tomcat. bat in the Jakarta-Tomcat/bin directory and put xerces. jar in front of classpath.
 
Modifications made in the Jakarta-Tomcat/bin/tomcat. BAT file:

Set classpath = E:/xerces-1_2_0/xerces. jar; % classpath %; % CP %

The configuration of soap. jar is directly added to the classpath and path in the environment variable. The method is handled by j2sdk.

2. configure settings in the Web Server

For non-Tomcat servers, ie can access http: // localhost: 8080/soap /,
 
Extract the soap directory from the soap subdirectory.

If you use the Tomcat server as the configuration, there are two ways to configure it:

1. Use the context snippet
Methods: it seems that this method is not feasible (in doubt) in my experiments ),
Add a new one in the/CONF/server. xml configuration file of Tomcat.

Mark as follows:


Docbase = "E:/soap-2_0/webapps/soap"


DEBUG = "1"

Reloadable = "true">

In the docbase attribute of the context element, it is the directory for installing soap.

2. Directly copy the war file in the soap directory to the webapp directory of Tomcat and run http: // localhost: 8080/soap/
You can.

 

Start Tomcat and run startup. bat
Disable Tomcat and run shutdown. bat

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.