2006年11月8日

          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("參數(shù)一", omNs);
                     value.addChild(fac.createOMText(value, "值一"));
                     method.addChild(value);
                    
                     value = fac.createOMElement("參數(shù)二", 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,研究之路 閱讀(382) | 評論 (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,研究之路 閱讀(388) | 評論 (0)編輯 收藏
           
          http://randomcoder.com/articles/jsessionid-considered-harmful
          posted @ 2006-11-08 12:32 Java,研究之路 閱讀(1273) | 評論 (1)編輯 收藏
           
          主站蜘蛛池模板: 黄冈市| 全椒县| 德江县| 安图县| 嘉善县| 莱州市| 龙海市| 大关县| 大宁县| 宁津县| 吕梁市| 饶河县| 湟源县| 卢湾区| 漳平市| 仪征市| 临武县| 理塘县| 巧家县| 广水市| 繁昌县| 白城市| 方正县| 榆中县| 红桥区| 和静县| 巨鹿县| 平陆县| 西丰县| 洪洞县| 忻城县| 阿拉善盟| 宜宾市| 弋阳县| 开化县| 吴堡县| 绥棱县| 洛阳市| 清远市| 靖远县| 新巴尔虎左旗|