From 98491120eb80115c497d584d1186a0686aee7b8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Thu, 17 Feb 2005 15:40:48 +0000 Subject: [PATCH] First attempt to generate LB.wsdl from LB's internal .T structure definitions - only JobStatus operation implemented so far - passes through wsdl2h - untested otherwise - breaks LB server compilation (obviously) - install & stage still uses hand-written LB.wsdl --- org.glite.lb.ws-interface/Makefile | 16 +- org.glite.lb.ws-interface/build.xml | 10 ++ .../project/version.properties | 2 +- org.glite.lb.ws-interface/src/LB.xml.T | 127 ++++++++++++++++ org.glite.lb.ws-interface/src/puke-wsdl.xsl | 167 +++++++++++++++++++++ 5 files changed, 320 insertions(+), 2 deletions(-) create mode 100644 org.glite.lb.ws-interface/src/LB.xml.T create mode 100644 org.glite.lb.ws-interface/src/puke-wsdl.xsl diff --git a/org.glite.lb.ws-interface/Makefile b/org.glite.lb.ws-interface/Makefile index 051fdeb..aacc67c 100644 --- a/org.glite.lb.ws-interface/Makefile +++ b/org.glite.lb.ws-interface/Makefile @@ -12,7 +12,12 @@ PREFIX=/opt/glite -include Makefile.inc -VPATH=${top_srcdir}/interface +SUFFIXES = .T + +VPATH=${top_srcdir}/src +AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3 +XSLTPROC=xsltproc + STAGETO=interface WSDL=LB.wsdl @@ -43,7 +48,16 @@ install: -mkdir -p ${PREFIX}/share/doc/${package}-${version} install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO} +# install -m 644 ${WSDL} ${PREFIX}/${STAGETO} clean: rm -f *.h + +%.xml: %.xml.T + rm -f $@ + ${AT3} $< >$@ || rm -f $@ + chmod -w $@ >/dev/null + +${WSDL}: LB.xml + ${XSLTPROC} ../src/puke-wsdl.xsl LB.xml >$@ diff --git a/org.glite.lb.ws-interface/build.xml b/org.glite.lb.ws-interface/build.xml index b412fb1..9480f9f 100644 --- a/org.glite.lb.ws-interface/build.xml +++ b/org.glite.lb.ws-interface/build.xml @@ -20,6 +20,9 @@ Revision history: $Log$ + Revision 1.1.1.1 2004/11/25 15:20:10 akrenek + initial import + Revision 1.5 2004/07/20 16:08:30 flammer Changed incorrect my_... instead of .._template entries for subsystem and component. @@ -102,6 +105,13 @@ + + + + + + + diff --git a/org.glite.lb.ws-interface/project/version.properties b/org.glite.lb.ws-interface/project/version.properties index c3b130e..b98db4e 100755 --- a/org.glite.lb.ws-interface/project/version.properties +++ b/org.glite.lb.ws-interface/project/version.properties @@ -1,4 +1,4 @@ #Wed Jan 12 04:07:54 CET 2005 -module.version=1.1.0 +module.version=1.2.0 module.build=46 module.age=1 diff --git a/org.glite.lb.ws-interface/src/LB.xml.T b/org.glite.lb.ws-interface/src/LB.xml.T new file mode 100644 index 0000000..a96551b --- /dev/null +++ b/org.glite.lb.ws-interface/src/LB.xml.T @@ -0,0 +1,127 @@ + + +@@@LANG: wsdl + + + + + Keeping track of state of grid jobs. + + + + Flags determining which fields of job status should be retrieved. + Can be combined arbitrarily. + Include also long job descriptions (JDL). + Return list of subjobs of a DAG. + Return state of the subjobs, i.e. apply other flags recursively + + + +@@@{ + for my $stat ($status->getTypesOrdered) { + my $u = uc $stat; + my $c = getTypeComment $status $stat; + gen qq{ +! $c +}; + } +@@@} + + +@@@{ + for my $n ($status->getAllFieldsOrdered) { + my $f = selectField $status $n; + if ($f->{codes}) { + my $n = getName $f; + $n = $1.ucfirst $2 while $n =~ /([[:alpha:]]*)_([[:alpha:]]*)/; + gen qq{ +! +}; + for (@{$f->{codes}}) { + my $uc = uc $_->{name}; + gen qq{ +! $_->{comment} +}; + } + gen qq{ +! +}; + } + } +@@@} + + + + + Status of a job, possibly including subjobs. + Status name. +@@@{ + for my $n (getAllFieldsOrdered $status) { + selectField $status $n; + my $f = getField $status; + my $name = getName $f; + $name = $1.ucfirst $2 while $name =~ /([[:alpha:]]*)_([[:alpha:]]*)/; + my $type = $f->{type}; + my $list = 'no'; + + if ($main::baseTypes{$type}) { + $type = eval $main::types{wsdl}->{$main::baseTypes{$type}}; + $list = 'yes' + } + elsif ($f->{codes}) { + $type = $name; + } + else { + $type = getType $f; + } + + my $comment = getComment $f; +# XXX: currently nothing is "optional" as we don't know from status.T + gen qq{ +! $comment +}; + } +@@@} + + + + + + + + + + + + + + + Generic SOAP fault, used to deliver any LB errors. + Source component (module) of the error. + Numeric error code. + Error text corresponding to the code. + Additional description of the error (e.g. filename) + Reason of the error, coming from lower levels. + + + + + + + + + + + Query state of a single job. + Id of the queried job. + Which data fields to retrieve. + Current state of the job. + Any error. + + + diff --git a/org.glite.lb.ws-interface/src/puke-wsdl.xsl b/org.glite.lb.ws-interface/src/puke-wsdl.xsl new file mode 100644 index 0000000..9342e89 --- /dev/null +++ b/org.glite.lb.ws-interface/src/puke-wsdl.xsl @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + 0 + 1 + + + + + unbounded + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.8.2.3