WSDL

Il file WSDL relativo ai servizi è raggiungibile tramite browser al seguente indirizzo:
http:/<dominio_in_cui_è_ospitato_webesse3>/<eventuale_path_per_webesse3>/services/ESSE3WS?WSDL

Metodi esposti

fn_dologin (readonly string as_username, readonly string as_password, ref string as_sessionid)

Effettua il login su ESSE3. Fornendo username e password si ottiene in output il sessionid da utilizzare per la chiamata fn_retrieve_xml().
Per accedere ai dati visibili da area pubblica si puo' usare l'account 'guest' con password 'guest'.

fn_retrieve_xml (string as_sessionid, string as_retrieve, string as_params, ref string as_xml)

Recupera i dati in formato XML.

fn_dologout (readonly string as_sessionid)

Chiude la sessione relativa al sessionid specificato.

fn_retrieve_xml_l (string as_username, string as_password, string as_retrieve, string as_params, ref string as_xml)

Questa funzione e' una "scorciatoia" che puo' sostituire la sequenza di chiamate: I parametri sono analoghi a quelli gia' descritti per tali funzioni.

fn_retrieve_xml_p (string as_retrieve, string as_params, ref string as_xml)

Questa funzione e' analoga alla fn_retrieve_xml_l chiamata con utente 'guest' e password 'guest'.

fn_retrieve_xml_x (string as_sessionid, string as_xml_in, ref string as_xml_out)

Analoga alla fn_retrieve_xml con 4 parametri, eccettuato il fatto che i parametri di retrieve sono specificati in formato xml.

fn_retrieve_xml_lx (string as_username, string as_password, string as_xml_in, ref string as_xml_out)

Analoga alla fn_retrieve_xml_l con 5 parametri, eccettuato il fatto che i parametri di retrieve sono specificati in formato xml.

fn_retrieve_xml_px (string as_xml_in, ref string as_xml_out)

Analoga alla fn_retrieve_xml_p con 3 parametri, eccettuato il fatto che i parametri di retrieve sono specificati in formato xml.

Parametri in formato XML

Tramite la sintassi in XML è possibile recuperare più blocchi in con un'unica chiamata. L'XML deve essere così strutturato:
<request>
	<retrieve name="[RETRIEVE1]">
		<param1>value1</param1>
		<param2>value2</param2>
	</retrieve>
	<retrieve name="[RETRIEVE2]">
		...
	</retrieve>
</request>
In questo caso vengono effettuate due operazioni di retrieve, la prima è equivalente ad una chiamata non-XML con as_retrieve="[RETRIEVE1]" e as_params="param1=value1;param2=value2"

Parametro include_structure

È possibile includere tra i parametri di retrieve il parametro include_structure. Se presente, l'XML ritornato comprenderà una sezione in cui verranno inserite informazioni relative al tipo dei campi.

Codici di ritorno

In tutti i casi solo il valore di ritorno 1 indica un'elaborazione andata a buon fine.
Altri possibili codici di ritorno sono i seguenti.
-1
Errore nel recupero dei dati
1003
Autenticazione fallita
1004
Fallita la creazione del componente
1007
Fallita la connessione al DB
1110
Utente disabilitato
1112
La password deve essere impostata (cambio password al primo login)
1116
User_id non valido o nullo
1119
Il gruppo a cui appartiene l'utente non è abilitato ad utilizzare questo tipo di client
1126
Errore generico di LDAP
1130
Password scaduta

Esempio di utilizzo

Versione con login esplicito

Nell'esempio seguente viene fatta la login, una retrieve, e la logout. Tra la login e la logout possono essere effettuate diverse retrieve.

Chiamata alla fn_login


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esse3.frk.kion.it"> <soapenv:Header/> <soapenv:Body> <ws:fn_dologin soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">guest</username> <password xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">guest</password> <sid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</sid> </ws:fn_dologin> </soapenv:Body> </soapenv:Envelope>

Risposta alla fn_login


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:fn_dologinResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.esse3.frk.kion.it"> <fn_dologinReturn href="#id0"/> <sid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">SESSIONIDGUEST</sid> </ns1:fn_dologinResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> </soapenv:Body> </soapenv:Envelope>

