Defining a response wrapper for a web service
This recipe explains how to define a response wrapper for a web service. Similar to the request wrapper, we can also define a response wrapper for a web service operation. As with the request wrapper, the response wrapper is used by the marshalling process to provide proper conversion between Java code and XML content at runtime.
Getting ready
In this recipe, we will amend the example from the Defining a request wrapper for a web service recipe.
How to do it…
We start this recipe in a similar way to how we started the Defining a request wrapper for a web service recipe. Create a new class named AuthoriseResponse
in JDeveloper. We omit the getter and setter methods, so the final code of the class is as follows:
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AuthoriseResponse", propOrder = { "response" }) public class AuthoriseResponse { @XmlElement(name = "return") private TransactionResponse...