我在win7系统64位的电脑上发布了一个webservice,使用的是MyEclipse自带的xfire,在Ubuntu系统上使用Eclipse调用这个webservice(Client),总是报错怎么解决?
测试代码:public class test {
public static void main(String[] args) throws MalformedURLException, Exception {
System.out.println("-------开始测试-------");
Client client = new Client(new URL("http://192.168.1.56:8080/SMSWebService/services/SMSService?wsdl"));
Object[] results = client.invoke("sendMessage",new Object[]{"手机号","您好,欢迎使用短信猫发送短消息测试...."});
System.out.println(results[0]);
System.out.println("------结束测试------");
}
}
Console控制台报错:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaComplexType.getAttributes()Lorg/apache/ws/commons/schema/XmlSchemaObjectCollection;
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.hasAttributes(WSDLServiceBuilder.java:662)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.isWrapped(WSDLServiceBuilder.java:582)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLServiceBuilder.java:392)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.build(WSDLServiceBuilder.java:195)
at org.codehaus.xfire.client.Client.initFromDefinition(Client.java:264)
at org.codehaus.xfire.client.Client.(Client.java:236)
at org.codehaus.xfire.client.Client.(Client.java:246)
at com.actionsoft.apps.sms.smslib.test.main(test.java:17)