title: SOAP Service call using Google Apps Scripts produces error
body: <p>I'm currently using Google Apps Scripts to call a simple SOAP service call. However, I keep getting an error. Does anyone have an example I could use or possibly see what's wrong with my code? My code is below:</p>
  
  <pre><code>function onOpen()
  {
  
  
      var ss = SpreadsheetApp.getActiveSpreadsheet();
        var sheet = ss.getSheets()[0];
        var myValue = Browser.inputBox("Enter an IP address to trace:"); 
  
        var b1Range = sheet.getRange("B1");
        b1Range.setValue(myValue);
  
        determineCountryFromIP(myValue);
  
  
  }
  
  
  
  function determineCountryFromIP(ipAddress) {
  
          var wsdl = SoapService.wsdl("http://www.webservicex.net/geoipservice.asmx?  wsdl");
          var geoService = wsdl.getGeoIPService();
  
          var param = Xml.element("GetGeoIP", [
                        Xml.attribute("xmlns", "http://www.webservicex.net"),
                        Xml.element("IPAddress", [
                          ipAddress
                        ])
                      ]);
  
          var result = geoService.GetGeoIP(param);
          return result.Envelope.Body.GetGeoIPResponse.GetGeoIPResult.CountryCode.Text;
        }
  </code></pre>