如何创建网页来测试和使用Web服务?
我需要创建一个简单的 Web 服务,并且倾向于使用 Python 包 soaplib。
我还想创建一个可以使用网络服务的简单网页。这将有两个目的:
- 允许多人(包括非程序员)更轻松地进行测试。
- 允许知识渊博的/高级用户在某些情况下直接在生产中调用服务。
对于创建此网页有什么建议吗?理想情况下,我想自动生成它而不是手动制作它。我在 Visual Studio .NET 中使用了这种类型的功能,它会在创建 Web 服务的过程中自动创建一个基本网页。
任何想法表示赞赏。我更喜欢基于soaplib 的自动化解决方案,但也对任何非soaplib 或非Python 解决方案持开放态度。
I need to create a simple web service, and am leaning towards the Python package soaplib.
I would also like to create a simple web page that can consume the web service. This will serve two purposes:
- Allow for easier testing by multiple people including non-programmers.
- Allow knowledgeable / power users to call the service directly in Production on a few occasions.
Any suggestions for creating this web page? Ideally, I want to generate it automatically and not craft it by hand. I have used this type of feature with Visual Studio .NET which autocreates a basic web page as part of the process of creating a web service.
Any ideas are appreciated. I'd prefer an automated solution based on soaplib but am open to any non-soaplib or non-Python solution as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否考虑过使用 REST(此处 或 此处)?我正在使用 GAE 创建小型应用程序,我也希望为此拥有可编程接口。因此,使用完全相同的 URL,我创建了一个 Web 服务 (REST),该服务基于客户端接受的 mime 类型,使用 json(对于软件)或 html(对于用户)进行应答。您有广泛的可能性,而且它比肥皂清洁得多。
Have you considered using REST (here or here)? I was creating small app using GAE and I wanted to have programmable interface for that too. So using exactly the same URLs I've created a web service (REST) which based on client accepted mime type answered either using json (for software) or html (for users). You have wide range of possibilities and it's lot cleaner that soap-based ws.