SlideShare a Scribd company logo
© 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

More Related Content

What's hot

Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
CEC Landran
 
SAX
SAXSAX
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
Shahzad
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
Mohammed Sikander
 
TCP/IP and UDP protocols
TCP/IP and UDP protocolsTCP/IP and UDP protocols
TCP/IP and UDP protocols
Dawood Faheem Abbasi
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
Thanachart Numnonda
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
Ramakant Soni
 
Python Libraries and Modules
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and Modules
RaginiJain21
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
Smriti Jain
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
Keyur Vadodariya
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
OOPs in Java
OOPs in JavaOOPs in Java
OOPs in Java
Ranjith Sekar
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
Munaam Munawar
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
Ajit Nayak
 
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
3scale.net
 

What's hot (20)

Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
 
SAX
SAXSAX
SAX
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
TCP/IP and UDP protocols
TCP/IP and UDP protocolsTCP/IP and UDP protocols
TCP/IP and UDP protocols
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
 
Python Libraries and Modules
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and Modules
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
UML
UMLUML
UML
 
OOPs in Java
OOPs in JavaOOPs in Java
OOPs in Java
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
 
Stepwise planning
Stepwise planningStepwise planning
Stepwise planning
 
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
Mobile Software Engineering (at University of Cambridge Wednesday Seminars)
 

Viewers also liked

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
Pradeep Kumar
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
Mário Almeida
 
Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical Approach
Madhaiyan 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 Presentation
guest0df6b0
 

Viewers also liked (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 to XML-RPC (XML Remote Procedure Call)

xml rpc
xml rpcxml rpc
xml rpc
Varun Garg
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
Kiran Jonnalagadda
 
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
Information 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 Buffers
Matt O'Keefe
 
Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
Jim Bethancourt
 
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
Edward Burns
 
Tibco business works
Tibco business worksTibco business works
Tibco business works
Cblsolutions.com
 
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
Ajith Narayanan
 
HTTP Basic
HTTP BasicHTTP Basic
HTTP Basic
Joshua Yoon
 
Bt0083 server side programing 2
Bt0083 server side programing  2Bt0083 server side programing  2
Bt0083 server side programing 2
Techglyphs
 
Lambdas and Laughs
Lambdas and LaughsLambdas and Laughs
Lambdas and Laughs
Jim Bethancourt
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web services
nbuddharaju
 
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
 
Network basics
Network basicsNetwork basics
Network basics
Sergey Podgornyy
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
Michal Gajdos
 
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
Jian-Hong Pan
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
mitesh_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 Embedded
exeri0n1
 

Similar to 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
 

More from 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 Scenarios
Peter R. Egli
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking Concepts
Peter R. Egli
 
Communication middleware
Communication middlewareCommunication middleware
Communication middleware
Peter 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 Platform
Peter R. Egli
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
Peter 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 Queueing
Peter R. Egli
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration Technologies
Peter R. Egli
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technology
Peter R. Egli
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
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 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
 
Web services
Web servicesWeb services
Web services
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 Queueing
Peter R. Egli
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
Peter 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 Service
Peter 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
 

More from 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)
 

Recently uploaded

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

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