English 中文(简体)
XML-over-HTTP分析/测试框架
原标题:
  • 时间:2008-11-15 20:51:57
  •  标签:

我们与之互动的许多产品/服务(包括我们自己)使用XML-over-HTTP或其衍生品(如OMA IMPS IM / presence协议)。

我正在寻找一些工具,可以“听取”流量并生成客户端/服务器存根以进行模拟/测试。

谢谢。(Xièxiè)

最佳回答

在某种程度上,它听起来像是 maxq 尝试做的事情。

问题回答

那听起来像是一个不错的项目想法。

这不是一个解决方案,但你的第一步应该是至少支持已知的Web服务描述符。

为了做到这一点,应使用Wireshark或类似工具来嗅探流量,并查看正在访问的URL。如果你很幸运,这些服务将是具有可检索接口描述符或模式的Web服务。检查.xsd、.wsdl、.asmx文件。

这里有一些例子:

将此翻译成中文:http://www.webservicex.net/CurrencyConvertor.asmx http://www.webservicex.net/CurrencyConvertor.asmx

将此翻译成中文:http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

将此翻译成中文:http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd

有一些与SDL打包在一起的微软工具可提供这些桩文件。

I don t know of any drop in solution for you but my approach to solving this problem would be: - use wireshark to record http conversations for specific webservices. - parse (or look at) these files to extract the URLs that are invoked and track the message passing + xml documents. - Create stubs based on what appear to be the parameters. - Start by creating some simple pattern matchers and transforms (xml + xsl can = code or some page for debug).

You may also need to consider - communication may not be 2 way xml- it could be HTTP posts with query string one way and xml responses back. - The XML documents may not be properly formatted XML- test parse each message before trying to generate anything.





相关问题
热门标签