I have a web-method called GetSessionData()
returning a SessionData
object so defined:
public class SessionData
{
private SalesDataDAO _dao;
public SessionData()
{
this._dao = new SalesDataDAO();
SessionId = 0;
}
public int SessionId { get; set}
public string UserId { get; set}
public string UserName { get; set}
public string Group { get; set}
// ...
public SalesData GetSalesData()
{
SalesData sd = null;
if (SessionId > 0)
{
sd = _dao.GetSalesData(SessionId);
}
return sd;
}
}
Calling the GetSessionData
method from the client I get a proxy object having only public properties.
Is there a way to use the SessionData
object as if I was working with a local object?
How could I structure my object to obtain data from the WS in a transparent way?
NOTE #1 I'm not using WCF.
NOTE #2
The main issue is not to share the same type both on server and client side. What I'm just trying to achieve is retrieving the data from the server by GetSalesData()
method.
Actually this method should do some kind of remote call...
Is there a way to obtain this? WCF is the right technology to solve this issue?
I'm not an expert of RPC...