# -I/usr/include/libxml2 \
# -DNO_VOMS -DNO_GACL to be removed when voms/gridsite are available
-CFLAGS:= -DNO_VOMS -DNO_GACL ${WS_CFLAGS} \
- ${DEBUG} -I${stagedir}/include -I${top_srcdir}/src -I. \
+CFLAGS:= -DNO_VOMS -DNO_GACL \
+ ${WS_CFLAGS} ${DEBUG} \
+ -DVERSION=\"${version}\" \
+ -I${stagedir}/include -I${top_srcdir}/src -I. \
-I${expat_prefix}/include \
-I${ares_prefix}/include \
-I${gsoap_prefix}/include \
${CXX} -c ${CFLAGS} ${TEST_INC} $<
${LINKXX} -o $@ test_soap_conv.o ${WS_CLIENT_OBJS} ${WS_CLIENT_LIBS} ${COMMON_LIB} ${TEST_LIBS}
-examples: ws_jobstat ws_query_ex
+examples: ws_getversion ws_jobstat ws_query_ex
+
+ws_getversion: ws_getversion.o ${WS_CLIENT_OBJS}
+ ${LINK} -o $@ ws_getversion.o ${WS_CLIENT_OBJS} ${WS_CLIENT_LIBS} ${EXT_LIBS}
ws_jobstat: ws_jobstat.o ${WS_CLIENT_OBJS}
${LINK} -o $@ ws_jobstat.o ${WS_CLIENT_OBJS} ${WS_CLIENT_LIBS} ${EXT_LIBS}
--- /dev/null
+#include <getopt.h>
+#include <stdsoap2.h>
+
+#include "glite/lb/consumer.h"
+
+#include "ws_plugin.h"
+#include "bk_ws_H.h"
+
+static struct option opts[] = {
+ {"help", 0, NULL, 'h'},
+ {"server", 1, NULL, 'm'},
+};
+
+static void usage(char *me)
+{
+ fprintf(stderr,"usage: %s [option]\n"
+ "\t-h, --help Shows this screen.\n"
+ "\t-m, --server BK server address:port.\n"
+ , me);
+}
+
+static void printstat(edg_wll_JobStat stat, int level);
+
+int main(int argc,char** argv)
+{
+ edg_wll_Context ctx;
+ struct soap *mydlo = soap_new();
+ struct edgwll2__GetVersionResponse out;
+ int opt, err;
+ char *server = "http://localhost:8999/",
+ *name = NULL;
+
+
+ name = strrchr(argv[0],'/');
+ if (name) name++; else name = argv[0];
+
+ while ((opt = getopt_long(argc, argv, "hm:", opts, NULL)) != EOF) switch (opt)
+ {
+ case 'h': usage(name); return 0;
+ case 'm': server = strdup(optarg); break;
+ case '?': usage(name); return 1;
+ }
+
+ edg_wll_InitContext(&ctx);
+
+ if ( soap_register_plugin_arg(mydlo, edg_wll_ws_plugin, (void *)ctx) )
+ {
+ soap_print_fault(mydlo, stderr);
+ return 1;
+ }
+
+ switch (err = soap_call_edgwll2__GetVersion(mydlo, server, "", &out))
+ {
+ case SOAP_OK: printf("Server version: %s\n", out.version); break;
+ case SOAP_FAULT:
+ default: printf("???\n");
+ }
+
+ return 0;
+}
<element name="GenericLBFault" type="glitenstypes:GenericLBFaultType"/>
</schema>
</WSDL:types>
+ <message name="GetVersionRequest">
+ </message>
+ <message name="GetVersionResponse">
+ <part name="version" type="xsd:string"/>
+ </message>
<message name="JobStatusRequest">
<part name="jobid" type="xsd:string"/>
<part name="flags" type="glitenstypes:JobStatFlags"/>
</message>
<portType name="LoggingAndBookkeeping_PortType">
+ <operation name="GetVersion">
+ <documentation>Query the version of LB servere
+
+Input: no input
+
+Output: Version of LB server
+
+Faults: GenericLBFault
+ </documentation>
+ <input name="i" message="tns:GetVersionRequest"/>
+ <output name="o" message="tns:GetVersionResponse"/>
+ <fault name="f" message="tns:GenericLBFault"/>
+ </operation>
<operation name="JobStatus">
<documentation>Retrieve state of a single job.
</portType>
<binding name="LoggingAndBookkeeping" type="tns:LoggingAndBookkeeping_PortType">
<SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="GetVersion">
+ <SOAP:operation style="rpc"/>
+ <input name="i">
+ <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/lb"/>
+ </input>
+ <output name="o">
+ <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/lb"/>
+ </output>
+ <fault name="f">
+ <SOAP:fault name="f" use="literal"/>
+ </fault>
+ </operation>
<operation name="JobStatus">
<SOAP:operation style="rpc"/>
<input name="i">
#include "ws_typeref.h"
+int edgwll2__GetVersion(
+ struct soap *soap,
+ struct edgwll2__GetVersionResponse *out)
+{
+ out->version = strdup(VERSION);
+
+ return SOAP_OK;
+}
+
int edgwll2__JobStatus(
struct soap *soap,
char *jobid,