package com.mellon;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
@Stateless
@WebService
public class NewSessionBean implements NewSessionRemote, NewSessionLocal {
@WebMethod(operationName="sayHello")
public
String sayHello(String name){
return "Hello, "+name;
}
@WebMethod(operationName="sayHello2")
public String sayHello(String name,String location){
return "Hello, "+name+", welcome to "+location;
}
}
I wrote the
EJB like above, everytime I deployed it, I got errors.
If I change the second method name from sayHello to sayHello2, it works well. Is that operationName attribute used to solve this?
SCJP,SCWCD1.3,SCWCD1.4,SCJD,SCBCD5,SCEA5