MapPoint web services RRS feed

  • Question

  • I am getting exception whenever I am trying to call FindServiceSoap.FindAddress method of Map Point web service.
    Exception is "Root element is missing"

    I am consuming web service through proxy and I added

    FindServiceSoap.Proxy = new WebProxy("", false, null, new System.Net.NetworkCredential("UserName", "Password", "Domain"));

    Even I enabled WSE3.0 still I am facing same error.

    My code sample is...................

      private void MakeAddress()
            Address objAddress = new Address();

            FindAddressSpecification objFindAddressSpecification = new FindAddressSpecification();
            FindServiceSoap objFindServiceSoap = new FindServiceSoap();
            //UserId and Password are in web.config file
            objFindServiceSoap.Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["UserID"], ConfigurationManager.AppSettings["Password"]);
            objFindServiceSoap.PreAuthenticate = true;
            //to bypass bypass firwall settings we have to assign proxy object
            //Please remove this if you are not using Proxy
            objFindServiceSoap.Proxy = new WebProxy("", false, null, new System.Net.NetworkCredential("prasham.ajmera", "agt@agt123", "ecomdomain.ag"));
            objAddress.CountryRegion = "US";
            objAddress.PrimaryCity = "New York";
            objFindAddressSpecification.DataSourceName = "MapPoint.NA";
            objFindAddressSpecification.InputAddress = objAddress;
            FindOptions objFindOptions = new FindOptions();
            FindRange objFindRange = new FindRange();
            objFindRange.Count = 3;
            objFindRange.StartIndex = 1;
            objFindOptions.Range = objFindRange;
            objFindAddressSpecification.Options = objFindOptions;
            //You will to connect to server at this point //Getting error at this line
            objFindResults = objFindServiceSoap.FindAddress(objFindAddressSpecification);
            Location objLocation = new Location();

            views = new ViewByHeightWidth[1];
            views[0] = objFindResults.Results[0].FoundLocation.BestMapView.ByHeightWidth;

    Friday, April 20, 2007 11:42 AM

All replies

  • Hi,


    I too  have faced this  problem many times while using Mapoint Service and found that this is one crazy problem when you are working behind a proxy or firewall. I tested the sample on a machine outside proxy and firewall and it just works perfect! Try it out.


    Thursday, April 26, 2007 5:20 AM
  • Same here . I did same thing and now its working perfectly but still i need some permenant solution for same.
    Sunday, May 6, 2007 2:02 PM

    Hey Guys,


    Have you been able to solve this problem?  I think I'm having the same issue using the findnearby

    Tuesday, October 23, 2007 1:47 PM