大家帮我看看,Axis最简单的例子,但是跑不通。服务器端程序:Test.jws
import java.util.*;public class Test
{
private String name="gaga"; public String getName()
{
return name;
}}客户端程序:TestWebService.java
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;public class TestWebService
{
public static void main(String args[])
{
System.out.println("Start invoking....");
try {
String endpoint = "http://localhost:8080/axis/Test.jws";
Service service = new Service();
Call call = null;
call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName("getName");
String ret = (String) call.invoke(new Object[] {});
System.out.println("return value is " + ret);
}
catch (Exception ex) {
ex.printStackTrace();
}
System.out.println("Finished the invoking.");
}
}环境:tomcat5+axis1_1
问题,为什么在Eclipse运行后,报红颜色那行出错?
谢谢大家
解决方案 »
- j2ee 配置 spring
- 浏览器在线预览问题
- struts2的过滤器和拦截器的区别是什么(探讨开始)
- ssh问题,急!!!!!!!!!!!!!!!!
- [100分求助]HPUNIX、WebLogic700环境下deploy CMP的问题
- 各位大侠救命呀!我用struts开发出问题拉!
- 我启动TOMCAT之后,怎么出现以下提示
- struts的小问题!请大家帮忙!
- [调查]大家在开发过程中一直进行单元测试工作么?
- 关于JAVA获取网页内容
- !!!!!带有文件操作的JAVA程序打包问题~!!!!!急~~~!!!!!!
- 请各位大鸟老鸟帮帮忙,谁有apache ode引擎的开发文档?急需跪求!!!主要内部框架及算法
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)μ????? AxisServlet L)(gM~[?
faultActor:
faultNode:
faultDetail:
{}string: return code: 404
<html><head><title>Apache Tomcat/5.0.24 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP????? 404 - ?????? AxisServlet ????????</h1><HR size="1" noshade><p><b>type</b> ?????????</p><p><b>?????</b> <u>?????? AxisServlet ????????</u></p><p><b>??</b> <u>The requested resource (?????? AxisServlet ????????) is not available.</u></p><HR size="1" noshade><h3>Apache Tomcat/5.0.24</h3></body></html>(404)μ????? AxisServlet L)(gM~[?
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at TestWebService.main(TestWebService.java:19)