Select to view content in your preferred language

Help Configuring Search Widget Louisville.xml to utilize own data error

860
5
09-01-2010 11:00 PM
JayDira
Emerging Contributor
Hello,
Im tring to configure the search widget louisvill.xml to utilize our own services/ data, but we get an error:
[RPC Fault faultString='Unable to complete operation" faultCode="400" faultDetail="Invalid URL"]

Here is our code. Any suggestions to resolve this?
Thanks.

<?xml version="1.0" ?>
<configuration>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
    <layers>
        <layer>
            <name>Parcels Number</name>
            <url>http://gistest/ArcGIS/rest/services/Parcels/MapServer</url>
            <expression>AIN '%[value]%'</expression>
            <textsearchlabel>Search by Parcel ID  [ Example: 181001490000 ]:</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Parcels</graphicalsearchlabel>
            <fields>AIN</fields>
            <titlefield>AIN</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Parcel Owner</name>
            <url>http://gistest/ArcGIS/rest/services/Parcels/MapServer</url>
            <expression>C_OWNERS '%[value]%'</expression>
            <textsearchlabel>Search Parcel Owner by name... [ Example: Joe Smith ]</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Parcels</graphicalsearchlabel>
            <fields>C_OWNERS</fields>
            <titlefield>C_OWNERS</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Parcel Address</name>
            <url>http://gistest/ArcGIS/rest/services/Parcels/MapServer</url>
            <expression>SITUS1 LIKE '%[value]%'</expression>
            <textsearchlabel>Search Parcel Address... [ Example: 123 Grand ]</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Parcels</graphicalsearchlabel>
            <fields>SITUS1</fields>
            <titlefield>SITUS1</titlefield>
            <linkfield></linkfield>
        </layer>
    </layers>
    <zoomscale>1000</zoomscale>
</configuration>
Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Dira,

  In your first two query expressions you are missing the operator

<expression>AIN '%[value]%'</expression>


you need to add LIKE

<expression>AIN LIKE '%[value]%'</expression>


<expression>C_OWNERS LIKE '%[value]%'</expression>
0 Kudos
JayDira
Emerging Contributor
Dira,

  In your first two query expressions you are missing the operator

<expression>AIN '%[value]%'</expression>


you need to add LIKE

<expression>AIN LIKE '%[value]%'</expression>


<expression>C_OWNERS LIKE '%[value]%'</expression>




Thanks Robert,
I have included "like" to the code and I still recieve that error.
Any suggestions.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
JR,

   OK, I did not notice that you were missing the layer designation from your url in the config file.
you have:
http://gistest/ArcGIS/rest/services/Parcels/MapServer

you need:
http://gistest/ArcGIS/rest/services/Parcels/MapServer/0

Where 0 is the number of the layer that you will be searching. This number comes from your REST Services directory.
0 Kudos
JayDira
Emerging Contributor
JR,

   OK, I did not notice that you were missing the layer designation from your url in the config file.
you have:
http://gistest/ArcGIS/rest/services/Parcels/MapServer

you need:
http://gistest/ArcGIS/rest/services/Parcels/MapServer/0

Where 0 is the number of the layer that you will be searching. This number comes from your REST Services directory.


Thanks Robert...That did the trick. I appreciate your time and help.
You did a great job on your Flexsite and I'm trying to do something simular to yours. I notice that on ArcGIS.com/ code gallery-your application is in the configurable application section. This may be a silly question but is your application available for download.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
JR,

   Yep has the section that we have to put flex app in called configurable leads to some questioning of "Can I download the source for this?". The configurable apps section has to options one is show what you have done and can do with the Flex API and another option is to actually attach code and have it downloaded. My site code is not available. It is highly customized and specific for my data and the asp.net web services that it consumes. I have shared many portions of my site in these forums though and will continue to do so when the FlexViewer is released in version 2.1.
0 Kudos