c# WebService soap 序列化. webservice 自定义类参数序列化的问题.
Webservice 接口 如下:
[WebMethod]
public void SetCacheValue(string key, object value)
{
Cache.Insert(key,value);
}
在客户端有如下的调用:
WebserviceInterface.ClassName i = new WebserviceInterface.ClassName();
ClassEntityA entityA = new ClassEntityA();
entityA.strA = "a";
ClassEntityB entityB = new ClassEntityB();
entityB .intA = 205;
ClassEntityC entityC = new ClassEntityC();
entityC .floatA = 1.25;
i.SetCacheValue("key1",entityA);
i.SetCacheValue("key2",entityB);
i.SetCacheValue("key3",entityC);
public class ClassEntityA()
{
public string strA ;
}
public class ClassEntityB()
{
public int intA;
}
public class ClassEntityC()
{
public float floatA;
}
怎么在保证调用同一个webservice的接口时,序列化自定义类参数呀.
大伙帮帮忙呀!