DOCUMENTATION TECHNIQUE

Similar documents
Setup Local Mail Server Using Postfix, Dovecot And Squirrelmail On CentOS 6.5/6.4

Linux Administrator (Advance)

The current version installed on your server is el6.x86_64 and it's the latest available.

EZcast Installation guide

Proxy IMAP/POP/SMTP securisé avec Perdition, Postfix et SASL

Web Server: Principles and Configuration Web Programming 8) Web Server

Configure a Mail Server

Installing Apache Software

Installing an open source version of MateCat

Version 1.6. MDweb installation and configuration (scripts databases) Linux Platform. 1.3 Authors: Jean Christophe Desconnets


Lucid Key Server v2 Installation Documentation.

How To Configure Apa Web Server For High Performance

Facebook Twitter YouTube Google Plus Website

Created by : Ashish Shah, J.M. PATEL COLLEGE UNIT-5 CHAP-1 CONFIGURING WEB SERVER

Web Site Content Management Server. Installation Guide Version 4.1 Build 0

Introduction to Linux (Authentication Systems, User Accounts, LDAP and NIS) Süha TUNA Res. Assist.

Web Development using PHP (WD_PHP) Duration 1.5 months

Presented by Henry Ng

CTIS486 Midterm Solution 23/07/ Akgül

Web development... the server side (of the force)

How to Install SMTPSwith Mailer on Centos Server/VPS

Talk Internet User Guides Controlgate Administrative User Guide

MAGENTO Migration Tools

Tonido Cloud Admin Guide

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Document History Revision Date: October 30, 2006

Expresso Quick Install

Chapter 22 How to send and access other web sites

Migration Manual (For Outlook 2010)

ClickCartPro Software Installation README

VMware vcenter Discovered Machines Import Tool User's Guide Version for vcenter Configuration Manager 5.3

Written by: Johan Strand, Reviewed by: Chafic Nassif, Date: Getting an ipath server running on Linux

1. Building Testing Environment

What will be supplied with chemoventory package?

Online Vulnerability Scanner Quick Start Guide

Linux VPS with cpanel. Getting Started Guide

MPP Manager Users Guide

WEB2CS INSTALLATION GUIDE

Centers for Medicare and Medicaid Services. Connect: Enterprise Secure Client (SFTP) Gentran. Internet Option Manual

1. Open the preferences screen by opening the Mail menu and selecting Preferences...

PHP Integration Kit. Version User Guide

CSCI110 Exercise 4: Database - MySQL

Architecture and Data Flow Overview. BlackBerry Enterprise Service Version: Quick Reference

versasrs HelpDesk quality of service

Workflow Templates Library

AXIGEN Mail Server. Quick Installation and Configuration Guide. Product version: 6.1 Document version: 1.0

Messages are printed to the info and debug files. Messages which cause an abort may have additional information in the debug file.

MassTransit 6.0 Enterprise Web Configuration For Windows

Bienvenido master jedi

Installing OptiRain Open on Macintosh OS X 10.6 (Snow Leopard)

Top 10 Web Application Security Vulnerabilities - with focus on PHP

Installation Instructions

1Intro. Apache is an open source HTTP web server for Unix, Apache

Moving to Plesk Automation 11.5

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

Using Webmin and Bind9 to Setup DNS Sever on Linux

qliqdirect Active Directory Guide

Criteria for web application security check. Version

Installation Guide for WebSphere Application Server (WAS) and its Fix Packs on AIX V5.3L

Introduction à OpenSSH

Hardening Joomla 1. HARDENING PHP. 1.1 Installing Suhosin. 1.2 Disable Remote Includes. 1.3 Disable Unneeded Functions & Classes

Overview of Web Services API

CN=Monitor Installation and Configuration v2.0

debops.postfix documentation

PostfixAdmin 3.0. Mailserver administration made easy. Christian Boltz

LICENSE4J LICENSE MANAGER USER GUIDE

FileMaker Server 9. Custom Web Publishing with PHP

Embedded Document Accounting Solution (edas) for Cost Recovery. Administrator's Guide

FTP, IIS, and Firewall Reference and Troubleshooting

Sophos Mobile Control Web service guide

AJ Matrix V5. Installation Manual

Managing rights in PostgreSQL

Version 1.6. MDweb installation and configuration (scripts databases) Windows Platform. 1.3 Authors: Jean Christophe Desconnets

SCOPTEL WITH ACTIVE DIRECTORY USER DOCUMENTATION

Getting Started - The Control Panel

Spam fighting with Postfix

End User Guide The guide for /ftp account owner

RoboMail Mass Mail Software

What is included in the ATRC server support

FileMaker Server 12. Custom Web Publishing with PHP

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

PHP Version von :52

I N S T A L L A T I O N M A N U A L

and Active Directory Adding, Changing and Deleting Accounts, Compiling Addresses for Mail Lists

Administration Guide. . All right reserved. For more information about Specops Password Sync and other Specops products, visit

CipherMail Gateway Installation Guide

Advanced Web Security, Lab

Configuring. Moodle. Chapter 82

Server Installation/Upgrade Guide

Transcription:

DOCUMENTATION TECHNIQUE Fichiers de configuration Codes sources Captures d écran Intitulé du rapport PFE : Urbanisation d un Système d information universitaire SOA & BPM (AU. 2009/2010) Effectué à : Tritux Réaliser par : Walid Karray

