求一个 生成 SOAP 字符串的方法, 超级感谢..

kaixin2015 2012-03-31 10:54:30
public string CreateSOAP(string url, string ns, string method, string[] VariableName val object[] pars)
{
//构造soap请求信息
StringBuilder soap = new StringBuilder();
soap.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
soap.Append("<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ");
soap.Append("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">");
soap.Append("<soap:Body>");
soap.Append(string.Format("<{0} xmlns=\"{1}\">", method, ns));

..... 参数怎么添呢? 根据传进来的 VariableName 是表示该方法有哪些参数名, pars 是表示变量名所对应的值

}

请问怎样构造一个完整的SOAP呢?
...全文
100 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kaixin2015 2012-04-19
  • 打赏
  • 举报
回复
散分了.谢谢各位.
kaixin2015 2012-03-31
  • 打赏
  • 举报
回复
已经解决, 散分啦.

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