Code first service development with JAX-WS
We already have looked at several code segments, involving the code first JAX-WS development. But for the sake of completeness, let us look at a complete sample. In this example, the
StudentMarksService class contains two operations called
computeHighestMarks. Both these methods take in a
Student object as a parameter. You can see how we can customize the WSDL service interface using the annotations. The sample code for this sample is shown here. The
@WebService annotation specifies that the name of this service should be
StudentMarksService with the namespace http://apache.org/jaxws/sample. The WSDL style is declared as document-literal, and the parameters are wrapped.