informix 4gl y soe - rejuveneciendo 4gl con servicios web · informix 4gl y soe - rejuveneciendo...
TRANSCRIPT
®
© 2010 IBM Corporation
Informix 4GL y SOE - Rejuveneciendo 4GL con servicios Web
Gagan Maheshwari, Technical Lead, IBM, [email protected]
Javier Sagrera, Common Client Technologies, IBM, [email protected]
1
© Copyright IBM Corporation [current year]. All rights reserved.U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS AND/OR SOFTWARE.
IBM, the IBM logo, ibm.com, Informix and Informix 4GL are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml
AXIS2C, Apache and Tomcat products or service names may be trademarks or service marks of others.
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release, and timing of any features or functionality described for our products remains at our sole discretion
Disclaimer
2
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
3
� Lenguaje de 4ªGeneración
� Fácil desarrollo y mantenimiento de aplicaciones
� Incluye todo lo necesario para crear aplicaciones complejas
– Administrador de proyectos
– Generador de formularios
– Debugger
� Interfaz basado en modo texto (CUI)
� Usado por miles de clientes en todo el mundo
Informix 4GL
4
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas tipicos
� Futuro de Informix 4GL
� Referencias
5
Arquitectura Orientada a Servicios (SOA)
� Que es SOA
� Ventajas de SOA en I4GL
� Beneficios para los clientes
6
¿Que es SOA ?
Separación de las funciones básicas
Mayor aprovechamiento de recursos
Integración entre recursos humanos, procesos e información
Mejor control de la información
Reutilización
7
Ventajas de SOA en I4GL
� Publicar funciones en Informix 4GL como Servicios Web
� Integración con aplicaciones Web
� Reutilizar código existente desde aplicaciones Web
� Descubrir y consumir servicios Web usando I4GL
� Mayor oportunidades de negocio para sus aplicaciones I4GL
8
Beneficios para los clientes� Reuso del código y la lógica existente
- desde Internet- desde otras compañías o partners
� Nueva mentalidad al programar: “Que” en lugar de “Como”
� No hay dependencia de hardware o lenguajes de programación
� Mejor colaboración entre diferentes departamentos dentro de una misma organización
� Biblioteca de funciones y Servicios
� Ahorro de dinero y tiempo.
9
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
10
Requerimientos y plataformas soportadas� Requerimientos
– Apache Axis2/C Version 1.5.1 (incluido en I4GL)– Apache Axis2/Java Version 1.3.1 (incluido en I4GL)– IBM Informix Dynamic Server Version 10 o posterior– IBM Informix 4GL 7.50.xC3– Java™ Runtime Environment (JRE) 1.5 o posterior– Perl 5.8.8
� Plataformas soportadas (32 y 64-bit)– HP-IA 11.23 or 11.31– AIX 5.3 and 6.1– Red Hat Enterprise Linux 4 or 5 – Solaris 5.9 or 5.10– SUSE® Linux Enterprise Server 10
11
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
12
Publicar un Servicio Web
� I4GL-SOA Arquitectura
� Publish /Subscribe (Publicar/Suscribir)
� W4GL y W4GLC : Publish
� Publicar I4GL funciones como servicios Web– desde la línea de comando (W4GLC)
– desde el interfaz grafico (W4GL)
13
I4GL-SOA Arquitectura
Servicio Web
IBM Informix 4GL
Apache AXIS2C Web Server
Publisher Subscriber
IDS
Pubish Subscribe
14
Publish / Subscribe
•Servicio Web•Función I4GL•Argumentos•Ficheros I4GL
Publisher
Subscriber
Servidor deAplicaciones
LibreríasI4GL
IDS
•Servicio Web•Función Web•Función I4GL•Argumentos•Fichero WSDL
Ficheroobjeto
I4GL
Otros serviciosWeb
Consumidor(Web, Java, .NET)
Consumidor(I4GL)
IDS
15
W4GL y W4GLC: Publish
4GL Codigofuente
FUNCTION cc_details(card_number, expiry_date, cvv_number)
DEFINE credit_card_rec RECORD LIKE credit_customer.*
...
LET query_stmt = "SELECT * FROM credit_customer WHERE card_number = ? AND expiry_date = ? AND cvv_number = ?"
...
IF SQLCA.SQLCODE != 100 THEN
LET query_stmt = "SELECT * FROM card_transaction WHERE customerId = ?"
...
FETCH cur_card_transaction INTO transaction_rec.*
IF SQLCA.SQLCODE = 100 THEN
DISPLAY "No transaction record found."
END IF
...
ELSE
DISPLAY "No customer record found."
END IF
...
RETURN credit_card_rec.name, credit_card_rec.address, credit_card_rec.city, credit_card_rec.state ...
END FUNCTION
16
Web service definition(WSDL)
W4GL y W4GLC: Publish
4GL Codigofuente
w4gl(Interfaz grafico)
IDS
fichero de configuración4cf
w4glc(Perl script)
Publish
17
Linea de comando: W4GLC� Script basado en Perl� No hace uso de la base de datos, solo trabaja con ficheros de texto
W4GLC {-OPTION} <configuration-file>
DESCRIPTIONOPTION
Crea el paquete con el servicio web para poder ser usado en producción
package
Deploy el servicio web in el servidor AXISdeploy
Compila el código auxiliar.compile
Genera el código auxiliar para publicar o suscribirgenerate
Si ya existe un servicio con el mismo nombre lo sobrescribeforce
No borra los ficheros temporales keep
No muestra ninguna salida en la pantallasilent
18
Interfaz Grafico: W4GL� Definir un servicio Web � Generar el fichero de configuración (4cf) � Deploy un servicio Web� Package un servicio Web
19
Definir un servicio Web
20
Definir un servicio Web
21
Definir un servicio Web
22
Generar el fichero de configuración (4cf)
23
Ejemplo de un fichero 4cf usado al Publicar
24
Deploy un servicio Web
� Usa la información definida en el fichero .4cf
� Genera y compila el código auxiliar
� Crea el fichero WSDL (Web Services Definition Language)
� Crea la librería I4GL
� Copia los ficheros al directorio services en el servidor de aplicaciones (AXIS)
25
Deploy un servicio Web
26
Package un servicio Web
� Facilita el proceso de deployment en diferentes servidores
� Reduce trabajo a la hora de recrear el servicio Web
� Crea un fichero comprimido (.tar) con todo lo necesario para el funcionamiento de el servicio Web
27
Package un servicio Web
28
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
29
Consumir un servicio Web� Proceso
� W4GL y W4GLC: Subscribe
� Añadir una defección de un servicio Web
� Fichero de configuración 4cf (Subscriber)
� Generar y compilar el código auxiliar
30
Proceso
� Definir la información sobre el servicio que se quiere suscribir usando la herramienta W4GL
� Compilar usando “Compile” para obtener:
– fichero de configuración (.4cf)
– código .c de el wrapper o función proxy para poder usar el servicio Web
– fichero objeto con el código
� Linkar el objeto con la aplicación I4GL
31
Genera y Compilael codigo auxiliar
w4gl(Interfaz grafico)
Fichero WSDLservicio Web
(WSDL)
W4GL y W4GLC: Subscribe
Codigo fuente enInformix 4GL
IDS
Fichero de configuration(4cf)
w4glc(Script perl )
Subscribe
32
Genera y Compilael codigo auxiliar
w4gl(Interfaz grafico)
Fichero WSDLservicio Web
(WSDL)
W4GL y W4GLC: Subscribe
Codigo fuente enInformix 4GL
IDS
Fichero de configuration(4cf)
w4glc(Script perl )
Subscribe
MAIN
CALL call_web_service_client()
END MAIN
FUNCTION call_web_service_client()
DEFINE name VARCHAR(40),
address VARCHAR(200),
...
transaction_date DATE,
description VARCHAR(250),
value INTEGER
...
OPEN FORM f_credit FROM "svc_client"
DISPLAY FORM f_credit
INPUT card_number, cvv_number, expiry_date FROM s_card.card_number, s_card.cvv_number, s_card.expiry_date
CALL i4gl_cc_details(card_number, expiry_date, cvv_number)
RETURNING name, address, city, state, zipcode, phone, email, card_number, creditLimit, cardType, transaction_date, description, value
DISPLAY name TO s_card.name
DISPLAY address TO s_card.address
...
DISPLAY description TO s_card.description
DISPLAY value TO s_card.value
END FUNCTION
33
Aplicación en 4GL utilizandoun servicio web
Genera y Compilael codigo auxiliar
w4gl(Interfaz grafico)
Fichero WSDLservicio Web
(WSDL)
W4GL y W4GLC: Subscribe
Codigo fuente enInformix 4GL
IDS
Fichero de configuration(4cf)
w4glc(Script perl )
Subscribe
34
Añadir una definición de un servicio Web
35
Añadir una definición de un servicio Web
36
Compilar el código auxiliar
37
Ejemplo de un fichero 4cf para suscribir
38
Usar el servicio Web sin I4GL
� El servicio Web puede ser usado desde cualquier otro lenguaje que soporte Web Services.
39
Usar el servicio Web sin I4GL
� El servicio Web puede ser usado desde cualquier otro lenguaje que soporte Web Services.
40
Usar el servicio Web sin I4GL
� El servicio Web puede ser usado desde cualquier otro lenguaje que soporte Web Services.
41
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas tipicos
� Futuro de Informix 4GL
� Referencias
42
Problemas Típicos� Ficheros logs de el servidor de aplicaciones AXIS2C
– Problemas de conexión
– Problemas con el servidor Web
– Errores durante el proceso de deployment
� Fichero de log de W4GL y W4GLC (/tmp/w4glerr.log)
– Errores relacionados con configuración
– Errores de compilación
43
Problemas Típicos� Ficheros logs de el servidor de aplicaciones AXIS2C
– Problemas de conexión
– Problemas con el servidor Web
– Errores durante el proceso de deployment
� Fichero de log de W4GL y W4GLC (/tmp/w4glerr.log)
– Errores relacionados con configuración
– Errores de compilación
44
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
45
Futuro de Informix 4GL
Disclaimer: The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release, and timing of any features or functionality described for our products remains at our sole discretion.
4GL 7.x4GL 7.x(SOA enablement)(SOA enablement)
� Form enhancements� System curses� Improved color� Box� Multi-line fields in
screen arrays� Variable size forms� Enhanced Sub-table
handling
� Mac OS
� Native Library
� Enhance Language support� New SQL syntax
from IDS
� SOA Enablement� WAS support
� Report enhancements
� PDF support
� I4gl in IDS
I4GL Interim I4GL Interim ReleasesReleases
2012 and beyond 2012 and beyond
� SOA enablement
� Reports via web services� Function signature
detection (I4GL parser)
� Enhanced Error handling
� RECORD type
� WSDL parser
� Enhance Language support� File I/O support
� Client Required Priority Defect Fixes
4GL 7.x4GL 7.x(I4GL (I4GL
Embeddability)Embeddability)� Library support
� I4GL non-interactive part as library
� Dynamic load of shared library by p-code runner
� Certification of non-interactive I4GL-LIB for web languages/tools.
� Mac OS basic port
� Evaluation copy
� P-code, C-code, ISQL & ID
� Client Required Priority Defect Fixes
4GL 7.x4GL 7.x(I4GL (I4GL
Modernization)Modernization)� Form enhancements
� Horizontal Scrolling
� Form and field status
� List support
� Report enhancements
� XML output
� Enhanced Language support
� New I4GL syntax
� Client Required Priority Defect Fixes
Q2 2010 Q4 2010 Q2 2011
46
Contenido
� Informix 4GL
� Arquitectura Orientada a Servicios (SOA)
� Requerimientos y plataformas soportadas
� Servicios Web
– Publish
– Subscribe
� Problemas típicos
� Futuro de Informix 4GL
� Referencias
47
� La documentación de IBM Informix 4GL v 7.50.xC3 esta disponible en:
http://www-01.ibm.com/support/docview.wss?uid=swg27015416
� IBM Informix 4GL v 7.50.xC3, xC2 : Release notes, documentación notes y machinenotes:
http://www-01.ibm.com/support/docview.wss?uid=pub1gi11910302
http://www-01.ibm.com/support/docview.wss?uid=swg27013651
� Artículos sobre SOA en DeveloperWorks:
http://www.ibm.com/developerworks/data/library/techarticle/dm-0910i4glwebservices/index.html
http://www.ibm.com/developerworks/data/library/techarticle/dm-0902mottupalli/
Referencias
48
Forums y Comunidades online para Informix
� IIUG – the worldwide community of Informix usersMembership is FREE – join today!http://www.iiug.org
� Data Management Community – share and interact with peersaround the worldhttp://www.ibm.com/software/data/management/community.html
� Information Champions – recognizes individuals who have made the most outstanding contributions to the Information Management communityhttp://www.ibm.com/software/data/champion
49
����������������� ����