qq_22026443 2014-10-23 09:16
浏览 1224

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)

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog