Click here to Skip to main content
16,013,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Uncaught TypeError: Cannot read property 'documentElement' of null
JavaScript
<script type ="text/javascript">
        function CallSingle() {
            debugger;
            var xml = new XMLHttpRequest();
            var p1 = new SOAPClientParameters();
            var id = document.getElementById("tbId").value;
            var name = document.getElementById("tbName").value;
            var url = "http://localhost:58810/Service1.svc?wsdl";
            xml.open('GET', url, true);
            xml.send();
            SOAPClient.invoke(url, "HelloWorld", p1, true, GetSingleObject_callBack);
        }

        function GetSingleObject_callBack(r) {
            document.getElementById("result1").innerHTML = r;
        }
</script>


I am getting this error on line number 158 of soapclient.js which I downloaded from internet
I am using wcf services.
I am sorry if any information is missing but I will be tracking this issue.
Posted
Comments
OriginalGriff 14-Dec-12 8:36am    
And any idea which one might be related to Line 158? Because I haven't!
[no name] 14-Dec-12 10:20am    
can you add the error here that you are getting at your end at line number 158.
Ammar4556257 17-Dec-12 3:12am    
Uncaught TypeError: Cannot read property 'documentElement' of null
the code is downloaded from
http://www.guru4.net/articoli/javascript-soap-client/en/
and the code where I got error is
SOAPClient._sendSoapRequest = function(url, method, parameters, async, callback, wsdl)
{
// get namespace
var ns = (wsdl.documentElement.attributes["targetNamespace"] + "" == "undefined") ? wsdl.documentElement.attributes.getNamedItem("targetNamespace").nodeValue : wsdl.documentElement.attributes["targetNamespace"].value;
athrey21 21-Dec-12 6:45am    
HI i am facing the same issue.
did yo get any solution for this? if so can u pls share?
Ammar4556257 21-Dec-12 7:43am    
No I used Jquery to access the service
http://www.codeproject.com/Articles/132809/Calling-WCF-Services-using-jQuery
http://pranayamr.blogspot.com/2010/12/steps-to-call-wcf-service-using-jquery.html

visit the provided links
and follow them carefully

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900