Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » WebService/XML/JSON/SOAP/SOA
打印话题 寄给朋友 订阅主题 |
作者 | axis+tomcat一个简单的例子出现错误!!!! |
momocha
发贴: 98 积分: 10 |
于 2003-07-15 14:02
服务类(MyService.java) public class MyService { public String serviceMethod(String arg) { return arg; } } Client.java import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.XMLType; import org.apache.axis.utils.Options; import javax.xml.namespace.QName; import javax.xml.rpc.ParameterMode; public class Client { public static void main(String [] args) { try { String endpointURL ; endpointURL="http://202.119.192.102:8080/axis/services/MyService"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress("http://202.119.192.102:8080/axis/services/MyService"); call.setOperationName( "serviceMethod" ); call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING ); String ret = (String) call.invoke( new Object[] { "textToSend" } ); System.out.println("You typed : " + ret); } catch (Exception e) { System.err.println(e.toString()); } } } Deploy.wsdd <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="MyService" provider="java:RPC"> <parameter name="className" value="MyService"/> <parameter name="allowedMethods" value="*"/> </service> </deployment> 用 java org.apache.axis.client.AdminClient deploy.wsdd 服务配置成功~~~~ 但是执行 java Client 时提示错误如下: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/clien t/Service at Client.main(Client.java:14) 也就是client.java中的 Service service = new Service(); 出错!!!请指教~~~~~ Windows环境下的tomcat + apache配置(绝对实践操作版) |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
12258 | axis+tomcat一个简单的例子出现错误!!!! | momocha | 1761 | 2003-07-15 14:02 |
9412 | Re:axis+tomcat一个简单的例子出现错误!!!! | andiyang | 6 | 2003-07-22 09:21 |
10415 | Re:axis+tomcat一个简单的例子出现错误!!!! | momocha | 201 | 2003-07-22 19:35 |
10013 | Re:axis+tomcat一个简单的例子出现错误!!!! | wch3116 | 112 | 2003-07-23 14:05 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |