@WebResult Annotation



@WebResult
The @javax.jws.WebResult annotation controls the generated name of the message returned value in the WSDL.


The returned result of the validate() method is renamed to IsValid.
@WebService
public class ATMValidator {
@WebResult(name = "IsValid")
public boolean validate(ATMCard atmCard) {
// Business logic
}
}


In WSDL you will see like this
<!-- Renamed to IsValid -->
<xs:element name="IsValid" type="xs:boolean"/>




Ref : Beginning of JavaEE 7