在soap消息中解析数据对象 [英] Parsing data object in a soap message
本文介绍了在soap消息中解析数据对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我是xml和soap protocole的新手
我尝试创建一个来自对象的身体数据中包含的肥皂消息。
我咨询了许多tuto,但这个问题没有解决。
我想从我的asp.net MVC4应用程序中的对象中检索
求助!
Hello
I'm new in xml and soap protocole
I try to create a soap message that contain in the body data from object .
I consulted many tuto to di this but the problem was not solved .
I would like to retrieve from object in my asp.net MVC4 application
Help please !
推荐答案
此方法使用soap protocole序列化xml文件中的数据并且它成功运行
public static bool SerializeSOAPFile(object objet,string pathFile)
{
if(objet == null)
返回false;
FileStream stream = new FileStream(pathFile,FileMode.Create);
SoapFormatter objetSoap = new SoapFormatter();
objetSoap.Serialize(stream ,objet);
stream .Close();
返回true;
}
This method serialize data in an xml file with soap protocole and it works successfully
public static bool SerializeSOAPFile(object objet, string pathFile)
{
if (objet == null)
return false;
FileStream stream = new FileStream(pathFile, FileMode.Create);
SoapFormatter objetSoap = new SoapFormatter();
objetSoap.Serialize(stream, objet);
stream.Close();
return true;
}
这篇关于在soap消息中解析数据对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文