build with gsoap 2.7 too
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 15 Oct 2004 12:19:28 +0000 (12:19 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 15 Oct 2004 12:19:28 +0000 (12:19 +0000)
org.glite.jp.primary/Makefile
org.glite.jp.primary/examples/jpps-test.c
org.glite.jp.primary/project/configure.properties.xml
org.glite.jp.primary/src/is_client.c
org.glite.jp.primary/src/jptype_map.h [new file with mode: 0644]
org.glite.jp.primary/src/simple_server.c
org.glite.jp.primary/src/soap_ops.c

index 65c6380..94e6663 100644 (file)
@@ -31,7 +31,7 @@ GLOBUS_LIBS:=-L${globus_prefix}/lib \
 
 DEBUG:=-g -O0  -DDEBUG
 
-CFLAGS:=${DEBUG} -I. -I${gsoap_prefix}/include -I${stagedir}/include
+CFLAGS:=${DEBUG} -I. -I${top_srcdir}/src -I${gsoap_prefix}/include -I${stagedir}/include
 LDFLAGS:=-L${stagedir}/lib
 
 LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
@@ -44,9 +44,15 @@ example:=jpps-test
 ps_prefix:=jpps_
 is_prefix:=jpis_
 
+gsoap_version=`${gsoap_prefix}/bin/soapcpp2 -version 2>&1 | cut -d' ' -f4 | perl -F\\\\. -nae '$$F[2] =~ s/\D*$$//; print $$F[2]+100*$$F[1]+10000*$$F[0]'`
+
+CFLAGS+=-DGSOAP_VERSION=${gsoap_version}
+
+
 SRCS:= simple_server.c soap_ops.c \
        ftp_backend.c \
        feed.c tags.c\
+       is_client.c \
        ${ps_prefix}ServerLib.c \
        ${is_prefix}ClientLib.c \
        env_C.c
@@ -64,10 +70,10 @@ default all: compile
 compile: ${daemon} ${example}
 
 ${daemon}: ${OBJS}
-       ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GLOBUS_LIBS}
+       ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GLOBUS_LIBS} 
 
 ${example}: ${EXA_OBJS}
-       ${LINK} -o $@ ${EXA_OBJS}
+       ${LINK} -o $@ ${EXA_OBJS} 
 
 JobProvenanceIS.xh JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat
        cp  ${jpproject}/JobProvenanceTypes.wsdl .
@@ -92,6 +98,7 @@ env_C.c env_Server.c:
 #
 
 
+simple_server.o: ${is_prefix}H.h ${ps_prefix}H.h
 
 check: 
        -echo nothing yet
index 60c9c5f..4121605 100644 (file)
@@ -6,6 +6,8 @@
 #include "jpps_H.h"
 #include "jpps_.nsmap"
 
+#include "jptype_map.h"
+
 static void usage(const char *me)
 {
        fprintf(stderr,"%s: [-s server-url] operation args \n\n"
@@ -42,7 +44,11 @@ static int check_fault(struct soap *soap,int err) {
                        fputs(reason,stderr);
                        putc(10,stderr);
                        assert(detail->__type == SOAP_TYPE__GenericJPFault);
+#if GSOAP_VERSION >=20700
+                       f = ((struct _GenericJPFault *) detail->fault)
+#else
                        f = ((struct _GenericJPFault *) detail->value)
+#endif
                                -> jptype__GenericJPFault;
 
                        while (f) {
index 7efa935..93bb310 100644 (file)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.1.1.1  2004/10/15 09:49:24  akrenek
+       
+       
        Revision 1.1  2004/09/14 12:33:31  ljocha
        *** empty log message ***
        
@@ -55,6 +58,7 @@ glite_location=${with.glite.location}
 globus_prefix=${with.globus.prefix}
 expat_prefix=${with.expat.prefix}
 ares_prefix=${with.ares.prefix}
+gsoap_prefix=${with.gsoap.prefix}
 thrflavour=${with.globus.thr.flavor}
 nothrflavour=${with.globus.nothr.flavor}
 cppunit=${with.cppunit.prefix}
index cc594db..1a50c03 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "feed.h"
 #include "jpis_H.h"
+#include "jpis_.nsmap"
 
 int glite_jpps_single_feed(
                glite_jp_context_t ctx,
@@ -21,7 +22,7 @@ int glite_jpps_single_feed(
        printf("feed to %s, job %s\n",destination,job);
 
        /* FIXME: check fault */
-       soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
+       // soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
 
 
        return 0;
diff --git a/org.glite.jp.primary/src/jptype_map.h b/org.glite.jp.primary/src/jptype_map.h
new file mode 100644 (file)
index 0000000..6df0828
--- /dev/null
@@ -0,0 +1,16 @@
+#if GSOAP_VERSION >= 20700
+#define INPUT_SANDBOX  jptype__UploadClass__INPUT_SANDBOX
+#define OUTPUT_SANDBOX jptype__UploadClass__OUTPUT_SANDBOX
+#define JOB_LOG        jptype__UploadClass__JOB_LOG
+
+#define OWNER jptype__AttributeType__OWNER
+#define TIME jptype__AttributeType__TIME
+#define TAG jptype__AttributeType__TAG
+
+#define EQUAL jptype__QueryOp__EQUAL
+#define UNEQUAL jptype__QueryOp__UNEQUAL
+#define LESS jptype__QueryOp__LESS
+#define GREATER jptype__QueryOp__GREATER
+#define WITHIN jptype__QueryOp__WITHIN
+#endif
+
index 110c10c..a620988 100644 (file)
@@ -2,8 +2,8 @@
 #include "glite/jp/context.h"
 
 #include "jpps_H.h"
-#include "jpps_.nsmap"
-#include "jpis_.nsmap"
+
+extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[];
 
 int main() {
    struct soap soap;
index 305f650..19cc22b 100644 (file)
@@ -7,6 +7,9 @@
 #include "feed.h"
 
 #include "jpps_H.h"
+#include "jpps_.nsmap"
+
+#include "jptype_map.h"
 
 static struct jptype__GenericJPFaultType *jp2s_error(struct soap *soap,
                const glite_jp_error_t *err)
@@ -34,7 +37,11 @@ static void err2fault(const glite_jp_context_t ctx,struct soap *soap)
        f->jptype__GenericJPFault = jp2s_error(soap,ctx->error);
 
        detail->__type = SOAP_TYPE__GenericJPFault;
+#if GSOAP_VERSION >= 20700
+       detail->fault = f;
+#else
        detail->value = f;
+#endif
        detail->__any = NULL;
 
        soap_receiver_fault(soap,"Oh, shit!",NULL);