User Tools

Site Tools


webservice_adaptor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

webservice_adaptor [2019/12/16 13:35]
montse
webservice_adaptor [2024/12/11 15:31] (current)
montse
Line 12: Line 12:
 ===== Setup Parameters of the REST Adaptor ​ ===== ===== Setup Parameters of the REST Adaptor ​ =====
  
-  * ** EndPoint**: ​Base URL to access the service. +  * ** EndPoint**: ​base URL to access the service. 
-  * **Keep_Session**: ​Indicates ​whether the session should be maintained between requests to the service. If it is checked, the adapter will add the cookies it receives in the responses to the requests it makes. +  * **Keep_Session**: ​indicates ​whether the session should be maintained between requests to the service. If it is checked, the adapter will add the cookies it receives in the responses to the requests it makes. 
-  * **IsSecure**: ​Indicates ​if requests to the service were sent over the http or https protocol. +  * **IsSecure**: ​indicates ​if requests to the service were sent over the http or https protocol. 
-  * **Service Charset(Opt.)**: ​For setting the charset you will use in a sHTTP service (e.g. REST). Words and sentences in text are created from characters. A character encoding provides a key to unlock (ie. crack) the code. Thus, the charset is the encoding information,​ which is to say the set of mappings between the bytes in the computer and the characters in the character set. Without the key, the data looks like garbage. An example of charset are UTF-8 or UTF-16. +  * **Service Charset(Opt.)**: ​for setting the charset you will use in a sHTTP service (e.g. REST). Words and sentences in text are created from characters. A character encoding provides a key to unlock (ie. crack) the code. Thus, the charset is the encoding information,​ which is to say the set of mappings between the bytes in the computer and the characters in the character set. Without the key, the data looks like garbage. An example of charset are UTF-8 or UTF-16. 
-  * **WADL_File (Opt.)**: ​This is a machine-readable XML description of HTTP-based web services (e.g. REST). The aim of the WADL file is to model the resources provided by a service and the relationships between them. +  * **WADL_File (Opt.)**: ​this is a machine-readable XML description of HTTP-based web services (e.g. REST). The aim of the WADL file is to model the resources provided by a service and the relationships between them. 
-  * **Headers**: ​Allows ​adding headers to all the requests that are sent to the service. +  * **Headers**: ​allows ​adding headers to all the requests that are sent to the service. 
-  * **Authentication Type**: ​Allows ​selecting the type of authentication that the service requires. Once selected, it allows us to enter the necessary data for the type of authentication selected.+  * **Authentication Type**: ​allows ​selecting the type of authentication that the service requires. Once selected, it allows us to enter the necessary data for the type of authentication selected.
  
  
Line 24: Line 24:
  
   * **deleteRest(resource,​ headers)**   * **deleteRest(resource,​ headers)**
-      * Description: ​It allows the configuration of an HTTP request of type Delete. +      * Description: ​it allows the configuration of an HTTP request of type Delete. 
-      * Resource: ​Indicates ​the resource within the EndPoint on which the request will be made. +      * Resource: ​indicates ​the resource within the EndPoint on which the request will be made. 
-      * Headers: ​Indicates ​the headers that must be added to the request. +      * Headers: ​indicates ​the headers that must be added to the request. 
-      * Charset: ​To choose what charset the user wants. +      * Charset: ​to choose what charset the user wants. 
-      * Body: ​Indicates ​que content of the parameter. ​+      * Body: ​indicates ​que content of the parameter. ​
  
   * **getALLJSONElementValueByTagname(ResponseName,​ JsonTagName)**   * **getALLJSONElementValueByTagname(ResponseName,​ JsonTagName)**
-      * Description: ​If the content of the response to a request is JSON, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. The result is presented with the values separated by the character |, in the field Message / Result / Value. ​  +      * Description: ​if the content of the response to a request is JSON, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. The result is presented with the values separated by the character |, in the field Message / Result / Value. ​  
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * JSonTagName:​ TagName expression used to identify the element.       * JSonTagName:​ TagName expression used to identify the element.
  
   * **getALLXMLElementValueByTagName(StepResponse,​ ElementTag)**   * **getALLXMLElementValueByTagName(StepResponse,​ ElementTag)**
