1
@WebService(endpointInterface = "login")
public class LoginService{
loginCredentials.login();
}
公共類LoginCredentials {從CXF Web服務訪問一個託管bean
@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");
}