2006年4月4日

          1. install the following software
          jre 1.5 or 1.6,  tomcat 5525, eclipse, axis2

          and in eclipse preferences set tomcat to web server, set jre env and set axis2's runtime

          2. create a java project and add axis2 runtime library to its build library

          test ws client sample code:

          public class TestSms
          {
          private static EndpointReference targetEPR = new EndpointReference(
             "http://cdl:8080/axis2/services/Version");

           public static OMElement getGetLeftElement(){
                     OMFactory fac=OMAbstractFactory.getOMFactory();
                     OMNamespace omNs=fac.createOMNamespace("此處填寫WS的命名空間","hw");
                     OMElement method=fac.createOMElement("WS 方法名",omNs);
                     OMElement value = fac.createOMElement("參數一", omNs);
                     value.addChild(fac.createOMText(value, "值一"));
                     method.addChild(value);
                    
                     value = fac.createOMElement("參數二", omNs);
                     value.addChild(fac.createOMText(value, "值2"));
                     method.addChild(value);
                    
                   
                     return method;
              }
                
                 public static void main(String[] args){
                        try{
                               Options options=new Options();
                               options.setTo(targetEPR);
                               options.setAction("命名空間/WS 方法名");
                               ServiceClient sender=new ServiceClient();
                               sender.setOptions(options);
                               OMElement sayHello=TestSms.getGetLeftElement();
                               //WSDLConstants.
                              
                               OMElement result=sender.sendReceive(sayHello);
                              
                               OMElement elem = result.getFirstElement();
                               System.out.println(elem.getText());
                               //System.out.println(result);
                        }
                        catch(Exception axisFault){
                               axisFault.printStackTrace();
                        }
                 }

          }



          ref: http://zhangjunhd.blog.51cto.com/113473/23690
          posted @ 2007-10-25 20:58 Java,研究之路 閱讀(378) | 評論 (0)編輯 收藏
           

          How to load balance Tomcat 5.5 with Apache on Windows


          ref:
          http://thought-bytes.blogspot.com/2007/03/how-to-load-balance-tomcat-55-with.html

          posted @ 2007-03-10 17:17 Java,研究之路 閱讀(381) | 評論 (0)編輯 收藏
           
          http://randomcoder.com/articles/jsessionid-considered-harmful
          posted @ 2006-11-08 12:32 Java,研究之路 閱讀(1265) | 評論 (1)編輯 收藏
           
          最近總是打不開網頁中的JAVA程序, 本來機器上有JAVA開發環境, 重裝系統一般不安裝JAVA,反正設置java_home和path中添加javac/java就可以了. 結果IE總是打不開,也不找到原因. 今天沒辦法了, 要參加一項考試,只好在網上搜索了一下, 原來出問題總是有原因的.

          參考官方幫助: http://www.java.com/zh_CN/download/help/win_offline.xml

          下載jre運行環境.安裝.

          1. 雙擊該圖標打開“Java 控制面板”
          2. 在“Java 控制面板”中選擇“瀏覽器”選項卡
          3. 確保選中“Internet Explorer”、“Netscape”或“Mozilla”旁邊的復選框
          4. 如果尚未選中,請選中對應的復選框,為您的 Web 瀏覽器啟用 JRE
          5. 單擊“應用”按鈕

          Internet Explorer 4.x 及更高版本

          1. 單擊“工具”-->“Internet 選項”
          2. 選擇“高級”選項卡,并向下滾動到“Java (Sun)”
          3. 選中“使用 Java 2 版本”旁邊的復選框
          4. 接下來選擇“安全”選項卡,然后選擇“自定義級別”按鈕
          5. 向下滾動到“Java 小程序腳本”
          6. 確保選中“啟用”單選按鈕。
          7. 單擊“確定”保存您的首選設置。

          最后不要忘了在這里測試一下是否安裝成功: http://www.java.com/zh_CN/download/help/testvm.xml

          posted @ 2006-04-04 22:24 Java,研究之路 閱讀(3241) | 評論 (0)編輯 收藏
           
          主站蜘蛛池模板: 德惠市| 梁河县| 太仆寺旗| 宜都市| 亚东县| 乌拉特前旗| 高碑店市| 滕州市| 平定县| 清丰县| 灵山县| 平利县| 乳源| 汪清县| 博野县| 阜城县| 庆阳市| 古蔺县| 揭阳市| 洛南县| 定陶县| 蓬莱市| 岳西县| 报价| 襄樊市| 家居| 华安县| 麦盖提县| 浦北县| 温泉县| 武汉市| 噶尔县| 本溪市| 丁青县| 青河县| 新平| 交口县| 松江区| 嫩江县| 武宁县| 密山市|