<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 過河卒 閱讀(2211) 評論(0)  編輯  收藏 所屬分類: Java/Java框架
    文章來自: http://www.blogjava.com/ponzmd/ (彭俊-過河卒) 轉貼請聲明!
    訪問統計:
    主站蜘蛛池模板: 国产美女被遭强高潮免费网站 | 日本免费一本天堂在线| 日韩精品一区二区亚洲AV观看| 久久精品免费视频观看| 亚洲av日韩av不卡在线观看 | 亚洲国产美女精品久久久| 猫咪社区免费资源在线观看 | 免费无码国产在线观国内自拍中文字幕| 精品免费国产一区二区三区| 亚洲乱色伦图片区小说| 国产国产人免费人成免费视频| 香港特级三A毛片免费观看| 亚洲第一页日韩专区| 久久www免费人成看国产片| 日本红怡院亚洲红怡院最新| 桃子视频在线观看高清免费视频| 久久精品九九亚洲精品| 99久久免费国产精品特黄| 亚洲国产精品无码中文lv| 全亚洲最新黄色特级网站| 国产精品午夜免费观看网站| 久久被窝电影亚洲爽爽爽| 免费在线视频你懂的| 亚洲AV第一成肉网| 亚洲精品无码Av人在线观看国产| 91在线手机精品免费观看| 亚洲国产AV无码一区二区三区| 亚洲国产精品无码久久久久久曰 | 麻豆国产精品免费视频| 亚洲狠狠色丁香婷婷综合| 亚洲乳大丰满中文字幕| 四虎在线免费视频| 人妻无码中文字幕免费视频蜜桃 | 免费A级毛片av无码| 亚洲国产精品无码久久| 亚洲日韩aⅴ在线视频| 成年免费大片黄在线观看岛国| 最新亚洲人成无码网www电影| 亚洲AV无码日韩AV无码导航| 久久久久国色AV免费观看性色| a免费毛片在线播放|