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 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突