Select to view content in your preferred language

GeocodeServer "reference not set to an instance of an object"

2834
3
12-06-2010 05:36 AM
KyleDixon
Deactivated User
I'm trying to implement a GeocodeServer locator in a flex application and I get error:

[RPC Fault faultString="Server Error - Object reference not set to an instance of an object." faultCode="500" faultDetail=""]

<esri:Locator id="locateTask"
             url="http://[internal IP]/ArcGIS/rest/services/shelby/Shelby_Locator/GeocodeServer"/>

When I paste the url in a browser I get a blank page, which I think is expected, when I remove "/rest" and add "?wsdl" I get a proper wsdl response.

I copied the code from http://help.arcgis.com/en/webapi/flex/samples/index.html... Geometry Service.... Determine spatial relationships. I am replacing the different services with our own.

I'm using ArcServer 9.3.1
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Kyle,

   When you paste http://[internal IP]/ArcGIS/rest/services/shelby/Shelby_Locator/GeocodeServer in a browser you definitely should get a page with info on it. Have you tried to see if pasting http://[internal IP]/ArcGIS/rest/services in a browser brings anything up?
0 Kudos
KyleDixon
Deactivated User
That did show the service, when I drilled down to it, it was working. I had changed some permissions in C:\arcgisserver\arcgiscache working on something else, that probably fixed it.

BUT, now I'm getting:
[RPC Fault faultString="The required address fields must be specified to find address candidates" faultCode="400" faultDetail="Required field '<i>Street or Intersection</i>' must be specified"]

I'm assuming I need to change the field details in the FLEX call. Different locator style maybe
0 Kudos
KyleDixon
Deactivated User
That was it, I had to change :

    var myAddress:Object = {
     Address: address.text,
      City: city.text,
      State: state.text,
      Zip: zip.text,
      Country: country.selectedItem
    };
to
    var myAddress:Object = {
     Street: address.text,
      Zone: zip.text
    };

So... the correct answer was to change permissions in C:\arcgisserver\arcgiscache, I granted read/write to agsadmin.
0 Kudos