Chiamata alla fn_retrieve_xml


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esse3.frk.kion.it"> <soapenv:Header/> <soapenv:Body> <ws:fn_retrieve_xml soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <sid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">SESSIONIDGUEST</sid> <retrieve xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">CLASSI</retrieve> <params xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</params> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</xml> </ws:fn_retrieve_xml> </soapenv:Body> </soapenv:Envelope>
(Essendo il terzo parametro della chiamata fn_retrieve_xml uguale a stringa vuota i dati non vengono filtrati.)

Risposta alla fn_retrieve_xml


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:fn_retrieve_xmlResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.esse3.frk.kion.it"> <fn_retrieve_xmlReturn href="#id0"/> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <![CDATA[ <?xml version="1.0" encoding="Windows-1252"?> <WS> <DataSet LocalEntityName="CLASSI_WS"> <Row Num="1"> <cla_m_id>3</cla_m_id> <tipo_corso_cod>L2</tipo_corso_cod> <des>Classe delle lauree in Scienze della mediazione linguistica</des> <cod>3</cod> </Row> <Row Num="2"> <cla_m_id>5</cla_m_id> <tipo_corso_cod>L2</tipo_corso_cod> <des>Classe delle lauree in Lettere</des> <cod>5</cod> </Row> ..... </DataSet> </WS> ]]> </xml> </ns1:fn_retrieve_xmlResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> </soapenv:Body> </soapenv:Envelope>

Chiamata alla fn_logout


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esse3.frk.kion.it"> <soapenv:Header/> <soapenv:Body> <ws:fn_dologout soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <sid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">SESSIONIDGUEST</sid> </ws:fn_dologout> </soapenv:Body> </soapenv:Envelope>

Risposta alla fn_logout


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:fn_dologoutResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.esse3.frk.kion.it"> <fn_dologoutReturn href="#id0"/> </ns1:fn_dologoutResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> </soapenv:Body> </soapenv:Envelope>

Versione compatta

Chiamata alla fn_retrieve_xml_l


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esse3.frk.kion.it"> <soapenv:Header/> <soapenv:Body> <ws:fn_retrieve_xml_l soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">guest</username> <password xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">guest</password> <retrieve xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">CLASSI</retrieve> <params xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</params> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</xml> </ws:fn_retrieve_xml_l> </soapenv:Body> </soapenv:Envelope>

Risposta alla fn_retrieve_xml_l


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:fn_retrieve_xml_lResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.esse3.frk.kion.it"> <fn_retrieve_xml_lReturn href="#id0"/> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <![CDATA[<?xml version="1.0" encoding="Windows-1252"?> <WS> <DataSet LocalEntityName="CLASSI_WS"> <Row Num="1"> <cla_m_id>5</cla_m_id> <tipo_corso_cod>L2</tipo_corso_cod> <des>Classe delle lauree in Lettere</des> <cod>5</cod> </Row> </DataSet> </WS> ]]> </xml> </ns1:fn_retrieve_xml_lResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> </soapenv:Body> </soapenv:Envelope>

Versione compatta con autenticazione implicita

(Vengono implicitamente utilizzati username 'guest' e password 'guest'.)

Chiamata alla fn_retrieve_xml_p


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esse3.frk.kion.it"> <soapenv:Header/> <soapenv:Body> <ws:fn_retrieve_xml_p soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <retrieve xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">CLASSI</retrieve> <params xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">cla_m_id=3</params> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</xml> </ws:fn_retrieve_xml_p> </soapenv:Body> </soapenv:Envelope>

Risposta alla fn_retrieve_xml_p


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:fn_retrieve_xml_pResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.esse3.frk.kion.it"> <fn_retrieve_xml_pReturn href="#id0"/> <xml xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <![CDATA[<?xml version="1.0" encoding="Windows-1252"?> <WS> <DataSet LocalEntityName="CLASSI_WS"> <Row Num="1"> <cla_m_id>3</cla_m_id> <tipo_corso_cod>L2</tipo_corso_cod> <des>Classe delle lauree in Scienze della mediazione linguistica</des> <cod>5</cod> </Row> </DataSet> </WS> ]]> </xml> </ns1:fn_retrieve_xml_pResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef> </soapenv:Body> </soapenv:Envelope>