【问题标题】:webservice xml request in asp.netasp.net中的webservice xml请求
【发布时间】:2013-03-19 11:14:58
【问题描述】:

我需要实现一个 Web 服务,该服务作为请求获取以下 xml

<EVG_CardValid>
  <Token>
    <UserName>xxxx</UserName>
    <password>yyyy</password>
    <CardID>71656</CardID>
  </Token>
  <MaxTitle>5</MaxTitle>
  <IncludeDates>
    <startDate>2012-11-25T13:06:33.11</startDate>
    <EndDate>2012-11-25T15:06:33.11</EndDate>
  </IncludeDates>
</EVG_CardValid>

webservice 需要响应一个 xml

 <info>
    <cardName>
    xxx
    </cardName>
    <cardValidDate>1/1/2013</cardValidDate>
    ...
    </info>

我是 webservices 新手(只使用本地 wcf 和 jason)

我的问题是我的网络服务应该是什么样子,我必须在我的函数中作为参数执行什么(提到的 xml 有哪些变量) 如何将 xml 作为响应发送(发送回构建为 xml 的字符串?)

从数据库中检查用户名和密码时,我需要做一些特别的事情吗?

在这种情况下使用 wcf 或 webservice 哪个更好?

抱歉无知,任何帮助将不胜感激

非常感谢 巴罗兹

【问题讨论】:

    标签: asp.net wcf web-services


    【解决方案1】:

    我之前也有同样的需求,我在我的博客上发过,查过一次..

    它可能会帮助您入门。

    http://www.iamraghuveer.com/2012/01/aspnet-web-service-receiving-xml-as.html

    该帖子中也有一些垃圾,但这是可行的方法。

    【讨论】:

      猜你喜欢
      • 2011-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-04
      • 1970-01-01
      • 2013-11-27
      • 2021-02-07
      相关资源
      最近更新 更多