Defining the direction of the parameters
This recipe explains how to set different direction annotation attributes for the web service operation parameters. With the direction of the parameters, we define the flow of the values between web service and client. To receive more than one value from a web service, we have several possibilities. We can define a Java class that is returned by the method. We can also return values through return parameters as well as over method input parameters (value by reference). When using the last scenario, the annotation for defining parameter direction comes in handy.
Getting ready
In this recipe, we will amend the example from the Defining a one or two way web service recipe.
How to do it…
The direction of parameters is defined through the port type. We first open the CCGatePortType
class. We will add annotations to the Refund
method:
@WebMethod
@WebResult(name = "RefundResponse")
public TransactionResponse Refund(@WebParam(name = "token...