Creating a document transport web service
This recipe explains how to define a document transport for a web service. We divide transportation mechanisms into two parts. One is the Remote Procedure Call (RPC) transport and the second one is the document transport. Actually, these two transports define styles which we use for transferring messages and their values. In the document transport, we indicate that SOAP messages are using XML instances, meaning each part of a SOAP message is referring to the XML schema definition. This type is also the default transport type for JAX-WS.
Getting ready
In this recipe, we will amend the book library example.
How to do it…
The following are the steps we need to take in order to create the document transport style for our web service:
Open the
BookLibraryImpl.java
class file in JDeveloper.To define the document transport for the web service, add the highlighted annotation to the web service code as follows:
@WebService(name = "BookLibrary", serviceName = "BookLibraryService...