Java EE 7 Application Developer — Question 40

Which statement is true about Java methods that are exposed as Web Service operations by using JAX-WS API?

Answer options

Correct answer: D

Explanation

The correct answer is D because the @WebMethod annotation is essential for exposing a Java method as a web service operation in JAX-WS. Options A, B, and C are not mandatory for a method to be exposed; while they can be used for additional functionality or compatibility, they are not required for the method to be recognized as a web service operation.