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

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

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

    風(fēng)人園

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

    hessian binary web service protocol(一個(gè)簡單的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 風(fēng)人園 閱讀(438) 評論(0)  編輯  收藏 所屬分類: Open Source

    主站蜘蛛池模板: 成人性生交视频免费观看| 亚洲va中文字幕无码| 豆国产96在线|亚洲| 在线亚洲精品福利网址导航| 香蕉免费一区二区三区| 色在线亚洲视频www| 亚洲五月午夜免费在线视频| 热99re久久精品精品免费| 免费无遮挡无遮羞在线看| 亚洲美女免费视频| 国产成人免费全部网站| 未满十八18禁止免费无码网站| 久久亚洲国产最新网站| 久久久久久国产精品免费免费男同| 亚洲男人天堂2018av| 久久亚洲2019中文字幕| 久久久久免费看黄A片APP | 亚洲午夜激情视频| 在线观看的免费网站无遮挡 | 免费国产黄线在线观看| 国产精品免费αv视频| 亚洲AV无码专区在线亚| 国产精品亚洲一区二区三区在线| 女人隐私秘视频黄www免费| 亚洲av无码兔费综合| 亚洲视频在线观看视频| 国外亚洲成AV人片在线观看| 成人毛片手机版免费看| 免费女人高潮流视频在线观看| 一区二区三区精品高清视频免费在线播放 | 中文字幕无码视频手机免费看| 中文字幕看片在线a免费| 日韩国产欧美亚洲v片| 亚洲成av人片在线看片| 亚洲成AV人片在线观看WWW| 97免费人妻在线视频| 中文字幕一区二区三区免费视频 | 久久99青青精品免费观看| 免费无码AV一区二区| 337P日本欧洲亚洲大胆精品| 亚洲综合校园春色|