Skynet

          ---------- ---------- 我的新 blog : liukaiyi.cublog.cn ---------- ----------

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            112 Posts :: 1 Stories :: 49 Comments :: 0 Trackbacks

          可能最簡單的 soap 哦!
          服務器為 java tomcat
          下載服務器:http://www.apache.org/dist/ws/
             axis/ 為java
             axis-c/    為 c

          1.我這下載的 axis 1_4 版本 ,解壓 /webapps/axis  放到 tomcat 的webapps
          啟動tomcat(這就不修改任何,如有需要 該 web.xml 等配置了) 參考 >>
              blog 主 還有很多介紹 axis 大家可以 看看  日志 > 其下的 "學習"

          直接寫個文件 HelloWorld.jws 放到 %TOMCAT_HOME%"webapps"axis
          public class HelloWorld {   
               
          public String sayHello()   {   
               
          return "HELLO soap!";    
           }    


          等不及 可以使用 看看
          http://127.0.0.1:8080/axis/HelloWorld.jws?method=sayHello
          結果 :
          <soapenv:Envelope>
          <soapenv:Body>
          <sayHelloResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <sayHelloReturn xsi:type="xsd:string">HELLO soap!</sayHelloReturn>
          </sayHelloResponse>
          </soapenv:Body>
          </soapenv:Envelope>


          客戶段
          perl cpan >> install  SOAP::Lite
          #!perl -w
          use SOAP::Lite;
          print SOAP::Lite
              
          -> proxy('http://127.0.0.1:8080/axis/HelloWorld.jws')
              
          -> uri('http://127.0.0.1:8080/axis/HelloWorld.jws')
              
          -> sayHello()
              
          -> result;
          結果: HELLO soap!






          整理 www.aygfsteel.com/Good-Game
          posted on 2009-03-02 00:00 劉凱毅 閱讀(1454) 評論(0)  編輯  收藏 所屬分類: perl集群開發
          主站蜘蛛池模板: 九寨沟县| 佛冈县| 德安县| 武陟县| 二手房| 南昌县| 廉江市| 丰都县| 措勤县| 江门市| 定陶县| 互助| 晴隆县| 鹤山市| 天镇县| 北碚区| 石景山区| 荃湾区| 金溪县| 银川市| 朝阳县| 永顺县| 元阳县| 甘泉县| 库伦旗| 会昌县| 肃北| 武安市| 安图县| 光泽县| 樟树市| 南丰县| 锡林郭勒盟| 泗阳县| 丰县| 克山县| 长阳| 连州市| 武义县| 板桥市| 商河县|