Table des matières TABLE DES MATIERES... 2 1. FICHIERS DE CONFIGURATION... 3 1.1. ETC/HOSTS (RESOLUTION D'ADRESSE)... 4 1.2. ETC/POSTFIX/MAIN.CF (CONFIGURATION DE POSTFIX - SMTP SERVER)... 5 1.3. ETC/APACHE2/APACHE2.CONF (CONFIGURATION D APACHE)... 6 1.4. ETC/PHP5/APACHE2/PHP.INI (CONFIGURATION DE PHP)... 8 2. CODES SOURCES... 12 2.1. SCRIPTS SQL... 13 2.1.1. Création (create.sql)... 13 2.1.2. Insertion (insert.sql)... 15 2.2. CODES SOURCES DES CONNECTEURS PODBRIDGE 1.2... 16 2.2.1. Classe du connecteur : APACLManager... 16 2.2.2. Classe du connecteur : BDetu... 18 2.2.3. Classe du connecteur : pbftpaccountconnector... 24 2.2.4. Classe du connecteur : pbippserviceconnector... 34 2.2.5. Classe du connecteur : pbmaila ccountconnector... 37 2.2.6. Classe du connecteur : pbsmsserviceconnector... 49 2.2.7. Classe du connecteur : pbwwwsubscrconnector... 50 2.3. FICHIERS WSDL... 53 2.3.1. WSDL exposé par PodBridge1.2 sur «podbridge.intranet.demo»... 53 2.3.2. WSDL exposé par PodBridge1.2 sur «ws.rnu.edu.demo»... 74 2.3.3. WSDL du service «ProcessRUById»... 85 2.3.4. WSDL du service «BatchProcessRU»... 86 2.4. FICHIER XSD (DEFINITION DES PARAMETRES D E/S DU PROCESSUS BATCHPROCESSRU)... 87 2.5. FICHIERS BPEL... 88 2.5.1. Fichier source : ProcessRUById.bpel... 88 2.5.2. Fichier Source : BatchProcessRU.bpel... 110 2.6. CODE SOURCE DE L APPLICATION PHP (FORMULAIRE INFO ETUDIANT)... 116 3. CAPTURES D ECRAN... 119 3.1. SQUIRRELMAIL (HTTP://WEBMAIL.RNU.EDU.DEMO)... 120 3.2. CUPS WEB ADMINISTRATION (HTTP://CUPS.INTRANET.DEMO:631)... 120 3.3. SITE WEB D INSCRIPTION UNIV. EN LIGNE - (HTTP://INSCRIPTION.EDU.DEMO)... 121 3.4. SOAPUI 3.0.1... 121 3.5. PODBRIDGE 1.2 (INTERFACES D ADMINISTRATION)... 122 3.6. PROJET PROCESSRUBYID (QUELQUES CAPTURES D ECRANS)... 128 3.7. PROJET BATCHPROCESSRU (QUELQUES CAPTURES D ECRANS)... 132 3.8. APPLICATION WEB PHP (FORMULAIRE INFO ETUDIANT)... 133

1. FICHIERS DE CONFIGURATION ISET Djerba TriTux PAGE 3

1.1. /etc/hosts (résolution d'adresse) #Par défaut 127.0.0.1 localhost.localdomain localhost # ~~~~~~~ LAN de l'établissement #Serveur FTP 127.0.0.1 etu-ftp.intranet.demo #Serveur PostgreSQL 127.0.0.1 postgres-83.intranet.demo #Point d'accès sans fil 127.0.0.1 ap21.intranet.demo #Middleware SOA : PodBridge 127.0.0.1 podbridge.intranet.demo #Glassfish ESB 2.1 Server 127.0.0.1 sun-bpel-engine.intranet.demo #Serveur Cups 127.0.0.1 cups.intranet.demo #SMS 127.0.0.1 sms.intranet.demo #Formulaire (App PHP) formulaire.intranet.demo # ~~~~~~~ WAN - RNU (Réseau National Universitaire) #Site web d'inscription en ligne 127.0.0.1 inscription.edu.demo #SMTP & POP3 127.0.0.1 rnu.edu.demo #Webmail (client mail) 127.0.0.1 webmail.rnu.edu.demo ISET Djerba TriTux PAGE 4

#Middleware SOA : PodBridge 127.0.0.1 ws.rnu.edu.demo 1.2. /etc/postfix/main.cf (Configuration de Postfix - SMTP Server) myhostname = rnu.edu.demo mydomain = rnu.edu.demo mydestination = $mydomain $myhostname localhost.$mydomain masquerade_domains = $mydomain # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. myorigin = rnu.edu.demo smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending.domain is the MUA's job. # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # TLS parameters smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/tls_readme.gz in the postfix-doc package for # information on enabling SSL in the smtp client. alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 ISET Djerba TriTux PAGE 5

recipient_delimiter = + default_transport = error relay_transport = error home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/dovecot-auth smtpd_sasl_authenticated_header = yes smtpd_sasl_local_domain = $myhostname broken_sasl_auth_clients = yes smtpd_recipient_restrictions = reject_unknown_sender_domain reject_unknown_recipient_domain reject_unauth_pipelining permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sender_restrictions = reject_unknown_sender_domain mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot-postfix.conf -n -m "${EXTENSION}" smtp_use_tls = yes smtpd_tls_received_header = yes smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_mandatory_ciphers = medium, high smtpd_tls_auth_only = yes tls_random_source = dev:/dev/urandom 1.3. /etc/apache2/apache2.conf (Configuration d Apache) ServerRoot "/etc/apache2" LockFile /var/lock/apache2/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 ISET Djerba TriTux PAGE 6

</IfModule> <IfModule mpm_worker_module> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} AccessFileName.htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> DefaultType text/plain HostnameLookups Off ErrorLog /var/log/apache2/error.log LogLevel warn Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf Include /etc/apache2/httpd.conf Include /etc/apache2/ports.conf LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined ISET Djerba TriTux PAGE 7

Include /etc/apache2/conf.d/ Include /etc/apache2/sites-enabled/ 1.4. /etc/php5/apache2/php.ini (Configuration de PHP) engine = On zend.ze1_compatibility_mode = Off short_open_tag = On asp_tags = Off precision = 12 y2k_compliance = On output_buffering = Off zlib.output_compression = Off implicit_flush = Off unserialize_callback_func= serialize_precision = 100 allow_call_time_pass_reference = On safe_mode = Off safe_mode_gid = Off safe_mode_include_dir = safe_mode_exec_dir = safe_mode_allowed_env_vars = PHP_ safe_mode_protected_env_vars = LD_LIBRARY_PATH disable_functions = disable_classes = expose_php = On max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 128M error_reporting = E_ALL & ~E_NOTICE display_errors = On display_startup_errors = Off log_errors = Off log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off variables_order = "EGPCS" register_globals = Off ISET Djerba TriTux PAGE 8

register_long_arrays = On register_argc_argv = On auto_globals_jit = On post_max_size = 8M magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off auto_prepend_file = auto_append_file = default_mimetype = "text/html" doc_root = user_dir = enable_dl = Off file_uploads = On upload_max_filesize = 2M allow_url_fopen = On allow_url_include = Off default_socket_timeout = 60 define_syslog_variables = Off SMTP = localhost smtp_port = 25 sql.safe_mode = Off odbc.allow_persistent = On odbc.check_persistent = On odbc.max_persistent = -1 odbc.max_links = -1 odbc.defaultlrl = 4096 odbc.defaultbinmode = 1 mysql.allow_persistent = On mysql.max_persistent = -1 mysql.max_links = -1 mysql.default_port = mysql.default_socket = mysql.default_host = mysql.default_user = mysql.default_password = mysql.connect_timeout = 60 mysql.trace_mode = Off mysqli.max_links = -1 mysqli.default_port = 3306 mysqli.default_socket = mysqli.default_host = mysqli.default_user = mysqli.default_pw = ISET Djerba TriTux PAGE 9

mysqli.reconnect = Off msql.allow_persistent = On msql.max_persistent = -1 msql.max_links = -1 pgsql.allow_persistent = On pgsql.auto_reset_persistent = Off pgsql.max_persistent = -1 pgsql.max_links = -1 pgsql.ignore_notice = 0 pgsql.log_notice = 0 sybase.allow_persistent = On sybase.max_persistent = -1 sybase.max_links = -1 sybase.min_error_severity = 10 sybase.min_message_severity = 10 sybase.compatability_mode = Off sybct.allow_persistent = On sybct.max_persistent = -1 sybct.max_links = -1 sybct.min_server_severity = 10 sybct.min_client_severity = 10 bcmath.scale = 0 ifx.default_host = ifx.default_user = ifx.default_password = ifx.allow_persistent = On ifx.max_persistent = -1 ifx.max_links = -1 ifx.textasvarchar = 0 ifx.byteasvarchar = 0 ifx.charasvarchar = 0 ifx.blobinfile = 0 ifx.nullformat = 0 session.save_handler = files session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = session.cookie_httponly = session.serialize_handler = php session.gc_divisor = 100 session.gc_maxlifetime = 1440 ISET Djerba TriTux PAGE 10

session.bug_compat_42 = 1 session.bug_compat_warn = 1 session.referer_check = session.entropy_length = 0 session.entropy_file = session.cache_limiter = nocache session.cache_expire = 180 session.use_trans_sid = 0 session.hash_function = 0 session.hash_bits_per_character = 4 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" mssql.allow_persistent = On mssql.max_persistent = -1 mssql.max_links = -1 mssql.min_error_severity = 10 mssql.min_message_severity = 10 mssql.compatability_mode = Off mssql.secure_connection = Off tidy.clean_output = Off soap.wsdl_cache_enabled=1 soap.wsdl_cache_dir="/tmp" soap.wsdl_cache_ttl=86400 ISET Djerba TriTux PAGE 11

2. CODES SOURCES ISET Djerba TriTux PAGE 12

2.1. Scripts SQL 2.1.1. Création (create.sql) -- -- PostgreSQL database dump -- SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = public, pg_catalog; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT tel_uniq; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT refrecu_uniq; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT loginftp_uniq; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT id_primary; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT email_uniq; ALTER TABLE ONLY public.etudiant DROP CONSTRAINT adrmac_uniq; DROP TABLE public.etudiant; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: etudiant; Type: TABLE; Schema: public; Owner: bdetuadmin; Tablespace: -- CREATE TABLE etudiant ( id character varying(8) NOT NULL, nom character varying(25) NOT NULL, prenom character varying(25) NOT NULL, dep character varying(5) NOT NULL, spec character varying(5) NOT NULL, niveau integer NOT NULL, tel character varying(8) DEFAULT NULL::character varying, email character varying(255) DEFAULT NULL::character varying, ISET Djerba TriTux PAGE 13

); loginftp character varying(255) DEFAULT NULL::character varying, adrmac character(17) DEFAULT NULL::bpchar, refrecu character varying(16) DEFAULT NULL::character varying, process character varying(3) NOT NULL ALTER TABLE public.etudiant OWNER TO bdetuadmin; -- -- Name: adrmac_uniq; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT adrmac_uniq UNIQUE (adrmac); -- -- Name: email_uniq; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT email_uniq UNIQUE (email); -- -- Name: id_primary; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT id_primary PRIMARY KEY (id); -- -- Name: loginftp_uniq; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT loginftp_uniq UNIQUE (loginftp); ISET Djerba TriTux PAGE 14

-- -- Name: refrecu_uniq; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT refrecu_uniq UNIQUE (refrecu); -- -- Name: tel_uniq; Type: CONSTRAINT; Schema: public; Owner: bdetuadmin; Tablespace: -- ALTER TABLE ONLY etudiant ADD CONSTRAINT tel_uniq UNIQUE (tel); -- -- PostgreSQL database dump complete -- 2.1.2. Insertion (insert.sql) -- -- PostgreSQL database dump -- SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = public, pg_catalog; -- -- Data for Name: etudiant; Type: TABLE DATA; Schema: public; Owner: bdetuadmin -- delete from etudiant ; ISET Djerba TriTux PAGE 15

insert into etudiant values ('12345678','Ben Salah','Mohamed','TI','IR',3,'99999999',NULL::character varying,null::character varying,'00:16:44:a0:f9:50',null::character varying,'att'); insert into etudiant values ('11111111','Ayari','Imed', 'TI','TI',1,NULL,NULL::character varying,null::character varying,'b9:aa:28:20:00:f7',null::character varying,'att'); insert into etudiant values ('22222222','El mehdi','youssef','ti','ir',2,null,null::character varying,null::character varying,null::character varying,null::character varying,'att'); insert into etudiant values ('33333333','Tounsi','Eya', 'TI','IG',3,NULL,'eyatounsi@example.com',NULL::character varying, NULL::character varying,null::character varying,'att'); insert into etudiant values ('44444444','Mhamdi','Nozha','GM','GM',1,NULL,NULL::character varying,null::character varying,'12:11:5a:3e:88:72', NULL::character varying,'att'); insert into etudiant values ('55555555','Ben Abdallah','Sonda','GE','GE',1,NULL,NULL::character varying,null::character varying,null::character varying,null::character varying,'att'); insert into etudiant values ('66666666','Ben Yahia','Sami','TI','II',2,NULL,NULL::character varying,null::character varying,'a4:f5:c0:81:23:e1',null::character varying,'att'); 2.2. Codes sources des connecteurs PodBridge 1.2 2.2.1. Classe du connecteur : APACLManager Code source : APACLManager.connector.php 1 <?php 2 class APACLManager extends PodBridgeConnector implements PodBridgeConnectorInterface { 3 4 private $regexvalidator = array ( 5 'macaddr'=>'/^([0-9a-fa-f]{2}:){5}[0-9a-fa-f]{2}$/'); 6 7 /** 8 * Add adress to MAC filter (forwording) // Method not yet implemented 9 * 10 * @service 11 * @cacheable false 12 * 13 * @param string macaddr address ISET Djerba TriTux PAGE 16

14 * 15 * @type (ssid:string,auth_key:string) doforwardmacaddrout 16 * @return doforwardmacaddrout information about the Wireless AP 17 */ 18 public function doforwardmacaddr($macaddr) { 19 20 if (! preg_match($this->regexvalidator['macaddr'],$macaddr)) 21 Throw new Exception('Wrong Mac address format!', 805); 22 23 24 // Method not yet implemented 25 26 $doforwardmacaddrout = array(); 27 $doforwardmacaddrout['ssid']=$this->params['ssid']; 28 $doforwardmacaddrout['auth_key']=$this->params['auth_key']; 29 return $doforwardmacaddrout; 30 } 31 32 /** 33 * Remove adress from MAC filter // Method not yet implemented 34 * 35 * @service 36 * @cacheable false 37 * 38 * @param string macaddr address 39 * 40 * @return boolean true if MAC address was removed from ACL 41 */ 42 public function doromoveforwordedmacaddr($macaddr) { 43 44 if (! preg_match($this->regexvalidator['macaddr'],$macaddr)) 45 Throw new Exception('Wrong Mac address format!', 805); 46 47 // Method not yet implemented 48 49 return true; 50 } 51 52 /* 53 * Make connection to the Server and authenticate 54 * 55 * @return bool true on connection success, false if not 56 */ 57 public function connect() { ISET Djerba TriTux PAGE 17

58 return true; 59 } 60 61 /* 62 * Disconnect from the server by executing a logout command 63 * 64 * @return bool true (allways) 65 */ 66 public function disconnect() { 67 return true; 68 } 69 70 } 71 2.2.2. Classe du connecteur : BDetu Code source : BDetu.connector.php 1 <?php 2 class BDetu extends PodBridgeConnector implements PodBridgeConnectorInterface { 3 4 private $conn=null; 5 6 /** 7 * Returns all information about a student by his id 8 * 9 * @service 10 * @cacheable false 11 * 12 * @param string id student identifier 13 * 14 * @type (id:string,nom:string,prenom:string,dep:string,spec:string,niveau:integer,tel:stri ng,email:string,loginftp:string,adrmac:string,refrecu:string,process:string) getstudentbyidout ); 15 * @return getstudentbyidout information a student 16 */ 17 public function getstudentbyid($id) { 18 19 if (! preg_match("/^[0-9]{8}$/", $id) ) 20 throw new Exception ("Student id should be 8 digit number", 800 ISET Djerba TriTux PAGE 18

21 22 $res = $this->executesql("select * from etudiant where id='".$id."' limit 1",$numrows); 23 24 if (! $numrows) 25 throw new Exception ("This identifier (".$id.") seems inexistant in database!", 820 ); 26 27 $getstudentbyidout['id']=$res['id']; 28 $getstudentbyidout['nom']=$res['nom']; 29 $getstudentbyidout['prenom']=$res['prenom']; 30 $getstudentbyidout['dep']=$res['dep']; 31 $getstudentbyidout['spec']=$res['spec']; 32 $getstudentbyidout['niveau']=$res['niveau']; 33 $getstudentbyidout['tel']=$res['tel']; 34 $getstudentbyidout['email']=$res['email']; 35 $getstudentbyidout['loginftp']=$res['loginftp']; 36 $getstudentbyidout['adrmac']=$res['adrmac']; 37 $getstudentbyidout['refrecu']=$res['refrecu']; 38 $getstudentbyidout['process']=$res['process']; 39 40 return $getstudentbyidout; 41 } 42 43 44 /** 45 * Update information about a Student in the database 46 * 47 * @service 48 * @cacheable false 49 * 50 * @param string id student identifier 51 * @param string* tel personal phone number 52 * @param string* email email address 53 * @param string* loginftp ftp login (user name) 54 * @param string* adrmac mac address 55 * @param string* refrecu receipt identifier 56 * @param string* process process execution out state 57 * 58 * @return boolean true always 59 */ 60 public function updatestudentbyid($id,$tel,$email,$loginftp,$adrmac,$refrecu,$process) { 61 62 //Validate phone number ISET Djerba TriTux PAGE 19

63 if ($tel!=null) { 64 if (! preg_match("/^[0-9]{8}$/", $tel) ) 65 throw new Exception ("Wrong phone number - should be 8 char length", 821 ); ); 66 67 $rows['tel']=$tel; 68 } 69 70 //Validate identifier 71 if (! preg_match("/^[0-9]{8}$/", $id) ) 72 throw new Exception ("Student id should be 8 digit number", 822 73 74 //Validate Mac address 75 if ($email!=null) { 76 if (! preg_match("/^[^0-9][a-z0-9_]+([.][a-z0-9_]+)*[@][a-z0-9_]+([.][a-z0-9_]+)*[.][a-z]{2,4}$/", $email) ) 77 throw new Exception ("Wrong email address!", 823 ); 78 79 $rows['email']=$email; 80 } 81 82 //Validate ftp login 83 if ($loginftp!=null) { 84 if (! preg_match("/^[^0-9][a-z0-9_]+([.][a-z0-9_]+)*$/", $loginftp) ) 85 throw new Exception ("Wrong ftp login!", 824 ); 86 87 $rows['loginftp']=$loginftp; 88 } 89 90 //Validate mac address 91 if ($adrmac!=null) { 92 if (! preg_match("/^[0-9a-fa-f]{2}[:-][0-9a-fa-f]{2}[:-][0-9afa-f]{2}[:-][0-9a-fa-f]{2}[:-][0-9a-fa-f]{2}[:-][0-9a-fa-f]{2}$/", $adrmac) ) 93 throw new Exception ("Wrong mac address!", 825 ); 94 95 $rows['adrmac']=$adrmac; 96 } 97 98 //Validate receipt identifier 99 if ($refrecu!=null) { 100 if (! preg_match("/^[0-9]{16}$/", $refrecu) ) 101 throw new Exception ("Receipt identifier should be a 16 digit number", 826 ); 102 ISET Djerba TriTux PAGE 20

103 $rows['refrecu']=$refrecu; 104 } 105 106 //Validate process state code 107 if ($process!=null) { 108 if (! preg_match("/^[a-z]{2,3}$/", $process) ) 109 throw new Exception ("Process state value should be composed from 2 to 3 capital letters", 827 ); 110 111 $rows['process']=$process; 112 } 113 114 115 $cols_to_update=null; 116 foreach ($rows as $rowname=>$value) { 117 if ($cols_to_update!='') $cols_to_update.=','; 118 $cols_to_update.=$rowname."='".$value."'"; 119 } 120 121 if (!$cols_to_update) 122 throw new Exception ("Null value not permitted!", 828 ); 123 124 //Check if the id exists 125 $this->executesql("select id from etudiant where id ='".$id."'",$numrows); 126 if (! $numrows) 127 throw new Exception ("This identifier (".$id.") seems inexistant in database!", 820 ); 128 129 //Execute update statement 130 if ($this->executesql("update etudiant SET ".$cols_to_update." WHERE id='".$id."'")) 131 return true; 132 } 133 134 135 136 137 138 /** 139 * Returns the next identifier of the given one (if exists) 140 * If $id param is set to null this method will return the first identifier 141 * 142 * @service ISET Djerba TriTux PAGE 21

143 * @cacheable false 144 * 145 * @param string* id identifier 146 * @param string filter filter 147 * 148 * @type (nextid:string,last:boolean) retarray 149 * @return retarray blabla 150 */ 151 public function getnextid($id,$filter) { 152 153 if (!preg_match("/^(att PAI \*)$/", $filter) ) 154 throw new Exception ("Filter value should be ATT or PAI (*)", 851 ); 155 156 if (!preg_match("/^[0-9]{8}$/", $id) && $id!=null ) 157 throw new Exception ("id should be either an 8 digit number OR EMPTY (no value)", 852 ); 158 159 if ($filter!='*') 160 $filter_sql="and process in ('".$filter."') "; 161 162 $res = $this->executesql("select id from etudiant where id > '".$id."' ".$filter_sql." order by id asc limit 2",$numrows); 163 if (!$numrows) 164 throw new Exception ("No result", 853 ); 165 166 $retarray = array(); 167 $retarray['nextid']=$res['id']; 168 //$numrows can be 1 or 2 169 $retarray['last']=($numrows==1); 170 171 return $retarray; 172 173 } 174 175 176 177 178 179 /* 180 * Executes an sql statement in pgsql server 181 * and returns results as array 182 * 183 * @param string sql sql query 184 * ISET Djerba TriTux PAGE 22

185 * @return Array 186 */ 187 private function executesql($sql,&$numrows) { 188 189 $result = pg_query($this->conn, $sql); 190 if (!$result) 191 throw new Exception ("Error in SQL query: ". pg_last_error(), 870 ); 192 $numrows = pg_numrows($result); 193 194 $resultarray = pg_fetch_array($result); 195 pg_free_result($result); 196 return $resultarray; 197 198 } 199 200 201 202 203 /* 204 * Make connection to the Server and authenticate 205 * 206 * @return boolean true on connection success, false if not 207 */ 208 public function connect() { 209 try { 210 $connect="host=".$this->params['host']." port=".$this- >params['port']." dbname=".$this->params['dbname']." user=".$this- >params['username']; 211 212 if (!empty($this->params['password'])) 213 $connect.=" password=".$this->params['password']; 214 215 $this->conn=pg_connect ($connect); 216 217 if (!$this->conn) 218 throw new Exception ( "Cannot connect to database: ". $this->params ['dbname'], 201 ); 219 220 return true; 221 } catch ( Exception $e ) { 222 $this->setlasterror ( $e->getcode (), $e->getmessage() ); 223 return false; 224 } 225 } ISET Djerba TriTux PAGE 23

226 227 /* 228 * Disconnect from the server by executing a logout command 229 * 230 * @return boolean true (allways) 231 */ 232 public function disconnect() { 233 pg_close($this->conn); 234 $this->conn=null; 235 return true; 236 } 237 238 239 } 240 2.2.3. Classe du connecteur : pbftpaccountconnector Code source : FTPAccount.connector.php 1 <?php 2 3 class FTPAccount extends PodBridgeConnector implements PodBridgeConnectorInterface { 4 5 6 private $sshcon = null; 7 private $authenticated = false; 8 private $regexvalidator = array ( 9 'username'=>'/^[^0-9][a-z0-9_]+([.][a-z0-9_]+)*$/'); 10 11 /* 12 * Generate random password from a set of chars ($pool) 13 * 14 * @param integer $len Password length 15 * @return string Rand password 16 */ 17 private function generaterandompasswd ( $len = 10 ) { 18 $string = ''; 19 $pool = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789' ; 20 for($i = 1; $i <= $len; $i ++) { 21 $string.= substr ( $pool, rand ( 0, 61 ), 1 ); ISET Djerba TriTux PAGE 24

22 } 23 24 return $string; 25 } 26 27 /* 28 * Check if the user exists in host 29 * 30 * @param string user User name 31 * @return boolean True if user exist 32 */ 33 private function ifuserexists($user) { 34 $this->ssh2exec ( 'grep "^'.$user.':" /etc/passwd',true,true,$response); 35 if ($response==null) 36 return false; 37 return true; 38 } 39 40 41 /* 42 * Convert dd/mm/yyyy format dates to unix date format 43 * 44 * @param string date 45 * 46 * @throws Exception 770 Date error 47 * 48 * @return string Unix date 49 */ 50 private function getunixdate($date) { 51 52 $datearray=explode('/',$date); 53 $dd=$datearray[0]; 54 $mm=$datearray[1]; 55 $yyyy=$datearray[2]; 56 57 if (! checkdate($mm, $dd, $yyyy) ) 58 Throw new Exception('Date error ('.$date.')', 770); 59 60 //Convert to unix date format mm/dd/yyyy 61 $unixdate=$mm.'/'.$dd.'/'.$yyyy; 62 return $unixdate; 63 } 64 65 /** ISET Djerba TriTux PAGE 25

66 * Create a new FTP account 67 * 68 * @service 69 * @cacheable false 70 * 71 * @param string user The FTP user login 72 * @param string expiry_date Expiry date 73 * @param boolean use_welcome If use welcome message when user connect 74 * 75 * @throws Exception 803 Pattern matching error in user name 76 * @throws Exception 804 User already exists 77 * 78 * @type (UserLogin:string,Password:string,ServerDomain:string,FTPPort:integer) docreateftpuseraccountout 79 * @return docreateftpuseraccountout information about the created ftp account 80 */ 81 public function docreateftpuseraccount($user,$expiry_date,$use_welcome=true) { 82 83 if (! preg_match($this->regexvalidator['username'],$user)) 84 Throw new Exception('Pattern matching error in user name', 803); 85 86 if ( $this->ifuserexists($user) ) 87 Throw new Exception('User ('.$user.') already exists', 804); 88 89 //Convert dd/mm/yyyy expiry date to unix date 90 if ( $expiry_date!= 0 ) 91 $unix_expdate = $this->getunixdate($expiry_date); 92 93 $userhome = $this->params ['ftp_users_path'].'/'.$user; 94 // Generate a random password 95 $password = $this->generaterandompasswd ( $this->params ['autogen_pswd_length'] ); 96 97 $cryptedpassword = crypt ( strip_tags ( $password ) ); 98 99 // Create the user 100 $this->ssh2exec ( 'useradd -d '.$userhome.' -m -g '.$this->params ['ftp_group_name'].' -e '.$unix_expdate.' -s /bin/false -p \''.$cryptedpassword.'\' '.$user); 101 102 if ($use_welcome) { 103 //Set default welcome message ISET Djerba TriTux PAGE 26

104 $this->setftpuserwelcomemsg($user,$this->params ['welcome_message']); 105 } 106 107 $docreateftpuseraccountout = array (); 108 $docreateftpuseraccountout ['UserLogin'] = $user; 109 $docreateftpuseraccountout ['Password'] = $password; 110 $docreateftpuseraccountout ['ServerDomain'] = $this->params ['domain']; 111 $docreateftpuseraccountout ['FTPPort'] = $this->params ['ftp_port']; 112 return $docreateftpuseraccountout; 113 } 114 115 /** 116 * Set Ftp account expiry date 117 * 118 * @service 119 * @cacheable false 120 * 121 * @param string user The FTP user login 122 * @param string expiry_date Expiry date 123 * 124 * @throws Exception 850 User seems inexistant 125 * 126 * @return boolean True when the expiry dates is updated 127 */ 128 public function setftpuseraccountexpirydate($user,$expiry_date) { 129 130 if (! $this->ifuserexists($user) ) 131 Throw new Exception('User ('.$user.') seems inexistant', 850); 132 //Convert dd/mm/yyyy expiry date to unix date 133 if ( $expiry_date!= 0 ) 134 $unix_expdate = $this->getunixdate($expiry_date); 135 136 $this->ssh2exec ( 'usermod -e '.$unix_expdate.' '. $user ); 137 return true; 138 139 } 140 141 142 143 /** 144 * Set or Update user login welcome message 145 * ISET Djerba TriTux PAGE 27

146 * @service 147 * @cacheable false 148 * 149 * @param string user user name 150 * @param string message message to display 151 * 152 * @throws Exception 850 User seems inexistant 153 * @throws Exception 849 Cannot set empty message 154 * 155 * @return boolean True when the message is set 156 */ 157 public function setftpuserwelcomemsg($user,$message) { 158 159 if (! $this->ifuserexists($user) ) 160 Throw new Exception('User ('.$user.') seems inexistant', 850); 161 162 if ($message==null) 163 Throw new Exception('Cannot set an empty message!', 849); 164 165 $userhome = $this->params ['ftp_users_path'].'/'.$user; 166 $this->ssh2exec ( 'echo -e "'.$message.'">'. $userhome. '/welcome.msg'); 167 168 169 return true; 170 171 } 172 173 174 /** 175 * Disable user welcome message while ftp connection 176 * 177 * @service 178 * @cacheable false 179 * 180 * @param string user user name 181 * 182 * @throws Exception 850 User seems inexistant 183 * 184 * @return boolean True when the message is set 185 */ 186 public function dodisableftpuserwelcomemsg($user) { 187 188 if (! $this->ifuserexists($user) ) 189 Throw new Exception('User ('.$user.') seems inexistant', 850); ISET Djerba TriTux PAGE 28

190 191 $userhome = $this->params ['ftp_users_path'].'/'.$user; 192 $this->ssh2exec ( 'rm -f '. $userhome. '/welcome.msg'); 193 194 return true; 195 } 196 197 198 /** 199 * Change an FTP User account password 200 * 201 * @service 202 * @cacheable false 203 * @param string user User name 204 * @param string oldpassword The old user password 205 * @param string newpassword The new user password 206 * 207 * @throws Exception 840 Password verification failed 208 * @throws Exception 841 Your password must be between {RANGE} characters in length 209 * @throws Exception 842 Password should be different from the old one { 210 * 211 * @return boolean True when password changed 212 */ 213 public function dochangeftpuserpassword($user,$password,$new_password) 214 215 if (! $this->docheckpassword($user,$password) ) 216 Throw new Exception("Password verification failed", 840); 217 218 if ( strlen($new_password) < $this->params ['minimum_pswd_length'] strlen($new_password) > $this->params ['maximum_pswd_length']) 219 Throw new Exception("Your password must be between ".$this- >params ['minimum_pswd_length']."-".$this->params ['maximum_pswd_length']." characters in length", 841); 220 221 if ($password == $new_password) 222 Throw new Exception("New password should be different from the old one", 842); 223 224 $cryptednewpassword = crypt ( strip_tags ( $new_password ) ); 225 //Change the user password 226 $this->ssh2exec ( 'usermod -p \''.$cryptednewpassword.'\' '.$user); 227 228 return true; ISET Djerba TriTux PAGE 29

229 } 230 231 232 /* 233 * Check if the user password is correct 234 * 235 * @param string user User name 236 * @param string password User password 237 * 238 * @throws Exception 850 Entered user name seems inexistant 239 * @throws Exception 851 Unexpected error while checking password 240 * 241 * @return boolean True If password check success and False otherwise 242 */ 243 private function docheckpassword($user,$password) { 244 245 //Check if the user exist 246 if (! $this->ifuserexists($user) ) 247 Throw new Exception('User ('.$user.') seems inexistant', 850); 248 249 //Retrieve crypted user password from /etc/shadow 250 $this->ssh2exec ( 'grep ^'.$user.': /etc/shadow cut -d":" - f2',true,true,$refpswd); 251 if ($refpswd==null) 252 Throw new Exception("Unexpected error while checking password", 851); 253 254 $cryptedreferencepassword = trim($refpswd); 255 //Comparing passwords 256 if ( crypt( strip_tags ( $password ),$cryptedreferencepassword )!= $cryptedreferencepassword ) 257 return false; 258 259 return true; 260 } 261 262 263 /** 264 * Delete FTP user account 265 * 266 * @service 267 * @cacheable false 268 * @param string user FTP user name 269 * @throws Exception 850 Entered user name seems inexistant ISET Djerba TriTux PAGE 30

270 * @throws Exception 860 Cannot do such operation on a non ftp user 271 * @return boolean True When user is deleted 272 */ 273 public function dodeleteftpuseraccount($user) { 274 275 //Check if the user exist 276 if (! $this->ifuserexists($user) ) 277 Throw new Exception('User ('.$user.') seems inexistant', 850); 278 279 //Verify if FTP user 280 $this->ssh2exec ( 'groups '.$user,true,true,$groupname); 281 if (trim($groupname)!=$this->params ['ftp_group_name']) 282 Throw new Exception("Cannot do such operation on a non FTP user", 860); 283 284 // Delete the user 285 $this->ssh2exec ( 'userdel -r '.$user); 286 return true; 287 } 288 289 290 291 /** 292 * Transfer files/directories to an FTP account root directory 293 * 294 * @service 295 * @cacheable false 296 * 297 * @param string file Source file or directory inside {files_source_root} 298 * @param string user FTP user name 299 * 300 * @return boolean True copy complete 301 */ 302 public function doftpsendfile($file,$user) { 303 304 $recursive=null; 305 $dest=$this->params ['ftp_users_path'].'/'.$user.'/'.$file; 306 307 $srcfile = $this->params ['files_source_root'].'/'.$file; 308 309 if (! is_file($srcfile) ) { 310 if (! is_dir($srcfile) ) { 311 Throw new Exception("File not found!", 860); ISET Djerba TriTux PAGE 31

312 } else { 313 $recursive='-r'; 314 } 315 } 316 317 $this->ssh2exec ( 'cp '.$recursive.' '.$srcfile.' '.$dest); 318 $this->ssh2exec ( 'chown '.$recursive.' '.$user.':'.$this->params ['ftp_group_name'].' '.$dest); 319 320 return true; 321 } 322 323 324 /* 325 * Executes a $cmd on the SSH connection and return $readable response on-demand 326 * 327 * @param string $cmd Command to execute 328 * @param bool $exception Whether to throw exception on error or return false 329 * @param bool $readresponse Whether to return a readable response or not 330 * @param pointer $response The readable response if requested will be here 331 * @throws Exception 200 If ($exception) AND we got an error while executing the command 332 * @return ressource The ssh2_exec return 333 */ 334 private function ssh2exec($cmd, $exception = true, $readresponse = false, &$response = null) { 335 $this->setsessionlog ( 'sent', $cmd ); 336 $stream = ssh2_exec ( $this->sshcon, $cmd ); 337 338 //get the content of ssh2 stderr 339 $stderr = ssh2_fetch_stream ( $stream, SSH2_STREAM_STDERR ); 340 stream_set_blocking ( $stderr, true ); 341 $response_stderr = stream_get_contents ( $stderr ); 342 fclose ( $stderr ); 343 344 if ($response_stderr) { 345 if ($exception) { 346 $this->setsessionlog ( 'received', $response_stderr ); 347 throw new Exception ( "Error executing cmd: [$cmd]", 200 ); 348 } else { 349 $this->setsessionlog ( 'received', $response_stderr ); 350 return false; ISET Djerba TriTux PAGE 32

351 } 352 } 353 354 if ($readresponse) { 355 stream_set_blocking ( $stream, true ); 356 $response = stream_get_contents ( $stream ); 357 fclose ( $stream ); 358 $this->setsessionlog ( 'received', $response ); 359 } else { 360 $this->setsessionlog ( 'received', '[PB:noerror]' ); 361 } 362 363 return $stream; 364 } 365 366 367 /* 368 * Make connection to the Server and authenticate 369 * 370 * @return bool true on connection success, false if not 371 */ 372 public function connect() { 373 try { 374 $this->sshcon = ssh2_connect ( $this->params ['host'] ); 375 if (! $this->sshcon) 376 throw new Exception ( "SSH Connection failure To the Host", 200 ); 377 378 if (! ssh2_auth_password ( $this->sshcon, $this->params ['login'], $this->params ['password'] )) 379 throw new Exception ( "Authentication failure To the host using username: ". $this->params ['login'], 201 ); 380 381 $this->authenticated = true; 382 return true; 383 } catch ( Exception $e ) { 384 $this->setlasterror ( $e->getcode (), $e->getmessage () ); 385 return false; 386 } 387 } 388 389 /* 390 * Disconnect from the server by executing a logout command 391 * 392 * @return bool true (allways) ISET Djerba TriTux PAGE 33

393 */ 394 public function disconnect() { 395 if ($this->sshcon) { 396 if ($this->authenticated) { 397 ssh2_exec ( $this->sshcon, "logout" ); 398 } else 399 $this->sshcon = null; 400 } 401 402 return true; 403 } 404 405 406 407 408 } 409 2.2.4. Classe du connecteur : pbippserviceconnector Code source : IPPService.connector.php 1 <?php 2 class IPPService extends PodBridgeConnector implements PodBridgeConnectorInterface { 3 4 private $ipp = null; 5 6 /** 7 * Print Web pages 8 * 9 * @service 10 * @cacheable false 11 * 12 * @param string url web page location exemple: http://mydomain/mypage 13 * @param string* jobname new job name 14 * 15 * @return boolean always true 16 */ 17 public function doprintwebpage($url,$jobname=null) { 18 if (! file_get_contents($url,null,null,null,1)) 19 Throw new Exception('Cannot get page contents from ('.$url.')', 700); 20 $tmppsdoc = '/tmp/'.md5(uniqid()); ISET Djerba TriTux PAGE 34

21 //Convert web page to a PS document 22 system ( 'html2ps '.$url.'>'.$tmppsdoc); 23 $this->doprintinternaldocument($tmppsdoc,$jobname); 24 //Cleaning 25 system ( 'rm -f '.$tmppsdoc); 26 return true; 27 } 28 29 /** 30 * 31 * Print documents located in server 32 * 33 * @service 34 * @cacheable false 35 * 36 * @param string filepath path to file 37 * @param string* jobname new job name 38 * 39 * @return boolean always true 40 */ 41 public function doprintinternaldocument($filepath,$jobname=null) { 42 43 if (! file_exists($filepath)) 44 Throw new Exception('File does not exists!', 705); 45 46 if (!$jobname ) 47 $jobname=$filepath; 48 49 $this->ipp->setjobname($jobname); 50 51 $this->ipp->setdata($filepath); // Path to file. 52 $this->ipp->printjob(); 53 return true; 54 } 55 56 /** 57 * Returns all available printers 58 * 59 * @service 60 * @cacheable false 61 * 62 * 63 * @return string Liste all printers uri delimited by ";" 64 */ ISET Djerba TriTux PAGE 35

65 public function getprinters() { 66 67 $this->ipp->getprinters(); 68 $printers=null; 69 foreach( $this->ipp->available_printers as $printer) { 70 if ( $printers ) $printers.=";"; 71 $printers.=$printer; 72 } 73 74 return $printers; 75 } 76 77 // Method not yet implemented 78 public function getalljobs() { 79 80 return true; 81 } 82 83 // Method not yet implemented 84 public function killjobbyid($jobid) { 85 86 return true; 87 } 88 89 // Method not yet implemented 90 public function killalljobs() { 91 92 return true; 93 } 94 95 96 // Method not yet implemented 97 public function getlastjob() { 98 //return $this->ipp->last_job; 99 } 100 101 /* 102 * Make connection to the Server and authenticate 103 * 104 * @return bool true on connection success, false if not 105 */ 106 public function connect() { 107 108 // For documentation refer to ==> http://www.nongnu.org/phpprintipp/tiny_usage ISET Djerba TriTux PAGE 36

109 require_once("printippclasses/cupsprintipp.php"); 110 $this->ipp = new CupsPrintIPP; 111 112 $this->ipp->setusername($this->params['user']); 113 $this->ipp->setauthentication($this->params['user'],$this- >params['password']); // username & password 114 115 $this->ipp->sethost($this->params['ipp_host']); 116 $this->ipp->setport($this->params['ipp_port']); 117 118 $this->ipp->setprinteruri($this->params['printer_uri']); 119 120 return true; 121 } 122 123 /* 124 * Disconnect from the server by executing a logout command 125 * 126 * @return bool true (allways) 127 */ 128 public function disconnect() { 129 unset ($this->ipp); 130 return true; 131 } 132 133 } 134 2.2.5. Classe du connecteur : pbmailaccountconnector Code source : MailAccount.connector.php 1 <?php 2 3 class MailAccount extends PodBridgeConnector implements PodBridgeConnectorInterface { 4 5 private $sshcon = null; 6 private $authenticated = false; 7 private $regexvalidator = array ( 8 'fstname_lstname'=>'/^[a-z]{2,24}$/', 9 'username'=>'/^[^0-9][a-z0-9_]+([.][a-z0-9_]+)*$/', ISET Djerba TriTux PAGE 37

10 'emailaddress'=>'/^[^0-9][a-z0-9_]+([.][a-z0-9_]+)*[@][a-z0-9_]+([.][a-z0-9_]+)*[.][a-z]{2,4}$/'); 11 /* 12 * Generate random password from a set of chars ($pool) 13 * 14 * @param integer $len Password length 15 * @return string Rand password 16 */ 17 private function generaterandompasswd($len = 10) { 18 $string = ''; 19 $pool = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789' ; 20 for($i = 1; $i <= $len; $i ++) { 21 $string.= substr ( $pool, rand ( 0, 61 ), 1 ); 22 } 23 24 return $string; 25 } 26 27 /* 28 * Check if the user exists in host 29 * 30 * @param string user User name 31 * @return boolean True if user exist 32 */ 33 private function ifuserexists($user) { 34 $this->ssh2exec ( 'grep "^'.$user.':" /etc/passwd',true,true,$response); 35 if ($response==null) 36 return false; 37 return true; 38 } 39 40 41 /* 42 * Generate an unique user name by fstname and lstname 43 * 44 * @param string fstname The user first name 45 * @param string lstname The user last name 46 * 47 * @throws Exception 895 Invalid first name 48 * @throws Exception 896 Invalid last name 49 * 50 * @return string user name 51 */ ISET Djerba TriTux PAGE 38

52 private function generateusername($fstname,$lstname) { 53 54 55 $fstname = strtolower(trim($fstname)); 56 $lstname = strtolower(trim($lstname)); 57 $fstname=str_replace(' ', '_', $fstname); 58 $lstname=str_replace(' ', '_', $lstname); 59 60 //Check the first name 61 if (! preg_match($this- >regexvalidator['fstname_lstname'],$fstname)) 62 Throw new Exception('Invalid first name', 895); 63 //Check the last name 64 if (! preg_match($this- >regexvalidator['fstname_lstname'],$lstname)) 65 Throw new Exception('Invalid last name', 896); 66 67 $username=$fstname.'.'.$lstname ; 68 $suffix=null; 69 70 while ($this->ifuserexists($username.$suffix)) { 71 if (! $suffix ) $suffix=0 ; 72 $suffix++; 73 } 74 75 return ($username.$suffix); 76 } 77 78 79 /* 80 * Retrieve user name from an email address 81 * 82 * @param string emailaddr address 83 * 84 * @throws Exception 870 Invalid email address 85 * @throws Exception 890 Cannot do this operation on [domain] 86 * 87 * @return string user name 88 */ 89 private function dostripatdomain($emailaddr) { 90 91 //Check email address to local user name 92 if (! preg_match($this- >regexvalidator['emailaddress'],$emailaddr)) ISET Djerba TriTux PAGE 39

93 Throw new Exception('Invalid address: ('.$emailaddr.')', 870); 94 95 96 //Convert user email address to user name 97 $part=explode('@',trim(strtolower($emailaddr))); 98 $domain=$part[1]; 99 100 //Check the domaine name 101 if ( $domain!= $this->params['domain'] ) 102 Throw new Exception('This email is not registered at '.$this- >params['domain'], 890); 103 104 $user=$part[0]; 105 106 return $user; 107 108 } 109 110 111 112 /** 113 * Create new mail user Version 2 114 * 115 * @service 116 * @cacheable false 117 * 118 * @param string fstname The user first name 119 * @param string lstname The user last name 120 * @param boolean genpswd For auto generated password 121 * @param string password User defined password 122 * 123 * @type (EmailAdress:string,Password:string,WebMa ilurl:string) retmailaccount2 124 * @return retmailaccount2 information about the created mail account 125 */ 126 public function docreatemailuseraccount2($fstname,$lstname,$genpswd,$password) { 127 128 $genusername=$this->generateusername($fstname, $lstname); 129 $retmailaccount2 = $this- >docreatemailuseraccount($genusername,$genpswd,$password); 130 131 return $retmailaccount2; 132 } 133 ISET Djerba TriTux PAGE 40

134 135 136 /** 137 * Create new mail user Version 1 138 * 139 * @service 140 * @cacheable false 141 * @param string user The mail user logins 142 * @param boolean genpswd For auto generated password 143 * @param string password User defined password 144 * 145 * @throws Exception 803 Password verification failed 146 * @throws Exception 804 User already exists 147 * @throws Exception 841 Your password must be between {RANGE} characters in length 148 * 149 * @type (EmailAdress:string,Password:string,POP3Port:integer,SMTPPort:integer,WebMailUrl:s tring) retmailaccount 150 * @return retmailaccount information about the created mail account 151 */ 152 public function docreatemailuseraccount($user,$genpswd,$password) { 153 154 if (! preg_match($this->regexvalidator['username'],$user)) 155 Throw new Exception('Pattern matching error in user name', 803); 156 157 if ( $this->ifuserexists($user) ) 158 Throw new Exception('User ('.$user.') already exists', 804); 159 160 $UserHomeDir = $this->params ['mail_users_path'].'/'.$user; 161 162 // Generate a random password 163 if ($genpswd) { 164 $password = $this->generaterandompasswd ( $this->params ['autogen_pswd_length'] ); 165 } else { 166 if ( strlen($password) < $this->params ['minimum_pswd_length'] strlen($password) > $this->params ['maximum_pswd_length']) 167 Throw new Exception("Your password must be between ".$this- >params ['minimum_pswd_length']."-".$this->params ['maximum_pswd_length']." characters in length", 841); 168 169 } 170 171 $cryptedpassword = crypt ( strip_tags ( $password ) ); ISET Djerba TriTux PAGE 41

172 173 // Create the user 174 $this->ssh2exec ( 'useradd -d '.$UserHomeDir.' -m -g '.$this- >params ['mail_group_name'].' -s /bin/false -p \''.$cryptedpassword.'\' '.$user); ; 175 176 $retmailaccount = array(); 177 $retmailaccount ['EmailAdress'] = $user.'@'.$this->params['domain'] 178 $retmailaccount ['Password'] = $password; 179 $retmailaccount ['POP3Port'] = $this->params ['pop3_port']; 180 $retmailaccount ['SMTPPort'] = $this->params ['smtp_port']; 181 $retmailaccount ['WebMailUrl'] = $this->params ['web_mail_url']; 182 183 return $retmailaccount; 184 185 } 186 187 188 /** 189 * Cahnge a user password 190 * 191 * @service 192 * @cacheable false 193 * @param string emailaddr user email address 194 * @param string oldpassword The old user password 195 * @param string newpassword The new user password 196 * 197 * @throws Exception 840 Password verification failed 198 * @throws Exception 841 Your password must be between {RANGE} characters in length 199 * @throws Exception 842 Password should be different from the old one 200 * 201 * @return boolean True when password changed 202 */ 203 public function dochangemailuserpassword($emailaddr,$password,$new_password) { 204 205 //Convert user email address to user name 206 $user = $this->dostripatdomain($emailaddr); 207 208 if (! $this->docheckpassword($user,$password) ) 209 Throw new Exception("Password verification failed", 840); 210 211 if ( strlen($new_password) < $this->params ['minimum_pswd_length'] strlen($new_password) > $this->params ['maximum_pswd_length']) ISET Djerba TriTux PAGE 42

212 Throw new Exception("Your password must be between ".$this- >params ['minimum_pswd_length']."-".$this->params ['maximum_pswd_length']." characters in length", 841); 213 214 if ($password == $new_password) 215 Throw new Exception("New password should be different from the old one", 842); 216 217 $cryptednewpassword = crypt ( strip_tags ( $new_password ) ); 218 //Change the user password 219 $this->ssh2exec ( 'usermod -p \''.$cryptednewpassword.'\' '.$user); 220 221 return true; 222 } 223 224 /* 225 * Check if the user password is correct 226 * 227 * @param string emailaddr user user login 228 * @param string password user password 229 * 230 * @throws Exception 850 Entered user name seems inexistant 231 * @throws Exception 851 Unexpected error while checking password 232 * 233 * @return boolean True If password check success and False otherwise 234 */ 235 private function docheckpassword($user,$password) { 236 237 238 //Check if the user exist 239 if (! $this->ifuserexists($user) ) 240 Throw new Exception('User ('.$user.') seems inexistant', 850); 241 242 //Retrieve crypted user password from /etc/shadow 243 $this->ssh2exec ( 'grep ^'.$user.': /etc/shadow cut -d":" - f2',true,true,$refpswd); 244 if ($refpswd==null) 245 Throw new Exception("Unexpected error while checking password", 851); 246 247 $cryptedreferencepassword = trim($refpswd); 248 //Comparing passwords 249 if ( crypt( strip_tags ( $password ),$cryptedreferencepassword )!= $cryptedreferencepassword ) 250 return false; ISET Djerba TriTux PAGE 43

251 252 return true; 253 } 254 255 /** 256 * Delete a mail user account 257 * 258 * @service 259 * @cacheable false 260 * @param string emailaddr mail user name or full email adress 261 * @throws Exception 850 Entered user name seems inexistant 262 * @throws Exception 860 Cannot do such operation on a non mail user 263 * @return boolean True When user is deleted 264 */ 265 public function dodeletemailuseraccount($emailaddr) { 266 267 //Convert user email address to user name 268 $user = $this->dostripatdomain($emailaddr); 269 270 //Check if the user exist 271 if (! $this->ifuserexists($user) ) 272 Throw new Exception('User ('.$user.') seems inexistant', 850); 273 274 //Verify if mail user 275 $this->ssh2exec ( 'groups '.$user,true,true,$groupname); 276 if (trim($groupname)!=$this->params ['mail_group_name']) 277 Throw new Exception("Cannot do such operation on a non mail user", 860); 278 279 // Delete the user 280 $this->ssh2exec ( 'userdel -r '.$user); 281 return true; 282 } 283 284 285 /** 286 * Unlock a mail user account 287 * 288 * @service 289 * @cacheable false 290 * @param string emailaddr mail user name or full email adress 291 * @throws Exception 850 Entered user name seems inexistant 292 * @throws Exception 860 Cannot do such operation on a non mail user ISET Djerba TriTux PAGE 44

293 * @return boolean True When user account is unlocked 294 */ 295 public function dounlockmailuseraccount($emailaddr) { 296 297 //Convert user email address to user name 298 $user = $this->dostripatdomain($emailaddr); 299 300 //Check if the user exist 301 if (! $this->ifuserexists($user) ) 302 Throw new Exception('User ('.$user.') seems inexistant', 850); 303 304 //Verify if mail user 305 $this->ssh2exec ( 'groups '.$user,true,true,$groupname); 306 if (trim($groupname)!=$this->params ['mail_group_name']) 307 Throw new Exception("Cannot do such operation on a non mail user", 860); 308 309 // Activate the user account 310 $this->ssh2exec ( 'passwd -u '.$user); 311 return true; 312 } 313 314 /** 315 * Lock a mail user account 316 * 317 * @service 318 * @cacheable false 319 * @param string emailaddr mail user name or full email adress 320 * @throws Exception 850 Entered user name seems inexistant 321 * @throws Exception 860 Cannot do such operation on a non mail user 322 * @return boolean True When user account is locked 323 */ 324 public function dolockmailuseraccount($emailaddr) { 325 326 //Convert user email address to user name 327 $user = $this->dostripatdomain($emailaddr); 328 329 //Check if the user exist 330 if (! $this->ifuserexists($user) ) 331 Throw new Exception('User ('.$user.') seems inexistant', 850); 332 333 //Verify if mail user ISET Djerba TriTux PAGE 45

334 $this->ssh2exec ( 'groups '.$user,true,true,$groupname); 335 if (trim($groupname)!=$this->params ['mail_group_name']) 336 Throw new Exception("Cannot do such operation on a non mail user", 860); 337 338 // Disable the user account 339 $this->ssh2exec ( 'passwd -l '.$user); 340 return true; 341 } 342 343 344 /** 345 * Send email (internal) 346 * 347 * @service 348 * @cacheable false 349 * @param string from Sender email address or user name 350 * @param string to Receiver email address 351 * @param string message Message body 352 * @param string subject The subject of the message 353 * 354 * @throws Exception 850 Entered user name seems inexistant 355 * @throws Exception 870 Invalid receiver email address 356 * @throws Exception 871 Cannot send empty message 357 * 358 * 359 * @return boolean True when message sent 360 */ 361 public function dosendmail($from,$to,$message,$subject=null) { 362 363 //Convert sender email address to user name 364 $user_sender = $this->dostripatdomain($from); 365 366 367 //Check if the sender user exist 368 if (! $this->ifuserexists($user_sender) ) 369 Throw new Exception('User ('.$user_sender.') seems inexistant', 850); 370 371 if (! preg_match($this->regexvalidator['emailaddress'],$to)) 372 Throw new Exception('Invalid address: ('.$to.')', 870); 373 374 if ( $message==null ) 375 Throw new Exception('Cannot send empty message', 871); 376 ISET Djerba TriTux PAGE 46

377 //Send a message 378 $this->ssh2exec ( 'echo -e "'.$message.'" sudo -u '.$user_sender.' mail -s "'.$subject.'" '.$to); 379 return true; 380 } 381 382 383 384 /* 385 * Executes a $cmd on the SSH connection and return $readable response on-demand 386 * 387 * @param string $cmd Command to execute 388 * @param bool $exception Whether to throw exception on error or return false 389 * @param bool $readresponse Whether to return a readable response or not 390 * @param pointer $response The readable response if requested will be here 391 * @throws Exception 200 If ($exception) AND we got an error while executing the command 392 * @return ressource The ssh2_exec return 393 */ 394 private function ssh2exec($cmd, $exception = true, $readresponse = false, &$response = null) { 395 $this->setsessionlog ( 'sent', $cmd ); 396 $stream = ssh2_exec ( $this->sshcon, $cmd ); 397 398 //get the content of ssh2 stderr 399 $stderr = ssh2_fetch_stream ( $stream, SSH2_STREAM_STDERR ); 400 stream_set_blocking ( $stderr, true ); 401 $response_stderr = stream_get_contents ( $stderr ); 402 fclose ( $stderr ); 403 404 if ($response_stderr) { 405 if ($exception) { 406 $this->setsessionlog ( 'received', $response_stderr ); 407 throw new Exception ( "Error executing cmd: [$cmd]", 200 ); 408 } else { 409 $this->setsessionlog ( 'received', $response_stderr ); 410 return false; 411 } 412 } 413 414 if ($readresponse) { 415 stream_set_blocking ( $stream, true ); ISET Djerba TriTux PAGE 47

416 $response = stream_get_contents ( $stream ); 417 fclose ( $stream ); 418 $this->setsessionlog ( 'received', $response ); 419 } else { 420 $this->setsessionlog ( 'received', '[PB:noerror]' ); 421 } 422 423 return $stream; 424 } 425 426 427 /* 428 * Make connection to the Server and authenticate 429 * 430 * @return bool true on connection success, false if not 431 */ 432 public function connect() { 433 try { 434 $this->sshcon = ssh2_connect ( $this->params ['host'] ); 435 if (! $this->sshcon) 436 throw new Exception ( "SSH Connection failure To the Host", 200 ); 437 438 if (! ssh2_auth_password ( $this->sshcon, $this->params ['login'], $this->params ['password'] )) 439 throw new Exception ( "Authentication failure To the host using username: ". $this->params ['login'], 201 ); 440 441 $this->authenticated = true; 442 return true; 443 } catch ( Exception $e ) { 444 $this->setlasterror ( $e->getcode (), $e->getmessage () ); 445 return false; 446 } 447 } 448 449 /* 450 * Disconnect from the server by executing a logout command 451 * 452 * @return bool true (allways) 453 */ 454 public function disconnect() { 455 if ($this->sshcon) { 456 if ($this->authenticated) { 457 ssh2_exec ( $this->sshcon, "logout" ); ISET Djerba TriTux PAGE 48

458 } else 459 $this->sshcon = null; 460 } 461 462 return true; 463 } 464 465 466 467 468 } 469 470 2.2.6. Classe du connecteur : pbsmsserviceconnector Code source : SMSService.connector.php 1 <?php 2 3 class SMSService extends PodBridgeConnector implements PodBridgeConnectorInterface { 4 5 //cannot be delivered 6 7 private $regexvalidator = array ( 8 'sn_regex'=>'/^(00 \+ [0-9])[0-9]{7}$/'); 9 10 /** 11 * dosendsms 12 * 13 * @service 14 * @cacheable false 15 * 16 * @param string destinataire Destination Phone number 17 * @param string message Message Text 18 * 19 * @return boolean true if message successfully sent 20 */ 21 public function dosendsms($destinataire,$message) { 22 23 //cannot be delivered 24 ISET Djerba TriTux PAGE 49

25 return true; 26 } 27 28 29 private function stripspaces($phonenumber) { 30 $fixed=str_replace(' ', '',$phonenumber); 31 if (! preg_match($this->regexvalidator['sn_regex'],$fixed)) 32 Throw new Exception('Phone number format error', 808); 33 34 return $fixed; 35 } 36 37 /* 38 * Make connection to the Server and authenticate 39 * 40 * @return bool true on connection success, false if not 41 */ 42 public function connect() { 43 //cannot be delivered 44 return true; 45 46 } 47 48 /* 49 * Disconnect from the server by executing a logout command 50 * 51 * @return bool true (allways) 52 */ 53 public function disconnect() { 54 //cannot be delivered 55 return true; 56 } 57 58 59 60 61 } 62 63 2.2.7. Classe du connecteur : pbwwwsubscrconnector Code source : wwwsubscr.connector.php ISET Djerba TriTux PAGE 50

1 <?php 2 3 class wwwsubscr extends PodBridgeConnector implements PodBridgeConnectorInterface { 4 5 private $curl_handle = null; 6 7 /** 8 * Returns the receipt identifier and URL for the web site 9 * 10 * @service 11 * @cacheable false 12 * 13 * @param string studentident Identifiant de l'étudiant 14 * @param string au AU format exp: 2009/2010 15 * 16 * @type (refaccuse:string,urlaccuse:string) getaccuseout 17 * @return getaccuseout Return refaccuse & urlaccuse 18 */ 19 public function getaccuse($studentident,$au) { 20 21 $ref=$this->getaccuseref($studentident,$au); 22 $url='http://inscription.edu.demo/recu.php?ref='.$ref; 23 24 $getaccuseout = array (); 25 $getaccuseout['refaccuse']=$ref; 26 $getaccuseout['urlaccuse']=$url; 27 28 return $getaccuseout; 29 30 } 31 32 33 /* 34 * @param string studentident Student identifier 35 * @param string au AU format exp: 2009/2010 36 * 37 * @return string Référence du reçu 38 */ 39 private function getaccuseref($studentident,$au) { 40 41 if (! preg_match('/^[0-9]{8}$/',$studentident) ) 42 Throw new Exception('L\'identifiant de l\'étudiant doit être compsé de 8 chiffres', 805); 43 ISET Djerba TriTux PAGE 51

44 if (! preg_match('/^20[0-9][0-9]\/20[0-9][0-9]$/',$au) ) 45 Throw new Exception('L\'année universitaire doit être en ce format AAAA/AAAA', 806); 46 47 curl_setopt($this->curl_handle,curlopt_post,1); 48 curl_setopt($this- >curl_handle,curlopt_postfields,'ident='.$studentident); 49 $buffer = curl_exec($this->curl_handle); 50 51 preg_match('/nom:/', (string)$buffer,$matches0); 52 preg_match('/20[0-9][0-9]\/20[0-9][0-9]/', (string)$buffer,$matches1 ); 53 preg_match('/[0-9]{16}/', (string)$buffer,$matches2); 54 55 if (! $matches0[0]) 56 Throw new Exception('Identifiant de l\'étudiant est non reconnu', 807); 57 58 if ( $matches1[0]!=$au) 59 Throw new Exception('Payement non effectué!', 809); 60 61 $ref=$matches2[0]; 62 63 return $ref; 64 } 65 66 67 /* 68 * Make connection to the Server and authenticate 69 * 70 * @return bool true on connection success, false if not 71 */ 72 public function connect() { 73 74 try { 75 76 $this->curl_handle = curl_init(); 77 curl_setopt( $this- >curl_handle,curlopt_url,"inscription.edu.demo"); 78 curl_setopt($this->curl_handle,curlopt_connecttimeout,2); 79 curl_setopt($this->curl_handle,curlopt_returntransfer,1); 80 81 return true; 82 83 } catch ( Exception $e ) { ISET Djerba TriTux PAGE 52

84 $this->setlasterror ( $e->getcode (), $e->getmessage () ); 85 return false; 86 } 87 88 } 89 90 /* 91 * Disconnect from the server by executing a logout command 92 * 93 * @return bool true (allways) 94 */ 95 public function disconnect() { 96 97 curl_close($this->curl_handle); 98 99 return true; 100 } 101 102 } 103 104 2.3. Fichiers WSDL 2.3.1. WSDL exposé par PodBridge1.2 sur «podbridge.intranet.demo» Source : http://podbridge.intranet.demo/projects/unstable/podbridge/web/frontend_dev.php/wsdl/ all <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="podbridge" targetnamespace="urn:pbns" xmlns:pbns="urn:pbns" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ippservicens="urn:ippservicens" xmlns:ftpacntns="urn:ftpacntns" xmlns:bdetuns="urn:bdetuns" xmlns:smsservicens="urn:smsservicens" xmlns:apaclmanns="urn:apaclmanns" xmlns:wwwsubscrns="urn:wwwsubscrns"> <types> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:pbns" elementformdefault="qualified" attributeformdefault="qualified"> ISET Djerba TriTux PAGE 53

<xsd:complextype name="tstatus"> <xsd:sequence> <xsd:element name="msg" type="xsd:string"/> <xsd:element name="code" type="xsd:integer"/> </xsd:sequence> </xsd:complextype> <element name="ping"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="pingresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:ippservicens" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <element name="doprintwebpage"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" ISET Djerba TriTux PAGE 54

<xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="url" type="xsd:string"/> <xsd:element name="jobname" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> </xsd:sequence> </xsd:complextype> </element> <element name="doprintwebpageresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="doprintinternaldocument"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="filepath" type="xsd:string"/> <xsd:element name="jobname" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> </xsd:sequence> </xsd:complextype> </element> <element name="doprintinternaldocumentresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" ISET Djerba TriTux PAGE 55

</xsd:sequence> </xsd:complextype> </element> <element name="getprinters"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="getprintersresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:string" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:ftpacntns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <xsd:complextype name="docreateftpuseraccountout"> <xsd:sequence> <xsd:element name="userlogin" type="xsd:string"/> <xsd:element name="password" type="xsd:string"/> <xsd:element name="serverdomain" type="xsd:string"/> <xsd:element name="ftpport" type="xsd:integer"/> </xsd:sequence> </xsd:complextype> <element name="docreateftpuseraccount"> <xsd:complextype> <xsd:sequence> ISET Djerba TriTux PAGE 56

<xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> <xsd:element name="expiry_date" type="xsd:string"/> <xsd:element name="use_welcome" type="xsd:boolean"/> </xsd:sequence> </xsd:complextype> </element> <element name="docreateftpuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="ftpacntns:docreateftpuseraccountout" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="setftpuseraccountexpirydate"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> <xsd:element name="expiry_date" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="setftpuseraccountexpirydateresponse"> <xsd:complextype> ISET Djerba TriTux PAGE 57

<xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="setftpuserwelcomemsg"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> <xsd:element name="message" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="setftpuserwelcomemsgresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dodisableftpuserwelcomemsg"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" ISET Djerba TriTux PAGE 58

<xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dodisableftpuserwelcomemsgresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dochangeftpuserpassword"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> <xsd:element name="oldpassword" type="xsd:string"/> <xsd:element name="newpassword" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dochangeftpuserpasswordresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> ISET Djerba TriTux PAGE 59

<xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dodeleteftpuseraccount"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dodeleteftpuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="doftpsendfile"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" ISET Djerba TriTux PAGE 60

<xsd:element name="file" type="xsd:string"/> <xsd:element name="user" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="doftpsendfileresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:bdetuns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <xsd:complextype name="getstudentbyidout"> <xsd:sequence> <xsd:element name="id" type="xsd:string"/> <xsd:element name="nom" type="xsd:string"/> <xsd:element name="prenom" type="xsd:string"/> <xsd:element name="dep" type="xsd:string"/> <xsd:element name="spec" type="xsd:string"/> <xsd:element name="niveau" type="xsd:integer"/> <xsd:element name="tel" type="xsd:string"/> <xsd:element name="email" type="xsd:string"/> <xsd:element name="loginftp" type="xsd:string"/> <xsd:element name="adrmac" type="xsd:string"/> <xsd:element name="refrecu" type="xsd:string"/> <xsd:element name="process" type="xsd:string"/> </xsd:sequence> </xsd:complextype> <element name="getstudentbyid"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" ISET Djerba TriTux PAGE 61

<xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="id" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="getstudentbyidresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="bdetuns:getstudentbyidout" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="updatestudentbyid"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="id" type="xsd:string"/> <xsd:element name="tel" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="email" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="loginftp" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="adrmac" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="refrecu" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="process" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> </xsd:sequence> </xsd:complextype> ISET Djerba TriTux PAGE 62

</element> <element name="updatestudentbyidresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <xsd:complextype name="retarray"> <xsd:sequence> <xsd:element name="nextid" type="xsd:string"/> <xsd:element name="last" type="xsd:boolean"/> </xsd:sequence> </xsd:complextype> <element name="getnextid"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="id" type="xsd:string" minoccurs="0" maxoccurs="unbounded"/> <xsd:element name="filter" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="getnextidresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="bdetuns:retarray" minoccurs="0" ISET Djerba TriTux PAGE 63

</xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:smsservicens" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <element name="dosendsms"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="destinataire" type="xsd:string"/> <xsd:element name="message" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dosendsmsresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:apaclmanns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <xsd:complextype name="doforwardmacaddrout"> <xsd:sequence> <xsd:element name="ssid" type="xsd:string"/> <xsd:element name="auth_key" type="xsd:string"/> ISET Djerba TriTux PAGE 64

</xsd:sequence> </xsd:complextype> <element name="doforwardmacaddr"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="macaddr" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="doforwardmacaddrresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="apaclmanns:doforwardmacaddrout" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="doromoveforwordedmacaddr"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="macaddr" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> ISET Djerba TriTux PAGE 65

<element name="doromoveforwordedmacaddrresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:wwwsubscrns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:pbns"/> <xsd:complextype name="getaccuseout"> <xsd:sequence> <xsd:element name="refaccuse" type="xsd:string"/> <xsd:element name="urlaccuse" type="xsd:string"/> </xsd:sequence> </xsd:complextype> <element name="getaccuse"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="studentident" type="xsd:string"/> <xsd:element name="au" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="getaccuseresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> ISET Djerba TriTux PAGE 66

<xsd:element name="status" type="pbns:tstatus" minoccurs="0" <xsd:element name="response" type="wwwsubscrns:getaccuseout" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> </types> <porttype name="podbridgeporttype"> <operation name="ping"> <input message="pbns:pingrequest"/> <output message="pbns:pingresponse"/> </operation> <operation name="doprintwebpage"> <input message="pbns:doprintwebpagerequest"/> <output message="pbns:doprintwebpageresponse"/> </operation> <operation name="doprintinternaldocument"> <input message="pbns:doprintinternaldocumentrequest"/> <output message="pbns:doprintinternaldocumentresponse"/> </operation> <operation name="getprinters"> <input message="pbns:getprintersrequest"/> <output message="pbns:getprintersresponse"/> </operation> <operation name="docreateftpuseraccount"> <input message="pbns:docreateftpuseraccountrequest"/> <output message="pbns:docreateftpuseraccountresponse"/> </operation> <operation name="setftpuseraccountexpirydate"> <input message="pbns:setftpuseraccountexpirydaterequest"/> <output message="pbns:setftpuseraccountexpirydateresponse" /> </operation> <operation name="setftpuserwelcomemsg"> <input message="pbns:setftpuserwelcomemsgrequest"/> <output message="pbns:setftpuserwelcomemsgresponse"/> </operation> <operation name="dodisableftpuserwelcomemsg"> <input message="pbns:dodisableftpuserwelcomemsgrequest"/> <output message="pbns:dodisableftpuserwelcomemsgresponse"/> </operation> <operation name="dochangeftpuserpassword"> <input message="pbns:dochangeftpuserpasswordrequest"/> <output message="pbns:dochangeftpuserpasswordresponse"/> ISET Djerba TriTux PAGE 67

</operation> <operation name="dodeleteftpuseraccount"> <input message="pbns:dodeleteftpuseraccountrequest"/> <output message="pbns:dodeleteftpuseraccountresponse"/> </operation> <operation name="doftpsendfile"> <input message="pbns:doftpsendfilerequest"/> <output message="pbns:doftpsendfileresponse"/> </operation> <operation name="getstudentbyid"> <input message="pbns:getstudentbyidrequest"/> <output message="pbns:getstudentbyidresponse"/> </operation> <operation name="updatestudentbyid"> <input message="pbns:updatestudentbyidrequest"/> <output message="pbns:updatestudentbyidresponse"/> </operation> <operation name="getnextid"> <input message="pbns:getnextidrequest"/> <output message="pbns:getnextidresponse"/> </operation> <operation name="dosendsms"> <input message="pbns:dosendsmsrequest"/> <output message="pbns:dosendsmsresponse"/> </operation> <operation name="doforwardmacaddr"> <input message="pbns:doforwardmacaddrrequest"/> <output message="pbns:doforwardmacaddrresponse"/> </operation> <operation name="doromoveforwordedmacaddr"> <input message="pbns:doromoveforwordedmacaddrrequest"/> <output message="pbns:doromoveforwordedmacaddrresponse"/> </operation> <operation name="getaccuse"> <input message="pbns:getaccuserequest"/> <output message="pbns:getaccuseresponse"/> </operation> </porttype> <binding name="podbridgebinding" type="pbns:podbridgeporttype"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="ping"> <input> <soap:body use="literal"/> </input> ISET Djerba TriTux PAGE 68

<output> <soap:body use="literal"/> </output> </operation> <operation name="doprintwebpage"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="doprintinternaldocument"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="getprinters"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="docreateftpuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="setftpuseraccountexpirydate"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> ISET Djerba TriTux PAGE 69

<operation name="setftpuserwelcomemsg"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dodisableftpuserwelcomemsg"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dochangeftpuserpassword"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dodeleteftpuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="doftpsendfile"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="getstudentbyid"> <input> <soap:body use="literal"/> </input> ISET Djerba TriTux PAGE 70

<output> <soap:body use="literal"/> </output> </operation> <operation name="updatestudentbyid"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="getnextid"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dosendsms"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="doforwardmacaddr"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="doromoveforwordedmacaddr"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> ISET Djerba TriTux PAGE 71

<operation name="getaccuse"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <message name="pingrequest"> <part name="body" element="pbns:ping"/> </message> <message name="pingresponse"> <part name="body" element="pbns:pingresponse"/> </message> <message name="doprintwebpagerequest"> <part name="body" element="ippservicens:doprintwebpage"/> </message> <message name="doprintwebpageresponse"> <part name="body" element="ippservicens:doprintwebpageresponse"/> </message> <message name="doprintinternaldocumentrequest"> <part name="body" element="ippservicens:doprintinternaldocument"/> </message> <message name="doprintinternaldocumentresponse"> <part name="body" element="ippservicens:doprintinternaldocumentresponse" /> </message> <message name="getprintersrequest"> <part name="body" element="ippservicens:getprinters"/> </message> <message name="getprintersresponse"> <part name="body" element="ippservicens:getprintersresponse"/> </message> <message name="docreateftpuseraccountrequest"> <part name="body" element="ftpacntns:docreateftpuseraccount"/> </message> <message name="docreateftpuseraccountresponse"> <part name="body" element="ftpacntns:docreateftpuseraccountresponse"/> </message> <message name="setftpuseraccountexpirydaterequest"> <part name="body" element="ftpacntns:setftpuseraccountexpirydate"/> </message> <message name="setftpuseraccountexpirydateresponse"> <part name="body" element="ftpacntns:setftpuseraccountexpirydateresponse"/> ISET Djerba TriTux PAGE 72

</message> <message name="setftpuserwelcomemsgrequest"> <part name="body" element="ftpacntns:setftpuserwelcomemsg"/> </message> <message name="setftpuserwelcomemsgresponse"> <part name="body" element="ftpacntns:setftpuserwelcomemsgresponse"/> </message> <message name="dodisableftpuserwelcomemsgrequest"> <part name="body" element="ftpacntns:dodisableftpuserwelcomemsg"/> </message> <message name="dodisableftpuserwelcomemsgresponse"> <part name="body" element="ftpacntns:dodisableftpuserwelcomemsgresponse"/> </message> <message name="dochangeftpuserpasswordrequest"> <part name="body" element="ftpacntns:dochangeftpuserpassword"/> </message> <message name="dochangeftpuserpasswordresponse"> <part name="body" element="ftpacntns:dochangeftpuserpasswordresponse" /> </message> <message name="dodeleteftpuseraccountrequest"> <part name="body" element="ftpacntns:dodeleteftpuseraccount"/> </message> <message name="dodeleteftpuseraccountresponse"> <part name="body" element="ftpacntns:dodeleteftpuseraccountresponse"/> </message> <message name="doftpsendfilerequest"> <part name="body" element="ftpacntns:doftpsendfile"/> </message> <message name="doftpsendfileresponse"> <part name="body" element="ftpacntns:doftpsendfileresponse"/> </message> <message name="getstudentbyidrequest"> <part name="body" element="bdetuns:getstudentbyid"/> </message> <message name="getstudentbyidresponse"> <part name="body" element="bdetuns:getstudentbyidresponse"/> </message> <message name="updatestudentbyidrequest"> <part name="body" element="bdetuns:updatestudentbyid"/> </message> <message name="updatestudentbyidresponse"> <part name="body" element="bdetuns:updatestudentbyidresponse"/> </message> <message name="getnextidrequest"> ISET Djerba TriTux PAGE 73

<part name="body" element="bdetuns:getnextid"/> </message> <message name="getnextidresponse"> <part name="body" element="bdetuns:getnextidresponse"/> </message> <message name="dosendsmsrequest"> <part name="body" element="smsservicens:dosendsms"/> </message> <message name="dosendsmsresponse"> <part name="body" element="smsservicens:dosendsmsresponse"/> </message> <message name="doforwardmacaddrrequest"> <part name="body" element="apaclmanns:doforwardmacaddr"/> </message> <message name="doforwardmacaddrresponse"> <part name="body" element="apaclmanns:doforwardmacaddrresponse"/> </message> <message name="doromoveforwordedmacaddrrequest"> <part name="body" element="apaclmanns:doromoveforwordedmacaddr"/> </message> <message name="doromoveforwordedmacaddrresponse"> <part name="body" element="apaclmanns:doromoveforwordedmacaddrresponse"/> </message> <message name="getaccuserequest"> <part name="body" element="wwwsubscrns:getaccuse"/> </message> <message name="getaccuseresponse"> <part name="body" element="wwwsubscrns:getaccuseresponse"/> </message> <service name="podbridgeservice"> <port name="podbridgeport" binding="pbns:podbridgebinding"> <soap:address location="http://podbridge.intranet.demo/projects/unstable/podbridge/web/api/index.php"/> </port> </service> </definitions> 2.3.2. WSDL exposé par PodBridge1.2 sur «ws.rnu.edu.demo» Source : http://ws.rnu.edu.demo/projects/unstable/podbridge1.2/web/frontend_dev.php/wsdl/all ISET Djerba TriTux PAGE 74

<?xml version="1.0" encoding="utf-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="podbridge" targetnamespace="urn:tns" xmlns:tns="urn:tns" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:pbns="urn:pbns" xmlns:mailacntns="urn:mailacntns"> <types> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:tns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:complextype name="tstatus"> <xsd:sequence> <xsd:element name="msg" type="xsd:string"/> <xsd:element name="code" type="xsd:integer"/> </xsd:sequence> </xsd:complextype> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:pbns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:tns"/> <element name="ping"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="pingresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" </xsd:sequence> ISET Djerba TriTux PAGE 75

</xsd:complextype> </element> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="urn:mailacntns" elementformdefault="qualified" attributeformdefault="qualified"> <xsd:import namespace="urn:tns"/> <xsd:complextype name="retmailaccount2"> <xsd:sequence> <xsd:element name="emailadress" type="xsd:string"/> <xsd:element name="password" type="xsd:string"/> <xsd:element name="webmailurl" type="xsd:string"/> </xsd:sequence> </xsd:complextype> <element name="docreatemailuseraccount2"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="fstname" type="xsd:string"/> <xsd:element name="lstname" type="xsd:string"/> <xsd:element name="genpswd" type="xsd:boolean"/> <xsd:element name="password" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="docreatemailuseraccount2response"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="mailacntns:retmailaccount2" minoccurs="0" ISET Djerba TriTux PAGE 76

</xsd:sequence> </xsd:complextype> </element> <xsd:complextype name="retmailaccount"> <xsd:sequence> <xsd:element name="emailadress" type="xsd:string"/> <xsd:element name="password" type="xsd:string"/> <xsd:element name="pop3port" type="xsd:integer"/> <xsd:element name="smtpport" type="xsd:integer"/> <xsd:element name="webmailurl" type="xsd:string"/> </xsd:sequence> </xsd:complextype> <element name="docreatemailuseraccount"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="user" type="xsd:string"/> <xsd:element name="genpswd" type="xsd:boolean"/> <xsd:element name="password" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="docreatemailuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="mailacntns:retmailaccount" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> ISET Djerba TriTux PAGE 77

<element name="dochangemailuserpassword"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="emailaddr" type="xsd:string"/> <xsd:element name="oldpassword" type="xsd:string"/> <xsd:element name="newpassword" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dochangemailuserpasswordresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dodeletemailuseraccount"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="emailaddr" type="xsd:string"/> ISET Djerba TriTux PAGE 78

</xsd:sequence> </xsd:complextype> </element> <element name="dodeletemailuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dounlockmailuseraccount"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="emailaddr" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dounlockmailuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> ISET Djerba TriTux PAGE 79

</element> <element name="dolockmailuseraccount"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="emailaddr" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dolockmailuseraccountresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> <element name="dosendmail"> <xsd:complextype> <xsd:sequence> <xsd:element name="key" type="xsd:string"/> <xsd:element name="sync" type="xsd:boolean" minoccurs="0" <xsd:element name="notify" type="xsd:boolean" minoccurs="0" <xsd:element name="transid" type="xsd:string" minoccurs="0" <xsd:element name="abort" type="xsd:boolean" minoccurs="0" <xsd:element name="from" type="xsd:string"/> ISET Djerba TriTux PAGE 80

<xsd:element name="to" type="xsd:string"/> <xsd:element name="message" type="xsd:string"/> <xsd:element name="subject" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </element> <element name="dosendmailresponse"> <xsd:complextype> <xsd:sequence> <xsd:element name="transid" type="xsd:string"/> <xsd:element name="transdate" type="xsd:string"/> <xsd:element name="status" type="tns:tstatus" minoccurs="0" <xsd:element name="response" type="xsd:boolean" minoccurs="0" </xsd:sequence> </xsd:complextype> </element> </schema> </types> <porttype name="podbridgeporttype"> <operation name="ping"> <input message="tns:pingrequest"/> <output message="tns:pingresponse"/> </operation> <operation name="docreatemailuseraccount2"> <input message="tns:docreatemailuseraccount2request"/> <output message="tns:docreatemailuseraccount2response"/> </operation> <operation name="docreatemailuseraccount"> <input message="tns:docreatemailuseraccountrequest"/> <output message="tns:docreatemailuseraccountresponse"/> </operation> <operation name="dochangemailuserpassword"> <input message="tns:dochangemailuserpasswordrequest"/> <output message="tns:dochangemailuserpasswordresponse"/> </operation> <operation name="dodeletemailuseraccount"> <input message="tns:dodeletemailuseraccountrequest"/> <output message="tns:dodeletemailuseraccountresponse"/> </operation> ISET Djerba TriTux PAGE 81

<operation name="dounlockmailuseraccount"> <input message="tns:dounlockmailuseraccountrequest"/> <output message="tns:dounlockmailuseraccountresponse"/> </operation> <operation name="dolockmailuseraccount"> <input message="tns:dolockmailuseraccountrequest"/> <output message="tns:dolockmailuseraccountresponse"/> </operation> <operation name="dosendmail"> <input message="tns:dosendmailrequest"/> <output message="tns:dosendmailresponse"/> </operation> </porttype> <binding name="podbridgebinding" type="tns:podbridgeporttype"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="ping"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="docreatemailuseraccount2"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="docreatemailuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dochangemailuserpassword"> ISET Djerba TriTux PAGE 82

<input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dodeletemailuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dounlockmailuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dolockmailuseraccount"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="dosendmail"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> ISET Djerba TriTux PAGE 83

</binding> <message name="pingrequest"> <part name="body" element="pbns:ping"/> </message> <message name="pingresponse"> <part name="body" element="pbns:pingresponse"/> </message> <message name="docreatemailuseraccount2request"> <part name="body" element="mailacntns:docreatemailuseraccount2"/> </message> <message name="docreatemailuseraccount2response"> <part name="body" element="mailacntns:docreatemailuseraccount2response"/> </message> <message name="docreatemailuseraccountrequest"> <part name="body" element="mailacntns:docreatemailuseraccount"/> </message> <message name="docreatemailuseraccountresponse"> <part name="body" element="mailacntns:docreatemailuseraccountresponse"/> </message> <message name="dochangemailuserpasswordrequest"> <part name="body" element="mailacntns:dochangemailuserpassword"/> </message> <message name="dochangemailuserpasswordresponse"> <part name="body" element="mailacntns:dochangemailuserpasswordresponse"/> </message> <message name="dodeletemailuseraccountrequest"> <part name="body" element="mailacntns:dodeletemailuseraccount"/> </message> <message name="dodeletemailuseraccountresponse"> <part name="body" element="mailacntns:dodeletemailuseraccountresponse"/> </message> <message name="dounlockmailuseraccountrequest"> <part name="body" element="mailacntns:dounlockmailuseraccount"/> </message> <message name="dounlockmailuseraccountresponse"> <part name="body" element="mailacntns:dounlockmailuseraccountresponse"/> </message> <message name="dolockmailuseraccountrequest"> <part name="body" element="mailacntns:dolockmailuseraccount"/> </message> ISET Djerba TriTux PAGE 84

<message name="dolockmailuseraccountresponse"> <part name="body" element="mailacntns:dolockmailuseraccountresponse"/> </message> <message name="dosendmailrequest"> <part name="body" element="mailacntns:dosendmail"/> </message> <message name="dosendmailresponse"> <part name="body" element="mailacntns:dosendmailresponse"/> </message> <service name="podbridgeservice"> <port name="podbridgeport" binding="tns:podbridgebinding"> <soap:address location="http://ws.rnu.edu.demo/projects/unstable/podbridge1.2/web/api/index.php" /> </port> </service> </definitions> 2.3.3. WSDL du service «ProcessRUById» Source : processrubyid.wsdl <?xml version="1.0" encoding="utf-8"?> <definitions name="processrubyid" targetnamespace="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"> <types/> <message name="processrubyidoperationrequest"> <part name="identifiant" type="xsd:string"/> </message> <message name="processrubyidoperationresponse"> <part name="statut" type="xsd:string"/> </message> <porttype name="processrubyidporttype"> <operation name="processrubyidoperation"> <input name="processrubyidrequest" message="tns:processrubyidoperationrequest"/> ISET Djerba TriTux PAGE 85

<output name="processrubyidresponse" message="tns:processrubyidoperationresponse"/> </operation> </porttype> <plnk:partnerlinktype name="processrubyid"> <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes. In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type. A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles. --> <plnk:role name="processrubyidporttyperole" porttype="tns:processrubyidporttype"/> </plnk:partnerlinktype> </definitions> 2.3.4. WSDL du service «BatchProcessRU» <?xml version="1.0" encoding="utf-8"?> 2 <definitions name="batchprocessru" targetnamespace="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" 3 xmlns="http://schemas.xmlsoap.org/wsdl/" 4 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 5 xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" xmlns:ns="http://xml.netbeans.org/schema/batchprocessrutypes.xsd" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"> 6 <types> 7 <xsd:schema targetnamespace="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru"> 8 <xsd:import namespace="http://xml.netbeans.org/schema/batchprocessrutypes.xsd" schemalocation="batchprocessrutypes.xsd"/> 9 </xsd:schema> 10 </types> 11 <message name="batchprocessruoperationrequest"> 12 <part name="part1" type="ns:input"/> 13 </message> 14 <message name="batchprocessruoperationresponse"> 15 <part name="part1" type="ns:output"/> 16 </message> 17 <porttype name="batchprocessruporttype"> 18 <operation name="batchprocessruoperation"> 19 <input name="input1" message="tns:batchprocessruoperationrequest"/> ISET Djerba TriTux PAGE 86

20 <output name="output1" message="tns:batchprocessruoperationresponse"/> 21 </operation> 22 </porttype> 23 <plnk:partnerlinktype name="batchprocessru"> 24 <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes. 25 In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type. 26 A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.--> 27 <plnk:role name="batchprocessruporttyperole" porttype="tns:batchprocessruporttype"/> 28 </plnk:partnerlinktype> 29 </definitions> 30 31 2.4. Fichier XSD (Définition des paramètres d E/S du processus BatchProcessRU) Source : BatchProcessRUTypes.xsd <?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" targetnamespace="http://xml.netbeans.org/schema/batchprocessrutypes.xsd" xmlns:tns="http://xml.netbeans.org/schema/batchprocessrutypes.xsd" elementformdefault="qualified"> <xsd:complextype name="input"> <xsd:sequence> <xsd:element name="filter" type="xsd:string"/> </xsd:sequence> </xsd:complextype> <xsd:complextype name="output"> <xsd:sequence> <xsd:element name="message" type="xsd:string"/> <xsd:element name="statecode" type="xsd:integer"/> <xsd:element name="date"> <xsd:complextype> ISET Djerba TriTux PAGE 87

<xsd:sequence> <xsd:element name="start" type="xsd:string"/> <xsd:element name="end" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </xsd:element> </xsd:sequence> </xsd:complextype> </xsd:schema> 2.5. Fichiers BPEL 2.5.1. Fichier source : ProcessRUById.bpel <?xml version="1.0" encoding="utf-8"?> <process name="processrubyid" targetnamespace="http://enterprise.netbeans.org/bpel/processrubyid/processrubyid" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/trace" xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/editor" xmlns:sxat="http://www.sun.com/wsbpel/2.0/proc ess/executable/sunextension/attachme nt" xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/errorhan dling" xmlns:tns="http://enterprise.netbeans.org/bpel/processrubyid/processrubyid" xmlns:sxed2="http://www.sun.com/wsbpel/2.0/ process/executable/sunextension/editor2 " xmlns:ns0="urn:wwwsubscrns" xmlns:ns1="urn:bdetuns" xmlns:ns2="urn:lprintns" xmlns:pbns="urn:pbns" xmlns:ns3="urn:ftpacntns" xmlns:ns4="urn:mailacntns" xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/xpathfun ctions" xmlns:ns5="urn:apaclmanns" xmlns:sxtx="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/transact ion" sxtx:atomic="no" xmlns:ns6="urn:ippservicens" xmlns:ns7="urn:smsservicens" xmlns:ns8="urn:tns"> <import namespace="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" location="processrubyid.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> ISET Djerba TriTux PAGE 88

<import namespace="http://enterprise.netbeans.org/bpel/serviceswrapper" location="serviceswrapper.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:pbns" location="services.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://enterprise.netbeans.org/bpel/services_rnuwrapper" location="services_rnuwrapper.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:tns" location="services_rnu.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <partnerlinks> <partnerlink name="pbserviceslocalpl" xmlns:tns="http://enterprise.netbeans.org/bpel/serviceswrapper" partnerlinktype="tns:podbridgelinktype" partnerrole="podbridgerole"/> <partnerlink name="pbservicesrnupl" xmlns:tns="http://enterprise.netbeans.org/bpel/services_rnuwrapper" partnerlinktype="tns:podbridgelinktype" partnerrole="podbridgerole"/> <partnerlink name="processrubyidpl" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" partnerlinktype="tns:processrubyid" myrole="processrubyidporttyperole"/> </partnerlinks> <variables> <variable name="dosendsms_bienvenue_out" messagetype="pbns:dosendsmsresponse"/> <variable name="dosendsms_bienvenue_in" messagetype="pbns:dosendsmsrequest"/> <variable name="msg_bienvenue" type="xsd:string"/> <variable name="dosendmail_bienvenue_out" messagetype="ns8:dosendmailresponse"/> <variable name="dosendmail_bienvenue_in" messagetype="ns8:dosendmailrequest"/> <variable name="dosendmail_wifi_out" messagetype="ns8:dosendmailresponse"/> <variable name="dosendmail_wifi_in" messagetype="ns8:dosendmailrequest"/> <variable name="dosendmail_ftp_out" messagetype="ns8:dosendmailresponse"/> <variable name="dosendmail_ftp_in" messagetype="ns8:dosendmailrequest"/> <variable name="msg_param_wifi" type="xsd:string"/> <variable name="msg_param_ftp" type="xsd:string"/> <variable name="msg_param_mail" type="xsd:string"/> <variable name="dosendmail_mail_out" messagetype="ns8:dosendmailresponse"/> <variable name="dosendmail_mail_in" messagetype="ns8:dosendmailrequest"/> <variable name="docreatemailuseraccount2out" messagetype="ns8:docreatemailuseraccount2response"/> <variable name="docreatemailuseraccount2in" messagetype="ns8:docreatemailuseraccount2request"/> ISET Djerba TriTux PAGE 89

<variable name="dosendsmsout_wifi" messagetype="pbns:dosendsmsresponse"/> <variable name="dosendsmsin_wifi" messagetype="pbns:dosendsmsrequest"/> <variable name="dosendsmsout_mail" messagetype="pbns:dosendsmsresponse"/> <variable name="dosendsmsin_mail" messagetype="pbns:dosendsmsrequest"/> <variable name="dosendsmsout_ftp" messagetype="pbns:dosendsmsresponse"/> <variable name="dosendsmsin_ftp" messagetype="pbns:dosendsmsrequest"/> <variable name="getaccuseout" messagetype="pbns:getaccuseresponse"/> <variable name="getaccusein" messagetype="pbns:getaccuserequest"/> <variable name="updatestudentbyidout" messagetype="pbns:updatestudentbyidresponse"/> <variable name="updatestudentbyidin" messagetype="pbns:updatestudentbyidrequest"/> <variable name="setftpuserwelcomemsgout" messagetype="pbns:setftpuserwelcomemsgresponse"/> <variable name="setftpuserwelcomemsgin" messagetype="pbns:setftpuserwelcomemsgrequest"/> <variable name="doftpsendfileout1" messagetype="pbns:doftpsendfileresponse"/> <variable name="doftpsendfilein1" messagetype="pbns:doftpsendfilerequest"/> <variable name="doforwardmacaddrout" messagetype="pbns:doforwardmacaddrresponse"/> <variable name="doforwardmacaddrin" messagetype="pbns:doforwardmacaddrrequest"/> <variable name="setftpuseraccountexpirydateout" messagetype="pbns:setftpuseraccountexpirydateresponse"/> <variable name="setftpuseraccountexpirydatein" messagetype="pbns:setftpuseraccountexpirydaterequest"/> <variable name="doftpsendfileout" messagetype="pbns:doftpsendfileresponse"/> <variable name="doftpsendfilein" messagetype="pbns:doftpsendfilerequest"/> <variable name="processrubyidoperationout1" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" messagetype="tns:processrubyidoperationresponse"/> <variable name="docreateftpuseraccountout" messagetype="pbns:docreateftpuseraccountresponse"/> <variable name="docreateftpuseraccountin" messagetype="pbns:docreateftpuseraccountrequest"/> <variable name="getstudentbyidout" messagetype="pbns:getstudentbyidresponse"/> <variable name="getstudentbyidin" messagetype="pbns:getstudentbyidrequest"/> <variable name="doprintwebpageout" xmlns:pbns="urn:pbns" messagetype="pbns:doprintwebpageresponse"/> ISET Djerba TriTux PAGE 90

<variable name="doprintwebpagein" xmlns:pbns="urn:pbns" messagetype="pbns:doprintwebpagerequest"/> <variable name="processrubyidoperationout" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" messagetype="tns:processrubyidoperationresponse"/> <variable name="processrubyidoperationin" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" messagetype="tns:processrubyidoperationrequest"/> <variable name="sync" type="xsd:boolean"/> <variable name="key" type="xsd:string"/> <variable name="key_email" type="xsd:string"/> <variable name="ftp_created" type="xsd:boolean"/> <variable name="mac_frwd" type="xsd:boolean"/> <variable name="mail_sender" type="xsd:string"/> </variables> <sequence name="main_seq"> <receive name="receive" createinstance="yes" partnerlink="processrubyidpl" operation="processrubyidoperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" porttype="tns:processrubyidporttype" variable="processrubyidoperationin"/> <assign name="initialisation"> </assign> <from>true()</from> <to variable="sync"/> <from>'9818549272864b45c730'</from> <to variable="key"/> <from>false()</from> <to variable="ftp_created"/> <from>'isetjerba@rnu.edu.demo'</from> <to variable="mail_sender"/> <from>'691292877050480f54b5'</from> <to variable="key_email"/> <from>false()</from> <to variable="mac_frwd"/> ISET Djerba TriTux PAGE 91

part="identifiant"/> <sequence name="sequence1"> <sequence name="sequence6"> <flow name="flow22"> <sequence name="flowsequence11"> <assign name="get_etudiant"> </assign> <from variable="key"/> <to>$getstudentbyidin.body/ns1:key</to> <from variable="sync"/> <to>$getstudentbyidin.body/ns1:sync</to> <from variable="processrubyidoperationin" <to>$getstudentbyidin.body/ns1:id</to> <invoke name="get_etudiant" partnerlink="pbserviceslocalpl" operation="getstudentbyid" porttype="pbns:podbridgeporttype" inputvariable="getstudentbyidin" outputvariable="getstudentbyidout"/> part="identifiant"/> </sequence> <sequence name="flowsequence22"> <assign name="gataccuse"> </assign> <from variable="key"/> <to>$getaccusein.body/ns0:key</to> <from variable="sync"/> <to>$getaccusein.body/ns0:sync</to> <from variable="processrubyidoperationin" <to>$getaccusein.body/ns0:studentident</to> <from>'2009/2010'</from> <to>$getaccusein.body/ns0:au</to> <invoke name="getaccuse" partnerlink="pbserviceslocalpl" operation="getaccuse" ISET Djerba TriTux PAGE 92

porttype="pbns:podbridgeporttype" inputvariable="getaccusein" outputvariable="getaccuseout"/> </flow> </sequence> <if name="if_pai_check" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid"> <condition>0 = $GetAccuseOut.body/ns0:status/pbns:code</condition> <sequence name="sequence7"> <assign name="acc_updatedb"> <from variable="key"/> <to>$updatestudentbyidin.body/ns1:key</to> <from variable="sync"/> <to>$updatestudentbyidin.body/ns1:sync</to> <from>$getaccuseout.body/ns0:response/ns0:refaccuse</from> <to>$updatestudentbyidin.body/ns1:refrecu</to> </assign> <assign name="imprimer"> <from variable="key"/> <to>$doprintwebpagein.body/ns6:key</to> <from variable="sync"/> <to>$doprintwebpagein.body/ns6:sync</to> <from>$getaccuseout.body/ns0:response/ns0:urlaccuse</from> <to>$doprintwebpagein.body/ns6:url</to> <from>concat('accuse-', $processrubyidoperationin.identifiant)</from> </assign> <to>$doprintwebpagein.body/ns6:jobname</to> ISET Djerba TriTux PAGE 93

<invoke name="imprimer" partnerlink="pbserviceslocalpl" operation="doprintwebpage" porttype="pbns:podbridgeporttype" inputvariable="doprintwebpagein" outputvariable="doprintwebpageout"/> <sequence name="compte_e-mail"> <if name="if_email"> <condition>'' = $GetStudentByIdOut.body/ns1:response/ns1:email </condition> <sequence name="sequence3"> <assign name="create_email2"> <from>$getstudentbyidout.body/ns1:response/ns1:nom</from> <to>$docreatemailuseraccount2in.body/ns4:lstname</to> <from>$getstudentbyidout.body/ns1:response/ns1:prenom</from> <to>$docreatemailuseraccount2in.body/ns4:fstname</to> variable="key_email"/> <from <to>$docreatemailuseraccount2in.body/ns4:key</to> <from>false()</from> <to>$docreatemailuseraccount2in.body/ns4:genpswd</to> variable="processrubyidoperationin" part="identifiant"/> <from <to>$docreatemailuseraccount2in.body/ns4:password </to> <from variable="sync"/> <to>$docreatemailuseraccount2in.body/ns4:sync</to> </assign> <invoke name="create_email2" partnerlink="pbservicesrnupl" operation="docreatemailuseraccount2" ISET Djerba TriTux PAGE 94

porttype="ns8:podbridgeporttype" inputvariable="docreatemailuseraccount2in" outputvariable="docreatemailuseraccount2out"/> variable="sync"/> <assign name="bd_email"> <from <to>$updatestudentbyidin.body/ns1:sync</to> variable="key"/> <to>$updatestudentbyidin.body/ns1:key</to> <from <from>$docreatemailuseraccount2out.body/ns4:response/ns4:emailadress</from> <to>$updatestudentbyidin.body/ns1:email</to> <from>$docreatemailuseraccount2out.body/ns4:response/ns4:emailadres s</from> <to>$getstudentbyidout.body/ns1:response/ns1:email</to> </assign> <assign name="message_mail"> <from>concat('parametres de votre nouveau compte mail ', '* login: ', $DoCreateMailUserAccount2Out.body/ns4:response/ns4:EmailAdress, ' * password: ', $DoCreateMailUserAccount2Out.body/ns4:response/ns4:Password, ' * Port POP: ', $DoCreateMailUserAccount2Out.body/ns4:response/ns4:POP3Port, $DoCreateMailUserAccount2Out.body/ns4:response/ns4:SMTPPort, " * Port SMTP: '", ' * Consulter vos mails sur http://', $DoCreateMailUserAccount2Out.body/ns4:response/ns4:WebMailUrl)</from> variable="msg_param_mail"/> name="sendmailmail"> variable="key_email"/> <to </assign> <flow name="mail_notifier"> <sequence name="mail_mail_seq"> <assign <from ISET Djerba TriTux PAGE 95

<to>$dosendmail_mail_in.body/ns4:key</to> variable="sync"/> <from <to>$dosendmail_mail_in.body/ns4:sync</to> variable="mail_sender"/> <from <to>$dosendmail_mail_in.body/ns4:from</to> <from>$docreatemailuseraccount2out.body/ns4:response/ns4:emailadress</from> <to>$dosendmail_mail_in.body/ns4:to</to> <from>'parametres de votre nouveau compte mail '</from> <to>$dosendmail_mail_in.body/ns4:subject</to> variable="msg_param_mail"/> <from <to>$dosendmail_mail_in.body/ns4:message</to> </assign> <invoke name="sendmailmail" partnerlink="pbservicesrnupl" operation="dosendmail" porttype="ns8:podbridgeporttype" inputvariable="dosendmail_mail_in" outputvariable="dosendmail_mail_out"/> name="mail_sms_seq"> name="ifhastel_mail"> </sequence> <sequence <if <condition>$getstudentbyidout.body/ns1:response/ns1:tel!= '' </condition> name="sequence14"> <sequence ISET Djerba TriTux PAGE 96

name="smsmail"> <assign <from variable="key"/> <to>$dosendsmsin_mail.body/ns7:key</to> <from variable="sync"/> <to>$dosendsmsin_mail.body/ns7:sync</to> <from>$getstudentbyidout.body/ns1:response/ns1:tel</from> <to>$dosendsmsin_mail.body/ns7:destinataire</to> <from variable="msg_param_mail"/> <to>$dosendsmsin_mail.body/ns7:message</to> </assign> <invoke name="smsmail" partnerlink="pbserviceslocalpl" operation="dosendsms" porttype="pbns:podbridgeporttype" inputvariable="dosendsmsin_mail" outputvariable="dosendsmsout_mail"/> </if> </sequence> <flow name="flow1"> </flow> </sequence> <sequence name="compte_ftp"> </if> </sequence> </sequence> ISET Djerba TriTux PAGE 97

<if name="if_ti"> <condition>$getstudentbyidout.body/ns1:response/ns1:dep = 'TI'</condition> <sequence name="sequence2"> <if name="if_existe_ftp"> <condition>$getstudentbyidout.body/ns1:response/ns1:loginftp = ''</condition> <sequence name="sequence10"> <assign name="create_ftp"> <from variable="key"/> <to>$docreateftpuseraccountin.body/ns3:key</to> <from variable="sync"/> <to>$docreateftpuseraccountin.body/ns3:sync</to> <from>'31/12/2019'</from> <to>$docreateftpuseraccountin.body/ns3:expiry_date</to> <from>concat('etu_', $processrubyidoperationin.identifiant)</from> <to>$docreateftpuseraccountin.body/ns3:user</to> <from>false()</from> <to>$docreateftpuseraccountin.body/ns3:use_welcome</to> </assign> <invoke name="create_ftp" partnerlink="pbserviceslocalpl" operation="docreateftpuseraccount" porttype="pbns:podbridgeporttype" inputvariable="docreateftpuseraccountin" outputvariable="docreateftpuseraccountout"/> <assign name="bd_loginftp"> <from>$docreateftpuseraccountout.body/ns3:response/ns3:userlogin </from> <to>$updatestudentbyidin.body/ns1:loginftp</to> ISET Djerba TriTux PAGE 98

<from>$docreateftpuseraccountout.body/ns3:response/ns3:userlogin </from> <to>$getstudentbyidout.body/ns1:response/ns1:loginftp</to> <from>true()</from> <to variable="ftp_created"/> </assign> <assign name="ftp_msg_bienvenu"> <from variable="key"/> <to>$setftpuserwelcomemsgin.body/ns3:key</to> variable="sync"/> <from <to>$setftpuserwelcomemsgin.body/ns3:sync</to> <from>concat(sxxf:current-datetime(), 'Bienvenu ', $GetStudentByIdOut.body/ns1:response/ns1:nom, ' ', $GetStudentByIdOut.body/ns1:response/ns1:prenom, ', AVERTISSEMENT: VOUS ETES LE SEUL RESPONSABLE DU CONTENU DE VOTRE COMPTE OU COMPTE DE PLUS VOUS ETES LIMITE A SON USAGE UNIQUEMENT POUR VOS BESOINS EDUCATIFS!')</from> <to>$setftpuserwelcomemsgin.body/ns3:message</to> <from>$getstudentbyidout.body/ns1:response/ns1:loginftp </from> <to>$setftpuserwelcomemsgin.body/ns3:user</to> </assign> <invoke name="ftp_msg_bienvenu" partnerlink="pbserviceslocalpl" operation="setftpuserwelcomemsg" porttype="pbns:podbridgeporttype" inputvariable="setftpuserwelcomemsgin" outputvariable="setftpuserwelcomemsgout"/> ISET Djerba TriTux PAGE 99

<assign name="message_ftp"> <from>concat('parametres de votre nouveau compte FTP ', ' * Login : ', $DoCreateFTPUserAccountOut.body/ns3:response/ns3:UserLogin, ' * Password : ', $DoCreateFTPUserAccountOut.body/ns3:response/ns3:Password, ' * FTP Port : ', $DoCreateFTPUserAccountOut.body/ns3:response/ns3:FTPPort, ' * Address : ', $DoCreateFTPUserAccountOut.body/ns3:response/ns3:ServerDomain)</from> variable="msg_param_ftp"/> name="mail_ftp_seq"> name="sendmailftp"> variable="sync"/> <to </assign> <flow name="ftp_notifier"> <sequence <assign <from <to>$dosendmail_ftp_in.body/ns4:sync</to> variable="mail_sender"/> <from <to>$dosendmail_ftp_in.body/ns4:from</to> <from>$getstudentbyidout.body/ns1:response/ns1:email </from> <to>$dosendmail_ftp_in.body/ns4:to</to> <from>'parametres de votre nouveau compte FTP'</from> <to>$dosendmail_ftp_in.body/ns4:subject</to> variable="msg_param_ftp"/> <from <to>$dosendmail_ftp_in.body/ns4:message</to> ISET Djerba TriTux PAGE 100

variable="key_email"/> <from <to>$dosendmail_ftp_in.body/ns4:key</to> </assign> <invoke name="sendmailftp" partnerlink="pbservicesrnupl" operation="dosendmail" porttype="ns8:podbridgeporttype" inputvariable="dosendmail_ftp_in" outputvariable="dosendmail_ftp_out"/> name="ftp_sms_seq"> name="ifhastel_ftp"> </sequence> <sequence <if <condition>$getstudentbyidout.body/ns1:response/ns1:tel!= '' </condition> <sequence name="sequence16"> <assign name="smsftp"> <from variable="key"/> <to>$dosendsmsin_ftp.body/ns7:key</to> <from variable="sync"/> <to>$dosendsmsin_ftp.body/ns7:sync</to> <from variable="msg_param_ftp"/> <to>$dosendsmsin_ftp.body/ns7:message</to> <from>$getstudentbyidout.body/ns1:response/ns1:tel</from> ISET Djerba TriTux PAGE 101

<to>$dosendsmsin_ftp.body/ns7:destinataire</to> name="smsftp" partnerlink="pbserviceslocalpl" operation="dosendsms" porttype="pbns:podbridgeporttype" inputvariable="dosendsmsin_ftp" outputvariable="dosendsmsout_ftp"/> name="etendre_date_expiration"> variable="key"/> </flow> </sequence> <else> </if> </sequence> </assign> <invoke </sequence> <sequence name="sequence11"> <assign <from <to>$setftpuseraccountexpirydatein.body/ns3:key</to> variable="sync"/> <from <to>$setftpuseraccountexpirydatein.body/ns3:sync</to> <from>'31/12/2020'</from> <to>$setftpuseraccountexpirydatein.body/ns3:expiry_date </to> <from>$getstudentbyidout.body/ns1:response/ns1:loginftp </from> <to>$setftpuseraccountexpirydatein.body/ns3:user</to> </assign> <invoke name="etendre_date_expiration" partnerlink="pbserviceslocalpl" operation="setftpuseraccountexpirydate" porttype="pbns:podbridgeporttype" inputvariable="setftpuseraccountexpirydatein" outputvariable="setftpuseraccountexpirydateout"/> ISET Djerba TriTux PAGE 102

</sequence> </else> </if> <flow name="flow3"> <sequence name="cours"> <assign name="envoyer_cours"> <from variable="key"/> <to>$doftpsendfilein1.body/ns3:key</to> <from variable="sync"/> <to>$doftpsendfilein1.body/ns3:sync</to> $GetStudentByIdOut.body/ns1:response/ns1:spec, $GetStudentByIdOut.body/ns1:response/ns1:niveau)</from> <from>concat('cours_', <to>$doftpsendfilein1.body/ns3:file</to> <from>$getstudentbyidout.body/ns1:response/ns1:loginftp </from> <to>$doftpsendfilein1.body/ns3:user</to> </assign> <invoke name="envoyer_cours" partnerlink="pbserviceslocalpl" operation="doftpsendfile" porttype="pbns:podbridgeporttype" inputvariable="doftpsendfilein1" outputvariable="doftpsendfileout1"/> </sequence> <if name="if_niv2_ou_plus"> <condition>$getstudentbyidout.body/ns1:response/ns1:niveau > 2</condition> <sequence name="sequence9"> <assign name="envoyer_cours_uml"> <from variable="key"/> <to>$doftpsendfilein.body/ns3:key</to> ISET Djerba TriTux PAGE 103

variable="sync"/> <from <to>$doftpsendfilein.body/ns3:sync</to> UML.pdf'</from> <from>'cours- <to>$doftpsendfilein.body/ns3:file</to> <from>$getstudentbyidout.body/ns1:response/ns1:loginftp </from> <to>$doftpsendfilein.body/ns3:user</to> </assign> <invoke name="envoyer_cours_uml" partnerlink="pbserviceslocalpl" operation="doftpsendfile" porttype="pbns:podbridgeporttype" inputvariable="doftpsendfilein" outputvariable="doftpsendfileout"/> </if> </sequence> </if> </flow> </sequence> </sequence> <sequence name="filtrage_mac"> <if name="if_adrmac"> <condition>$getstudentbyidout.body/ns1:response/ns1:adrmac!= '' </condition> <sequence name="sequence13"> <assign name="autorise_mac"> <from variable="key"/> <to>$doforwardmacaddrin.body/ns5:key</to> <from variable="sync"/> <to>$doforwardmacaddrin.body/ns5:sync</to> ISET Djerba TriTux PAGE 104

<from>$getstudentbyidout.body/ns1:response/ns1:adrmac</from> <to>$doforwardmacaddrin.body/ns5:macaddr</to> </assign> <invoke name="autorise_mac" partnerlink="pbserviceslocalpl" operation="doforwardmacaddr" porttype="pbns:podbridgeporttype" inputvariable="doforwardmacaddrin" outputvariable="doforwardmacaddrout"/> <assign name="settrue"> </assign> <from>true()</from> <to variable="mac_frwd"/> <assign name="message_wifi"> <from>concat("dès maintenant Vous etes autorisé à se connecter au réseau sans fil d'iset Jerba ", ' * SSID : ', $DoForwardMACaddrOut.body/ns5:response/ns5:ssid, ' * Clé : ', $DoForwardMACaddrOut.body/ns5:response/ns5:auth_key)</from> name="sendmailwifi"> variable="sync"/> </assign> <to variable="msg_param_wifi"/> <flow name="wifi_notifier"> <sequence name="mail_wifi_seq"> <assign <from <to>$dosendmail_wifi_in.body/ns4:sync</to> variable="mail_sender"/> <from <to>$dosendmail_wifi_in.body/ns4:from</to> variable="msg_param_wifi"/> <from <to>$dosendmail_wifi_in.body/ns4:message</to> ISET Djerba TriTux PAGE 105

<from>$getstudentbyidout.body/ns1:response/ns1:email </from> <to>$dosendmail_wifi_in.body/ns4:to</to> <from>"vous etes autoriser à se connecté au réseau sans Fil d'iset Jerba"</from> <to>$dosendmail_wifi_in.body/ns4:subject</to> variable="key_email"/> <from <to>$dosendmail_wifi_in.body/ns4:key</to> </assign> <invoke name="sendmailwifi" partnerlink="pbservicesrnupl" operation="dosendmail" porttype="ns8:podbridgeporttype" inputvariable="dosendmail_wifi_in" outputvariable="dosendmail_wifi_out"/> </sequence> <sequence name="wifi_sms_seq"> <if name="ifhastel_wifi"> <condition>$getstudentbyidout.body/ns1:response/ns1:tel!= ''</condition> <sequence name="sequence15"> <assign name="smswifi"> <from variable="key"/> <to>$dosendsmsin_wifi.body/ns7:key</to> variable="sync"/> <from <to>$dosendsmsin_wifi.body/ns7:sync</to> ISET Djerba TriTux PAGE 106

<from>$getstudentbyidout.body/ns1:response/ns1:tel</from> <to>$dosendsmsin_wifi.body/ns7:destinataire</to> variable="msg_param_wifi"/> <from <to>$dosendsmsin_wifi.body/ns7:message</to> </assign> <invoke name="smswifi" partnerlink="pbserviceslocalpl" operation="dosendsms" porttype="pbns:podbridgeporttype" inputvariable="dosendsmsin_wifi" outputvariable="dosendsmsout_wifi"/> </flow> </if> </sequence> </flow> </sequence> </if> </sequence> <assign name="message_bienvenue"> </sequence> <from>concat('bienvenu ', $GetStudentByIdOut.body/ns1:response/ns1:nom, ' ', $GetStudentByIdOut.body/ns1:response/ns1:prenom, ' ISET Djerba vous souhaite une bonne rentrée universiaire 2009/2010.')</from> </assign> <to variable="msg_bienvenue"/> <flow name="flow23"> <sequence name="flowsequence"> <assign name="sendmailbienvenue"> <from variable="sync"/> <to>$dosendmail_bienvenue_in.body/ns4:sync</to> <from>$getstudentbyidout.body/ns1:response/ns1:email </from> <to>$dosendmail_bienvenue_in.body/ns4:to</to> ISET Djerba TriTux PAGE 107

<from variable="mail_sender"/> <to>$dosendmail_bienvenue_in.body/ns4:from</to> <from variable="msg_bienvenue"/> <to>$dosendmail_bienvenue_in.body/ns4:message</to> <from>'bienvenue'</from> <to>$dosendmail_bienvenue_in.body/ns4:subject</to> <from variable="key_email"/> <to>$dosendmail_bienvenue_in.body/ns4:key</to> </assign> <invoke name="sendmailbienvenue" partnerlink="pbservicesrnupl" operation="dosendmail" porttype="ns8:podbridgeporttype" inputvariable="dosendmail_bienvenue_in" outputvariable="dosendmail_bienvenue_out"/> </sequence> <sequence name="flowsequence1"> <assign name="smsbienvenue"> <from variable="key"/> <to>$dosendsms_bienvenue_in.body/ns7:key</to> <from variable="sync"/> <to>$dosendsms_bienvenue_in.body/ns7:sync</to> <from>$getstudentbyidout.body/ns1:response/ns1:tel</from> <to>$dosendsms_bienvenue_in.body/ns7:destinataire</to> <from variable="msg_bienvenue"/> ISET Djerba TriTux PAGE 108

<to>$dosendsms_bienvenue_in.body/ns7:message</to> </assign> <invoke name="smsbienvenue" partnerlink="pbserviceslocalpl" operation="dosendsms" porttype="pbns:podbridgeporttype" inputvariable="dosendsms_bienvenue_in" outputvariable="dosendsms_bienvenue_out"/> part="statut"/> part="statut"/> </flow> </sequence> <assign name="reply_bdetu_ok"> </assign> </sequence> <else> <sequence> <from>'ok'</from> <to variable="processrubyidoperationout" <from>'ok'</from> <to>$updatestudentbyidin.body/ns1:process</to> <assign name="reply_bdetu_pai"> <from>'pai'</from> <to variable="processrubyidoperationout" <from>'pai'</from> <to>$updatestudentbyidin.body/ns1:process</to> </assign> </sequence> </else> </if> </sequence> </sequence> <assign name="mettre_a_jour_bdetu"> <from variable="key"/> <to>$updatestudentbyidin.body/ns1:key</to> ISET Djerba TriTux PAGE 109

</assign> <from variable="sync"/> <to>$updatestudentbyidin.body/ns1:sync</to> <from variable="processrubyidoperationin" part="identifiant"/> <to>$updatestudentbyidin.body/ns1:id</to> <invoke name="mettre_a_jour_bdetu" partnerlink="pbserviceslocalpl" operation="updatestudentbyid" xmlns:pbns="urn:pbns" porttype="pbns:podbridgeporttype" inputvariable="updatestudentbyidin" outputvariable="updatestudentbyidout"/> <reply name="reply" partnerlink="processrubyidpl" operation="processrubyidoperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" porttype="tns:processrubyidporttype" variable="processrubyidoperationout"/> </sequence> </process> 2.5.2. Fichier Source : BatchProcessRU.bpel <?xml version="1.0" encoding="utf-8"?> <process name="batchprocessru" targetnamespace="http://enterprise.netbeans.org/bpel/batchprocessru/batchprocessru " xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/trace" xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/editor" xmlns:sxat="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/attachme nt" xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/errorhan dling" xmlns:tns="http://enterprise.netbeans.org/bpel/batchprocessru/batchprocessru" xmlns:sxed2="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/editor2 " xmlns:ns0="http://xml.netbeans.org/schema/batchprocessrutypes.xsd" xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/sunextension/xpathfun ISET Djerba TriTux PAGE 110

ctions" xmlns:ns1="urn:bdetuns" xmlns:ns2="urn:pbns" xmlns:ns3="urn:tns" xmlns:ns4="urn:mailacntns" xmlns:ns5="urn:smsservicens"> <import namespace="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" location="batchprocessru.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://enterprise.netbeans.org/bpel/getnextidwrapper" location="getnextidwrapper.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:pbns" location="getnextid.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://enterprise.netbeans.org/bpel/dosendmailwrapper" location="dosendmailwrapper.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:tns" location="dosendmail.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://enterprise.netbeans.org/bpel/dosendsmswrapper" location="dosendsmswrapper.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:pbns" location="dosendsms.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" location="http://walid-laptop:9080/processrubyidca-sun-httpbinding/processrubyid/processrubyid.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"/> <partnerlinks> <partnerlink name="batchprocessrupl" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" partnerlinktype="tns:batchprocessru" myrole="batchprocessruporttyperole"/> <partnerlink name="getnextidpl" xmlns:tns="http://enterprise.netbeans.org/bpel/getnextidwrapper" partnerlinktype="tns:podbridgegetnextidlinktype" partnerrole="podbridgegetnextidrole"/> <partnerlink name="dosendmailpl" xmlns:tns="http://enterprise.netbeans.org/bpel/dosendmailwrapper" partnerlinktype="tns:podbridgedosendmaillinktype" partnerrole="podbridgedosendmailrole"/> <partnerlink name="dosendsmspl" xmlns:tns="http://enterprise.netbeans.org/bpel/dosendsmswrapper" partnerlinktype="tns:podbridgedosendsmslinktype" partnerrole="podbridgedosendsmsrole"/> <partnerlink name="processbyidpl" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processru ById" partnerlinktype="tns:processrubyid" partnerrole="processrubyidporttyperole"/> </partnerlinks> <variables> <variable name="msg" type="xsd:string"/> <variable name="dosendsmsout" messagetype="ns2:dosendsmsresponse"/> <variable name="dosendsmsin" messagetype="ns2:dosendsmsrequest"/> <variable name="dosendmailout" messagetype="ns3:dosendmailresponse"/> <variable name="dosendmailin" messagetype="ns3:dosendmailrequest"/> <variable name="key_rnu" type="xsd:string"/> <variable name="key_local" type="xsd:string"/> ISET Djerba TriTux PAGE 111

<variable name="getnextidout" xmlns:pbns="urn:pbns" messagetype="pbns:getnextidresponse"/> <variable name="getnextidin" xmlns:pbns="urn:pbns" messagetype="pbns:getnextidrequest"/> <variable name="batchprocessruoperationout" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" messagetype="tns:batchprocessruoperationresponse"/> <variable name="batchprocessruoperationin" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" messagetype="tns:batchprocessruoperationrequest"/> <variable name="processrubyidoperationout" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" messagetype="tns:processrubyidoperationresponse"/> <variable name="processrubyidoperationin" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" messagetype="tns:processrubyidoperationrequest"/> </variables> <sequence> <receive name="receive" createinstance="yes" partnerlink="batchprocessrupl" operation="batchprocessruoperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" porttype="tns:batchprocessruporttype" variable="batchprocessruoperationin"/> <assign name="init"> </assign> <from>'691292877050480f54b5'</from> <to variable="key_rnu"/> <from>'691292877050480f54b5'</from> <to variable="key_local"/> <from>sxxf:current-datetime()</from> <to>$batchprocessruoperationout.part1/ns0:date/ns0:start</to> <assign name="getnextid_init"> <from variable="key_local"/> <to>$getnextidin.body/ns1:key</to> <from>true()</from> <to>$getnextidin.body/ns1:sync</to> <from>$batchprocessruoperationin.part1/ns0:filter</from> ISET Djerba TriTux PAGE 112

</assign> <to>$getnextidin.body/ns1:filter</to> <repeatuntil name="repeatuntil_lastid"> <sequence name="sequence1"> <invoke name="getnextid" partnerlink="getnextidpl" operation="getnextid" xmlns:pbns="urn:pbns" porttype="pbns:podbridgegetnextidporttype" inputvariable="getnextidin" outputvariable="getnextidout"/> 0</condition> <if name="ifexist"> <condition>$getnextidout.body/ns1:status/ns2:code = <sequence name="sequence2"> <assign name="getnextid"> <from>$getnextidout.body/ns1:response/ns1:nextid</from> <to>$getnextidin.body/ns1:id</to> <from variable="key_local"/> <to>$getnextidin.body/ns1:key</to> <from>true()</from> <to>$getnextidin.body/ns1:sync</to> <from>$batchprocessruoperationin.part1/ns0:filter </from> <to>$getnextidin.body/ns1:filter</to> </assign> <assign name="processrubyid"> <from>$getnextidout.body/ns1:response/ns1:nextid</from> part="identifiant"/> </assign> <to variable="processrubyidoperationin" <invoke name="processrubyid" partnerlink="processbyidpl" operation="processrubyidoperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/processrubyid/processrubyid" porttype="tns:processrubyidporttype" inputvariable="processrubyidoperationin" outputvariable="processrubyidoperationout"/> </sequence> ISET Djerba TriTux PAGE 113

</if> </sequence> <condition>$getnextidout.body/ns1:response/ns1:last = true() or $GetNextIdOut.body/ns1:status/ns2:code!= 0 </condition> </repeatuntil> <assign name="message"> <from>concat('exécution de ProcessRUById est Terminée avec succès!', '* Démarré : ', $BatchProcessRUOperationOut.part1/ns0:date/ns0:start, ' * Fin : ', sxxf:current-datetime())</from> </assign> <to variable="msg"/> <flow name="notify_admin"> <sequence name="flowsequence"> <assign name="mail"> </assign> <from variable="key_rnu"/> <to>$dosendmailin.body/ns4:key</to> <from>true()</from> <to>$dosendmailin.body/ns4:sync</to> <from>'sunbpelengine@rnu.edu.demo'</from> <to>$dosendmailin.body/ns4:from</to> <from>'walid@rnu.edu.demo'</from> <to>$dosendmailin.body/ns4:to</to> <from>'exéction de BatchProcessRU terminée!'</from> <to>$dosendmailin.body/ns4:subject</to> <from variable="msg"/> <to>$dosendmailin.body/ns4:message</to> <invoke name="mail" partnerlink="dosendmailpl" operation="dosendmail" porttype="ns3:podbridgedosendmailporttype" inputvariable="dosendmailin" outputvariable="dosendmailout"/> </sequence> ISET Djerba TriTux PAGE 114

<sequence name="flowsequence1"> <assign name="sms"> </assign> <from variable="key_local"/> <to>$dosendsmsin.body/ns5:key</to> <from>true()</from> <to>$dosendsmsin.body/ns5:sync</to> <from>'22939968'</from> <to>$dosendsmsin.body/ns5:destinataire</to> <from variable="msg"/> <to>$dosendsmsin.body/ns5:message</to> <invoke name="sms" partnerlink="dosendsmspl" operation="dosendsms" porttype="ns2:podbridgedosendsmsporttype" inputvariable="dosendsmsin" outputvariable="dosendsmsout"/> </flow> </sequence> <assign name="reply"> </assign> <from>'success'</from> <to>$batchprocessruoperationout.part1/ns0:message</to> <from>0</from> <to>$batchprocessruoperationout.part1/ns0:statecode </to> <from>sxxf:current-datetime()</from> <to>$batchprocessruoperationout.part1/ns0:date/ns0:end</to> <reply name="reply" partnerlink="batchprocessrupl" operation="batchprocessruoperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/batchprocessru/batchprocessru" porttype="tns:batchprocessruporttype" variable="batchprocessruoperationout"/> </sequence> </process> ISET Djerba TriTux PAGE 115

2.6. Code source de l application PHP (formulaire info etudiant) 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <html> 3 <head> 4 <link rel="stylesheet" type="text/css" href="main.css" /> 5 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 6 <title>:: Remplir ce formulaire ::</title> 7 </head> 8 <body> 9 <center> 10 <?php 11 // init client 12 $client = new SoapClient("http://podbridge.intranet.demo/projects/unstable/podbridge/web/index.p hp/wsdl/all"); 13 $key="691292877050480f54b5"; 14 15 if (isset ($_POST['submit']) && $_POST['id']!=null ) { 16 17 try { 18 19 //Arguements 20 $arguments=array( 21 'key'=>$key, 22 'sync'=>'1', 23 'notify'=>'', 24 'abort'=>'', 25 'id'=>$_post['id'] 26 ) ; 27 28 $getstudentbyid_out = $client- >getstudentbyid($arguments); 29 30 if ($getstudentbyid_out->status->code=='0') 31 $connected=true; 32 33 if ($_POST['tel']!=null $_POST['mail']!=null $_POST['mac']!=null ) { 34 35 //Arguements 36 $arguments=array( 37 'key'=>$key, ISET Djerba TriTux PAGE 116

38 'sync'=>'1', 39 'notify'=>'', 40 'abort'=>'', 41 'id'=>$_post['id'], 42 'tel'=>$_post['tel'], 43 'email'=>$_post['mail'], 44 'loginftp'=>'', 45 'adrmac'=>$_post['mac'], 46 'refrecu'=>'', 47 'process'=>'' 48 ) ; 49 50 $updatestudentbyid_out = $client- >updatestudentbyid($arguments); 51 52 if ($updatestudentbyid_out->status->code=='0') { 53 $updated=true; 54 }else { 55 if ($updatestudentbyid_out->status->code=='2') 56?><h3><?php echo ($updatestudentbyid_out- >status->msg);?></h3><?php 57 } 58 59 60 } 61 62 } 63 catch (SoapFault $e) { 64 print $e->getmessage(); 65 } 66 } 67 68?> 69 <form id="formulaire" method="post" > 70 <h2> 71 <?php if ( $connected ) {?>Bienvenu <?php echo $getstudentbyid_out->response->nom.' '.$getstudentbyid_out->response->prenom.'!' ; 72 }?> 73 </h2> 74 <h1> 75 <?php if (! $connected) {?>Authentification<?php } else {?>Remplir le formulaire<?php }?> 76 </h1> 77 <table> ISET Djerba TriTux PAGE 117

