A kiválasztott változat és az aktuális verzió közötti különbségek a következők.
Előző változat mindkét oldalon Előző változat Következő változat | Előző változat | ||
tanszek:oktatas:iss_t:xml-rpc [2023/03/19 14:53] knehez [Server] |
tanszek:oktatas:iss_t:xml-rpc [2024/01/12 10:30] (aktuális) knehez |
||
---|---|---|---|
Sor 1: | Sor 1: | ||
- | ===== XML-RPC ===== | + | ===== XML-RPC tutorial ===== |
- | + | ||
- | XML-RPC is a popular integration method used in web development, especially in the context of web services. It enables developers to create web services that can be accessed by other applications and platforms using simple HTTP requests. | + | |
- | + | ||
- | XML-RPC is a widely adopted integration method because it is platform-independent and can be used with any programming language that supports HTTP and XML. It is also a lightweight protocol that uses a small amount of bandwidth and can be easily implemented on both the client and server sides. | + | |
[[https://www.tutorialspoint.com/xml-rpc/xml_rpc_intro.htm|Introduction to XML-RPC]] | [[https://www.tutorialspoint.com/xml-rpc/xml_rpc_intro.htm|Introduction to XML-RPC]] | ||
- | |||
===== Server ===== | ===== Server ===== | ||
- | <code python> | + | <sxh python> |
from xmlrpc.server import SimpleXMLRPCServer | from xmlrpc.server import SimpleXMLRPCServer | ||
from xmlrpc.server import SimpleXMLRPCRequestHandler | from xmlrpc.server import SimpleXMLRPCRequestHandler | ||
Sor 41: | Sor 36: | ||
# Run the server's main loop | # Run the server's main loop | ||
server.serve_forever() | server.serve_forever() | ||
- | </code> | + | </sxh> |
===== Client ===== | ===== Client ===== | ||
- | <code python> | + | <sxh python> |
import xmlrpc.client | import xmlrpc.client | ||
Sor 55: | Sor 50: | ||
# Print list of available methods | # Print list of available methods | ||
print(s.system.listMethods()) | print(s.system.listMethods()) | ||
- | </code> | + | </sxh> |