無聊人士

          搬家==》www.soapui.cn

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            32 隨筆 :: 0 文章 :: 60 評論 :: 0 Trackbacks

          很簡單,就幾個jar包

          1 groovy-all- 1.0 -jsr- 05 .jar
          2 groovysoap-all- 20060503 .jar
          3 activation.jar
          4 log4j- 1.2.13 .jar
          5 mail.jar

          拿以前HelloXfire時的Echo接口做測試,代碼少得可憐

          ?1 import ?groovy.net.soap.SoapClient
          ?2
          ?3 class ?HelloGroovy? {
          ?4
          ?5 ?? static ? void ?main(args)? {
          ?6 ????def?proxy? = ? new ?SoapClient( " http://localhost:8080/query/EchoService?wsdl " );
          ?7 ????System.out.println(proxy.sayHello());?????
          ?8 ??}

          ?9
          10 }

          在Eclipse里面寫完,一運行,出來個“HelloWorld”,順利得讓我簡直不敢相信。
          posted on 2006-05-06 12:41 mmwy 閱讀(598) 評論(1)  編輯  收藏 所屬分類: Groovy

          評論

          # re: GroovySOAP 2006-05-06 12:56 mmwy

          似乎只能調xfire做的服務端。

          以“http://www.xmethods.net/interfaces/query.wsdl”這個接口為例,在c# sharpdevelop中正常調用,換用groovysoap以后,就報“org.codehaus.xfire.fault.XFireFault: this is a soap-encoded endpoint”的異常了。
          using System;
          using Hello.www.xmethods.net;

          namespace Hello
          {
          class MainClass
          {
          public static void Main(string[] args)
          {
          XMethodsQuery query=new XMethodsQuery();
          IDNamePair[] result=query.getAllServiceNames();
          for(int i=0;i<result.Length;i++)
          Console.WriteLine(result[i].id+"\t"+result[i].name+"\n");
          }
          }
          }  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 浏阳市| 湛江市| 临澧县| 疏附县| 曲麻莱县| 仲巴县| 滨海县| 南溪县| 建平县| 宁阳县| 定安县| 师宗县| 南城县| 黑水县| 台江县| 陆川县| 商丘市| 晋江市| 廉江市| 拜泉县| 台湾省| 张家口市| 中西区| 天峻县| 遂平县| 沙田区| 民县| 屏南县| 安多县| 北安市| 甘泉县| 桦南县| 万源市| 留坝县| 陵川县| 宜丰县| 吴川市| 祁东县| 宁陕县| 镇康县| 淳化县|