WebserviceCOM
Definition:
Webservice is a connector used to send data with other web applications.
Icon:
Configuration:
There is 2 parts in configuring of the webservice connector:
Configuring the Webservice in the ConfigurationCOM menu:
In order to use the Webservice, you have first to configure it in the ConfigurationCOM menu in the portal in the distant tab. This configuration is unique to the environment, and cannot be reused in another environment.
There are many parameters to configure for the WebService connector:
- Name: The name of the distant Webservice used
- IP/host: The domain name of the server or the IP address used
- URI: The path in the IP/host used to send the files
- Method: signifies the method used to get the data( GET, POST, PUT, DELETE)
- Port: The port of the listening
- Protocol: The protocole used (HTTP ou HTTPS)
- Authentification Mode: There is 2 different ways for the authentification mode
- Basic: is a mode that needs 3 attributes(header: the header'name, user encoded in base64, password encoded in base64)
- Token: is a mode that consists on putting a token in the header. This mode uses 2 parameters: The header and the token is an encoded and encrypted data with a unique key using the HASHMAC algorithm.
- Timeout: is the max time acceptable to connect to the WS and get the result.
- Charset: is the encodage of the json file that will be sent to WS and of the result file
Configuring the Webservice connector in the scenario:
Second, you have to configure the connector in the Scenario menu.
For this configuration, you have to fill these parameters:
- Destinataire: The environment where the distant configuration exists
- Config: The name of the distant configuration in the chosen environment
- Dyn.enveloppe: is a Yes or No value that mentions if the enveloppe is dynamic
- Enveloppe: if the enveloppe is fixed, this parameter is for uploading the enveloppe file or the connector's name that contains the file and if it is dynamic, you mention the connector's name that contains the enveloppe.
- Data: the connector's name that contains the data
- Output FileName: The output file name
Elements of the WS:
The enveloppe:
It contains the enveloppe of the informations that will be transferred to the WS.
The enveloppe can be linked to the message data in this way.
- %DATA% : Le content of the file mentionned in the parameter DATA will the same in the message
- %DATA64% : the message file linked to DATA will be encoded in base 64 and inserted
- %DATAZIP% : the message file linked to DATA will be zipped and inserted
- %DATAZIP64% : the message file linked to DATA will be encoded in base 64 and zipped then inserted
Note: The enveloppe may be:
- uploaded in the enveloppe parameter of the WS as a file or as a connector name that contains the file
- inserted with a reference to the message
The message:
It contains the content of the message that will be transferred to the WS, it will be inserted inside the enveloppe of the connector. The message can be uploaded dynamically using the elements of the scenario or can be fixed and uploaded inside the WS connector.
Example:
- Scenario:
- Enveloppe: When using %DATA64% or %DATAZIP64% you need to add the "" to the enveloppe.
The enveloppe can sometimes only have %DATA% in its context.
- Result: is the encoded file that exists in the connector FileDetection1 in base 64.
Using XML Data:
To utilize XML data, you need to add the parameter "iXDataXml" to the envellope: