ker/mod/tfw.web-service.js
function callWebService( name, args, url ) {
    return new Promise(
        function( resolve, reject ) {
            svc( name, args, url ).then(
                resolve,
                function( err ) {
                    if ( typeof err === 'object' && err.id === exports.BAD_ROLE ) {
                        // Echec de connexion, on retente de se connecter avant d'abandonner.
                        login().then(
                            function() {
                                svc( name, args, url ).then( resolve, reject );
                            },
                            reject
                        );
                    } else {
                        reject( err );
                    }
                }
            );
        }
    );
}
function callWebService( name, args, url ) {
    return new Promise(
        function( resolve, reject ) {
            svc( name, args, url ).then(
                resolve,
                function( err ) {
                    if ( typeof err === 'object' && err.id === exports.BAD_ROLE ) {
                        // Echec de connexion, on retente de se connecter avant d'abandonner.
                        login().then(
                            function() {
                                svc( name, args, url ).then( resolve, reject );
                            },
                            reject
                        );
                    } else {
                        reject( err );
                    }
                }
            );
        }
    );
}
function callWebService ( name , args , url ) { return new Promise ( function ( resolve , reject ) { svc ( name , args , url ) . then ( resolve , function ( err ) { if ( typeof err === 'object' && err . id === exports . BAD_ROLE ) { // Echec de connexion, on retente de se connecter avant d'abandonner. login ( ) . then ( function ( ) { svc ( name , args , url ) . then ( resolve , reject ) ; } , reject ) ; } else { reject ( err ) ; } } ) ; } ) ; }
Call a webservice.
Call a webservice .