Parameters | Value |
com.xone.db.soa.SOAConnection | Used to run directly to the web service from the frame. |
com.xone.db.json.JSONConnection | Used to connect to the web service through proxy JSON. |
CGSProxy.CProxy | Used to connect with generic proxy that returns XML, to the web services. |
Timeout | Waiting time for a response before giving error. (In seconds) |
Security Level | Security type (Numeric). Depending on the proxy used. |
method | The method to get the data from the Proxy, GET or POST. |
Proxy that will run the client´s database and will return the results in JSON way to the XOne Framework. (Faster than the former method of ONLINE collections that XML did return. ).
The latest version of the proxy can be obtained by downloading it from the web XOneSupport.
Web.Config de JSONBD
Within the Web.Config file of the proxy, we have the appSettings node:
<appSettings>
<add key="debug" value="true"/>
<add key="Connection String" value="Provider=System.Data.SqlClient;Data Source=AQUI LA CADENA DE CONEXION A LA BASE DE DATOS;"/>
<add key="Security Level" value="0"/>
<add key="Database Operations Allowed" value="select,insert,delete,update"/>
</appSettings>
PARAMETERS OF THE APPSETTINGS NODE | VALUES |
debug | true - false
Log is left in the events display. |
Connection String | Connection String to the Database. |
Security Level | 0 - 1 - 2 - 3
0.- Without Security. The call is processed as is.
1.- Security with http header authentication. The user and password are sent to compare in local.
2.- By session maintenance. We need a session token that the server sends when it is authenticated.
3.- By certificate. (Under development). |
Database Operations Allowed | select - insert - delete - update
Operations allowed at the time to work with the Database. |
Example of JSONBD type
<!-- ########################## LLAMADA ONLINE ENTRE FRAMEWORK___PROXY JSON_BASE DE DATOS ############################# -->
<coll name="MapaReservas" fontsize="8" title="MapaReservas" objname="MapaReservas" updateobj="MapaReservas" progid="ASData.CASBasicDataObj"
sql="SELECT t1.ID,t1.CODEDIFICIO,t1.CODPLANTA,t1.CODSALA,t1.DATE_START,t1.CAPACIDAD,t1.MATRIZ
FROM gen_MapaReservas t1" filter="" sort="DATE_START limit 50" connection="mapa" userawsql="true">
<!-- Aqui lo dividimos en 2 líneas para que se vea mejor el ejemplo, DEJAR EN UNA SOLA LINEA. -->
<connection name="mapa" connstring="Provider=Xone Remote Provider;Data Source=http://xone.es/XoneJSONReservaSalas/Default.aspx;
ProgID=com.xone.db.json.JSONConnection;Timeout=60;Security Level=0" />
<group name="General" id="1" />
<prop name="CODEDIFICIO" type="T" visible="0" group="1" />
<prop name="CODPLANTA" type="T" visible="0" group="1" />
<prop name="CODSALA" type="T" visible="0" group="1" />
<prop name="DATE_START" title="F.Inicio" type="D" visible="1" group="1" />
<prop name="CAPACIDAD" title="Capacidad" type="N" visible="1" group="1" />
<prop name="MATRIZ" title="Matriz" type="T" visible="1" group="1" />
</coll>
PARAMETER OF THE MAPPINGS | REMARKS |
sql | Same as ever, as if it were OFFLINE, the difference is that the SQL is executed in a remote DB. |
filter and sort | As always, the WHERE and the ORDER BY of the SQL sentence. |
connection | Value of the name attribute of the connection node defined further on. |
userawsql | In order the framework do not try to parse the SQL and puts it in a sub query way, just leave it as it is in the SQL attribute. |
loadall | Put to “true”. All the ONLINE collections load the data with LOADALL, the data cannot be browsed with STARTBROWSE. |
Proxy that will run the Web Services of the client and will return the results in JSON way to the XOne framework. (Faster than the former method of ONLINE collections that XML did return. ).
The latest version of the Proxy can be obtained by downloading it from the web XOneSupport.
Web.Config of JSONBD
Within the Web.Config file of the proxy, we have the appSettings node:
<appSettings>
<add key="debug" value="true"/>
<add key="Connection String" value="Provider=System.Data.SqlClient;Data Source=AQUI LA CADENA DE CONEXION A LA BASE DE DATOS;"/>
<add key="Security Level" value="0"/>
<add key="Database Operations Allowed" value="select,insert,delete,update"/>
</appSettings>
PARAMETERS OF THE APPSETTINGS NODE | VALUES |
debug | true - false
Log is left in the events display. |
Connection String | Connection string to the Database. |
Security Level | 0 - 1 - 2 - 3
0.- Without Security. The call is processed as is.
1.- Security with http header authentication. The password and user are sent to compare in local.
2.- By session maintenance. A session token is needed that the server sent when it is authenticated.
3.- By certificate. (Under development). |
Database Operations Allowed | select - insert - delete - update
Operations allowed at the time to work with the dabatase. |
Example of JSONBD type
<!-- ########################## LLAMADA ONLINE ENTRE FRAMEWORK___PROXY JSON_BASE DE DATOS ############################# -->
<coll name="MapaReservas" fontsize="8" title="MapaReservas" objname="MapaReservas" updateobj="MapaReservas" progid="ASData.CASBasicDataObj"
sql="SELECT t1.ID,t1.CODEDIFICIO,t1.CODPLANTA,t1.CODSALA,t1.DATE_START,t1.CAPACIDAD,t1.MATRIZ
FROM gen_MapaReservas t1" filter="" sort="DATE_START limit 50" connection="mapa" userawsql="true">
<!-- Aqui lo dividimos en 2 líneas para que se vea mejor el ejemplo, DEJAR EN UNA SOLA LINEA. -->
<connection name="mapa" connstring="Provider=Xone Remote Provider;Data Source=http://xone.es/XoneJSONReservaSalas/Default.aspx;
ProgID=com.xone.db.json.JSONConnection;Timeout=60;Security Level=0" />
<group name="General" id="1" />
<prop name="CODEDIFICIO" type="T" visible="0" group="1" />
<prop name="CODPLANTA" type="T" visible="0" group="1" />
<prop name="CODSALA" type="T" visible="0" group="1" />
<prop name="DATE_START" title="F.Inicio" type="D" visible="1" group="1" />
<prop name="CAPACIDAD" title="Capacidad" type="N" visible="1" group="1" />
<prop name="MATRIZ" title="Matriz" type="T" visible="1" group="1" />
</coll>
PARAMETERS OF THE MAPPINGS | REMARKS |
sql | Same as ever, as if it were OFFLINE, the difference is that the SQL is executed in a remote DB. |
filter and sort | As always, the WHERE and the ORDER BY of the SQL sentence |
connection | Value of the name attribute of the connection node defined below. |
userawsql | In order the framework do not try to parse the SQL and puts it in sub query way, just leave it as it is in the SQL attribute. |
loadall | Put to “true”. All the ONLINE collections load the data with LOADALL, the data CANNOT be browsed with STARTBROWSE. |
Proxy that will run the Web Services of the client and will return the results in JSON way to the XOne Framework. (Faster than the former method of ONLINE collections that XML did return. ).
The latest version of the Proxy can be get by downloading it from the web XOneSupport.
Example of JSONWS type
<!-- ########################### LLAMADA ONLINE ENTRE FRAMEWORK___PROXY JSON_WEBSERVICE ##############################
Coleccion online para llamar al Web Service a partir del Proxy.
En Android: se le puede indicar el endpoint, ya que se puede tener un único proxy llamando a varios WebService.
Lo que hace la llamada es en el SQL se le pone a que opción del web service se llama, que en el ejemplo es CheckLic2 y en el
filter se pasan los parametros que pueda permitir el webservice.
-->
<coll name="CheckLic2" title="CheckLic" objname="CheckLic" updateobj="CheckLic" progid="ASData.CASBasicDataObj"
sql="SELECT * FROM CheckLic" filter="stPIN=355136053971720" sort="" connection="CheckLic2" loadall="true">
<connection name="CheckLic2" connstring="Provider=Xone Remote Provider;Data Source=http://xoneisp.com/XoneJSONWebService/;endpoint=xoneisp.com;ProgID=com.xone.db.json.JSONConnection;Timeout=60;Security Level=0" />
<group name="General" id="1" />
<prop name="Result" type="T" visible="7" group="1" />
</coll>
Web.Config of JSONWS
Within the Web.Config file of the proxy, we have the appSettings and client nodes:
<appSettings>
<add key="debug" value="true"/>
<!-- Direccion del WSDL del Web Service al que nos tenemos que conectar si solamente tiramos contra un web service -->
<add key="EndPoint" value="http://www.cgsoft.net/geoipservice.asmx?WSDL"/>
<add key="Class" value="GeoIPServiceSoapClient"/>
<!-- -->
<!-- Direcciones WSDL de los Web Services a los que queramos conectar en caso de que tiremos contra varios web services,
desde un mismo proxy -->
<add key="EndPoint(xoneisp.com)" value="http://xoneisp.com/Xonelive/xonelivews.asmx?wsdl"/>
<add key="Class(xoneisp.com)" value="ServiceSoapClient"/>
<add key="EndPoint(xone.es)" value="Http://xone.es/services/listadatos.asmx?WSDL"/>
<add key="Class(xone.es)" value="listadatosSoapClient"/>
<!-- -->
<add key="Security Level" value="0"/>
</appSettings>
.....
.....
.....
<client>
<endpoint address="http://www.cgsoft.net/geoipservice.asmx" binding="basicHttpBinding"
bindingConfiguration="httpbinding" contract="GeoIPServiceSoap"
name="GeoIPServiceSoap" />
<endpoint address="http://xoneisp.com/Xonelive/xonelivews.asmx" binding="basicHttpBinding"
bindingConfiguration="httpbinding" contract="ServiceSoap"
name="ServiceSoap" />
<endpoint address="http://xone.es/services/listadodatos.asmx" binding="basicHttpBinding"
bindingConfiguration="httpbinding" contract="listadatosSoap"
name="listadatosSoap" />
</client>
PARAMETERS OF THE APPSETTINGS NODE | VALUES |
debug | true - false
Log is left in the events display. |
EndPoint |
WSDL address of the WEB Service which we have to connect to. i.e.: http://www.cgsoft.net/geoipservice.asmx?WSDL
If we are going to call to different WEB SERVICES from the proxy, we have to put EndPoint(whatever), being the value in brackets the value of the “endpoint=Loquesea;” attribute, specified in the call of the mappings.xml to call to a Web Service or to another one.
Example of call to web service in mappings.xml:
<connection name="CheckLic2"
connstring="Provider=Xone Remote Provider;Data Source=http://xoneisp.com/XoneJSONWebService/;endpoint=xoneisp.com;
ProgID=com.xone.db.json.JSONConnection;Timeout=60;Security Level=0" />
|
Class | Es la clase del WSDL. La misma se obtiene al final del WSDL, en el apartado wsdl:service name=“Service” (Normalmente hay 2 en el WSDL, cogemos el primero de ellos) y se le añade “Client” al final, por ejemplo, para <wsdl:port name=“ServiceSoap”… > el Class sería “ServiceSoapClient” |
Security Level | 0 - 1
0.- Sin seguridad. La llamada se procesa tal cual.
1.- Seguridad con http header authentication. Se envía el usuario y la contraseña para comparar en local. La Seguridad por cabecera debe de tenerlo implementado el web service que sea. |
PARAMETERS OF THE CLIENT NODE | VALUES |
address | The web service address. (WITHOUT the ?wsdl at the end of the address. ) |
contract | The wsdl contract that there is at the end of it, within the section wsdl:service name=“Service” |
name | |