Select to view content in your preferred language

Error using enhanced search widget

3046
8
08-29-2011 11:23 AM
LisaArnold
Deactivated User
I am using Robert's Enhanced Search Widget v 2.4.0. I have used this before several times and have configured it successfully before but am getting an error which I can't seem to resolve.

When I type in a search term in the widget for my GNIS layer I receive the error "RPC Fault falutString="Unable to complete operation." faultCode="400" faultDetail="Unable to complete Query operation."

Here's is the relevant piece from my XML file.
<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Geographic Names (GNIS 2008)</name>
   <url>http://gis-web.heritage.unm.edu/ArcGIS/rest/services/DataMgmt/nmbccCollaborator/MapServer/0</url>
   <expressions>
    <expression alias="Feature_Name" textsearchlabel="Search by feature name" field="Feature_Name">upper(Feature_Name) LIKE upper('[value]%')</expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select collection points</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Feature_Name</titlefield>
   <fields all="false">
    <field name="Feature_Name" alias="Feature_Name" gridfield="true"/>
    <field name="Map_Name" alias ="Map_Name" gridfield="true"/>
    <field name="Class" alias ="Class" gridfield="true"/>
   </fields>
   <linkfield></linkfield>
   <icon isfield="false"></icon>
   <zoomscale usegeometry="true"/>
   <autoopendatagrid>true</autoopendatagrid>
  </layer>


If anybody sees what I'm missing please let me know. Thanks for the help!
Tags (2)
0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
Lisa,

     The issue with this layer is that it looks like it has IIS directory security enabled. When I attempt to use the url provided I am asked to provide a user name and password.
0 Kudos
LisaArnold
Deactivated User
Hi Robert,

I accidentally copied the wrong example. But with you pointing out the security I realized I had the wrong url in there. I updated it and all is well with that search now.

On the one with security, we are trying out some security measures. We have enabled IIS security on the service I had linked previously. We are accessing the service in the main config.xml file by putting the user name and pw in the url for the layer. This is working in that the data will display on the web page, and I can identify the attributes with the identify pop-up. However when I try to simply put the url with the user and password into the search widget, I get the following error when trying to use the search widget: [RPC Fault faultString="Error #2032" faultCode="null" faultDetail="null"]

I know you don't work with secured services, and this is a somewhat unorthodox approach, but if you have any ideas on this let me know.

Thanks as always!
0 Kudos
deleted-user-5p-YLCr5BQRy
Deactivated User
Hi Everyone

I am getting this error as well (see attached) then trying to search by the street name.  The field I am searching contains only the street names for each feature, all in CAPS.  The search by ID on the same layer works fine...

The street name is pulled from a joined table, 2 joins deep (this process works on all other features setup so far with advanced search, accept that the upper command does not work on a select few layers for an un-known reason)

Here is the code in my SearchWidget.xml file.

 <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
            <name>Sewer Nodes</name>
            <url>http://dev4/ArcGIS/rest/services/Daniels_Utilities2/MapServer/2</url>
 <expressions>
  <expression alias="ID" textsearchlabel="Search Asset ID [ Example: 00378]:">GISADMIN.SEWERNODE.UNIQUEID like '[value]%'</expression>
  <expression alias="Street" textsearchlabel="Search Asset Location [ Example: MAIN (CAPS ONLY!!)             Warning: Search is VERY SLOW!]:">STNAME LIKE '[value]%'</expression>
 </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select an asset</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>THESEARCH</titlefield>
            <linkfield linkprefix="" linksuffix=""></linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
            <fields all="false">
  <field name="GISADMIN.SEWERNODE.UNIQUEID" alias="Unique ID" gridfield="true"/>
  <field name="GISADMIN.SEWERNODE.FCODE" alias="Feature Code" gridfield="true"/>
  <field name="STNAME" alias="Street Name" gridfield="true" />
  <field name="ADDRQUAL" alias="Qualifier" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.YRINSTAL" alias="Year Installed" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.COVTYPE" alias="Cover Type" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.OWNER" alias="Owner" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.ICD" alias="Contains ICD?" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.GNECK" alias="Contains Gooseneck?" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.CBCLEAN" alias="Catch Basin Cleaning" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.FLAPGATE" alias="Has Flapgate?" gridfield="true" />
  <field name="GISADMIN.SEWERNODE.NOTES" alias="Notes" gridfield="true" /> 
 </fields>
   <zoomscale usegeometry="true">5000</zoomscale>
   <autoopendatagrid>true</autoopendatagrid>
        </layer>
0 Kudos
HaroldFleet
Emerging Contributor
Hi all,

I am running into the same Error #2032 faultCode="null" faultDetail="null".  I have the Services Directory on ArcGIS Server disabled and this error appears.  When I enable the Services Directory, the eSearch widget v2.5.0.5 runs fine.  I would like to keep the Services Directory disabled, so I'm just wondering if there is a solution to this error or is the simple solution to leave the services directory enabled?

Thanks,

Harold
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Harold,

   This is a new one for me.... I will have to do some testing and see what I can come up with.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   I am not sure why I did not respond to your post earlier, but here is what I would try. Attempt to perform this exact query at the REST Service directory, adding each of the fields and using the LIKE expression just like you have configured.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Harold,

   This is a known issue as seen here:

http://forums.arcgis.com/threads/21607-When-Service-directory-is-disabled-then-not-able-to-query-wit...

The workaround is to set the layers useamf to false as seen here:

<layer>
            <useamf>false</useamf>
            <definitionexpression/>
            <name>Weather Obs</name>
            <enableexport>true</enableexport> 
            <url>http://gislap134/ArcGIS/rest/services/Weather_Obs/MapServer/0</url> 
            <expressions>
                <expression alias="all" textsearchlabel="blah blah">1=1</expression> 
            </expressions>
            .............
0 Kudos
HaroldFleet
Emerging Contributor
Works great.

Thank you again.

Harold
0 Kudos