在Tomcat中部署Axis搭建SOAP环境
几个下载地址:
- Axis:http://www.apache.org/dyn/closer.cgi/ws/axis/1_4
- XML解析器xerces-j:http://archive.apache.org/dist/xml/xerces-j/
- JavaMail API:http://java.sun.com/products/javamail/downloads/index.html
- JavaBeans Activation Framework (JAF):http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html
搭建步骤:
- 将Axis的压缩包解压后webapps目录下的axis目录拷贝到Tomcat的webapps目录下,
- 将xerces-j解压后得到的jar包放入Tomcat/webapps/axis/WEB-INF/lib目录下,
- 如果要支持JWS(临时发布,由Axis自动编译部署,即下文中用到的),要将jdk的tools.jar也拷贝进该目录。
- 同时配置环境变量,CLASSPATH中加上该目录下的所有jar包。
- 将JavaMail和JAF解压后的jar包拷到JDK的lib目录下和tomcat的lib目录下。
- 启动Tomcat,此时应可以看到axis的目录并能正常访问。
- 下面编写一个WebService程式HelloWorld.jws,并将之放入axis的目录下(会被axis自动编译部署):
- 编写测试程式,在eclipse中创建一个项目,导入axis的lib目录下的所有jar包,新建TestClient类,代码如下:
-
import java.net.MalformedURLException;
-
import java.net.URL;
-
import java.rmi.RemoteException;
-
-
import javax.xml.rpc.ServiceException;
-
-
import org.apache.axis.client.Call;
-
import org.apache.axis.client.Service;
-
-
public class TestClient {
-
-
String url = "http://localhost:8080/axis/HelloWorld.jws";
-
Service service = new Service();
-
Call call = (Call) service.createCall();
-
call.setOperationName("sayHelloWorld");
-
}
-
-
try {
-
new TestClient().doTest("YOYO");
-
e.printStackTrace();
-
e.printStackTrace();
-
} catch (ServiceException e) {
-
e.printStackTrace();
-
}
-
}
-
-
}
-
- 运行该程式,若能得到正确的运行结果("YOYO, Hello World!")即说明成功搭建了一个SOAP环境。
2022年10月03日 16:25
ICICI Bank balance enquiry can also be made through a missed call. To use the missed call services, register for ICICI Bank missed call banking by send. ICICI Bank balance enquiry can also be made through a missed call. To use the missed call services, register for ICICI Bank missed call banking by send. icici balance check number CICI Bank Balance Enquiry Using Toll free number. Dial 9594612612 or 022-?30256767 from your mobile number. After 2-3 rings, the call will get disconnected.CICI Bank Balance Enquiry Using Toll free number. Dial 9594612612 or 022-?30256767 from your mobile number. After 2-3 rings, the call will get disconnected.ICICI Bank balance enquiry can also be made through a missed call. To use the missed call services, register for ICICI Bank missed call banking by send. CICI Bank Balance Enquiry Using Toll free number. Dial 9594612612 or 022-?30256767 from your mobile number. After 2-3 rings, the call will get disconnected.