<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    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 on 2007-10-25 20:58 Java,研究之路 閱讀(373) 評論(0)  編輯  收藏 所屬分類: programming
     
    主站蜘蛛池模板: 免费观看91视频| 看全免费的一级毛片| 久久成人免费播放网站| 亚洲色一色噜一噜噜噜| 免费看黄福利app导航看一下黄色录像 | 日韩中文字幕免费| 亚洲一线产区二线产区区| 免费A级毛片无码无遮挡内射| 亚洲国产成人在线视频| 黄瓜视频影院在线观看免费| 国产人成亚洲第一网站在线播放| 欧美男同gv免费网站观看| 亚洲成AV人片在WWW| 免费永久国产在线视频| 国产A∨免费精品视频| 国产成人精品日本亚洲网站 | 一级毛片在线免费看| 一区二区三区亚洲| 免费国产作爱视频网站| 精品国产成人亚洲午夜福利| 精品无码国产污污污免费| 午夜亚洲国产精品福利| 中文字幕亚洲日韩无线码| 午夜视频在线免费观看| 亚洲国产成人手机在线电影bd| 最好免费观看韩国+日本| 一本久久免费视频| 久久亚洲精品成人综合| 精品熟女少妇AV免费观看| 特色特黄a毛片高清免费观看| 久久亚洲国产中v天仙www| 免费看污成人午夜网站| 国产大陆亚洲精品国产| 久久亚洲一区二区| 国产免费av片在线看| 一级成人a免费视频| 久久综合亚洲色HEZYO社区 | 久久久久亚洲国产AV麻豆| 久久久久亚洲AV无码专区网站| 久久免费的精品国产V∧| 亚洲国产欧美一区二区三区|