Merge pull request #5708 from consuldemocracy/configure_census_conection_docs
Update remote census configuration documentation
@@ -1,40 +1,26 @@
|
|||||||
# Configure connection to the Census
|
# Configure connection to the Census
|
||||||
|
|
||||||
The objective of this service is to be able to configure the connection with the Town Hall Census through the Administration panel without having to modify the application code.
|
The objective of this service is to be able to configure the connection with a census through the administration panel without having to modify the application code.
|
||||||
|
|
||||||
It should be noted that to properly configure this connection will require a technical profile that knows the WebService of your City Council.
|
It should be noted that to properly configure this connection, a technical profile that knows the WebService with which we want to connect will be required.
|
||||||
|
|
||||||
Currently the application was designed to send only the **document number** and **document type**. With this new feature is enabled the possibility of sending if necessary the fields **date of birth** and **postal code**.
|
## Enabling the feature
|
||||||
|
|
||||||
## Activate feature
|
To enable the feature you have to access from the administration panel to the **Settings > Global settings > Features** section and enable the **Configure connection to the remote census (SOAP)** module.
|
||||||
|
|
||||||
In the section **Configuration > Global Configuration** a new tab **Remote Census Configuration** has been added.
|
|
||||||
|
|
||||||
If we have the feature deactivated we will see an informative text that will indicate us how to activate it:
|
|
||||||

|
|
||||||
|
|
||||||
To activate the feature you must follow the instructions of the previous image:
|
|
||||||
|
|
||||||
1. Access through the administration panel of your application to the section **Settings > Features** and activate the module **Configure connection to the remote census (SOAP)** as shown below:
|
|
||||||

|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Once the feature is activated, we can access the section **Settings > Global Settings** and click on the tab **Remote Census Configuration**.
|
Once the feature is activated, we can access the section **Settings > Global settings** and click on the tab **Remote Census Configuration** to be able to configure the connection with the census.
|
||||||
In this screen you will be able to fill in all the necessary information to be able to configure the connection with the Census of each Town Hall.
|
|
||||||
|
|
||||||
The information to be filled in is divided into three sections:
|
The information to be filled in is divided into three sections:
|
||||||
|
|
||||||
1. **General Information**
|
### General Information
|
||||||
|
|
||||||
- **Endpoint**: Host name where the census service is available (wsdl).
|
- **Endpoint**: Host name where the census service is available (wsdl).
|
||||||
|
|
||||||

|
### Request data
|
||||||
|
|
||||||
1. **Request Data**
|
In this section we will fill in all the necessary fields to be able to make a request to verify a user through a census.
|
||||||
|
|
||||||
In this section we will fill in all the necessary fields to be able to make a request to verify a user through the Census of the City council.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
To help you understand how to fill in each of the fields, we will rely on a supposed WebService that receives a method called `:get_habita_datos` with the following structure:
|
To help you understand how to fill in each of the fields, we will rely on a supposed WebService that receives a method called `:get_habita_datos` with the following structure:
|
||||||
|
|
||||||
@@ -52,51 +38,59 @@ The information to be filled in is divided into three sections:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Required fields for the request:
|
Required fields for the request:
|
||||||
- **Request method name**: Request method name accepted by the City Census WebService.
|
|
||||||
|
|
||||||
Example:
|
- **Request method name**: Request method name accepted by the census WebService.
|
||||||

|
|
||||||
- **Request Structure**: Structure of the request received by the WebService of the Census of the City Council. The "static" values of this request should be reported. The "dynamic" values related to Document Type, Document Number, Date of Birth and Postal Code should be filled with null value.
|

