daemon:=glite-jp-indexd
examples:=glite-jpis-test glite-jpis-client
test:=run-test.sh
-test_files:=dump1.sql simple_query.in simple_query.out complex_query.in complex_query.out authz.out
+test_files:=dump1.sql simple_query.in simple_query.out complex_query.in complex_query.out authz.out jobid_query.in jobid_query.out
MANS1:=glite-jpis-client.1
MANS8:=glite-jp-indexd.8
MANS:=${MANS1} ${MANS8}
<indexedAttrs>http://egee.cesnet.cz/en/Schema/JP/System:jobId</indexedAttrs>
<indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</indexedAttrs>
<indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:CE</indexedAttrs>
+ <indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</indexedAttrs>
<!-- List of type plugins -->
<plugins></plugins>
echo -n Starting glite-jp-indexd ...
#su " $GLITE_LOCATION/bin/glite-jp-indexd \
su - $GLITE_USER -c " $GLITE_LOCATION/bin/glite-jp-indexd \
- -s $GLITE_JPIS_PS $GLITE_JPIS_DEBUG \
+ $GLITE_JPIS_DEBUG \
-q $GLITE_JPIS_QT $creds $GLITE_JPIS_AUTH \
-m $GLITE_JPIS_DB -p $GLITE_JPIS_PORT \
-i $GLITE_JPIS_PIDFILE -o $GLITE_JPIS_LOGFILE \
<arg>--help</arg>
</group></arg>
- <arg><group choice='plain'>
- <arg>-s</arg>
- <arg>--ps-server</arg>
- </group> <replaceable>HOST:PORT</replaceable></arg>
-
<arg>-d</arg>
<arg><group choice='plain'>
<arg>--logfile</arg>
</group> <replaceable>FILE.LOG</replaceable></arg>
+ <arg><group choice='plain'>
+ <arg>-x</arg>
+ <arg>--config</arg>
+ </group> <replaceable>CONFIG.XML</replaceable></arg>
+
</cmdsynopsis>
</refsynopsisdiv>
File to store logs (default: <filename>/var/run/glite-jp-indexd.log</filename> or <filename>$HOME/glite-jp-indexd.log</filename>).
</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-x</option>|<option>--config</option></term>
+ <listitem><para>
+Configuration file containing information about feeds, primary storages, ... Structure is defined in <filename>server_conf.xsd</filename>.
+ </para></listitem>
+ </varlistentry>
</variablelist>
<para>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
+#include <stdlib.h>
#include <stdsoap2.h>
#include <glite/security/glite_gsplugin.h>
#define soap_serialize__jpisclient__QueryJobsResponse soap_serialize__jpelem__QueryJobsResponse
#define DEFAULT_JPIS "http://localhost:8902"
+//#define USE_GMT 1
/* namespaces[] not used here but needed to prevent linker to complain... */
struct jptype__attrValue *attr;
int i, j, k;
+#if USE_GMT
+ setenv("TZ","UTC",1); tzset();
+#endif
fprintf(out, "Result %d jobs:\n", in->__sizejobs);
for (j=0; j<in->__sizejobs; j++) {
fprintf(out, "\tjobid = %s, owner = %s\n", in->jobs[j]->jobid, in->jobs[j]->owner);
{
glite_jp_db_stmt_t stmt;
glite_jp_context_t ctx;
- glite_jpis_context_t isctx;
+ glite_jpis_context_t isctx = NULL;
glite_jp_is_conf *conf;
glite_jp_init_context(&ctx);
glite_jp_get_conf(argc, argv, NULL, &conf);
+ if (!conf) {
+ fprintf(stderr, "Can't gather configuration\n");
+ goto end;
+ }
if (default_server) strcpy(server, default_server);
else snprintf(server, sizeof(server), "http://localhost:%s", conf->port ? conf->port : GLITE_JPIS_DEFAULT_PORT_STR);
printf("JP index server: %s\n", server);
http://egee.cesnet.cz/en/Schema/LB/Attributes:user
OK
-<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"><jobs><jobid>https://localhost:7846/pokus1</jobid><owner>/O=CESNET/O=Masaryk University/CN=Milos Mulac</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Done</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs><jobs><jobid>https://localhost:7846/pokus2</jobid><owner>OwnerName</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Ready</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs></jpisclient:QueryJobsResponse>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"><jobs><jobid>https://localhost:7846/pokus1</jobid><owner>/O=CESNET/O=Masaryk University/CN=Milos Mulac</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Done</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>FILE</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>FILE</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs><jobs><jobid>https://localhost:7846/pokus2</jobid><owner>OwnerName</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Ready</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>SYSTEM</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>SYSTEM</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs></jpisclient:QueryJobsResponse>
/*!40000 ALTER TABLE `attr_9892f81a8175c09bd00afcb152f510ad` DISABLE KEYS */;
LOCK TABLES `attr_9892f81a8175c09bd00afcb152f510ad` WRITE;
-INSERT INTO `attr_9892f81a8175c09bd00afcb152f510ad` VALUES ('593e62a063231f8c623b74406b3e12b0','S:CertSubj','S:CertSubj',1),('9276789a0093ad44457655ef03ade36a','S:CertSubj','S:CertSubj',2);
+INSERT INTO `attr_9892f81a8175c09bd00afcb152f510ad` VALUES ('593e62a063231f8c623b74406b3e12b0','CertSubj','S:3601:F::CertSubj',1),('9276789a0093ad44457655ef03ade36a','CertSubj','S:3601:S::CertSubj',2);
UNLOCK TABLES;
/*!40000 ALTER TABLE `attr_9892f81a8175c09bd00afcb152f510ad` ENABLE KEYS */;
/*!40000 ALTER TABLE `attr_a1e9e0a1b7943cc041fefb5da65868f9` DISABLE KEYS */;
LOCK TABLES `attr_a1e9e0a1b7943cc041fefb5da65868f9` WRITE;
-INSERT INTO `attr_a1e9e0a1b7943cc041fefb5da65868f9` VALUES ('593e62a063231f8c623b74406b3e12b0','S:Done','S:Done',1),('9276789a0093ad44457655ef03ade36a','S:Ready','S:Ready',1);
+INSERT INTO `attr_a1e9e0a1b7943cc041fefb5da65868f9` VALUES ('593e62a063231f8c623b74406b3e12b0','Done','S:3601:F::Done',1),('9276789a0093ad44457655ef03ade36a','Ready','S:3601:S::Ready',1);
UNLOCK TABLES;
/*!40000 ALTER TABLE `attr_a1e9e0a1b7943cc041fefb5da65868f9` ENABLE KEYS */;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<jpisclient:QueryJobs xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient">
+
+ <conditions>
+ <attr>http://egee.cesnet.cz/en/Schema/JP/System:jobId</attr>
+ <record>
+ <op>EQUAL</op>
+ <value>
+ <string>https://localhost:7846/pokus1</string>
+ </value>
+ </record>
+ </conditions>
+
+ <attributes>http://egee.cesnet.cz/en/Schema/JP/System:owner</attributes>
+ <attributes>http://egee.cesnet.cz/en/Schema/JP/System:jobId</attributes>
+ <attributes>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</attributes>
+ <attributes>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</attributes>
+
+</jpisclient:QueryJobs>
--- /dev/null
+query: using JPIS http://localhost:12002
+
+Conditions:
+ http://egee.cesnet.cz/en/Schema/JP/System:jobId
+ == https://localhost:7846/pokus1
+Attributes:
+ http://egee.cesnet.cz/en/Schema/JP/System:owner
+ http://egee.cesnet.cz/en/Schema/JP/System:jobId
+ http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus
+ http://egee.cesnet.cz/en/Schema/LB/Attributes:user
+
+OK
+<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"><jobs><jobid>https://localhost:7846/pokus1</jobid><owner>/O=CESNET/O=Masaryk University/CN=Milos Mulac</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Done</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>FILE</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>FILE</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs></jpisclient:QueryJobsResponse>
GLITE_JPIS_TEST_PORT=${GLITE_JPIS_TEST_PORT:-"10000"}
GLITE_JPIS_TEST_PIDFILE=${GLITE_JPIS_TEST_PIDFILE:-"/tmp/glite-jp-indexd.pid"}
GLITE_JPIS_TEST_LOGFILE=${GLITE_JPIS_TEST_LOGFILE:-"/tmp/glite-jp-indexd.log"}
+ GLITE_JPIS_TEST_CONFIG=${GLITE_JPIS_TEST_CONFIG:-"$GLITE_LOCATION/etc/glite-jpis-config.xml"}
if [ -z "$GLITE_JPIS_TEST_DB" ]; then
GLITE_JPIS_TEST_DB="jpis/@localhost:jpis1test"
# run index server
X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \
$GLITE_LOCATION/bin/glite-jp-indexd -m $GLITE_JPIS_TEST_DB -p $GLITE_JPIS_TEST_PORT \
- -i ${GLITE_JPIS_TEST_PIDFILE} -o ${GLITE_JPIS_TEST_LOGFILE} $1\
+ -i ${GLITE_JPIS_TEST_PIDFILE} -o ${GLITE_JPIS_TEST_LOGFILE} \
+ -x ${GLITE_JPIS_TEST_CONFIG} $1\
2>/dev/null
X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \
$GLITE_LOCATION/examples/glite-jpis-client -f xml -q $1 \
-i http://localhost:$GLITE_JPIS_TEST_PORT &>/tmp/result
- DIFF=`diff --ignore-matching-lines="query: using JPIS" $2 /tmp/result`
+ DIFF=`diff -b --ignore-matching-lines="query: using JPIS" $2 /tmp/result`
if [ -z "$DIFF" -a "$?" -eq "0" ] ; then
echo "OK."
rm /tmp/result
run_test_feed() {
# run the example
numok=`X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT}\
- $GLITE_LOCATION/examples/glite-jpis-test -p $GLITE_JPIS_TEST_PORT -m $GLITE_JPIS_TEST_DB `
+ $GLITE_LOCATION/examples/glite-jpis-test -p $GLITE_JPIS_TEST_PORT \
+ -m $GLITE_JPIS_TEST_DB -x $GLITE_JPIS_TEST_CONFIG | grep -c OK`
if [ "$numok" -eq "2" ]; then
echo OK.
else
run_is;
import_db $GLITE_LOCATION/examples/query-tests/dump1.sql;
run_test_query $GLITE_LOCATION/examples/query-tests/simple_query.in $GLITE_LOCATION/examples/query-tests/authz.out;
-drop_db;
kill_is;
-
+echo -n "Query jobId test........... "
+create_db;
+run_is "-n";
+import_db $GLITE_LOCATION/examples/query-tests/dump1.sql;
+run_test_query $GLITE_LOCATION/examples/query-tests/jobid_query.in $GLITE_LOCATION/examples/query-tests/jobid_query.out;
+drop_db;
+kill_is;
http://egee.cesnet.cz/en/Schema/LB/Attributes:user
OK
-<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"><jobs><jobid>https://localhost:7846/pokus2</jobid><owner>OwnerName</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Ready</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1969-12-31T23:00:00Z</timestamp><origin>SYSTEM</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs></jpisclient:QueryJobsResponse>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"><jobs><jobid>https://localhost:7846/pokus2</jobid><owner>OwnerName</owner><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</name><value><string>Ready</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>SYSTEM</origin></attributes><attributes><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</name><value><string>CertSubj</string></value><timestamp>1970-01-01T02:00:01Z</timestamp><origin>SYSTEM</origin></attributes><primaryStorage>http://localhost:8901</primaryStorage></jobs></jpisclient:QueryJobsResponse>
void glite_jpis_free_context(glite_jpis_context_t ctx) {
+ if (!ctx) return;
free(ctx->hname);
free(ctx);
}
// attrs table and attrid_* tables
attrs = ctx->conf->attrs;
i = 0;
- while (attrs[i]) {
+ if (attrs) while (attrs[i]) {
type_full = glite_jp_attrval_db_type_full(jpctx, attrs[i]);
type_index = glite_jp_attrval_db_type_index(jpctx, attrs[i], INDEX_LENGTH);
if (glite_jp_db_prepare(jpctx, "INSERT INTO feeds (state, locked, source, condition) VALUES (?, ?, ?, ?)", &stmt, param, NULL) != 0) goto fail;
feeds = ctx->conf->feeds;
i = 0;
- while (feeds[i]) {
+ if (feeds) while (feeds[i]) {
state = (feeds[i]->history ? GLITE_JP_IS_STATE_HIST : 0) |
(feeds[i]->continuous ? GLITE_JP_IS_STATE_CONT : 0);
locked = 0;
#include "glite/jp/context.h"
#include "glite/jp/strmd5.h"
#include "glite/jp/attr.h"
+#include "glite/jp/known_attr.h"
#include "glite/lb/trio.h"
#include "jpis_H.h"
for (k=0; k < in->__sizeconditions; k++) {
for (j=0; j < i; j++) {
- if (!strcmp(in->conditions[k]->attr, indexed_attrs[j])) {
+ char *attr = in->conditions[k]->attr;
+ if (!strcmp(attr, GLITE_JP_ATTR_JOBID) || !strcmp(attr, indexed_attrs[j])) {
ret = 0;
goto end;
}
else
*/
{
- attr_md5 = str2md5(in->conditions[i]->attr);
- trio_asprintf(&qa,"%s jobs.jobid = attr_%|Ss.jobid AND (",
- (i ? "AND" : ""), attr_md5);
-
+ if (strcmp(in->conditions[i]->attr, GLITE_JP_ATTR_JOBID) == 0) {
+ /* no subset from attr_ table, used jobs table instead */
+ attr_md5 = NULL;
+ qa = strdup("(");
+ } else {
+ /* select given records in attr_ table */
+ attr_md5 = str2md5(in->conditions[i]->attr);
+ trio_asprintf(&qa,"%s jobs.jobid = attr_%|Ss.jobid AND (",
+ (i ? "AND" : ""), attr_md5);
+ }
+
+ /* inside part of the condition - ORs */
for (j=0; j < in->conditions[i]->__sizerecord; j++) {
if (get_op(in->conditions[i]->record[j]->op, &qop)) goto err;
- add_attr_table(attr_md5, &attr_tables);
+ if (attr_md5) add_attr_table(attr_md5, &attr_tables);
+ attr.name = in->conditions[i]->attr;
if (in->conditions[i]->record[j]->value->string) {
- attr.name = in->conditions[i]->attr;
attr.value = in->conditions[i]->record[j]->value->string;
attr.binary = 0;
- glite_jpis_SoapToAttrOrig(soap,
- in->conditions[i]->origin, &(attr.origin));
- trio_asprintf(&qb,"%s%sattr_%|Ss.value %s \"%|Ss\"",
- qa, (j ? " OR " : ""), attr_md5, qop,
- glite_jp_attrval_to_db_index(ctx->jpctx, &attr, 255));
- free(qop);
- free(qa); qa = qb; qb = NULL;
- }
- else {
- attr.name = in->conditions[i]->attr;
+ } else {
attr.value = in->conditions[i]->record[j]->value->blob->__ptr;
- attr.binary = 1;
attr.size = in->conditions[i]->record[j]->value->blob->__size;
- glite_jpis_SoapToAttrOrig(soap,
- in->conditions[i]->origin, &(attr.origin));
- trio_asprintf(&qb,"%s %s attr_%|Ss.value %s \"%|Ss\"",
- qa, (j ? "OR" : ""), attr_md5, qop,
+ attr.binary = 1;
+ }
+ glite_jpis_SoapToAttrOrig(soap,
+ in->conditions[i]->origin, &(attr.origin));
+ if (strcmp(in->conditions[i]->attr, GLITE_JP_ATTR_JOBID) == 0) {
+ trio_asprintf(&qb,"%s%sjobs.dg_jobid %s \"%|Ss\"",
+ qa, (j ? " OR " : ""), qop, attr.value);
+ } else {
+ trio_asprintf(&qb,"%s%sattr_%|Ss.value %s \"%|Ss\"",
+ qa, (j ? " OR " : ""), attr_md5, qop,
glite_jp_attrval_to_db_index(ctx->jpctx, &attr, 255));
- free(qop);
- free(qa); qa = qb; qb = NULL;
}
+ free(qop);
+ free(qa); qa = qb; qb = NULL;
}
trio_asprintf(&qb,"%s %s)", qwhere, qa);
free(qa); qwhere = qb; qb = NULL; qa = NULL;
{
glite_jp_attrval_t jav;
struct jptype__attrValue **av = NULL;;
- //enum jptype__attrOrig *origin;
+ enum jptype__attrOrig *origin;
char *query, *fv, *jobid_md5, *attr_md5;
int i, ret;
glite_jp_db_stmt_t stmt;
else {
av[i]->value->string = soap_strdup(soap, jav.value);
}
-// XXX: load timestamp and origin from DB
-// need to add columns to DB
-// av[i]->timestamp = jav.timestamp;
-// glite_jpis_AttrOrigToSoap(soap, jav.origin, &origin);
-// av[i]->origin = *origin; free(origin);
-// av[i]->originDetail = soap_strdup(soap, jav.origin_detail);
+ av[i]->timestamp = jav.timestamp;
+ glite_jpis_AttrOrigToSoap(soap, jav.origin, &origin);
+ av[i]->origin = *origin; soap_dealloc(soap, origin);
+ av[i]->originDetail = soap_strdup(soap, jav.origin_detail);
i++;
freeAttval_t(jav);