SOAP信封错误

时间:2014-05-26 12:22:10

标签: javascript jquery soap soapui

您好我是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>

0 个答案:

没有答案