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

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

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

    posts - 110,  comments - 152,  trackbacks - 0
    說明:這部分只要是Axis1.4Doc的摘要,只截取了我不明白和感興趣的部分。可以當作一個快速索引和入門資料來看,如有不明白可直接查看Axis1.4的發布文檔。
    歡迎轉載,但是請注明出處,轉載地址:
    http://www.tkk7.com/ponzmd/articles/142045.html
    • AXIS1.4 DOC 閱讀筆記
      • 安裝介紹
        • 作為單獨WebApplication安裝
          • Step1:拷貝AXIS工程/webapps/axis到相應web服務器的部署目錄即可
          • Step2:啟動web服務器.訪問: http://127.0.0.1:8080/axis/ 和 http://localhost:8080/axis/happyaxis.jsp ;如不正常改正錯誤即可
          • Step3:Test a SOAP Endpoint:http://localhost:8080/axis/services/Version?method=getVersion
          • Step4:Test a JWS Endpoint http://localhost:8080/axis/EchoHeaders.jws?method=list .
        • 集成AXIS
          • 1.Add axis.jar, wsdl.jar, saaj.jar, jaxrpc.jar and the other dependent libraries to your WAR file.
          • 2.Copy all the Axis Servlet declarations and mappings from axis/WEB-INF/web.xml and add them to your own web.xml
          • 3.Build and deploy your webapp.
          • 4.Run the Axis AdminClient against your own webapp, instead of Axis, by changing the URL you invoke it with
        • 遺留問題(沒有配置成功)
          •   如何配置使用SOAPMonitor?
        • 注意事項
          • 配置Classpath一定要加入所有的Jar包,少一個都會錯
      • 用戶向導
        • 什么是AXIS
          • AXIS: Apache EXtensible Interaction System
        • AXIS包括什么?
          • a SOAP engine -- a framework for constructing SOAP processors such as clients, servers, gateways
          • a simple stand-alone server
          • a server which plugs into servlet engines such as Tomcat
          • extensive support for the Web Service Description Language (WSDL)
          • emitter tooling that generates Java classes from WSDL
          • some sample programs,anda tool for monitoring TCP/IP packets
        • 使用AXIS
          • 部署WebService
            • 方式1:JWS:將需要部署的WebService的源文件改擴展名.java為.jws,將其至于工程的根目錄下面,發布即告完成。需要注意的是:要部署的文件只能使用默認包。
            • 方式2:WSDD:編寫WSDD文件,通過執行org.apache.axis.client.AdminClient來部署。也可以通過此類撤銷已部署的WebService服務。
            • 配置WSDD,通過org.apache.axis.client.AdminClient來部署
              • WSDD: Web Service Deployment Descriptor
              • 基本配置:
                <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="MyService" provider="java:RPC"> <parameter name="className" value="samples.userguide.example3.MyService"/> <parameter name="allowedMethods" value="*"/> </service> </deployment>  
              • 常用配置:配置JavaBean 客戶端代碼:
                QName qn = new QName( "urn:BeanService""Order" ); call.registerTypeMapping(Order.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(Order.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class, qn)); 
                WSDD文件:
                <beanMapping qname="myNS:Order" xmlns:myNS="urn:BeanService" languageSpecificType="java:samples.userguide.example5.Order"/> 
                擴展配置:參照《Reference Material 》
          • 訪問WebService
            • 編寫服務訪問客戶端,并執行之(必要步驟,example3為例)
              • Step1:獲取服務的訪問地址:
                String endpointURL = “http://localhost:8080/axis/services/MyService"; 
                 
              •  Step2:構建Service 和 Call對象:
                 Service service = new Service(); Call call = (Call) service.createCall(); 
              • Step3:確定訪問目標:
                call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); call.setOperationName( new QName("http://example3.userguide.samples""serviceMethod") ); 
              • Step4:(可選) 配置參數類型:
                 call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING ); 
              • Step5:發起訪問,并獲取反饋:
                String ret = (String) call.invoke( new Object[] { textToSend } ); 
              • Step6:處理異常:
                try {//上面那些  } catch (AxisFault fault) {et = "Error : " + fault.toString();} 
            • 通過WSDL來訪問WebService(必要步驟,以Example6為例)
              • WSDL: Web Service Description Language Web服務器描述語言是用XML文檔來描述Web服務的標準,是Web服務的接口定義語言,由Ariba、Intel、IBM、MS等共同提出,通過WSDL,可描述Web服務的三個基本屬性:? 服務做些什么——服務所提供的操作(方法) ?#22914;何訪問服務——和服務交互的數據格式以及必要協議 ?#26381;務位于何處——協議相關的地址,如URL
              • Step1:獲得WSDL文件
                • 方式1:?WSDL http://<host>/axis/services/<service-name>?wsdl http://<host>/axis/*.jws?wsdl
                • 方式2:JAVA2WSDL工具 % java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl -l"http://localhost:8080/axis/services/WidgetPrice" -n "urn:Example6" -p"samples.userguide.example6" "urn:Example6" samples.userguide.example6.WidgetPrice
                  Where: -o indicates the name of the output WSDL file -l indicates the location of the service -n is the target namespace of the WSDL file -p indicates a mapping from the package to a namespace. There may be multiple mappings. the class specified contains the interface of the webservice.
              • Step2:通過WSDL2JAVA工具獲得輔助類 % java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true -N urn:Example6 samples.userguide.example6 wp.wsdl
                WidgetPriceSoapBindingImpl.java : Java file containing the default server implementation of the WidgetPrice web service. You will need to modify the *SoapBindingImpl file to add your implementation WidgetPrice.java: 定義了Web服務接口 WidgetPriceService.java: 定義了用于獲取Web服務接口的方法。 WidgetPriceServiceLocator.java: 定義了用于獲取Web服務接口的方法。 WidgetPriceSoapBindingStub.java:Web服務客戶端樁,通過該類與服務器交互。 WidgetPriceSoapBindingSkeleton.java: Server side skeleton. deploy.wsdd: Deployment descriptor undeploy.wsdd: Undeployment descriptor 這幾個JAVA類幫我們處理了大部分的邏輯,我們需要的僅僅是把這些類加到我們的項目然后創建一個我們自己的類來調用它們即可
              • Step3:編寫客戶端代碼: 通過***ServiceLocator構造***Service方法,通過***Service對象獲得提供服務的類對象,進而調用提供服務類對象上的方法,提供服務。
          • 工具使用
            • the Axis TCP Monitor :java org.apache.axis.utils.tcpmon [listenPort targetHost targetPort]
            • the SOAP Monitor :
      • WebService安全
        • 常見攻擊方式
          • Denial of Service to a server
          • Interception and manipulation of messages
          • Forged client requests or Forged server responses
          • attempts to read the server file system/database
          • Attempts to write to the server file system/database
        • 判斷來訪者
          • AXIS不支持判斷請求服務的是誰.可以使用 xmlsec.jar來支援它
          • AXIS推薦使用HTTPS來加強這種安全性
          • Axis 不支持HTTP1.1 Digest Authentication,需要the HttpClient libraries配合工作
        • 可考慮的安全措施
          • Disguise:不要讓人知道你運行了AXIS
          • Cut down the build: 僅僅保留你需要的部分
          • Rename things:換掉默認的名稱,如The AxisServlet, the AdminService, even happyaxis.jsp
          • Stop AxisServlet listing services :axis.enableListQuery =false
          • Keep stack traces out of the responses :axis.development.system =true
          • Edit the .wsdd configuration file, as described in the reference, to return a WSDL resource which is simply an empty <wsdl/> tag.
          • Servlets2.3: use filters for extra authentication
          • Log things
          • Run Axis with reduced Java rights
          • Run the web server with reduced rights
          • Monitor Load
          • Consider 'tripwire' and 'honeypot' endpoints(沒明白)
      • AXIS ANT Task
        • 在axis-ant.jar中定義
        • 主要任務
          • Creating Java files from WSDL
          • Creating WSDL files from Java
          • Talking to the admin service
          • 具體配置看文檔
      • 《Reference Material》
        • 其中注意包括了WSDL2JAVA,JAVA2WSDL的具體使用,以及WSDD的配置信息等技術細節


    平凡而簡單的人一個,無權無勢也無牽無掛。一路廝殺,只進不退,死而后已,豈不爽哉!
    收起對“車”日行千里的羨慕;收起對“馬”左右逢緣的感嘆;目標記在心里面,向前進。一次一步,一步一腳印,跬步千里。
    這個角色很適合現在的


    posted on 2007-09-02 11:51 過河卒 閱讀(2224) 評論(0)  編輯  收藏 所屬分類: Java/Java框架
    文章來自: http://www.blogjava.com/ponzmd/ (彭俊-過河卒) 轉貼請聲明!
    訪問統計:
    主站蜘蛛池模板: 亚洲激情黄色小说| 免费在线观看亚洲| ww亚洲ww在线观看国产| 国产婷婷成人久久Av免费高清| 亚洲国产精品国产自在在线| 免费精品国产自产拍在线观看| 免费va在线观看| 七次郎成人免费线路视频| 中文字幕在线亚洲精品| 91成人免费观看在线观看| 久久青青草原亚洲AV无码麻豆| 久久精品一区二区免费看| 亚洲黄色免费网址| 一二三四免费观看在线电影 | 久久亚洲精品成人综合| 99视频精品全部免费观看| 四虎www成人影院免费观看| 亚洲精品无码一区二区| 大胆亚洲人体视频| a毛片免费播放全部完整| 91天堂素人精品系列全集亚洲| 国产精品免费观看久久| 美美女高清毛片视频黄的一免费 | 一级做a爰片性色毛片免费网站| 亚洲伊人久久成综合人影院| 免费无码H肉动漫在线观看麻豆| 亚洲性天天干天天摸| 欧美日韩国产免费一区二区三区| 国产精品亚洲AV三区| 欧洲亚洲国产清在高| 99久久久国产精品免费无卡顿 | 亚洲激情中文字幕| 18禁成年无码免费网站无遮挡| 免费人成大片在线观看播放| 亚洲av中文无码乱人伦在线播放| A在线观看免费网站大全| 又长又大又粗又硬3p免费视频 | 亚洲图片在线观看| 日韩中文字幕在线免费观看| 中文字幕免费视频精品一| 亚洲中文字幕一二三四区苍井空|