Select to view content in your preferred language

ArcGIS Viewer for Flex 2.4 - Geoprocessing widget

2993
13
07-30-2011 11:19 AM
PetraStrbenac
Deactivated User
Hi everyone,
I have just upgraded to the new version 2.4. I am really excited about Geoprocessing widget and other improvements!
I have already tried to create a Geoprocessing widget that will execute my geoprocessing service. I have copied .xlm file from existing geoprocessing widget and modified it to suite my geoprocessing service (changed task url, input and output parameters - I followed the widget documentation and was really carefull about syntax). I really found this easy to do but however I can't get rid of the application error #1104 (http response status: 200, fault code: Client.CouldNotDecode). I have looked it up (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/runtimeErrors.html?filter_flash=c...) and it seems like I have defined same attribute more then once for the same parameter (I checked code over and over again and I can't seem to find such a mistake) or is this pointing to something else?
Any help would be highly appreciated!
Petra
Tags (2)
0 Kudos
13 Replies
RobertScheitlin__GISP
MVP Emeritus
Petra,

   Post the XML that you modified.
0 Kudos
PetraStrbenac
Deactivated User
Hi Robert,

I have put xml in the attachment. Geoprocessing service is published on my server, it includes two input parameters (string and polygon) and has two output parameters - point and a polygon (as a result of this geoprocessing task two feature classes in my SDE database get modified - I have tried this through ArcGIS Server Web application and it works fine).
I was carefull to write names of parameters as is defined on the server (my geoprocessing service properties).
What am I doing wrong here?
Petra
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Petra,

   I can not find anything wrong in the XML file so the question is when do you get the client could not decode error? Do you get it immediately when you launch the widget? If that is the case have you checked to see if the you have the path to you xml file in the main config.xml is correct (Flex is case sensitive)?

<widget label="your GP widget"
                config="widgets/Geoprocessing/Geoprocessing_mywidget.xml"
                icon="assets/images/i_layers.png"
                url="widgets/Geoprocessing/GeoprocessingWidget.swf"/>
0 Kudos
PetraStrbenac
Deactivated User
Hi Robert,
yes, I get this error immediately when I launch the widget (my widget window is blank - there is just the title). I double cheked path to my xml and everything is correct. I cleared cash in my browser, I tried the application in several different browsers...but the error remains.
I even changed task url in my xml to point to another geoprocessing service (also published on my server) and I didn't even chage parameters (they are of course different for this service) just to see what will happen and I get the same error code 1104. I am running out of ideas... 😕
btw Thank you very much for helping me with this!

Petra
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Petra,

   I found the errors.

In your output params you have color listed twice on both outputs and you need a size param for a marker.

<outputparams>
        <param name="Locality_withcalculation"
               geometrytype="point"
               label="Locality"
               required="true"
               type="featurerecordset"
               visible="true">
            <renderer type="simple">
                <defaultsymbol alpha="0.5"
                               color="0xFF0000"
                               type="simplemarker"
                               color="0xFF0000"
                               size="15">
                    <outline width="2" color="0xFF0000"/>
                </defaultsymbol>
            </renderer>
        </param>
        <param name="Locality_extent"
               geometrytype="polygon"
               label="Locality extent"
               required="true"
               type="featurerecordset"
               visible="true">
            <renderer type="simple">
                <defaultsymbol alpha="0.5"
                               color="0xFF0000"
                               type="simplefill"
                               color="0xFF0000">
                    <outline width="2" color="0xFF0000"/>
                </defaultsymbol>
            </renderer>
        </param>
    </outputparams>
0 Kudos
PetraStrbenac
Deactivated User
Robert,
I will make the corretions as soon as I get the chance and I will let you know the results! THANK YOU!
Petra
0 Kudos
PetraStrbenac
Deactivated User
Robert,
I've made corrections to my code (color, size) and no more error - it works perfectly! :))
Thank you again very much! - I can't believe how many times I went through my code and couldn't see those mistakes...

Petra
0 Kudos
PetraStrbenac
Deactivated User
Robert,
I have one more question regarding geoprocessing widget - I saw that you can create a choice list for a string parameter. Is there a way for a choice list to be dynamicaly populated with values - to get values from a feature class published as a service. I would like to create a new geoprocessing widget where user choses input from a drop down list of already existing records?
Petra
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Petra,

   That is not available that I am aware of.
0 Kudos