Create a dynamic web project in eclipse
Create an endpoint interface
package org.myProject.passwordManager;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService public interface PasswordManagerWS {
@WebMethod public abstract String getPassword(String appId);
}
Create an implementation of Web Service
package org.myProject.passwordManager;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding; @WebService(endpointInterface="org.myProject.passwordManager.PasswordManagerWS", serviceName="PasswordManagerWS")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT)
public class PasswordManagerWSImpl implements PasswordManagerWS{
@WebMethod public String getPassword(@WebParam(name="appId")String appId) { System.out.println("test ws"); return "test";
}
}
No comments:
Post a Comment