-      * Description: ​If the content of the response to a request is XML, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. Instead of returning only one element (the first), this PF returns a list of all elements. +      * Description: ​if the content of the response to a request is XML, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. Instead of returning only one element (the first), this PF returns a list of all elements. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * ElementTag: XML´s tag used to identify the element.       * ElementTag: XML´s tag used to identify the element.
  
   * **getCookieValue(StepResponse,​ Cookie)**   * **getCookieValue(StepResponse,​ Cookie)**
-      * Description: ​Retrieve ​the value of the indicated cookie. +      * Description: ​retrieve ​the value of the indicated cookie. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated. +      * ResponseName: ​indicate ​the name which the Http Response was generated. 
-      * Cookie: ​Indicates ​Cookie´s name to retrieve.+      * Cookie: ​indicates ​Cookie´s name to retrieve
 + 
 +  * **getElementsCountByJsonPath(JsonPath,​ ResponseName)**:​ returns the number of elements that have the same JsonPath. 
 +        * JsonPath: the JsonPath to search for. 
 +        * ResponseName:​ the name under which the HTTP response was generated. 
 +       
 +  * **getElementsCountByTagName(tagName,​ ResponseName)**: ​ returns the number of elements that have the same tag name.  
 +          * tagName: the tag name to search for. 
 +          * ResponseName:​ the name under which the HTTP response was generated.  
 +      
 +  * **getElementsValueByJsonPath(JsonPath,​ ResponseName)**:​ returns all elements that have the same JsonPath. 
 +        * JsonPath: the JsonPath to search. 
 +        * ResponseName:​ the name under which the HTTP response was generated.
  
   * **getHeaderValue(StepResponse, ​ Header)**   * **getHeaderValue(StepResponse, ​ Header)**
-      * Description: ​It allows to obtain the value of a received header in an HTTP response. +      * Description: ​it allows to obtain the value of a received header in an HTTP response. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated. +      * ResponseName: ​indicate ​the name which the Http Response was generated. 
-      * Header: ​The name of the header from which you want to extract the value.+      * Header: ​the name of the header from which you want to extract the value
 + 
 +  * **getHTMLElementValueByXpath()** 
 +      * Description:​ if the content of the response to a request is HTML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. 
 +      * ResponseName:​ indicate the name which the Http Response was generated. 
 +      * XPathExp: XPath expression used to identify the element.
  
   * **getJSONElementValueByJsonPath(StepResponse,​ JSonPathExp)**   * **getJSONElementValueByJsonPath(StepResponse,​ JSonPathExp)**
-      * Description: ​If the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the JsonPath. If there are more than one element, returns the first. +      * Description: ​if the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the JsonPath. If there are more than one element, returns the first. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * JSonPathExp:​ JSonPath expression used to identify the element.       * JSonPathExp:​ JSonPath expression used to identify the element.
  
   * **getJSONElementValueByTagName(StepResponse,​ TagnameExp)**   * **getJSONElementValueByTagName(StepResponse,​ TagnameExp)**
-      * Description: ​If the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the TagName. If there are more than one element, returns the first. The result is presented with the values separated by the character |, in the field Message / Result / Value. +      * Description: ​if the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the TagName. If there are more than one element, returns the first. The result is presented with the values separated by the character |, in the field Message / Result / Value. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * JSonTagName:​ Tagname expression used to identify the element.       * JSonTagName:​ Tagname expression used to identify the element.
 +
 +  * **getResponseBody**:​ get the body of the http response, without the response code or other headers, only the body, that is, the json or the xml.
  
   * **getResponseStatus(StepResponse)**   * **getResponseStatus(StepResponse)**
-      * Description: ​Allows ​to retrieve response´s Http status code. +      * Description: ​allows ​to retrieve response´s Http status code. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
  
 +  * **getResponseTime**:​ returns the time taken in milliseconds to receive the response to a request. To identify the response it receives a parameter with the name of the HttpResponse variable from which we want to obtain the information.
 +   
   * **getRest(resource,​ headers, parameters)** ​   * **getRest(resource,​ headers, parameters)** ​
