SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
© Peter R. Egli 2015
1/11
Rev. 1.60
XML-RPC indigoo.com
INTRODUCTION TO XML-RPC,
A SIMPLE XML-BASED RPC MECHANISM
XML-RPC
Peter R. Egli
INDIGOO.COM
© Peter R. Egli 2015
2/11
Rev. 1.60
XML-RPC indigoo.com
Contents
1. What is XML-RPC?
2. XML-RPC architecture
3. XML-RPC protocol
4. XML-RPC server implementation in Java
5. Where to use XML-RPC
© Peter R. Egli 2015
3/11
Rev. 1.60
XML-RPC indigoo.com
1. What is XML-RPC?
XML-RPC is a remote procedure call protocol using XML as data format and HTTP as transport
protocol.
Advantages of XML-RPC:
• Simple mechanism to call remote procedures on a machine with a different OS.
• XML-RPC is language and platform independent. XML-RPC libraries are available in Java
and other languages (e.g. .Net: http://xml-rpc.net/).
• XML-RPC is not more than its name implies and thus is very simple and lean (very short
specification, see http://xmlrpc.scripting.com/spec.html).
Protocols and techniques behind XML-RPC:
1. XML - Formatting of the request and response and the arguments (wire protocol)
2. RPC - Remote call of procedures.
3. HTTP - Transport protocol for the XML („firewall-friendly“).
<methodCall>
…
</methodCall>
HTTP HTTP
<methodResponse>
…
</methodResponse>
XML-
RPC
server
XML-
RPC
client
<methodCall>
…
</methodCall>
<methodResponse>
…
</methodResponse>
© Peter R. Egli 2015
4/11
Rev. 1.60
XML-RPC indigoo.com
2. XML-RPC architecture
The client application accesses the server through a URL (= location where service resides).
The XML-RPC listener receives requests and passes these to the handler (= user defined class
servicing the request).
Client
application
XML-RPC
HTTP
TCP
IP
XML-RPC
HTTP
TCP
IP
XML-RPC
Handler
XML-RPC
listener
service.method call
response
XML request
XML reply
HTTP POST
HTTP reply
© Peter R. Egli 2015
5/11
Rev. 1.60
XML-RPC indigoo.com
3. XML-RPC protocol (1/5)
Request (example from www.xmlrpc.com/spec):
• The XML body of the HTTP request contains a single method call (getStateName).
• The method is called on a service name under which the method is available.
• The URL does not need to be specified (service is indicated by the string before the dot
in the method name element).
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value>
<i4>41</i4>
</value>
</param>
</params>
</methodCall>
HTTP header (request)
with required header fields (blue)
XML body
List of request
parameters
© Peter R. Egli 2015
6/11
Rev. 1.60
XML-RPC indigoo.com
List of
return
values
3. XML-RPC protocol (2/5)
Response (example from www.xmlrpc.com/spec):
• The HTTP return code is always „200 OK“, even in case of an XML-RPC fault (see below).
• The response contains a single value (like a return argument of a local procedure call).
HTTP/1.1 200 OK
Connection: close
Content-Length: 158
Content-Type: text/xml
Date: Fri, 17 Jul 1998 19:55:08 GMT
Server: UserLand Frontier/5.1.2-WinNT
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string>South Dakota</string>
</value>
</param>
</params>
</methodResponse>
HTTP header (response)
with required header fields (blue)
XML body
© Peter R. Egli 2015
7/11
Rev. 1.60
XML-RPC indigoo.com
3. XML-RPC protocol (3/5)
Response with a failure (example from www.xmlrpc.com/spec):
• Even in case of an XML-RPC level failure the HTTP return code is 200 OK.
• The failure is indicated with the <fault> element.
HTTP/1.1 200 OK
Connection: close
Content-Length: 426
Content-Type: text/xml
Date: Fri, 17 Jul 1998 19:55:02 GMT
Server: UserLand Frontier/5.1.2-WinNT
<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member><name>faultCode</name><value><int>4</int></value></member>
<member><name>faultString</name>
<value><string>Too many parameters.</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
© Peter R. Egli 2015
8/11
Rev. 1.60
XML-RPC indigoo.com
3. XML-RPC protocol (4/5)
Parameter types (1/2):
Base types:
XML-RPC has a very limited set of base types:
Type Description Example
<i4> or <int> Four-byte signed integer -12
<boolean> 0 (false) or 1 (true) 1
<string> ASCII string (string is default) Hi!
<double> Double-precision 3.1415
<dateTime.iso8601> Date/time 19980717T14:08:55
<base64> Base64-encoded binary eW91IGNhbid
Structs:
Structs contain elements (<member>) with a <name> and <value> element ("named" values).
Structs may be recursive (value in a struct may be a struct again).
<struct>
<member>
<name>lowerBound</name>
<value><i4>18</i4></value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct>
© Peter R. Egli 2015
9/11
Rev. 1.60
XML-RPC indigoo.com
3. XML-RPC protocol (5/5)
Parameter types (2/2):
Arrays:
An array contains a single <data> element that in turn contains an array of <value> elements.
An array differs from a struct in that its elements are simple values (without <name> element).
Arrays may be recursive (value in array may be an array or also a struct).
<array>
<data>
<value><i4>12</i4></value>
<value><string>Egypt</string></value>
<value><boolean>0</boolean></value>
<value><i4>-31</i4></value>
</data>
</array>
© Peter R. Egli 2015
10/11
Rev. 1.60
XML-RPC indigoo.com
4. XML-RPC server implementation in Java
The class loader provides lookup service (find the serving class from request name).
The XML-RPC listener does unmarshalling / marshalling of parameters.
The XML-RPC handler is the user class that handles the request (implementation of the
actual procedure call).
WebServer
XML-RPC
listener
Classloader
properties
Load mapping into
class loader
XML-RPC
handler
(user class)
Defines the mapping
from service name
to class name serving
the requests
HTTP protocol
front-end
Passes the request to
the XML-RPC server
Consults class
loader to get
the serving class
Unpack the XML, get the serving
class, convert the arguments (C  S)
Pack the response into XML (S  C)
Pass the request
to the serving
class
HTTP
© Peter R. Egli 2015
11/11
Rev. 1.60
XML-RPC indigoo.com
5. Where to use XML-RPC
• XML-RPC may be suited for simple applications or situations where clients implemented in
different technologies need to interact with a server with simple read-write operations where
a more complex middleware technology would be overkill.
• XML-RPC is a solution to integrate different platforms with a simple middleware.
• XML-RPC is very simple so it can be implemented also for platforms without open source or
commercially available XML-RPC libraries.
Java
PL/1
C++
RMI / IIOP
CORBA
DCOM
CORBA
runtime
DCOM
runtime
C++
Integration of different
platforms leads to complexity
on the server side
Java
PL/1
C++
XML-RPC
runtime
C++ XML-RPC as a common integration
technology reduces complexity on
the server side (but adds complexity
on the client side)
XML-RPC
stub
HTTP

Más contenido relacionado

La actualidad más candente

J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architectureSuman Behara
 
Software project management
Software project managementSoftware project management
Software project managementR A Akerkar
 
Waterfall model ppt final
Waterfall model ppt  finalWaterfall model ppt  final
Waterfall model ppt finalshiva krishna
 
Privacy Enhanced Mail (PEM)
Privacy Enhanced Mail (PEM)Privacy Enhanced Mail (PEM)
Privacy Enhanced Mail (PEM)Palash Mehar
 
Software Engineering (Project Planning & Estimation)
Software Engineering (Project Planning &  Estimation)Software Engineering (Project Planning &  Estimation)
Software Engineering (Project Planning & Estimation)ShudipPal
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
Software and Hardware Reliability
Software and Hardware ReliabilitySoftware and Hardware Reliability
Software and Hardware ReliabilitySandeep Patalay
 
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMIEvolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMInimmik4u
 
MG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENTMG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENTKathirvel Ayyaswamy
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network pptextraganesh
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Peter R. Egli
 
IOT privacy and Security
IOT privacy and SecurityIOT privacy and Security
IOT privacy and Securitynoornabi16
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Vibhawa Nirmal
 

La actualidad más candente (20)

J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
 
Software project management
Software project managementSoftware project management
Software project management
 
Waterfall model ppt final
Waterfall model ppt  finalWaterfall model ppt  final
Waterfall model ppt final
 
Privacy Enhanced Mail (PEM)
Privacy Enhanced Mail (PEM)Privacy Enhanced Mail (PEM)
Privacy Enhanced Mail (PEM)
 
Software Engineering (Project Planning & Estimation)
Software Engineering (Project Planning &  Estimation)Software Engineering (Project Planning &  Estimation)
Software Engineering (Project Planning & Estimation)
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
Software and Hardware Reliability
Software and Hardware ReliabilitySoftware and Hardware Reliability
Software and Hardware Reliability
 
Proxy
ProxyProxy
Proxy
 
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMIEvolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMI
 
53426980 tcp-ip
53426980 tcp-ip53426980 tcp-ip
53426980 tcp-ip
 
MG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENTMG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENT
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Web services SOAP
Web services SOAPWeb services SOAP
Web services SOAP
 
TCP/ IP
TCP/ IP TCP/ IP
TCP/ IP
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)
 
IOT privacy and Security
IOT privacy and SecurityIOT privacy and Security
IOT privacy and Security
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 

Destacado

Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTPradeep Kumar
 
Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical ApproachMadhaiyan Muthu
 
Mule ESB
Mule ESBMule ESB
Mule ESBniravn
 
Matrimonial web site Documentation
Matrimonial web site DocumentationMatrimonial web site Documentation
Matrimonial web site Documentationhome
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 

Destacado (6)

Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical Approach
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Matrimonial web site Documentation
Matrimonial web site DocumentationMatrimonial web site Documentation
Matrimonial web site Documentation
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 

Similar a XML-RPC (XML Remote Procedure Call)

Boost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSBoost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSInformation Development World
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol BuffersMatt O'Keefe
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
Best practices for large oracle apps r12 implementations apps14
Best practices for large oracle apps r12 implementations apps14Best practices for large oracle apps r12 implementations apps14
Best practices for large oracle apps r12 implementations apps14Ajith Narayanan
 
Bt0083 server side programing 2
Bt0083 server side programing  2Bt0083 server side programing  2
Bt0083 server side programing 2Techglyphs
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web servicesnbuddharaju
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Build a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded SystemBuild a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded SystemJian-Hong Pan
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeMarco Gralike
 
Micro HTTP Server for Embedded
Micro HTTP Server for EmbeddedMicro HTTP Server for Embedded
Micro HTTP Server for Embeddedexeri0n1
 

Similar a XML-RPC (XML Remote Procedure Call) (20)

xml rpc
xml rpcxml rpc
xml rpc
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
 
Boost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSBoost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BS
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
Tibco business works
Tibco business worksTibco business works
Tibco business works
 
Best practices for large oracle apps r12 implementations apps14
Best practices for large oracle apps r12 implementations apps14Best practices for large oracle apps r12 implementations apps14
Best practices for large oracle apps r12 implementations apps14
 
HTTP Basic
HTTP BasicHTTP Basic
HTTP Basic
 
Bt0083 server side programing 2
Bt0083 server side programing  2Bt0083 server side programing  2
Bt0083 server side programing 2
 
Lambdas and Laughs
Lambdas and LaughsLambdas and Laughs
Lambdas and Laughs
 
Servlet 3.0
Servlet 3.0Servlet 3.0
Servlet 3.0
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web services
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Network basics
Network basicsNetwork basics
Network basics
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
Build a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded SystemBuild a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded System
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
 
Micro HTTP Server for Embedded
Micro HTTP Server for EmbeddedMicro HTTP Server for Embedded
Micro HTTP Server for Embedded
 

Más de Peter R. Egli

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosPeter R. Egli
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking ConceptsPeter R. Egli
 
Communication middleware
Communication middlewareCommunication middleware
Communication middlewarePeter R. Egli
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Peter R. Egli
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Peter R. Egli
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET PlatformPeter R. Egli
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud ComputingPeter R. Egli
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration TechnologiesPeter R. Egli
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyPeter R. Egli
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Peter R. Egli
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingPeter R. Egli
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBAPeter R. Egli
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Peter R. Egli
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging ServicePeter R. Egli
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 

Más de Peter R. Egli (20)

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking Concepts
 
Communication middleware
Communication middlewareCommunication middleware
Communication middleware
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration Technologies
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technology
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Web services
Web servicesWeb services
Web services
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

XML-RPC (XML Remote Procedure Call)

  • 1. © Peter R. Egli 2015 1/11 Rev. 1.60 XML-RPC indigoo.com INTRODUCTION TO XML-RPC, A SIMPLE XML-BASED RPC MECHANISM XML-RPC Peter R. Egli INDIGOO.COM
  • 2. © Peter R. Egli 2015 2/11 Rev. 1.60 XML-RPC indigoo.com Contents 1. What is XML-RPC? 2. XML-RPC architecture 3. XML-RPC protocol 4. XML-RPC server implementation in Java 5. Where to use XML-RPC
  • 3. © Peter R. Egli 2015 3/11 Rev. 1.60 XML-RPC indigoo.com 1. What is XML-RPC? XML-RPC is a remote procedure call protocol using XML as data format and HTTP as transport protocol. Advantages of XML-RPC: • Simple mechanism to call remote procedures on a machine with a different OS. • XML-RPC is language and platform independent. XML-RPC libraries are available in Java and other languages (e.g. .Net: http://xml-rpc.net/). • XML-RPC is not more than its name implies and thus is very simple and lean (very short specification, see http://xmlrpc.scripting.com/spec.html). Protocols and techniques behind XML-RPC: 1. XML - Formatting of the request and response and the arguments (wire protocol) 2. RPC - Remote call of procedures. 3. HTTP - Transport protocol for the XML („firewall-friendly“). <methodCall> … </methodCall> HTTP HTTP <methodResponse> … </methodResponse> XML- RPC server XML- RPC client <methodCall> … </methodCall> <methodResponse> … </methodResponse>
  • 4. © Peter R. Egli 2015 4/11 Rev. 1.60 XML-RPC indigoo.com 2. XML-RPC architecture The client application accesses the server through a URL (= location where service resides). The XML-RPC listener receives requests and passes these to the handler (= user defined class servicing the request). Client application XML-RPC HTTP TCP IP XML-RPC HTTP TCP IP XML-RPC Handler XML-RPC listener service.method call response XML request XML reply HTTP POST HTTP reply
  • 5. © Peter R. Egli 2015 5/11 Rev. 1.60 XML-RPC indigoo.com 3. XML-RPC protocol (1/5) Request (example from www.xmlrpc.com/spec): • The XML body of the HTTP request contains a single method call (getStateName). • The method is called on a service name under which the method is available. • The URL does not need to be specified (service is indicated by the string before the dot in the method name element). POST /RPC2 HTTP/1.0 User-Agent: Frontier/5.1.2 (WinNT) Host: betty.userland.com Content-Type: text/xml Content-length: 181 <?xml version="1.0"?> <methodCall> <methodName>examples.getStateName</methodName> <params> <param> <value> <i4>41</i4> </value> </param> </params> </methodCall> HTTP header (request) with required header fields (blue) XML body List of request parameters
  • 6. © Peter R. Egli 2015 6/11 Rev. 1.60 XML-RPC indigoo.com List of return values 3. XML-RPC protocol (2/5) Response (example from www.xmlrpc.com/spec): • The HTTP return code is always „200 OK“, even in case of an XML-RPC fault (see below). • The response contains a single value (like a return argument of a local procedure call). HTTP/1.1 200 OK Connection: close Content-Length: 158 Content-Type: text/xml Date: Fri, 17 Jul 1998 19:55:08 GMT Server: UserLand Frontier/5.1.2-WinNT <?xml version="1.0"?> <methodResponse> <params> <param> <value> <string>South Dakota</string> </value> </param> </params> </methodResponse> HTTP header (response) with required header fields (blue) XML body
  • 7. © Peter R. Egli 2015 7/11 Rev. 1.60 XML-RPC indigoo.com 3. XML-RPC protocol (3/5) Response with a failure (example from www.xmlrpc.com/spec): • Even in case of an XML-RPC level failure the HTTP return code is 200 OK. • The failure is indicated with the <fault> element. HTTP/1.1 200 OK Connection: close Content-Length: 426 Content-Type: text/xml Date: Fri, 17 Jul 1998 19:55:02 GMT Server: UserLand Frontier/5.1.2-WinNT <?xml version="1.0"?> <methodResponse> <fault> <value> <struct> <member><name>faultCode</name><value><int>4</int></value></member> <member><name>faultString</name> <value><string>Too many parameters.</string> </value> </member> </struct> </value> </fault> </methodResponse>
  • 8. © Peter R. Egli 2015 8/11 Rev. 1.60 XML-RPC indigoo.com 3. XML-RPC protocol (4/5) Parameter types (1/2): Base types: XML-RPC has a very limited set of base types: Type Description Example <i4> or <int> Four-byte signed integer -12 <boolean> 0 (false) or 1 (true) 1 <string> ASCII string (string is default) Hi! <double> Double-precision 3.1415 <dateTime.iso8601> Date/time 19980717T14:08:55 <base64> Base64-encoded binary eW91IGNhbid Structs: Structs contain elements (<member>) with a <name> and <value> element ("named" values). Structs may be recursive (value in a struct may be a struct again). <struct> <member> <name>lowerBound</name> <value><i4>18</i4></value> </member> <member> <name>upperBound</name> <value><i4>139</i4></value> </member> </struct>
  • 9. © Peter R. Egli 2015 9/11 Rev. 1.60 XML-RPC indigoo.com 3. XML-RPC protocol (5/5) Parameter types (2/2): Arrays: An array contains a single <data> element that in turn contains an array of <value> elements. An array differs from a struct in that its elements are simple values (without <name> element). Arrays may be recursive (value in array may be an array or also a struct). <array> <data> <value><i4>12</i4></value> <value><string>Egypt</string></value> <value><boolean>0</boolean></value> <value><i4>-31</i4></value> </data> </array>
  • 10. © Peter R. Egli 2015 10/11 Rev. 1.60 XML-RPC indigoo.com 4. XML-RPC server implementation in Java The class loader provides lookup service (find the serving class from request name). The XML-RPC listener does unmarshalling / marshalling of parameters. The XML-RPC handler is the user class that handles the request (implementation of the actual procedure call). WebServer XML-RPC listener Classloader properties Load mapping into class loader XML-RPC handler (user class) Defines the mapping from service name to class name serving the requests HTTP protocol front-end Passes the request to the XML-RPC server Consults class loader to get the serving class Unpack the XML, get the serving class, convert the arguments (C  S) Pack the response into XML (S  C) Pass the request to the serving class HTTP
  • 11. © Peter R. Egli 2015 11/11 Rev. 1.60 XML-RPC indigoo.com 5. Where to use XML-RPC • XML-RPC may be suited for simple applications or situations where clients implemented in different technologies need to interact with a server with simple read-write operations where a more complex middleware technology would be overkill. • XML-RPC is a solution to integrate different platforms with a simple middleware. • XML-RPC is very simple so it can be implemented also for platforms without open source or commercially available XML-RPC libraries. Java PL/1 C++ RMI / IIOP CORBA DCOM CORBA runtime DCOM runtime C++ Integration of different platforms leads to complexity on the server side Java PL/1 C++ XML-RPC runtime C++ XML-RPC as a common integration technology reduces complexity on the server side (but adds complexity on the client side) XML-RPC stub HTTP