@WebService(endpointInterface = "login")
public class LoginService{
loginCredentials.login();
}
公共类登录凭据{
@ManagedProperty(name = "applicationBD", value = "#{applicationBD}")
private IApplication applicationBD; //This class is application scoped
How to access applicationBD in this layer?
//facescontext is null while calling this service from SOAP UI
ServletContext servletContext = (ServletContext)FacesContext.getCurrentInstance().getExternalContext()
.getContext();
servletContext.getAttribute("applicationStartupBD");
}