<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
     
    主站蜘蛛池模板: 亚洲综合精品网站在线观看| 亚洲精品无码久久毛片波多野吉衣 | 成人人免费夜夜视频观看| 日日摸日日碰夜夜爽亚洲| 亚洲国产日韩在线视频| 最近最新MV在线观看免费高清| 免费夜色污私人影院网站| 久久精品国产亚洲AV果冻传媒 | 五月婷婷亚洲综合| 久久久精品2019免费观看| 亚洲AV成人无码网站| 亚洲视频一区调教| 免费a级毛片在线观看| 久久久久久夜精品精品免费啦| 亚洲成AV人影片在线观看| 亚洲AV无码日韩AV无码导航| 精品国产麻豆免费网站| 亚洲视频免费在线观看| 色屁屁在线观看视频免费| 亚洲精品国产专区91在线| 亚洲日韩国产精品第一页一区| 成年人性生活免费视频| 久久久精品免费视频| 无忧传媒视频免费观看入口| 亚洲人成777在线播放| 国产亚洲成AV人片在线观黄桃 | 亚洲免费网站在线观看| 一级毛片免费不卡| 亚洲无人区码一二三码区别图片| 久久精品视频亚洲| 亚洲天堂中文字幕在线| 日韩高清免费观看| 国产四虎免费精品视频| 久久爰www免费人成| eeuss草民免费| 亚洲成av人无码亚洲成av人| 亚洲国产品综合人成综合网站| 亚洲Av永久无码精品三区在线 | 亚洲欧洲日产国码高潮αv| 四虎影视免费在线| 91在线视频免费91|