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
as shown in the following code:
@WebService(name = "BookLibrary", serviceName = "BookLibraryService", portName = "BookLibraryPort")
//@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@SOAPBinding(style = SOAPBinding.Style.RPC)
How it works…
The RPC...