简体   繁体   English

测试 Web 服务

[英]Test Web services

I would like to test my web services (wsdl/soap/php) that is exposed to my clients.我想测试向我的客户公开的 web 服务(wsdl/soap/php) 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).我已经用浏览器测试了它,它很好,但是当我的客户测试它时,他们有 400 bad request 错误。(他们用soapui测试)。 what are the tools that i can test my web services that it exposed to my clients?我可以测试向我的客户公开的 web 服务的工具有哪些? How can i verify that my server apache responds very good to http calls?我如何验证我的服务器apache对 http 调用的响应非常好?

Thanks for your answers.感谢您的回答。

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. Web 服务,即使是简单的服务,以及完整的 WS-* 功能都因微妙的互操作性问题而臭名昭著。 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.你说:我发布这个接口,用这个 WSDL,这个版本的 WS 规范,我用这个消息测试它,它工作。 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.无论哪种方式,我都建议您需要编写自己的测试客户端,作为 Java 开发人员,我为此使用 JUnit。 This get's me to step 1 above.这让我进入了上面的第 1 步。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM