if (stat.children) edg_wll_add_strlist_to_XMLBody(&pomB, stat.children, "children", "jobId", "\t\t\t", NULL);
if (stat.children_hist) edg_wll_add_intlist_to_XMLBody(&pomB, stat.children_hist, "children_hist", edg_wll_StatToString, "\t\t\t", 1, stat.children_hist[0]);
if (stat.children_states) edg_wll_add_stslist_to_XMLBody(ctx, &pomB, stat.children_states, "children_states", "", EDG_WLL_JOB_UNDEF);
- if (stat.user_tags) edg_wll_add_taglist_to_XMLBody(&pomB, stat.user_tags, "user_tags", "tag", "name", "\t\t\t", NULL);
+ if (stat.user_tags) edg_wll_add_usertag_to_XMLBody(&pomB, stat.user_tags, "user_tags", "tag", "name", "\t\t\t", NULL);
if (stat.stateEnterTimes) edg_wll_add_intlist_to_XMLBody(&pomB, stat.stateEnterTimes, "stateEnterTimes", edg_wll_StatToString, "\t\t\t",1, stat.stateEnterTimes[0]);
pomC = edg_wll_StatToString(stat.state);
if (stat.children) edg_wll_add_strlist_to_XMLBody(&pomB, stat.children, "children", "jobId", "\t\t\t", NULL);
if (stat.children_hist) edg_wll_add_intlist_to_XMLBody(&pomB, stat.children_hist, "children_hist", return_string_el, "\t\t\t", 1, stat.children_hist[0]);
if (stat.children_states) edg_wll_add_stslist_to_XMLBodyV21(ctx, &pomB, stat.children_states, "children_states", "", EDG_WLL_JOB_UNDEF);
- if (stat.user_tags) edg_wll_add_taglist_to_XMLBody(&pomB, stat.user_tags, "user_tags", "tag", "name", "\t\t\t", NULL);
+ if (stat.user_tags) edg_wll_add_usertag_to_XMLBody(&pomB, stat.user_tags, "user_tags", "tag", "name", "\t\t\t", NULL);
if (stat.stateEnterTimes) edg_wll_add_intlist_to_XMLBody(&pomB, stat.stateEnterTimes, "stateEnterTimes", return_string_el, "\t\t\t",1, stat.stateEnterTimes[0]);
pomC = edg_wll_StatToString(stat.state);
};
$source = "$src->$native_en.$native_fn";
$dest = "VALUEEV_GET($dst, $soap_en)->$soap_fn";
-# print STDERR "$src, $dst, $soap_en, $soap_fn, $native_fn, $tn, $usuc\n";
+ print STDERR "$src, $dst, $soap_en, $soap_fn, $native_fn, $tn, $usuc\n";
if ($tn eq 'int') {
if ($f->{codes}) {
gen $indent."$dest = soap_malloc(soap, sizeof(*$dst->$soap_fn));\n";
gen $indent."$dest->tag = soap_strdup(soap, $source.tag);\n";
gen $indent."$dest->value = soap_strdup(soap, $source.value);\n";
+ } elsif ($tn eq 'taglist') {
+ gen qq{
+! {
+! struct lbt__tagValue *t;
+! int i;
+!
+! for (i=0; $source && $source\[i].tag; i++);
+! /* GLITE_SECURITY_GSOAP_LIST_CREATE(soap, $dst, $soap_en.$soap_fn, struct lbt__tagValue, i); */
+! GLITE_SECURITY_GSOAP_LIST_CREATE0(soap, $dest, VALUEEV_GET($dst,$soap_en)->__size$soap_fn, struct lbt__tagValue, i);
+! for (i=0; $source && $source\[i].tag; i++) {
+! t = GLITE_SECURITY_GSOAP_LIST_GET($dest, i);
+! t->tag = soap_strdup(soap,$source\[i].tag);
+! t->value = soap_strdup(soap,$source\[i].value);
+! }
+! }
+};
+
} else {
die "Unknown type $tn";
}
gen $indent." if ($dest->value) soap_dealloc(soap, $dest->value);\n";
gen $indent." soap_dealloc(soap, $dest);\n";
gen $indent."}\n";
+ } elsif ($tn eq 'taglist') {
+ gen qq{
+! if($dest) {
+! struct lbt__tagValue *t;
+! int i;
+!
+! for(i=0; i < VALUEEV_GET($dst, $soap_en)->__size$soap_fn; i++) {
+! t = GLITE_SECURITY_GSOAP_LIST_GET($dest, i);
+! if(t->tag) soap_dealloc(soap, t->tag);
+! if(t->value) soap_dealloc(soap, t->value);
+! }
+! GLITE_SECURITY_GSOAP_LIST_DESTROY0(soap, $dest, VALUEEV_GET($dst, $soap_en)->__size$soap_fn);
+! }
+ };
} else {
die "Unknown type $tn";
}
my $f = selectField $event $_;
my $fn = $f->{name};
my $ftn = $f->getType;
+ my $type = $f->{type};
+ my $list = 'no';
+ if ($main::baseTypes{$type}) {
+ $ftn = eval $main::types{wsdl}->{$main::baseTypes{$type}};
+ $list = 'yes'
+ }
$fn = $1.ucfirst $2 while $fn =~ /([[:alpha:]]*)_([[:alpha:]_]*)/;
$ftn = $tn . '_' . $fn if ($f->{codes});
my $comment = getComment $f;
my $opt = $f->{optional} ? 'yes' : 'no';
- gen qq{\t\t\t\t<elem name="$fn" type="$ftn" optional="$opt">$comment</elem>
+ gen qq{\t\t\t\t<elem name="$fn" type="$ftn" list="$list" optional="$opt">$comment</elem>
};
}
gen "</struct>\n\n";