我得到XMLHttpRequest无法加载

时间:2015-02-25 12:57:24

标签: javascript xml xmlhttprequest

我得到XMLHttpRequest无法加载。如何删除此错误,请为此提出任何建议。
                                                                                                 

                    function soapRCA(){
             var productServiceUrl =           "https://www.ilportaledellautomobilista.it/eai/AreaVeicolo- ws/services/secure/coperturaRC";
       var tipoDiVettura = $('#tipoVeicolo').val();
            var targaperRCA = $('#targaRCA').val();

               var SoaMessage = '<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:Header>'+
        '<wsse:Security soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'+
            '<wsse:UsernameToken wsu:Id="XWSSGID-1253605895203984534550" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'+
                '<wsse:Username>paolo.pelliccione</wsse:Username>'+
                '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">tdlemon900mj</wsse:Password>'+ 
            '</wsse:UsernameToken>'+
        '</wsse:Security>'+
    '</soapenv:Header>'+
    '<soapenv:Body>'+ 
        '<CoperturaRCVeicoloSecureRequest xmlns="http://www.dtt.it/xsd/Veicolo">'+ 
            '<tipoVeicolo>'+tipoDiVettura+'</tipoVeicolo>'+
            '<targa>'+targaperRCA+'</targa>'+
        '</CoperturaRCVeicoloSecureRequest>'+
    '</soapenv:Body>'+ 
'</soapenv:Envelope>';

      $.ajax({
     url: productServiceUrl,
      type: "GET",
    dataType: "xml",
        data: SoaMessage,
     complete: showResult2,
           contentType: "text/xml; charset=\"utf-8\"",
     crossDomain: true,
      cache: false
     });

       return false;
        }

        function showResult2(xmlHttpRequest, status) {
        //alert('edew00');
        var data =  $(xmlHttpRequest.responseXML).find('#listMovimenti tbody');


     console.log(data);



      //alert('ecco data: '+JSON.stringify(data));

        /*var data = (''+response).substring((''+response).indexOf('<form                id="ListaCoperturaRCVeicolo"'),(''+response).length);
          data = data.substring(0,data.indexOf('</form>'));
         $('#targapage #fintoiframe').html(data);

          var ris = $('#targapage       #fintoiframe').find('#ListaCoperturaRCVeicolo').html();
       $('#targapage #risultatorcaEsterna').html(ris);  */          


       }



       </script>

0 个答案:

没有答案