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

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

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

    風人園

    弱水三千,只取一瓢,便能解渴;佛法無邊,奉行一法,便能得益。
    隨筆 - 99, 文章 - 181, 評論 - 56, 引用 - 0
    數據加載中……

    hessian binary web service protocol(一個簡單的ws包)

    The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary protocol, it is well-suited to sending binary data without any need to extend the protocol with attachments.

    The Service API

    A Hessian service's API is just a plain old Java interface.

    Hello, World API
    public interface BasicAPI {
    public String hello();
    }
    

    The Hessian protocol eliminates external API descriptions like CORBA IDL files or WSDL. Documenting a Hessian service API is as simple as providing the JavaDoc. Because Hessian is language-independent, the Java interface classes are not required for non-Java languages. For external languages, the Java interfaces serve only to document the service methods.

    Service Implementation

    The service implementation can be a plain-old Java object (POJO) or can extend HessianServlet to make the servlet-engine configuration trivial.

    Hello, World Service
    public class BasicService extends HessianServlet implements BasicAPI {
    private String _greeting = "Hello, world";
    public void setGreeting(String greeting)
    {
    _greeting = greeting;
    }
    public String hello()
    {
    return _greeting;
    }
    }
    

    The service implementation can also be a plain-old Java object (POJO), avoiding any dependency on HessianServlet. More details are at Hessian introduction and in the Hessian Service using Dependency Injection tutorial.

    Client Implementation

    Creating a client is as simple as creating an API interface:

    Hello, World Client
    String url = "http://hessian.caucho.com/test/test";
    HessianProxyFactory factory = new HessianProxyFactory();
    BasicAPI basic = (BasicAPI) factory.create(BasicAPI.class, url);
    System.out.println("hello(): " + basic.hello());

    posted on 2009-05-25 09:49 風人園 閱讀(438) 評論(0)  編輯  收藏 所屬分類: Open Source

    主站蜘蛛池模板: 亚洲人成网亚洲欧洲无码久久| 亚洲国产精品久久丫| 亚洲大片在线观看| 欧美亚洲精品一区二区| 久久精品乱子伦免费| 国产女高清在线看免费观看| 亚洲视频一区在线播放| 中国一级毛片视频免费看| 免费在线观看理论片| 亚洲精品无码久久久久YW| 91精品国产免费久久国语麻豆| 亚洲午夜福利精品久久| 国产成人不卡亚洲精品91| 久久精品女人天堂AV免费观看| 亚洲人成在线电影| 最刺激黄a大片免费网站| 麻豆亚洲AV成人无码久久精品 | 亚洲国产成人精品激情| 日韩在线永久免费播放| 亚洲国产成人片在线观看无码| 插鸡网站在线播放免费观看| 亚洲一区精品视频在线| 啦啦啦手机完整免费高清观看| 国产精品亚洲精品观看不卡| 国产自偷亚洲精品页65页| 青青草原1769久久免费播放| 亚洲国产区男人本色| 亚洲精品国产va在线观看蜜芽| 一级做a爰片久久毛片免费看| 亚洲第一页日韩专区| yellow免费网站| 亚洲AV永久无码天堂影院| 久久亚洲私人国产精品vA| 成人免费a级毛片| 久久青草91免费观看| 成人免费网站久久久| 久久久久亚洲精品成人网小说| 成人永久免费福利视频网站| 国产黄色免费观看| 久久国产亚洲精品无码| 亚洲一区二区三区偷拍女厕|