How to invoke methods on external server / webservice?

后端 未结 3 1912
無奈伤痛
無奈伤痛 2021-01-16 06:46

I\'m trying to invoke methods from http://www.ibanbic.be/IBANBIC.asmx

I have read a lot of forums and tutorials, but all the information is about setting up a webser

3条回答
  •  深忆病人
    2021-01-16 07:08

    based on their site http://www.ibanbic.be/IBANBIC.asmx?op=calculateIBAN1

    You can make a simple Ajax call like this:

    var ISOCountry = 'IT';
    var account = 'IT60 X054 2811 1010 0000 0123 456';
    var url = "http://www.ibanbic.be/IBANBIC.asmx?op=calculateIBAN1"
            jQuery.ajax({
                type: 'GET',
                url: url,
                timeout: 4000,
                data: {'ISOcountry':ISOCountry, 'account' : account},
                success: onSuccess,
                error: onError,
                dataType: 'json',
                complete: function() {
                }
            });
    }
    function onSuccess(data, textStatus, jqXHR) {
        // do something
    }
    function onError(jqXHR, textStatus, errorThrown) {
        // do something
    }
    

提交回复
热议问题