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

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

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

    Java Blog for Alex Wan

    Let life be beautiful like summer flowers and death like autumn leaves.

    統計

    留言簿(10)

    BlogJava

    Blogs

    DIV+CSS

    JQuery相關

    友情鏈接

    常去的地方

    數據供應

    閱讀排行榜

    評論排行榜

    [CXF]Spring下設置CXF的WebService客戶端超時時長

    背景:
    在使用WebService的時候,我們可能需要一個備份的WebService服務器.一旦主服務器down了,我們可以使用備份的服務器.那么這里就需要對客服端連接服務器的時間做一個修改.

    在Spring+CXF的WebService環境下,客戶端有兩個時間屬性是可配置的,分別是ConnectionTimeout和ReceiveTimeout.
    ConnectionTimeout--WebService以TCP連接為基礎,這個屬性可以理解為tcp的握手時的時間設置,超過設置的時間長則認為是連接超時.以毫秒為單位,默認是30000毫秒,即30秒.

    ReceiveTimeout -- 這個屬性是發送WebService的請求后等待響應的時間,超過設置的時長就認為是響應超時.以毫秒為單位,默認是60000毫秒,即60秒.


    設置的例子:

     1<?xml version="1.0" encoding="UTF-8"?>
     2<beans xmlns="http://www.springframework.org/schema/beans"
     3    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     4    xmlns:jee="http://www.springframework.org/schema/jee"
     5    xmlns:jaxws="http://cxf.apache.org/jaxws"
     6    xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
     7    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
     8           http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
     9           http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
    10           http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd ">
    11        <http-conf:conduit name="{http://impl.service.product.super.com/}ProjectService.http-conduit"> 
    12        <http-conf:client ConnectionTimeout="10000" ReceiveTimeout="20000"/>
    13    </http-conf:conduit> 
    14</beans>
    15

     

    這里需要注意的有幾個地方:
    1:需要指定http-conf名稱空間 xmlns:http-conf=http://cxf.apache.org/transports/http/configuration
    2:指定模式位置: http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
    3:http-conf:conduit中的name屬性,指定設置生效的服務,如例子中,只對服務名為{http://impl.service.product.sww.com/}ProjectService的服務生效.
    使用下面的設置則會對所有服務生效

    <http-conf:conduit name="*.http-conduit">
          
    </http-conf:conduit>


    更詳細的配置請參考CXF官方文檔:

    http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html

     



    Let life be beautiful like summer flowers and death like autumn leaves.

    posted on 2008-09-04 16:45 Alexwan 閱讀(5660) 評論(26)  編輯  收藏 所屬分類: J2EE

    評論

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2010-01-05 21:47 Emily32Av

    A kind of good information about this good post. The good accomplished custom written essays and the ability to <a href=" http://www.supremeessays.com">buy essay</a> just about this topic is suggested by paper writing services.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2010-08-16 23:07 credit loans

    Every one remembers that life seems to be not cheap, however some people need cash for various issues and not every one gets big sums cash. Thus to receive fast home loans or short term loan would be a correct solution.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2010-08-22 23:55 custom research paper

    Actually, it's not hard to buy essay writing service when you are pressured by time to write custom paper. Hence, that's a common thing to search for custom company.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2010-12-30 10:32 dress

    I can't believe how much of this I just wasn't aware of. Thank you for bringing moreinformation to this topic for me. I'm truly grateful and really impressed  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-01-11 21:30 dissertation

    Very oft to get the dotoral level you should purchase thesis summary about this good post and thesis.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-07-06 17:00 buy an essay

    What are essays writing services? These corporations help university students to cope with papers writing and it ought to be available to buy custom essay papers written by experts.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-07-08 16:52 bookmark service

    A lot of business owners say things like: "Whay should I utilize the automatic social bookmarking service?", or "Which way can it assist me? " The answer is easy! Bookmarking submissions options offered by experts can generate more sales at your internet site.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-07-13 05:04 thesis writing service

    Want to have high academic grades? Therefore, all you have to do is to complete the English thesis of premium quality or purchase thesis analysis at the dissertation writing service.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-07-13 08:39 thesis service

    The thesis ideas creating deal can be fascinating but time consuming. Therefore, when some people want to take a rest and perform their fantastic story referring to this topic, they should to find the professional thesis writing service, which would help people all the time.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-07-15 10:47 research papers online

    Lots of different people in the world are searching for specialized custom writing support. Thence, we can propose to buy college essay and be assured, it's a bright decision.   回復  更多評論   

    # cpanel hosting 2011-12-10 01:59 mivpljaipur@gmail.com

    ,我們可以使用備份的服務器.那么這里就需要對客服端連接服務器的時間做  回復  更多評論   

    # cpanel hosting 2011-12-10 02:00 cpanel hosting

    指定設置生效的服務,如例子中,只對服務  回復  更多評論   

    # Latest news 2011-12-12 16:00 Latest news

    the world are searching for specialized custom writing support.   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-12-14 01:46 hostgator coupon

    您出示您的文章,信息和能力,給未知的事實是所有的最令人驚訝的因素,我徹底留下深刻的印象。  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-12-15 15:57 claim online

    A lot of business owners say things like:   回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-12-19 19:06 Free online dating

    The thesis ideas creating deal can be fascinating but time consuming.  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2011-12-31 17:02 Exotic Car Rental Miami

    TCP連接為基礎,這個屬性可以理解為tcp的握手時的時間設置,超過設置的時間長則認為是連接超時.以  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-01-06 20:18 Logo design

    Not a big fan of the subject but a good read none the less.
      回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-02-14 01:20 hostgator promo code

    Web服務是一種可以在許多方面使用的工具集。  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-02-14 01:21 bluehost coupon 3.95

    Web服務也可以用來實現一個架構,面向服務架構的概念。  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-02-14 01:22 best cpanel hosting

    自動化工具,可以幫助創建一個Web服務。  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-05-12 17:57 Seo UK

    性可以理解為tcp的握手時的時間設置,超過設置的時間長則認為是連接超時.以毫秒為單位,默認是3  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-05-16 11:27 website design india

    This is such a Great resource that you are providing and you give it away for free. It gives in depth information. Thanks for this valuable information.


      回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-05-28 17:31 Digital Marketing Agency

    待響應的時間,超過設置的時長就認為是響應超時.以毫秒為單位,默認是60000毫秒,即60秒.  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2012-08-07 19:06 best casino

    這個屬性是發送WebService的請求后等待響應的時間,超過設置的時長就認為是響應超時.以毫秒為單位,默認是60000毫秒,即60秒.  回復  更多評論   

    # re: [CXF]Spring下設置CXF的WebService客戶端超時時長 2014-01-22 13:34 Web Design Bangalore

    Thank you for this great blog! Really enjoying every little bit of it and I have you bookmarked to check out new stuff you post.  回復  更多評論   

    主站蜘蛛池模板: 亚洲女女女同性video| 三级黄色片免费看| 91网站免费观看| 亚洲精品韩国美女在线| 国产永久免费高清在线| 亚洲va中文字幕无码久久| 两个人看的www免费视频| 亚洲精品成人网站在线观看| 97超高清在线观看免费视频| 亚洲va久久久噜噜噜久久狠狠| 日本免费在线中文字幕| 亚洲色欲www综合网| 美女视频黄频a免费| 五月天婷亚洲天综合网精品偷| 亚洲AV无码国产一区二区三区| 又黄又爽一线毛片免费观看| 国产亚洲婷婷香蕉久久精品| 国内精品久久久久影院免费| 国产美女无遮挡免费网站| 羞羞漫画在线成人漫画阅读免费| 伊在人亚洲香蕉精品区麻豆| 黄色网站软件app在线观看免费 | 亚洲日本乱码在线观看| 日本免费在线观看| 亚洲三级高清免费| 亚洲精品国产V片在线观看| 91成人免费观看在线观看| 亚洲视频免费在线看| 日本免费电影一区| 99精品视频免费| ass亚洲**毛茸茸pics| 免费a级毛片永久免费| 在线看片免费人成视频福利| 亚洲影视自拍揄拍愉拍| 亚洲av麻豆aⅴ无码电影| 欧洲人成在线免费| 亚洲成AV人片在WWW| 69成人免费视频无码专区| 猫咪免费人成网站在线观看入口| 久久亚洲国产精品| 最近更新免费中文字幕大全|