Mercurial > hg > Members > nobuyasu > tightVNCProxy
comparison apache-xmlrpc-3.1.3/docs/introspection.html @ 151:db5f735fd2b4
add xml-rpc.jar
author | e085711 |
---|---|
date | Sat, 10 Sep 2011 04:13:50 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:a2b5149bbbe6 | 151:db5f735fd2b4 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 <html xmlns="http://www.w3.org/1999/xhtml"> | |
14 <head> | |
15 <title>ws-xmlrpc - Advanced Programming Topics</title> | |
16 <style type="text/css" media="all"> | |
17 @import url("./css/maven-base.css"); | |
18 @import url("./css/maven-theme.css"); | |
19 @import url("./css/site.css"); | |
20 </style> | |
21 <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> | |
22 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | |
23 </head> | |
24 <body class="composite"> | |
25 <div id="banner"> | |
26 <a href="" id="bannerLeft"> | |
27 | |
28 <img src="images/xmlrpc-logo.gif" alt="" /> | |
29 | |
30 </a> | |
31 <div class="clear"> | |
32 <hr/> | |
33 </div> | |
34 </div> | |
35 <div id="breadcrumbs"> | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 <div class="xleft"> | |
45 Last Published: 2010-02-06 | |
46 </div> | |
47 <div class="xright"> <a href="http://www.apache.org/" class="externalLink">Apache</a> | |
48 | | |
49 <a href="../">Webservices</a> | |
50 | | |
51 <a href="">XML-RPC</a> | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | |
60 </div> | |
61 <div class="clear"> | |
62 <hr/> | |
63 </div> | |
64 </div> | |
65 <div id="leftColumn"> | |
66 <div id="navcolumn"> | |
67 | |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | |
74 | |
75 <h5>XML-RPC</h5> | |
76 <ul> | |
77 | |
78 <li class="none"> | |
79 <a href="index.html">Overview</a> | |
80 </li> | |
81 | |
82 <li class="none"> | |
83 <a href="download.html">Download</a> | |
84 </li> | |
85 | |
86 <li class="none"> | |
87 <a href="changes-report.html">Changes</a> | |
88 </li> | |
89 | |
90 <li class="none"> | |
91 <a href="mail-lists.html">Mailing Lists</a> | |
92 </li> | |
93 | |
94 <li class="none"> | |
95 <a href="contributing.html">Contributing</a> | |
96 </li> | |
97 | |
98 <li class="none"> | |
99 <a href="xmlrpc2">XML-RPC 2</a> | |
100 </li> | |
101 | |
102 <li class="none"> | |
103 <a href="links.html">Links</a> | |
104 </li> | |
105 </ul> | |
106 <h5>Documentation</h5> | |
107 <ul> | |
108 | |
109 <li class="none"> | |
110 <a href="client.html">Client Classes</a> | |
111 </li> | |
112 | |
113 <li class="none"> | |
114 <a href="server.html">Server Side XML-RPC</a> | |
115 </li> | |
116 | |
117 <li class="none"> | |
118 <a href="extensions.html">Vendor Extensions</a> | |
119 </li> | |
120 | |
121 <li class="none"> | |
122 <a href="ssl.html">SSL</a> | |
123 </li> | |
124 | |
125 <li class="none"> | |
126 <strong>Introspection</strong> | |
127 </li> | |
128 | |
129 <li class="none"> | |
130 <a href="advanced.html">Advanced Techniques</a> | |
131 </li> | |
132 | |
133 <li class="none"> | |
134 <a href="types.html">XML-RPC Types</a> | |
135 </li> | |
136 | |
137 <li class="none"> | |
138 <a href="faq.html">FAQ</a> | |
139 </li> | |
140 | |
141 <li class="none"> | |
142 <a href="apidocs/index.html">Javadocs</a> | |
143 </li> | |
144 </ul> | |
145 <h5>Project Documentation</h5> | |
146 <ul> | |
147 | |
148 | |
149 | |
150 | |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | |
163 | |
164 | |
165 | |
166 | |
167 | |
168 | |
169 | |
170 | |
171 | |
172 | |
173 | |
174 <li class="collapsed"> | |
175 <a href="project-info.html">Project Information</a> | |
176 </li> | |
177 | |
178 | |
179 | |
180 | |
181 | |
182 | |
183 | |
184 | |
185 | |
186 <li class="collapsed"> | |
187 <a href="project-reports.html">Project Reports</a> | |
188 </li> | |
189 </ul> | |
190 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> | |
191 <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img> | |
192 </a> | |
193 | |
194 | |
195 | |
196 | |
197 | |
198 | |
199 | |
200 | |
201 </div> | |
202 </div> | |
203 <div id="bodyColumn"> | |
204 <div id="contentBox"> | |
205 <p>Apache XML-RPC supports XML-RPC introspection, as specified by <a href="http://scripts.incutio.com/xmlrpc/introspection.html" class="externalLink"> http://scripts.incutio.com/xmlrpc/introspection.html</a>. This page describes how to configure the XML-RPC server for introspection.</p> | |
206 <div class="section"><h2>What is introspection?</h2> | |
207 <p>Introspection is the servers ability to provide metadata to the client. The client may ask "What method names does the server offer?", "How do I invoke method 'foo'?", or "Can you give me help on method 'foo'?".</p> | |
208 <p>The client does so by invoking the special methods "system.listMethods", "system.methodSignature" and "system.methodHelp". These are described in detail in the non-official specification for XML-RPC introspection, which you'll find at <a href="http://scripts.incutio.com/xmlrpc/introspection.html" class="externalLink"> http://scripts.incutio.com/xmlrpc/introspection.html</a>.</p> | |
209 </div> | |
210 <div class="section"><h2>How do I configure the server for introspection?</h2> | |
211 <p>The server requires a special mapping. Basically, you simply add a "system" handler, which is implemented by the class <tt>XmlRpcSystemImpl</tt>. Here's how you would do that in the <tt>XmlRpcServlet</tt>:</p> | |
212 <div class="source"><pre> public class MyXmlRpcServlet extends XmlRpcServlet { | |
213 protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() | |
214 throws XmlRpcException { | |
215 PropertyHandlerMapping mapping = | |
216 (PropertyHandlerMapping) newXmlRpcHandlerMapping(); | |
217 XmlRpcSystemImpl.addSystemHandler(mapping); | |
218 } | |
219 } | |
220 </pre> | |
221 </div> | |
222 <p>Quite similar, you would override a protected method, if you prefer using the <tt>WebServer</tt> class:</p> | |
223 <div class="source"><pre> public class MyWebServer extends WebServer { | |
224 public MyWebServer(int pPort) { | |
225 super(pPort); | |
226 } | |
227 | |
228 protected XmlRpcStreamServer newXmlRpcStreamServer(){ | |
229 XmlRpcStreamServer xmlRpcStreamServer = new ConnectionServer(); | |
230 PropertyHandlerMapping mapping = (PropertyHandlerMapping) xmlRpcStreamServer.getHandlerMapping(); | |
231 XmlRpcSystemImpl.addSystemHandler(mapping); | |
232 return xmlRpcStreamServer; | |
233 } | |
234 } | |
235 </pre> | |
236 </div> | |
237 </div> | |
238 | |
239 </div> | |
240 </div> | |
241 <div class="clear"> | |
242 <hr/> | |
243 </div> | |
244 <div id="footer"> | |
245 <div class="xright">© | |
246 2001-2010 | |
247 | |
248 The Apache Software Foundation | |
249 | |
250 | |
251 | |
252 | |
253 | |
254 | |
255 | |
256 | |
257 </div> | |
258 <div class="clear"> | |
259 <hr/> | |
260 </div> | |
261 </div> | |
262 </body> | |
263 </html> |