-      * Description: ​It allows to configure an HTTP request of type Get. +      * Description: ​it allows to configure an HTTP request of type Get. 
-      * Resource: ​Indicates ​the resource within the EndPoint on which the request will be made. +      * Resource: ​indicates ​the resource within the EndPoint on which the request will be made. 
-      * Headers: ​Indicates ​the headers that must be added to the request. +      * Headers: ​indicates ​the headers that must be added to the request. 
-      * Parameters: ​Indicates ​the parameters that must be added to the URL of the request. +      * Parameters: ​indicates ​the parameters that must be added to the URL of the request. 
-      * Charset: ​To choose what charset the user wants.+      * Charset: ​to choose what charset the user wants.
  
   * **getXMLElementValueByTagName(StepResponse,​ ElementTag)**   * **getXMLElementValueByTagName(StepResponse,​ ElementTag)**
-      * Description: ​If the content of the response to a request is XML, this function allows to retrieve a value of an element using the tag to identify it. If there are more than one element, returns the first. +      * Description: ​if the content of the response to a request is XML, this function allows to retrieve a value of an element using the tag to identify it. If there are more than one element, returns the first. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * ElementTag: XML´s tag used to identify the element.       * ElementTag: XML´s tag used to identify the element.
  
   * **getXMLElementValueByXPath(StepResponse,​ XPathExp)**   * **getXMLElementValueByXPath(StepResponse,​ XPathExp)**
-      * Description: ​If the content of the response to a request is XML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. +      * Description: ​if the content of the response to a request is XML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. Also, it allows to search values in responses with XHTML content type
-      * ResponseName: ​Indicate ​the name which the Http Response was generated.+      * ResponseName: ​indicate ​the name which the Http Response was generated.
       * XPathExp: XPath expression used to identify the element.       * XPathExp: XPath expression used to identify the element.
  
   * **patchRest(resource,​ headers, content-type,​ body)**   * **patchRest(resource,​ headers, content-type,​ body)**
-      * Description: ​It allows you to configure an HTTP request of type Patch. +      * Description: ​it allows you to configure an HTTP request of type Patch. 
-      * Resource: ​Indicates ​the resource within the EndPoint on which the request will be made. +      * Resource: ​indicates ​the resource within the EndPoint on which the request will be made. 
-      * Headers: ​Indicates ​the headers that must be added to the request.+      * Headers: ​indicates ​the headers that must be added to the request.
       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.
-      * Body: Content ​of the Http request.+      * Body: content ​of the Http request.
  
   * **postRest(resource,​ headers, content-type,​ body)**   * **postRest(resource,​ headers, content-type,​ body)**
-      * Description: ​It allows you to configure an HTTP request of type Post. +      * Description: ​it allows you to configure an HTTP request of type Post. 
-      * Resource: ​Indicates ​the resource within the EndPoint on which the request will be made. +      * Resource: ​indicates ​the resource within the EndPoint on which the request will be made. 
-      * Headers: ​Indicates ​the headers that must be added to the request.+      * Headers: ​indicates ​the headers that must be added to the request.
       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.
-      * Body: Content ​of the Http request.+      * Body: content ​of the Http request.
  
   * **putRest(resource,​ headers, content-type,​ body)** ​     * **putRest(resource,​ headers, content-type,​ body)** ​  
-      * Description: ​Allows ​you to configure an HTTP request of type Put. +      * Description: ​allows ​you to configure an HTTP request of type Put. 
-      * Resource: ​Indicates ​the resource within the EndPoint on which the request will be made. +      * Resource: ​indicates ​the resource within the EndPoint on which the request will be made. 
-      * Headers: ​Indicates ​the headers that must be added to the request.+      * Headers: ​indicates ​the headers that must be added to the request.
       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.       * Content-type:​ HTTP standard header that indicates the type of content that is added to the body of the request.
-      * Body: Content ​of the Http request.+      * Body: content ​of the Http request.
    
   * **responseBodyContainsText(responseName,​ searchValue)**   * **responseBodyContainsText(responseName,​ searchValue)**
