这是我需要申请的班级
我班上有一个静态初始化
当我运行网络方法时,我得到了例外
@WebService( serviceName = "SalesManager")
public class SalesManager {
private static ServerListner serverLister;
private static Set<Client> clients;
public static Set<Sale> sales;
private static String status;
public SalesManager(){}
// this is the static block which should run once
static {
ApplicationContext serverLoader = new ClassPathXmlApplicationContext("salesLoader.xml")
clients = new LinkedHashSet<Client>();
sales = (Set<Sale>) serverLoader.getBean("sales");
serverLister = (ServerListner) serverLoader.getBean("Serverlistner");
status = "Created"; }
//this is the webmothod which I need to run
@WebMethod (operationName = "getOpenSales")
public Set<Sale> getOpenSales (){
return SalesManager.sales; }