Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Gloop REST and SOAP APIs

Introduction

TORO Integrate offers a simpler, more graphical way to expose APIs: Gloop APIs. Gloop REST APIs allow developers to easily expose REST web services to their clients, and likewise, Gloop SOAP APIs are available for easily exposing SOAP web services.

The examples package shows how the Gloop REST and SOAP APIs can be used in order to make services (a Gloop service in this example, specifically) available over HTTP. These Gloop APIs are named apis.restApi.HelloYou.api and apis.soapApi.HelloYouSOAP.api, respectively, and both use and expose the apis.service.HelloYouService.gloop service.

Related articles

Please see the following articles for more information:

Try It!

The only requirement for the provided examples to work is that the package must be up and running. As long as this requirement is satisfied, you can go on and execute requests against the endpoints to confirm their availability.

If you would like to inspect and/or further configure the APIs, go to the Coder Navigator, expand the examples package entry and navigate to the code folder. Afterwards, look for the apis package. This package should contain the Gloop REST and SOAP APIs and the service they both will expose over HTTP, as seen below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
examples
├── ...
└── code
    └── apis
        ├── rest
        │   ├── HelloYou.api
        │   └── ...
        ├── service
        │   └── HelloYouService.api
        └── soap
            └── HelloYouSOAP.api

Open the .api files to inspect the details of the REST and SOAP APIs. Edit these APIs' forms as you see fit and save to apply customizations.

Testing the REST API

Request

To test the REST endpoint, send a GET request to /api/sample/hello/${name}1. For example:

1
2
3
4
curl -X GET \
  http://<host>:<port>/api/sample/hello/world \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 8ccefb43-45ac-44d3-b594-402b65f28209'

Response

The response should look something like:

1
2
<?xml version="1.0"?>
<response>Hello world</response>

Testing the SOAP API

Request

To test the SOAP endpoint, send a POST request to /soap/apis.soapApi.HelloYouSOAP.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
curl -X POST http://<host>:<port>/soap/apis.soapApi.HelloYouSOAP \
-H 'Content-Type: application/xml' \
-H 'SOAPAction: apis.service.HelloYouService' \
-d '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glo="http://gloop.toro.io">
       <soapenv:Header/>
       <soapenv:Body>
          <glo:HelloYouServiceInput>
             <!--Optional:-->
             <name>world</name>
          </glo:HelloYouServiceInput>
       </soapenv:Body>
    </soapenv:Envelope>'

Response

1
2
3
4
5
6
7
8
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <HelloYouServiceOutput>
            <response>Hello world</response>
        </HelloYouServiceOutput>
    </soapenv:Body>
</soapenv:Envelope>

No error message

There is no configured error response for the REST and SOAP APIs in this example. Learn more about configuring how your exposed REST or SOAP API should respond to errors by checking the Gloop REST APIs and Gloop SOAP APIs articles.

How It Works...

You can easily expose Gloop services (and other types of services, in fact) via Gloop APIs. To create one, simply call the Gloop API wizard. After creating and configuring your API via the wizard, TORO Integrate will pick up the mappings and your API should then be available for use.


  1. ${name} is a path parameter and must be given a value.