测试网络服务

发布于 2024-11-14 07:39:38 字数 214 浏览 2 评论 0原文

我想测试向我的客户公开的 Web 服务 (wsdl/soap/php)。我已经用浏览器测试了它,效果很好,但是当我的客户测试它时,他们有 400 bad request 错误。(他们用soapui 测试)。我可以使用哪些工具来测试向我的客户公开的 Web 服务?我如何验证我的服务器 apache 对 http 调用的响应非常好?

感谢您的回答。

I would like to test my web services (wsdl/soap/php) that is exposed to my clients. ihave test it with the browsers and it's good, but when my clients test it , they have the 400 bad request error.( they test with soapui). what are the tools that i can test my web services that it exposed to my clients ? How can i verify that my server apache responds very good to http calls ?

Thanks for your answers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风和你 2024-11-21 07:39:38

您处于集成场景中:您已经发布了一个接口,并且一些您无法控制的代码正在尝试使用它。

Web 服务,即使是简单的服务,连同全套 WS-* 功能也因微妙的互操作性问题而臭名昭著。这些尤其来自小版本偏差问题。

我在这里看到两个基本哲学,我有点言过其实,为了说明这一点:

  1. 你说:我用这个 WSDL、这个版本的 WS 规范发布这个接口,我用这个消息测试它,它有效。您的客户有责任创建符合要求的请求。我已经给了你一个样品,你看是否适合我。您的职责仅限于生成清晰的工作示例消息。
  2. 您负责对某些客户端技术进行互操作性测试。显然,您无法测试所有内容,但如果您有一些关键“客户”,您可以获得或构建示例应用程序并确保它们正常工作。您可能最终会记录“生成客户端代码时使用这些选项”。

不管怎样,我建议您需要编写自己的测试客户端,作为 Java 开发人员,我为此使用 JUnit。这让我进入上面的步骤 1。

You are in an integration scenario: you've published an interface and some code over which you have no control is trying to use it.

Web Services, even simple ones, let along the full panoply of WS-* capabilities are notorious for subtle interoperability problems. These especially come from small version skew issues.

I see two fundamental philosophies here, I'm rather over-stating, to make the point:

  1. You say: I publish this interface, with this WSDL, this version of the WS specs, I test it with this message and it works. You clients are responsible for creating a conformant request. I've given you a sample, it's up to to fit me. Your responsibilities are limited to producing clear working sample messages.
  2. You take responsibility for conducting interoperability testing for some set of client technologies. You clearly can't test everything, but if you some key "customers" you get or build sample applications and make sure they work. You probably end up documenting "use these options when generating client code".

Either way I'd suggest you need to write test clients of your own, and as a Java developer I use JUnit for that. This get's me to step 1 above.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文