EXA_SRCS:=jpps-test.c ${ps_prefix}C.c ${ps_prefix}Client.c
-OBJS:=${SRCS:.c=.o} stdsoap2.o
-EXA_OBJS:=${EXA_SRCS:.c=.o} stdsoap2.o
+OBJS:=${SRCS:.c=.o}
+EXA_OBJS:=${EXA_SRCS:.c=.o}
COMMONLIB:=-lglite_jp_common
+GSOAPLIB:=-L${gsoap_prefix}/lib -lgsoap${GSOAP_DEBUG}
default all: compile
compile: ${daemon} ${example}
${daemon}: ${OBJS}
- ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GLOBUS_LIBS}
+ ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GSOAPLIB} ${GLOBUS_LIBS}
${example}: ${EXA_OBJS}
- ${LINK} -o $@ ${EXA_OBJS}
+ ${LINK} -o $@ ${EXA_OBJS} ${GSOAPLIB}
JobProvenanceIS.xh JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat
cp ${jpproject}/JobProvenanceTypes.wsdl .
" StartUpload jobid class(0,1,2) commit_before mimetype\n"
" CommitUpload\n"
" RecordTag\n"
- " GetJob\n"
+ " GetJob jobid\n"
" FeedIndex destination query_number history continuous\n"
,me);
{
printf("FeedId: %s\nExpires: %s\n",r.feedId,ctime(&r.expires));
}
+ } else if (!strcasecmp(argv[1],"GetJob")) {
+ struct jpsrv__GetJobResponse r;
+
+ if (argc != 3) usage(argv[0]);
+
+ if (!check_fault(soap,soap_call_jpsrv__GetJob(soap,server,"",
+ argv[2],&r)))
+ {
+ printf("JobLog:\t%s\nInput:\t%s\nOutput:\t%s\nTags:\t%s\n",
+ r.jobLog,r.inputSandbox,r.outputSandbox,r.tags);
+ }
+
}
else usage(argv[0]);
}
/* matched completely */
- /* FIXME: dont' call it yet
- return glite_jpps_single_feed(ctx,feed->destination,job,attrs); */
+ return glite_jpps_single_feed(ctx,feed->destination,job,attrs);
return 0;
}
/* TODO: really call JP Index server (via interlogger) */
printf("feed to %s, job %s\n",destination,job);
- /* FIXME: check fault */
- // soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
-
+ if (soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
+ /* FIXME: feedId */ "",
+ /* FIXME: UpdateJobsData */ NULL,
+ 0,
+ NULL
+ )) fprintf(stderr,"UpdateJobs: %s %s\n",ctx->other_soap->fault->faultcode,
+ ctx->other_soap->fault->faultstring);
return 0;
}
soap.user = (void *) ctx;
-/* not yet client of JPIS
ctx->other_soap = soap_new();
soap_init(ctx->other_soap);
soap_set_namespaces(ctx->other_soap,jpis__namespaces);
-*/
srand48(time(NULL)); /* feed id generation */
{ GLITE_JP_FILECLASS_UNDEF, NULL, NULL }
};
- int i;
+ int i,gotone = 0;
glite_jp_error_t err;
for (i=0; tab[i].type; i++) {
switch (glite_jppsbe_get_job_url(ctx,job,tab[i].type,&url)) {
case 0: *tab[i].url = soap_strdup(soap,url);
free(url);
+ gotone = 1;
break;
case ENOENT:
*tab[i].url = NULL;
return SOAP_FAULT;
}
}
+
+ if (!gotone) {
+ glite_jp_clear_error(ctx);
+ err.code = ENOENT;
+ err.source = __FUNCTION__;
+ err.desc = "No file found for this job";
+ glite_jp_stack_error(ctx,&err);
+ err2fault(ctx,soap);
+ glite_jp_clear_error(ctx);
+ return SOAP_FAULT;
+ }
return SOAP_OK;
}