J2EE構造web service

來源:互聯網
上載者:User
在這篇文章,我向java程式開發人員介紹service-oriented architecture (SOA),我將解釋怎麼使用J2EE 1.4去建立一個web 服務使其能操作和方便的通過J2EE1.4來適應應用服務(例如: Oracle Application Server)。
 Web Services Architecture
         讓我們在學習web services部署J2EE platform之前,我們先瞭解web service 的主要結構。
         通過網路我們可以找到一些關於 web services的定義、發布、和調用。一個web service,如圖一
                                                                 圖一
        現在有兩種web services:“RPC style and document style”,RPC-style web services是在最初受歡迎的。但在近幾年是document-style是首選的web services。
       RPC-style web services是遠程程式調用,代表相互互動。RPC-style web services在互動資訊中調用和返回必須先符合明確的簽名,在應用中非常不方便。相反,document-style web services 通過用xml,來改變發送和接收應用。
        許多的開發人員覺得web services是一個有活力的技術,他繼承SOA。因為它提供一個相互作用在不同的平台和輕便的技術。例如xml,soap,and http。
   What Are Web Services Made of?
        在web service首先要先定義A Web Services Definition Language (WSDL; pronounced "wizdle") 文檔。
這個WSDL提供一個完全的描述web service,包括連接埠、操作、資訊類型等。
Here is a simple example of a WSDL document that describes a HelloWorld web service:
<definitions
 name="HelloService"
 targetNamespace="http://oracle.j2ee.ws/ejb/Hello"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.