Coercion Error from geo Processor submitJob

641
10
05-24-2011 02:59 AM
AnthonyKeogh1
New Contributor III
Hi,

I am creating a widget in Flex 2.3.1 similar to the drivetimes example. The service I have to use only supports the Submit Job operation, its required parameters are :
Parameter: Input_Location Data Type: GPFeatureRecordSetLayer
Parameter: Drive_Distances__Miles_  Data Type: GPString.

I have created the following params object
        var params:Object = 
 {
         "Input_Location": featureSet,
  "Drive_Distances__Miles_": driveTimes
 };


where featureSet is a FeatureSet containing a Graphic and driveTimes is a String eg. "1 3 5".

I don't have any compile errors or any indication that anything is wrong, but when I click on the map and create the point once geoPro.submitJob(params) is called I get multiple Error #1034 Type Coercion failed messages:

cannot convert Object@2060b791 to flash.geom.Transform
cannot convert Object@2060f8a9 to flash.media.SoundTransform
cannot convert Object@2060b881 to com.esri.ags.symols.Symbol

Thanks for ANY help.
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Anthony,

   Those are not errors they are warnings and they have nothing to do with what you are attempting to do they are just common in the Flex Viewer. Are you saying that the job does not execute?
0 Kudos
AnthonyKeogh1
New Contributor III
Hi Robert,

Yeah, the update status method from the submitJob goes round about twice the second status being failed and then it goes to the complete method. From what I can tell nothing else is returned. I'm using flash builder and like a lot of people the debugging part isn't working correctly so I's using Firebug with the Flash plugin to trace what I can to try and find out why it's not working.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Anthony,

   GP Service errors are some of the most difficult to track down and debug... Does the GP work in ArcMap? There is alot of help documentation about what has to be done to allow your GP to be usable as a service for REST have you gone through that documentation?
0 Kudos
AnthonyKeogh1
New Contributor III
Robert,

The  service is from an existing Flex 1.3 widget, all I am really trying to do at the minute is port the widget to Flex 2.3.1. The original widget is from a custom flex viewer that was developed before ESRI released the actual flex viewer so quite a lot of the structuring is different but I was hoping if would have been fairly straight forward.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Anthony,

   If the GP Service was working in SFV 1.3 than it should work fine in 2.3.1 also. So your issue must be in the actual widget code conversion. Hmm... Not sure where to begin.
0 Kudos
AnthonyKeogh1
New Contributor III
I know what you mean Robert :D.

I didn't know that the flash errors reported in Firebug wouldn't be the cause of the problem so at least I know now that the problem must be in my implementation of the service.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Anthony,

   Is the GP service Public?
0 Kudos
AnthonyKeogh1
New Contributor III
Sorry but its not. I don't have permission to share it either.
0 Kudos
AnthonyKeogh1
New Contributor III
Im not quite sure why but Im getting a different error today :confused:

[FaultEvent fault=[RPC Fault faultString="Unable to complete  operation." faultCode="400" faultDetail="GPTask 'submitJob' does not exist or is inaccessible."] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]
0 Kudos