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

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

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

    David.Turing's blog

     

    從java.lang.UnsupportedOperationException看WebLogic WS*協議棧的變遷

    之前,有些朋友從開源的WS*應用(比如說Axis、CXF)遷移到WebLogic 9、10上,經常遇到類似下面的異常:

    java.lang.UnsupportedOperationException:?This? class ?does?not?support?SAAJ? 1.3
    ????????at?weblogic.webservice.core.soap.SOAPElementImpl.getElementQName(SOAPElementImpl.java:
    651 )
    ????????at?org.springframework.ws.soap.saaj.Saaj13Implementation.getName(Saaj13Implementation.java:
    67 )
    ????????at?org.springframework.ws.soap.saaj.SaajSoapEnvelope.getBody(SaajSoapEnvelope.java:
    49 )
    ????????at?org.springframework.ws.soap.AbstractSoapMessage.getSoapBody(AbstractSoapMessage.java:
    35 )
    ????????at?org.springframework.ws.soap.AbstractSoapMessage.getPayloadResult(AbstractSoapMessage.java:
    56 )

    這有一些歷史因素在內,WebLogic 8.1的WebService協議棧,包含在weblogic.jar中。
    SOAP棧的全部實現,都在weblogic.webservice.core.soap.* 這個Package中。
    進入了Java5的時代后,JWS依靠Annotation方式,已經徹底改變WebService編程的外觀,于是,隨之而來的是,基于Java5的WebLogic 9/10,基本上使用Sun JWS方式實現Web Services,且WebLogic開始兼容新的WS* API,WebLogic的做法是deprecated以前的WS API(weblogic.webservice.core.soap.*),但為了8.1應用升級的兼容性考慮,用戶依然使用較舊的包。

    比如上述的NotSupport異常,在默認的WebLogic 9、10中%BEA_HOME%\modules\com.bea.core.weblogic.saaj_1.0.1.0.jar其實是Support的。

    對WebLogic 8.1老用戶來說,他們的WS*應用無需重新編碼即可運行在WebLogic 9.2,此時默認使用老的協議棧【weblogic.webservice.core.soap.*】
    對WebLogic 9.2新用戶來說,他們也可以使用老協議棧,也可以使用新的協議棧,使用weblogic.xml.saaj.*

    針對上述的NotSupport異常,有兩種方式可以讓應用使用新的API實現:
    ?System.setProperty("javax.xml.soap.MessageFactory",??"weblogic.xml.saaj.MessageFactoryImpl");
    -Djavax.xml.soap.MessageFactory=weblogic.xml.saaj.MessageFactoryImpl

    java.lang.UnsupportedOperationException:?This? class ?does?not?support?
    SAAJ?
    1.1

    The?actual?
    class / method?in?question?is?javax.xml.soap.Text.isComment(),?which?
    appears?to?be?implemented?by?
    weblogic.webservice.core.soap.SOAPTextElement.isComment().

    Stack?trace?is?as?follows:?
    DemoServlet?received?an?unexpected?exception:?
    java.lang.UnsupportedOperationException:?This?
    class ?does?not?support?SAAJ? 1.1
    java.lang.UnsupportedOperationException:?This?
    class ?does?not?support?SAAJ? 1.1
    ????????at?
    weblogic.webservice.core.soap.SOAPTextElement.isComment(SOAPTextElement.java:
    43 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    209 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.treeWalk(DemoServlet.java:
    225 )
    ????????at?
    com.company.demo.servlet.DemoServlet.doGetOrPost(DemoServlet.java:
    119 )
    ????????at?com.company.demo.servlet.DemoServlet.doGet(DemoServlet.java:
    44 )
    ????????at?javax.servlet.http.HttpServlet.service(HttpServlet.java:
    743 )
    ????????at?javax.servlet.http.HttpServlet.service(HttpServlet.java:
    856 )
    ????????at?
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:
    225 )
    ????????at?
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:
    127 )
    ????????at?
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:
    283 )
    ????????at?
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:
    175 )
    ????????at?
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:
    3214 )
    ????????at?
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:
    321 )
    ????????at?
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121 )
    ????????at?
    weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:
    1983 )
    ????????at?
    weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:
    1890 )
    ????????at?
    weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:
    1344 )
    ????????at?weblogic.work.ExecuteThread.execute(ExecuteThread.java:
    209 )
    ????????at?weblogic.work.ExecuteThread.run(ExecuteThread.java:
    181 )

    很好,因為它們使用了更多的API,這些API在WebLogic的老協議棧【weblogic.webservice.core.soap.*】中沒有被支持,使用新的即可。
    我一般在重啟WebLogic的時候,在startWebLogic.sh腳本中加入:
    -Djavax.xml.soap.MessageFactory=weblogic.webservice.core.soap.MessageFactoryImpl -Djavax.xml.soap.SOAPFactory=weblogic.webservice.core.soap.SOAPFactoryImpl

    posted on 2008-07-11 08:29 david.turing 閱讀(5667) 評論(4)  編輯  收藏 所屬分類: SOA/WebService

    評論

    # re: 從java.lang.UnsupportedOperationException看WebLogic WS*協議棧的變遷 2008-08-11 07:54 lansir

    主持人,還有相應的實戰經驗的實地演講么?要是在廣州開多幾次有多好啊。  回復  更多評論   

    # re: 從java.lang.UnsupportedOperationException看WebLogic WS*協議棧的變遷[未登錄] 2008-08-20 13:46 alang

    黃呀,水平太牛了.現在還在BEA嗎?有空可以加我的MSN:alang2000@live.cn  回復  更多評論   

    # re: 從java.lang.UnsupportedOperationException看WebLogic WS*協議棧的變遷 2008-08-20 20:36 鬼怪

    如果加到:WebLogic 9、10的啟動腳本上?

    #!/bin/sh

    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.

    DOMAIN_HOME="C:/bea/user_projects/domains/base_domain"

    ${DOMAIN_HOME}/bin/startWebLogic.sh $*


    呵呵,不知道對不對?  回復  更多評論   

    # re: 從java.lang.UnsupportedOperationException看WebLogic WS*協議棧的變遷 2009-10-14 15:00 nesta

    請問怎么把
    -Djavax.xml.soap.MessageFactory=weblogic.webservice.core.soap.MessageFactoryImpl -Djavax.xml.soap.SOAPFactory=weblogic.webservice.core.soap.SOAPFactoryImpl
    加入啟動里,加在那個地方呢?  回復  更多評論   

    導航

    統計

    常用鏈接

    留言簿(110)

    我參與的團隊

    隨筆分類(126)

    隨筆檔案(155)

    文章分類(9)

    文章檔案(19)

    相冊

    搜索

    積分與排名

    最新隨筆

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产高清免费在线| 免费一区二区三区| 日韩毛片免费在线观看| 亚洲av永久无码精品天堂久久| 免费精品无码AV片在线观看| 亚洲动漫精品无码av天堂| a级毛片毛片免费观看久潮喷| 亚洲综合av永久无码精品一区二区| 成人a毛片视频免费看| 亚洲成av人在线观看网站| 四虎永久在线精品免费网址 | 亚洲日产2021三区在线| 永久在线免费观看| 亚洲人xxx日本人18| 午夜无遮挡羞羞漫画免费| 亚洲色婷婷综合久久| 免费精品一区二区三区第35| 亚洲AV无码久久精品蜜桃| 69av免费观看| 亚洲国产AV一区二区三区四区 | 精品成人免费自拍视频| 亚洲第一精品福利| 在线观看的免费网站| 亚洲AV无码一区二区三区电影| xvideos亚洲永久网址| a级毛片高清免费视频就| 亚洲国产美女福利直播秀一区二区| 两个人的视频高清在线观看免费| 亚洲第一综合天堂另类专| 久久乐国产精品亚洲综合| 182tv免费视视频线路一二三| 伊人久久亚洲综合影院首页| 亚洲成人影院在线观看| 99爱在线观看免费完整版| 亚洲精品国产精品| 国产日韩亚洲大尺度高清| 免费在线看v网址| 国产高清视频免费在线观看 | 2022年亚洲午夜一区二区福利| 高清国语自产拍免费视频国产| 国产免费牲交视频免费播放|