REST tools support for development and testing [cl

2020-05-17 05:19发布

There is a similar question here but it only covers some of the issues below.

We have a client who requires web services using REST.

We have tons of experience using SOAP and over time have gathered together a really good set of tools for SOAP development and testing e.g.

  • soapUI
  • Eclipse plugins
  • wsdl2java
  • WSStudio

By "tools" I mean a product "out of the box" that we can start using. I'm not talking about cutting code to "roll our own" using Ajax or whatever.

The tool set for REST doesn't seem to be nearly as mature?

  • What tools are out there (we use C# and Java mainly) ?

  • Do the tools handle GET, POST, PUT, and DELETE?

  • Is there a decent Eclipse plugin?

  • Is there a decent client testing application like WSStudio where you point the tool to the WSDL and it generates a proxy on the fly with the appropriate methods and inputs and you simple type the data in?

  • Are there any good package monitoring tools that allow you to look at the data? (I'm not thinking about sniffers like Wireshark here but rather things like soapUI that allow you to see the request / response) ?

标签: rest
15条回答
Deceive 欺骗
2楼-- · 2020-05-17 05:24

For starters, you need a tool that lets you construct an arbitrary HTTP request (including headers such as content-type, HTTP method, HTTP authentication and request body) and inspect the HTTP response (including status code, headers and response body). It's nice if it's scriptable tool.

Have a look at:

To auto-generate a proxy I guess you are looking for something that parses WADL, the REST answer to WSDL. Unfortunately, I do not know anything like that.

查看更多
混吃等死
3楼-- · 2020-05-17 05:30

SOA Cleaner, is a test tool that tests both soap and rest (also WCF, but it seems you don't need that feature). It's very intuative, and usable. Written in .NET. A free version is also available. can be downloaded from http://xyrow.com. Good luck!

查看更多
爷的心禁止访问
4楼-- · 2020-05-17 05:31

In terms of Java, there is the JAX-RS API, which is the Java Api for Xml using Restful Services or something like that. Basically, JAX-RS provides a more standard way to build RESTful services in Java.

There is also Restlet, which allows easily development of Restful services and is based on the JAX-RS specification.

Also, checkout SOAP-UI which has recently added nice support for REST.

http://www.restlet.org/

http://jcp.org/en/jsr/detail?id=311 - JAX-RS

http://www.eviware.com/content/view/134/1/ - SOAP-UI

http://sourceforge.net/projects/soapui - SOAP-UI

查看更多
Deceive 欺骗
5楼-- · 2020-05-17 05:31

You could try the REST Assured library which makes it very easy to test REST services from Java. For example given that your resource is called "greeting" and returns the following JSON:

{ "greeting" : { "firstName" : <first_name>, "lastName" : <last_name> } }

you can test it like this in REST Assured:

given().
        param("first_name", "John").
        param("last_name", "Doe").
when().
        get("/greeting").
then().
        statusCode(200).
        body("greeting.firstName", equalTo("John").
        body("greeting.lastName", equalTo("Doe");
查看更多
Root(大扎)
6楼-- · 2020-05-17 05:37

https://restclientgui.codeplex.com Stable version downloadable from Downloads section.

查看更多
狗以群分
7楼-- · 2020-05-17 05:38

I found a nice Firefox plugin called Poster that allows you to act as a REST client similar to rest-client and the others. I wish it would render the response to a firefox tab (rather than a custom output window) so any returned XML could be colorized by Firefox's awesome syntax highlighting. But overall seems to work OK.

Update: Oh, even better. I found another firefox plugin callsed RestClient https://addons.mozilla.org/en-US/firefox/addon/9780. This seems to do the syntax highlighting.

查看更多
登录 后发表回答