Welcome, Guest
Please Login or Register.    Lost Password?

(Getting Started) Guide for HTTPConnector?
(1 viewing) (1) Guest
Convertigo Products
This is the place to ask questions, request for enhancements and more generally discuss about Convertigo products.
Go to bottomPage: 1
TOPIC: (Getting Started) Guide for HTTPConnector?
#128
(Getting Started) Guide for HTTPConnector? 1 Year, 7 Months ago Karma: 0
Is there a guide for basic use of the HTTPConnector?

I'm finding that it allows c8o to become an excellent bridge for calling external services, but I'm finding it difficult to manipulate the input and output of external RESTful services.

I see the handlers are open javascript, similar to those of the CLI, but I do not know what is available to these handlers?
adam.brenneis
Junior Boarder
Posts: 36
graph
User Offline Click here to see the profile of this user
Location: Raleigh, NC Birthday: 11/11
The administrator has disabled public write access.
 
#129
Re:(Getting Started) Guide for HTTPConnector? 1 Year, 7 Months ago Karma: 0
My first mistake was not changing the HTTP verb to 'POST' instead of 'GET'. Once I had that right (and 'HTTP Name' set on all the variables), my transaction variables are passed to the REST service.

Is there perhaps another way to get the transaction variables automatically appended to the request URL as query parameters?

More importantly though, (how) can I calculate and change the values of some of these variables (preferably via the handlers) before they are sent to the service? Setting variables of the same name in the handlers seems to have no effect.
adam.brenneis
Junior Boarder
Posts: 36
graph
User Offline Click here to see the profile of this user
Location: Raleigh, NC Birthday: 11/11
The administrator has disabled public write access.
 
#133
Re:(Getting Started) Guide for HTTPConnector? 1 Year, 6 Months ago Karma: 0
Unfortunately, there is no Starting Guide for HTMLConnector for the moment.

Besides, unfortunately once again, it is not possible for the moment to change the value of variables automatically sent to the service: the handlers (you could have used the onTransactionStarted() for instance) are "applied too late"...

So up to now, you can only push variables from your C-EMS request (transaction) to the targeted service without any modification.

To do so, let's say we have an input variable called "myvar" in our transaction. We must declare a new variable object in the transaction.
We called this variable "myvar".

If we want to use GET or POST method, we must set the 'HTTP Verb' transaction property and the 'HTTP Verb' variable's property to the same verb (GET or POST).

And we must not forget to give an 'HTTP name' to the "myvar" variable object: edit the 'HTTP name' property of the variable object and set it to any name (compliant with HTTP, obviously!), e.g. "myvar".

Then we will see that C-EMS will automatically push the myvar transaction parameter to the service (in GET or POST, accordingly to our objects) as "myvar" HTTP parameter.

For instance in GET method case:

If we request to C-EMS:

localhost:18080/convertigo/projects/TestHTTP/.xml?myvar=test

C-EMS will request to the service:

www.service.com/myservice?myvar=test
fabienb
Moderator
Posts: 16
graphgraph
User Offline Click here to see the profile of this user
Convertigo Location: Paris
Fabien Balageas
Convertigo - CTO
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: elodiee