From: Miloš Mulač Date: Tue, 6 Sep 2005 12:19:50 +0000 (+0000) Subject: test client simulate UpdateJob (for testing purposes) X-Git-Tag: gridsite-core_R_1_1_11~35 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=2833f64cf9680321705ebd0a53c82195b0be7366;p=jra1mw.git test client simulate UpdateJob (for testing purposes) --- diff --git a/org.glite.jp.index/examples/jpis-test.c b/org.glite.jp.index/examples/jpis-test.c index d18240f..3116ad5 100644 --- a/org.glite.jp.index/examples/jpis-test.c +++ b/org.glite.jp.index/examples/jpis-test.c @@ -76,11 +76,47 @@ int main(int argc,char *argv[]) // test calls of server functions { // this call is issued by JPPS + struct jptype__jobRecord *rec; struct _jpelem__UpdateJobs in; struct _jpelem__UpdateJobsResponse out; memset(&in, 0, sizeof(in)); memset(&out, 0, sizeof(out)); + + in.feedId = soap_strdup(soap, "12345"); + in.feedDone = false_; + in.__sizejobAttributes = 1; + in.jobAttributes = soap_malloc(soap, + in.__sizejobAttributes * sizeof(*(in.jobAttributes))); + { + rec = soap_malloc(soap, sizeof(*rec)); + rec->jobid = soap_strdup(soap, "https://localhost:7846/pokus"); + rec->__sizeprimaryStorage = 0; + rec->primaryStorage = NULL; + rec->__sizeattributes = 2; + rec->attributes = soap_malloc(soap, + rec->__sizeattributes * sizeof(*(rec->attributes))); + rec->attributes[0] = soap_malloc(soap, sizeof(*(rec->attributes[0]))); + rec->attributes[0]->name = soap_strdup(soap, "owner"); + rec->attributes[0]->value = soap_malloc(soap, sizeof(*(rec->attributes[0]->value))); + rec->attributes[0]->value->string = soap_strdup(soap, "Ja"); + rec->attributes[0]->value->blob = NULL; + rec->attributes[0]->timestamp = 333; + rec->attributes[0]->origin = jptype__attrOrig__USER; + rec->attributes[0]->originDetail = NULL; + + rec->attributes[1] = soap_malloc(soap, sizeof(*(rec->attributes[1]))); + rec->attributes[1]->name = soap_strdup(soap, "status"); + rec->attributes[1]->value = soap_malloc(soap, sizeof(*(rec->attributes[0]->value))); + rec->attributes[1]->value->string = soap_strdup(soap, "Done"); + rec->attributes[1]->value->blob = NULL; + rec->attributes[1]->timestamp = 333; + rec->attributes[1]->origin = jptype__attrOrig__USER; + rec->attributes[1]->originDetail = NULL; + + } + in.jobAttributes[0] = rec; + check_fault(soap, soap_call___jpsrv__UpdateJobs(soap,server,"",&in,&out)); } diff --git a/org.glite.jp.index/src/db_ops.c b/org.glite.jp.index/src/db_ops.c index 1c95a9d..7deb103 100644 --- a/org.glite.jp.index/src/db_ops.c +++ b/org.glite.jp.index/src/db_ops.c @@ -1,6 +1,7 @@ #ident "$Header$" #include +#include /* Find first unitialized feed, lock it and return URL of corresponding PS * @@ -11,7 +12,7 @@ int glite_jpis_lockUninitializedFeed(char **PS_URL) { - return 0; + return ENOENT; } diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c index 6fbe550..592ee77 100644 --- a/org.glite.jp.index/src/soap_ops.c +++ b/org.glite.jp.index/src/soap_ops.c @@ -71,6 +71,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__UpdateJobs( struct _jpelem__UpdateJobs *jpelem__UpdateJobs, struct _jpelem__UpdateJobsResponse *jpelem__UpdateJobsResponse) { + // XXX: test client in examples/jpis-test + // sends to this function some data for testing puts(__FUNCTION__); return SOAP_OK; }