⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jaxrpc2.html

📁 j2eePDF格式的电子书
💻 HTML
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  <head>    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />    <meta http-equiv="Content-Style-Type" content="text/css" />    <title>Types Supported By JAX-RPC</title>    <link rel="StyleSheet" href="document.css" type="text/css" media="all" />    <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" />    <link rel="Table of Contents" href="J2EETutorialTOC.html" />    <link rel="Previous" href="JAXRPC.html" />    <link rel="Next" href="JAXRPC3.html" />    <link rel="Index" href="J2EETutorialIX.html" />  </head>  <body>    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="JAXRPC.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXRPC3.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <blockquote><a name="wp79859"> </a><h2 class="pHeading1">Types Supported By JAX-RPC</h2><a name="wp79861"> </a><p class="pBody">Behind the scenes, JAX-RPC maps types of the Java programming language to XML/WSDL definitions. For example, JAX-RPC maps the <code class="cCode">java.lang.String</code> class to the <code class="cCode">xsd:string</code> XML data type. Application developers don't need to know the details of these mappings, but they should be aware that not every class in the Java 2 Platform, Standard Edition (J2SE) can be used as a method parameter or return type in JAX-RPC.</p><a name="wp79865"> </a><h3 class="pHeading2">J2SE SDK Classes </h3><a name="wp79866"> </a><p class="pBody">JAX-RPC supports the following J2SE SDK classes:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">java.lang.Booleanjava.lang.Bytejava.lang.Doublejava.lang.Floatjava.lang.Integerjava.lang.Longjava.lang.Shortjava.lang.Stringjava.math.BigDecimaljava.math.BigIntegerjava.net.URIjava.util.Calendarjava.util.Date<a name="wp82013"> </a></pre></div><a name="wp79902"> </a><h3 class="pHeading2">Primitives</h3><a name="wp79903"> </a><p class="pBody">JAX-RPC supports the following primitive types of the Java programming language:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">booleanbytedoublefloatintlongshort<a name="wp79904"> </a></pre></div><a name="wp79906"> </a><h3 class="pHeading2">Arrays</h3><a name="wp79907"> </a><p class="pBody">JAX-RPC also supports arrays with members of supported JAX-RPC types. Examples of supported arrays are <code class="cCode">int[]</code> and <code class="cCode">String[]</code>. Multidimensional arrays, such as <code class="cCode">BigDecimal[][]</code>, are also supported.</p><a name="wp79908"> </a><h3 class="pHeading2">Value Types</h3><a name="wp82058"> </a><p class="pBody">A <em class="cEmphasis">value type</em> is a class whose state may be passed between a client and remote service as a method parameter or return value. For example, in an application for a university library, a client might call a remote procedure with a value type parameter named <code class="cCode">Book</code>, a class that contains the fields <code class="cCode">Title</code>, <code class="cCode">Author</code>, and <code class="cCode">Publisher</code>.</p><a name="wp79911"> </a><p class="pBody">To be supported by JAX-RPC, a value type must conform to the following rules:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp79912"> </a><div class="pSmartList1"><li>It must have a public default constructor.</li></div><a name="wp79913"> </a><div class="pSmartList1"><li>It must not implement (either directly or indirectly) the <code class="cCode">java.rmi.Remote</code> interface.</li></div><a name="wp82087"> </a><div class="pSmartList1"><li>Its fields must be supported JAX-RPC types.</li></div></ul></div><a name="wp82088"> </a><p class="pBody">The value type may contain public, private, or protected fields. The field of a value type must meet these requirements:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp79916"> </a><div class="pSmartList1"><li>A public field cannot be final or transient.</li></div><a name="wp79917"> </a><div class="pSmartList1"><li>A non-public field must have corresponding getter and setter methods. </li></div></ul></div><a name="wp79918"> </a><h3 class="pHeading2">JavaBeans Components</h3><a name="wp115199"> </a><p class="pBody">JAX-RPC also supports JavaBeans components, which must conform to the same set of rules as application classes. In addition, a JavaBeans component must have a getter and setter method for each bean property. The type of the bean property must be a supported JAX-RPC type. For an example of a JavaBeans component, see the section <a  href="CB3.html#wp65001">Service Implementation</a>.</p>    </blockquote>   <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="JAXRPC.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXRPC3.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -