2 qq 22026443 qq_22026443 于 2014.10.23 17:16 提问

ubuntu系统远程调用win7系统上发布的webservice

我在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)

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!