RPC Response Messages

This section provides some examples of using RPC (Remote Procedure Call) response messages.

Examples of RPC responses:

Example 1 - A user needs to invoke the following RPC on a target system called "inventory":

   getQuantityInStock(PartNumber="123")

This RPC can be invoked as a Web method. The target system will retrieve the current quantity number and send it back in a SOAP RPC response message:

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Body 
    env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
    xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <res:response enc:nodeType="struct" xmlns:res="http://www.yang.com">
   <res:result>208</res:result>
  </res:response>
 </env:Body>
</env:Envelope>

Example 2 - Another user needs to invoke the following RPC on a target system called "inventory":

   updateQuantityInStock(PartNumber="123", NewQuantity="200")

This RPC can be invoked as a Web method. The target system will update the quantity and send a SOAP RPC response message back. The target system may decide to include the updated quantity as the return value, and the previous value as an output parameter:

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Body 
    env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
    xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <res:response enc:nodeType="struct" xmlns:res="http://www.yang.com">
   <res:result>200</res:result>
   <res:previousQuantity>208</res:previousQuantity>
  </res:response>
 </env:Body>
</env:Envelope>

Example 3 - A user wants to update prices of a list of part numbers in an inventory system with the following RPC:

   updatePrice(List=ArrayOfStructures)

This RPC can be invoked with a SOAP RPC invocation message. The target system will update prices based on the list received as an input parameter and send a SOAP RPC response message. The target system may decide to include the number of prices that have been updated as the return value:

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Body 
    env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
    xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <res:response enc:nodeType="struct" xmlns:res="http://www.yang.com">
   <res:result>2</res:result>
  </res:response>
 </env:Body>
</env:Envelope>

Table of Contents

 About This Book

 Introduction to Web Service

 Introduction to SOAP (Simple Object Access Protocol)

 SOAP Message Structure

 SOAP Message Transmission and Processing

 SOAP Data Model

 SOAP Encoding

SOAP RPC Presentation

 What Is SOAP RPC Presentation

 Using Web Methods to Invoke RPC

 Using SOAP Messages to Invoke RPC

RPC Response Messages

 SOAP Properties Model

 SOAP MEP (Message Exchange Patterns)

 SOAP HTTP Binding

 SOAP PHP Implementations

 PHP SOAP Extension Client Programs

 PHP SOAP Extension Server Programs

 PHP SOAP Web Service Example - getTemp

 SOAP Perl Implementations

 Perl SOAP::Lite - SOAP Server-Client Communication Module

 Perl Socket Test Program for HTTP and SOAP

 Perl SOAP::Lite for NumberToWords SOAP 1.1 Web Service

 Perl SOAP::Lite for SOAP 1.2 Web Services

 Perl SOAP::Lite for WSDL

 Python SOAP Client: Zeep

 SOAP Java Implementations

 Java Socket and HttpURLConnection for SOAP

 SAAJ - SOAP with Attachments API for Java

 SoapUI - SOAP Web Service Testing Tool

 WS-Security - SOAP Message Security Extension

 WS-Security X.509 Certificate Token

 Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service

 Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services

 Perl SOAP::Lite 0.710 for WSDL

 Web Services and SOAP Terminology

 Archived Tutorials

 References

 Full Version in PDF/EPUB