|
||||||
|
- **Request Structure**: Structure of the request received by the WebService of the census. The _static_ values of this request should be reported. The _dynamic_ values related to Document Type, Document Number, Date of Birth and Postal Code should be filled with _null_ value.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
```ruby
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
codigo_institucion: 12, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
codigo_portal: 5, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
codigo_usuario: 10, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
documento: null, # Since it is a value related to Document Type, Document Number, Date of Birth or Postal Code, we fill it in with a null value
|
||||||
|
tipo_documento: null, # Since it is a value related to Document Type, Document Number, Date of Birth or Postal Code, we fill it in with a null value
|
||||||
|
codigo_idioma: 102, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
nivel: 3 # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Example:
|
|
||||||

|
|
||||||

|
|
||||||
- **Path for document type**: Path in the request structure that sends the Document Type.
|
- **Path for document type**: Path in the request structure that sends the Document Type.
|
||||||
|
|
||||||
*NOTE: DO NOT FILL IN if the WebService does not require the Document Type to verify a user.*
|
*NOTE: DO NOT FILL IN if the WebService does not require the Document Type to verify a user.*
|
||||||
|
|
||||||
Example:
|

|
||||||

|
|
||||||
- **Path for document number**: Path in the request structure that sends the Document Number.
|
- **Path for document number**: Path in the request structure that sends the Document Number.
|
||||||
|
|
||||||
*NOTE: DO NOT FILL IN if the WebService does not require the Document Number to verify a user.*
|
*NOTE: DO NOT FILL IN if the WebService does not require the Document Number to verify a user.*
|
||||||
|
|
||||||
Example:
|

|
||||||

|
|
||||||
- **Path for date of birth**: Path in the request structure that sends the Date of Birth.
|
- **Path for date of birth**: Path in the request structure that sends the Date of Birth.
|
||||||
|
|
||||||
*NOTE: DO NOT FILL IN if the WebService does not require the Date of Birth to verify a user.*
|
*NOTE: DO NOT FILL IN if the WebService does not require the Date of Birth to verify a user.*
|
||||||
|
|
||||||
In the case of *Example* we will fill it in blank, since it is not necessary to send the date of birth to verify a user.
|
In *this example*, we will leave it blank, since it is not necessary to send the date of birth to verify a user.
|
||||||
|
|
||||||
Example:
|

|
||||||

|
|
||||||
- **Path for Postal Code**: Path in the request structure that sends the Postal Code.
|
- **Path for Postal Code**: Path in the request structure that sends the Postal Code.
|
||||||
|
|
||||||
*NOTE: DO NOT FILL IN if the WebService does not require the Postal Code to verify a user.*
|
*NOTE: DO NOT FILL IN if the WebService does not require the Postal Code to verify a user.*
|
||||||
|
|
||||||
En el caso del *Example* lo dejaríamos en blanco, ya que no se necesita enviar el código postal para verificar a un usuario.
|
In *this example*, we will leave it blank, since it is not necessary to send the postal code to verify a user.
|
||||||
|
|
||||||
Example:
|

|
||||||

|
|
||||||
|
|
||||||
1. **Response data**
|
### Response data
|
||||||
|
|
||||||
In this section we will configure all the necessary fields to be able to receive the answer of the WebService and to verify a user in the application.
|
In this section we will configure all the necessary fields to be able to receive the answer of the WebService and to verify a user in the application.
|
||||||
|
|
||||||

|
As in the previous section, we will define an example answer to help you understand how to fill in each of the fields in this section.
|
||||||
|
|
||||||
As in the previous section we will define an example answer, to help you understand how to fill in each of the fields in this section.
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
{
|
{
|
||||||
@@ -123,33 +117,27 @@ The information to be filled in is divided into three sections:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Required fields to parse the response:
|
Required fields to parse the response:
|
||||||
- **Path for Date of Birth**: In what path of the response is the user's Date of Birth?.
|
|
||||||
|
|
||||||
Example:
|
- **Path for Date of Birth**: Path in the response structure containing the user's Date of Birth.
|
||||||

|
|
||||||
- **Path for Postal Code**: In what path of the response is the user's Postal Code?.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for Postal Code**: Path in the response structure containing the user's Postal Code.
|
||||||
- **Path for District**: In what path of the response is the user's District?.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for District**: Path in the response structure containing the user's District.
|
||||||
- **Path for Gender**: In what path of response is the user's Gender?.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for Gender**: Path in the response structure containing the user's Gender.
|
||||||
- **Path for Name**: In what path of the response is the user's Name?.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for Name**: Path in the response structure containing the user's Name.
|
||||||
- **Path for the Last Name**: In what path of the response is the user's Last Name?.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for the Last Name**: Path in the response structure containing the user's Last Name.
|
||||||
- **Condition for detecting a valid response**: What response path has to come informed to be considered a valid response and user verified.
|
|
||||||
|
|
||||||
Example:
|

|
||||||

|
- **Path for detecting a valid response**: Path in the response structure that must be filled in in valid responses.
|
||||||
|
|
||||||
Once the general data, the necessary fields of the request and "all" fields to validate the response have been filled in correctly, the application will be able to verify any user through the defined WebService.
|

|
||||||
|
|
||||||
|
Once the general data, the necessary fields of the request and **all** fields to validate the response have been correctly filled in, the application will be able to verify any user through the defined WebService.
|
||||||
|
|||||||
@@ -1,42 +1,28 @@
|
|||||||
# Configurar conexión con el Censo
|
# Configurar conexión con el Censo
|
||||||
|
|
||||||
Este servicio tiene como objetivo poder configurar la conexión con el Censo de Ayuntamiento a través del panel de Administración sin necesidad de modificar el código de la aplicación.
|
Este servicio tiene como objetivo poder configurar la conexión con un censo a través del panel de administración sin necesidad de modificar el código de la aplicación.
|
||||||
|
|
||||||
Cabe destacar que para configurar correctamente esta conexión se requerirá de un perfil técnico que conozca el WebService de su Ayuntamiento.
|
Cabe destacar que para configurar correctamente esta conexión se requerirá de un perfil técnico que conozca el WebService con el cual queremos conectarnos.
|
||||||
|
|
||||||
Actualmente la aplicación estaba pensada para enviar solo el **numero de documento** y el **tipo de documento**. Con esta nueva funcionalidad se habilita la posibilidad de enviar en caso de ser necesario los campos **fecha de nacimiento** y **código postal**
|
|
||||||
|
|
||||||
## Activar la funcionalidad
|
## Activar la funcionalidad
|
||||||
|
|
||||||
En la sección **Configuración > Configuración Global** se ha añadido una nueva pestaña **Configuración del Censo Remoto**.
|
Para activar la funcionalidad hay que acceder desde el panel de administración a la sección **Configuración > Configuración global > Funcionalidades** y activar el módulo de **Configurar conexión al censo remoto (SOAP)**.
|
||||||
|
|
||||||
Si tenemos la funcionalidad desactivada veremos un texto informativo que nos indicará como activarla:
|
|
||||||

|
|
||||||
|
|
||||||
Para activar la funcionalidad deberá seguir las instrucciones de la imagen anterior:
|
|
||||||
|
|
||||||
1. Acceder a través del panel de administración de su aplicación a la sección **Configuración > Funcionalidades** y activar el módulo de **Configurar conexión al censo remoto (SOAP)** como se puede ver a continuación:
|
|
||||||

|
|
||||||
|
|
||||||
## Configuración
|
## Configuración
|
||||||
|
|
||||||
Una vez activada la funcionalidad, podremos acceder a la sección **Configuración > Configuración Global** y clicar en la pestaña **Configuración del Censo Remoto**.
|
Una vez activada la funcionalidad, podremos acceder a la sección **Configuración > Configuración global** y clicar en la pestaña **Configuración del Censo Remoto** para poder configurar la conexión con el censo.
|
||||||
En esta pantalla se podrá rellenar toda la información necesaria para poder configurar la conexión con el Censo de cada Ayuntamiento.
|
|
||||||
|
|
||||||
La información a rellenar esta dividida en tres apartados:
|
La información a rellenar esta dividida en tres apartados:
|
||||||
|
|
||||||
1. **Información General**
|
### Información General
|
||||||
|
|
||||||
- **Endpoint**: Nombre del host donde se encuentra el servicio del Censo con el que queremos conectarnos (wsdl).
|
- **Endpoint**: Nombre del host donde se encuentra el servicio del Censo con el que queremos conectarnos (wsdl).
|
||||||
|
|
||||||

|
### Datos de la Petición
|
||||||
|
|
||||||
1. **Información para realizar la Petición**
|
En esta sección rellenaremos todos los campos necesarios para poder realizar una petición para verificar un usuario contra un censo.
|
||||||
|
|
||||||
En esta sección rellenaremos todos los campos necesarios para poder realizar una petición para verificar un usuario contra el Censo del Ayuntamiento.
|
Para ayudar a entender cómo rellenar cada uno de los campos, nos basaremos en un supuesto WebService que recibe un método llamado `:get_habita_datos` con la siguiente estructura:
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Para ayudar a entender como rellenar cada uno de los campos, nos basaremos en un supuesto WebService que recibe un método llamado `:get_habita_datos` con la siguiente estructura:
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
{
|
{
|
||||||
@@ -53,51 +39,58 @@ La información a rellenar esta dividida en tres apartados:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Campos necesarios para la petición:
|
Campos necesarios para la petición:
|
||||||
- **Nombre del método de la petición**: Nombre del método que acepta el WebService del Censo del Ayuntamiento.
|
|
||||||
|
|
||||||
Ejemplo:
|
- **Nombre del método de la petición**: Nombre del método que acepta el WebService del censo.
|
||||||

|
|
||||||
- **Estructura de la petición**: Estructura de la petición que recibe el WebService del Censo del Ayuntamiento. Los valores "fijos" de esta petición deberán informarse. Los valores "dinámicos" relacionados con Tipo de Documento, Número de Documento, Fecha de Nacimiento y Código Postal deberán dejarse con valor null.
|

|
||||||
|
- **Estructura de la petición**: Estructura de la petición que recibe el WebService del censo. Los valores _fijos_ de esta petición deberán rellenarse. Los valores _dinámicos_ relacionados con Tipo de Documento, Número de Documento, Fecha de Nacimiento y Código Postal deberán dejarse con valor _null_.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
```ruby
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
codigo_institucion: 12, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
codigo_portal: 5, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
codigo_usuario: 10, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
documento: null, # Since it is a value related to Document Type, Document Number, Date of Birth or Postal Code, we fill it in with a null value
|
||||||
|
tipo_documento: null, # Since it is a value related to Document Type, Document Number, Date of Birth or Postal Code, we fill it in with a null value
|
||||||
|
codigo_idioma: 102, # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
nivel: 3 # Since it is a "fixed" value in all requests, we fill in it.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Ejemplo:
|
|
||||||

