Which statement is true about Java methods that are exposed as Web Service operations by using JAX-WS API?
Which statement is true about Java methods that are exposed as Web Service operations by using JAX-WS API?
For a Java method to be exposed as a Web Service operation using the JAX-WS API, the method parameters and return types must be JAXB compatible. JAXB (Java Architecture for XML Binding) is necessary to convert Java objects into XML and vice versa, which is essential for web services communication. This ensures that the data can be properly serialized and deserialized between the web service and its clients.
Answer B. the question don t mention if is a session bean so D is not correct. JAX-WS requirements: -Must be public. By default every public method in the class will be part of the webservice. - Must not be static of final - Must have JAXB-compatible parameters and return types. Parameters and return types must not implement the java.rmi.Remote interface. - Business methods (Session Bean) that are exposed to web service client must be annotated with javax.jws.Webmethod
@WebMethod is optional
D is correct according to (Requirements of a JAX-WS Endpoint) : https://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/JAXWS3.html