Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How would I get messages back from my GP Service to the silverlight client? I am passing the gp service some data to process and I want to have the gp service give some respone that the silverlight client would interpret and message to the user. Would a json response to do this.

By the way I still haven't figure out how to get the gp service instances' unique arcgisjobs folder id. I imagine I'll have to have the json data there as the silverlight client would be subscribing to arcgis sever at that spot.

**EDIT:

Per comments below, I do now know how to get the unique scratch space in the arcgisjobs folder. To clarify my question:

I am setting a result parameter in the python gp-service, a featureset, for the sl client to pick up. I would like to also give some verbal details back to the sl client to dialogue to the user. Along the lines of:

"Your two points calculated a percent slope of {percentSlope}" -- comes from python script

Do I set another output parameter in my python script as a txt file and have the sl client iterate through the results parameters and find the featureset and do A and then find the txt file and read it and do B? Thanks.

geoprocessorTask.GetResultDataCompleted += (s1, ev1) =>
            {
                GraphicsLayer graphicsLayer = MyMap.Layers["ReturnedGraphicsLayer"] as GraphicsLayer;

                if (ev1.Parameter is GPFeatureRecordSetLayer)
                {
                    GPFeatureRecordSetLayer gpLayer = ev1.Parameter as GPFeatureRecordSetLayer;
                    if (gpLayer.FeatureSet.Features.Count == 0)
                    {
share|improve this question
    
I had a similar question some time ago with a Flex client, so see if this is relevant to your question: gis.stackexchange.com/questions/18464/… –  Baskinomics Mar 9 '12 at 17:13
1  
Thanks Sean, combing through your code answered another of my questions about %SCRATCHWORKSPACE% in gp services. –  Justin Mar 9 '12 at 18:34
    
Glad to be of help. I wasn't entirely clear what you were asking in this question or the comment on mine, but if you could clarify your question (maybe with some code) I could post a real, direct answer. Then we could call it case-closed ;) –  Baskinomics Mar 10 '12 at 19:22
    
See edits Sean. Thanks. –  Justin Mar 11 '12 at 18:35
    
I would recommend returning the result as an output parameter and then doing some coding on the client side to output it in the desired format. It would be more useful for me to see the Python script. I have enough programming experience (w/ ESRi web APIs) to understand what you're doing with the Silverlight code, but without knowing what you're GP task is doing I cannot offer any more insight. –  Baskinomics Mar 12 '12 at 19:55
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.