HTTP protocol interface to Convertigo
Convertigo projects contain “requestable” objects, transactions and sequences, that can be invoked by HTTP protocol. This section describes possible URLs to access Convertigo projects and all reserved variables usable in these URLs.
Convertigo URLs
General process
The following general process describes the HTTP protocol used from the client (web browser or application) to the Convertigo server.
1. The client issues an HTTP request to Convertigo to the following root URL :
- ConvertigoServer is the host name or IP address of your Convertigo server, with possibly a port number.
- A local Convertigo Studio has as host name localhost and, in HTTP, 18080 as default port number, in HTTPS, 18081 as default port number.
- A Convertigo Server installed locally on your computer shares the same host name: localhost. The Convertigo Server default port number is 28080 for HTTP and 28443 for HTTPS.
- When installed in an existing application server, it has as IP address and ports the IP address and ports of the application server.
- A Convertigo Cloud server is accessed through its server name, for example: me.convertigo.net (no port to provide in this case, either for HTTP or HTTPS).
- ConvertigoAppName defines the name of the Convertigo web application.
- A local Convertigo Studio or a Convertigo Server installed locally has convertigo as Convertigo app name.
- A Convertigo Cloud server has cems as Convertigo app name.
- ProjectName defines the name of the project you want to invoke in Convertigo. If the project doesn’t exist, the application server generates an error (HTTP 404 Not Found).
- ConvertigoRequester defines the requester to use on the Convertigo server. It can take several values that are described further (see “Convertigo requesters”).
For example, with a project named test_project in a local Convertigo Studio:
- ConvertigoServer = localhost:18080
- ConvertigoAppName = convertigo
- ProjectName = test_project
2. This HTTP request can use the following HTTP verbs: GET, POST, PUT, DELETE, HEAD. Convertigo would handle all these verbs the same way, by executing the called transaction / sequence. Only HEAD verb will have a different result, see point 4 of this procedure.
3. The root URL can be followed by a query string, possibly -containing reserved variables and variables to be passed to the invoked transaction / sequence. These variables may also be passed in POST data.
4. Convertigo handles the request, executing the requested transaction / sequence, and returns the response to the client.
- Depending on the invoked requester, the response can contain different documents and formats, see Convertigo requesters.
- Depending on the HTTP verb used in the request, the response may be different: HEAD verb will only return headers in response (following HTTP specifications).
5. The client (web browser or application) retrieves and manages the response, also depending on the invoked requester and the project’s parametrization.
Convertigo Requesters
Several requesters can be invoked in Convertigo to execute a transaction / sequence. This section explains in details the different values that can be passed in ConvertigoRequester part of the URL.
Weblib requester
This requester is invoked by calling the index.html file of the project, i.e. setting the ConvertigoRequester at the end of the URL to index.html.
For example, with a project named test_project in a local Convertigo studio, the URL to call a transaction / sequence is:
The weblib requester automatically includes a complete JavaScript AJAX library based on JQuery that allows:
- invoking Convertigo transactions / sequences / project resources,
- managing the Convertigo responses,
- performing XSL transformation (if necessary),
- encoding request parameters,
- sequencing several calls to Convertigo,
- including in a portal the widget generated from the transaction / sequence response,
- developing interactions between widgets,
- etc.
The client requests the project’s index, its request is handled by the JavaScript library, which performs an AJAX call to Convertigo engine and handles the response.
Some parametrization of this library framework can be performed by updating global variables values. Lots of these variables can be configured thanks to weblib reserved variables, that have to be passed in the request. For more information about weblib specific parameters, see Weblib reserved parameters.
The parametrization of the engine request, i.e. the definition of the transaction / sequence to call, etc. is done by using engine reserved variables. For more information about engine specific parameters, see Engine reserved parameters.
XML requesters
These requesters are invoked by setting the ConvertigoRequester at the end of the URL to the following expression:
< PoolName>.< Extension>.
-
PoolName defines the name of the pool to invoke, in the case of pools use in the project. It is an optionnal parameter, it can be empty. Any value can be passed in this part of the URL: if a matching pool is found, it is used by Convertigo, if no pool is found, it is ignored and Convertigo returns to the default behavior. For more information about Pool object, see “Pool” documentation and examples.
-
Extension, ending the URL, can take the following values:
- xml,
- cxml,
- pxml,
- cpdf.
For example, with a project named test_project not including pools, in a local Convertigo studio, the URL to call a transaction / sequence can be:
The XML requesters allow calling a transaction / sequence of a Convertigo project, possibly in the context of a pool. They allow retreiving the XML response and possibly performing an XSL transformation.
The difference between the four extensions is about the XSL transformation. It is described in the table above:
Table 4 - 1: XML requesters extensions
Extension | Description |
---|---|
.xml | Convertigo sends the transaction / sequence XML as response, possibly including the reference to the XSL file to use for the transformation (defined in the Convertigo project). Then, the client (web browser or application) should perform the XSL transformation. |
.cxml | Abbreviation for Convertigo-XML. Convertigo performs the XSL transformation on server side, if a style sheet is defined in the Convertigo project. Then, it sends the result as response to the client. |
.pxml | Abbreviation for Pure-XML. Convertigo sends the transaction / sequence XML as response, no XSL transformation is performed nor referenced, whatever is defined in the project. |
.cpdf | Abbreviation for Convertigo-PDF. Convertigo performs the XSL:FO transformation on server side, if an XSL:FO style sheet is defined in the Convertigo project. Then, it sends the result as PDF file to the client. |
Using these requesters, the client interacts directly with Convertigo engine.
The parametrization of the engine request, i.e. the definition of the transaction / sequence to call and related parameters, is done by using engine reserved variables. For more information about engine specific parameters, see Engine reserved parameters.
JSON requesters
These requesters are invoked by setting the ConvertigoRequester at the end of the URL to the following expression: < PoolName>.< Extension>.
-
PoolName defines the name of the pool to invoke, in the case of pools use in the project. It is an optional parameter, it can be empty. Any value can be passed in this part of the URL: if a matching pool is found, it is used by Convertigo, if no pool is found, it is ignored and Convertigo returns to the default behavior. For more information about Pool object, see “Pool” documentation and examples.
-
Extension, ending the URL, can take the following values:
- json,
- jsonp.
For example, with a project named test_project not including pools, in a local Convertigo studio, the URL to call a transaction / sequence can be:
The JSON requesters allow calling a transaction / sequence of a Convertigo project, possibly in the context of a pool, and retrieving the JSON response.
The difference between the two extensions is about cross-domain issues. It is described in the following table:
Table 4 - 2: JSON requesters extensions
Extension | Description |
---|---|
.json | This extension allows an application to request Convertigo through an AJAX call, in the same domain. Then, the application retrieves the transaction / sequence response as a JSON stucture and should handle the data treatment. |
.jsonp | This extension allows an application to request Convertigo through a fake AJAX call (dynamic inclusion of script elements), not in the same domain (cross-domain compatibility). Then, the application is called back, receiving as parameter the transaction / sequence response as a JSON stucture, and the call-back function should handle the data treatment. |
Using these requesters, the client interacts directly with Convertigo engine, dynamically transforming standard output XML data to JSON structure.
The parametrization of the engine request, i.e. the definition of the transaction / sequence to call and related parameters, is done by using engine reserved variables. For more information about engine specific parameters, see Engine reserved parameters.
Call-back function specific to JSONP requester is configured using a specific engine reserved variable. For more information about specific engine reserved parameters, see JSONP specific reserved parameters.
Binaries requester
This requester is invoked by setting the ConvertigoRequester at the end of the URL to the following expression: .bin.
For example, with a project named test_project, in a local Convertigo studio, the URL to call a transaction / sequence can be:
The binaries requester allows retrieving the last attachment file downloaded by a transaction / sequence of a Convertigo project. It can be called directly with the transaction extracting the attachment.
Using this requester, the client interacts directly with Convertigo engine.
The parametrization of the engine request, i.e. the definition of the transaction / sequence to call and related parameters, is done by using engine reserved parameters. For more information about engine specific parameters, see Engine reserved parameters.
Convertigo reserved parameters
All Convertigo specific parameters are prefixed with ‘__’ (double underscored). Depending on the invoked requester, some reserved parameters can be used by the weblib AJAX framework, some by Convertigo engine.
Engine reserved parameters
Convertigo engine request parametrization, i.e. the definition of the transaction / sequence to call and related execution parameters, is done by using generic engine reserved parameters that have to be passed in the request.
Other specific engine reserved parameters exist and can be used to handle connector-related specific cases.
Generic engine reserved parameters
Here is the list of Convertigo engine-managed reserved parameters, valid and usable for all types of projects, and their description:
Table 4 - 3: Generic engine reserved parameters
Parameter Name | Description |
---|---|
__connector | Name of the requested connector. If this parameter is not present, the default connector of the requested project is used. |
__transaction | Name of the transaction to run. If this parameter is not present or its value is an empty string, the default transaction of specified connector is executed. |
__sequence | Name of the sequence to run. As no default sequence exists for a project, if this parameter is not present or its value is an empty string, the default transaction from default connector is executed. |
__project | Overrides the name of the requested project. The project name is mostly set in the URI: For more information on HTTP request URI, see Convertigo URLs If this parameter is present, it overrides the project name from the URI. |
__testcase | Name of the test case to run, in specified transaction / sequence. If this parameter is present, the variable values will be retrieved from the test case definition. |
__context | Name of the context in which run the specified transaction / sequence. If this parameter is not present, Convertigo automatically creates or reuses a context, named default, and attaches it to the client HTTP session cookie (JSessionId). When XML response is returned from Convertigo, the context name is present in the context attribute of the document element. To reuse a context that was previously created, the __context parameter should be set to the context name returned by Convertigo. |
__user_reference | This parameter is a user reference passed in entry to Convertigo transaction / sequence, which is automatically inserted unchanged in the resulting output response. It can be useful for the caller to be able to exactly determine from which request a response belongs. The value of this parameter is automatically added in the generated XML in the userReference attribute of the document element. |
__stub | If true, the requested transaction/sequence response is retrieved from the stub response (if a stub response is present for this transaction/sequence in the project).
Note:
|
__nocache |
If true, the requested transaction / sequence response is not retrieved from the cache (in the case of a cached transaction / sequence). Convertigo ignores the cached response and returns a freshly built response. For more information about transaction / sequence cache parametrization, see Response life-time property documentation in chapter 2 of this manual. |
__responseExpiryDate | If true, the requested transaction/sequence response is retrieved from the stub response (if a stub response is present for this transaction/sequence in the project).
Allows to dynamically change the value of the Response life-time property of the requested transaction / sequence.
Warning: At the end of the transaction / sequence execution, the Response life-time property is set back to its original value.
|
__supervision | If this parameter is present, the requested transaction / sequence response is not stored in the cache (in the case of a cached transaction / sequence). If a response was already stored in the cache, it is not updated. For more information about transaction / sequence cache parametrization, see Response life-time property documentation in chapter 2 of this manual |
__removeContext | If this parameter is present and its value not equal to false, the end of Convertigo context is required at the end of the transaction / sequence execution. This is mainly used in case of web Services projects. This parameter is similar to the following JavaScript statement set in the transaction / sequence core: |
__content_type | Overrides the Content-type HTTP header value of the Convertigo response for the REST requesters (.xml, .pxml, .json). |
__lang | Defines the output language for the requested transaction/sequence response. This parameter value is added as a lang attribute in the document element of the output XML and has to be managed with the response XML. Once the __lang parameter is received for a transaction/sequence, the context keeps and re-uses this value in every other transaction/sequence output XML. The lang attribute of the document element is automatically used by the legacy translation extraction rule. For more information, see Translate text extraction rule documentation in chapter 2 of this manual. |
__async | If true (or value 1), the requested transaction will be or is being processed asynchronously, an asynchronous job is created.
Warning: Asynchronous mode should be used in specific cases and has to be evaluated by a Convertigo expert developer.
|
__abort | If this parameter is present, the end of the asynchronous job is required.
If true (or value 1), the requested transaction will be or is being processed asynchronously, an asynchronous job is created.
Warning: Asynchronous mode should be used in specific cases and has to be evaluated by a Convertigo expert developer.
|
_void__transaction | If true, it sets the transaction as 'void' transaction and do not initialize associated Connector. The transaction needs to declare a single-valued variable named '_void__transaction'. |
JSONP specific reserved parameters
The following is the engine reserved parameter specific to JSONP requester and its description:
Table 4 - 4: JSONP specific engine reserved parameters
Parameter name | Description |
__callback | Defines the name of the client application function to call back after the Convertigo request execution on a cross-domain platform. |
Web connector-specific reserved parameters
The following list is the list of web connector-specific engine reserved parameters and their description:
Table 4 - 5: Web connector-specific engine reserved parameters
Parameter Name | Description |
---|---|
__header_< headerName> | Allows to dynamically pass an HTTP header to an HTTP transaction. It results into sending an HTTP header from Convertigo to the target HTTPserver.
This specific parameter defines two pieces of information:
|
__< HTTPverb>_< varName> |
Allows to dynamically pass an HTTP variable to an HTTP transaction. It results into sending an HTTP variable from Convertigo to the target HTTPserver.
This specific parameter defines three pieces of information:
|
__uri | Allows to dynamically change the value of the Sub path property of the requested HTTP transaction.
Warning: At the end of the transaction execution, the Sub path property is set back to its original value
|
__statefull | Allows to dynamically change the value of the Maintains connector state property of the requested HTML transaction. If set to true, the running transaction property is changed to true. If set to false, the running transaction property is changed to false. Warning: At the end of the transaction execution, the Maintains connector state property remains to the updated value: the original value is not set back
|
See also the __body and the __contentType reserved HTTP single-valued variable documentation in chapter 2 of this manual.
Legacy emulator-specific reserved parameters
The following list is the list of legacy emulator-specific engine reserved parameters and their description:
Table 4 - 6: Legacy emulator-specific engine reserved parameters
Parameter Name | Description |
---|---|
__service | Optional. Used at connection time only to input a specific connection parameter depending on connector type:
|
__javelin_modified_fields | This parameter holds the list of fields which have been modified. Its value is a serialized Json array of field names. |
__javelin_current_field | This parameter holds the name of the current selected field. Field names must be in the form ___field_l< Y>_c< X> with:
|
__javelin_action | This parameter holds the name of the action to be done on the target application. Actions can be:
|
__field_l< y>_c< x> | Any parameter of this form has its value inserted automatically in the target field, where:
|
Carioca portal-specific reserved parameters
The following list is the list of specific engine reserved parameters used when Convertigo is accessed through Carioca portal and their description:
Table 4 - 7: Engine reserved parameters for access through Carioca
Parameter name | Description |
---|---|
__sesskey | Authentication key generated by Carioca portal. This key is decoded by Convertigo to check the consistency and origin of the request. |
__bCarioca | Set to “true” defines the origin of the request as coming from Carioca portal. If set to “true”, the __sesskey variable has to be passed and is verified by Convertigo. |
__user | Carioca portal user name. |
__password | Carioca portal user password. |
__bVic | Set to “true” defines the user as a former VIC portal user. |
__VicUser | Former VIC portal user name. |
__VicGroup | VIC portal authorization group. Authorization groups are used in the portal to define to which services the user has the right to access. |
__VicServiceCode | VIC portal service name. |
__VicDteAddress | Connection address of the VIC service. |
__VicCommDevice | CommDevice address used for a three thirds architecture (case of the PAVI used for Videotex emulator) through Carioca or VIC portal. |
Weblib reserved parameters
Weblib framework parametrization can be performed by updating global variables values. Lots of these variables can be set thanks to weblib reserved parameters that have to be passed:
- In the request, using a query string that sends all parameters to the network, or
- By a hash query (using a ‘#’) that only sends needed parameters in POST data.
Here is the list of Convertigo weblib-managed reserved parameters and their description:
Table 4 - 8: Weblib reserved parameters
Parameter Name | Description |
---|---|
__ajax_method | This parameter enables modifying the HTTP method of the AJAX requests from the weblib to Convertigo. It can take both values: "GET" or "POST". Default variable value is "POST". |
__auto_refresh | In case of a Web Clipper project, weblib framework is able to check current page’s DOM changes, and to automatically refresh the clipped page displayed to the user. This variable is by default set to "true", enabling auto refreshing. Using this parameter to set it to "false" disables auto refreshing. The auto refresh needs more network traffic because the weblib framework pools the connector state regularly to monitor DOM changes. |
__auto_resize | In case of a response presented as a widget in a portal, the weblib framework is able to automatically adapt the height of the widget to its content, when the content is modified by a transaction or sequence result. This variable is by default set to "true", enabling auto resizing. Using this parameter to set it to "false" disables auto resizing. |
__enc | If set to true, activates RSA encoding. Default variable value is false. |
__first_call | This parameter defines whether a call to Convertigo has to be performed using the page’s query/hash Parameters, after the init_finished hook. By default set to true>, the page automatically calls convertigo using these Parameters. Beware that the return value of the init_finished hook has to be in adequacy with this parameter value or can affect the expected behavior. |
__localCache | This parameter allows to configure the use of the Local Cache feature on C8O calls and responses. Thanks to the Local Cache, you can save network traffic between the device and the server, and you are able to display data when the device is not connected to the network.
When enabled, the Local Cache permits to store the responses to a C8O call locally on the device, using the variables and their values as cache key.
This parameter takes a JSON structure composed as follows:
- "ttl": defines the time to live of the cached response, in milliseconds. If no value is passed, the time to live is infinite. |
__requester_prefix |
This parameter defines a prefix before the requester extension in the AJAX requests from the weblib to Convertigo. It matches the pool name part of the URL. This parameter can take any value: if a matching pool is found, it is used by Convertigo, if no pool is found, it is ignored and Convertigo returns to the default behavior. |
__resize_offset | Linked to the auto-resizing functionality. This parameter enables defining an offset height (in pixels) to add to the automatically calculated height, in order to adjust the resizing height. This variable is by default set to "50" (pixels), the value must be a number (in pixels). |
__send_portal_username | In case of a response presented as a widget in gatein portal (Convertigo Mashup Composer), the weblib framework is able to automatically add a portal_username parameter to the request to Convertigo with the name of the user logged in the portal as value. This variable is by default set to true, enabling sending portal username. Using this parameter to set it to "false" disables sending portal username. |
__target_append | The response of a Convertigo transaction / sequence execution, possibly presented thanks to an XSL transformation, can either:
Paired with the __target_id variable, these settings enable to replace or add content to the whole content or a part of the widget. |
__target_id | The response of a Convertigo transaction / sequence execution, possibly presented thanks to an XSL transformation, can either:
This variable enables defining the id of the Element into which the response has to be added. Default value is "" (empty string) and aims the body element. If this variable is left empty, the response is added at the root of the widget. Paired with the __target_append variable, these settings enable to replace or add content to the whole content or a part of the widget. |
__testplatform | If called with no Parameters, the weblib framework automatically redirects the client to the test-platform of the project. This parameter enables changing this default behavior.
|
__use_siteclipper_plugin | In case of a Site Clipper project, this parameter enables using the iframe encapsulation for Site Clipper requests. If set to "true", the clipped web page is loaded through an iframe, which enables:
Default value is true. |
__xsl_side | This parameter enables modifying the side of response’s XSL transformation, client XSL transformation or server XSL transformation. It matches the requester extension to set in the AJAX requests from the weblib to Convertigo.
This variable can take two values :
|
Web service interface to Convertigo
Convertigo projects can be accessed using web services. This section describes possible URLs to access Convertigo projects through the two types of web services that are supported, then it describes the problem of context state conservation.
SOAP web services
SOAP WSDL of a Convertigo project can be accessed by using the following URL:
Where:
1. ConvertigoServer is the host name or IP address of your Convertigo server, with possibly a port number.
- A local Convertigo Studio has as host name localhost and as default port number 18080 for HTTP.
- A Convertigo Server installed locally on your computer shares the same host name: localhost. The Convertigo Server default port number is 28080 for HTTP.
- A Convertigo Cloud server is accessed through its server name, for example: me.convertigo.net (no port to provide in this case).
2 . ConvertigoAppName defines the name of the Convertigo web application.
- A local Convertigo Studio or a Convertigo Server installed locally has convertigo as Convertigo app name.
- A Convertigo Cloud server has cems as Convertigo app name.
3. ProjectName defines the name of the project you want to invoke in Convertigo. If the project doesn’t exist, the application server generates an error (HTTP 404 Not Found).
4. WsType defines the type of encoding you want for SOAP web service. It corresponds to SOAP web service requesters that can be invoked on Convertigo. For more information about the other available requesters, see Convertigo URLs.
This WsType part of the URL can take several values that are detailed in following table:
Table 4 - 9: SOAP encoding types
Extension | Description |
---|---|
.ws | This extension is used for RPC encoded web services. |
.wsl | This extension is used for document/literal web services. |
For example, with a project named test_project in a local Convertigo Server, the URL to retrieve the SOAP WSDL can be:
For the same project in a Convertigo Cloud Server, the URL to retrieve the SOAP WSDL is:
REST web services
Any Convertigo project can be invoked as a REST web service, using the following URL:
Where:
1. ConvertigoServer is the host name or IP address of your Convertigo server, with possibly a port number.
- A local Convertigo Studio will have as host name localhost and as default port number 18080.
- A Convertigo Server installed locally on your computer will share the same host name: localhost. When installed in an existing application server, it will have as IP address the IP address of the application server. The Convertigo Server default port number is 28080.
- A Convertigo Cloud server is accessed through its server name, for example: me.convertigo.net (no port to provide in this case).
2. ConvertigoAppName defines the name of the Convertigo web application.
- A local Convertigo Studio or a Convertigo Server installed locally has convertigo as Convertigo app name.
- A Convertigo Cloud server has cems as Convertigo app name.
3. ProjectName defines the name of the project you want to invoke in Convertigo. If the project doesn’t exist, the application server generates an error (HTTP 404 Not Found).
You can notice that this URL uses an XML requester; for more information about the other available requesters, see Convertigo URLs.
For more information about HTTP protocol to call transactions or sequences and the variables to pass to this request, see HTTP protocol interface to Convertigo.
To expose a project as a REST web service with customized URLs, you may use an URL Mapper object.
It allows you to define Path Mappings objects to the outside world: /api/v1/accounts/{id}
It generates a Swagger compliant definition of your service into a YAML or JSON format, which may be consumed by the Swagger console or any other REST client to test the generated API.
For more information, see URL Mapper
Context state conservation
When using web services, you can have:
-
Stateless web services: when the response of a web service method does not depend on a previous state left by a preceding web service call. This is also called “atomic” web services.
-
Stateful web services: when the response of a web service method does depend on a previous state left by a preceding call. Convertigo projects mostly generate stateful web services. For example, you cannot get information from a legacy application or a web application if you don’t call a “login” transaction before.
Consuming stateful web services, the programmer must maintain the HTTP session from its calling application to Convertigo between two methods calls. See the corresponding web service client documentation to do so.
A few examples for SOAP clients
If you are using Java AXIS web service client, simply use the following line of code:
If you are using Microsoft .NET web service client, use this code construction (C# Syntax):
Case of REST calls
For REST web service calls, be sure that the HTTP client will maintain session cookies with Convertigo.