-      * Description: ​Search ​in the body field of the response (stepResponse),​ if there is any match with the string of parameter searchValue. True return if affirmative. +      * Description: ​search ​in the body field of the response (stepResponse),​ if there is any match with the string of parameter searchValue. True return if affirmative. 
-      * ResponseName: ​Indicate ​the name which the Http Response was generated. +      * ResponseName: ​indicate ​the name which the Http Response was generated. 
-      * SearchValue: ​Text to search inside body of response.+      * SearchValue: ​text to search inside body of response.
   
   * **setBasicAuthentication(user,​ password)**   * **setBasicAuthentication(user,​ password)**
-          *  Description: ​It allows to configure the authentication scheme of the requests that are sent to the EndPoint as BasicAuthentication. It overwrites the security setting done in the adapter setup. +          *  Description: ​it allows to configure the authentication scheme of the requests that are sent to the EndPoint as BasicAuthentication. It overwrites the security setting done in the adapter setup. 
-          *  User: User code used as credential. +          *  User: user code used as credential. 
-          *  Password: ​Password ​to present as credential.+          *  Password: ​password ​to present as credential.
  
   * **setBearerTokenAuthentication(token)**   * **setBearerTokenAuthentication(token)**
-      * Description: ​It allows configuring the authentication scheme of the requests that are send to the endpoint as Bearer Token Authentication Scheme. It overwrites the security setting done in the adapter setup.  +      * Description: ​it allows configuring the authentication scheme of the requests that are send to the endpoint as Bearer Token Authentication Scheme. It overwrites the security setting done in the adapter setup.  
-      * Token: ​Token´s ​value that will be presented as credential.+      * Token: ​token´s ​value that will be presented as credential.
  
   * **setDigestAuthentication(user,​ password, realm, nonce, algorithm, Qoq, NonceCount, ClientNonce,​ Opaque)**   * **setDigestAuthentication(user,​ password, realm, nonce, algorithm, Qoq, NonceCount, ClientNonce,​ Opaque)**
-      * Description: ​It allows configuring the authentication schema of the requests that are send to the endpoint as Digest Authentication Schema. It overwrites the security setting done in the adapter setup. +      * Description: ​it allows configuring the authentication schema of the requests that are send to the endpoint as Digest Authentication Schema. It overwrites the security setting done in the adapter setup. 
-      * User: Username ​used as credential. +      * User: username ​used as credential. 
-      * Password: ​Password ​to present as credential. ​  +      * Password: ​password ​to present as credential. ​  
-      * Realm: ​Security ​domain on which security validation must be performed. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * Realm: ​security ​domain on which security validation must be performed. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * Nonce: ​Nonce returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * Nonce: ​nonce returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * Algorithm: ​Algorithm ​used for encryption. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * Algorithm: ​algorithm ​used for encryption. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * Qoq: Quality ​of the protection code. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * Qoq: quality ​of the protection code. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * NonceCount: ​NonceCount ​associated with the request. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * NonceCount: ​nonceCount ​associated with the request. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * ClientNonce: ​Nonce generated by the client. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. +      * ClientNonce: ​nonce generated by the client. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. 
-      * Opaque: ​Opaque ​returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtain+      * Opaque: ​opaque ​returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtain
  
  
   * **setNoneAuthentication()**   * **setNoneAuthentication()**
-      * Description: ​It allows to configure the authentication method of the requests that are sent to the EndPoint as requests without authentication scheme. It overwrites the security setting done in the adapter setup.\\  ​+      * Description: ​it allows to configure the authentication method of the requests that are sent to the EndPoint as requests without authentication scheme. It overwrites the security setting done in the adapter setup.\\  ​
  
  
Line 157: Line 178:
 Now comes the enumeration of the authentication types, make a brief description of them and think what parameters we might need. Now comes the enumeration of the authentication types, make a brief description of them and think what parameters we might need.
  
-  * ** No Authorization (None Auth): ** If the user selects this method, it is not necessary to authenticate to use the service.+  * ** No Authorization (None Auth): ** if the user selects this method, it is not necessary to authenticate to use the service.
  
-  * ** Basic Authorization (Basic Auth): ** The simplest method only requires the user and password parameters. https://​en.wikipedia.org/​wiki/​Basic_access_authentication+  * ** Basic Authorization (Basic Auth): ** the simplest method only requires the user and password parameters. https://​en.wikipedia.org/​wiki/​Basic_access_authentication
  
