package ibase.webitm.bean.wms;
import ibase.system.config.AppConnectParm;
import ibase.webitm.ejb.wms.*;
import ibase.webitm.utility.ITMException;
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.naming.InitialContext;

import ibase.system.config.AppConnectParm;
import ibase.webitm.utility.ITMException;
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.naming.InitialContext;

@SuppressWarnings("serial")
public class ReplTaskBean implements Serializable
{

	ReplTaskShowDetailRemote  replTaskDetailRemote = null;  

	public ReplTaskBean()
	{
		System.out.println("inside LocationStockOccuBean Created");
		InitialContext ctx  = null;
		try
		{
			AppConnectParm appConnect = new AppConnectParm();
			ctx = new InitialContext(appConnect.getProperty());
			replTaskDetailRemote = (ReplTaskShowDetailRemote) ctx.lookup("ibase/ReplTaskShowDetail/remote");
			System.out.println("instance created");
			
		}
		catch(Exception e)
		{
			System.out.println("Exception in creating ReplTaskShowDetailRemote");
			e.printStackTrace();
		}
	}
	
	public String getTaskDetails() throws RemoteException, ITMException
	{
		String xmlData = "";
		try
		{
			xmlData = replTaskDetailRemote.getTaskDetails();
		}
		catch(Exception e)
		{
			System.out.println("Exception in ReplTaskBean.getTaskDetails() in accessing EJB");
			e.printStackTrace();
			xmlData = null;
		}
		return xmlData;
	}
	
	
	}
		

