Creating a RPC transport web service

This recipe explains how to annotate a web service in order to support the Remote Procedure Call (RPC) transport style. Using the RPC style, the body part of the SOAP message may contain only one element that is named after the operation. All parameters are represented as child elements of this element. The name of the child element must match the name of the parameter and the type of the element must match the type of the parameter.

Getting ready

For this recipe, we will use the example from the Creating a document transport web service recipe.

How to do it…

In the JDeveloper project, open the BookLibraryImpl.java file. Search for the @SOAPBinding annotation.

Now change the style attribute to SOAPBinding.style.RPC ...

Get BPEL and Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.