-  * ** Digest Authorization (Digest Auth): ** This method is a bit stronger because the key is encrypted and the user, in the postman tool when you select this type of authentication requests the following parameters:​\\ \\ +  * ** Digest Authorization (Digest Auth): ** this method is a bit stronger because the key is encrypted and the user, in the postman tool when you select this type of authentication requests the following parameters:​\\ \\ 
        * User        * User
        * Password\\ \\ And as optional (default values are used if the user does not provide them) the following:​\\ \\         * Password\\ \\ And as optional (default values are used if the user does not provide them) the following:​\\ \\ 
-       * Realm: ​Security ​domain against which to authenticate. +       * Realm: ​security ​domain against which to authenticate. 
-       * Algorithm: ​Encryption ​algorithm. MD5 or MD5-sess. +       * Algorithm: ​encryption ​algorithm. MD5 or MD5-sess. 
-       * Nonce: ​Code that the server issues in the response when a request is not authorized. It is unique per session and must be included in the following requests. +       * Nonce: ​code that the server issues in the response when a request is not authorized. It is unique per session and must be included in the following requests. 
-       * Qop: Quality ​of protection, the possible values are auth (more common) or auth-int (authorization with integrity) I think less supported and used. +       * Qop: quality ​of protection, the possible values are auth (more common) or auth-int (authorization with integrity) I think less supported and used. 
-       * Nonce Count: ​Number ​of request made to the server with the same nonce, its obligation depends on the value assigned to Qop. +       * Nonce Count: ​number ​of request made to the server with the same nonce, its obligation depends on the value assigned to Qop. 
-       * Opaque: ​It is a value returned by the server in the first unauthorized response, and must be added without modifying all subsequent requests to the server. https://​en.wikipedia.org/​wiki/​Digest_access_authentication+       * Opaque: ​it is a value returned by the server in the first unauthorized response, and must be added without modifying all subsequent requests to the server. https://​en.wikipedia.org/​wiki/​Digest_access_authentication
  
  
  
-  * ** OAuth 1.0:​** ​This method, open Authorization,​ is more modern to create a first standard related to authentication. OAuth 2.0 is used more but we could find a service that uses it. In Postman the following parameters are requested:​\\ \\  +  * ** OAuth 1.0:​** ​this method, open Authorization,​ is more modern to create a first standard related to authentication. OAuth 2.0 is used more but we could find a service that uses it. In Postman the following parameters are requested:​\\ \\  
-      * ConsumerKey: ​value used by the consumer of the service to identify himself to it. +      * ConsumerKey: ​value used by the consumer of the service to identify himself to it. 
-      * ConsumerSecret: ​Token used by the consumer to validate their ownership of the ConsumerKey. +      * ConsumerSecret: ​token used by the consumer to validate their ownership of the ConsumerKey. 
-      * Access Token: ​Access ​Token. +      * Access Token: ​access ​Token. 
-      * Token Secret: ​Another ​key to ensure ownership of the access token.\\ \\  And as optional parameters (default values if user does not enter):\\ \\  +      * Token Secret: ​another ​key to ensure ownership of the access token.\\ \\  And as optional parameters (default values if user does not enter):\\ \\  
-      * Signature Method: ​The signature method used by the consumer to sign the requests. +      * Signature Method: ​the signature method used by the consumer to sign the requests. 
-      * Timestamp: ​timestamp is added to the request. +      * Timestamp: ​timestamp is added to the request. 
-      * Nonce: ​Random ​string generated by the client, will be added to all the requests. +      * Nonce: ​random ​string generated by the client, will be added to all the requests. 
-      * Realm: ​Indicates ​the security domain that performs authentication. https://​es.wikipedia.org/​wiki/​OAuth+      * Realm: ​indicates ​the security domain that performs authentication. https://​es.wikipedia.org/​wiki/​OAuth
  
