为什么我们需要客户端来测试SOAP Web服务,而不是REST?

时间:2022-01-14 22:26:50

I am new to web services. I am studying it through various sites. Got confused for below query.

我是网络服务的新手。我正在通过各种网站进行研究。对以下查询感到困惑。

Why do we need client to test SOAP web services, but not for REST?

为什么我们需要客户端来测试SOAP Web服务,而不是REST?

Thank You :) Cheers!!! Nitin

谢谢:)干杯!!!尼廷

1 个解决方案

#1


The short answer is "you don't mandatory need client to work with SOAP web services, and you may wish to use a client for ReST service".

简短的回答是“您不必强制要求客户端使用SOAP Web服务,您可能希望使用客户端进行ReST服务”。

Having a SOAP client makes things much simpler. In case of SOAP web service there's thing called WSDL, where your client can get all the information about this service - classes, operations, etc... all together called service contract. Based on this knowledge, a decent client will present you with user-friendly UI to make SOAP calls and display output. But, again, if you're skilled (and crazy) enough, you can do it even through telnet command.

拥有SOAP客户端使事情变得更加简单。在SOAP Web服务的情况下,有一个叫做WSDL的东西,你的客户端可以获得有关这个服务的所有信息 - 类,操作等......所有这些都称为服务契约。基于这些知识,一个体面的客户端将为您提供用户友好的UI,以进行SOAP调用和显示输出。但是,如果你足够熟练(并且疯狂),你甚至可以通过telnet命令来做到这一点。

The ReST is more general term. Actually SOAP web services can be referred to as ReST level 0 services. Since ReST is more general, by definition there are more general rules. For example, there's no common rule where to get service contract. On the other hand, ReST services nowadays are written the way that they can be simply consumed from e.g. JavaScript. This means that you can use tools like Postman or DHC Chrome extensions to make requests and see results - and they will work as a client to your ReST service.

ReST是更通用的术语。实际上,SOAP Web服务可以称为ReST 0级服务。由于ReST更为通用,因此根据定义,存在更一般的规则。例如,在哪里获得服务合同没有共同的规则。另一方面,现在的ReST服务的编写方式是它们可以简单地从例如JavaScript的。这意味着您可以使用Postman或DHC Chrome扩展程序等工具发出请求并查看结果 - 这些工具将作为ReST服务的客户端。

#1


The short answer is "you don't mandatory need client to work with SOAP web services, and you may wish to use a client for ReST service".

简短的回答是“您不必强制要求客户端使用SOAP Web服务,您可能希望使用客户端进行ReST服务”。

Having a SOAP client makes things much simpler. In case of SOAP web service there's thing called WSDL, where your client can get all the information about this service - classes, operations, etc... all together called service contract. Based on this knowledge, a decent client will present you with user-friendly UI to make SOAP calls and display output. But, again, if you're skilled (and crazy) enough, you can do it even through telnet command.

拥有SOAP客户端使事情变得更加简单。在SOAP Web服务的情况下,有一个叫做WSDL的东西,你的客户端可以获得有关这个服务的所有信息 - 类,操作等......所有这些都称为服务契约。基于这些知识,一个体面的客户端将为您提供用户友好的UI,以进行SOAP调用和显示输出。但是,如果你足够熟练(并且疯狂),你甚至可以通过telnet命令来做到这一点。

The ReST is more general term. Actually SOAP web services can be referred to as ReST level 0 services. Since ReST is more general, by definition there are more general rules. For example, there's no common rule where to get service contract. On the other hand, ReST services nowadays are written the way that they can be simply consumed from e.g. JavaScript. This means that you can use tools like Postman or DHC Chrome extensions to make requests and see results - and they will work as a client to your ReST service.

ReST是更通用的术语。实际上,SOAP Web服务可以称为ReST 0级服务。由于ReST更为通用,因此根据定义,存在更一般的规则。例如,在哪里获得服务合同没有共同的规则。另一方面,现在的ReST服务的编写方式是它们可以简单地从例如JavaScript的。这意味着您可以使用Postman或DHC Chrome扩展程序等工具发出请求并查看结果 - 这些工具将作为ReST服务的客户端。