<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.

    統(tǒng)計

    留言簿(10)

    BlogJava

    Blogs

    DIV+CSS

    JQuery相關(guān)

    友情鏈接

    常去的地方

    數(shù)據(jù)供應(yīng)

    閱讀排行榜

    評論排行榜

    [CXF]Spring下設(shè)置CXF的WebService客戶端超時時長

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

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

    ReceiveTimeout -- 這個屬性是發(fā)送WebService的請求后等待響應(yīng)的時間,超過設(shè)置的時長就認(rèn)為是響應(yīng)超時.以毫秒為單位,默認(rèn)是60000毫秒,即60秒.


    設(shè)置的例子:

     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屬性,指定設(shè)置生效的服務(wù),如例子中,只對服務(wù)名為{http://impl.service.product.sww.com/}ProjectService的服務(wù)生效.
    使用下面的設(shè)置則會對所有服務(wù)生效

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


    更詳細(xì)的配置請參考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 閱讀(5651) 評論(26)  編輯  收藏 所屬分類: J2EE

    評論

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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  回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.   回復(fù)  更多評論   

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

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

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

    指定設(shè)置生效的服務(wù),如例子中,只對服務(wù)  回復(fù)  更多評論   

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

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

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

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

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

    A lot of business owners say things like:   回復(fù)  更多評論   

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

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

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

    TCP連接為基礎(chǔ),這個屬性可以理解為tcp的握手時的時間設(shè)置,超過設(shè)置的時間長則認(rèn)為是連接超時.以  回復(fù)  更多評論   

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

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

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

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

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

    Web服務(wù)也可以用來實現(xiàn)一個架構(gòu),面向服務(wù)架構(gòu)的概念。  回復(fù)  更多評論   

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

    自動化工具,可以幫助創(chuàng)建一個Web服務(wù)。  回復(fù)  更多評論   

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

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

    # re: [CXF]Spring下設(shè)置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.


      回復(fù)  更多評論   

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

    待響應(yīng)的時間,超過設(shè)置的時長就認(rèn)為是響應(yīng)超時.以毫秒為單位,默認(rèn)是60000毫秒,即60秒.  回復(fù)  更多評論   

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

    這個屬性是發(fā)送WebService的請求后等待響應(yīng)的時間,超過設(shè)置的時長就認(rèn)為是響應(yīng)超時.以毫秒為單位,默認(rèn)是60000毫秒,即60秒.  回復(fù)  更多評論   

    # re: [CXF]Spring下設(shè)置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.  回復(fù)  更多評論   

    主站蜘蛛池模板: 暖暖日本免费在线视频| 国产性生大片免费观看性| 久草视频免费在线| 亚洲尤码不卡AV麻豆| 亚洲AV永久纯肉无码精品动漫| 亚洲理论精品午夜电影| 亚洲三级高清免费| 亚洲精品视频免费看| 久久精品国产亚洲av四虎| 在线观看免费无码视频| 国产亚洲午夜高清国产拍精品| 黄色a级免费网站| 国产成人青青热久免费精品 | 一本到卡二卡三卡免费高| 在线日韩av永久免费观看| 成人区精品一区二区不卡亚洲| 日韩在线免费视频| 亚洲国产精品专区| yy一级毛片免费视频| 亚洲国产人成中文幕一级二级| 亚洲中文字幕无码av| 欧美日韩国产免费一区二区三区| 亚洲理论片在线观看| 国产v精品成人免费视频400条| 亚洲人成网网址在线看| 免费三级毛片电影片| 亚洲香蕉在线观看| 成人网站免费观看| 亚洲欧美自偷自拍另类视| 久久精品无码专区免费东京热| 亚洲精品福利视频| 51视频精品全部免费最新| 亚洲精品美女久久久久| 又粗又大又黑又长的免费视频| 亚洲一区二区三区在线网站| 成人免费视频网址| 亚洲无人区视频大全| 一区二区三区无码视频免费福利| 亚洲AV午夜福利精品一区二区| 无码少妇精品一区二区免费动态| 麻豆亚洲av熟女国产一区二|