SRCS:= conf.c bones_server.c soap_ops.c soap_ps_calls.c \
ws_ps_typeref.c ws_is_typeref.c db_ops.c context.c common_server.c \
${is_prefix}Server.c ${is_prefix}C.c\
- ${ps_prefix}ClientLib.c \
+ ${ps_prefix}ClientLib.c
EXA_TEST_SRCS:=jpis-test.c ${is_prefix}C.c ${is_prefix}Client.c context.c db_ops.c conf.c ws_is_typeref.c
EXA_DB_SRCS:=jpis-db-internal.c db_ops.c conf.c context.c ws_is_typeref.c
-EXA_CLIENT_SRCS:=jpis-client.c ${is_client_prefix}C.c ${is_client_prefix}Client.c
+EXA_CLIENT_SRCS:=jpis-client.c common.c \
+ ${is_client_prefix}C.c ${is_client_prefix}Client.c
# ${is_prefix}C.c
OBJS:=${SRCS:.c=.o}
#include "soap_version.h"
#include "jpis_client_.nsmap"
+#include "common.h"
/* 'jpisclient' as future namespace */
* read the XML query
*/
static int query_recv(struct soap *soap, int fd, struct _jpisclient__QueryJobs *qj) {
+ int i;
+
memset(qj, 0, sizeof(*qj));
soap->recvfd = fd;
soap_end_recv(soap);
soap_free(soap); /* don't destroy the data we want */
+ /* strip white-space characters from attributes */
+ for (i = 0; i < qj->__sizeattributes; i++)
+ glite_jpis_trim_soap(soap, &qj->attributes[i]);
+ for (i = 0; i < qj->__sizeconditions; i++)
+ glite_jpis_trim_soap(soap, &qj->conditions[i]->attr);
+
return 0;
}
--- /dev/null
+#ident "$Header$"
+
+#include <string.h>
+#include <stdsoap2.h>
+
+#include "common.h"
+
+#define WHITE_SPACE_SET "\n\r \t"
+
+
+void glite_jpis_trim_soap(struct soap *soap, char **soap_str) {
+ size_t pos, len;
+ char *s;
+
+ if (!*soap_str) return;
+
+ pos = strspn(*soap_str, WHITE_SPACE_SET);
+ len = strcspn(*soap_str + pos, WHITE_SPACE_SET);
+ s = soap_malloc(soap, len + 1);
+ memcpy(s, *soap_str + pos, len);
+ s[len] = '\0';
+
+ soap_dealloc(soap, *soap_str);
+ *soap_str = s;
+}
--- /dev/null
+#ident "$Header$"
+
+#ifndef GLITE_JPIS_COMMON_H
+#define GLITE_JPIS_COMMON_H
+
+void glite_jpis_trim_soap(struct soap *soap, char **soap_str);
+
+#endif
glite_jp_query_rec_t **out)
{
glite_jp_query_rec_t *qr;
- int i;
assert(in); assert(out);