如何在Client使用到从Web Service 返回的自定义类的方法???(在线等,顶者有分)
我在Server 上自定义一个类UserEntity,其中有方法有属性,也做了序列化,结果通过Web Service作为一个结果返回到Client时,所有的属性都是可见的,但是定义的方法都看不到了...
有哪位兄弟知道如何在Client调用到自定义类的Method???
PS:我这个Web service 是一个internet远程调用,所以Remoting好像不work
问题点数:0、回复次数:4Top
1 楼lovelxj(伊斯人,吾谁与归)回复于 2005-04-01 14:30:35 得分 0
有这样的事情啊 你客户端是用什么引用的?Top
2 楼yfmine(扬帆-逆风)回复于 2005-04-01 19:15:49 得分 0
帮顶Top
3 楼fuchen_yan(线团)回复于 2005-04-04 11:35:21 得分 0
你的类是怎么写的,贴出来吧Top
4 楼bugcool(bugcool)回复于 2005-07-19 16:48:14 得分 0
[Serializable]
public class BookingForm_CustomerReportedGoods
{
public BookingForm _BookingForm;
//客户预报货物情况列表;
public ArrayList ReportedGoodList;
public BookingForm_CustomerReportedGoods()
{
_BookingForm = new BookingForm();
ReportedGoodList = new ArrayList();
}
//增加一条客户预报货物信息到货物列表;
public bool AddGoods(CustomerReportedGoods _CustomerReportedGoods)
{
bool retValue = false;
if (null == _CustomerReportedGoods)
{
_CustomerReportedGoods = new CustomerReportedGoods();
_CustomerReportedGoods.IdBookingForm = -1;
this.ReportedGoodList.Add(_CustomerReportedGoods);
retValue = true;
}
else
{
if (this.ReportedGoodList.IndexOf(_CustomerReportedGoods) < 0)
{
this.ReportedGoodList.Add(_CustomerReportedGoods);
retValue = true;
}
}
return retValue;
}
public bool RemoveGoods(int GoodsIndex)
{
if (GoodsIndex >= this.ReportedGoodList.Count)
{
return false;
}
else
{
this.ReportedGoodList.RemoveAt(GoodsIndex);
return true;
}
}
public bool RemoveGoods(CustomerReportedGoods _CustomerReportedGoods)
{
this.ReportedGoodList.Remove(_CustomerReportedGoods);
return true;
}
//预报货物信息的记录数;
public int ReportedGoodsCount
{
get
{
return this.ReportedGoodList.Count;
}
}
}
同样的问题
在WebService中定义的一个类。在客户端调用看不到方法!Top