78 <tr align="right"><td>votre identifiant:</td><td align="left" > 79 <input name="id" maxlength="8" value="<?php echo $_POST['id'];?>"> 80 81 </td></tr> 82 <tr align="right"><td id="exemple" colspan="2">identifiant 8 chiffres</td></tr> 83 <?php if ( $connected ) {?> 84 <tr align="right"><td>adresse e-mail:</td><td><input name="mail" maxlength="50" value="<?php if (isset ($_POST['mail'])): echo $_POST['mail']; else: echo $getstudentbyid_out->response->email; 85 endif;?>"></td></tr> 86 <tr align="right"><td id="exemple" colspan="2">nom@domain.xx</td></tr> 87 <tr align="right"><td>numéro de tél. perso:</td><td><input name="tel" maxlength="8" value="<?php if (isset ($_POST['tel'])): echo $_POST['tel']; else: echo $getstudentbyid_out->response- >tel; 88 endif;?>"></td></tr> 89 <tr align="right"><td id="exemple" colspan="2">8 chiffres</td></tr> 90 <tr align="right"><td>votre adresse MAC:</td><td><input name="mac" maxlength="17" value="<?php if (isset ($_POST['mac'])): echo $_POST['mac']; else: echo $getstudentbyid_out->response->adrmac; 91 endif;?>"></td></tr> 92 <tr align="right"><td id="exemple" colspan="2">format: XX:XX:XX:XX:XX:XX</td></tr> 93 <?php }?> 94 95 96 </table> 97 <center> 98 <input id="bouton" name="submit" type="submit" value="ok"/> 99 </center> 100 <br> 101 <div align="left" id="exemple" >Vous serez notifier par mail et SMS, dès que nous traitons votre demande. </div> 102 </form> 103 104 </center> 105 </body> 106 </html> 107 ISET Djerba TriTux PAGE 118

3. CAPTURES D ECRAN ISET Djerba TriTux PAGE 119

3.1. SquirrelMail (http://webmail.rnu.edu.demo) 3.2. CUPS Web administration (http://cups.intranet.demo:631) ISET Djerba TriTux PAGE 120

3.3. Site web d inscription univ. en ligne - (http://inscription.edu.demo) 3.4. SoapUI 3.0.1 ISET Djerba TriTux PAGE 121

3.5. PodBridge 1.2 (Interfaces d administration) ISET Djerba TriTux PAGE 122

ISET Djerba TriTux PAGE 123

ISET Djerba TriTux PAGE 124

ISET Djerba TriTux PAGE 125

ISET Djerba TriTux PAGE 126

ISET Djerba TriTux PAGE 127

3.6. Projet ProcessRUById (Quelques captures d écrans) ISET Djerba TriTux PAGE 128

ISET Djerba TriTux PAGE 129

ISET Djerba TriTux PAGE 130

ISET Djerba TriTux PAGE 131

3.7. Projet BatchProcessRU (Quelques captures d écrans) ISET Djerba TriTux PAGE 132

3.8. Application web PHP (formulaire info etudiant) ISET Djerba TriTux PAGE 133

ISET Djerba TriTux PAGE 134