Ignore:
Timestamp:
Sep 24, 2010, 5:11:43 AM (14 years ago)
Author:
djay
Message:

ZOO-Kernel updates and bug fixes :

  • Fixing gestion of RawDataOutput? when the Service return SERVICE_FAILED an ExceptionReport? was returned to the client.
  • Use gcc when compiling service_internal.c to avoid strange error messages about switch ....
  • Function setMapInMaps was added in service.h to let users set the value of a specific map in a maps.
  • Fixing JavaScript? issue during the context destruction process.
  • Use the GetStatus? ZOO Service when it is available on the local installation for statusLocation.
  • Add some comments for ServiceStarted?, ServiceSucceeded?, ServiceFailed? and ServiceAccepted?.
  • Dynamic creation of a lenv maps in the main configuration file maps, containing the current status and a sid (Service ID). Those informations can be used later by the GetStatus? Service to let user check the on-going status during the Service runs.
  • Function updateStatus was added to service_internal.h which let the Services developers set the current percentCompleted value.

ZOO-Service updates and bug fixes :

  • Add GetStatus? Service and its demo longProcess Service. All are in the wps_status.zo Services Provider.
  • Use the setMapInMaps in the base-vect-ops code to enhance readibility.

ZOO-API updates :

  • Add the function ZOO.UpdateStatus? to the ZOO JavaScript? API which simply point on ZOOUpdateStatus which can be called as-is from JavaScript?. Use : ZOOUpdateStatus(conf,value) where conf is the main configuration file maps and value the the value of the current status.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service_internal_js.c

    r9 r26  
    2323 */
    2424
    25 #include "service_internal_js.h"
     25#include "service_internal.h"
    2626
    2727static char dbg[1024];
     
    7474  if (!JS_DefineFunction(cx, global, "ZOORequest", JSRequest, 4, 0))
    7575    return 1;
     76  if (!JS_DefineFunction(cx, global, "ZOOUpdateStatus", JSUpdateStatus, 2, 0))
     77    return 1;
    7678
    7779  /* Your application code here. This may include JSAPI calls
     
    8284  map* tmpm1=getMap(request,"metapath");
    8385  map* tmpm2=getMap(s->content,"serviceProvider");
    84   char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+6];
    8586  char ntmp[1024];
    8687  getcwd(ntmp,1024);
     88  char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2];
    8789  sprintf(filename,"%s/%s%s",ntmp,tmpm1->value,tmpm2->value);
     90  filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+1]=0;
     91  fprintf(stderr,"FILENAME %s\n",filename);
    8892  struct stat file_status;
    8993  stat(filename, &file_status);
     
    203207
    204208  /* Cleanup. */
    205   // The JS_MaybeGC call imply segmentation fault
    206   //JS_MaybeGC(cx);
    207209  JS_DestroyScript(cx, script);
     210  JS_MaybeGC(cx);
    208211  // If we use the DestroyContext as requested to release memory then we get
    209212  // issue getting back the main configuration maps after coming back to the
     
    387390#endif
    388391      if(res!=NULL){
     392#ifdef JS_DEBUG
    389393        fprintf(stderr,"%s - %s\n",JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
     394#endif
    390395        addToMap(res,JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
    391396      }
     
    394399        res->next=NULL;
    395400      }
     401#ifdef JS_DEBUG
    396402      dumpMap(res);
     403#endif
    397404    }
    398405  }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png