jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了是否可以使用jquery获取跨域SOAP请求大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用 @L_675_0@来获取肥皂回复
但经过很多痛苦,我意识到不可能获得跨域xml http请求.
所以我决定转向jquery
现在我不需要代码
我只需要一些提示和确认,如果可能的话在jquery中
下面是我的js的代码
 var getmarket = new XMLhttprequest();
        getmarket.open(‘POST’,’http://www.betfair.com/publicapi/’,truE);

var m_request = '<soapenv:Envelope xmlns:soapenv="http://scheR_510_11845@as.xmlsoap.org/soap/envelope/" '+
                    'xmlns:bfex="http://www.betfair.com/publicapi/v5/BFExchangeservice/" '+
                    'xmlns:v5="http://www.betfair.com/publicapi/types/exchange/v5/">'+
                    ' <soapenv:Header/>'+
                    '<soapenv:Body>'+
                    '<bfex:getAllMarkets>'+
                    '<bfex:request>'+
                    '<header>'+
                       '<clientStamp>0</clientStamp>'+
                       '<sessionToken>Y9eTuEvlrTM55pbRB1kIj0As0bVvz3eFm+p1FY+svHk=</sessionToken>'+
                    '</header>'+
                    '<locale>en</locale>'+
                    '<eventTypEIDs>'+
                       '<v5:int>1</v5:int>'+
                    '</eventTypEIDs>'+
                    '<countries>'+
                       '<v5:Country>GBR</v5:Country>'+
                    '</countries>'+
                    '<fromDate>2012-08-23TO00:00:00.000Z</fromDate>'+
                    '<toDate>2012-08-24TO00:00:00.000Z</toDate>'+
                 '</bfex:request>'+
              '</bfex:getAllMarkets>'+
           '</soapenv:Body>'+
        '</soapenv:Envelope>';

    getmarket.onreadystatechange = function (){
        if (getmarket.readyState == 4 && getmarket.status == 200)
        document.write(getmarket.responseText);
        }

    getmarket.setrequestHeader('Content-Type','text/xml');
    getmarket.send(m_request);
    document.write(getmarket.responseText);

@L_772_6@

JQuery是Javascript的包装器.如果javascript不会这样做,JQuery也不会.您必须让服务器进行查找.

大佬总结

以上是大佬教程为你收集整理的是否可以使用jquery获取跨域SOAP请求全部内容,希望文章能够帮你解决是否可以使用jquery获取跨域SOAP请求所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。