|
|
||||||

|
|
||||||
- **Ruta para Tipo de Documento**: Ruta donde se encuentra el campo en la estructura de la petición que envía el Tipo de Documento.
|
- **Ruta para Tipo de Documento**: Ruta donde se encuentra el campo en la estructura de la petición que envía el Tipo de Documento.
|
||||||
|
|
||||||
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Tipo de Documento para verificar un usuario.*
|
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Tipo de Documento para verificar un usuario.*
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para Número de Documento**: Ruta donde se encuentra el campo en la estructura de la petición que envía el Número de Documento.
|
||||||
- **Ruta para Número de Documento**: Ruta donde se encuentra campo en la estructura de la petición que envía el Número de Documento.
|
|
||||||
|
|
||||||
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Número de Documento para verificar un usuario.*
|
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Número de Documento para verificar un usuario.*
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para Fecha de Nacimiento**: Ruta donde se encuentra el campo en la estructura de la petición que envía la Fecha de Nacimiento.
|
||||||
- **Ruta para Fecha de Nacimiento**: Ruta donde se encuentra campo en la estructura de la petición que envía la Fecha de Nacimiento.
|
|
||||||
|
|
||||||
*NOTA: NO RELLENAR en caso de que el WebService no requiera la Fecha de Nacimiento para verificar un usuario.*
|
*NOTA: NO RELLENAR en caso de que el WebService no requiera la Fecha de Nacimiento para verificar un usuario.*
|
||||||
|
|
||||||
En el caso del *Ejemplo* lo dejaríamos en blanco, ya que no se necesita enviar la fecha de nacimiento para verificar a un usuario.
|
En el caso del *Ejemplo* lo dejaríamos en blanco, ya que no se necesita enviar la fecha de nacimiento para verificar a un usuario.
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para Código Postal**: Ruta donde se encuentra el campo en la estructura de la petición que envía el Código Postal.
|
||||||
- **Ruta para Código Postal**: Ruta donde se encuentra campo en la estructura de la petición que envía el Código Postal.
|
|
||||||
|
|
||||||
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Código Postal para verificar un usuario.*
|
*NOTA: NO RELLENAR en caso de que el WebService no requiera el Código Postal para verificar un usuario.*
|
||||||
|
|
||||||
En el caso del *Ejemplo* lo dejaríamos en blanco, ya que no se necesita enviar el código postal para verificar a un usuario.
|
En el caso del *Ejemplo* lo dejaríamos en blanco, ya que no se necesita enviar el código postal para verificar a un usuario.
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
|
||||||
|
|
||||||
1. **Información para parsear la respuesta**
|
### Datos de la respuesta
|
||||||
|
|
||||||
En esta sección configuraremos todos los campos necesarios para poder recibir la respuesta del WebService y verificar a un usuario en la aplicación.
|
En esta sección configuraremos todos los campos necesarios para poder recibir la respuesta del WebService y verificar a un usuario en la aplicación.
|
||||||
|
|
||||||

