怎么没人回答,高手呢????
解决方案 »
- java 无类型常量。求解
- java.lang.IllegalStateException: Folder is not Open
- Spring的小问题
- 关于 http 请求信息中的Attribute的问题
- Struts中的form有个属性per,怎么限制它只能输入数字
- 图片循环显示如何实现?
- 用jdom操作xml文件的问题.
- 在练习spring AOP开发的时候,出现下面的异常 是怎么回事啊
- 基于plusgantt的项目管理系统实战开发教程
- socket的shutdownInput和shutdownOutput是干嘛用的?什么情况必须用?
- 高分求资料.本人初学struts,求struts标签学习资料.
- 急问:EJB中使用Hibernate抛出AccessControlException: access denied的问题?
write down your class and then rename yourclass.jws,
put down your.jws in root of directory/*
Publishing Web Services with Axis
Let's say we have a simple class like the following:
public class Calculator {
public int add(int i1, int i2)
{
return i1 + i2;
}
public int subtract(int i1, int i2)
{
return i1 - i2;
}
}
(You'll find this very class in samples/userguide/example2/Calculator.java.)
How do we go about making this class available via SOAP? There are a couple of answers to that question, but we'll start with the easiest way Axis provides to do this, which takes almost no effort at all! JWS (Java Web Service) Files - Instant Deployment
OK, here's step 1 : copy the above .java file into your webapp directory, and rename it "Calculator.jws". So you might do something like this:
% copy Calculator.java <your-webapp-root>/axis/Calculator.jws
Now for step 2... hm, wait a minute. You're done! You should now be able to access the service at the following URL (assuming your Axis web application is on port 8080):
http://localhost:8080/axis/Calculator.jws */so maybe I feel like you'd better refer to Axis' documents.