【发布时间】: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