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

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

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

    2007年10月25日

    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,研究之路 閱讀(373) | 評(píng)論 (0)編輯 收藏
     
    主站蜘蛛池模板: 手机在线毛片免费播放| 久久久久免费看黄a级试看| 亚洲狠狠爱综合影院婷婷| 亚洲国产91在线| 四虎国产精品永免费| 日本一道一区二区免费看| 蜜芽亚洲av无码一区二区三区| 在线成人a毛片免费播放| 亚洲av无码一区二区三区人妖| 国产免费观看网站| 人成午夜免费大片在线观看| 亚洲成av人片在线观看天堂无码| 香港特级三A毛片免费观看| 亚洲国产精品第一区二区三区| 一级毛片免费在线播放| 亚洲伊人久久大香线蕉综合图片 | 亚洲av午夜精品一区二区三区| 羞羞视频免费网站含羞草| 久久亚洲国产精品五月天婷| 免费在线看黄网站| 亚洲视频在线免费看| 亚洲欧洲校园自拍都市| 日韩精品免费电影| 久久WWW免费人成—看片| 久久亚洲精品成人综合| 久草在视频免费福利| 亚洲视频一区调教| 精品久久久久成人码免费动漫| 亚洲国产成人手机在线观看| 毛片高清视频在线看免费观看| 国产区图片区小说区亚洲区| 亚洲日韩精品无码一区二区三区| 精品无码国产污污污免费网站| 亚洲深深色噜噜狠狠网站| 最近免费中文字幕视频高清在线看| 噜噜综合亚洲AV中文无码| 精品国产综合成人亚洲区| 最近2019中文免费字幕| h片在线播放免费高清| 亚洲激情黄色小说| av在线亚洲欧洲日产一区二区|