4

I'm getting this error while invoking a Webservice from Phonegap Android app.

01-13 23:49:52.219: E/Web Console(529): Uncaught TypeError: Cannot read property 'documentElement' of null at file:///android_asset/www/soapclient.js:158

Here is the relevant code:

var ns = (wsdl.documentElement.attributes["targetNamespace"] + "" == "undefined") ?
wsdl.documentElement.attributes.getNamedItem("targetNamespace").nodeValue :  
wsdl.documentElement.attributes["targetNamespace"].value;
Mark Veenstra
  • 4,691
  • 6
  • 35
  • 66
G.S
  • 257
  • 1
  • 4
  • 16
  • Looks like `wsdl.documentElement` is `null` from the error. So check how `wsdl` is set and if it has the property `documentElement` – Mark Veenstra Jun 18 '15 at 07:47

1 Answers1

1

it might because of cross Domain request, CORS so either you have to include it into your heades

Accept: Access-Control-Allow-Origin

OR also use

chrome.exe --disable-web-security

OR also you can install the chrome extenstion

Enable cors request extention in chrome

Hope it will help.

Ankit Balyan
  • 1,319
  • 19
  • 31