[RESTWebServices] Documentation

[RESTWebServices] Documentation

Forge Component
Published on 2013-06-02 by Ricardo Silva
8 votes
Published on 2013-06-02 by Ricardo Silva
What is it

RESTWebServices is a helper eSpace to integrating with JSON based REST APIs.

What it does

For now, it takes an example JSON you want to be able to process and creates a WSDL file which you can use to import in Service Studio. This will create the necessary structures for you to be able to use ardoJSON to process that JSON data.

Never again will you make a mistake creating the necessary structures !

How do I use it?

Let's say you want to integrate with Google Books REST API.

At some point in the documentation you get an example URL (https://www.googleapis.com/books/v1/volumes/s1gVAAAAYAAJ). What you have to do in my eSpace is to add the URL in the URL box and hit Fetch. This will perform an HTTP GET to the mentioned URL and fill the Text box below.

After that, just hit the Download WSDL button and you'll get a file named JSON.wsdl (in attachment to this post).

Import this file in Service Studio as a web reference:

and the structures required to process this JSON data will be generated automatically for you by Service Studio's Web Service engine

You may use the JSONRoot structure for your RecordList to use as an input to ardoJSON's JSON2RecordList.

You can try this eSpace out in the demo.

If you can't get Fetch to work (needs authentication, restricted access) you may simply place the JSON you with to process in the JSON box, optionally format it, and use the Download WSDL button. The URL Fetch is just an accelerator for when you can get it.

What's to come?

The first version is still in its infancy. I plan on adding the following features:

  • Support for JAVA stack
  • Customizable (root?) structure naming (done: version 0.2+)
  • Customizable web service naming (done: version 0.2+)
  • Ability to manage a set of WSDLs which you are importing in your applications in a centralized way
  • Ability to define several types per WSDL (done: version 0.2+)
  • Support for other manners of defining JSON data (OData, JSON Schema, etc)
  • Optimized structure generation

That's all, folks.
Version 0.3 is out.

It changes a bit the way the web services are constructed in order for you to be able to:

1) choose the name of the web service
2) add several JSON types to the web service (which translate to web methods)
3) choose the name of the resulting (top-level) structures

Try it out in the demo.