Javascript SOAP信封错误

Javascript SOAP信封错误,javascript,jquery,soap,soapui,Javascript,Jquery,Soap,Soapui,您好,我是jQuery的新手,我刚刚用下面的代码测试了一个示例SOAP请求,但是我遇到了错误,这是因为服务器端还是我编写的代码错误,我是说语法。有人能帮我检查一下吗 <script type="text/javascript"> $(document).ready(function () { $("#btnCallWebService").click(function (event) { alert("get

您好,我是jQuery的新手,我刚刚用下面的代码测试了一个示例SOAP请求,但是我遇到了错误,这是因为服务器端还是我编写的代码错误,我是说语法。有人能帮我检查一下吗

<script type="text/javascript">
        $(document).ready(function () {
            $("#btnCallWebService").click(function (event) {

                alert("get ready");


                var soapMessage ='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">'+
                '<soapenv:Header>'+
                '<a:Action xmlns:a="http://www.w3.org/2005/08/addressing" soapenv:mustUnderstand="1">'+
                'http://xxx/xxxx/xxxx/accountSummary'+
                '</a:Action>'+
                '</soapenv:Header>'+
                '<soapenv:Body xmlns:ws="http://xx.xx.xxx.com/">'+
                   '<ws:accountSummary/>'+
                    '</soapenv:Body>'+
                '</soapenv:Envelope>'; 

            var url = "http://127.0.0.1/xxx/xxx/xxx/xx?wsdl";
            $.support.cors = true;
            $.ajax({
                type: "POST",
                url: url,
                crossDomain:true,
                dataType: "xml",
                processData: false,
                contentType: "text/xml; charset=\"utf-8\"",

                success: function (soapResponse) {
                    alert("success: " + soapResponse);

                },
                error: function (soapResponse) {
                    alert("Soap" + soapMessage);
                    alert("Failed: " + soapResponse);
                }

            });

            });    
            }); 
                    </script>

$(文档).ready(函数(){
$(“#btnCallWebService”)。单击(函数(事件){
警惕(“准备好”);
var soapMessage=''+
''+
''+
'http://xxx/xxxx/xxxx/accountSummary'+
''+
''+
''+
''+
''+
''; 
变量url=”http://127.0.0.1/xxx/xxx/xxx/xx?wsdl";
$.support.cors=true;
$.ajax({
类型:“POST”,
url:url,
跨域:是的,
数据类型:“xml”,
processData:false,
contentType:“text/xml;字符集=\“utf-8\”,
成功:函数(soapResponse){
警报(“成功:+soapResponse”);
},
错误:函数(soapResponse){
警报(“Soap”+soapMessage);
警报(“失败:+soapResponse”);
}
});
});    
}); 

您有一个名称空间前缀为
a
的soap调用,但是名称空间没有在soap调用中声明。@MarkVeenstra:刚刚编辑…请检查它
是否未关闭也更改它
@MarkVeenstra:是的,但是仍然得到错误。。代码语法是否正确的名称空间和标记?我遗漏了什么吗?你也遗漏了名称空间。试试看:w3.org/2005/08/addressing“>。。。