你好,我是新来的,最近在做一个delphi调用c#写的webservice的程序c#进行soap编码以后传给我,我怎么进行解码呀?有谁做过类似的东东给点提示吧,我是刚接触这些东西的。
解决方案 »
- 高手请进!ole与word高难问题,在线等,分数不够再加,解决即给分!!!
- 求如何做一个"搜索通"原理或源码均可100分立结!
- 请问各位前辈ADOquery有没有删除当前记录的方法,属性(Delete方法具体用在什么地方)
- 论坛帐号怎么取消?
- 一个比较难写的Delphi代码编写 求助
- 怎样在一个窗体里引用另一个窗体的全局变量?
- 如何判断库中的一个表是否存在?(mdb数据库)
- 限制使用时间
- 怎么在DBGrid中的某一单元格写代码?
- 跪求大神介绍下怎么开发电话拨号程序,比如读取客户在接通电话中输入的号码等。谢谢!好人一生平安!
- 新年将至,大家都是回自己家,还是回他(她)家
- 如何调整TRichView的行间距?
http://topic.csdn.net/u/20070128/21/b1a889cc-ff7e-4c8a-a339-6b67fc475a61.html
���� c# �еĴ���:
���룺
DataSet ds;
ds = DbTools.GetDS("select * from D_Users", "D_Users");
MemoryStream s = new MemoryStream();
//BinaryFormatter bf = new BinaryFormatter();
SoapFormatter sf = new SoapFormatter();
sf.Serialize(s, ds);
//bf.Serialize(s, ds);
byte[] e = s.ToArray();
return e;
s.Close();
s.Dispose();
���룺
localhost.returnbyte returnbyte = new localhost.returnbyte();
byte[] resultbyte = returnbyte.SurrogateRead();
MemoryStream br = new MemoryStream(resultbyte);
// BinaryFormatter bf = new BinaryFormatter();
SoapFormatter sf = new SoapFormatter();
object obj = sf.Deserialize(br);
DataSet ds = new DataSet();
ds = (DataSet)obj;
Response.Write(ds.Tables[0].Rows[0][1]);
br.Close();
br.Dispose();
����Ҫ�ѽ����ⲿ��ת��delphi��,�����?
这是 c# 中的代码:
编码:
DataSet ds;
ds = DbTools.GetDS("select * from D_Users", "D_Users");
MemoryStream s = new MemoryStream();
//BinaryFormatter bf = new BinaryFormatter();
SoapFormatter sf = new SoapFormatter();
sf.Serialize(s, ds);
//bf.Serialize(s, ds);
byte[] e = s.ToArray();
return e;
s.Close();
s.Dispose();
解码:
localhost.returnbyte returnbyte = new localhost.returnbyte();
byte[] resultbyte = returnbyte.SurrogateRead();
MemoryStream br = new MemoryStream(resultbyte);
// BinaryFormatter bf = new BinaryFormatter();
SoapFormatter sf = new SoapFormatter();
object obj = sf.Deserialize(br);
DataSet ds = new DataSet();
ds = (DataSet)obj;
Response.Write(ds.Tables[0].Rows[0][1]);
br.Close();
br.Dispose();
我需要把解码这部分转成delphi的,如何做?