|
Al igual que en el apartado anterior, definiremos un ejemplo de respuesta para ayudar a entender cómo rellenar cada uno de los campos de esta sección.
|
||||||
|
|
||||||
Al igual que en el apartado anterior definiremos un ejemplo de respuesta, para ayudar a entender como rellenar cada uno de los campos de esta sección.
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
{
|
{
|
||||||
@@ -124,33 +117,27 @@ La información a rellenar esta dividida en tres apartados:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Campos necesarios para parsear la respuesta:
|
Campos necesarios para parsear la respuesta:
|
||||||
- **Ruta para la Fecha de Nacimiento**: En que ruta de la respuesta se encuentra la Fecha de Nacimiento.
|
|
||||||
|
|
||||||
Ejemplo:
|
- **Ruta para la Fecha de Nacimiento**: Ruta de la respuesta donde se encuentra la Fecha de Nacimiento.
|
||||||

|
|
||||||
- **Ruta para el Código Postal**: En que ruta de la respuesta se encuentra el Código Postal.
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para el Código Postal**: Ruta de la respuesta donde se encuentra el Código Postal.
|
||||||
- **Ruta para el Distrito**: En que ruta de la respuesta se encuentra el Distrito.
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para el Distrito**: Ruta de la respuesta donde se encuentra el Distrito.
|
||||||
- **Ruta para el Género**: En que ruta de la respuesta se encuentra el Género.
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para el Género**: Ruta de la respuesta donde se encuentra el Género.
|
||||||
- **Ruta para el Nombre**: En que ruta de la respuesta se encuentra Nombre.
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para el Nombre**: Ruta de la respuesta donde se encuentra el Nombre.
|
||||||
- **Ruta para el Apellido**: En que ruta de la respuesta se encuentra el Apellido
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para el Apellido**: Ruta de la respuesta donde se encuentra el Apellido
|
||||||
- **Condición para detectar una respuesta válida**: Que ruta de la respuesta tiene que venir informado para considerarse una respuesta válida.
|
|
||||||
|
|
||||||
Ejemplo:
|

|
||||||

|
- **Ruta para detectar una respuesta válida**: Ruta de la respuesta que tiene que venir rellenada para considerarse una respuesta válida.
|
||||||
|
|
||||||
Una vez rellenados correctamente los datos generales, los campos necesarios de la petición y "todos" los campos para validar la respuesta, la aplicación podrá verificar cualquier usuario contra el WebService definido.
|

|
||||||
|
|
||||||
|
Una vez rellenados correctamente los datos generales, los campos necesarios de la petición y **todos** los campos para validar la respuesta, la aplicación podrá verificar cualquier usuario contra el WebService definido.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 88 KiB |