-  * ** OAuth 2.0:​** ​The evolution of OAuth 1.0, is the standard most supported by large Internet companies, Google, Facebook, Twitter, etc., not being an expert, I believe it is two-step authentication. Postman only asks for the parameter:+  * ** OAuth 2.0:​** ​the evolution of OAuth 1.0, is the standard most supported by large Internet companies, Google, Facebook, Twitter, etc., not being an expert, I believe it is two-step authentication. Postman only asks for the parameter:
       * Access Token. Access code to the service. But in the option to request an Access Token request data to authenticate against the service that is going to give you the access code for that operation. In addition to these methods other authentication methods appear in Postman such as:        * Access Token. Access code to the service. But in the option to request an Access Token request data to authenticate against the service that is going to give you the access code for that operation. In addition to these methods other authentication methods appear in Postman such as: 
       * Bearer Token. https://​swagger.io/​docs/​specification/​authentication/​bearer-authentication/​       * Bearer Token. https://​swagger.io/​docs/​specification/​authentication/​bearer-authentication/​
Line 198: Line 219:
 The existing methods are: The existing methods are:
  
- * **GET:​** ​It is used to read and retrieve the information of a resource on the server. It is probably the easiest to implement since all the most relevant data of the request appear in the URL of the request. + * **GET:​** ​it is used to read and retrieve the information of a resource on the server. It is probably the easiest to implement since all the most relevant data of the request appear in the URL of the request.
           * httpResponse = get (UrlBase, Resource, List Headers, List Parameters)           * httpResponse = get (UrlBase, Resource, List Headers, List Parameters)
           * UrlBase = It would be obtained from the initialization of the adapter.           * UrlBase = It would be obtained from the initialization of the adapter.
Line 210: Line 231:
           * This is the simple screen in which the user includes headers and headers as a single String that will be parsed by the adapter to decompose it, another design could be made in which the user would be adding parameters or headers at will.           * This is the simple screen in which the user includes headers and headers as a single String that will be parsed by the adapter to decompose it, another design could be made in which the user would be adding parameters or headers at will.
  
- * **POST:​** ​It is used to create a resource on the server, with the information contained in a form, or in a Json, XML or other file. That is, the way in which the data is transmitted in the body of the request may vary, and it is necessary to allow the user to indicate it in some way in order to build the request. It is the header content_type. ​+ * **POST:​** ​it is used to create a resource on the server, with the information contained in a form, or in a Json, XML or other file. That is, the way in which the data is transmitted in the body of the request may vary, and it is necessary to allow the user to indicate it in some way in order to build the request. It is the header content_type. ​
           * httpResponse = post (UrlBase, Resource, List Headers, Content Type, Data)           * httpResponse = post (UrlBase, Resource, List Headers, Content Type, Data)
           * In this case, the data could be represented in a Json or XML file that the user should either be able to upload to the application or cut and paste it in some editor, as in the case of the Queries or the Javascript code.           * In this case, the data could be represented in a Json or XML file that the user should either be able to upload to the application or cut and paste it in some editor, as in the case of the Queries or the Javascript code.
Line 218: Line 239:
  
  
- * **PUT:​** ​It is used to update the information related to a resource on the server. Similar to post in requirements.+ * **PUT:​** ​it is used to update the information related to a resource on the server. Similar to post in requirements.
           * httpResponse = put ("​UrlBase,​ Resource, List Headers, Content Type, Data)           * httpResponse = put ("​UrlBase,​ Resource, List Headers, Content Type, Data)
  
- * **DELETE:​** ​It is used to delete a resource on the server.+ * **DELETE:​** ​it is used to delete a resource on the server.
           * httpResponse = delete ("​UrlBase,​ Bank, User, Account, balance"​)           * httpResponse = delete ("​UrlBase,​ Bank, User, Account, balance"​)
   ​   ​
- * **HEAD:​** ​Similar ​to GET, but the response does not contain the body, the data, only contains the header.+ * **HEAD:​** ​similar ​to GET, but the response does not contain the body, the data, only contains the header.
  
  
Line 243: Line 264:
  
 As we have indicated previously some of these functions could be: As we have indicated previously some of these functions could be:
-  * Integer Code = GetStatusCode (httpResponse).+  ​* **Integer Code** = GetStatusCode (httpResponse).
     * Returns the return code as a variable to the diagram.     * Returns the return code as a variable to the diagram.
-  * Integer timeMilis = GetResponseTime (httpResponse).+  ​* **Integer timeMilis** = GetResponseTime (httpResponse).
     * Returns the time spent processing the request.     * Returns the time spent processing the request.
