我正在尝试从 javascript 发布网络服务。我正在使用这个测试网络服务来发布。但是如果我查看萤火虫,我会得到以下异常:
XML parsing error: syntax error Location: moz-nullprincipal:{9e8dc1d9-98d5-48f5-9106-5a19cb9ca7aa} Column: 1, Row: 1:
Reload the page to get source for: http://www.w3schools.com/webservices/tempconv...
^
我的代码如下所示:
   var xmlhttp = new XMLHttpRequest();
        xmlhttp.open('POST', 'http://www.w3schools.com/webservices/tempconvert.asmx',   true);
        // build SOAP request
        var sr =
            '<soapenv:Envelope' + 
                'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
                'xmlns:api="http://127.0.0.1/Integrics/Enswitch/API" ' +
                'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
                'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">' +
                '<soapenv:Body>' +
                    '<CelsiusToFahrenheit    xmlns="http://tempuri.org/">' +
                    '<Celsius>44</Celsius>' +
                    '</CelsiusToFahrenheit>'+
                '</soapenv:Body>' +
            '</soapenv:Envelope>';
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
                    alert('done use firebug to see response');
                }
            }
        }
        // Send the POST request
        xmlhttp.setRequestHeader('Content-Type', 'text/xml');
        xmlhttp.send(sr);
        // send request
        // ...
你有什么想法吗?