关于的axis问题

sxd78 2006-11-23 09:49:58
javac -classpath "D:\lib\axis.jar;D:\lib\jaxrpc.jar;" ServiceClient.java
编译没问题,可一运行 java ServiceClient;就提示“
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/clien
t/Service
at ServiceClient.invokeFunction(ServiceClient.java:74)
at ServiceClient.syncOrderRelation(ServiceClient.java:13)
at ServiceClient.main(ServiceClient.java:95)”

请高手多多指点!!
代码如下:

import java.rmi.RemoteException;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class ServiceClient {

public int syncOrderRelation(String MSISDN, String SPID, String ServiceID,
Integer Action, String UpdateTime, String UpdateDesc,
String terminalID, String serviceEndPoint) throws Exception {
Object result=null;
try {
Call call = this.invokeFunction("syncOrderRelation",
serviceEndPoint);
result=call.invoke(new Object[] { MSISDN, SPID, ServiceID, Action,
UpdateTime, UpdateDesc, terminalID });
} catch (Exception e) {
throw e;
}
try{
return ((Integer)result).intValue();
}catch(Exception e){
return Integer.parseInt(((String)result));
}
}

public int syncContent(String contentID, String CPID, String serviceCode, String SPID,String contentName,
String contentDesc, String contentURL, String startTime,
String endTime, Integer contentType, Integer price, Integer action,String otherInfo,
String serviceEndPoint)throws Exception{
Integer result=null;
try {
Call call = this.invokeFunction("syncContent", serviceEndPoint);
result=(Integer)call.invoke(new Object[] { contentID, CPID, serviceCode,SPID,contentName,
contentDesc, contentURL, startTime, endTime, contentType,
price, action,otherInfo});
} catch (Exception e) {
throw e;
}
return result.intValue();
}

public int SMPUseContent(String contentID, String serviceCode,
String MSISDN, String serviceEndPoint)throws Exception{
Integer result=null;
try {
Call call = this.invokeFunction("SMPUseContent", serviceEndPoint);
result=(Integer)call.invoke(new Object[] { contentID, serviceCode, MSISDN });
} catch (Exception e) {
throw e;
}
return result.intValue();
}

public int syncTerminal(String terminalID, String manufacture,
String mode, String screenSize, Integer language,
Byte serviceSupport, String version, Integer memory,
String updateDate, Integer action, String serviceEndPoint)throws Exception{
Integer result=null;
try {
Call call = this.invokeFunction("syncTerminal", serviceEndPoint);
result=(Integer)call.invoke(new Object[] { terminalID, manufacture, mode,
screenSize, language, serviceSupport, version, memory,
updateDate, action });
} catch (Exception e) {
throw e;
}
return result.intValue();
}

public Call invokeFunction(String operationName, String serviceEndPoint)
throws ServiceException {
//Service service = new Service(); //Service service = new Service();
Service service =new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(serviceEndPoint);
call.setOperationName(new QName(operationName));//设置需要调用的函数名称

return call;
}

/**
* test the client method of the class
*/
public static void main(String[] args) {

ServiceClient sc = new ServiceClient();

String endPoint = "http://127.0.0.1:8008/";

try {
// int i=sc.syncOrderRelation("13009131735", "52075", "BLANTIAN", new Integer(1), "20060927120000",
// "desc","",endPoint);

int i=sc.syncOrderRelation("13304301824", "3043152104", "813701", new Integer(1), "20060926120000",
"desc","9",endPoint);

System.out.println("result ---------------"+i);
} catch (Exception e) {
e.printStackTrace();
}
}
}
...全文
213 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
sxd78 2006-11-27
  • 打赏
  • 举报
回复
没人回答啊!!!

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