-  * String headerValue = GetHeaderValue (httpResponse,​ String HeaderKey).+  ​* **String headerValue** = GetHeaderValue (httpResponse,​ String HeaderKey).
     * Returns the value contained in the header indicated by the HeaderKey parameter.     * Returns the value contained in the header indicated by the HeaderKey parameter.
-  * String propertyValues = GetXPathPropertyValue (httpResponse,​ String XPathExp);+  ​* **String propertyValues** = GetXPathPropertyValue (httpResponse,​ String XPathExp);
     * This function would return the value or list of values contained in the response elements that are macheted with the Xpath expression introduced as a parameter. If there are several elements in the document that meet the condition, all values separated by some character would be concatenated. It only applies when the response is in XML format.     * This function would return the value or list of values contained in the response elements that are macheted with the Xpath expression introduced as a parameter. If there are several elements in the document that meet the condition, all values separated by some character would be concatenated. It only applies when the response is in XML format.
-  * String propertyValues = GetJSonPathPropertyValue (httpResponse,​ String JSonPathExp);​+  ​* **String propertyValues** = GetJSonPathPropertyValue (httpResponse,​ String JSonPathExp);​
     * Similar to the previous function but using the JSonPath standard to navigate over the response data. It only applies to JSon type responses. In principle we will develop more functions of this type that allow retrieving the data of the response and introduce them as variables in the flow of execution of the diagram, in case they want to be used as input values to other messages in the diagram.     * Similar to the previous function but using the JSonPath standard to navigate over the response data. It only applies to JSon type responses. In principle we will develop more functions of this type that allow retrieving the data of the response and introduce them as variables in the flow of execution of the diagram, in case they want to be used as input values to other messages in the diagram.
  
Line 306: Line 327:
 === Object View: === === Object View: ===
  
-{{:Rest mapping assistant_eng_11.png?nolink&​8000|}}+{{ :en:​rest_mapping_assistant_eng_11vista_de_objeto.png?direct&8000 |}}
  
 From this view is possible to select the object with which we want to work. Only objects mapped with the WebService adaptor can be selected. From this view is possible to select the object with which we want to work. Only objects mapped with the WebService adaptor can be selected.
Line 342: Line 363:
 Runs the assertion associated with the selected message. Runs the assertion associated with the selected message.
  
-{{:Rest mapping assistant_eng_6.png?nolink&​8000|}}+{{ :rest_mapping_assistant_eng_6check_assertion.png?direct&8000 |}}
  
 The result of the assertion is presented in the tab "​Output parameters"​. The result of the assertion is presented in the tab "​Output parameters"​.
Line 480: Line 501:
 In case the answer is correctly parsed, it will be presented in a text box, where you can click on the elements of the answer for which the JSONPath / XPath can be calculated. In case the answer is correctly parsed, it will be presented in a text box, where you can click on the elements of the answer for which the JSONPath / XPath can be calculated.
  
-{{:​Asistente_mapeo_REST_eng_18.png?​nolink&​3000|}}+{{ :​Asistente_mapeo_REST_eng_18.png?​nolink&​1000| }}
  
 The elements on which your JSONPath / Xpath can be obtained, will present a hand when the cursor passes over them.\\ The elements on which your JSONPath / Xpath can be obtained, will present a hand when the cursor passes over them.\\
 By clicking on them, the JSONPath / XPath will be presented on the text box immediately below: By clicking on them, the JSONPath / XPath will be presented on the text box immediately below:
  
-{{:​Asistente_mapeo_REST_eng_19.png?​nolink&​3000|}}+{{ :​Asistente_mapeo_REST_eng_19.png?​nolink&​1000|}}
  
-The calculated JSONPath / XPath value can be copied to the clipboard by clicking on the button {{:Asistente_mapeo_REST_eng_20.png?​nolink&​30|}}+The calculated JSONPath / XPath value can be copied to the clipboard by clicking on the button ​ 
 +{{Asistente_mapeo_REST_eng_20.png?​nolink&​30|}}
webservice_adaptor.1576503323.txt.gz · Last modified: 2019/12/16 13:35 by montse