﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Stefanie-随笔分类-web services</title><link>http://www.blogjava.net/heiyuchuanxia/category/16284.html</link><description>On The Road of Web Services</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 15:39:23 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 15:39:23 GMT</pubDate><ttl>60</ttl><item><title>Sematic Web Services Summery</title><link>http://www.blogjava.net/heiyuchuanxia/archive/2006/11/12/80691.html</link><dc:creator>Stefanie</dc:creator><author>Stefanie</author><pubDate>Sun, 12 Nov 2006 06:00:00 GMT</pubDate><guid>http://www.blogjava.net/heiyuchuanxia/archive/2006/11/12/80691.html</guid><wfw:comment>http://www.blogjava.net/heiyuchuanxia/comments/80691.html</wfw:comment><comments>http://www.blogjava.net/heiyuchuanxia/archive/2006/11/12/80691.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heiyuchuanxia/comments/commentRss/80691.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heiyuchuanxia/services/trackbacks/80691.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: The Summery of OWL-S 1.2												OWL-S is an ontology, within the OWL-based framework of the Semantic Web, for describing Web services.																												This documen...&nbsp;&nbsp;<a href='http://www.blogjava.net/heiyuchuanxia/archive/2006/11/12/80691.html'>阅读全文</a><img src ="http://www.blogjava.net/heiyuchuanxia/aggbug/80691.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heiyuchuanxia/" target="_blank">Stefanie</a> 2006-11-12 14:00 <a href="http://www.blogjava.net/heiyuchuanxia/archive/2006/11/12/80691.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RESTful Web Services</title><link>http://www.blogjava.net/heiyuchuanxia/archive/2006/10/14/75126.html</link><dc:creator>Stefanie</dc:creator><author>Stefanie</author><pubDate>Sat, 14 Oct 2006 07:26:00 GMT</pubDate><guid>http://www.blogjava.net/heiyuchuanxia/archive/2006/10/14/75126.html</guid><wfw:comment>http://www.blogjava.net/heiyuchuanxia/comments/75126.html</wfw:comment><comments>http://www.blogjava.net/heiyuchuanxia/archive/2006/10/14/75126.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/heiyuchuanxia/comments/commentRss/75126.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heiyuchuanxia/services/trackbacks/75126.html</trackback:ping><description><![CDATA[
		<b>
				<p class="MsoNormal" style="MARGIN: 0pt; TEXT-ALIGN: center" align="center">
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 18pt">RESTful Web Services<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span>
						</b>
				</p>
				<font size="4">
						<br />1. The Fundamental</font>
		</b>
		<font size="4"> <br /></font>   1.1 What’s REST <br /><b>            REST: REpresentational State Transfer</b> <br /><b>            It’s an architecture style (the stateless client-server architecture), not a toolkit.</b> <br />   1.2 REST defined <br /><b><font size="1">            ●</font></b><b>Resources are identified by uniform resource identifiers (URIs)</b> <br /><b><font size="1">            ● </font></b><b>Resources are manipulated through their representations</b> <br /><b><font size="1">            ●</font></b><b>Messages are self-descriptive and stateless</b> <br /><b><font size="1">            ●</font></b><b>Multiple representations are accepted or sent </b><br /><b><font size="1">            ●</font></b><b>Hypertext is the engine of application state</b> <br />   1.3 Representation <br /><b>            Just think that </b><b>a web page is a </b><b>representation<em></em></b><b>of a resource, and the customer can get the resource from the URLs. Clients can then request a specific representation of the concept from the representations the server makes available.</b> <br />   1.4 State <br /><b>         “State” means application/session state, maintained as part of the content transferred from client to server back to client.</b><b>Application state is the information necessary to understand the context of an interaction.</b><b>The "stateless" constraint means that all messages must include all </b><b>application </b><b>state.</b> <br />     1.5 Transfer of state <br /><b><font size="1">         ●</font></b><b>Connectors (client, server, cache, resolver, and tunnel) are unrelated to sessions</b> <br /><b><font size="1">         ●</font></b><b>State is maintained by being transferred from clients to servers and back to clients</b><br /><b><br />The Conclusion:</b> <br /><b>         So we can say that “REST is a </b><b>post hoc<em></em></b><b>description of the Web”. Unsurprisingly, HTTP is the most RESTful protocol. <br /></b><br />    1.6 REST messages <br /><b>           REST can support any media type, but XML is expected to be the most popular transport for structured information, it can make a resource have as many representations as you need,</b><b>The XmlHttpRequest object lets you do REST from </b><b>inside<em></em></b><b>a web page.</b><b></b><b>Unlike SOAP and XML-RPC, REST does not really require a new message format; it’s just use URLs to transfer the messages as parameters.</b> <br />   1.7 Web based application <br /><b>          A Web-based application is a dynamically changing graph of</b> <br /><b>         – </b><b>State representations (pages)</b> <br /><b>         – </b><b>Potential transitions (links) between states</b> <br />   1.8 OOP on REST <br /><b>          Every useful data object has an address;</b><b>Resources themselves are the targets for method calls; the list of methods is fixed for all resources.</b> <br />   1.9 REST and RPC <br /><b><font size="1">            ●</font></b><b>REST is, in a sense, a species of RPC, except the methods have been defined in advance. REST is </b><b>incompatible </b><b>with "end-point" RPC. So REST is architecture not only a design style.</b> <br /><b><font size="1">            ●</font></b><b>Most RPC applications don't adhere to the REST philosophy.</b> <br /><b><font size="1">            ●</font></b><b>It’s possible to work with RPC-style tools to produce REST results.</b> <br />   1.10 POST on the REST attitude <br /><b>          </b><b>There are two views on POST, the first is “</b><b>POST lets you pass a whole lot of parameters and get something back, bypassing caches.”, and the other is “POST lets you create new resources that are related to old ones.” The second view is on the REST point.</b><br /><b> </b><br /><b><font size="4">2. RESTful Web Services</font></b> <br /><b>         In the web services world, REpresentational State Transfer (REST) is a key design idiom that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URLs. </b><b>The Java API for XML Web Services (JAX-WS) provides full support for building and deploying RESTful web services.</b> <br /><strong>  </strong> 2.1 When to use REST <br /><strong><font size="1">            ●</font> The web services are completely stateless.</strong> <br /><b><font size="1">            ●</font></b><b>A caching infrastructure can be leveraged for performance.</b> <br /><b><font size="1">            ●</font></b><b>The service producer and service consumer have a mutual understanding of the context and content being passed along. </b><br /><b><font size="1">            ●</font></b><b>Bandwidth is particularly important and needs to be limited. </b><br /><b><font size="1">            ●</font></b><b>Web service delivery or aggregation into existing web sites can be enabled easily with a RESTful style. </b><br />2.2 How to build a RESTful Web Service <br /><strong>         JAX-WS enables building RESTful endpoints through a <code>javax.xml.ws.Provider</code> interface in the API. <code>Provider</code> is a generic interface that can be implemented by a class as a dynamic alternative to a service endpoint interface (SEI).</strong><br /><b>       The two important annotations in development:</b><br /><b>       1. @WebServiceProvider (wsdl=”…….”)   //wsdl can omit</b><br /><b>       2. @BindingType (value=HTTPBinding.HTTP_BINDING)   //Must</b><br /><b>       </b><br /><b>Reference:</b><br /><b>  </b><b>1. </b><b>RESTful Web Services by </b><em><b>Sameer Tyagi:</b></em> <br /><em><b>            http://java.sun.com/developer/technicalArticles/WebServices/restful/</b></em> <br /><em>  <strong>2. </strong></em><strong>Publishing a RESTful Web Service with JAX-WS by Doug Kohlert:</strong>                     <br />          <em><strong>http://weblogs.java.net/blog/kohlert/archive/2006/01/publishing_a_re.html<br /></strong> </em><strong>3. Make Your Service RESTFul by Robin Zou: <br /></strong>          <strong><em>http://zouzhile.googlepages.com/basicrestful</em></strong><br /> <img src ="http://www.blogjava.net/heiyuchuanxia/aggbug/75126.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heiyuchuanxia/" target="_blank">Stefanie</a> 2006-10-14 15:26 <a href="http://www.blogjava.net/heiyuchuanxia/archive/2006/10/14/75126.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>