TestWS.java
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService(name = "TestWS")
@SOAPBinding(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public class TestWS {
/**
* This method will accept a string and prefix with Hello.
*
* @param name
* @return
*/
@WebMethod
public String greet(@WebParam(name="name") String name )
{
return "Hello" + name;
}
}
web.xml
HelloWorldWeb
TestWS
com.ws.TestWS
1
TestWS
/TestWS
30
No comments:
Post a Comment