Coding the Service Endpoint Implementation Class by R4R Team

Coding the Service Endpoint Implementation Class:-

In this example, the implementation class, Hello, is annotated as a web service endpoint using the @WebService annotation. Hello declares a single method named sayHello, annotated with the @WebMethod annotation. @WebMethod exposes the annotated method to web service clients.

package helloservice.endpoint;

import javax.jws.WebService;

@WebService

public class Hello {

private String message = new String("Hello, ");

public void Hello() {}

@WebMethod

public String sayHello(String name) {

return message + name + ".";

}}

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!