Applications Web
Sans implémenter une méthode doHead proposez une implémentation pour supporter cette méthode. Page 31. 31. Servlet : Exercices Utiliser java.rmi.server.UID() ...
Exercices sur Servlets/JSP
Exercices servlets/JSP. Le langage Java. Exercice 1 (1/3). • Ecrire la page html suivante : • Le menu est composé de Java SkyLine Java World
Exercice dapplication en Java RMI
Sachant que la servlet devra transmettre les informations saisies à un composant EJB écrire la classe correspondant à un EJB Session qui consiste à récupérer
Travaux Pratiques Une belle servlet
29 oct. 2006 Le corrigé des exercices 1 à 6 est disponible ! Exercice 1 ... http://java.sun.com/products/servlet/. JSP http://java.sun.com/products/jsp ...
Servlets et JSP : la JSTL
servlets ou les autres pages JSP (exemple ci-dessous). Vérifiez le code généré par cette balise. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>.
TP 4A - Java Entreprise Edition. Création de servlets (get et session)
Le but de ce TP est que vous vous familiarisez avec la notion de servlet et leur déploiement dans un serveur d'application Tomcat. Exercice 1 (Première
Créez votre application web avec Java EE
31 janv. 2013 représentés en Java EE par des servlets mais cela ne signifie pas ... correction. Ce n'est pas la seule manière de faire. Ne vous inquiétez ...
Formation Esup-Commons V2 - Exercices et Manipulations - 0.0.3
Dans src/main/java de web-jsp-servlet ajouter les méthodes sortTasksByDate () et Ceci sera corrigé dans la prochaine version d'esup-‐commons et notemment d ...
Conception dapplications en Java/JEE
CORRIGÉS DES EXERCICES. 365. BIBLIOGRAPHIE. 401. INDEX. 403. Page 7. Avant-propos (servlet JSP
Conception dapplications en Java/JEE
non autorisée est un délit. Table des matières. VII. 17.3 Programmation. 343. CONCLUSION. 383. CORRIGÉS DES EXERCICES servlet JSP
Exercices sur Servlets/JSP
Indiquer où se trouve la servlet générée associée à cette. JSP (traduction de cette JSP). Page 8. XVII-8. JMF. Exercices servlets/JSP. Le langage Java.
Java-Design-Patterns.pdf
7.4 Java'sbuilt-inObserverPattern . 22.5 DecoratorDesignPatterninJava . ... java.util.logging.Logger#log(). • javax.servlet.Filter#doFilter() ...
Le livre de JAVA premier langage Avec 109 exercices corrigés
JAVA premier langage. Avec 109 exercices corrigés. 12e édition mise à jour avec Java 9. Un best-seller qui a déjà conquis plus de 50 000 étudiants !
XML for DB2 Information Integration nformation Integration
16-10 Creating DADX Web services: XML to Java mapping . . . . . . . . . . . . . 492 10-4 Servlet configuration information that goes into web.xml.
Spring Boot Reference Guide
Registering Servlets Filters
Java développement de servlets et JSP
plateforme Java EE. Découvrez les API JSP/Servlet le framework MVC JSF 2
Applications Web
(voir l'API Servlets). Page 29. 29. Servlet : HttpServletRequest. Page 30. 30. Servlet : Exercices. 1. Quelles possibilités s'offrent à nous si on ne veut pas
DATABASE MANAGEMENT SYSTEMS SOLUTIONS MANUAL
10000 records Exercise 1.1 Why would you choose a database system instead of simply storing data ... Servlets are pieces of Java code that run on the middle.
Wampserver Manual
s'initier à MySQL Aux développeurs Java et PHP Sur www.editions-eyrolles.com/dl/0067379. Téléchargez le code source des exemples et le corrigé des exercices
Wampserver Manual
Web Coding Bible (HTML CSS
Exercices sur Servlets/JSP
Exercices servlets/JSP Le langage Java Utiliser HttpSession (1/2) • Dans un premier temps on récupère la session (objet de la classe HttpSession ) par HttpSession getSession() lancé sur request • Cet appel retourne la session courante associée à la requête Si la session n’existe pas elle sera créée
Exercices JAVA - Cours/Formations informatique à
175 exercices corrigés pour maîtriser Java Conçu pour les étudiants en informatique ce recueil d’exercices corrigés est le complément idéal de Programmer en Java du même auteur ou de tout autre ouvrage d’initiation au langage Java Cette nouvelle édition tient compte des nouveautés de Java 8 publié en mars 2014
Servlets et JSP : la JSTL
Servlets et JSP : la JSTL 1 Utiliser le langage d’expression (EL) Depuis la version 2 0 des JSP il est possible de placer `a n’importe quel endroit d’une page JSP des expressions qui sont ´evalu´ees et remplac´ees par le r´esultat de leur ´evaluation La syntaxe est la suivante : $ { expression } Voila quelques exemples d
Java - Servlets java-servl Java - Servlets
Java - Servlets - 2 Introduction aux Servlets java-servl-5 Internet et Education © TECFA 17/1/01 •Copie de l’archive servlet jar: http://tecfa unige ch/guides/java/classes/servlet jar •Script qui inialise l’environnement sous Unix (+ MySQL + xerces) source /local/env/java12-sql-xml-ser csh
Solutions aux exercices du chapitre 10 : Programmation Java
at java util concurrent ThreadPoolExecutor addWorker(ThreadPoolExecutor java:950) at java util concurrent ThreadPoolExecutor execute(ThreadPoolExecutor java:1368) at java util concurrent AbstractExecutorService submit(AbstractExecutorService java:134) at Sommation sommation_pr(Sommation java:25) at Sommation sommation_pr(Sommation java:26)
Conception d’applications en Java/JEE - Dunod
IV Conception d’applications en Java/JEE 2 19 Enterprise JavaBeans (EJB) 40 2 20 Java Persistency API (JPA) 46 2 21 Services Web 49 2 22 JavaServer Faces (JSF) et interfaces riches 53 2 23 Packaging des applications Web JEE 55 CHAPITRE3•UML 3 1 Introduction 61 3 2 Diagramme de classes 62 3 3 Diagramme d’objets 66 3 4 Diagramme de
La programmation objet en Java - Cours et exercices corrigés
nombreux exercices corrigés font de ce livre un outil de travail indispensable Pour une plus grande interactivité le code des programmes Java de ce livre est disponible sur le web Les principaux concepts expliqués sont les suivants : – la syntaxe de base de Java ; – les notions de la programmation objet : classes encapsulation
Mlle Imene Sghaier - Technologue Pro
On se propose de faire fonctionner un programme Java dont le rôle est d’afficher le premier mot qu’on lui passe comme paramètre d’exécution Exercice 3: Créer un fichier HelloWorldWithMethod java contenant la classe HelloWorldWithMethod 2- Ajouter une méthode void Hello() qui fait l’affichage d’une chaîne de caractères exemple :
Exercices En Java 175 Exercices Corrigés Couvre Java 8 Noire
175 exercices corrigés pour maîtriser JavaConçu pour les étudiants en informatique ce recueil d'exercices corrigés est le complément idéal de Programmer en Java du même auteur ou de tout autre ouvrage d'initiation au langage Java Cette quatrième édition prend en compte les nouveautés de Java 8 avec en particulier un chapitre
Exercices En Java 175 Exercices Corrigés Couvre Java 8 By
Exercices En Java 175 Exercices Corrigés Couvre Java 8 By Claude Delannoy Java Corrig Recevez vos 1600 de bonus de casino online book library thatswhatsup me online book library Telecharger prediction of detonation characteristics of Td corrig Tax gold forward sales while you can cromosomacinco Examens corrigs PDF Tlcharger doc
JAVA TP Banque - University of Paris-Est Marne-la-Vallée
Exercice 2 : Un tableau en java import java util *; public class TableauMontants { public static void main(String args[]){ double[] tab; tab = new double[] {10 687 35 -54 00 0 54 85}; for (int i = 0 ; i < tab length ; i++){ System out println(tab[i]); } Arrays sort(tab); System out println(Arrays toString(tab)); } }
Searches related to exercices corrigés servlets java filetype:pdf
the Java Servlet specification Servlets can be created using the javax servlet and javax servlet http packages which are a standard part of the Java's enterprise edition an expanded version of the Java class library that supports large-scale development projects These classes implement the Java Servlet and JSP specifications
Quels sont les exercices corrigés en langage Java ?
- Voici une liste des exercices corrigés en langage Java, des exercices progressifs et corrigés, abordant toutes les notions de programmation en Java la moitié abordent des notions isolées, afin de vérifier la compréhension de la syntaxe. L'autre moitié correspond à des exercices de synthèse, mettant en jeu des techniques un peu plus complètes.
Quels sont les différents types de méthodes de servlet?
- Ces méthodes sont en fait appelées par la méthode service () de la classe Servlet, que l’on a pas à surcharger. Notons que sur notre exemple, la méthode doPost () appelle la méthode doGet (), ce qui est parfaitement légal. Exemple 17. Une première servlet 2.2.
Qu'est-ce que le principe de fonctionnement d'une servlet?
- Ce principe de fonctionnement évite d'instancier un objet de type servlet à chaque requête et permet de maintenir un ensemble de ressources actives telles qu'une connexion à une base de données. Le serveur crée un objet qui représente la requête http ainsi que l'objet qui contiendra la réponse et les envoie à la servlet
Quelle est la meilleure solution pour l'utilisation d'une servlet?
- La première solution permet un usage plus facile dans toute la servlet. Sans l'appel à la méthode héritée lors d'une redéfinition, la méthode getInitParameter () de la servlet lèvera une exception de type NullPointerException. 72.4.2. L'analyse de la requête
Information Integrationnformation Integration
Bart Steegmans
Ronald Bourret
Owen Cline
Olivier Guyennet
Shrinivas Kulkarni
Stephen Priestley
Valeriy Sylenko
Ueli WahliMarrying XML documents and
databasesScenarios of XML usage
Using IBM WebSphere Studio
Application Developer to
build Web Services and XMLFront cover
XML for DB2 Information Integration
July 2004International Technical Support OrganizationSG24-6994-00
© Copyright International Business Machines Corporation 2004. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.
First Edition (July 2004)
This edition applies to V8.1 FixPak 2 of DB2 UDB for Windows 2000/NT and V5.1 of WebSphereStudio Application Developer.
Note: Before using this information and the product it supports, read the information in "Notices" on page xxvii. © Copyright IBM Corp. 2004. All rights reserved.iiiContents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xix
Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxi
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Part 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1. XML and databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Why use XML with a database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 A common misconception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 How is XML used with databases? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 XML-enabled database: using XML to exchange data . . . . . . . . . . . . . . . 11
1.4.1 XML as a data exchange format. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 Mapping a database schema to an XML schema. . . . . . . . . . . . . . . 12
1.5 Native XML DB: managing documents and semi-structured data. . . . . . . 17
1.5.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5.2 Technical definition of a native XML database . . . . . . . . . . . . . . . . . 18
1.6 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 2. XML services in DB2 and DB2 Information Integrator . . . . . . 232.1 SQL/XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.1 XML data type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.2 SQL/XML functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.1.3 XML2CLOB function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2 DB2 XML Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.1 XML collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2.2 XML columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3 Net Search Extender. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.3.1 Creating indexes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.3.2 Full-text searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
iv XML for DB2 Information Integration2.3.3 Structural queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.4 XML wrapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.1 Registering a wrapper and server. . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.2 Mapping an XML schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.4.3 Identifying an XML document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.4 Querying an XML document through the XML Wrapper. . . . . . . . . . 46
2.4.5 Shredding an XML document using the XML Wrapper. . . . . . . . . . . 47
2.5 WebSphere MQ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.6 WebSphere Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.7 What products should I use?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.7.1 XML-enabled storage or native XML storage? . . . . . . . . . . . . . . . . . 51
2.7.2 Products for XML-enabled storage . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.7.3 Products for native XML storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Chapter 3. Designing XML and database schemas. . . . . . . . . . . . . . . . . . 573.1 Local and global XML schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.2 What schemas do you need to design? . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.2.1 On using industry-standard XML schemas . . . . . . . . . . . . . . . . . . . . 60
3.2.2 You have a database schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.2.3 You have an XML schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.2.4 You have both database and XML schemas . . . . . . . . . . . . . . . . . . 63
3.3 Does my XML schema match my database schema? . . . . . . . . . . . . . . . 64
3.4 Creating an XML schema from a database schema . . . . . . . . . . . . . . . . . 68
3.4.1 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.4.2 Using the generated XML schema with DB2 XML Extender. . . . . . . 70
3.5 Creating a database schema from an XML schema . . . . . . . . . . . . . . . . . 70
3.5.1 Creating a local XML schema from a global XML schema . . . . . . . . 70
3.5.2 Creating a database schema from a local XML schema. . . . . . . . . . 72
3.6 Designing XML schemas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6.1 Who will use the XML schema? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6.2 What XML schema language should you use?. . . . . . . . . . . . . . . . . 75
3.6.3 General guidelines for designing XML schemas. . . . . . . . . . . . . . . . 76
3.6.4 Normalizing your XML schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.6.5 XML schema styles to avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
3.6.6 Unsupported XML schema structures by DB2 products . . . . . . . . . . 88
Part 2. Processing XML documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Chapter 4. Storing whole XML documents. . . . . . . . . . . . . . . . . . . . . . . . . 934.1 Storing outside of DB2 in the file system. . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.1.1 File system storage considerations. . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.1.2 Accessing data stored in the file system. . . . . . . . . . . . . . . . . . . . . . 94
4.2 Storing XML in DB2 without using XML columns . . . . . . . . . . . . . . . . . . . 96
4.2.1 Using DB2 data types without XML Extender functions . . . . . . . . . . 97
Contents v4.2.2 Using XML Extender UDFs to insert XML documents into a normal DB2column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.3 DB2 XML Extender storage methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.4 Storing intact XML documents with XML Extender . . . . . . . . . . . . . . . . . 101
4.4.1 Using the XML Extender data type . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.4.2 When to use an XML column to store data. . . . . . . . . . . . . . . . . . . 102
4.4.3 Building the DAD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.4.4 Creating the table that will contain the XML column . . . . . . . . . . . . 106
4.4.5 Inserting the DTD into the DTD_REF table. . . . . . . . . . . . . . . . . . . 107
4.4.6 Enabling the XML column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.4.7 Creating indexes on the side tables . . . . . . . . . . . . . . . . . . . . . . . . 110
4.4.8 Using XML Extender UDFs to insert XML documents . . . . . . . . . . 110
Chapter 5. Working with XML documents stored in XML columns . . . . 1135.1 Retrieving, extracting, updating, and deleting XML columns . . . . . . . . . 114
5.2 Retrieving XML documents stored in XML columns . . . . . . . . . . . . . . . . 114
5.2.1 Retrieving the entire XML document. . . . . . . . . . . . . . . . . . . . . . . . 114
5.2.2 Retrieving elements and attributes from XML documents . . . . . . . 117
5.2.3 Retrieving fragments from data stored in an XML column . . . . . . . 123
5.2.4 Filtering the XML documents you want to retrieve . . . . . . . . . . . . . 126
5.3 Retrieving XML columns using an XML wrapper . . . . . . . . . . . . . . . . . . 133
5.4 Updating XML documents stored in an XML column . . . . . . . . . . . . . . . 138
5.4.1 Using the SQL UPDATE statement . . . . . . . . . . . . . . . . . . . . . . . . 138
5.4.2 Using the Update() UDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.5 Deleting XML documents stored in an XML column . . . . . . . . . . . . . . . . 140
5.6 Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.6.1 Use side tables as much as possible . . . . . . . . . . . . . . . . . . . . . . . 140
5.6.2 Where to filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.6.3 Using location path expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Chapter 6. Shredding XML into relational tables . . . . . . . . . . . . . . . . . . . 1436.1 Shredding overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.1.1 What is shredding? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.1.2 When should you use shredding?. . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.2 Shredding using DB2 XML Extender. . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.2.1 Shredding - planning and design . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.2.2 Planning and design: hints and tips . . . . . . . . . . . . . . . . . . . . . . . . 153
6.2.3 Shredding: configuration and execution . . . . . . . . . . . . . . . . . . . . . 175
6.3 Alternatives to shredding with DB2 XML Extender . . . . . . . . . . . . . . . . . 178
6.3.1 Using the XML wrapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
6.3.2 Writing your own code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
6.4 Shredding with XML Extender: a step-by-step example . . . . . . . . . . . . . 184
6.4.1 Step 1 - XML enabling of your database. . . . . . . . . . . . . . . . . . . . . 185
vi XML for DB2 Information Integration6.4.2 Step 2 - Creating the DAD file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
6.4.3 Step 3 - Enablement of the XML collection. . . . . . . . . . . . . . . . . . . 189
6.4.4 Step 4 - Decomposing the XML data into relational tables . . . . . . . 189
6.4.5 Step 5 - Checking the result using the SELECT statement . . . . . . 189
Chapter 7. Bulk processing of XML documents. . . . . . . . . . . . . . . . . . . . 1917.1 An XML cutter to process repetitive documents . . . . . . . . . . . . . . . . . . . 192
7.1.1 The SAXCutter sample tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
7.1.2 The CutterTester sample application . . . . . . . . . . . . . . . . . . . . . . . 194
7.1.3 Writing your own application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.2 Using XSLT for bulk inserts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
7.2.1 Flattening XML documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7.2.2 Converting from XML to the DB2 load format . . . . . . . . . . . . . . . . . 200
7.2.3 The XSLT stylesheet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
7.2.4 Cutting the flattened document. . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
7.2.5 Importing or loading the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Chapter 8. Publishing data as XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2098.1 Publishing data using SQL/XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
8.1.1 Constructing elements and attributes . . . . . . . . . . . . . . . . . . . . . . . 210
8.1.2 A more complex example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
8.1.3 Behind the scenes: the XML data type . . . . . . . . . . . . . . . . . . . . . . 219
8.2 Publishing data with XML Extender. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
8.2.1 DAD files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
8.2.2 Publishing XML documents using a DAD file . . . . . . . . . . . . . . . . . 223
8.2.3 DB2 XML Extender publishing stored procedures . . . . . . . . . . . . . 237
8.2.4 Writing your own code to publish data as XML. . . . . . . . . . . . . . . . 245
8.3 Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.3.1 SQL/XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.3.2 XML Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Chapter 9. Additional XML functionality. . . . . . . . . . . . . . . . . . . . . . . . . . 2479.1 Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
9.1.1 XSL, stylesheets and transformation . . . . . . . . . . . . . . . . . . . . . . . 248
9.1.2 Why transform?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
9.1.3 Transforming XML documents with SAX . . . . . . . . . . . . . . . . . . . . 256
9.2 Validation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
9.2.1 Validating XML documents using UDFs . . . . . . . . . . . . . . . . . . . . . 259
9.2.2 Validating the DAD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
9.3 Importing and exporting XML documents using UDF . . . . . . . . . . . . . . . 265
9.3.1 Importing or storing XML documents . . . . . . . . . . . . . . . . . . . . . . . 266
9.3.2 Exporting or retrieving XML documents . . . . . . . . . . . . . . . . . . . . . 266
Chapter 10. Web services in DB2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269Contents vii10.1 Introduction to Web services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
10.1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
10.1.2 Requirements for a service-oriented architecture . . . . . . . . . . . . . 271
10.1.3 Service-oriented architecture overview. . . . . . . . . . . . . . . . . . . . . 271
10.1.4 Characteristics of the Web service architecture . . . . . . . . . . . . . . 273
10.1.5 Web services approach for a SOA architecture . . . . . . . . . . . . . . 273
10.1.6 Properties of the service-oriented architecture . . . . . . . . . . . . . . . 275
10.1.7 More information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
10.2 DB2 as Web service provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
10.2.1 Web Services Object Runtime Framework . . . . . . . . . . . . . . . . . . 278
10.2.2 Installing WORF on IBM WebSphere Application Server . . . . . . . 279
10.2.3 Creating DB2 Web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
10.2.4 Deploying the Web application . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
10.2.5 Starting the enterprise application. . . . . . . . . . . . . . . . . . . . . . . . . 290
10.2.6 Testing the DB2 Web services . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
10.2.7 DADX and auto-deploy feature of WORF . . . . . . . . . . . . . . . . . . . 293
10.2.8 WORF test facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
10.3 DB2 as Web service consumer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
10.3.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
10.3.2 Enabling DB2 Web service consumer UDFs . . . . . . . . . . . . . . . . 295
10.3.3 Using the Web service consumer UDFs . . . . . . . . . . . . . . . . . . . . 295
10.3.4 Web service consumer UDFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
10.3.5 From WSDL to Web service consumer function . . . . . . . . . . . . . . 296
10.3.6 Testing the Web service consumer functions . . . . . . . . . . . . . . . . 300
10.3.7 Creating a wrapper UDF to Web services consumer function . . . 301
Chapter 11. XML wrapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
11.1 Introducing the XML wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
11.2 XML wrapper explained. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
11.2.1 Using the XML wrapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
11.2.2 Registering the XML wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
11.2.3 Creating the server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
11.2.4 Creating nicknames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
11.2.5 Accessing non-root nicknames . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
11.2.6 Creating federated views for non-root nicknames. . . . . . . . . . . . . 314
11.2.7 Options for specifying the XML data source for nicknames . . . . . 315
11.2.8 Altering XML nicknames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
11.3 Working with XML wrapper via DB2 Control Center . . . . . . . . . . . . . . . 320
11.4 Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Part 3. XML tools for database systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Chapter 12. XML and database tools in Application Developer . . . . . . . 33712.1 Application Developer tools overview . . . . . . . . . . . . . . . . . . . . . . . . . . 338
viii XML for DB2 Information Integration12.1.1 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
12.1.2 Authoring and generation tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
12.1.3 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
12.2 XML tools walkthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
12.2.1 Creating a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . 340
12.2.2 Database editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
12.2.3 XML Schema, table DDL, and DDT . . . . . . . . . . . . . . . . . . . . . . . 344
12.2.4 Creating an SQL statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
12.2.5 Creating a user-defined function (UDF) . . . . . . . . . . . . . . . . . . . . 352
12.2.6 Generating XML from an SQL statement . . . . . . . . . . . . . . . . . . . 356
12.2.7 Updating relational tables from XML. . . . . . . . . . . . . . . . . . . . . . . 359
12.2.8 XSL transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
12.2.9 Mapping the relational table to XML . . . . . . . . . . . . . . . . . . . . . . . 365
12.2.10 Mapping the SQL query to XML . . . . . . . . . . . . . . . . . . . . . . . . . 369
12.2.11 Generating a DAD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
12.3 Web services tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
12.3.1 Creating a DADX group configuration. . . . . . . . . . . . . . . . . . . . . . 375
12.3.2 Creating a DADX file from an SQL statement. . . . . . . . . . . . . . . . 378
12.3.3 Creating a Web service from DADX . . . . . . . . . . . . . . . . . . . . . . . 380
Part 4. Worked examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Chapter 13. Worked scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
13.1 Scenario introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
13.2 Scenario 1: Insurance quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
13.3 Scenario 2: Processing the insurance policy. . . . . . . . . . . . . . . . . . . . . 397
13.4 Scenario 3: Generating XML documents . . . . . . . . . . . . . . . . . . . . . . . 398
13.5 Scenario 4: Gathering information for investments . . . . . . . . . . . . . . . . 399
Chapter 14. Scenario implementation using DB2 functionality . . . . . . . 40114.1 Setting up the system for the scenario . . . . . . . . . . . . . . . . . . . . . . . . . 402
14.2 Scenario 1: Web service provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
14.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
14.2.2 The XML wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
14.2.3 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
14.2.4 XML wrapper implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
14.3 Scenario 2: storing insurance policies. . . . . . . . . . . . . . . . . . . . . . . . . . 416
14.3.1 Shredding XML documents into relational tables . . . . . . . . . . . . . 416
14.3.2 Shredding implementation details. . . . . . . . . . . . . . . . . . . . . . . . . 417
14.3.3 Storing XML documents intact in XML columns . . . . . . . . . . . . . . 429
14.3.4 XML column implementation details . . . . . . . . . . . . . . . . . . . . . . . 430
14.4 Scenario 3: composing XML documents. . . . . . . . . . . . . . . . . . . . . . . . 432
14.4.1 Publishing XML from relational . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
14.4.2 Publishing XML from relational data implementation . . . . . . . . . . 433
Contents ix14.4.3 Publishing XML data from XML column information . . . . . . . . . . . 44714.5 Scenario 4: Web service requestor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
14.5.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
14.5.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Chapter 15. Scenario with Application Developer tools . . . . . . . . . . . . . 45315.1 Sample scenario report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
15.1.1 DAD file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
15.1.2 DTD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
15.1.3 DAD file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
15.2 Using Application Developer for the scenario . . . . . . . . . . . . . . . . . . . . 459
15.2.1 Creating project and folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
15.2.2 Connecting to the database and importing a local copy . . . . . . . . 459
15.2.3 Creating the DTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
15.2.4 Creating the RDB to the XML mapping session . . . . . . . . . . . . . . 461
15.2.5 Using the RDB to XML mapping editor . . . . . . . . . . . . . . . . . . . . . 464
15.2.6 Enabling DB2 for the XML Extender . . . . . . . . . . . . . . . . . . . . . . . 471
15.2.7 Using the test harness to execute the DAD files. . . . . . . . . . . . . . 471
Chapter 16. DB2 Web services and XML with Application Developer . . 47516.1 Insurance scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
16.1.1 Business context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
16.1.2 Technical implementation overview . . . . . . . . . . . . . . . . . . . . . . . 476
16.1.3 Preparing for the insurance application. . . . . . . . . . . . . . . . . . . . . 478
16.2 Insurance application as Web service provider. . . . . . . . . . . . . . . . . . . 479
16.2.1 Setting the Web services interoperability compliance level . . . . . 479
16.2.2 Creating the Web project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
16.2.3 Creating the DADX group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
16.2.4 DADX file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
16.2.5 Importing the DADX file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
16.2.6 Creating the SQL query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
16.2.7 Creating the DADX file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
16.2.8 Creating the DADX Web services. . . . . . . . . . . . . . . . . . . . . . . . . 490
16.2.9 Testing the DADX Web services. . . . . . . . . . . . . . . . . . . . . . . . . . 492
16.2.10 Publishing the Insura Web service to the Test Registry . . . . . . . 494
16.2.11 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
16.3 Discovering the Insura Web service . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
16.3.1 Creating the broker Web project . . . . . . . . . . . . . . . . . . . . . . . . . . 499
16.3.2 Discovering the Web service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
16.3.3 Creating a real client using XSL transformation . . . . . . . . . . . . . . 505
16.3.4 Using a data source for DB2 Web services . . . . . . . . . . . . . . . . . 509
16.3.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
16.4 Insurance Web application with DB2 XML access . . . . . . . . . . . . . . . . 512
x XML for DB2 Information Integration16.4.1 Creating the proposedPremium SQL query . . . . . . . . . . . . . . . . . 512
16.4.2 Generating Web pages from SQL queries . . . . . . . . . . . . . . . . . . 513
16.4.3 Testing the Insura Web application. . . . . . . . . . . . . . . . . . . . . . . . 517
16.4.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
16.5 Insurance application as a Web service requestor . . . . . . . . . . . . . . . . 518
16.5.1 Creating a scalar Web service UDF . . . . . . . . . . . . . . . . . . . . . . . 519
16.5.2 Creating a table Web service UDF . . . . . . . . . . . . . . . . . . . . . . . . 525
16.5.3 Creating a Web client that uses the UDFs . . . . . . . . . . . . . . . . . . 527
16.5.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Chapter 17. Deployment of DB2 Web services. . . . . . . . . . . . . . . . . . . . . 53117.1 Preparing the WebSphere Application Server. . . . . . . . . . . . . . . . . . . . 532
17.2 Deployment without Application Developer. . . . . . . . . . . . . . . . . . . . . . 532
17.3 Deployment with Application Developer . . . . . . . . . . . . . . . . . . . . . . . . 532
17.3.1 Exporting the enterprise applications . . . . . . . . . . . . . . . . . . . . . . 532
17.3.2 Configuring the application server. . . . . . . . . . . . . . . . . . . . . . . . . 533
17.3.3 Installing the enterprise applications in the server . . . . . . . . . . . . 538
17.3.4 Starting the enterprise application. . . . . . . . . . . . . . . . . . . . . . . . . 539
17.4 Running the Web services applications . . . . . . . . . . . . . . . . . . . . . . . . 540
17.5 Using a real HTTP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Part 5. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Appendix A. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
DB2 V8.1 with FixPak 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Enabling a database for XML Extender . . . . . . . . . . . . . . . . . . . . . . . . . . 546 Enabling a database with Web service consumer UDFs . . . . . . . . . . . . . 546DB2 Information Integrator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
WebSphere Application Server V5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Installing FixPak 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
WebSphere Studio Application Developer V5.1. . . . . . . . . . . . . . . . . . . . . . . 550 Appendix B. Introduction to XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553quotesdbs_dbs10.pdfusesText_16[PDF] exercices corrigés spectroscopie d'absorption atomique
[PDF] exercices corrigés spectroscopie infrarouge
[PDF] exercices corrigés spectroscopie rmn
[PDF] exercices corrigés spectroscopie uv visible pdf
[PDF] exercices corrigés spss
[PDF] exercices corrigés stabilité des systèmes asservis
[PDF] exercices corrigés statique du solide
[PDF] exercices corrigés structure des molécules 1ere s
[PDF] exercices corrigés structures de données langage c
[PDF] exercices corrigés suites 1ere es
[PDF] exercices corrigés suites 1ere s
[PDF] exercices corrigés suites arithmético géométriques terminale es
[PDF] exercices corrigés suites arithmétiques géométriques pdf
[PDF] exercices corrigés suites numériques bac pro pdf