O'Reilly logo

Java and SOAP by Robert Englander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.1. SOAP RPC Elements

Creating a SOAP RPC request uses the SOAP structure and encoding described in Chapter 2 and Chapter 3. No new XML or data encoding styles are needed for RPC. Let's take a look at what's required to represent an RPC method call in SOAP:

  • The target object

  • Method name

  • Method parameters

  • SOAP header data

4.1.1. Target Object URI

The target object URI is, essentially, the resource address of the service that we want to use. You see resource addresses all the time when you browse the Web — you navigate to a web page by specifying the page's resource address. For instance, to look at the page describing the author of O'Reilly's JavaBeans book, you'd use the URL http://www.oreilly.com/catalog/javabeans/author.html. The protocol, server address, and resource are all together. Let's break it down so you can see the parts. The server address is www.oreilly.com, the HTML page resource is /catalog/javabeans/author.html, and the protocol is http.

This is exactly what we do to specify the target object in a SOAP RPC request message, with one difference: instead of an HTML page resource, the target object name is used. The target object name is carried by the transport (for example, by an HTTP header), not the SOAP message itself. This is the only part of a SOAP RPC message that is carried outside the message except for the SOAPAction attribute. In an Apache SOAP server, the target object for an RPC message is usually /soap/rpcrouter. This URI represents the resource ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required