This commit was manufactured by cvs2svn to create tag 'GLITE_RELEASE_1_4_0'. GLITE_RELEASE_1_4_0
authorcvs2svn <admin@example.com>
Sun, 25 Sep 2005 17:16:58 +0000 (17:16 +0000)
committercvs2svn <admin@example.com>
Sun, 25 Sep 2005 17:16:58 +0000 (17:16 +0000)
Sprout from master 2005-08-08 14:17:20 UTC Aleš Křenek <ljocha@ics.muni.cz> 'clean up install: tools to sbin, examples to examples'
Cherrypick from master 2005-06-10 09:43:14 UTC Andrew McNab <andrew.mcnab@manchester.ac.uk> 'Tidy up for tag':
    org.gridsite.core/CHANGES
    org.gridsite.core/LICENSE
    org.gridsite.core/VERSION
    org.gridsite.core/doc/gacl.html
    org.gridsite.core/doc/install.html
    org.gridsite.core/doc/module.html
    org.gridsite.core/project/version.properties
    org.gridsite.core/src/Doxyfile
    org.gridsite.core/src/grst_admin_main.c
    org.gridsite.core/src/grst_gacl.c
    org.gridsite.core/src/grst_x509.c
Cherrypick from master 2004-08-17 13:41:21 UTC Elisabetta Ronchieri <elisabetta.ronchieri@cnaf.infn.it> 'Moved out JobIdExceptions.h cjobid.h JobId.h':
    org.glite.security.proxyrenewal/project/configure.properties.xml
    org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h
Cherrypick from master 2005-02-15 09:29:04 UTC Jiří Škrábal <nykolas@ics.muni.cz> '- files lb_gss.* renamed to glite_gss.*':
    org.glite.security.gsoap-plugin/test/test_gss.cpp
Cherrypick from master 2005-08-11 12:04:48 UTC Aleš Křenek <ljocha@ics.muni.cz> 'Tagged dependencies properties file [GLBUILDER]':
    org.glite.lb/project/dependencies.properties
Cherrypick from glite-security-proxyrenewal_branch_1_0_0_RC1 2005-08-10 18:42:48 UTC Joni Hahkala <joni.hahkala@cern.ch> 'get the header from teh right place after the removal of the copy':
    org.glite.security.proxyrenewal/Makefile
    org.glite.security.proxyrenewal/build.xml
    org.glite.security.proxyrenewal/config/startup
    org.glite.security.proxyrenewal/interface/renewal.h
    org.glite.security.proxyrenewal/project/build.number
    org.glite.security.proxyrenewal/project/version.properties
    org.glite.security.proxyrenewal/src/api.c
    org.glite.security.proxyrenewal/src/commands.c
    org.glite.security.proxyrenewal/src/common.c
    org.glite.security.proxyrenewal/src/renew.c
    org.glite.security.proxyrenewal/src/renewal_locl.h
    org.glite.security.proxyrenewal/src/renewd.c
    org.glite.security.proxyrenewal/src/renewd_locl.h
    org.glite.security.proxyrenewal/src/voms.c
Cherrypick from glite-deployment-lb_branch_2_0_0 2005-09-25 17:16:57 UTC Alberto Di Meglio <alberto.di.meglio@cern.ch> 'Release notes':
    org.glite.deployment.lb/CHANGELOG
    org.glite.deployment.lb/config/scripts/glite-lb-config.py
    org.glite.deployment.lb/config/templates/glite-lb.cfg.xml
    org.glite.deployment.lb/doc/release_notes/release_notes.doc
    org.glite.deployment.lb/doc/release_notes/release_notes.html
    org.glite.deployment.lb/doc/release_notes/release_notes.pdf
    org.glite.deployment.lb/project/glite-lb.sdf.xml.template
    org.glite.deployment.lb/project/lxscript-rpm.xsl
    org.glite.deployment.lb/project/quattor-template.xsl
    org.glite.deployment.lb/project/version.properties
Cherrypick from glite-deployment-lb_branch_2_0_0 2005-09-21 10:15:48 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.deployment.lb/project/build.number
Cherrypick from glite-security-gsoap-plugin_branch_1_1_0 2005-06-02 11:00:51 UTC Jiří Škrábal <nykolas@ics.muni.cz> '- clean connection on unsuccessfull connect':
    org.glite.security.gsoap-plugin/Makefile
    org.glite.security.gsoap-plugin/build.xml
    org.glite.security.gsoap-plugin/project/build.number
    org.glite.security.gsoap-plugin/project/configure.properties.xml
    org.glite.security.gsoap-plugin/project/version.properties
    org.glite.security.gsoap-plugin/src/glite_gsplugin.c
    org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c
Cherrypick from glite-wms-utils-exception_branch_1_0_0 2005-07-28 13:55:08 UTC Giuseppe Avellino <giuseppe.avellino@datamat.it> 'updating version':
    org.glite.wms-utils.exception/build.xml
    org.glite.wms-utils.exception/configure.ac
    org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h
    org.glite.wms-utils.exception/project/build.number
    org.glite.wms-utils.exception/project/version.properties
    org.glite.wms-utils.exception/src/Exception.cpp
Cherrypick from glite-lb-server_branch_1_2_4 2005-08-11 12:01:36 UTC Aleš Křenek <ljocha@ics.muni.cz> 'pushed version to reflect internal testing fixes':
    org.glite.lb.server/Makefile
    org.glite.lb.server/project/configure.properties.xml
    org.glite.lb.server/project/version.properties
    org.glite.lb.server/src/request.c
Cherrypick from glite-lb-client_branch_2_0_0 2005-08-11 11:58:24 UTC Aleš Křenek <ljocha@ics.muni.cz> 'pushed version to reflect internal testing fixes':
    org.glite.lb.client/project/version.properties
    org.glite.lb.client/src/prod_proto.c
    org.glite.lb.client/src/producer.c
Cherrypick from glite-lb-common_branch_2_0_0 2005-08-11 11:57:43 UTC Aleš Křenek <ljocha@ics.muni.cz> 'pushed version to reflect internal testing fixes':
    org.glite.lb.common/project/version.properties
    org.glite.lb.common/src/il_msg.c
    org.glite.lb.common/test/il_msg_test.cpp
Cherrypick from glite-wms-utils-jobid_branch_1_0_0 2005-04-03 01:12:39 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.wms-utils.jobid/build.xml
    org.glite.wms-utils.jobid/project/build.number
    org.glite.wms-utils.jobid/project/version.properties
Cherrypick from glite-lb-logger_branch_1_1_1 2005-08-11 12:00:24 UTC Aleš Křenek <ljocha@ics.muni.cz> 'pushed version to reflect internal testing fixes':
    org.glite.lb.logger/project/version.properties
    org.glite.lb.logger/src/server_msg.c
Cherrypick from glite-lb_branch_1_1_0_ 2005-08-11 12:03:14 UTC Aleš Křenek <ljocha@ics.muni.cz> 'pushed version to reflect internal testing fixes':
    org.glite.lb/project/version.properties
Delete:
    org.glite.jp.client/.cvsignore
    org.glite.jp.client/Makefile
    org.glite.jp.client/build.xml
    org.glite.jp.client/project/build.number
    org.glite.jp.client/project/build.properties
    org.glite.jp.client/project/configure.properties.xml
    org.glite.jp.client/project/properties.xml
    org.glite.jp.client/project/tar_exclude
    org.glite.jp.client/project/version.properties
    org.glite.jp.client/src/authz.c
    org.glite.jp.client/src/authz.h
    org.glite.jp.client/src/backend.h
    org.glite.jp.client/src/bones_server.c
    org.glite.jp.client/src/builtin_plugins.h
    org.glite.jp.client/src/db.h
    org.glite.jp.client/src/feed.c
    org.glite.jp.client/src/feed.h
    org.glite.jp.client/src/file_plugin.c
    org.glite.jp.client/src/ftp_backend.c
    org.glite.jp.client/src/is_client.c
    org.glite.jp.client/src/jpimporter.c
    org.glite.jp.client/src/jptype_map.h
    org.glite.jp.client/src/mysql.c
    org.glite.jp.client/src/new_ftp_backend.c
    org.glite.jp.client/src/simple_server.c
    org.glite.jp.client/src/soap_ops.c
    org.glite.jp.client/src/tags.c
    org.glite.jp.client/src/tags.h
    org.glite.jp.client/src/tags_plugin.c
    org.glite.jp.client/src/typemap.dat
    org.glite.jp.common/.cvsignore
    org.glite.jp.common/Makefile
    org.glite.jp.common/build.xml
    org.glite.jp.common/interface/context.h
    org.glite.jp.common/interface/strmd5.h
    org.glite.jp.common/interface/type_plugin.h
    org.glite.jp.common/interface/types.h
    org.glite.jp.common/project/build.number
    org.glite.jp.common/project/build.properties
    org.glite.jp.common/project/configure.properties.xml
    org.glite.jp.common/project/properties.xml
    org.glite.jp.common/project/tar_exclude
    org.glite.jp.common/project/version.properties
    org.glite.jp.common/src/attr.c
    org.glite.jp.common/src/context.c
    org.glite.jp.common/src/stdtypes.c
    org.glite.jp.common/src/strmd5.c
    org.glite.jp.index/.cvsignore
    org.glite.jp.index/Makefile
    org.glite.jp.index/build.xml
    org.glite.jp.index/project/JobProvenanceIS.wsdl
    org.glite.jp.index/project/build.number
    org.glite.jp.index/project/build.properties
    org.glite.jp.index/project/configure.properties.xml
    org.glite.jp.index/project/properties.xml
    org.glite.jp.index/project/tar_exclude
    org.glite.jp.index/project/version.properties
    org.glite.jp.index/src/simple_server.c
    org.glite.jp.index/src/soap_ops.c
    org.glite.jp.index/src/typemap.dat
    org.glite.jp.primary/.cvsignore
    org.glite.jp.primary/Makefile
    org.glite.jp.primary/build.xml
    org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql
    org.glite.jp.primary/examples/README.test
    org.glite.jp.primary/examples/jpps-test.c
    org.glite.jp.primary/interface/file_plugin.h
    org.glite.jp.primary/project/build.number
    org.glite.jp.primary/project/build.properties
    org.glite.jp.primary/project/configure.properties.xml
    org.glite.jp.primary/project/properties.xml
    org.glite.jp.primary/project/tar_exclude
    org.glite.jp.primary/project/version.properties
    org.glite.jp.primary/src/authz.c
    org.glite.jp.primary/src/authz.h
    org.glite.jp.primary/src/backend.h
    org.glite.jp.primary/src/bones_server.c
    org.glite.jp.primary/src/builtin_plugins.h
    org.glite.jp.primary/src/db.h
    org.glite.jp.primary/src/feed.c
    org.glite.jp.primary/src/feed.h
    org.glite.jp.primary/src/file_plugin.c
    org.glite.jp.primary/src/ftp_backend.c
    org.glite.jp.primary/src/is_client.c
    org.glite.jp.primary/src/is_client.h
    org.glite.jp.primary/src/jptype_map.h
    org.glite.jp.primary/src/mysql.c
    org.glite.jp.primary/src/new_ftp_backend.c
    org.glite.jp.primary/src/simple_server.c
    org.glite.jp.primary/src/soap_ops.c
    org.glite.jp.primary/src/tags.c
    org.glite.jp.primary/src/tags.h
    org.glite.jp.primary/src/tags_plugin.c
    org.glite.jp.primary/src/typemap.dat
    org.glite.jp.ws-interface/.cvsignore
    org.glite.jp.ws-interface/LICENSE
    org.glite.jp.ws-interface/Makefile
    org.glite.jp.ws-interface/build.xml
    org.glite.jp.ws-interface/interface/JobProvenanceIS.wsdl
    org.glite.jp.ws-interface/project/build.number
    org.glite.jp.ws-interface/project/build.properties
    org.glite.jp.ws-interface/project/configure.properties.xml
    org.glite.jp.ws-interface/project/glite-jp-ws-interface.spec
    org.glite.jp.ws-interface/project/properties.xml
    org.glite.jp.ws-interface/project/tar_exclude
    org.glite.jp.ws-interface/project/version.properties
    org.glite.jp.ws-interface/src/JobProvenancePS.xml
    org.glite.jp.ws-interface/src/JobProvenanceTypes.xml
    org.glite.jp.ws-interface/src/doc.xml
    org.glite.jp.ws-interface/src/puke-ug.xsl
    org.glite.jp.ws-interface/src/puke-wsdl.xsl
    org.glite.jp/.cvsignore
    org.glite.jp/build.xml
    org.glite.jp/project/build.number
    org.glite.jp/project/build.properties
    org.glite.jp/project/dependencies.properties
    org.glite.jp/project/glite.jp.csf.xml
    org.glite.jp/project/properties.xml
    org.glite.jp/project/run-workspace
    org.glite.jp/project/taskdefs.xml
    org.glite.jp/project/version.properties
    org.glite.security.proxyrenewal/src/acstack.h
    org.glite.security.proxyrenewal/src/newformat.h
    org.glite.wms-utils.exception/test/Makefile.am
    org.glite.wms-utils.exception/test/exception_cu_main.cpp
    org.glite.wms-utils.exception/test/exception_cu_suite.cpp
    org.glite.wms-utils.exception/test/exception_cu_suite.h
    org.glite.wms-utils.jobid/test/Makefile.am
    org.glite.wms-utils.jobid/test/jobid_cu_main.cpp
    org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp
    org.glite.wms-utils.jobid/test/jobid_cu_suite.h
    org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp
    org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp
    org.glite.wms-utils.jobid/test/manipulation_cu_suite.h

190 files changed:
org.glite.deployment.lb/CHANGELOG
org.glite.deployment.lb/config/scripts/glite-lb-config.py
org.glite.deployment.lb/config/templates/glite-lb.cfg.xml
org.glite.deployment.lb/doc/release_notes/release_notes.doc
org.glite.deployment.lb/doc/release_notes/release_notes.html
org.glite.deployment.lb/doc/release_notes/release_notes.pdf
org.glite.deployment.lb/project/build.number
org.glite.deployment.lb/project/glite-lb.sdf.xml.template
org.glite.deployment.lb/project/lxscript-rpm.xsl
org.glite.deployment.lb/project/quattor-template.xsl
org.glite.deployment.lb/project/version.properties
org.glite.jp.client/.cvsignore [deleted file]
org.glite.jp.client/Makefile [deleted file]
org.glite.jp.client/build.xml [deleted file]
org.glite.jp.client/project/build.number [deleted file]
org.glite.jp.client/project/build.properties [deleted file]
org.glite.jp.client/project/configure.properties.xml [deleted file]
org.glite.jp.client/project/properties.xml [deleted file]
org.glite.jp.client/project/tar_exclude [deleted file]
org.glite.jp.client/project/version.properties [deleted file]
org.glite.jp.client/src/authz.c [deleted file]
org.glite.jp.client/src/authz.h [deleted file]
org.glite.jp.client/src/backend.h [deleted file]
org.glite.jp.client/src/bones_server.c [deleted file]
org.glite.jp.client/src/builtin_plugins.h [deleted file]
org.glite.jp.client/src/db.h [deleted file]
org.glite.jp.client/src/feed.c [deleted file]
org.glite.jp.client/src/feed.h [deleted file]
org.glite.jp.client/src/file_plugin.c [deleted file]
org.glite.jp.client/src/ftp_backend.c [deleted file]
org.glite.jp.client/src/is_client.c [deleted file]
org.glite.jp.client/src/jpimporter.c [deleted file]
org.glite.jp.client/src/jptype_map.h [deleted file]
org.glite.jp.client/src/mysql.c [deleted file]
org.glite.jp.client/src/new_ftp_backend.c [deleted file]
org.glite.jp.client/src/simple_server.c [deleted file]
org.glite.jp.client/src/soap_ops.c [deleted file]
org.glite.jp.client/src/tags.c [deleted file]
org.glite.jp.client/src/tags.h [deleted file]
org.glite.jp.client/src/tags_plugin.c [deleted file]
org.glite.jp.client/src/typemap.dat [deleted file]
org.glite.jp.common/.cvsignore [deleted file]
org.glite.jp.common/Makefile [deleted file]
org.glite.jp.common/build.xml [deleted file]
org.glite.jp.common/interface/context.h [deleted file]
org.glite.jp.common/interface/strmd5.h [deleted file]
org.glite.jp.common/interface/type_plugin.h [deleted file]
org.glite.jp.common/interface/types.h [deleted file]
org.glite.jp.common/project/build.number [deleted file]
org.glite.jp.common/project/build.properties [deleted file]
org.glite.jp.common/project/configure.properties.xml [deleted file]
org.glite.jp.common/project/properties.xml [deleted file]
org.glite.jp.common/project/tar_exclude [deleted file]
org.glite.jp.common/project/version.properties [deleted file]
org.glite.jp.common/src/attr.c [deleted file]
org.glite.jp.common/src/context.c [deleted file]
org.glite.jp.common/src/stdtypes.c [deleted file]
org.glite.jp.common/src/strmd5.c [deleted file]
org.glite.jp.index/.cvsignore [deleted file]
org.glite.jp.index/Makefile [deleted file]
org.glite.jp.index/build.xml [deleted file]
org.glite.jp.index/project/JobProvenanceIS.wsdl [deleted file]
org.glite.jp.index/project/build.number [deleted file]
org.glite.jp.index/project/build.properties [deleted file]
org.glite.jp.index/project/configure.properties.xml [deleted file]
org.glite.jp.index/project/properties.xml [deleted file]
org.glite.jp.index/project/tar_exclude [deleted file]
org.glite.jp.index/project/version.properties [deleted file]
org.glite.jp.index/src/simple_server.c [deleted file]
org.glite.jp.index/src/soap_ops.c [deleted file]
org.glite.jp.index/src/typemap.dat [deleted file]
org.glite.jp.primary/.cvsignore [deleted file]
org.glite.jp.primary/Makefile [deleted file]
org.glite.jp.primary/build.xml [deleted file]
org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql [deleted file]
org.glite.jp.primary/examples/README.test [deleted file]
org.glite.jp.primary/examples/jpps-test.c [deleted file]
org.glite.jp.primary/interface/file_plugin.h [deleted file]
org.glite.jp.primary/project/build.number [deleted file]
org.glite.jp.primary/project/build.properties [deleted file]
org.glite.jp.primary/project/configure.properties.xml [deleted file]
org.glite.jp.primary/project/properties.xml [deleted file]
org.glite.jp.primary/project/tar_exclude [deleted file]
org.glite.jp.primary/project/version.properties [deleted file]
org.glite.jp.primary/src/authz.c [deleted file]
org.glite.jp.primary/src/authz.h [deleted file]
org.glite.jp.primary/src/backend.h [deleted file]
org.glite.jp.primary/src/bones_server.c [deleted file]
org.glite.jp.primary/src/builtin_plugins.h [deleted file]
org.glite.jp.primary/src/db.h [deleted file]
org.glite.jp.primary/src/feed.c [deleted file]
org.glite.jp.primary/src/feed.h [deleted file]
org.glite.jp.primary/src/file_plugin.c [deleted file]
org.glite.jp.primary/src/ftp_backend.c [deleted file]
org.glite.jp.primary/src/is_client.c [deleted file]
org.glite.jp.primary/src/is_client.h [deleted file]
org.glite.jp.primary/src/jptype_map.h [deleted file]
org.glite.jp.primary/src/mysql.c [deleted file]
org.glite.jp.primary/src/new_ftp_backend.c [deleted file]
org.glite.jp.primary/src/simple_server.c [deleted file]
org.glite.jp.primary/src/soap_ops.c [deleted file]
org.glite.jp.primary/src/tags.c [deleted file]
org.glite.jp.primary/src/tags.h [deleted file]
org.glite.jp.primary/src/tags_plugin.c [deleted file]
org.glite.jp.primary/src/typemap.dat [deleted file]
org.glite.jp.ws-interface/.cvsignore [deleted file]
org.glite.jp.ws-interface/LICENSE [deleted file]
org.glite.jp.ws-interface/Makefile [deleted file]
org.glite.jp.ws-interface/build.xml [deleted file]
org.glite.jp.ws-interface/interface/JobProvenanceIS.wsdl [deleted file]
org.glite.jp.ws-interface/project/build.number [deleted file]
org.glite.jp.ws-interface/project/build.properties [deleted file]
org.glite.jp.ws-interface/project/configure.properties.xml [deleted file]
org.glite.jp.ws-interface/project/glite-jp-ws-interface.spec [deleted file]
org.glite.jp.ws-interface/project/properties.xml [deleted file]
org.glite.jp.ws-interface/project/tar_exclude [deleted file]
org.glite.jp.ws-interface/project/version.properties [deleted file]
org.glite.jp.ws-interface/src/JobProvenancePS.xml [deleted file]
org.glite.jp.ws-interface/src/JobProvenanceTypes.xml [deleted file]
org.glite.jp.ws-interface/src/doc.xml [deleted file]
org.glite.jp.ws-interface/src/puke-ug.xsl [deleted file]
org.glite.jp.ws-interface/src/puke-wsdl.xsl [deleted file]
org.glite.jp/.cvsignore [deleted file]
org.glite.jp/build.xml [deleted file]
org.glite.jp/project/build.number [deleted file]
org.glite.jp/project/build.properties [deleted file]
org.glite.jp/project/dependencies.properties [deleted file]
org.glite.jp/project/glite.jp.csf.xml [deleted file]
org.glite.jp/project/properties.xml [deleted file]
org.glite.jp/project/run-workspace [deleted file]
org.glite.jp/project/taskdefs.xml [deleted file]
org.glite.jp/project/version.properties [deleted file]
org.glite.lb.client/project/version.properties
org.glite.lb.client/src/prod_proto.c
org.glite.lb.client/src/producer.c
org.glite.lb.common/project/version.properties
org.glite.lb.common/src/il_msg.c
org.glite.lb.common/test/il_msg_test.cpp
org.glite.lb.logger/project/version.properties
org.glite.lb.server/Makefile
org.glite.lb.server/project/configure.properties.xml
org.glite.lb.server/project/version.properties
org.glite.lb/project/dependencies.properties
org.glite.lb/project/version.properties
org.glite.security.gsoap-plugin/Makefile
org.glite.security.gsoap-plugin/build.xml
org.glite.security.gsoap-plugin/project/build.number
org.glite.security.gsoap-plugin/project/configure.properties.xml
org.glite.security.gsoap-plugin/project/version.properties
org.glite.security.gsoap-plugin/src/glite_gsplugin.c
org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c [new file with mode: 0644]
org.glite.security.gsoap-plugin/test/test_gss.cpp
org.glite.security.proxyrenewal/build.xml
org.glite.security.proxyrenewal/project/build.number
org.glite.security.proxyrenewal/project/configure.properties.xml
org.glite.security.proxyrenewal/project/version.properties
org.glite.security.proxyrenewal/src/acstack.h [deleted file]
org.glite.security.proxyrenewal/src/newformat.h [deleted file]
org.glite.security.proxyrenewal/src/voms.c
org.glite.wms-utils.exception/build.xml
org.glite.wms-utils.exception/configure.ac
org.glite.wms-utils.exception/project/build.number
org.glite.wms-utils.exception/project/version.properties
org.glite.wms-utils.exception/src/Exception.cpp
org.glite.wms-utils.exception/test/Makefile.am [deleted file]
org.glite.wms-utils.exception/test/exception_cu_main.cpp [deleted file]
org.glite.wms-utils.exception/test/exception_cu_suite.cpp [deleted file]
org.glite.wms-utils.exception/test/exception_cu_suite.h [deleted file]
org.glite.wms-utils.jobid/build.xml
org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h
org.glite.wms-utils.jobid/project/build.number
org.glite.wms-utils.jobid/project/version.properties
org.glite.wms-utils.jobid/test/Makefile.am [deleted file]
org.glite.wms-utils.jobid/test/jobid_cu_main.cpp [deleted file]
org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp [deleted file]
org.glite.wms-utils.jobid/test/jobid_cu_suite.h [deleted file]
org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp [deleted file]
org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp [deleted file]
org.glite.wms-utils.jobid/test/manipulation_cu_suite.h [deleted file]
org.gridsite.core/CHANGES
org.gridsite.core/LICENSE
org.gridsite.core/VERSION
org.gridsite.core/doc/gacl.html
org.gridsite.core/doc/install.html
org.gridsite.core/doc/module.html
org.gridsite.core/project/version.properties
org.gridsite.core/src/Doxyfile
org.gridsite.core/src/grst_admin_main.c
org.gridsite.core/src/grst_gacl.c
org.gridsite.core/src/grst_x509.c

index 9f1b376..32a02b4 100644 (file)
@@ -1,3 +1,9 @@
+DATE: 13-09-2005 23:00\r
+[dimeglio] Use standard mysql module functions to create db\r
+\r
+DATE: 08-07-2005 15:20\r
+[dimeglio] Increased major version because of interface changes in the config scripts\r
+\r
 DATE: 08-07-2005 15:20\r
 [dimeglio] Merged from branch 1.2.2\r
 \r
index f63be09..2151f54 100644 (file)
@@ -6,7 +6,7 @@
 # For license conditions see the license file or http://eu-egee.org/license.html
 #
 ################################################################################
-# glite-lb-config v. 1.3.0
+# glite-lb-config v. 2.0.2
 #
 # Post-installation script for configuring the gLite Logging and Bookkeping Server
 # Robert Harakaly < robert.harakaly@cern.ch >
 # Version info: $Id$
 #
 # Usage: python glite-lb-config [-c|-v|-h|--help]
-#        -c          print configuration
-#        -v          print version
-#        -h,--help   print usage info
+#        -c, --checkconf         print configuration
+#        -v, --version           print version
+#        -h,--help               print usage info
+#        --configure             configure the service
+#        --start                 start the service
+#        --stop                  stop the service
+#        --status                show service status
 #
 # Return codes: 0 - Ok
 #               1 - Configuration failed
@@ -42,7 +46,7 @@ class glite_lb:
     def __init__(self):
         self.mysql = MySQL.Mysql()
         self.verbose = 0
-        self.version = "1.3.0"
+        self.version = "2.0.2"
         self.name = "glite-lb"
         self.friendly_name = "gLite Logging and Bookkeeping"
         params['module.version'] = self.version
@@ -98,6 +102,7 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
         print '    -c, --checkconf     print the service configuration'
         print '    -v, --version       print the version of the configuration script'
         print '    -h, --help          print this usage information'
+        print '    --configure         configure the service'
         print '    --start             start the service'
         print '    --stop              stop the service'
         print '    --status            check service status'
@@ -178,6 +183,10 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
             print 'The LB Server service has been stopped            ',
             glib.printOkMessage()
         
+        #-------------------------------------------------------------------
+        # MySQL
+        #-------------------------------------------------------------------
+
         self.mysql.stop()
 
         #-------------------------------------------------------------------
@@ -215,12 +224,11 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
         #--------------------------------------------------------
         
         if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()):
-            print "\nInstalling gLite Security Utilities                   ",
+            print "\nConfiguring gLite Security Utilities                   ",
             glib.printFailedMessage()
-            return 1
-
-        print "\nInstalling gLite Security Utilities                   ",
-        glib.printOkMessage()
+        else:
+            print "\nConfiguring gLite Security Utilities                   ",
+            glib.printOkMessage()
         
         # Create the GLITE_USER if it doesn't exists
         print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER']
@@ -244,17 +252,28 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
         os.chmod("%s/hostkey.pem" % lb_cert_path, 0400)
         glib.printOkMessage()
 
-        # Create the MySQL database
-        print "\nCreate/Verify the %s database" % params['lb.database.name']
+        #--------------------------------------------------------
+        # Configure MySQL
+        #--------------------------------------------------------
+
+        # start MySQL
         self.mysql.stop()
         time.sleep(5)
-        self.mysql.start()
-        
+        self.mysql.start()                
+
         if not os.path.exists('/tmp/mysql.sock'):
             os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
 
+        # Set root password
+        mysql_root_password = params['mysql.root.password']
+        if mysql_root_password != "":
+            self.mysql.setpassword(mysql_root_password)
+
+        # Create the MySQL database
+        print "\nCreate/Verify the %s database" % params['lb.database.name']
+        
         # Check if database exists
-        if self.mysql.existsDB(params['lb.database.name']) != 0:
+        if self.mysql.existsDB(params['lb.database.name'],mysql_root_password) != 0:
             # Create database
             print ('\n==> Creating MySQL %s database\n' % params['lb.database.name'])
     
@@ -262,15 +281,14 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
                 os.remove('/tmp/mysql_ct')
             
             file = open('/tmp/mysql_ct', 'w')
-            text = ['CREATE DATABASE %s;\n' % params['lb.database.name'], 
-                       'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY "";\n' \
-                       % (params['lb.database.name'],params['lb.database.username']),
-                       'USE %s;\n' % params['lb.database.name'],
-                       '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
+
+            self.mysql.add_user(params['lb.database.name'],params['lb.database.username'],"",mysql_root_password)
+            text = ['USE %s;\n' % params['lb.database.name'],
+                    '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
     
             file.writelines(text)
             file.close()
-            os.system('/usr/bin/mysql < /tmp/mysql_ct')
+            os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % mysql_root_password)
             os.system('/bin/rm /tmp/mysql_ct')
             
             #Starting and stopping the database before the index creation
@@ -330,6 +348,13 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
 # Set all environment variables
 #-------------------------------------------------------------------------------
 
+def loadDefaults(params):
+
+    params['GLITE_LOCATION'] = "/opt/glite"
+    params['mysql.root.password'] = ""
+    params['lb.database.name'] = "lbserver20"
+    params['lb.database.username'] = "lbserver"
+
 def set_env():
 
     # gLite
@@ -385,6 +410,7 @@ if __name__ == '__main__':
     
     # Load parameters
     params = {}
+    loadDefaults(params)
     try:
         opts, args = getopt.getopt(sys.argv[1:], '', ['siteconfig='])
         for o, a in opts:
@@ -415,66 +441,109 @@ if __name__ == '__main__':
     
     # Command line opts if any
     try:
-        opts, args = getopt.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','stop','start','status','siteconfig='])
+        opts, args = getopt.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig='])
     except getopt.GetoptError:
         service.usage(msg = "Unknown options(s)")
         sys.exit(1)
 
+    if len(opts) == 0:
+        service.usage()
+        sys.exit(0)
+    
     # Check cli options
     for o, a in opts:
+
         if o in ("-h", "--help"):
             service.usage()
             sys.exit(0)
+
         if o in ("-v", "--version"):
             service.showVersion()
             sys.exit(0)
+
         if o in ("-c", "--checkconf"):
             service.copyright()
             service.showVersion()
             glib.print_params(params)
             sys.exit(0)
-       if o in ("stop", "--stop"): 
+
+        if o == "--configure":
+
+            # Check certificates
+            if params.has_key('glite.installer.checkcerts'):
+                if params['glite.installer.checkcerts'] == "true":
+                    if glib.check_certs(params) != 0:
+                        print "An error occurred while configuring the %s service" \
+                            % service.friendly_name
+                        sys.exit(1)
+            
+            # Print configuration parameters
+            if verbose:
+                glib.print_params(params)
+        
+            service.copyright()
+            service.showVersion()
+            service.banner()
+                
+            # Stop all services
+            glib.printInfoMessage("\n\nStopping all running LB services...")
             service.stop()
-            sys.exit(0)
-       if o in ("start", "--start"):
-            service.start()
-            sys.exit(0)
-        if o == "--status":
-            sys.exit(service.status())
+            
+            # Configure the service
+            return_result = service.configure()
+
+            if return_result == 0:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running LB services...")
+                service.stop()
                 
+                print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name
+                print "You can now start the service using the --start option of this script\n\n"
+                glib.registerService()
+
+                sys.exit(0)
 
-    # Check certificates
-    if params.has_key('glite.installer.checkcerts'):
-        if params['glite.installer.checkcerts'] == "true":
-            if glib.check_certs(params) != 0:
-                print "An error occurred while configuring the %s service" \
+            elif return_result == 2:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running LB services...")
+                service.stop()
+                
+                print "\n\nThe %s configuration was completed,\n" % service.friendly_name
+                print "but warnings were issued. Please revise them and re-run the script\n"
+                print "or configure LB manually\n"
+
+                sys.exit(2)
+
+            else:
+                print "\n\nAn unrecoverable error occurred while configuring the %s" \
                     % service.friendly_name
-                sys.exit(1)
-    
-    # Print configuration parameters
-    if verbose:
-        glib.print_params(params)
 
-    service.copyright()
-    service.showVersion()
-    service.banner()
-        
-    # Configure the service
-    if service.configure() == 0:
-        print "\n%s configuration successfully completed                " % service.friendly_name,
-        glib.printOkMessage()
-        glib.registerService()
-    else:
-        print "\nAn error occurred while configuring the %s            " % service.friendly_name,
-        glib.printFailedMessage()
-        sys.exit(1)
+                sys.exit(1)
+            
+        if o in ("start", "--start"):
+            # Start the service
+            if service.start() == 0:
+                print "\n\nThe %s was successfully started           " % service.friendly_name,
+                glib.printOkMessage()
+                sys.exit(0)
+            else:
+                print "\n\nAn error occurred while starting the %s            " % service.friendly_name,
+                glib.printFailedMessage()
+                sys.exit(1)
+            
+        if o in ("stop", "--stop"): 
+            # Stop the service
+            if service.stop() == 0:
+                print "\n\nThe %s was successfully stopped           " % service.friendly_name,
+                glib.printOkMessage()
+                sys.exit(0)
+            else:
+                print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name,
+                glib.printFailedMessage()
+                sys.exit(1)
         
-    # Start the service
-    if service.start() == 0:
-        print "\nThe %s was successfully started           " % service.friendly_name,
-        glib.printOkMessage()
-    else:
-        print "\nAn error occurred while starting the %s            " % service.friendly_name,
-        glib.printFailedMessage()
-        sys.exit(1)
-
+        if o == "--status":
+            sys.exit(service.status())
+                
index ed39d97..72ada69 100644 (file)
                        parameter. Leave it empty of comment it out to use the same as 'glite.user.name'"
                        value="changeme"/>
                
+           <mysql.root.password
+               description="The mysql root password"
+               value="changeme"/>
+       
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                <!-- Advanced parameters - Change them if you know what you're doing -->
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                        description="Enable check of host certificates"
                        value="true"/>
 
-               <!-- MySQL DB -->
-               <lb.database.name
-                       description="The mySQL database name to create for storing LB data
-                       In this version it must be set to the given value"
-                       value="lbserver20"/>
-
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- System parameters - You should leave these alone -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
+       
                <lb.index.list
                        description="Definitions of indices on all the currently supported indexed system attributes">
                        
 
                </lb.index.list>
                        
-               <lb.database.username
-                       description="The username to be used to access the local mySQL server
-                       In this version it must be set to the given value"
-                       value="lbserver"/>
-                       
-               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
-               <!-- System parameters - You should leave these alone -->
-               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
-       
        </parameters>
 
        <!--RGMA service publishing: log server -->
                                
                                value="true"/>
                                
+                       <rgma.servicetool.service_type
+                               description="The service type. This should be uniquely defined for each service type. 
+                                       The recommended format is the service namespace in
+                                       reversed domain name format [Type: 'string']"
+                               value="org.glite.lb.lbserver"/>
+
                        <rgma.servicetool.name
-                               description="Name of the service. This should be globally unique.
-                                       Example: your.host.name_Logging_Bookkeeping_Server
-                                       [Type: 'String']"
-                               value="${HOSTNAME}_Logging_Bookkeeping_Server"/>
+                               description="Name of the service. This should be globally unique.                                                        
+                                       [Example: 'HOSTANME_LB_LocalLogger'] [Type: 'String']"
+                               value="${HOSTNAME}_${rgma.servicetool.service_type}"/>
 
                        <rgma.servicetool.url_endpoint
                                description="URL to contact the service at. 
                                        This should be unique for each service. Use example and adapt host. 
                                        Example: http://your.host.name/LB/LBServer
                                        [Type: 'string']"
-                               value="http://${HOSTNAME}/LB/LBServer"/>
-
-                       <rgma.servicetool.service_type
-                               description="The service type. This should be uniquely defined for 
-                                       each service type. Currently two methods of type naming are recommended:
-                                       (1) The targetNamespace from the WSDL document,
-                                               followed by a space and then the service name.
-                                       (2) A URL owned by the body or individual who defines the service type.
-                                       Example: Logging and Bookkeeping Server
-                                       [Type: 'string']"
-                               value="Logging and Bookkeeping Server"/>
+                               value="not available"/>
 
                        <rgma.servicetool.service_version
                                description="Service version in the form 'major.minor.patch'
                        <rgma.servicetool.status_interval
                                description="How often to check and publish service status.
                                        Example: 60 [Type: 'string'] [Unit: 'seconds']"
-                               value="60"/>
+                               value="30"/>
 
                        <rgma.servicetool.url_wsdl
                                description="URL of a WSDL document for the service (leave blank if the 
                                        service has no WSDL).
                                        Example: http://example.rl.ac.uk/service?WSDL
                                        [Type: 'string']"
-                               value="n/a"/>
+                               value="not available"/>
 
                        <rgma.servicetool.url_semantics
                                description="URL of a document containing a detailed description of the service
                                        and how it should be used.
                                        Example: http://example.rl.ac.uk/service/semantics.html
                                        [Type: 'string']"
-                               value="n/a"/>
+                               value="not available"/>
 
                </parameters>
        </instance>
index ae9fd18..a1d8d86 100644 (file)
Binary files a/org.glite.deployment.lb/doc/release_notes/release_notes.doc and b/org.glite.deployment.lb/doc/release_notes/release_notes.doc differ
index ecba765..2e771cd 100644 (file)
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
 @font-face
+       {font-family:"MS Mincho";
+       panose-1:2 2 6 9 4 2 5 8 3 4;}
+@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 @font-face
+       {font-family:"\@MS Mincho";
+       panose-1:2 2 6 9 4 2 5 8 3 4;}
+@font-face
+       {font-family:ZWAdobeF;
+       panose-1:0 0 0 0 0 0 0 0 0 0;}
+@font-face
        {font-family:Times;
        panose-1:2 2 6 3 5 4 5 2 3 4;}
 @font-face
@@ -134,6 +143,78 @@ p.MsoIndex1, li.MsoIndex1, div.MsoIndex1
        text-align:justify;
        font-size:12.0pt;
        font-family:"Times New Roman";}
+p.MsoIndex2, li.MsoIndex2, div.MsoIndex2
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:22.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex3, li.MsoIndex3, div.MsoIndex3
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:33.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex4, li.MsoIndex4, div.MsoIndex4
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:44.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex5, li.MsoIndex5, div.MsoIndex5
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:55.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex6, li.MsoIndex6, div.MsoIndex6
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:66.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex7, li.MsoIndex7, div.MsoIndex7
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:77.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex8, li.MsoIndex8, div.MsoIndex8
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:88.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoIndex9, li.MsoIndex9, div.MsoIndex9
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:99.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
 p.MsoToc1, li.MsoToc1, div.MsoToc1
        {margin-top:6.0pt;
        margin-right:0mm;
@@ -259,6 +340,15 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
        text-align:justify;
        font-size:11.0pt;
        font-family:"Times New Roman";}
+p.MsoIndexHeading, li.MsoIndexHeading, div.MsoIndexHeading
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:Arial;
+       font-weight:bold;}
 p.MsoCaption, li.MsoCaption, div.MsoCaption
        {margin-top:6.0pt;
        margin-right:0mm;
@@ -268,1627 +358,1277 @@ p.MsoCaption, li.MsoCaption, div.MsoCaption
        font-size:11.0pt;
        font-family:"Times New Roman";
        font-weight:bold;}
-span.MsoFootnoteReference
-       {vertical-align:super;}
-p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
-       {margin-top:3.0pt;
+p.MsoTof, li.MsoTof, div.MsoTof
+       {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:3.0pt;
+       margin-bottom:2.0pt;
        margin-left:0mm;
        text-align:justify;
        font-size:11.0pt;
        font-family:"Times New Roman";}
-p.MsoBodyText3, li.MsoBodyText3, div.MsoBodyText3
-       {margin-top:2.5pt;
+p.MsoEnvelopeAddress, li.MsoEnvelopeAddress, div.MsoEnvelopeAddress
+       {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:2.5pt;
+       margin-bottom:2.0pt;
+       margin-left:144.0pt;
+       text-align:justify;
+       font-size:12.0pt;
+       font-family:Arial;}
+p.MsoEnvelopeReturn, li.MsoEnvelopeReturn, div.MsoEnvelopeReturn
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
        margin-left:0mm;
        text-align:justify;
-       page-break-after:avoid;
        font-size:10.0pt;
        font-family:Arial;}
-p.MsoBlockText, li.MsoBlockText, div.MsoBlockText
+span.MsoFootnoteReference
+       {vertical-align:super;}
+p.MsoEndnoteText, li.MsoEndnoteText, div.MsoEndnoteText
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
        margin-left:0mm;
        text-align:justify;
-       text-indent:17.0pt;
+       font-size:10.0pt;
+       font-family:"Times New Roman";}
+p.MsoToa, li.MsoToa, div.MsoToa
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:11.0pt;
+       text-align:justify;
+       text-indent:-11.0pt;
        font-size:11.0pt;
        font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
-       {color:blue;
-       text-decoration:underline;}
-a:visited, span.MsoHyperlinkFollowed
-       {color:purple;
-       text-decoration:underline;}
-p.MsoDocumentMap, li.MsoDocumentMap, div.MsoDocumentMap
+p.MsoMacroText, li.MsoMacroText, div.MsoMacroText
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
        margin-left:0mm;
        text-align:justify;
-       background:navy;
-       font-size:11.0pt;
-       font-family:Tahoma;}
-p
-       {margin-top:5.0pt;
+       font-size:10.0pt;
+       font-family:"Courier New";}
+p.MsoToaHeading, li.MsoToaHeading, div.MsoToaHeading
+       {margin-top:6.0pt;
        margin-right:0mm;
-       margin-bottom:5.0pt;
+       margin-bottom:2.0pt;
        margin-left:0mm;
        text-align:justify;
        font-size:12.0pt;
-       font-family:"Times New Roman";}
-tt
-       {font-family:"Courier New";}
-p.3eretraitnormal, li.3eretraitnormal, div.3eretraitnormal
+       font-family:Arial;
+       font-weight:bold;}
+p.MsoList, li.MsoList, div.MsoList
        {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:3.0pt;
-       margin-left:102.9pt;
+       margin-bottom:2.0pt;
+       margin-left:18.0pt;
        text-align:justify;
-       text-indent:-17.85pt;
-       font-size:12.0pt;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
        font-family:"Times New Roman";}
-p.2eretraitjustifi, li.2eretraitjustifi, div.2eretraitjustifi
+p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
        {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:3.0pt;
-       margin-left:40.0mm;
+       margin-bottom:2.0pt;
+       margin-left:18.0pt;
        text-align:justify;
-       text-indent:-7.1pt;
-       line-height:12.0pt;
+       text-indent:-18.0pt;
        font-size:11.0pt;
        font-family:"Times New Roman";}
-p.2eretraitnormal, li.2eretraitnormal, div.2eretraitnormal
+p.MsoListNumber, li.MsoListNumber, div.MsoListNumber
        {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:3.0pt;
+       margin-bottom:2.0pt;
        margin-left:18.0pt;
        text-align:justify;
        text-indent:-18.0pt;
-       font-size:12.0pt;
+       font-size:11.0pt;
        font-family:"Times New Roman";}
-p.1erretraitnormal, li.1erretraitnormal, div.1erretraitnormal
+p.MsoList2, li.MsoList2, div.MsoList2
        {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:12.0pt;
-       margin-left:0mm;
+       margin-bottom:2.0pt;
+       margin-left:36.0pt;
        text-align:justify;
-       font-size:12.0pt;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
        font-family:"Times New Roman";}
-p.titrebloc, li.titrebloc, div.titrebloc
+p.MsoList3, li.MsoList3, div.MsoList3
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:0mm;
+       margin-left:54.0pt;
        text-align:justify;
+       text-indent:-18.0pt;
        font-size:11.0pt;
-       font-family:Arial;
-       font-weight:bold;}
-p.TitreTable, li.TitreTable, div.TitreTable
-       {margin-top:6.0pt;
+       font-family:"Times New Roman";}
+p.MsoList4, li.MsoList4, div.MsoList4
+       {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:0mm;
-       text-align:center;
-       font-size:12.0pt;
-       font-family:Arial;
-       font-weight:bold;}
-p.form, li.form, div.form
-       {margin-top:6.0pt;
-       margin-right:7.05pt;
-       margin-bottom:0mm;
-       margin-left:0mm;
-       margin-bottom:.0001pt;
+       margin-left:72.0pt;
        text-align:justify;
-       background:black;
-       border:none;
-       padding:0mm;
-       font-size:14.0pt;
-       font-family:"Univers \(W1\)";
-       color:white;
-       text-transform:uppercase;
-       font-weight:bold;}
-p.HB, li.HB, div.HB
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoList5, li.MsoList5, div.MsoList5
        {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:12.0pt;
-       margin-left:0mm;
+       margin-bottom:2.0pt;
+       margin-left:90.0pt;
        text-align:justify;
-       page-break-after:avoid;
-       font-size:12.0pt;
-       font-family:"Times New Roman";
-       color:black;
-       font-weight:bold;}
-p.reference, li.reference, div.reference
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:0mm;
+       margin-left:36.0pt;
        text-align:justify;
-       page-break-after:avoid;
-       font-size:9.0pt;
-       font-family:Arial;}
-p.1erretraitjustifi, li.1erretraitjustifi, div.1erretraitjustifi
-       {margin-top:6.0pt;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
+       {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:14.2pt;
+       margin-left:54.0pt;
        text-align:justify;
-       text-indent:-14.2pt;
+       text-indent:-18.0pt;
        font-size:11.0pt;
        font-family:"Times New Roman";}
-p.ZonetatEnTte, li.ZonetatEnTte, div.ZonetatEnTte
+p.MsoListBullet4, li.MsoListBullet4, div.MsoListBullet4
        {margin-top:2.0pt;
-       margin-right:2.85pt;
+       margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:2.85pt;
-       text-align:center;
-       page-break-after:avoid;
-       font-size:36.0pt;
-       font-family:Arial;
-       text-transform:uppercase;
-       font-weight:bold;}
-p.DocTitle, li.DocTitle, div.DocTitle
+       margin-left:72.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListBullet5, li.MsoListBullet5, div.MsoListBullet5
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:0mm;
-       text-align:center;
-       font-size:22.0pt;
-       font-family:Arial;
-       font-variant:small-caps;
-       color:gray;
-       letter-spacing:4.0pt;
-       font-weight:bold;}
-p.DocDate, li.DocDate, div.DocDate
-       {margin-top:6.0pt;
+       margin-left:90.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
+       {margin-top:2.0pt;
        margin-right:0mm;
-       margin-bottom:6.0pt;
-       margin-left:0mm;
+       margin-bottom:2.0pt;
+       margin-left:36.0pt;
        text-align:justify;
+       text-indent:-18.0pt;
        font-size:11.0pt;
-       font-family:Arial;
-       layout-grid-mode:line;
-       font-weight:bold;}
-p.DocSubTitle, li.DocSubTitle, div.DocSubTitle
+       font-family:"Times New Roman";}
+p.MsoListNumber3, li.MsoListNumber3, div.MsoListNumber3
        {margin-top:2.0pt;
        margin-right:0mm;
        margin-bottom:2.0pt;
-       margin-left:0mm;
-       text-align:center;
-       line-height:12.0pt;
-       font-size:12.0pt;
-       font-family:Arial;
-       font-variant:small-caps;
-       color:gray;
-       letter-spacing:4.0pt;
-       font-weight:bold;}
- /* Page Definitions */
- @page Section1
-       {size:595.3pt 841.9pt;
-       margin:70.85pt 70.85pt 70.85pt 70.85pt;}
-div.Section1
-       {page:Section1;}
- /* List Definitions */
- ol
-       {margin-bottom:0mm;}
-ul
-       {margin-bottom:0mm;}
--->
-</style>
-
-</head>
-
-<body lang=EN-GB link=blue vlink=purple>
-
-<div class=Section1>
-
-<p class=DocTitle><span lang=FR style='font-variant:normal !important;
-text-transform:uppercase'>gLite Logging &amp; Bookkeeping Server</span></p>
-
-<h1><span lang=FR>1. </span><span lang=FR>Release Description</span></h1>
-
-<p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
-Server module v. 1.2.3. The following sections provide additional information about
-the release content, the module dependencies, the know bugs and issues and a
-list of bugs closed since the previous release. For information about
-installing and using the gLite Logging &amp; Bookkeeping Server, please refer
-to the gLite Installation and User Guides. </p>
-
-<h1><span lang=FR>2. </span><span lang=FR>Changes in this Release</span></h1>
-
-<p class=MsoNormal>This release introduces the following changes:</p>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<ul style='margin-top:0mm' type=disc>
- <li class=MsoNormal style='text-align:left'>All R-GMA service publishing
-     instances in the configuration template now have default values</li>
- <li class=MsoNormal>Bug fixes (see below for the complete lists)</li>
-</ul>
-
-<h1>3. Release contents</h1>
-
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.3 is
-composed of the following gLite components:</p>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=621
- style='width:466.1pt;border-collapse:collapse;border:none'>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>Component name</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>Version</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>File</span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.lb</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.3</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/installers/glite-lb_installer.sh</a>
-  </span></p>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.3-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.3-1.noarch.rpm</a></span></span></p>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt;color:windowtext;text-decoration:none'>apt-get install
-  glite-lb-config</span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.config</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.1</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/noarch/RPMS/glite-config-1.1.1-3.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/noarch/RPMS/glite-config-1.1.1-3.noarch.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.lb.client-interface</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.3</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.3-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.3-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>common</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.4</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>logger</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=IT style='font-size:
-  8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm"><span
-  lang=FR>http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm</span></a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.server</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>1.0.1</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
-  8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>server-bones</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>ws-interface</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.security.proxyrenewal</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.13</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.13-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.13-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.wms-utils.exception</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.wms-utils.jobid</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.security.voms</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.32</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.gridsite.core</span></p>
-  </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.5</span></p>
-  </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
-</table>
-
-<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
-
-<h1>4. Dependencies</h1>
-
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.2 module
-has the following dependencies:</p>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=621
- style='width:466.1pt;border-collapse:collapse;border:none'>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>Component name</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>Version</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>RPM file name</span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
-  style='font-size:8.0pt'>gLite Security Utilities</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/installers/glite-security-utils_installer.sh</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
-  style='font-size:8.0pt'>gLite </span><span style='font-size:8.0pt'>R-GMA </span><span
-  lang=EN-US style='font-size:8.0pt'>Service Publisher</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>4.2.0</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-rgma-servicetool_installer.sh">http://glite.web.cern.ch/glite/packages/R1.1/R20050430/installers/glite-rgma-servicetool_installer.sh</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>GPT</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>VDT 1.2.2</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-<span
-  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>VDT Globus Essentials</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>VDT 1.2.2</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-<span
-  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>MySQL-server</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-<span
-  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>MySQL-client</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-<span
-  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>ares</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>1.1.1</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-1.1.1-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-<span
-  lang=EN-GB>1.1.1</span>-EGEE.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>myproxy</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>1.14</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-<span
-  lang=EN-GB>1.14</span>-EGEE.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>perl-Expect.pm</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>1.01</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-1.01-9.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-<span
-  lang=EN-GB>1.01</span>-9.i386.rpm</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  8.0pt'>Java SDK/JRE</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>1.4.2</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'>http://java.sun.com/j2se/1.4.2/download.html</span></span></p>
-  </td>
- </tr>
-</table>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<h1>5. Known bugs and issues</h1>
-
-<p class=MsoNormal align=left style='text-align:left'>This release has the
-following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
-database hosted on the CERN Savannah system at <a
-href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
-.</p>
-
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+       margin-left:54.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListNumber4, li.MsoListNumber4, div.MsoListNumber4
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:72.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListNumber5, li.MsoListNumber5, div.MsoListNumber5
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:90.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoTitle, li.MsoTitle, div.MsoTitle
+       {margin-top:12.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:0mm;
+       text-align:center;
+       font-size:16.0pt;
+       font-family:Arial;
+       font-weight:bold;}
+p.MsoClosing, li.MsoClosing, div.MsoClosing
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:216.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoSignature, li.MsoSignature, div.MsoSignature
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:216.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
+       {margin-top:3.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListContinue, li.MsoListContinue, div.MsoListContinue
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListContinue2, li.MsoListContinue2, div.MsoListContinue2
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:36.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListContinue3, li.MsoListContinue3, div.MsoListContinue3
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:54.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListContinue4, li.MsoListContinue4, div.MsoListContinue4
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:72.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoListContinue5, li.MsoListContinue5, div.MsoListContinue5
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:90.0pt;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoMessageHeader, li.MsoMessageHeader, div.MsoMessageHeader
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:54.0pt;
+       text-align:justify;
+       text-indent:-54.0pt;
+       background:#CCCCCC;
+       border:none;
+       padding:0mm;
+       font-size:12.0pt;
+       font-family:Arial;}
+p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:0mm;
+       text-align:center;
+       font-size:12.0pt;
+       font-family:Arial;}
+p.MsoSalutation, li.MsoSalutation, div.MsoSalutation
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoDate, li.MsoDate, div.MsoDate
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyTextFirstIndent, li.MsoBodyTextFirstIndent, div.MsoBodyTextFirstIndent
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       text-indent:10.5pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyTextFirstIndent2, li.MsoBodyTextFirstIndent2, div.MsoBodyTextFirstIndent2
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       text-indent:10.5pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoNoteHeading, li.MsoNoteHeading, div.MsoNoteHeading
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyText2, li.MsoBodyText2, div.MsoBodyText2
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       line-height:200%;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyText3, li.MsoBodyText3, div.MsoBodyText3
+       {margin-top:2.5pt;
+       margin-right:0mm;
+       margin-bottom:2.5pt;
+       margin-left:0mm;
+       text-align:justify;
+       page-break-after:avoid;
+       font-size:10.0pt;
+       font-family:Arial;}
+p.MsoBodyTextIndent2, li.MsoBodyTextIndent2, div.MsoBodyTextIndent2
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       line-height:200%;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.MsoBodyTextIndent3, li.MsoBodyTextIndent3, div.MsoBodyTextIndent3
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       font-size:8.0pt;
+       font-family:"Times New Roman";}
+p.MsoBlockText, li.MsoBlockText, div.MsoBlockText
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       text-indent:17.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+a:link, span.MsoHyperlink
+       {color:blue;
+       text-decoration:underline;}
+a:visited, span.MsoHyperlinkFollowed
+       {color:purple;
+       text-decoration:underline;}
+p.MsoDocumentMap, li.MsoDocumentMap, div.MsoDocumentMap
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       background:navy;
+       font-size:11.0pt;
+       font-family:Tahoma;}
+p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:10.0pt;
+       font-family:"Courier New";}
+p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p
+       {margin-top:5.0pt;
+       margin-right:0mm;
+       margin-bottom:5.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:12.0pt;
+       font-family:"Times New Roman";}
+address
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:"Times New Roman";
+       font-style:italic;}
+pre
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:10.0pt;
+       font-family:"Courier New";}
+tt
+       {font-family:"Courier New";}
+p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:10.0pt;
+       font-family:"Times New Roman";
+       font-weight:bold;}
+p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:8.0pt;
+       font-family:Tahoma;}
+p.3eretraitnormal, li.3eretraitnormal, div.3eretraitnormal
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:102.9pt;
+       text-align:justify;
+       text-indent:-17.85pt;
+       font-size:12.0pt;
+       font-family:"Times New Roman";}
+p.2eretraitjustifi, li.2eretraitjustifi, div.2eretraitjustifi
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:40.0mm;
+       text-align:justify;
+       text-indent:-7.1pt;
+       line-height:12.0pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.2eretraitnormal, li.2eretraitnormal, div.2eretraitnormal
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:3.0pt;
+       margin-left:18.0pt;
+       text-align:justify;
+       text-indent:-18.0pt;
+       font-size:12.0pt;
+       font-family:"Times New Roman";}
+p.1erretraitnormal, li.1erretraitnormal, div.1erretraitnormal
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:12.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:12.0pt;
+       font-family:"Times New Roman";}
+p.titrebloc, li.titrebloc, div.titrebloc
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:Arial;
+       font-weight:bold;}
+p.TitreTable, li.TitreTable, div.TitreTable
+       {margin-top:6.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:center;
+       font-size:12.0pt;
+       font-family:Arial;
+       font-weight:bold;}
+p.form, li.form, div.form
+       {margin-top:6.0pt;
+       margin-right:7.05pt;
+       margin-bottom:0mm;
+       margin-left:0mm;
+       margin-bottom:.0001pt;
+       text-align:justify;
+       background:black;
+       border:none;
+       padding:0mm;
+       font-size:14.0pt;
+       font-family:"Univers \(W1\)";
+       color:white;
+       text-transform:uppercase;
+       font-weight:bold;}
+p.HB, li.HB, div.HB
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:12.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       page-break-after:avoid;
+       font-size:12.0pt;
+       font-family:"Times New Roman";
+       color:black;
+       font-weight:bold;}
+p.reference, li.reference, div.reference
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       page-break-after:avoid;
+       font-size:9.0pt;
+       font-family:Arial;}
+p.1erretraitjustifi, li.1erretraitjustifi, div.1erretraitjustifi
+       {margin-top:6.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:14.2pt;
+       text-align:justify;
+       text-indent:-14.2pt;
+       font-size:11.0pt;
+       font-family:"Times New Roman";}
+p.ZonetatEnTte, li.ZonetatEnTte, div.ZonetatEnTte
+       {margin-top:2.0pt;
+       margin-right:2.85pt;
+       margin-bottom:2.0pt;
+       margin-left:2.85pt;
+       text-align:center;
+       page-break-after:avoid;
+       font-size:36.0pt;
+       font-family:Arial;
+       text-transform:uppercase;
+       font-weight:bold;}
+p.DocTitle, li.DocTitle, div.DocTitle
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:center;
+       font-size:22.0pt;
+       font-family:Arial;
+       font-variant:small-caps;
+       color:gray;
+       letter-spacing:4.0pt;
+       font-weight:bold;}
+p.DocDate, li.DocDate, div.DocDate
+       {margin-top:6.0pt;
+       margin-right:0mm;
+       margin-bottom:6.0pt;
+       margin-left:0mm;
+       text-align:justify;
+       font-size:11.0pt;
+       font-family:Arial;
+       layout-grid-mode:line;
+       font-weight:bold;}
+p.DocSubTitle, li.DocSubTitle, div.DocSubTitle
+       {margin-top:2.0pt;
+       margin-right:0mm;
+       margin-bottom:2.0pt;
+       margin-left:0mm;
+       text-align:center;
+       line-height:12.0pt;
+       font-size:12.0pt;
+       font-family:Arial;
+       font-variant:small-caps;
+       color:gray;
+       letter-spacing:4.0pt;
+       font-weight:bold;}
+ /* Page Definitions */
+ @page Section1
+       {size:595.3pt 841.9pt;
+       margin:70.85pt 70.85pt 70.85pt 70.85pt;}
+div.Section1
+       {page:Section1;}
+ /* List Definitions */
+ ol
+       {margin-bottom:0mm;}
+ul
+       {margin-bottom:0mm;}
+-->
+</style>
 
-<ul style='margin-top:0mm' type=disc>
- <li class=MsoNormal style='text-align:left'>If the mysql root password is set
-     and it is not specified in the mysql.conf file, the configuration script
-     fails. This bug will be fixed in the next release</li>
- <li class=MsoNormal style='text-align:left'>No removal procedure is provided
-     with this release apart from the removal of the RPMS. Any account, group
-     or other resource created during the module configuration must be manually
-     cleaned.</li>
-</ul>
+</head>
 
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+<body lang=EN-GB link=blue vlink=purple>
 
-<p class=MsoNormal align=left style='text-align:left'>Known open bugs:</p>
+<div class=Section1>
 
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+<p class=DocTitle><span lang=FR style='font-variant:normal !important;
+text-transform:uppercase'>gLite Logging &amp; Bookkeeping Server</span></p>
 
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
- style='border-collapse:collapse;border:none'>
- <tr>
-  <td width=59 valign=top style='width:44.35pt;border:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7053</span></a></span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
-  style='color:windowtext;text-decoration:none'>LB configuration fails if the
-  mysql root pwd is set</span></a>&nbsp;</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7237</span></a></span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
-  style='color:windowtext;text-decoration:none'>Intermittent errors with job
-  submission</span></a>&nbsp;</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7300</span></a></span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
-  style='color:windowtext;text-decoration:none'>update of the lb instructions
-  at the end of the installer script </span></a>&nbsp;</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7305</span></a></span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
-  style='color:windowtext;text-decoration:none'>lb.database.username paramenter
-  in config file</span></a>&nbsp;</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7307</span></a></span></p>
-  </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
-  style='color:windowtext;text-decoration:none'>lb config script does _not_
-  fail if mysql root password is set</span></a>&nbsp;</span></p>
-  </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
+<h1><span lang=FR>1. </span><span lang=FR>Release Description</span></h1>
+
+<p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
+Server module v. 2.0.2. The following sections provide additional information about
+the release content, the module dependencies, the know bugs and issues and a
+list of bugs closed since the previous release. For information about
+installing and using the gLite Logging &amp; Bookkeeping Server, please refer
+to the gLite Installation and User Guides. </p>
+
+<h1 style='margin-left:0mm;text-indent:0mm'><span lang=FR>2. </span><span
+lang=FR>Changes in this release</span></h1>
+
+<h2><span lang=FR>2.1. </span><span lang=FR>Changes in functionality</span></h2>
+
+<p class=MsoNormal><span lang=EN-US>The mysql database can now be protected
+with a root password. The mysql root password can be set in the configuration
+file.</span></p>
+
+<h2>2.2. Changes in Configuration</h2>
+
+<p class=MsoNormal><span lang=EN-US>The following new parameters have been
+added to the glite-security-utils.cfg.xml file:</span></p>
+
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width=185 valign=top style='width:138.8pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7324</span></a></span></p>
+  <p class=MsoNormal><b><span lang=EN-US>Parameter name</span></b></p>
   </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
-  style='color:windowtext;text-decoration:none'>lb-bkserver is running with no
-  pid</span></a>&nbsp;</span></p>
+  <td width=101 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span lang=EN-US>Default value</span></b></p>
   </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <td width=333 valign=top style='width:249.7pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span lang=EN-US>Description</span></b></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7389</span></a></span></p>
+  <td width=185 valign=top style='width:138.8pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US>mysql.root.password</span></p>
   </td>
-  <td width=543 valign=top style='width:407.6pt;border-top:none;border-left:
+  <td width=101 valign=top style='width:75.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
-  style='color:windowtext;text-decoration:none'>LB server and WMS local logger
-  related issues</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><span lang=EN-US>&lt;changeme&gt;</span></p>
   </td>
-  <td width=17 valign=top style='width:12.45pt;border-top:none;border-left:
+  <td width=333 valign=top style='width:249.7pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal><span lang=EN-US>The mysql root password</span></p>
   </td>
  </tr>
 </table>
 
-<p class=MsoNormal>&nbsp;</p>
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
 
-<p class=MsoNormal>Bugs fixed in this or previous releases, but not yet officially
-tested:</p>
+<p class=MsoNormal><span lang=EN-US>The following parameters have been changed
+in the glite-security-utils.cfg.xml file:</span></p>
 
-<p class=MsoNormal>&nbsp;</p>
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
 
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=57 valign=top style='width:43.05pt;border:solid windowtext 1.0pt;
+  <td width=134 valign=top style='width:100.5pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  <p class=MsoNormal><b><span lang=EN-US>Parameter name</span></b></p>
   </td>
-  <td width=536 valign=top style='width:401.8pt;border:solid windowtext 1.0pt;
+  <td width=210 valign=top style='width:157.45pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  <p class=MsoNormal><b><span lang=EN-US>Old value</span></b></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  <td width=141 valign=top style='width:105.45pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6412</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
-  style='color:windowtext;text-decoration:none'>--start and --stop options not
-  documented in glite-ce-config.py, glite-lb-config.py</span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6722</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
-  style='color:windowtext;text-decoration:none'>glite-job-status -all doesn't
-  work</span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7151"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7151</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7151"><span
-  style='color:windowtext;text-decoration:none'>There are conflicts when
-  installing WMS and LB on the same node</span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7180</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
-  style='color:windowtext;text-decoration:none'>Logging &amp; Bookkeping UI </span></a>&nbsp;</span></p>
+  <p class=MsoNormal><b><span lang=EN-US>New value</span></b></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <td width=135 valign=top style='width:101.0pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span lang=EN-US>Description</span></b></p>
   </td>
  </tr>
+</table>
+
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
+
+<p class=MsoNormal><span lang=EN-US>The following new parameters have been
+removed from the glite-security-utils.cfg.xml file:</span></p>
+
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7321</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=185 valign=top style='width:138.8pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
-  style='color:windowtext;text-decoration:none'>creation of indices fails
-  randomly</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><b><span lang=EN-US>Parameter name</span></b></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <td width=333 valign=top style='width:249.7pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span lang=EN-US>Comment</span></b></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7884"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7884</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7884"><span
-  style='color:windowtext;text-decoration:none'>local header files distributed
-  in RPMs. </span></a>&nbsp;</span></p>
+  <td width=185 valign=top style='width:138.8pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US>lb.database.name</span></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  <td width=333 valign=top style='width:249.7pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal><span lang=EN-US>The LB database name cannot be configured
+  internally, therefore this parameter was ignored</span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7910"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7910</span></a></span></p>
-  </td>
-  <td width=536 valign=top style='width:401.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7910"><span
-  style='color:windowtext;text-decoration:none'>Duplicate apostroph in MySQL
-  calls</span></a>&nbsp;</span></p>
+  <td width=185 valign=top style='width:138.8pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US>lb.database.username</span></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  <td width=333 valign=top style='width:249.7pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal><span lang=EN-US>The LB database user cannot be configured
+  internally, therefore this parameter was ignored</span></p>
   </td>
  </tr>
 </table>
 
-<p class=MsoNormal align=left style='margin:0mm;margin-bottom:.0001pt;
-text-align:left;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;
-font-family:"Courier New"'>&nbsp;</span></p>
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
 
-<h1>6. Bugs closed since last release</h1>
+<h1>3. Release contents</h1>
 
-<p class=MsoNormal align=left style='text-align:left'>This release fixes the
-following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
-database hosted on the CERN Savannah system at <a
-href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
- </p>
+<h2><a name="_Ref114562685">3.1. Glite sub-deployment modules</a></h2>
 
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+<p class=MsoNormal>The gLite Logging and Bookkeeping module requires the
+following sub-modules:</p>
 
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
- style='border-collapse:collapse;border:none'>
+<p class=MsoNormal>&nbsp;</p>
+
+<p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>-<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>gLite Security Utilities</p>
+
+<p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>-<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>gLite R-GMA Servicetool</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<p class=MsoNormal>The sub-modules are automatically installed with the LB
+module. For more information about these sub-modules please refer to the
+specific release notes and installation instructions.</p>
+
+<h2>3.2. Glite RPMS</h2>
+
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 2.0.2 is
+composed of the following gLite components:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.36%;border-collapse:collapse;border:none'>
  <tr>
-  <td width=87 valign=top style='width:64.95pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:8.0pt'>Component name</span></b></p>
   </td>
-  <td width=533 valign=top style='width:399.45pt;border:solid windowtext 1.0pt;
+  <td width="22%" valign=top style='width:22.8%;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:8.0pt'>Description</span></b></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5850</span></a></span></p>
+  <td width="10%" valign=top style='width:10.66%;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:8.0pt'>Version</span></b></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py has
-  glite.location and globus.location not set in params[]</span></a>&nbsp;</span></p>
+  <td width="45%" valign=top style='width:45.6%;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:8.0pt'>File</span></b></p>
   </td>
  </tr>
  <tr>
-  <td width=87 valign=top style='width:64.95pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5901</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-config</span></p>
   </td>
-  <td width=533 valign=top style='width:399.45pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
-  style='color:windowtext;text-decoration:none'>mysqlaccess command fails with
-  Broken pipe if mysql socket file is in /tmp </span></a>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5908</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
-  style='color:windowtext;text-decoration:none'>Environment variables set via
-  the configuration script are not passed to daemon startup scripts</span></a>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6057</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
-  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
-  has missing dependency (CGI.pm)</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gLite configuration scripts</span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6075</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
-  KeyError: GLITE_CERT_DIR</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.4.5</span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6190"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6190</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6190"><span
-  style='color:windowtext;text-decoration:none'>LB local logger doesn't start
-  on the CE node</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-config-1.4.2-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-config-1.4.2-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6366</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
-  style='color:windowtext;text-decoration:none'>LB install script:: Fails but
-  no error reported</span></a>&nbsp;</span></p>
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-client-interface</span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6415</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>L&amp;B client library
+  header files</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserver does not
-  start and blocks execution of glite-lb-config.py</span></a>&nbsp;</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>2.0.0</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-client-interface-2.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-client-interface-2.0.0-1.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-common</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7296</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>L&amp;B common subroutines
+  library</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
-  a TypeError exception</span></a>&nbsp;</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>2.0.1</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-common-2.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-common-2.0.1-1.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-config</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7753"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7753</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gLite Logging and
+  Bookkeeping node configuration files</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7753"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py fails with
-  an indentation error</span></a>&nbsp;</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>2.0.1</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-lb-config-2.0.1-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-lb-config-2.0.1-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-logger</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7976"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7976</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>L&amp;B local logger</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7976"><span
-  style='color:windowtext;text-decoration:none'>edg-job-status not working with
-  voms proxies</span></a>&nbsp;</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.1.2</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-logger-1.1.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-logger-1.1.2-1.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-server</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=8094"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#8094</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>L&amp;B bookkeeping server</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=8094"><span
-  style='color:windowtext;text-decoration:none'>interlogd on the WMS doesn't
-  restart</span></a>&nbsp;</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.2.5</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-server-1.2.5-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-server-1.2.5-1.i386.rpm</a></span></p>
   </td>
  </tr>
-</table>
-
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
-
-<b><span style='font-size:12.0pt;font-family:Arial;text-transform:uppercase;
-layout-grid-mode:line'><br clear=all style='page-break-before:always'>
-</span></b>
-
-<h1>7. Previous Releases</h1>
-
-<h2>7.1. Release 1.2.2</h2>
-
-<h3><span lang=FR>7.1.1. </span><span lang=FR>Release Description</span></h3>
-
-<p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
-Server module v. 1.2.2. The following sections provide additional information
-about the release content, the module dependencies, the know bugs and issues
-and a list of bugs closed since the previous release. For information about
-installing and using the gLite Logging &amp; Bookkeeping Server, please refer
-to the gLite Installation and User Guides. </p>
-
-<h3><span lang=FR>7.1.2. </span><span lang=FR>Changes in this Release</span></h3>
-
-<p class=MsoNormal>This release introduces the following changes:</p>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<ul style='margin-top:0mm' type=disc>
- <li class=MsoNormal>Implemented status method</li>
- <li class=MsoNormal>Added definition of PERL5LIB env var</li>
- <li class=MsoNormal>Stopping and starting the database before the index
-     creation (just after the database is created and the user granted) to fix
-     access denied error</li>
- <li class=MsoNormal>Moved creation of indices inside database creation (if
-     database exists indices must not be recreated)</li>
- <li class=MsoNormal>GLITE_USER parameter is not exposed anymore in the
-     configuration file; instead the module uses the same user parameters as
-     WMS to allow installation on same node</li>
- <li class=MsoNormal>LB admin tools are now installed in sbin, not in bin</li>
- <li class=MsoNormal>Bug fixes (see below for the complete lists)</li>
-</ul>
-
-<h3>7.1.3. Release contents</h3>
-
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.2 is
-composed of the following gLite components:</p>
-
-<p class=MsoNormal>&nbsp;</p>
-
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=621
- style='width:466.1pt;border-collapse:collapse;border:none'>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-server-bones</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>Component name</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>L&amp;B server bones</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>Version</span></p>
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>2.0.0</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>File</span></p>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-server-bones-2.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-server-bones-2.0.0-1.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.lb</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-lb-ws-interface</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.2</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>&nbsp;</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-lb_installer.sh</a>
-  </span></p>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.2-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.2-1.noarch.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>2.0.0</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-ws-interface-2.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-lb-ws-interface-2.0.0-1.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.config</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-rgma-api-java</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
+  <p class=MsoNormal><span lang=IT style='font-size:8.0pt'>Java API for R-GMA</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-config-1.0.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-config-1.0.0-1.noarch.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.5</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-api-java-4.1.5-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-api-java-4.1.5-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.client-interface</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-rgma-base</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.2</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>R-GMA basic configuration
+  and documentation</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.2-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.19</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-base-4.1.19-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-base-4.1.19-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>common</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-rgma-common-config</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.4</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gLite rgma common
+  configuration items installation</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>5.0.0</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-common-config-5.0.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-common-config-5.0.0-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>logger</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-rgma-servicetool</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>R-GMA service tool</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=IT style='font-size:
-  8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm"><span
-  lang=FR>http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm</span></a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.19</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-servicetool-4.1.19-3.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-servicetool-4.1.19-3.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.server</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-rgma-servicetool-config</span></p>
+  </td>
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gLite R-GMA servicetool
+  installation</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>1.0.1</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>5.1.0</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
-  8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-servicetool-config-5.1.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-servicetool-config-5.1.0-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>server-bones</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>glite-rgma-stubs-servlet-java</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>Java client implementation
+  stubs for R-GMA</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.13</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-stubs-servlet-java-4.1.13-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-rgma-stubs-servlet-java-4.1.13-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
-  lang=EN-US style='font-size:8.0pt'>ws-interface</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-security-gsoap-plugin</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gSOAP plugin and gss
+  libraries</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.1.1</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-security-gsoap-plugin-1.1.1-0.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-security-gsoap-plugin-1.1.1-0.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.security.proxyrenewal</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-security-trustmanager</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.11</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>The java certificate path
+  checkin for proxy certs in SSL with plugins for tomcat and axis.</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.11-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.11-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.7.3</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-trustmanager-1.7.3-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-trustmanager-1.7.3-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.wms-utils.exception</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-security-util-java</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>The java utilities library
+  for security</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.1.2</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-util-java-1.1.2-2.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-util-java-1.1.2-2.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.wms-utils.jobid</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-security-utils-config</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>gLite Security Utilities
+  configuration files</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.0.4</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-utils-config-1.0.4-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/noarch/RPMS/glite-security-utils-config-1.0.4-1.noarch.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.security.voms</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-security-voms-api-c</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.32</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>&nbsp;</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.6.3</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-security-voms-api-c-1.6.3-0.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-security-voms-api-c-1.6.3-0.i386.rpm</a></span></p>
   </td>
  </tr>
  <tr>
-  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  <td width="20%" valign=top style='width:20.94%;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.gridsite.core</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>glite-wms-utils-exception</span></p>
   </td>
-  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  <td width="22%" valign=top style='width:22.8%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.5</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>&nbsp;</span></p>
   </td>
-  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  <td width="10%" valign=top style='width:10.66%;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.0.2</span></p>
+  </td>
+  <td width="45%" valign=top style='width:45.6%;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.4/R20050916/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.2-1.i386.rpm</a></span></p>
   </td>
  </tr>
 </table>
 
-<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
+<p class=MsoNormal>&nbsp;</p>
 
-<h3>7.1.4. Dependencies</h3>
+<h1>4. Dependencies</h1>
 
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.2 module
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 2.0.2 module
 has the following dependencies:</p>
 
 <p class=MsoNormal>&nbsp;</p>
@@ -1913,45 +1653,6 @@ has the following dependencies:</p>
  <tr>
   <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
-  style='font-size:8.0pt'>gLite Security Utilities</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-security-utils_installer.sh</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
-  style='font-size:8.0pt'>gLite </span><span style='font-size:8.0pt'>R-GMA </span><span
-  lang=EN-US style='font-size:8.0pt'>Service Publisher</span></p>
-  </td>
-  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>4.1.5</span></p>
-  </td>
-  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-rgma-servicetool_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-rgma-servicetool_installer.sh</a></span></span></p>
-  </td>
- </tr>
- <tr>
-  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
   8.0pt'>GPT</span></p>
   </td>
@@ -1963,10 +1664,14 @@ has the following dependencies:</p>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-<span
-  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
+  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -1983,10 +1688,14 @@ has the following dependencies:</p>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-<span
-  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
+  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -1998,15 +1707,19 @@ has the following dependencies:</p>
   <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.11</span></p>
   </td>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-<span
-  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
+  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -2018,15 +1731,19 @@ has the following dependencies:</p>
   <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.1.11</span></p>
   </td>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-<span
-  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
+  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -2043,10 +1760,14 @@ has the following dependencies:</p>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-1.1.1-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-<span
-  lang=EN-GB>1.1.1</span>-EGEE.i386.rpm</a></span></span></p>
+  lang=EN-GB>1.1.1</span>-EGEE.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -2063,10 +1784,14 @@ has the following dependencies:</p>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-<span
-  lang=EN-GB>1.14</span>-EGEE.i386.rpm</a></span></span></p>
+  lang=EN-GB>1.14</span>-EGEE.i386.rpm</a></span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -2083,10 +1808,14 @@ has the following dependencies:</p>
   <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:8.0pt'><a
+  <p class=MsoNormal style='text-autospace:ideograph-numeric'><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;
+  color:windowtext;text-decoration:none'>H</span></span><span
+  class=MsoHyperlink><span lang=EN-US style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-1.01-9.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-<span
-  lang=EN-GB>1.01</span>-9.i386.rpm</a></span></span></p>
+  lang=EN-GB>1.01</span>-9.i386.rpm</a></span></span><span class=MsoHyperlink><span
+  lang=EN-US style='font-size:1.0pt;font-family:ZWAdobeF;color:windowtext;
+  text-decoration:none'>H</span></span></p>
   </td>
  </tr>
  <tr>
@@ -2111,13 +1840,14 @@ has the following dependencies:</p>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<h3>7.1.5. Known bugs and issues</h3>
+<h1>5. Known bugs and issues</h1>
 
-<p class=MsoNormal align=left style='text-align:left'>This release has the
-following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
-database hosted on the CERN Savannah system at <a
-href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
-.</p>
+<p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric'>This
+release has the following bugs and issues. Bug numbers refer to the gLite Bug
+Tracking system database hosted on the CERN Savannah system at <span
+style='font-size:1.0pt;font-family:ZWAdobeF'>H</span><a
+href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a><span
+style='font-size:1.0pt;font-family:ZWAdobeF'>H</span> .</p>
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
 
@@ -2137,409 +1867,369 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=59 valign=top style='width:44.05pt;border:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
-  </td>
-  <td width=534 valign=top style='width:400.8pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
-  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6412</span></a></span></p>
-  </td>
-  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
-  style='color:windowtext;text-decoration:none'>--start and --stop options not
-  documented in glite-ce-config.py, glite-lb-config.py</span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7053</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
-  style='color:windowtext;text-decoration:none'>LB configuration fails if the
-  mysql root pwd is set</span></a>&nbsp;</span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7180</span></a></span></p>
-  </td>
-  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
-  style='color:windowtext;text-decoration:none'>Logging &amp; Bookkeping UI </span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7237</span></a></span></p>
-  </td>
-  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=59 valign=top style='width:44.15pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
-  style='color:windowtext;text-decoration:none'>Intermittent errors with job
-  submission</span></a>&nbsp;</span></p>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>Bug number</span></b></p>
   </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <td width=534 valign=top style='width:400.7pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>Description</span></b></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>&nbsp;</span></b></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7300</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>&nbsp;#7324</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
-  style='color:windowtext;text-decoration:none'>update of the lb instructions
-  at the end of the installer script </span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>lb-bkserver is
+  running with no pid</span></a>&nbsp;</span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7305</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9148"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>&nbsp;#9148</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
-  lang=IT style='color:windowtext;text-decoration:none'>lb.database.username
-  paramenter in config file</span></a></span><span lang=IT style='font-size:
-  10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9148"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>Job stays
+  'Submitted' forever</span></a>&nbsp;</span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=IT style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
-  lang=IT style='color:windowtext;text-decoration:none'>&nbsp;</span><span
-  style='color:windowtext;text-decoration:none'>#7307</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9701"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>&nbsp;#9701</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
-  style='color:windowtext;text-decoration:none'>lb config script does _not_
-  fail if mysql root password is set</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9701"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>erroneous rpath
+  in several shared objects</span></a>&nbsp;</span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7321</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9777"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>&nbsp;#9777</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
-  style='color:windowtext;text-decoration:none'>creation of indices fails
-  randomly</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9777"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>unable to get
+  logging-info -2 info for 1000 jobs</span></a>&nbsp;</span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7324</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=10781"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>&nbsp;#10781</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
-  style='color:windowtext;text-decoration:none'>lb-bkserver is running with no
-  pid</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=10781"><span
+  style='font-size:11.0pt;color:#333333;text-decoration:none'>Missing the
+  timestamps of 'Scheduled' and 'Running' status</span></a>&nbsp;</span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
-  </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7389</span></a></span></p>
-  </td>
-  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
-  style='color:windowtext;text-decoration:none'>LB server and WMS local logger
-  related issues</span></a>&nbsp;</span></p>
-  </td>
-  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
 </table>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<p class=MsoNormal>Bugs fixed in this or previous releases, but not yet
-officially tested:</p>
+<p class=MsoNormal>Bugs fixed in this or previous releases, but not yet officially
+tested:</p>
 
 <p class=MsoNormal>&nbsp;</p>
 
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=58 valign=top style='width:43.3pt;border:solid windowtext 1.0pt;
+  <td width=57 valign=top style='width:42.6pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:10.0pt;color:#333333'>Bug number</span></b></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border:solid windowtext 1.0pt;
+  <td width=536 valign=top style='width:402.25pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:10.0pt;color:#333333'>Description</span></b></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><b><span
+  style='font-size:10.0pt;color:#333333'>&nbsp;</span></b></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5850</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#7053</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py has
-  glite.location and globus.location not set in params[]</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:#333333;text-decoration:none'>LB configuration fails if the
+  mysql root pwd is set</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5908</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#7300</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
-  style='color:windowtext;text-decoration:none'>Environment variables set via
-  the configuration script are not passed to daemon startup scripts</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
+  style='color:#333333;text-decoration:none'>update of the lb instructions at
+  the end of the installer script </span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6075</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#7305</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
-  KeyError: GLITE_CERT_DIR</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
+  style='color:#333333;text-decoration:none'>lb.database.username paramenter in
+  config file</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6366</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#7307</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
-  style='color:windowtext;text-decoration:none'>LB install script:: Fails but
-  no error reported</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
+  style='color:#333333;text-decoration:none'>lb config script does _not_ fail
+  if mysql root password is set</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6415</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
+  style='color:#333333;text-decoration:none'>#7237</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserver does not
-  start and blocks execution of glite-lb-config.py</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
+  style='color:#333333;text-decoration:none'>Intermittent errors with job
+  submission</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6689"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6689</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7910"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#7910</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6689"><span
-  style='color:windowtext;text-decoration:none'>glite-proxy-renewd starts the
-  daemon glite-proxy-renewd as GLITE_USER which is glite-lb i.e. wrong</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7910"><span
+  style='color:#333333;text-decoration:none'>Duplicate apostroph in MySQL calls</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6722</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=8630"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#8630</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
-  style='color:windowtext;text-decoration:none'>glite-job-status -all doesn't
-  work</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=8630"><span
+  style='color:#333333;text-decoration:none'>EDG_WL_* variables in LB library</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7296</span></a></span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9135"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#9135</span></a></span></p>
   </td>
-  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
-  a TypeError exception</span></a>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9135"><span
+  style='color:#333333;text-decoration:none'>The interlogd has problem sending
+  event to the LB server</span></a>&nbsp;</span></p>
   </td>
   <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9183"><span
+  style='color:#333333;text-decoration:none'>&nbsp;#9183</span></a></span></p>
+  </td>
+  <td width=536 valign=top style='width:402.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9183"><span
+  style='color:#333333;text-decoration:none'>Broken connections in LB contect
+  connection pool</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt;color:#333333'>&nbsp;</span></p>
   </td>
  </tr>
 </table>
@@ -2548,183 +2238,162 @@ officially tested:</p>
 text-align:left;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;
 font-family:"Courier New"'>&nbsp;</span></p>
 
-<h3>7.1.6. Bugs closed since last release</h3>
+<h1>6. Bugs closed since last release</h1>
 
-<p class=MsoNormal align=left style='text-align:left'>This release fixes the
-following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
-database hosted on the CERN Savannah system at <a
-href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
- </p>
+<p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric'>This
+release fixes the following bugs and issues. Bug numbers refer to the gLite Bug
+Tracking system database hosted on the CERN Savannah system at <span
+style='font-size:1.0pt;font-family:ZWAdobeF'>H</span><a
+href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a><span
+style='font-size:1.0pt;font-family:ZWAdobeF'>H</span>  </p>
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
 
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=103 valign=top style='width:77.45pt;border:solid windowtext 1.0pt;
+  <td width=64 valign=top style='width:47.8pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>Bug number</span></b></p>
+  </td>
+  <td width=529 valign=top style='width:397.05pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>Description</span></b></p>
   </td>
-  <td width=516 valign=top style='width:386.95pt;border:solid windowtext 1.0pt;
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  <p class=MsoNormal><b><span style='font-size:10.0pt'>&nbsp;</span></b></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5833</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
-  style='color:windowtext;text-decoration:none'>all jobs in SUBMITTED after a
-  job storm</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6722</span></a></span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5897</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>glite-job-status -all doesn't
+  work</span></a>&nbsp;</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
-  style='color:windowtext;text-decoration:none'>I20041203 LB installation
-  script has a missing dependency </span></a>&nbsp;</span></p>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5910</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
-  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
-  don't set GLITE_USER environment</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7151"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7151</span></a></span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5925</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7151"><span
+  style='color:windowtext;text-decoration:none'>There are conflicts when
+  installing WMS and LB on the same node</span></a>&nbsp;</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
-  style='color:windowtext;text-decoration:none'>Running glite-lb script removes
-  mysql.sock file </span></a>&nbsp;</span></p>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#6416</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
-  style='color:windowtext;text-decoration:none'>the BKserver on the LB machine
-  needs a symlink and the script doesn't check for it</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7180</span></a></span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7032</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>Logging &amp; Bookkeping UI </span></a>&nbsp;</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
-  style='color:windowtext;text-decoration:none'>The LB installer fails with an
-  RPM not found message</span></a>&nbsp;</span></p>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7152"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7152</span></a></span></p>
-  </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7152"><span
-  style='color:windowtext;text-decoration:none'>The LB installer tries to
-  install gridsite with a wrong rpm name</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7389</span></a></span></p>
   </td>
- </tr>
- <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7351"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7351</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
+  style='color:windowtext;text-decoration:none'>LB server and WMS local logger
+  related issues</span></a>&nbsp;</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7351"><span
-  style='color:windowtext;text-decoration:none'>Star/restart of LB services </span></a>&nbsp;</span></p>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7401"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7401</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7884"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7884</span></a></span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7401"><span
-  style='color:windowtext;text-decoration:none'>The first time the LB config
-  script is run it fails creating the db indices</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7884"><span
+  style='color:windowtext;text-decoration:none'>local header files distributed
+  in RPMs. </span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7423"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#7423</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9861"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#9861</span></a></span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td width=529 valign=top style='width:397.05pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7423"><span
-  style='color:windowtext;text-decoration:none'>'/etc/rc.d/init.d/gLite status'
-  not working correctly in LB</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=9861"><span
+  style='color:windowtext;text-decoration:none'>@ext.gpt.rpm.platform@ strings
+  in glite-lb_installer.sh</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
 </table>
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
 
-<p class=MsoNormal>&nbsp;</p>
-
 </div>
 
 </body>
index cfd9fe5..422c02c 100644 (file)
Binary files a/org.glite.deployment.lb/doc/release_notes/release_notes.pdf and b/org.glite.deployment.lb/doc/release_notes/release_notes.pdf differ
index 58569c4..f374002 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Apr 13 09:36:57 CEST 2005
-module.build=232
+#Wed Sep 21 12:15:44 CEST 2005
+module.build=304
index 93bb43a..b5184c8 100644 (file)
                                        age="@org.glite.wms-utils.exception.info.age@"
                                        build="@org.glite.wms-utils.exception.info.build@"
                                        arch="i386"/>
-       
-                               <component name="glite-security-proxyrenewal"
-                                       version="@org.glite.security.proxyrenewal.info.version@"
-                                       age="@org.glite.security.proxyrenewal.info.age@"
-                                       build="@org.glite.security.proxyrenewal.info.build@"
+                               
+                               <component name="glite-security-gsoap-plugin"
+                                       version="@org.glite.security.gsoap-plugin.info.version@"
+                                       age="@org.glite.security.gsoap-plugin.info.age@"
+                                       build="@org.glite.security.gsoap-plugin.info.build@"
                                        arch="i386"/>
-                               <component name="glite-security-voms"
-                    version="@org.glite.security.voms.info.version@"
-                    age="@org.glite.security.voms.info.age@"
-                    build="@org.glite.security.voms.info.build@"
+                               
+                               <component name="glite-security-voms-api-c"
+                    version="@org.glite.security.voms-api-c.info.version@"
+                    age="@org.glite.security.voms-api-c.info.age@"
+                    build="@org.glite.security.voms-api-c.info.build@"
                     arch="i386"/>
+
                 <component name="gridsite"
                     version="@org.gridsite.core.info.version@"
                     age="@org.gridsite.core.info.age@"
                                <external name="@ext.gpt.rpm.name@"
                                        version="@ext.gpt.rpm.version@"
                                        age="@ext.gpt.rpm.age@"
-                                       arch="@ext.gpt.rpm.platform@"/>
+                                       arch="@ext.gpt.platform@"/>
                                <external name="@ext.myproxy.rpm.name@"
-                                       version="@ext.myproxy.rpm.version@"
+                                       version="@ext.myproxy.version@"
                                        age="@ext.myproxy.rpm.age@"
-                                       arch="@ext.myproxy.rpm.platform@"/>
+                                       arch="@ext.myproxy.platform@"/>
                                <external name="@ext.perl-expect-pm.rpm.name@"
                                        version="@ext.perl-expect-pm.version@"
                                        age="@ext.perl-expect-pm.rpm.age@"
index e20f297..0bf5cc8 100644 (file)
@@ -137,11 +137,13 @@ function install()
                echo Done!
                echo
                echo Before using the gLite LB, please create or update the configuration
-               echo file /opt/glite/etc/config/glite-lb.cfg.xml
+               echo files /opt/glite/etc/config/glite-lb.cfg.xml
+               echo and /opt/glite/etc/config/glite-global.cfg.xml
                echo and run the configuration script
                echo /opt/glite/etc/config/scripts/glite-lb-config.py.
                echo A template is provided in
                echo /opt/glite/etc/config/templates/glite-lb.cfg.xml
+               echo Alternatively site configuration files can be used
        else
                echo
                echo An error occurred while installing the LB RPMS.
@@ -153,7 +155,7 @@ function install()
        echo For more information refer to the gLite Installation and User Guides
        echo or to the gLite web site \(http:\/\/www.glite.org\)
        echo Please report problems and comments to the gLite Team at
-       echo project-eu-egee-glite-bugs@cern.ch
+       echo glite-bugs@cern.ch
 
        cd ..
 }
index e0bd623..cc2ad84 100644 (file)
@@ -12,6 +12,7 @@
 
        <!-- global processing -->
        <xsl:template match="/">
+
 template pro_software_glite_lb;
 
 #
@@ -22,6 +23,12 @@ template pro_software_glite_lb;
 # glite-lb Quattor template v. <xsl:value-of select="/node/@version"/>
 #
 
+## CAs 
+               
+include pro_software_glite_CA;
+               
+               
+
 # Global dependencies  
                <xsl:for-each select="node/dependencies">
                        <xsl:apply-templates/>
@@ -39,6 +46,11 @@ template pro_software_glite_lb;
                                <xsl:apply-templates/>
                        </xsl:for-each>
 
+                       <xsl:for-each select="subservice">
+include pro_software_<xsl:value-of select="translate(@name, '-', '_')"/>;
+                       </xsl:for-each>                 
+                       
+
                </xsl:for-each>
        </xsl:template>
 
index 66a3e69..9a0479a 100644 (file)
@@ -1,4 +1,4 @@
 
-module.version = 1.3.0
+module.version = 2.0.2
 module.age = 1
                                
\ No newline at end of file
diff --git a/org.glite.jp.client/.cvsignore b/org.glite.jp.client/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp.client/Makefile b/org.glite.jp.client/Makefile
deleted file mode 100644 (file)
index 345a7c1..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-# defaults
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-jpprefix=jp
-package=glite-jp-client
-version=0.0.0
-PREFIX=/opt/glite
-
-glite_location=/opt/glite
-globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-expat_prefix=/opt/expat
-ares_prefix=/opt/ares
-gsoap_prefix=/software/gsoap-2.6
-
-CC=gcc
-
--include Makefile.inc
-
-
-VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/project:${stagedir}/interface
-
-GLOBUS_LIBS:=-L${globus_prefix}/lib \
-       -lglobus_common_${nothrflavour} \
-       -lglobus_gssapi_gsi_${nothrflavour}
-
-GLOBUS_CFLAGS:=-I${globus_prefix}/include/${nothrflavour}
-
-DEBUG:=-g -O0 -DDEBUG
-
-CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${gsoap_prefix}/include -I${stagedir}/include ${GLOBUS_CFLAGS}
-LDFLAGS:=-L${stagedir}/lib
-
-LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
-LTCOMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
-LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
-INSTALL:=libtool --mode=install install
-
-daemon:=glite-jp-importer
-
-wsprefix:=jpps_
-
-SRCS:= jpimporter.c \
-       ${wsprefix}ClientLib.c ${wsprefix}C.c
-#      env_C.c
-
-EXA_SRCS:=
-
-OBJS:=${SRCS:.c=.o}
-EXA_OBJS:=${EXA_SRCS:.c=.o}
-
-COMMONLIB:=-lglite_jp_common
-GSOAPLIB:=-lglite_security_gsoap_plugin_${nothrflavour} -lglite_security_gss_${nothrflavour} \
-       -L${gsoap_prefix}/lib -lgsoap${GSOAP_DEBUG} -L${ares_prefix}/lib -lares
-LBMAILDIRLIB:=-lglite_lb_maildir
-
-default all: compile
-
-compile: ${daemon} 
-
-${daemon}: ${OBJS}
-       ${LINK} -o $@ ${OBJS} ${LBMAILDIRLIB} ${COMMONLIB} ${GSOAPLIB} ${GLOBUS_LIBS}
-
-
-JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat
-       cp  ${stagedir}/interface/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h  -t ${top_srcdir}/src/typemap.dat -c -o $@ $<
-       rm -f JobProvenanceTypes.wsdl
-
-${wsprefix}Client.c ${wsprefix}ClientLib.c  \
-${wsprefix}C.c ${wsprefix}H.h: JobProvenancePS.xh
-       ${gsoap_prefix}/bin/soapcpp2 -n -w -c -p ${wsprefix} JobProvenancePS.xh
-
-env_C.c env_Server.c:
-       touch env.xh
-       cp  ${jpproject}/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h  -t ${top_srcdir}/src/typemap.dat -c -o env.xh JobProvenanceTypes.wsdl
-       rm -f JobProvenanceTypes.wsdl
-       ${gsoap_prefix}/bin/soapcpp2 -w -c -p env_ env.xh
-
-${OBJS}: ${wsprefix}H.h soap_version.h
-
-soap_version.h:
-       ${gsoap_prefix}/bin/soapcpp2 /dev/null
-       perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@
-       -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp
-
-
-
-
-check: 
-       -echo nothing yet
-
-doc:
-
-stage: compile
-       ${MAKE} PREFIX=${stagedir} DOSTAGE=yes install
-
-dist: distsrc distbin
-
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir}
-       save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir
-       rm -rf tmpbuilddir
-        
-install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/examples ${PREFIX}/etc/init.d
-       ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin
-
-clean:
-
-# we have no real config.h but have to force gSoap not to use
-# linux ftime with broken (aka obsolete) DST information
-stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c
-       test -f config.h || touch config.h
-       @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless'
-       ${CC} -o $@ -c -DWITH_NONAMESPACES -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c
-
-
-%.lo: %.c
-       ${LTCOMPILE} -o $@ -c $<
-
-%.o: %.c
-       ${LTCOMPILE} -o $@ -c $<
diff --git a/org.glite.jp.client/build.xml b/org.glite.jp.client/build.xml
deleted file mode 100755 (executable)
index 8a40155..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the GLite JP Primary module
--->
-
-<project name="client" default="dist">
-       
-       <!-- =========================================
-                Builds the gLite JP Primary Module
-            ========================================= -->
-       
-       <!-- =========================================
-            Import properties (order is important)
-            ========================================= -->
-
-       <!-- import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-                Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-       
-       <!-- =========================================
-                 Load configure options (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-                Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-                       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <import file="${global.targets-simple_make.file}" />
-
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-               
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-
-               <antcall target="lbmakefiles" />
-       </target>
-               
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-       
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.client/project/build.number b/org.glite.jp.client/project/build.number
deleted file mode 100644 (file)
index d794048..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=0
diff --git a/org.glite.jp.client/project/build.properties b/org.glite.jp.client/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.client/project/configure.properties.xml b/org.glite.jp.client/project/configure.properties.xml
deleted file mode 100644 (file)
index 3744be5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Configuration options for the gLite JP client module
--->
-
-       <!-- ======================================================
-         Define extra properties here ...
-         ====================================================== -->
-        
-       <project name="LB Common configuration options">                                                                        
-               <target name="lbmakefiles">
-                       <exec executable="ln" failonerror="true">
-                               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-                       </exec>
-                       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-lbprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-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}
-mysql_prefix=${with.mysql.prefix}
-mysql_version=${ext.mysql.version}
-thrflavour=${with.globus.thr.flavor}
-nothrflavour=${with.globus.nothr.flavor}
-cppunit=${with.cppunit.prefix}
-jpproject=${subsystem.project.dir}
-project=${component.project.dir}
-                       </echo>
-           </target>
-       </project>
diff --git a/org.glite.jp.client/project/properties.xml b/org.glite.jp.client/project/properties.xml
deleted file mode 100755 (executable)
index e2a32d0..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP Client component
--->
-
-<project name="JP Client component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-          Define corresponding subsystem properties
-                ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-          Define component properties
-                ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="client" />
-                       
-       <!-- ======================================================
-          Define general component properties
-                ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                
-                                                               
-</project>
diff --git a/org.glite.jp.client/project/tar_exclude b/org.glite.jp.client/project/tar_exclude
deleted file mode 100644 (file)
index e1fcd1a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-tar_exclude
-CVS
-build.xml
-build
-build.properties
-properties.xml
-configure.properties.xml
-.cvsignore
-.project
-.cdtproject
diff --git a/org.glite.jp.client/project/version.properties b/org.glite.jp.client/project/version.properties
deleted file mode 100644 (file)
index cd1e9e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=1
diff --git a/org.glite.jp.client/src/authz.c b/org.glite.jp.client/src/authz.c
deleted file mode 100644 (file)
index 3e6d6e4..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpps_H.h"
-
-int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner)
-{
-       glite_jp_error_t        err;
-       char    buf[200];
-       int     i;
-
-       memset(&err,0,sizeof err);
-       glite_jp_clear_error(ctx);
-       err.source = __FUNCTION__;
-       err.code = EPERM;
-       
-       switch (op) {
-               case SOAP_TYPE___jpsrv__RegisterJob:
-               case SOAP_TYPE___jpsrv__StartUpload:
-               case SOAP_TYPE___jpsrv__CommitUpload:
-                       for (i=0; ctx->trusted_peers && ctx->trusted_peers[i]; i++) 
-                               if (!strcmp(ctx->trusted_peers[i],ctx->peer)) return 0;
-                       err.desc = "you are not a trusted peer";
-                       return glite_jp_stack_error(ctx,&err);
-
-               case SOAP_TYPE___jpsrv__GetJob:
-                       assert(owner);
-                       return strcmp(owner,ctx->peer) ? glite_jp_stack_error(ctx,&err) : 0;
-                       break;
-
-               default:
-                       snprintf(buf,sizeof buf,"%d: unknown operation",op);
-                       err.desc = buf;
-                       err.code = EINVAL;
-                       return glite_jp_stack_error(ctx,&err);
-       }
-}
-
-int glite_jpps_readauth(glite_jp_context_t ctx,const char *file)
-{
-       FILE    *f = fopen(file,"r");
-       glite_jp_error_t        err;
-       int     cnt = 0;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       if (!f) {
-               err.code = errno;
-               err.desc = file;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       ctx->trusted_peers = NULL;
-       while (!feof(f)) {
-               char    buf[BUFSIZ];
-
-               if (fscanf(f,"%[^\n]\n",buf) != 1) {
-                       err.code = EINVAL;
-                       err.desc = file;
-                       fclose(f);
-                       return glite_jp_stack_error(ctx,&err);
-               }
-
-               ctx->trusted_peers = realloc(ctx->trusted_peers, (cnt+1) * sizeof *ctx->trusted_peers);
-               ctx->trusted_peers[cnt++] = strdup(buf);
-               ctx->trusted_peers[cnt] = NULL;
-       }
-       fclose(f);
-       return 0;
-}
diff --git a/org.glite.jp.client/src/authz.h b/org.glite.jp.client/src/authz.h
deleted file mode 100644 (file)
index 9451aef..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Check authorisation of JPPS operation on job.
- *
- * \param[in] ctx      JP context including peer name & other credentials (VOMS etc.)
- * \param[in] op       operation, one of SOAP_TYPE___jpsrv__*
- * \param[in] job      jobid of the job to decide upon
- * \param[in] owner    current known owner of the job (may be NULL), shortcut to avoid
- *                     unnecessary database query.
- *
- * \retval 0           OK, operation permitted
- * \retval EPERM       denied
- * \retval other       error
- */
-
-int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner);
-
-int glite_jpps_readauth(glite_jp_context_t ctx,const char *file);
-
diff --git a/org.glite.jp.client/src/backend.h b/org.glite.jp.client/src/backend.h
deleted file mode 100644 (file)
index cf901fb..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef __GLITE_JP_BACKEND
-#define __GLITE_JP_BACKEND
-
-#include <sys/types.h>
-#include <unistd.h>
-
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-);
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-);
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-);
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,      /* must be filesystem-friendly */
-       const char *name,       /* optional name within the class */
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-);
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-);
-
-int glite_jppsbe_get_names(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       char    ***names_out
-);
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job_out,
-       char **class_out,
-       char **name_out
-);
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* optional within class */
-       char **url_out
-);
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* optional within class */
-       int mode,
-       void **handle_out
-);
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-);
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-);
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-);
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-);
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-);
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-#endif
diff --git a/org.glite.jp.client/src/bones_server.c b/org.glite.jp.client/src/bones_server.c
deleted file mode 100644 (file)
index 8a47169..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "glite/lb/srvbones.h"
-#include "glite/security/glite_gss.h"
-
-#include <stdsoap2.h>
-#include "glite/security/glite_gsplugin.h"
-
-#include "backend.h"
-#include "file_plugin.h"
-
-#include "soap_version.h"
-#include "jpps_H.h"
-
-#define CONN_QUEUE     20
-
-extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[];
-
-static int newconn(int,struct timeval *,void *);
-static int request(int,struct timeval *,void *);
-static int reject(int);
-static int disconn(int,struct timeval *,void *);
-static int data_init(void **data);
-
-static struct glite_srvbones_service stab = {
-       "JP Primary Storage", -1, newconn, request, reject, disconn
-};
-
-static time_t cert_mtime;
-static char *server_cert, *server_key, *cadir;
-static gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL;
-static char *mysubj;
-
-static char *port = "8901";
-static int debug = 1;
-
-static glite_jp_context_t      ctx;
-
-static int call_opts(glite_jp_context_t,char *,char *,int (*)(glite_jp_context_t,int,char **));
-
-char *glite_jp_default_namespace;
-
-int main(int argc, char *argv[])
-{
-       int     one = 1,opt,i;
-       edg_wll_GssStatus       gss_code;
-       struct sockaddr_in      a;
-       char    *b_argv[20] = { "backend" },*p_argv[20] = { "plugins" },*com;
-       int     b_argc,p_argc;
-
-       glite_jp_init_context(&ctx);
-
-       b_argc = p_argc = 1;
-
-       while ((opt = getopt(argc,argv,"B:P:a:")) != EOF) switch (opt) {
-               case 'B':
-                       assert(b_argc < 20);
-                       if (com = strchr(optarg,',')) *com = 0;
-                       
-                       /* XXX: memleak -- who cares for once */
-                       asprintf(&b_argv[b_argc++],"-%s",optarg);
-                       if (com) b_argv[b_argc++] = com+1;
-
-                       break;
-               case 'P':
-                       assert(p_argc < 20);
-                       p_argv[p_argc++] = optarg;
-
-                       break;
-               case 'a':
-                       if (glite_jpps_readauth(ctx,optarg)) {
-                               fprintf(stderr,"%s: %s\n",argv[0],glite_jp_error_chain(ctx));
-                               exit (1);
-                       }
-                       break;
-               case '?': fprintf(stderr,"usage: %s: -Bb,val ... -Pplugin.so ...\n"
-                                         "b is backend option\n",argv[0]);
-                         exit (1);
-       }
-
-       if (b_argc == 1) {
-               fputs("-B required\n",stderr);
-               exit (1);
-       }
-       
-       optind = 0; /* XXX: getopt used internally */
-       if (glite_jppsbe_init(ctx,b_argc,b_argv)) {
-               fputs(glite_jp_error_chain(ctx), stderr);
-               exit(1);
-       }
-
-       optind = 0; /* XXX: getopt used internally */
-       if (b_argc > 1 && glite_jpps_fplug_load(ctx,p_argc,p_argv)) {
-               fputs(glite_jp_error_chain(ctx), stderr);
-               exit(1);
-       }
-
-       srand48(time(NULL)); /* feed id generation */
-
-#if GSOAP_VERSION <= 20602
-       for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"ns1"); i++);
-#else
-       for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"jpsrv"); i++);
-#endif
-       assert(jpps__namespaces[i].id);
-       glite_jp_default_namespace = jpps__namespaces[i].ns;
-
-       stab.conn = socket(PF_INET, SOCK_STREAM, 0);
-       if (stab.conn < 0) {
-               perror("socket");
-               return 1;
-       }
-
-       setsockopt(stab.conn,SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-
-       a.sin_family = AF_INET;
-       a.sin_addr.s_addr = INADDR_ANY;
-       a.sin_port = htons(atoi(port));
-       if (bind(stab.conn,(struct sockaddr *) &a, sizeof(a)) ) {
-               char    buf[200];
-
-               snprintf(buf,sizeof(buf),"bind(%d)",atoi(port));
-               perror(buf);
-               return 1;
-       }
-
-       if (listen(stab.conn,CONN_QUEUE)) {
-               perror("listen()");
-               return 1;
-       }
-
-       if (!server_cert || !server_key)
-               fprintf(stderr, "%s: WARNING: key or certificate file not specified, "
-                               "can't watch them for changes\n",
-                               argv[0]);
-
-       if ( cadir ) setenv("X509_CERT_DIR", cadir, 1);
-       edg_wll_gss_watch_creds(server_cert, &cert_mtime);
-
-       if ( !edg_wll_gss_acquire_cred_gsi(server_cert, server_key, &mycred, &mysubj, &gss_code)) 
-               fprintf(stderr,"Server idenity: %s\n",mysubj);
-       else fputs("WARNING: Running unauthenticated\n",stderr);
-
-       /* XXX: daemonise */
-
-       glite_srvbones_set_param(GLITE_SBPARAM_SLAVES_COUNT,1);
-       glite_srvbones_run(data_init,&stab,1 /* XXX: entries in stab */,debug);
-
-       return 0;
-}
-
-static int data_init(void **data)
-{
-       *data = (void *) soap_new();
-
-       printf("[%d] slave started\n",getpid());
-       glite_jppsbe_init_slave(ctx);   /* XXX: global but slave's */
-
-       return 0;
-}
-
-static int newconn(int conn,struct timeval *to,void *data)
-{
-       struct soap     *soap = (struct soap *) data;
-       glite_gsplugin_Context  plugin_ctx;
-
-       gss_cred_id_t           newcred = GSS_C_NO_CREDENTIAL;
-       edg_wll_GssStatus       gss_code;
-       gss_name_t              client_name = GSS_C_NO_NAME;
-       gss_buffer_desc         token = GSS_C_EMPTY_BUFFER;
-       OM_uint32               maj_stat,min_stat;
-
-
-       int     ret = 0;
-
-       soap_init2(soap,SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE);
-       soap_set_namespaces(soap,jpps__namespaces);
-       soap->user = (void *) ctx; /* XXX: one instance per slave */
-
-/* not yet: client to JP index
-       ctx->other_soap = soap_new();
-       soap_init(ctx->other_soap);
-       soap_set_namespaces(ctx->other_soap,jpis__namespaces);
-*/
-
-
-       glite_gsplugin_init_context(&plugin_ctx);
-       plugin_ctx->connection = calloc(1,sizeof *plugin_ctx->connection);
-       soap_register_plugin_arg(soap,glite_gsplugin,plugin_ctx);
-
-       switch (edg_wll_gss_watch_creds(server_cert,&cert_mtime)) {
-               case 0: break;
-               case 1: if (!edg_wll_gss_acquire_cred_gsi(server_cert,server_key,
-                                               &newcred,NULL,&gss_code))
-                       {
-
-                               printf("[%d] reloading credentials\n",getpid()); /* XXX: log */
-                               gss_release_cred(&min_stat,&mycred);
-                               mycred = newcred;
-                       }
-                       break;
-               case -1:
-                       printf("[%d] edg_wll_gss_watch_creds failed\n", getpid()); /* XXX: log */
-                       break;
-       }
-
-       /* TODO: DNS paranoia etc. */
-
-       if (edg_wll_gss_accept(mycred,conn,to,plugin_ctx->connection,&gss_code)) {
-               printf("[%d] GSS connection accept failed, closing.\n", getpid());
-               ret = 1;
-               goto cleanup;
-       }
-
-       maj_stat = gss_inquire_context(&min_stat,plugin_ctx->connection->context,
-                       &client_name, NULL, NULL, NULL, NULL, NULL, NULL);
-
-       if (!GSS_ERROR(maj_stat))
-               maj_stat = gss_display_name(&min_stat,client_name,&token,NULL);
-
-       if (ctx->peer) free(ctx->peer);
-       if (!GSS_ERROR(maj_stat)) {
-               printf("[%d] client DN: %s\n",getpid(),(char *) token.value); /* XXX: log */
-
-               ctx->peer = strdup(token.value);
-               memset(&token, 0, sizeof(token));
-       }
-       else {
-               printf("[%d] annonymous client\n",getpid());
-               ctx->peer = NULL;
-       }
-
-       if (client_name != GSS_C_NO_NAME) gss_release_name(&min_stat, &client_name);
-       if (token.value) gss_release_buffer(&min_stat, &token);
-
-       return 0;
-
-cleanup:
-       glite_gsplugin_free_context(plugin_ctx);
-       soap_end(soap);
-
-       return ret;
-}
-
-static int request(int conn,struct timeval *to,void *data)
-{
-       struct soap             *soap = data;
-       glite_jp_context_t      ctx = soap->user;
-
-       glite_gsplugin_set_timeout(glite_gsplugin_get_context(soap),to);
-
-/* FIXME: does not work, ask nykolas */
-       soap->max_keep_alive = 1;       /* XXX: prevent gsoap to close connection */ 
-       soap_begin(soap);
-       if (soap_begin_recv(soap)) {
-               if (soap->error < SOAP_STOP) {
-                       soap_send_fault(soap);
-                       return EIO;
-               }
-               return ENOTCONN;
-       }
-
-       if (soap_envelope_begin_in(soap)
-               || soap_recv_header(soap)
-               || soap_body_begin_in(soap)
-               || jpps__serve_request(soap)
-#if GSOAP_VERSION >= 20700
-               || (soap->fserveloop && soap->fserveloop(soap))
-#endif
-       )
-       {
-               soap_send_fault(soap);
-               return ctx->error->code;        /* XXX: shall we die on some errors? */
-       }
-
-       glite_jp_run_deferred(ctx);
-       return 0;
-}
-
-static int reject(int conn)
-{
-       int     flags = fcntl(conn, F_GETFL, 0);
-
-       fcntl(conn,F_SETFL,flags | O_NONBLOCK);
-       edg_wll_gss_reject(conn);
-
-       return 0;
-}
-
-static int disconn(int conn,struct timeval *to,void *data)
-{
-       struct soap     *soap = (struct soap *) data;
-       soap_end(soap); // clean up everything and close socket
-
-       return 0;
-}
-
-#define WSPACE "\t\n "
-
-static int call_opts(glite_jp_context_t ctx,char *opt,char *name,int (*f)(glite_jp_context_t,int,char **))
-{
-       int     ac = 1,ret,my_optind; 
-       char    **av = malloc(sizeof *av),*ap;
-
-       *av = name;
-       for (ap = strtok(opt,WSPACE); ap; ap = strtok(NULL,WSPACE)) {
-               av = realloc(av,(ac+1) * sizeof *av);
-               av[ac++] = ap;
-       }
-
-       my_optind = optind;
-       optind = 0;
-       ret = f(ctx,ac,av);
-       optind = my_optind;
-       free(av);
-       return ret;
-}
-
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
diff --git a/org.glite.jp.client/src/builtin_plugins.h b/org.glite.jp.client/src/builtin_plugins.h
deleted file mode 100644 (file)
index 3b2c201..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#define GLITE_JP_FILETYPE_TAGS "urn:org.glite.jp.primary:tags"
-#define GLITE_JP_FILETYPE_LB   "urn:org.glite.jp.primary:lb"
-#define GLITE_JP_FILETYPE_ISB  "urn:org.glite.jp.primary:isb"
-#define GLITE_JP_FILETYPE_OSB  "urn:org.glite.jp.primary:osb"
-
-#define GLITE_JP_FPLUG_TAGS_APPEND     0
diff --git a/org.glite.jp.client/src/db.h b/org.glite.jp.client/src/db.h
deleted file mode 100644 (file)
index 0b9f730..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef _DB_H
-#define _DB_H
-
-#ident "$Header$"
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct _glite_jp_db_stmt_t *glite_jp_db_stmt_t;
-
-int glite_jp_db_connect(
-       glite_jp_context_t,     /* INOUT: */
-       char *          /* IN: connect string user/password@host:database */
-);
-
-void glite_jp_db_close(glite_jp_context_t);
-
-
-/* Parse and execute SQL statement. Returns number of rows selected, created 
- * or affected by update, or -1 on error */
-
-int glite_jp_db_execstmt(
-       glite_jp_context_t,     /* INOUT: */
-       char *,         /* IN: SQL statement */
-       glite_jp_db_stmt_t *    /* OUT: statement handle. Usable for
-                                       select only */
-);
-
-
-/* Fetch next row of select statement. 
- * All columns are returned as fresh allocated strings 
- *
- * return values:
- *     >0 - number of fields of the retrieved row
- *      0 - no more rows
- *     -1 - error
- *
- * Errors are stored in context passed to previous glite_jp_db_execstmt() */
-
-int glite_jp_db_fetchrow(
-       glite_jp_db_stmt_t,     /* IN: statement */
-       char **         /* OUT: array of fetched values. 
-                        *      As number of columns is fixed and known,
-                        *      expects allocated array of pointers here */
-);
-
-/* Retrieve column names of a query statement */
-
-int glite_jp_db_querycolumns(
-       glite_jp_db_stmt_t,     /* IN: statement */
-       char **         /* OUT: result set column names. Expects allocated array. */
-);
-
-/* Free the statement structure */
-
-void glite_jp_db_freestmt(
-       glite_jp_db_stmt_t *    /* INOUT: statement */
-);
-
-
-/* convert time_t into database-specific time string 
- * returns pointer to static area that is changed by subsequent calls */
-
-char *glite_jp_db_timetodb(time_t);
-time_t glite_jp_db_dbtotime(char *);
-
-
-/**
- * Check database version.
- */
-int glite_jp_db_dbcheckversion(glite_jp_context_t);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/org.glite.jp.client/src/feed.c b/org.glite.jp.client/src/feed.c
deleted file mode 100644 (file)
index 5d39565..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <fcntl.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/strmd5.h"
-#include "feed.h"
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-
-
-/* 
- * seconds before feed expires: should be 
- * XXX: should be configurable, default for real deployment sort of 1 hour
- */
-#define FEED_TTL       120
-
-static int check_qry_item(
-               glite_jp_context_t ctx,
-               const glite_jp_query_rec_t    *qry,
-               const glite_jp_attrval_t *attr
-)
-{
-       int     cmp,cmp2;
-       long    scmp,ucmp;
-
-       switch (qry->attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TAG:
-                       cmp = strcmp(attr->value.s,qry->value.s);
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       scmp = (ucmp = attr->value.time.tv_usec - qry->value.time.tv_usec) > 0 ? 0 : -1;
-                       ucmp -= 1000000 * scmp;
-                       scmp += attr->value.time.tv_sec - qry->value.time.tv_sec;
-                       cmp = scmp ? scmp : ucmp;
-                       break;
-       }
-       switch (qry->op) {
-               case GLITE_JP_QUERYOP_EQUAL: return !cmp;
-               case GLITE_JP_QUERYOP_UNEQUAL: return cmp;
-               case GLITE_JP_QUERYOP_LESS: return cmp < 0;
-               case GLITE_JP_QUERYOP_GREATER: return cmp > 0;
-
-               case GLITE_JP_QUERYOP_WITHIN:
-                       switch (qry->attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                       case GLITE_JP_ATTR_TAG:
-                               cmp2 = strcmp(attr->value.s,qry->value2.s);
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               scmp = (ucmp = attr->value.time.tv_usec - qry->value2.time.tv_usec) > 0 ? 0 : -1;
-                               ucmp -= 1000000 * scmp;
-                               scmp += attr->value.time.tv_sec - qry->value2.time.tv_sec;
-                               cmp2 = scmp ? scmp : ucmp;
-                               break;
-                       }
-                       return cmp >= 0 && cmp2 <= 0;
-       }
-}
-
-/* XXX: limit on query size -- I'm lazy to malloc() */
-#define QUERY_MAX      100
-
-static int match_feed(
-               glite_jp_context_t ctx,
-               const struct jpfeed *feed,
-               const char *job,
-               const glite_jp_attrval_t attrs[] /* XXX: not checked for correctness */
-)
-{
-       int     i;
-       int     attri[GLITE_JP_ATTR__LAST];
-       int     qi[QUERY_MAX];
-
-       glite_jp_attrval_t *newattr = NULL;
-
-       glite_jp_clear_error(ctx);
-
-       for (i=0; i<GLITE_JP_ATTR__LAST; i++) attri[i] = -1;
-       for (i=0; attrs[i].attr.type; i++) attri[attrs[i].attr.type] = i;
-
-       if (feed->qry) {
-               int     j,complete = 1;
-
-               memset(qi,0,sizeof qi);
-               for (i=0; feed->qry[i].attr.type; i++) {
-                       assert(i<QUERY_MAX);
-                       if ((j=attri[feed->qry[i].attr.type]) >=0) {
-                               if (check_qry_item(ctx,feed->qry+i,attrs+j))
-                                       qi[i] = 1; /* matched */
-                               else return 0;  /* can't be satisfied */
-                       }
-                       else complete = 0;
-               }
-
-               /* not all attributes in query are known from input 
-                * we have to retrieve job metadata from the backend
-                */
-               if (!complete) {
-                       glite_jp_attrval_t      meta[GLITE_JP_ATTR__LAST+1];
-                       int     qai[GLITE_JP_ATTR__LAST];
-
-                       memset(meta,0,sizeof meta);
-                       j=0;
-                       for (i=0; feed->qry[i].attr.type; i++) if (!qi[i]) {
-                               meta[j].attr.type = feed->qry[i].attr.type;
-                               meta[j].attr.name = feed->qry[i].attr.name;
-                               qai[feed->qry[i].attr.type] = i;
-                               j++;
-                       }
-
-                       if (glite_jppsbe_get_job_metadata(ctx,job,meta)) {
-                               glite_jp_error_t        err;
-                               memset(&err,0,sizeof err);
-                               err.code = EIO;
-                               err.source = __FUNCTION__;
-                               err.desc = "complete query";
-                               return glite_jp_stack_error(ctx,&err);
-                       }
-
-                       for (i=0; j=meta[i].attr.type; i++)
-                               if (!check_qry_item(ctx,feed->qry+qai[j],meta+i))
-                                       return 0;
-               }
-       }
-
-       /* matched completely */
-       return glite_jpps_single_feed(ctx,feed->destination,job,attrs);
-       return 0;
-}
-
-int glite_jpps_match_attr(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t attrs[]
-)
-{
-       struct jpfeed   *f = (struct jpfeed *) ctx->feeds;
-       int     i,j;
-       int     attri[GLITE_JP_ATTR__LAST];
-
-       glite_jp_clear_error(ctx);
-
-       for (i=0; i<GLITE_JP_ATTR__LAST; i++) attri[i] = -1;
-       for (i=0; attrs[i].attr.type; i++) {
-               if (attrs[i].attr.type >= GLITE_JP_ATTR__LAST ||
-                               attrs[i].attr.type <= 0)
-               {
-                       glite_jp_error_t        err;
-                       memset(&err,0,sizeof err);
-                       err.code = EINVAL;
-                       err.source = __FUNCTION__;
-                       err.desc = "unknown attribute";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               if (attri[attrs[i].attr.type] >= 0) {
-                       glite_jp_error_t        err;
-                       memset(&err,0,sizeof err);
-                       err.code = EINVAL;
-                       err.source = __FUNCTION__;
-                       err.desc = "double attribute change";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-
-               attri[attrs[i].attr.type] = i;
-       }
-
-       for (;f; f = f->next) {
-               for (i=0; f->attrs[i].type && attri[f->attrs[i].type] == -1; i++);
-               /* XXX: ignore any errors */
-               if (f->attrs[i].type) match_feed(ctx,f,job,attrs);
-       }
-
-       return glite_jp_clear_error(ctx);
-}
-
-int glite_jpps_match_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name
-)
-{
-       glite_jpps_fplug_data_t **pd = NULL;
-       int     pi;
-       void    *bh = NULL;
-       int     ret;
-
-       fprintf(stderr,"%s: %s %s %s\n",__FUNCTION__,job,class,name);
-
-       switch (glite_jpps_fplug_lookup(ctx,class,&pd)) {
-               case ENOENT: return 0;  /* XXX: shall we complain? */
-               case 0: break;
-               default: return -1;
-       }
-
-       for (pi=0; pd[pi]; pi++) {
-               int     ci;
-               for (ci=0; pd[pi]->uris[ci]; ci++) if (!strcmp(pd[pi]->uris[ci],class)) {
-                       void    *ph;
-
-                       if (!bh && (ret = glite_jppsbe_open_file(ctx,job,pd[pi]->classes[ci],name,O_RDONLY,&bh))) {
-                               free(pd);
-                               return ret;
-                       }
-
-                       if (pd[pi]->ops.open(pd[pi]->fpctx,bh,class,&ph)) {
-                               /* XXX: complain more visibly */
-                               fputs("plugin open failed\n",stderr);
-                               continue;
-                       }
-
-                       /* XXX: does not belong here but I'd like to avoid opening the file twice */
-                       if (!strcmp(class,GLITE_JP_FILETYPE_LB)) {
-                               glite_jp_attr_t         owner = { GLITE_JP_ATTR_OWNER, NULL };
-                               glite_jp_attrval_t      *val;
-
-                               switch (pd[pi]->ops.attr(pd[pi]->fpctx,ph,owner,&val)) {
-                                       case ENOENT:
-                                       case ENOSYS: abort();
-                                       case 0: printf("LB plugin: owner = %s\n",val[0].value.s);
-                                               /* TODO: store it in backend */
-
-                                               glite_jp_attrval_free(val,1);
-                                               break;
-
-                                       default: /* TODO: complain */; break;
-                               }
-                       }
-
-                       /* TODO: extract attributes for the feeds */
-
-
-                       pd[pi]->ops.close(pd[pi]->fpctx,ph);
-               }
-       }
-
-       if (bh) glite_jppsbe_close_file(ctx,bh);
-       free(pd);
-
-       return 0;
-}
-
-int glite_jpps_match_tag(
-       glite_jp_context_t ctx,
-       const char *job,
-       const glite_jp_tagval_t *tag
-)
-{
-       fprintf(stderr,"%s: \n",__FUNCTION__);
-       return 0;
-}
-
-static char *generate_feedid(void)
-{
-       char    hname[200],buf[1000];
-
-       gethostname(hname,sizeof hname);
-       snprintf(buf,sizeof buf,"%s%d%ld",hname,getpid(),lrand48());
-       buf[sizeof buf-1] = 0;
-       return str2md5base64(buf);
-}
-
-
-int glite_jpps_run_feed(
-       glite_jp_context_t ctx,
-       const char *destination,
-       const glite_jp_attr_t *attrs,
-       const glite_jp_query_rec_t *qry,
-       char **feed_id)
-{
-       fprintf(stderr,"%s: \n",__FUNCTION__);
-       return 0;
-}
-
-static int register_feed_deferred(glite_jp_context_t ctx,void *feed)
-{
-       struct jpfeed   *f = feed;
-
-       f->next = ctx->feeds;
-       ctx->feeds = f;
-       return 0;
-}
-
-/* FIXME:
- * - volatile implementation: should store the registrations in a file
- *   and recover after restart
- * - should communicate the data among all server slaves
- */
-int glite_jpps_register_feed(
-       glite_jp_context_t ctx,
-       const char *destination,
-       const glite_jp_attr_t *attrs,
-       const glite_jp_query_rec_t *qry,
-       char **feed_id,
-       time_t *expires)
-{
-       int     i;
-       struct jpfeed   *f = calloc(1,sizeof *f);
-
-       if (!*feed_id) *feed_id = generate_feedid();
-       time(expires); *expires += FEED_TTL;
-
-       f->id = strdup(*feed_id);
-       f->destination = strdup(destination);
-       f->expires = *expires;
-       for (i=0; attrs[i].type; i++) {
-               f->attrs = realloc(f->attrs,(i+2) * sizeof *f->attrs);
-               glite_jp_attr_copy(f->attrs+i,attrs+i);
-               memset(f->attrs+i+1,0,sizeof *f->attrs);
-       }
-       for (i=0; qry[i].attr.type; i++) {
-               f->qry = realloc(f->qry,(i+2) * sizeof *f->qry);
-               glite_jp_queryrec_copy(f->qry+i,qry+i);
-               memset(f->qry+i+1,0,sizeof *f->qry);
-       }
-
-       glite_jp_add_deferred(ctx,register_feed_deferred,f);
-
-       return 0;
-}
-
diff --git a/org.glite.jp.client/src/feed.h b/org.glite.jp.client/src/feed.h
deleted file mode 100644 (file)
index c3c2461..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __GLITE_JP_FEED
-#define __GLITE_JP_FEED
-
-
-struct jpfeed {
-       char    *id,*destination;
-       time_t  expires;
-       glite_jp_attr_t *attrs;
-       glite_jp_query_rec_t    *qry;
-       struct jpfeed   *next;
-};
-
-
-int glite_jpps_match_attr(glite_jp_context_t,const char *,const glite_jp_attrval_t[]);
-int glite_jpps_match_file(glite_jp_context_t,const char *,const char *,const char *);
-int glite_jpps_match_tag(glite_jp_context_t,const char *,const glite_jp_tagval_t *);
-int glite_jpps_run_feed(glite_jp_context_t,const char *,const glite_jp_attr_t *,const glite_jp_query_rec_t *,char **);
-int glite_jpps_register_feed(glite_jp_context_t,const char *,const glite_jp_attr_t *,const glite_jp_query_rec_t *,char **,time_t *);
-
-#endif
-
diff --git a/org.glite.jp.client/src/file_plugin.c b/org.glite.jp.client/src/file_plugin.c
deleted file mode 100644 (file)
index 144a231..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <dlfcn.h>
-#include <errno.h>
-
-#include <glite/jp/types.h>
-#include "file_plugin.h"
-
-static struct option opts[] = {
-       { "plugin", 1, NULL, 'p' },
-       { NULL }
-};
-
-static int loadit(glite_jp_context_t ctx,const char *so)
-{
-/* XXX: not stored but we never dlclose() yet */
-       void    *dl_handle = dlopen(so,RTLD_NOW);
-
-       glite_jp_error_t        err;
-       const char      *e;
-       glite_jpps_fplug_data_t *data,*dp;
-       int     i;
-
-       glite_jpps_fplug_init_t init;
-       memset(&err,0,sizeof err);
-
-       if (!dl_handle) {
-               err.source = "dlopen()";
-               err.code = EINVAL;
-               err.desc = dlerror();
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       dlerror();
-       init = dlsym(dl_handle,"init");
-       e = dlerror();
-       if (e) {
-               char    buf[300];
-               snprintf(buf,sizeof buf,"dlsym(\"%s\",\"init\")",so);
-               buf[299] = 0;
-               err.source = buf;
-               err.code = ENOENT;
-               err.desc = e;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       data = calloc(1,sizeof *data);
-
-       if (init(ctx,data)) return -1;
-
-       i = 0;
-       if (ctx->plugins) for (i=0; ctx->plugins[i]; i++);
-       ctx->plugins = realloc(ctx->plugins, (i+2) * sizeof *ctx->plugins);
-       ctx->plugins[i] = data;
-       ctx->plugins[i+1] = NULL;
-
-       /* TODO: check consistency of uri+class pairs wrt. previous plugins */
-       
-       return 0;
-}
-
-int glite_jpps_fplug_load(glite_jp_context_t ctx,int argc,char **argv)
-{
-       int     i;
-
-       for (i=1; i<argc; i++) if (loadit(ctx,argv[i])) {
-               glite_jp_error_t        err;
-               memset(&err,0,sizeof err);
-               err.source = __FUNCTION__;
-               err.code = EINVAL;
-               err.desc = argv[i];
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jpps_fplug_lookup(glite_jp_context_t ctx,const char *uri, glite_jpps_fplug_data_t ***plugin_data)
-{
-       int     i;
-
-       glite_jpps_fplug_data_t **out = NULL;
-       int     matches = 0;
-
-       glite_jp_error_t        err;
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       err.code = ENOENT;
-       err.desc = (char *) uri;        /* XXX: we don't modify it, believe me, gcc! */
-
-       glite_jp_clear_error(ctx);
-       if (!ctx->plugins) {
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       for (i = 0; ctx->plugins[i]; i++) {
-               int     j;
-               glite_jpps_fplug_data_t *p = ctx->plugins[i];
-
-               for (j=0; p->uris && p->uris[j]; j++)
-                       if (!strcmp(p->uris[j],uri)) {
-                               out = realloc(out, (matches+2) * sizeof *out);
-                               out[matches++] = p;
-                               out[matches] = NULL;
-                       }
-       }
-
-       if (matches) {
-               *plugin_data = out;
-               return 0;
-       }
-       else return glite_jp_stack_error(ctx,&err);
-}
-
diff --git a/org.glite.jp.client/src/ftp_backend.c b/org.glite.jp.client/src/ftp_backend.c
deleted file mode 100644 (file)
index 8bf523b..0000000
+++ /dev/null
@@ -1,1744 +0,0 @@
-#ident "$Header$"
-
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-#include "glite/jp/strmd5.h"
-
-#include "tags.h"
-#include "backend.h"
-
-#define UPLOAD_SUFFIX ".upload"
-#define LOCK_SUFFIX ".lock"
-
-struct ftpbe_config {
-       char *internal_path;
-       char *external_path;
-       char *gridmap;
-       char *logname;
-};
-
-static struct ftpbe_config *config = NULL;
-
-struct fhandle_rec {
-       int fd;
-       int fd_append;
-};
-typedef struct fhandle_rec *fhandle;
-
-static struct option ftpbe_opts[] = {
-       { "ftp-internal-path", 1, NULL, 'I' },
-       { "ftp-external-path", 1, NULL, 'E' },
-       { "ftp-gridmap",       1, NULL, 'G' },
-       { NULL,                0, NULL,  0  }
-};
-
-/* obsolete */
-#if 0
-static struct {
-       glite_jp_fileclass_t    type;
-       char *                  fname;
-       } class_to_fname_tab[] = {
-               { GLITE_JP_FILECLASS_INPUT,  "input" },
-               { GLITE_JP_FILECLASS_OUTPUT, "output" },
-               { GLITE_JP_FILECLASS_LBLOG,  "lblog" },
-               { GLITE_JP_FILECLASS_TAGS,   "tags" },
-               { GLITE_JP_FILECLASS_UNDEF,  NULL }
-       };
-
-static char *class_to_fname(glite_jp_fileclass_t type)
-{
-       int i;
-
-       for (i = 0; class_to_fname_tab[i].type != GLITE_JP_FILECLASS_UNDEF; i++)
-               if (type == class_to_fname_tab[i].type)
-                       return class_to_fname_tab[i].fname;
-
-       return NULL;
-}
-
-static glite_jp_fileclass_t fname_to_class(char* fname)
-{
-       int i;
-
-       for (i = 0; class_to_fname_tab[i].type != GLITE_JP_FILECLASS_UNDEF; i++)
-               if (!strcmp(fname, class_to_fname_tab[i].fname))
-                       return class_to_fname_tab[i].type;
-
-       return GLITE_JP_FILECLASS_UNDEF;
-}
-#endif
-
-static int config_check(
-       glite_jp_context_t ctx,
-       struct ftpbe_config *config)
-{
-       return config == NULL ||
-               config->internal_path == NULL ||
-               config->external_path == NULL ||
-               config->gridmap == NULL ||
-               config->logname == NULL;
-
-       /* XXX check reality */
-}
-
-static int jobid_unique_pathname(glite_jp_context_t ctx, const char *job, 
-                         char **unique, char **ju_path, int get_path)
-{
-       char *p;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       p = strrchr(job, '/');
-       if (!p) {
-               err.code = EINVAL;
-               err.desc = "Malformed jobid";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       /* XXX thorough checks */
-       if (!(*unique = strdup(p+1))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (get_path) {
-               if (!(*ju_path = strdup(p+1))) {
-                       free(*unique);
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               *(*ju_path + 10) = '\0';
-       }
-       return 0;
-}
-
-static int mkdirpath(const char* path, int prefixlen)
-{
-       char *wpath, *p;
-       int goout, ret;
-
-       wpath = strdup(path);
-       if (!wpath) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       p = wpath + prefixlen;
-       goout = 0;
-       while (!goout) {
-               while (*p == '/') p++;
-               while (*p != '/' && *p != '\0') p++;
-               goout = (*p == '\0');
-               *p = '\0';
-               ret = mkdir(wpath, S_IRUSR | S_IWUSR | S_IXUSR);
-               if (ret < 0 && errno != EEXIST) break;
-               *p = '/';
-       }
-       free(wpath);
-       return goout ? 0 : ret;
-}
-
-static long regtime_trunc(long tv_sec)
-{
-       return tv_sec / (86400*7);
-}
-
-static long regtime_ceil(long tv_sec)
-{
-       return (tv_sec % (86400*7)) ? tv_sec/(86400*7)+1 : tv_sec/(86400*7) ;
-}
-
-/********************************************************************************/
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-)
-{
-       glite_jp_error_t err;
-       int opt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       config = (struct ftpbe_config *) calloc(1, sizeof *config);
-       if (!config) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       config->logname = getlogin();
-
-       while ((opt = getopt_long(argc, argv, "I:E:G:", ftpbe_opts, NULL)) != EOF) {
-               switch (opt) {
-                       case 'I': config->internal_path = optarg; break;
-                       case 'E': config->external_path = optarg; break;
-                       case 'G': config->gridmap = optarg; break;
-                       default: break;
-               }
-       }
-
-       if (config_check(ctx, config)) {
-               err.code = EINVAL;
-               err.desc = "Invalid FTP backend configuration";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-)
-{
-       /* Nothing to do */
-}
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-)
-{
-       glite_jp_error_t err;
-       char *int_dir = NULL;
-       char *int_fname = NULL;
-       char *data_dir = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *ownerhash = NULL;
-       FILE *regfile = NULL;
-       struct timeval reg_tv;
-       long reg_tv_trunc;
-       struct stat statbuf;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job != NULL);
-       assert(owner != NULL);
-
-       gettimeofday(&reg_tv, NULL);
-       reg_tv_trunc = regtime_trunc(reg_tv.tv_sec);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_dir, "%s/regs/%s",
-                       config->internal_path, ju_path) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (mkdirpath(int_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               free(int_dir);
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's reg directory";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       free(int_dir);
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (stat(int_fname, &statbuf) < 0) {
-               if (errno != ENOENT) {
-                       err.code = errno;
-                       err.desc = "Cannot stat jobs's reg info file";
-                       goto error_out;
-               }
-       } else {
-               err.code = EEXIST;
-               err.desc = "Job already registered";
-               goto error_out;
-       }
-
-       regfile = fopen(int_fname, "w");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-
-       ownerhash = str2md5(owner); /* static buffer */
-       
-       if (fprintf(regfile, "%d %ld.%06ld %s %s %d %s\n", 1,
-               (long)reg_tv.tv_sec, (long)reg_tv.tv_usec, job,
-               ownerhash, strlen(owner), owner) < 1 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot write jobs's reg info file";
-               goto error_out;
-       }
-       if (fclose(regfile) != 0 ) {
-               err.code = errno;
-               err.desc = "Cannot close(write) jobs's reg info file";
-               goto error_out;
-       }
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_tv.tv_sec), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (asprintf(&data_fname, "%s/_info", data_dir) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (mkdirpath(data_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's data directory";
-               goto error_out;
-       }
-
-       if (link(int_fname, data_fname) < 0) {
-               err.code = errno;
-               err.desc = "Cannot link job's reg and data info files";
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(data_fname);
-       if (err.code && data_dir) rmdir(data_dir);
-       free(data_dir);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int add_to_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       gridmap = fopen(config->gridmap, "a");
-       if (!gridmap) {
-               err.code = errno;
-               err.desc = "Cannot open gridmap file";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (fprintf(gridmap, "\"%s\" %s\n", dn, config->logname) < 6 ||
-               ferror(gridmap)) {
-               err.code = EIO;
-               err.desc = "Cannot write to gridmap file";
-               fclose(gridmap);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       fclose(gridmap);
-       return 0;
-}
-
-static int remove_from_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       char *temp_name = NULL;
-       FILE *temp_file = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       /* XXX */
-       return 0;
-}
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-)
-{
-       char *int_fname = NULL;
-       char *lock_fname = NULL;
-       FILE *lockfile = NULL;
-       FILE *regfile = NULL;
-       char *data_dir = NULL;
-       char *data_lock = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *peername = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(destination_out!=NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       peername = glite_jp_peer_name(ctx);
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s ", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       /* XXX authorization */
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_time), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(&lock_fname, "%s/%s" LOCK_SUFFIX,
-                       data_dir, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (commit_before_inout != NULL)
-               *commit_before_inout = (time_t) LONG_MAX;  /* XXX no timeout enforced */
-
-       lockfile = fopen(lock_fname, "w");
-       if (lockfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open uploads's lock file";
-               goto error_out;
-       }
-
-       if (fprintf(lockfile, "%ld %d %s\n", (long)*commit_before_inout,
-               peername ? peername : 0,
-               peername ? peername : "") < 1 || ferror(regfile)) {
-               fclose(lockfile);
-               err.code = errno;
-               err.desc = "Cannot write upload's lock file";
-               goto error_out;
-       }
-       if (fclose(lockfile) != 0 ) {
-               err.code = errno;
-               err.desc = "Cannot close(write) upload's lock file";
-               goto error_out;
-       }
-
-       if (asprintf(destination_out, "%s/data/%s/%d/%s/%s" UPLOAD_SUFFIX,
-                       config->external_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (add_to_gridmap(ctx, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot add peer DN to ftp server authorization file";
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(data_dir);
-       if (err.code && data_lock) unlink(data_lock);
-       free(data_lock);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-)
-{
-       size_t dest_len;
-       size_t suff_len;
-       size_t extp_len;
-       long commit_before;
-       int lockpeerlen;
-       char *lockpeername = NULL;
-       char *peername = NULL;
-       char *dest_rw = NULL;
-       char *dest_rw_suff = NULL;
-       char *dest_rw_lock = NULL;
-       FILE *lockfile = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(destination != NULL);
-
-       suff_len = strlen(UPLOAD_SUFFIX);
-       dest_len = strlen(destination);
-       extp_len = strlen(config->external_path);
-
-       if (dest_len < suff_len ||
-               strcmp(UPLOAD_SUFFIX, destination + (dest_len - suff_len)) ||
-               strncmp(destination, config->external_path, extp_len)) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&dest_rw_suff, "%s%s", config->internal_path,
-               destination + extp_len) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       dest_rw = strdup(dest_rw_suff);
-       if (!dest_rw) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       *(dest_rw + (strlen(dest_rw_suff) - suff_len)) = '\0';
-
-       if (asprintf(&dest_rw_lock, "%s" LOCK_SUFFIX, dest_rw) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       lockfile = fopen(dest_rw_lock, "r");
-       if (lockfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open upload's lock file";
-               goto error_out;
-       }
-       if (fscanf(lockfile, "%ld %d ", &commit_before, &lockpeerlen) < 2 || ferror(lockfile)) {
-               fclose(lockfile);
-               err.code = errno;
-               err.desc = "Cannot read upload's lock file";
-               goto error_out;
-       }
-       if (lockpeerlen) {
-               lockpeername = (char*) calloc(1, lockpeerlen+1);
-               if (!lockpeername) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(lockpeername, lockpeerlen+1, lockfile) == NULL) {
-                       fclose(lockfile);
-                       err.code = errno;
-                       err.desc = "Cannot read upload's lock file";
-                       goto error_out;
-               }
-       }
-       fclose(lockfile);
-
-       peername = glite_jp_peer_name(ctx);
-       if (lockpeername && (!peername || strcmp(lockpeername, peername))) {
-               err.code = EPERM;
-               err.desc = "Upload started by client of different identity";
-               goto error_out;
-       }
-
-       if (rename(dest_rw_suff, dest_rw) < 0) {
-               err.code = errno;
-               err.desc = "Cannot move upload file to the final place";
-               goto error_out;
-       }
-
-       if (unlink(dest_rw_lock) < 0) {
-               err.code = errno;
-               err.desc = "Cannot unlink upload's lock file";
-               goto error_out;
-       }
-
-error_out:
-       free(dest_rw);
-       free(dest_rw_suff);
-       free(dest_rw_lock);
-       free(peername);
-       free(lockpeername);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job,
-       char **class,
-       char **name
-)
-{
-       size_t dest_len;
-       size_t suff_len;
-       size_t extp_len;
-       char *dest_rw = NULL;
-       char *dest_rw_suff = NULL;
-       char *dest_rw_info = NULL;
-       FILE *infofile = NULL;
-       char *classname = NULL;
-       char jobstr[256+1];
-       glite_jp_error_t err;
-
-       assert(destination != NULL);
-       assert(job != NULL);
-       assert(class != NULL);
-       assert(name != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       suff_len = strlen(UPLOAD_SUFFIX);
-       dest_len = strlen(destination);
-       extp_len = strlen(config->external_path);
-
-       if (dest_len < suff_len ||
-               strcmp(UPLOAD_SUFFIX, destination + (dest_len - suff_len)) ||
-               strncmp(destination, config->external_path, extp_len)) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&dest_rw_suff, "%s%s", config->internal_path,
-               destination + extp_len) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       dest_rw = strdup(dest_rw_suff);
-       if (!dest_rw) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       *(dest_rw + (strlen(dest_rw_suff) - suff_len)) = '\0';
-
-       classname = strrchr(dest_rw,'/');
-       if (classname == NULL) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               goto error_out;
-       }
-       *classname++ ='\0';
-       *class = strdup(classname);
-
-/* XXX: do we need similar check? 
-       if (!class == GLITE_JP_FILECLASS_UNDEF) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               goto error_out;
-       }
-*/
-
-       /* TODO: */
-       *name = NULL;
-
-       if (asprintf(&dest_rw_info, "%s/_info", dest_rw) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       infofile = fopen(dest_rw_info, "r");
-       if (infofile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open _info file";
-               goto error_out;
-       }
-       if (fscanf(infofile, "%*d %*ld.%*ld %256s ", jobstr) < 1 || ferror(infofile)) {
-               fclose(infofile);
-               err.code = errno;
-               err.desc = "Cannot read _info file";
-               goto error_out;
-       }
-       *job = strdup(jobstr);
-       fclose(infofile);
-
-error_out:
-       free(dest_rw);
-       free(dest_rw_suff);
-       free(dest_rw_info);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       char **url_out
-)
-{
-       FILE *regfile = NULL;
-       char *int_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(url_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       if (asprintf(url_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int get_job_fname(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       char **fname_out
-)
-{
-       FILE *regfile = NULL;
-       char *int_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(fname_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       if (asprintf(fname_out, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       int mode,
-       void **handle_out
-)
-{
-       fhandle handle = NULL;
-       char* fname = NULL;
-       glite_jp_error_t err;
-
-       assert(handle_out != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (get_job_fname(ctx, job, class, name, &fname)) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot construct internal filename";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       handle = (fhandle) calloc(1,sizeof(*handle));
-       if (handle == NULL) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       handle->fd = open(fname, mode, S_IRUSR | S_IWUSR);
-       if (handle->fd < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file";
-               free(handle);
-               goto error_out;
-       }
-       handle->fd_append = open(fname, mode | O_APPEND, S_IRUSR | S_IWUSR);
-       if (handle->fd_append < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file for append";
-               close(handle->fd);
-               free(handle);
-               goto error_out;
-       }
-       *handle_out = (void*) handle;
-
-error_out:
-       free(fname);
-       if (err.code) { 
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (close(((fhandle)handle)->fd_append) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor (fd_append)";
-               goto error_out;
-       }
-       if (close(((fhandle)handle)->fd) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor";
-               goto error_out;
-       }
-
-error_out:
-       free(handle);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-)
-{
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if ((ret = pread(((fhandle)handle)->fd, buf, nbytes, offset)) < 0) {
-               err.code = errno;
-               err.desc = "Error in pread()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       *nbytes_ret = ret;
-
-       return 0;
-}
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (pwrite(((fhandle)handle)->fd, buf, nbytes, offset) < 0) {
-               err.code = errno;
-               err.desc = "Error in pwrite()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (write(((fhandle)handle)->fd_append, buf, nbytes) < 0) {
-               err.code = errno;
-               err.desc = "Error in write()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-static int get_job_info(
-       glite_jp_context_t ctx,
-       const char *job,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       char *ju = NULL;
-       char *ju_path = NULL;
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char *int_fname = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %*s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, &ownerlen) < 4 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       free(int_fname);
-       free(ju);
-       free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-static int get_job_info_int(
-       glite_jp_context_t ctx,
-       const char *int_fname,
-       char **jobid,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char jobid_buf[256];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, jobid_buf, &ownerlen) < 5 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       *jobid = strdup(jobid_buf);
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-)
-{
-       int got_info = 0;
-       struct timeval tv_reg;
-       char *owner = NULL;
-       int got_tags = 0;
-       void *tags_handle = NULL;
-       glite_jp_tagval_t* tags = NULL;
-       int i,j;
-       glite_jp_error_t err;
-
-       assert(job != NULL);
-       assert(attrs_inout != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; attrs_inout[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TIME:
-*/
-                       if (!got_info) {
-                               if (get_job_info(ctx, job, &owner, &tv_reg)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot retrieve job info";
-                                       goto error_out;
-                               }
-                               got_info = 1;
-                       }
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       if (!got_tags) {
-                               if (glite_jppsbe_open_file(ctx, job, GLITE_JP_FILECLASS_TAGS,
-                                       O_RDONLY, &tags_handle)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot open tag file";
-                                       goto error_out;
-                               }
-                               if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot read tags";
-                                       glite_jppsbe_close_file(ctx, tags_handle);
-                                       goto error_out;
-                               }
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               got_tags = 1;
-                       }
-                       break;
-*/
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type";
-                       goto error_out;
-                       break;
-               }
-
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-                       attrs_inout[i].value.s = strdup(owner);
-                       if (!attrs_inout[i].value.s) {
-                               err.code = ENOMEM;
-                               err.desc = "Cannot copy owner string";
-                               goto error_out;
-                       }       
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       attrs_inout[i].value.time = tv_reg;
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       for (j = 0; tags[j].name != NULL; j++) {
-                               if (!strcmp(tags[j].name, attrs_inout[i].attr.name)) {
-                                       if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                               &attrs_inout[i].value.tag)) {
-                                               err.code = ENOMEM;
-                                               err.desc = "Cannot copy tag value";
-                                               goto error_out;
-                                       }
-                                       break;
-                               }
-                       }
-                       if (!tags[j].name) attrs_inout[i].value.tag.name = NULL;
-                       break;
-*/
-               default:
-                       break;
-               }
-       }
-
-error_out:
-       free(owner);
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       free(tags);
-       
-       if (err.code) {
-               while (i > 0) {
-                       i--;
-                       switch (attrs_inout[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               free(attrs_inout[i].value.s);
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               free(attrs_inout[i].value.tag.name);
-                               free(attrs_inout[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-static int compare_timeval(struct timeval a, struct timeval b)
-{
-       if (a.tv_sec < b.tv_sec) return -1;
-       if (a.tv_sec > b.tv_sec) return 1;
-       if (a.tv_usec < b.tv_usec) return -1;
-       if (a.tv_usec > b.tv_usec) return 1;
-       return 0;
-}
-
-
-/* FIXME: disabled -- clarification wrt. filetype plugin needed */
-
-#if 0
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       char *time_dirname = NULL;
-       DIR *time_dirp = NULL;
-       struct dirent *jobent;
-       char *info_fname = NULL;
-       char *jobid = NULL;
-       char *owner = NULL;
-       struct timeval tv_reg;
-       void *tags_handle = NULL;
-       int matching;
-       int i, j;
-       glite_jp_tagval_t* tags = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (asprintf(&time_dirname, "%s/data/%s/%d", config->internal_path,
-                       ownerhash, regtime_tr) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       time_dirp = opendir(time_dirname);
-       if (!time_dirp) {
-               free(time_dirname);
-               return 0; /* found nothing */
-       }
-       while ((jobent = readdir(time_dirp)) != NULL) {
-               if (!strcmp(jobent->d_name, ".")) continue;
-               if (!strcmp(jobent->d_name, "..")) continue;
-               if (asprintf(&info_fname, "%s/%s/_info", time_dirname,
-                               jobent->d_name) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (get_job_info_int(ctx, info_fname, &jobid, &owner,  &tv_reg)) {
-                       err.code = EIO;
-                       err.desc = "Cannot retrieve job info";
-                       goto error_out;
-               }
-               if (q_tags || md_tags) {
-                       if (glite_jppsbe_open_file(ctx, jobid, GLITE_JP_FILECLASS_TAGS,
-                               O_RDONLY, &tags_handle)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot open tag file";
-                               goto error_out;
-                       }
-                       if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot read tags";
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               goto error_out;
-                       }
-                       glite_jppsbe_close_file(ctx, tags_handle);
-                       tags_handle = NULL;
-               }
-
-               matching = 1;
-               for (i = 0; matching && query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (query[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               if (query[i].value.s == NULL || 
-                                       strcmp(query[i].value.s, owner)) matching = 0;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               switch (query[i].op) {
-                                       case GLITE_JP_QUERYOP_EQUAL:
-                                               matching = !compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_UNEQUAL:
-                                               matching = compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_LESS:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) < 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_GREATER:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) > 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_WITHIN:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) >= 0
-                                                       && compare_timeval(tv_reg, query[i].value2.time) <= 0;
-                                               break;
-                               }
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               if (!tags) {
-                                       matching = 0;
-                                       break;
-                               }
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, query[i].attr.name)) {
-                                               switch (query[i].op) {
-                                               case GLITE_JP_QUERYOP_EQUAL:
-                                                       matching = !strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_UNEQUAL:
-                                                       matching = strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_LESS:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) < 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_GREATER:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) > 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_WITHIN:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) >= 0 \
-                                                               && strcmp(tags[j].value, query[i].value2.s) <= 0 ;
-                                                       break;
-                                               default:
-                                                       break;
-                                               }
-                                       }
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               if (!matching) {
-                       free(info_fname); info_fname = NULL;
-                       free(jobid); jobid = NULL;
-                       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-                               free(tags[j].name);
-                               free(tags[j].value);
-                       }
-                       free(tags); tags = NULL;
-                       continue;
-               }
-
-               for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               metadata[i].value.s = owner;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               metadata[i].value.time = tv_reg;
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, metadata[i].attr.name)) {
-                                               if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                                       &metadata[i].value.tag)) {
-                                                       err.code = ENOMEM;
-                                                       err.desc = "Cannot copy tag value";
-                                                       goto error_out;
-                                               }
-                                               break;
-                                       }
-                               }
-                               if (!tags[j].name) {
-                                       metadata[i].value.tag.name = NULL;
-                                       metadata[i].value.tag.value = NULL;
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               (*callback)(ctx, jobid, metadata);
-               free(jobid); jobid = NULL;
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-       }
-
-error_out:
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       if (tags_handle) glite_jppsbe_close_file(ctx, tags_handle);
-       free(info_fname);
-       free(owner);
-       free(jobid);
-       closedir(time_dirp);
-       free(time_dirname);
-       if (err.code)  {
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else
-               return 0;
-}
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       /* XXX clone metadata */
-       int i;
-       char *q_exact_owner = NULL;
-       char *ownerhash = NULL;
-       long q_min_time = 0;
-       long q_max_time = LONG_MAX;
-       long q_min_time_tr;
-       long q_max_time_tr;
-       int q_with_tags = 0;
-       int md_info = 0;
-       int md_tags = 0;
-       char *owner_dirname = NULL;
-       DIR *owner_dirp = NULL;
-       struct dirent *ttimeent;
-       char *data_dirname = NULL;
-       DIR *data_dirp = NULL;
-       struct dirent *ownerent;
-       long ttime = 0;
-       glite_jp_attrval_t *metadata_templ = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               if (query[i].attr.type == GLITE_JP_ATTR_OWNER && query[i].op == GLITE_JP_QUERYOP_EQUAL) {
-                       q_exact_owner = query[i].value.s;
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TIME) {
-                       switch (query[i].op) {
-                       case GLITE_JP_QUERYOP_EQUAL:
-                               q_min_time = query[i].value.time.tv_sec;
-                               q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_LESS:
-                               if (q_max_time > query[i].value.time.tv_sec + 1)
-                                       q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_WITHIN:
-                               if (q_max_time > query[i].value2.time.tv_sec + 1)
-                                       q_max_time = query[i].value2.time.tv_sec + 1;
-                               /* fallthrough */
-                       case GLITE_JP_QUERYOP_GREATER:
-                               if (q_min_time < query[i].value.time.tv_sec)
-                                       q_min_time = query[i].value.time.tv_sec;
-                               break;
-                       default:
-                               err.code = EINVAL;
-                               err.desc = "Invalid query op";
-                               return glite_jp_stack_error(ctx,&err);
-                               break;
-                       }
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TAG) 
-                       q_with_tags = 1;
-
-       }
-
-       for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (metadata[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TIME:
-                       md_info = 1;
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       md_tags = 1;
-                       break;
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type in metadata parameter";
-                       return glite_jp_stack_error(ctx,&err);
-                       break;
-               }
-       }
-       metadata_templ = (glite_jp_attrval_t *) calloc(i + 1, sizeof(glite_jp_attrval_t));
-       if (!metadata_templ) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(metadata_templ, metadata, (i + 1) * sizeof(glite_jp_attrval_t));
-       
-       q_min_time_tr = regtime_trunc(q_min_time);
-       q_max_time_tr = regtime_ceil(q_max_time);
-
-       if (q_exact_owner) {
-               ownerhash = str2md5(q_exact_owner); /* static buffer */
-               if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, ownerhash) == -1) {
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               owner_dirp = opendir(owner_dirname);
-               free(owner_dirname);
-               if (!owner_dirp) {
-                       free(metadata_templ);
-                       return 0; /* found nothing */
-               }
-               while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                       if (!strcmp(ttimeent->d_name, ".")) continue;
-                       if (!strcmp(ttimeent->d_name, "..")) continue;
-                       ttime = atol(ttimeent->d_name);
-                       if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                               if (query_phase2(ctx, ownerhash, ttime, q_with_tags, md_tags,
-                                               query, metadata_templ, callback)) {
-                                       err.code = EIO;
-                                       err.desc = "query_phase2() error";
-                                       goto error_out;
-                               }
-                       }
-               }
-       } else { /* !q_exact_owner */
-               if (asprintf(&data_dirname, "%s/data", config->internal_path) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               data_dirp = opendir(data_dirname);
-               if (!data_dirp) {
-                       err.code = EIO;
-                       err.desc = "Cannot open data directory";
-                       goto error_out;
-               }
-               while ((ownerent = readdir(data_dirp)) != NULL) {
-                       if (!strcmp(ownerent->d_name, ".")) continue;
-                       if (!strcmp(ownerent->d_name, "..")) continue;
-                       if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path,
-                                       ownerent->d_name) == -1) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       owner_dirp = opendir(owner_dirname);
-                       free(owner_dirname);
-                       if (!owner_dirp) {
-                               err.code = EIO;
-                               err.desc = "Cannot open owner data directory";
-                               goto error_out;
-                       }
-                       while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                               if (!strcmp(ttimeent->d_name, ".")) continue;
-                               if (!strcmp(ttimeent->d_name, "..")) continue;
-                               ttime = atol(ttimeent->d_name);
-                               if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                                       if (query_phase2(ctx, ownerent->d_name, ttime, q_with_tags, md_tags,
-                                                       query, metadata_templ, callback)) {
-                                               err.code = EIO;
-                                               err.desc = "query_phase2() error";
-                                               goto error_out;
-                                       }
-                               }
-                       }
-                       closedir(owner_dirp); owner_dirp = NULL;
-               }
-               closedir(data_dirp); data_dirp = NULL;
-       }
-       return 0;
-
-error_out:
-       if (owner_dirp) closedir(owner_dirp);
-       if (data_dirp) closedir(data_dirp);
-       free(data_dirname);
-       free(metadata_templ);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#else 
-
-/* placeholder instead */
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       glite_jp_error_t        err;
-       err.code = ENOSYS;
-       err.desc = "not implemented";
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#endif
-
-/* XXX:
-- no primary authorization yet
-- no concurrency control yet
-- partial success in pwrite,append
-- "unique" part of jobid is assumed to be unique across bookkeeping servers
-- repository versioning not fully implemented yet
-*/
diff --git a/org.glite.jp.client/src/is_client.c b/org.glite.jp.client/src/is_client.c
deleted file mode 100644 (file)
index 8a747ef..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-
-#include "feed.h"
-/* FIXME
-#include "jpis_H.h"
-#include "jpis_.nsmap"
-*/
-
-int glite_jpps_single_feed(
-               glite_jp_context_t ctx,
-               const char *destination,
-               const char *job,
-               const glite_jp_attrval_t attrs[]
-)
-{
-       /* TODO: really call JP Index server (via interlogger) */
-       printf("feed to %s, job %s\n",destination,job);
-
-/* FIXME */
-#if 0
-       if (soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
-               /* FIXME: feedId */ "",
-               /* FIXME: UpdateJobsData */ NULL,
-               0,
-               NULL
-       )) fprintf(stderr,"UpdateJobs: %s %s\n",ctx->other_soap->fault->faultcode,
-               ctx->other_soap->fault->faultstring);
-
-#endif
-       return 0;
-}
diff --git a/org.glite.jp.client/src/jpimporter.c b/org.glite.jp.client/src/jpimporter.c
deleted file mode 100644 (file)
index b54aac8..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <signal.h>
-#include <string.h>
-#include <assert.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <syslog.h>
-#include <linux/limits.h>
-#include <fcntl.h>
-
-#include "glite/lb/lb_maildir.h"
-#include "glite/security/glite_gsplugin.h"
-
-#include "jpps_H.h"
-#include "jpps_.nsmap"
-
-#include "jptype_map.h"
-
-#include "soap_version.h"
-#if GSOAP_VERSION <= 20602
-#define soap_call___jpsrv__RegisterJob soap_call___ns1__RegisterJob
-#endif
-
-
-#ifndef dprintf
-#define dprintf(x)             { if (debug) printf x; }
-#endif
-
-#ifndef GLITE_JPIMPORTER_PIDFILE
-#define GLITE_JPIMPORTER_PIDFILE       "/var/run/glite-jpimporter.pid"
-#endif 
-
-#ifndef GLITE_JPIMPORTER_MDIR
-#define GLITE_JPIMPORTER_MDIR          "/tmp/jpreg"
-#endif 
-
-static int     debug = 0;
-static int     die = 0;
-
-static struct option opts[] = {
-       { "help",        0, NULL,    'h'},
-       { "debug",       0, NULL,    'd'},
-       { "jpps",        1, NULL,    'p'},
-       { "mdir",        1, NULL,    'm'},
-       { "pidfile",     1, NULL,    'i'},
-       { NULL,          0, NULL,     0}
-};
-
-static const char *get_opt_string = "hdp:m:i:";
-
-static void usage(char *me)
-{
-       fprintf(stderr,"usage: %s [option]\n"
-               "\t-h, --help\t displays this screen\n"
-               "\t-d, --debug\t don't run as daemon, additional diagnostics\n"
-               "\t-p, --jpps\t JP primary service server\n"
-               "\t-m, --mdir\t path to the 'LB maildir' subtree\n"
-               "\t-i, --pidfile\t file to store master pid\n",
-               me);
-}
-
-static void catchsig(int sig)
-{
-       die = sig;
-}
-
-int main(int argc, char *argv[])
-{
-       struct sigaction        sa;
-       struct soap                *soap;
-       sigset_t                        sset;
-       FILE                       *fpid;
-       int                                     opt;
-       char                       *name,
-                                          *jpps = "http://localhost:8901",
-                                               pidfile[PATH_MAX] = GLITE_JPIMPORTER_PIDFILE,
-                                               mdir[PATH_MAX] = GLITE_JPIMPORTER_MDIR;
-
-
-       name = strrchr(argv[0],'/');
-       if (name) name++; else name = argv[0];
-
-       if ( geteuid() )
-               snprintf(pidfile, sizeof pidfile, "%s/glite_jpimporter.pid", getenv("HOME"));
-
-       while ( (opt = getopt_long(argc, argv, get_opt_string, opts, NULL)) != EOF )
-       switch ( opt ) {
-               case 'd': debug = 1; break;
-               case 'h': usage(name); return 0;
-               case 'p': jpps = optarg; break;
-               case 'm': strcpy(mdir, optarg); break;
-               case 'i': strcpy(pidfile, optarg); break;
-               case '?': usage(name); return 1;
-       }
-       if ( optind < argc ) { usage(name); return 1; }
-
-       soap = soap_new();
-       soap_init(soap);
-       soap_set_namespaces(soap, jpps__namespaces);
-       soap_register_plugin(soap, glite_gsplugin);
-
-       setlinebuf(stdout);
-       setlinebuf(stderr);
-
-       fpid = fopen(pidfile,"r");
-       if ( fpid ) {
-               int opid = -1;
-
-               if ( fscanf(fpid,"%d",&opid) == 1 ) {
-                       if ( !kill(opid,0) ) {
-                               fprintf(stderr,"%s: another instance running, pid = %d\n",argv[0],opid);
-                               return 1;
-                       }
-                       else if (errno != ESRCH) { perror("kill()"); return 1; }
-               }
-               fclose(fpid);
-       } else if (errno != ENOENT) { perror(pidfile); return 1; }
-       fpid = fopen(pidfile, "w");
-       if ( !fpid ) { perror(pidfile); return 1; }
-       fprintf(fpid, "%d", getpid());
-       fclose(fpid);
-               
-       if ( !debug ) {
-               if ( daemon(1,0) == -1 ) { perror("deamon()"); exit(1); }
-
-               fpid = fopen(pidfile,"w");
-               if ( !fpid ) { perror(pidfile); return 1; }
-               fprintf(fpid, "%d", getpid());
-               fclose(fpid);
-               openlog(name, LOG_PID, LOG_DAEMON);
-       } else { setpgid(0, getpid()); }
-
-       dprintf(("Master pid %d\n", getpid()));
-
-       memset(&sa, 0, sizeof(sa)); assert(sa.sa_handler == NULL);
-       sa.sa_handler = catchsig;
-       sigaction(SIGINT, &sa, NULL);
-       sigaction(SIGTERM, &sa, NULL);
-
-       sa.sa_handler = SIG_IGN;
-       sigaction(SIGUSR1, &sa, NULL);
-
-       sigemptyset(&sset);
-       sigaddset(&sset, SIGTERM);
-       sigaddset(&sset, SIGINT);
-       sigprocmask(SIG_BLOCK, &sset, NULL);
-
-       while ( !die ) {
-               int             ret;
-               char   *msg = NULL;
-               char   *fname = NULL;
-
-               ret = edg_wll_MaildirTransStart(mdir, &msg, &fname);
-               /* XXX: where should unblocking signal besides? */
-               sigprocmask(SIG_UNBLOCK, &sset, NULL);
-               sigprocmask(SIG_BLOCK, &sset, NULL);
-               if ( ret < 0 ) {
-                       dprintf(("edg_wll_MaildirTransStart: %s (%s)\n", strerror(errno), lbm_errdesc));
-                       if ( !debug ) syslog(LOG_ERR, "edg_wll_MaildirTransStart: %s (%s)", strerror(errno), lbm_errdesc);
-                       exit(1);
-               } else if ( ret == 0 ) {
-                       sleep(2);
-               } else {
-                       struct _jpelem__RegisterJob                     in;
-                       struct _jpelem__RegisterJobResponse     empty;
-                       struct SOAP_ENV__Detail                         *detail;
-                       struct jptype__genericFault                     *f;
-                       char    *aux, *reason, indent[200] = "  ";
-
-
-                       dprintf(("JP registration request received\n"));
-                       if ( !debug ) syslog(LOG_INFO, "JP registration request received\n");
-
-                       if ( !(aux = strchr(msg, '\n')) ) {
-                               dprintf(("Wrong format of message!\n"));
-                               if ( !debug ) syslog(LOG_ERR, "Wrong format of message\n");
-                               free(msg);
-                               continue;
-                       }
-                       *aux++ = '\0';
-                       in.job = msg;
-                       in.owner = aux;
-                       ret = soap_call___jpsrv__RegisterJob(soap, jpps, "", &in, &empty);
-                       free(msg);
-
-                       switch ( ret ) {
-                       case SOAP_OK:
-                               /* XXX: checks return error code */
-                               edg_wll_MaildirTransEnd(mdir, fname, LBMD_TRANS_OK);
-                               dprintf(("Job '%s' succesfully registered to JP\n", msg));
-                               if ( !debug ) syslog(LOG_INFO, "Job '%s' succesfully registered to JP\n", msg);
-                               break;
-
-                       case SOAP_FAULT:
-                       case SOAP_SVR_FAULT:
-                               edg_wll_MaildirTransEnd(mdir, fname, LBMD_TRANS_FAILED);
-                               if (soap->version == 2) {
-                                       detail = soap->fault->SOAP_ENV__Detail;
-                                       reason = soap->fault->SOAP_ENV__Reason;
-                               } else {
-                                       detail = soap->fault->detail;
-                                       reason = soap->fault->faultstring;
-                               }
-                               dprintf(("%s\n", reason));
-                               assert(detail->__type == SOAP_TYPE__genericFault);
-#if GSOAP_VERSION >=20700
-                               f = ((struct _genericFault *) detail->fault)
-#else
-                               f = ((struct _genericFault *) detail->value)
-#endif
-                                       -> jpelem__genericFault;
-
-                               while ( f ) {
-                                       dprintf(("%s%s: %s (%s)\n", indent, f->source, f->text, f->description));
-                                       f = f->reason;
-                                       strcat(indent, "  ");
-                               }
-                               break;
-
-                       default:
-                               soap_print_fault(soap, stderr);
-                               edg_wll_MaildirTransEnd(mdir, fname, LBMD_TRANS_FAILED);
-                               break;
-                       }
-                       free(fname);
-               }
-       }
-
-       /* XXX: some sort of soap_destroy(soap) */
-       dprintf(("Terminating on signal %d\n", die));
-       if ( !debug ) syslog(LOG_INFO, "Terminating on signal %d\n", die);
-
-       unlink(pidfile);
-
-       return 0;
-}
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
-
diff --git a/org.glite.jp.client/src/jptype_map.h b/org.glite.jp.client/src/jptype_map.h
deleted file mode 100644 (file)
index 56d611f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "soap_version.h"
-
-#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
-
diff --git a/org.glite.jp.client/src/mysql.c b/org.glite.jp.client/src/mysql.c
deleted file mode 100644 (file)
index 0f080ce..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-#ident "$Header$"
-
-#include "mysql.h"     // MySql header file
-#include "mysqld_error.h"
-#include "errmsg.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <time.h>
-#include <limits.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "db.h"
-
-#define DEFAULTCS      "jpps/@localhost:jpps1"
-#define GLITE_JP_LB_MYSQL_VERSION 40018
-
-static int  my_err(glite_jp_context_t ctx, char *function)
-{      
-       glite_jp_error_t err; 
-
-       glite_jp_clear_error(ctx); 
-       memset(&err,0,sizeof err); 
-       err.source = function;
-       err.code = EIO; /* XXX */
-       err.desc = mysql_error((MYSQL *) ctx->dbhandle); 
-       return glite_jp_stack_error(ctx,&err); 
-}
-
-struct _glite_jp_db_stmt_t {
-       MYSQL_RES               *result;
-       glite_jp_context_t      ctx;
-};
-
-int glite_jp_db_connect(glite_jp_context_t ctx,char *cs)
-{
-       char    *buf = NULL;
-       char    *host,*user,*pw,*db; 
-       char    *slash,*at,*colon;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (!cs) cs = DEFAULTCS;
-
-       if (!(ctx->dbhandle = (void *) mysql_init(NULL))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       mysql_options(ctx->dbhandle, MYSQL_READ_DEFAULT_FILE, "my");
-
-       host = user = pw = db = NULL;
-
-       buf = strdup(cs);
-       slash = strchr(buf,'/');
-       at = strrchr(buf,'@');
-       colon = strrchr(buf,':');
-
-       if (!slash || !at || !colon) {
-               free(buf);
-               err.code = EINVAL;
-               err.desc = "Invalid DB connect string";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       *slash = *at = *colon = 0;
-       host = at+1;
-       user = buf;
-       pw = slash+1;
-       db = colon+1;
-
-       if (!mysql_real_connect((MYSQL *) ctx->dbhandle,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) {
-               free(buf);
-               return my_err(ctx, __FUNCTION__);
-       }
-
-       free(buf);
-       return 0;
-}
-
-void glite_jp_db_close(glite_jp_context_t ctx)
-{
-       mysql_close((MYSQL *) ctx->dbhandle);
-       ctx->dbhandle = NULL;
-}
-
-int glite_jp_db_execstmt(glite_jp_context_t ctx,char *txt,glite_jp_db_stmt_t *stmt)
-{
-       int     merr;
-       int     retry_nr = 0;
-       int     do_reconnect = 0;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (stmt) {
-               *stmt = NULL;
-       }
-
-       while (retry_nr == 0 || do_reconnect) {
-               do_reconnect = 0;
-               if (mysql_query((MYSQL *) ctx->dbhandle,txt)) {
-                       /* error occured */
-                       switch (merr = mysql_errno((MYSQL *) ctx->dbhandle)) {
-                               case 0:
-                                       break;
-                               case ER_DUP_ENTRY: 
-                                       err.code = EEXIST;
-                                       err.desc = mysql_error((MYSQL *) ctx->dbhandle);
-                                       glite_jp_stack_error(ctx,&err);
-                                       return -1;
-                                       break;
-                               case CR_SERVER_LOST:
-                                       if (retry_nr <= 0) 
-                                               do_reconnect = 1;
-                                       break;
-                               default:
-                                       my_err(ctx, __FUNCTION__);
-                                       return -1;
-                                       break;
-                       }
-               }
-               retry_nr++;
-       }
-
-       if (stmt) {
-               *stmt = malloc(sizeof(**stmt));
-               if (!*stmt) {
-                       err.code = ENOMEM;
-                       glite_jp_stack_error(ctx,&err);
-                       return -1;
-               }
-               memset(*stmt,0,sizeof(**stmt));
-               (**stmt).ctx = ctx;
-               (**stmt).result = mysql_store_result((MYSQL *) ctx->dbhandle);
-               if (!(**stmt).result) {
-                       if (mysql_errno((MYSQL *) ctx->dbhandle)) {
-                               my_err(ctx, __FUNCTION__);
-                               return -1;
-                       }
-               }
-       } else {
-               MYSQL_RES       *r = mysql_store_result((MYSQL *) ctx->dbhandle);
-               mysql_free_result(r);
-       }
-       
-       return mysql_affected_rows((MYSQL *) ctx->dbhandle);
-}
-
-int glite_jp_db_fetchrow(glite_jp_db_stmt_t stmt,char **res)
-{
-       MYSQL_ROW       row;
-       glite_jp_context_t      ctx = stmt->ctx;
-       int             nr,i;
-       unsigned long   *len;
-
-       glite_jp_clear_error(ctx);
-
-       if (!stmt->result) return 0;
-
-       if (!(row = mysql_fetch_row(stmt->result))) {
-               if (mysql_errno((MYSQL *) ctx->dbhandle)) {
-                       my_err(ctx, __FUNCTION__);
-                       return -1;
-               } else return 0;
-       }
-
-       nr = mysql_num_fields(stmt->result);
-       len = mysql_fetch_lengths(stmt->result);
-       for (i=0; i<nr; i++) res[i] = len[i] ? strdup(row[i]) : strdup("");
-
-       return nr;
-}
-
-int glite_jp_db_querycolumns(glite_jp_db_stmt_t stmt,char **cols)
-{
-       int     i = 0;
-       MYSQL_FIELD     *f;
-
-       while ((f = mysql_fetch_field(stmt->result))) cols[i++] = f->name;
-       return i == 0;
-}
-
-void glite_jp_db_freestmt(glite_jp_db_stmt_t *stmt)
-{
-       if (*stmt) {
-               if ((**stmt).result) mysql_free_result((**stmt).result);
-               free(*stmt);
-               *stmt = NULL;
-       }
-}
-
-
-char *glite_jp_db_timetodb(time_t t)
-{
-       struct tm       *tm = gmtime(&t);
-       char    tbuf[256];
-
-       /* XXX: the very end of our days */
-       if (!tm && t == (time_t) LONG_MAX) return strdup("9999-12-31 23:59:59");
-
-       sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d'",tm->tm_year+1900,tm->tm_mon+1,
-               tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec);
-       
-       return strdup(tbuf);
-}
-
-time_t glite_jp_db_dbtotime(char *t)
-{
-       struct tm       tm;
-
-       memset(&tm,0,sizeof(tm));
-       setenv("TZ","UTC",1); tzset();
-       sscanf(t,"%4d-%02d-%02d %02d:%02d:%02d",
-               &tm.tm_year,&tm.tm_mon,&tm.tm_mday,
-               &tm.tm_hour,&tm.tm_min,&tm.tm_sec);
-       tm.tm_year -= 1900;
-       tm.tm_mon--;
-
-       return mktime(&tm);
-}
-
-int glite_jp_db_dbcheckversion(glite_jp_context_t ctx)
-{
-       MYSQL   *m = (MYSQL *) ctx->dbhandle;
-       const   char *ver_s = mysql_get_server_info(m);
-       int     major,minor,sub,version;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (!ver_s || 3 != sscanf(ver_s,"%d.%d.%d",&major,&minor,&sub)) {
-               err.code = EINVAL;
-               err.desc = "problem checking MySQL version";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       version = 10000*major + 100*minor + sub;
-
-       if (version < GLITE_JP_LB_MYSQL_VERSION) {
-               char    msg[300];
-
-               snprintf(msg,sizeof msg,"Your MySQL version is %d. At least %d required.",version, GLITE_JP_LB_MYSQL_VERSION);
-               err.code = EINVAL;
-               err.desc = msg;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
diff --git a/org.glite.jp.client/src/new_ftp_backend.c b/org.glite.jp.client/src/new_ftp_backend.c
deleted file mode 100644 (file)
index 930030e..0000000
+++ /dev/null
@@ -1,1790 +0,0 @@
-#ident "$Header$"
-
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-#include "glite/jp/strmd5.h"
-
-#include "tags.h"
-#include "backend.h"
-#include "db.h"
-
-#include "jpps_H.h"    /* XXX: SOAP_TYPE___jpsrv__GetJob */
-
-#define FTPBE_DEFAULT_DB_CS    "jpps/@localhost:jpps"
-
-struct ftpbe_config {
-       char *internal_path;
-       char *external_path;
-       char *db_cs;
-       char *gridmap;
-       char *logname;
-};
-
-static struct ftpbe_config *config = NULL;
-
-struct fhandle_rec {
-       int fd;
-       int fd_append;
-};
-typedef struct fhandle_rec *fhandle;
-
-static struct option ftpbe_opts[] = {
-       { "ftp-internal-path", 1, NULL, 'I' },
-       { "ftp-external-path", 1, NULL, 'E' },
-       { "ftp-db-cs",         1, NULL, 'D' },
-       { "ftp-gridmap",       1, NULL, 'G' },
-       { NULL,                0, NULL,  0  }
-};
-
-/*******************************************************************************
-       Internal helpers
-*******************************************************************************/
-
-
-static int config_check(
-       glite_jp_context_t ctx,
-       struct ftpbe_config *config)
-{
-       return config == NULL ||
-               config->internal_path == NULL ||
-               config->external_path == NULL ||
-               config->db_cs == NULL ||
-               config->gridmap == NULL ||
-               config->logname == NULL;
-
-       /* XXX check reality */
-}
-
-static int jobid_unique_pathname(glite_jp_context_t ctx, const char *job, 
-                         char **unique, char **ju_path, int get_path)
-{
-       char *p;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       p = strrchr(job, '/');
-       if (!p) {
-               err.code = EINVAL;
-               err.desc = "Malformed jobid";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       /* XXX thorough checks */
-       if (!(*unique = strdup(p+1))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (get_path) {
-               if (!(*ju_path = strdup(p+1))) {
-                       free(*unique);
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               *(*ju_path + 10) = '\0';
-       }
-       return 0;
-}
-
-static int mkdirpath(const char* path, int prefixlen)
-{
-       char *wpath, *p;
-       int goout, ret;
-
-       wpath = strdup(path);
-       if (!wpath) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       p = wpath + prefixlen;
-       goout = 0;
-       while (!goout) {
-               while (*p == '/') p++;
-               while (*p != '/' && *p != '\0') p++;
-               goout = (*p == '\0');
-               *p = '\0';
-               ret = mkdir(wpath, S_IRUSR | S_IWUSR | S_IXUSR);
-               if (ret < 0 && errno != EEXIST) break;
-               *p = '/';
-       }
-       free(wpath);
-       return goout ? 0 : ret;
-}
-
-static int store_user(glite_jp_context_t ctx, const char *userid, const char *subj)
-{
-       glite_jp_error_t err;
-       char *stmt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       assert(userid != NULL);
-       assert(subj != NULL);
-
-       trio_asprintf(&stmt,"insert into users(userid,cert_subj) "
-               "values ('%|Ss','%|Ss')",userid,subj);
-       if (!stmt) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) 
-                       glite_jp_clear_error(ctx);
-               else {
-                       free(stmt);
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-       }
-       free(stmt);
-
-       return 0;
-}
-
-static long regtime_trunc(long tv_sec)
-{
-       return tv_sec / (86400*7);
-}
-
-static long regtime_ceil(long tv_sec)
-{
-       return (tv_sec % (86400*7)) ? tv_sec/(86400*7)+1 : tv_sec/(86400*7) ;
-}
-
-/********************************************************************************
-       Backend calls
-********************************************************************************/
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-)
-{
-       glite_jp_error_t err;
-       int opt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       config = (struct ftpbe_config *) calloc(1, sizeof *config);
-       if (!config) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       config->logname = getlogin();
-
-       while ((opt = getopt_long(argc, argv, "I:E:G:", ftpbe_opts, NULL)) != EOF) {
-               switch (opt) {
-                       case 'I': config->internal_path = optarg; break;
-                       case 'E': config->external_path = optarg; break;
-                       case 'D': config->db_cs = optarg; break;
-                       case 'G': config->gridmap = optarg; break;
-                       default: break;
-               }
-       }
-
-       /* Defaults */
-       if (!config->db_cs) config->db_cs = strdup(FTPBE_DEFAULT_DB_CS);
-
-       if (config_check(ctx, config)) {
-               err.code = EINVAL;
-               err.desc = "Invalid FTP backend configuration";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jp_db_connect(ctx, config->db_cs)) {
-               err.code = EIO;
-               err.desc = "Cannot access backend's database (during init)";
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               glite_jp_db_close(ctx); /* slaves open their own connections */
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-)
-{
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       if (glite_jp_db_connect(ctx, config->db_cs)) {
-               err.code = EIO;
-               err.desc = "Cannot access backend's database";
-               return glite_jp_stack_error(ctx,&err);
-       } 
-
-       return 0;
-}
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-)
-{
-       glite_jp_error_t err;
-       char *data_dir = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *ownerhash = NULL;
-       struct timeval reg_tv;
-       char *stmt = NULL;
-       char *dbtime = NULL;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job != NULL);
-       assert(owner != NULL);
-
-       gettimeofday(&reg_tv, NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       ownerhash = str2md5(owner); /* static buffer */
-       if (store_user(ctx, ownerhash, owner)) {
-               err.code = EIO;
-               err.desc = "Cannot store user entry";
-               goto error_out;
-       }
-
-       dbtime = glite_jp_db_timetodb(reg_tv.tv_sec);
-       if (!dbtime) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt,"insert into jobs(jobid,dg_jobid,owner,reg_time) "
-               "values ('%|Ss','%|Ss','%|Ss', %s)",
-               ju, job, ownerhash, dbtime);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) {
-                       err.code = EEXIST;
-                       err.desc = "Job already registered";
-               }
-               else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_tv.tv_sec), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (mkdirpath(data_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's data directory";
-               goto error_out;
-       }
-
-error_out:
-       free(data_dir);
-       free(stmt); free(dbtime);
-       free(ju); free(ju_path);
-
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int add_to_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       gridmap = fopen(config->gridmap, "a");
-       if (!gridmap) {
-               err.code = errno;
-               err.desc = "Cannot open gridmap file";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (fprintf(gridmap, "\"%s\" %s\n", dn, config->logname) < 6 ||
-               ferror(gridmap)) {
-               err.code = EIO;
-               err.desc = "Cannot write to gridmap file";
-               fclose(gridmap);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       fclose(gridmap);
-       return 0;
-}
-
-static int remove_from_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       char *temp_name = NULL;
-       FILE *temp_file = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       /* XXX */
-       return 0;
-}
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-)
-{
-       char *data_basename = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *peername = NULL;
-       char *peerhash = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL };
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(destination_out!=NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       peername = glite_jp_peer_name(ctx);
-       if (peername == NULL) {
-               err.code = EINVAL;
-               err.desc = "Cannot obtain client certificate info";
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt, "select owner, reg_time from jobs"
-               " where jobid='%|Ss'", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-       
-       /* XXX authorization done in soap_ops.c */
-
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "",
-               (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(&data_fname, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (asprintf(destination_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (commit_before_inout != NULL)
-       /* XXX no timeout enforced */
-               /* XXX: gsoap does not like so much, one year should be enough
-               *commit_before_inout = (time_t) LONG_MAX;
-               */
-               *commit_before_inout = time(NULL) + 365*24*60*60;
-       
-       /* 
-       if (add_to_gridmap(ctx, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot add peer DN to ftp server authorization file";
-               goto error_out;
-       }
-       */
-
-       peerhash = str2md5(peername); /* static buffer */
-       if (store_user(ctx, peerhash, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot store upload user entry";
-               goto error_out;
-       }
-
-       free(stmt); stmt = NULL;
-       trio_asprintf(&stmt,"insert into files"
-               "(jobid,filename,int_path,ext_url,state,deadline,ul_userid) "
-               "values ('%|Ss','%|Ss','%|Ss','%|Ss','%|Ss', '%|Ss', '%|Ss')",
-               ju, data_basename, data_fname, *destination_out, "uploading", 
-               glite_jp_db_timetodb(*commit_before_inout), peerhash);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) {
-                       err.code = EEXIST;
-                       err.desc = "File already stored or upload in progress";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename); 
-       free(data_fname); 
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-)
-{
-       char *peername = NULL;
-       char *peerhash = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
-       int i;
-       
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(destination != NULL);
-
-       trio_asprintf(&stmt, "select * from files where "
-                            "ext_url='%|Ss' and state='uploading'", destination);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such upload in progress";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 7) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-       glite_jp_db_freestmt(&db_res);
-
-       peername = glite_jp_peer_name(ctx);
-       if (peername == NULL) {
-               err.code = EINVAL;
-               err.desc = "Cannot obtain client certificate info";
-               goto error_out;
-       }
-
-       peerhash = str2md5(peername); /* static buffer */
-       if (strcmp(peerhash, db_row[6])) {
-               err.code = EPERM;
-               err.desc = "Upload started by client with different identity";
-               goto error_out;
-       }
-
-       free(stmt);
-       trio_asprintf(&stmt,"update files set state='committed', deadline=NULL "
-               "where jobid='%|Ss' and filename='%|Ss'", db_row[0], db_row[1]);
-       
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-error_out:
-       for (i=0; i<7; i++) free(db_row[i]);
-       free(peername);
-       free(stmt);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job,
-       char **class,
-       char **name
-)
-{
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL};
-       int i;
-       char *cp = NULL;
-       
-       char *classname = NULL;
-       glite_jp_error_t err;
-
-       assert(destination != NULL);
-       assert(job != NULL);
-       assert(class != NULL);
-       assert(name != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       
-       trio_asprintf(&stmt, "select j.dg_jobid,f.filename from jobs j,files f where "
-                            "f.ext_url='%|Ss' and j.jobid=f.jobid", destination);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "Invalid destination string";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-       glite_jp_db_freestmt(&db_res);
-
-       *job = strdup(db_row[0]);
-
-       cp = strchr(db_row[1],'.');
-       if (!cp) { 
-               *name = NULL;
-       } else {
-               *cp++ = '\0';
-               *name = strdup(cp);
-       }
-       *class = strdup(db_row[1]);
-
-       if (!*job || !*class)  {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       for (i=0; i<2; i++) free(db_row[i]);
-       free(stmt);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       char **url_out
-)
-{
-       char *data_basename = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[3] = { NULL, NULL, NULL };
-
-       long reg_time;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(url_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/ : ""name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&stmt, "select j.owner,reg_time,u.cert_subj from jobs j, users u "
-               "where j.jobid='%|Ss' and j.owner = u.userid", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       free(stmt); stmt = NULL;
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 3) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJob,job,db_row[2])) {
-               err.code = EPERM;
-               goto error_out;
-       }
-       
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "",
-               (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(url_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt,"select 'x' from files where jobid='%|Ss' "
-                               "and ext_url = '%|Ss' "
-                               "and state='committed' ",ju,*url_out);
-
-       if ((db_retn = glite_jp_db_execstmt(ctx,stmt,&db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "not uploaded yet";
-               }
-               else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               /* goto error_out; */
-       }
-
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int get_job_fname(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       char **fname_out
-)
-{
-       char *data_basename = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL };
-
-       long reg_time;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(fname_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&stmt, "select owner, reg_time from jobs "
-               "where jobid='%|Ss'", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-       
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "", (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(fname_out, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,
-       int mode,
-       void **handle_out
-)
-{
-       fhandle handle = NULL;
-       char* fname = NULL;
-       glite_jp_error_t err;
-
-       assert(handle_out != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (get_job_fname(ctx, job, class, name, &fname)) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot construct internal filename";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       handle = (fhandle) calloc(1,sizeof(*handle));
-       if (handle == NULL) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       handle->fd = open(fname, mode, S_IRUSR | S_IWUSR);
-       if (handle->fd < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file";
-               free(handle);
-               goto error_out;
-       }
-       handle->fd_append = open(fname, mode | O_APPEND, S_IRUSR | S_IWUSR);
-       if (handle->fd_append < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file for append";
-               close(handle->fd);
-               free(handle);
-               goto error_out;
-       }
-       *handle_out = (void*) handle;
-
-error_out:
-       free(fname);
-       if (err.code) { 
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (close(((fhandle)handle)->fd_append) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor (fd_append)";
-               goto error_out;
-       }
-       if (close(((fhandle)handle)->fd) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor";
-               goto error_out;
-       }
-
-error_out:
-       free(handle);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-)
-{
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if ((ret = pread(((fhandle)handle)->fd, buf, nbytes, offset)) < 0) {
-               err.code = errno;
-               err.desc = "Error in pread()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       *nbytes_ret = ret;
-
-       return 0;
-}
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (pwrite(((fhandle)handle)->fd, buf, nbytes, offset) < 0) {
-               err.code = errno;
-               err.desc = "Error in pwrite()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (write(((fhandle)handle)->fd_append, buf, nbytes) < 0) {
-               err.code = errno;
-               err.desc = "Error in write()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-static int get_job_info(
-       glite_jp_context_t ctx,
-       const char *job,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       char *ju = NULL;
-       char *ju_path = NULL;
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char *int_fname = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %*s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, &ownerlen) < 4 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       free(int_fname);
-       free(ju);
-       free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-static int get_job_info_int(
-       glite_jp_context_t ctx,
-       const char *int_fname,
-       char **jobid,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char jobid_buf[256];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, jobid_buf, &ownerlen) < 5 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       *jobid = strdup(jobid_buf);
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-)
-{
-       int got_info = 0;
-       struct timeval tv_reg;
-       char *owner = NULL;
-       int got_tags = 0;
-       void *tags_handle = NULL;
-       glite_jp_tagval_t* tags = NULL;
-       int i,j;
-       glite_jp_error_t err;
-
-       assert(job != NULL);
-       assert(attrs_inout != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; attrs_inout[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TIME:
-*/
-                       if (!got_info) {
-                               if (get_job_info(ctx, job, &owner, &tv_reg)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot retrieve job info";
-                                       goto error_out;
-                               }
-                               got_info = 1;
-                       }
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       if (!got_tags) {
-                               if (glite_jppsbe_open_file(ctx, job, GLITE_JP_FILECLASS_TAGS,
-                                       O_RDONLY, &tags_handle)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot open tag file";
-                                       goto error_out;
-                               }
-                               if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot read tags";
-                                       glite_jppsbe_close_file(ctx, tags_handle);
-                                       goto error_out;
-                               }
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               got_tags = 1;
-                       }
-                       break;
-*/
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type";
-                       goto error_out;
-                       break;
-               }
-
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-                       attrs_inout[i].value.s = strdup(owner);
-                       if (!attrs_inout[i].value.s) {
-                               err.code = ENOMEM;
-                               err.desc = "Cannot copy owner string";
-                               goto error_out;
-                       }       
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       attrs_inout[i].value.time = tv_reg;
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       for (j = 0; tags[j].name != NULL; j++) {
-                               if (!strcmp(tags[j].name, attrs_inout[i].attr.name)) {
-                                       if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                               &attrs_inout[i].value.tag)) {
-                                               err.code = ENOMEM;
-                                               err.desc = "Cannot copy tag value";
-                                               goto error_out;
-                                       }
-                                       break;
-                               }
-                       }
-                       if (!tags[j].name) attrs_inout[i].value.tag.name = NULL;
-                       break;
-*/
-               default:
-                       break;
-               }
-       }
-
-error_out:
-       free(owner);
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       free(tags);
-       
-       if (err.code) {
-               while (i > 0) {
-                       i--;
-                       switch (attrs_inout[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               free(attrs_inout[i].value.s);
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               free(attrs_inout[i].value.tag.name);
-                               free(attrs_inout[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-static int compare_timeval(struct timeval a, struct timeval b)
-{
-       if (a.tv_sec < b.tv_sec) return -1;
-       if (a.tv_sec > b.tv_sec) return 1;
-       if (a.tv_usec < b.tv_usec) return -1;
-       if (a.tv_usec > b.tv_usec) return 1;
-       return 0;
-}
-
-
-/* FIXME: disabled -- clarification wrt. filetype plugin needed */
-
-#if 0
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       char *time_dirname = NULL;
-       DIR *time_dirp = NULL;
-       struct dirent *jobent;
-       char *info_fname = NULL;
-       char *jobid = NULL;
-       char *owner = NULL;
-       struct timeval tv_reg;
-       void *tags_handle = NULL;
-       int matching;
-       int i, j;
-       glite_jp_tagval_t* tags = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (asprintf(&time_dirname, "%s/data/%s/%d", config->internal_path,
-                       ownerhash, regtime_tr) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       time_dirp = opendir(time_dirname);
-       if (!time_dirp) {
-               free(time_dirname);
-               return 0; /* found nothing */
-       }
-       while ((jobent = readdir(time_dirp)) != NULL) {
-               if (!strcmp(jobent->d_name, ".")) continue;
-               if (!strcmp(jobent->d_name, "..")) continue;
-               if (asprintf(&info_fname, "%s/%s/_info", time_dirname,
-                               jobent->d_name) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (get_job_info_int(ctx, info_fname, &jobid, &owner,  &tv_reg)) {
-                       err.code = EIO;
-                       err.desc = "Cannot retrieve job info";
-                       goto error_out;
-               }
-               if (q_tags || md_tags) {
-                       if (glite_jppsbe_open_file(ctx, jobid, GLITE_JP_FILECLASS_TAGS,
-                               O_RDONLY, &tags_handle)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot open tag file";
-                               goto error_out;
-                       }
-                       if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot read tags";
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               goto error_out;
-                       }
-                       glite_jppsbe_close_file(ctx, tags_handle);
-                       tags_handle = NULL;
-               }
-
-               matching = 1;
-               for (i = 0; matching && query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (query[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               if (query[i].value.s == NULL || 
-                                       strcmp(query[i].value.s, owner)) matching = 0;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               switch (query[i].op) {
-                                       case GLITE_JP_QUERYOP_EQUAL:
-                                               matching = !compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_UNEQUAL:
-                                               matching = compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_LESS:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) < 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_GREATER:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) > 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_WITHIN:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) >= 0
-                                                       && compare_timeval(tv_reg, query[i].value2.time) <= 0;
-                                               break;
-                               }
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               if (!tags) {
-                                       matching = 0;
-                                       break;
-                               }
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, query[i].attr.name)) {
-                                               switch (query[i].op) {
-                                               case GLITE_JP_QUERYOP_EQUAL:
-                                                       matching = !strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_UNEQUAL:
-                                                       matching = strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_LESS:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) < 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_GREATER:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) > 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_WITHIN:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) >= 0 \
-                                                               && strcmp(tags[j].value, query[i].value2.s) <= 0 ;
-                                                       break;
-                                               default:
-                                                       break;
-                                               }
-                                       }
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               if (!matching) {
-                       free(info_fname); info_fname = NULL;
-                       free(jobid); jobid = NULL;
-                       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-                               free(tags[j].name);
-                               free(tags[j].value);
-                       }
-                       free(tags); tags = NULL;
-                       continue;
-               }
-
-               for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               metadata[i].value.s = owner;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               metadata[i].value.time = tv_reg;
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, metadata[i].attr.name)) {
-                                               if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                                       &metadata[i].value.tag)) {
-                                                       err.code = ENOMEM;
-                                                       err.desc = "Cannot copy tag value";
-                                                       goto error_out;
-                                               }
-                                               break;
-                                       }
-                               }
-                               if (!tags[j].name) {
-                                       metadata[i].value.tag.name = NULL;
-                                       metadata[i].value.tag.value = NULL;
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               (*callback)(ctx, jobid, metadata);
-               free(jobid); jobid = NULL;
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-       }
-
-error_out:
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       if (tags_handle) glite_jppsbe_close_file(ctx, tags_handle);
-       free(info_fname);
-       free(owner);
-       free(jobid);
-       closedir(time_dirp);
-       free(time_dirname);
-       if (err.code)  {
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else
-               return 0;
-}
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       /* XXX clone metadata */
-       int i;
-       char *q_exact_owner = NULL;
-       char *ownerhash = NULL;
-       long q_min_time = 0;
-       long q_max_time = LONG_MAX;
-       long q_min_time_tr;
-       long q_max_time_tr;
-       int q_with_tags = 0;
-       int md_info = 0;
-       int md_tags = 0;
-       char *owner_dirname = NULL;
-       DIR *owner_dirp = NULL;
-       struct dirent *ttimeent;
-       char *data_dirname = NULL;
-       DIR *data_dirp = NULL;
-       struct dirent *ownerent;
-       long ttime = 0;
-       glite_jp_attrval_t *metadata_templ = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               if (query[i].attr.type == GLITE_JP_ATTR_OWNER && query[i].op == GLITE_JP_QUERYOP_EQUAL) {
-                       q_exact_owner = query[i].value.s;
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TIME) {
-                       switch (query[i].op) {
-                       case GLITE_JP_QUERYOP_EQUAL:
-                               q_min_time = query[i].value.time.tv_sec;
-                               q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_LESS:
-                               if (q_max_time > query[i].value.time.tv_sec + 1)
-                                       q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_WITHIN:
-                               if (q_max_time > query[i].value2.time.tv_sec + 1)
-                                       q_max_time = query[i].value2.time.tv_sec + 1;
-                               /* fallthrough */
-                       case GLITE_JP_QUERYOP_GREATER:
-                               if (q_min_time < query[i].value.time.tv_sec)
-                                       q_min_time = query[i].value.time.tv_sec;
-                               break;
-                       default:
-                               err.code = EINVAL;
-                               err.desc = "Invalid query op";
-                               return glite_jp_stack_error(ctx,&err);
-                               break;
-                       }
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TAG) 
-                       q_with_tags = 1;
-
-       }
-
-       for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (metadata[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TIME:
-                       md_info = 1;
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       md_tags = 1;
-                       break;
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type in metadata parameter";
-                       return glite_jp_stack_error(ctx,&err);
-                       break;
-               }
-       }
-       metadata_templ = (glite_jp_attrval_t *) calloc(i + 1, sizeof(glite_jp_attrval_t));
-       if (!metadata_templ) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(metadata_templ, metadata, (i + 1) * sizeof(glite_jp_attrval_t));
-       
-       q_min_time_tr = regtime_trunc(q_min_time);
-       q_max_time_tr = regtime_ceil(q_max_time);
-
-       if (q_exact_owner) {
-               ownerhash = str2md5(q_exact_owner); /* static buffer */
-               if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, ownerhash) == -1) {
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               owner_dirp = opendir(owner_dirname);
-               free(owner_dirname);
-               if (!owner_dirp) {
-                       free(metadata_templ);
-                       return 0; /* found nothing */
-               }
-               while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                       if (!strcmp(ttimeent->d_name, ".")) continue;
-                       if (!strcmp(ttimeent->d_name, "..")) continue;
-                       ttime = atol(ttimeent->d_name);
-                       if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                               if (query_phase2(ctx, ownerhash, ttime, q_with_tags, md_tags,
-                                               query, metadata_templ, callback)) {
-                                       err.code = EIO;
-                                       err.desc = "query_phase2() error";
-                                       goto error_out;
-                               }
-                       }
-               }
-       } else { /* !q_exact_owner */
-               if (asprintf(&data_dirname, "%s/data", config->internal_path) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               data_dirp = opendir(data_dirname);
-               if (!data_dirp) {
-                       err.code = EIO;
-                       err.desc = "Cannot open data directory";
-                       goto error_out;
-               }
-               while ((ownerent = readdir(data_dirp)) != NULL) {
-                       if (!strcmp(ownerent->d_name, ".")) continue;
-                       if (!strcmp(ownerent->d_name, "..")) continue;
-                       if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path,
-                                       ownerent->d_name) == -1) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       owner_dirp = opendir(owner_dirname);
-                       free(owner_dirname);
-                       if (!owner_dirp) {
-                               err.code = EIO;
-                               err.desc = "Cannot open owner data directory";
-                               goto error_out;
-                       }
-                       while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                               if (!strcmp(ttimeent->d_name, ".")) continue;
-                               if (!strcmp(ttimeent->d_name, "..")) continue;
-                               ttime = atol(ttimeent->d_name);
-                               if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                                       if (query_phase2(ctx, ownerent->d_name, ttime, q_with_tags, md_tags,
-                                                       query, metadata_templ, callback)) {
-                                               err.code = EIO;
-                                               err.desc = "query_phase2() error";
-                                               goto error_out;
-                                       }
-                               }
-                       }
-                       closedir(owner_dirp); owner_dirp = NULL;
-               }
-               closedir(data_dirp); data_dirp = NULL;
-       }
-       return 0;
-
-error_out:
-       if (owner_dirp) closedir(owner_dirp);
-       if (data_dirp) closedir(data_dirp);
-       free(data_dirname);
-       free(metadata_templ);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#else 
-
-/* placeholder instead */
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       glite_jp_error_t        err;
-       err.code = ENOSYS;
-       err.desc = "not implemented";
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#endif
-
-/* XXX:
-- no primary authorization yet
-- no concurrency control yet
-- partial success in pwrite,append
-- "unique" part of jobid is assumed to be unique across bookkeeping servers
-- repository versioning not fully implemented yet
-*/
diff --git a/org.glite.jp.client/src/simple_server.c b/org.glite.jp.client/src/simple_server.c
deleted file mode 100644 (file)
index 3bbb743..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpps_H.h"
-
-extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[];
-
-int main(int argc, char *argv[]) {
-   struct soap soap;
-   int i, m, s; // master and slave sockets
-
-   glite_jp_context_t  ctx;
-
-   soap_init(&soap);
-   soap_set_namespaces(&soap, jpps__namespaces);
-
-   glite_jp_init_context(&ctx);
-
-   if (glite_jppsbe_init(ctx, &argc, argv)) {
-          /* XXX log */
-          fputs(glite_jp_error_chain(ctx), stderr);
-          exit(1);
-   }
-
-   soap.user = (void *) ctx;
-
-   ctx->other_soap = soap_new();
-   soap_init(ctx->other_soap);
-   soap_set_namespaces(ctx->other_soap,jpis__namespaces);
-
-   srand48(time(NULL)); /* feed id generation */
-
-   m = soap_bind(&soap, NULL, 8901, 100);
-   if (m < 0)
-      soap_print_fault(&soap, stderr);
-   else
-   {
-      fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
-      for (i = 1; ; i++) {
-         s = soap_accept(&soap);
-         if (s < 0) {
-            soap_print_fault(&soap, stderr);
-            break;
-         }
-         jpps__serve(&soap); // process RPC request
-         soap_destroy(&soap); // clean up class instances
-         soap_end(&soap); // clean up everything and close socket
-        glite_jp_run_deferred(ctx);
-      }
-   }
-   soap_done(&soap); // close master socket
-
-   return 0;
-}
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
diff --git a/org.glite.jp.client/src/soap_ops.c b/org.glite.jp.client/src/soap_ops.c
deleted file mode 100644 (file)
index 9411403..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "feed.h"
-
-#include "jpps_H.h"
-/* #include "JobProvenancePS.nsmap" */
-#include "jpps_.nsmap" 
-
-#include "jptype_map.h"
-
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-
-#include "soap_version.h"
-#if GSOAP_VERSION <= 20602
-#define __jpsrv__RegisterJob __ns1__RegisterJob
-#define __jpsrv__StartUpload __ns1__StartUpload
-#define __jpsrv__CommitUpload __ns1__CommitUpload
-#define __jpsrv__RecordTag __ns1__RecordTag
-#define __jpsrv__FeedIndex __ns1__FeedIndex
-#define __jpsrv__FeedIndexRefresh __ns1__FeedIndexRefresh
-#define __jpsrv__GetJob __ns1__GetJob
-#endif
-
-static struct jptype__genericFault *jp2s_error(struct soap *soap,
-               const glite_jp_error_t *err)
-{
-       struct jptype__genericFault *ret = NULL;
-       if (err) {
-               ret = soap_malloc(soap,sizeof *ret);
-               memset(ret,0,sizeof *ret);
-               ret->code = err->code;
-               ret->source = soap_strdup(soap,err->source);
-               ret->text = soap_strdup(soap,strerror(err->code));
-               ret->description = soap_strdup(soap,err->desc);
-               ret->reason = jp2s_error(soap,err->reason);
-       }
-       return ret;
-}
-
-static void err2fault(const glite_jp_context_t ctx,struct soap *soap)
-{
-       char    *et;
-       struct SOAP_ENV__Detail *detail = soap_malloc(soap,sizeof *detail);
-       struct _genericFault *f = soap_malloc(soap,sizeof *f);
-
-
-       f->jpelem__genericFault = jp2s_error(soap,ctx->error);
-
-       detail->__type = SOAP_TYPE__genericFault;
-#if GSOAP_VERSION >= 20700
-       detail->fault = f;
-#else
-       detail->value = f;
-#endif
-       detail->__any = NULL;
-
-       soap_receiver_fault(soap,"Oh, shit!",NULL);
-       if (soap->version == 2) soap->fault->SOAP_ENV__Detail = detail;
-       else soap->fault->detail = detail;
-}
-
-/* deprecated 
-static glite_jp_fileclass_t s2jp_fileclass(enum jptype__UploadClass class)
-{
-       switch (class) {
-               case INPUT_SANDBOX: return GLITE_JP_FILECLASS_INPUT;
-               case OUTPUT_SANDBOX: return GLITE_JP_FILECLASS_OUTPUT;
-               case JOB_LOG: return GLITE_JP_FILECLASS_LBLOG;
-               default: return GLITE_JP_FILECLASS_UNDEF;
-       }
-}
-*/
-
-static void s2jp_tag(const struct jptype__tagValue *stag,glite_jp_tagval_t *jptag)
-{
-       memset(jptag,0,sizeof *jptag);
-       jptag->name = strdup(stag->name);
-       jptag->sequence = stag->sequence ? *stag->sequence : 0;
-       jptag->timestamp = stag->timestamp ? *stag->timestamp : 0;
-       if (stag->stringValue) jptag->value = strdup(stag->stringValue);
-       else if (stag->blobValue) {
-               jptag->binary = 1;
-               jptag->size = stag->blobValue->__size;
-               jptag->value = (char *) stag->blobValue->__ptr;
-       }
-}
-
-#define CONTEXT_FROM_SOAP(soap,ctx) glite_jp_context_t ctx = (glite_jp_context_t) ((soap)->user)
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RegisterJob(
-               struct soap *soap,
-               struct _jpelem__RegisterJob *in,
-               struct _jpelem__RegisterJobResponse *empty)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       glite_jp_attrval_t owner_val[2];
-
-       printf("%s %s %s\n",__FUNCTION__,in->job,in->owner);
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__RegisterJob,in->job,in->owner) ||
-               glite_jppsbe_register_job(ctx,in->job,in->owner))
-       {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       owner_val[0].attr.type = GLITE_JP_ATTR_OWNER;
-       owner_val[0].value.s = in->owner;
-       owner_val[1].attr.type = GLITE_JP_ATTR_UNDEF;
-
-/* XXX: errrors should be ingored but not silently */
-       glite_jpps_match_attr(ctx,in->job,owner_val); 
-
-       return SOAP_OK;
-}
-
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__StartUpload(
-               struct soap *soap,
-               struct _jpelem__StartUpload *in,
-               struct _jpelem__StartUploadResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *destination;
-       time_t  commit_before = in->commitBefore;
-       glite_jp_error_t        err;
-       glite_jpps_fplug_data_t **pd = NULL;
-       int     i;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__StartUpload,NULL,NULL)) {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       switch (glite_jpps_fplug_lookup(ctx,in->class_,&pd)) {
-               case ENOENT:
-                       err.code = ENOENT;
-                       err.source = __FUNCTION__;
-                       err.desc = "unknown file class";
-                       glite_jp_stack_error(ctx,&err);
-                       err2fault(ctx,soap);
-                       return SOAP_FAULT;
-               case 0: break;
-               default:
-                       err2fault(ctx,soap);
-                       return SOAP_FAULT;
-       }
-
-       for (i=0; pd[0]->uris[i] && strcmp(pd[0]->uris[i],in->class_); i++);
-       assert(pd[0]->uris[i]);
-
-       if (glite_jppsbe_start_upload(ctx,in->job,pd[0]->classes[i],in->name,in->contentType,
-                               &destination,&commit_before))
-       {
-               err2fault(ctx,soap);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       out->destination = soap_strdup(soap,destination);
-       free(destination);
-       out->commitBefore = commit_before;
-
-       free(pd);
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__CommitUpload(
-               struct soap *soap,
-               struct _jpelem__CommitUpload *in,
-               struct _jpelem__CommitUploadResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *job,*class,*name;
-
-       job = class = name = NULL;
-       
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__CommitUpload,NULL,NULL) ||
-               glite_jppsbe_commit_upload(ctx,in->destination))
-       {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       /* XXX: should not fail when commit_upload was OK */
-       assert(glite_jppsbe_destination_info(ctx,in->destination,&job,&class,&name) == 0);
-
-       /* XXX: ignore errors but don't fail silenty */
-       glite_jpps_match_file(ctx,job,class,name);
-
-       free(job); free(class); free(name);
-
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RecordTag(
-               struct soap *soap,
-               struct _jpelem__RecordTag *in,
-               struct _jpelem__RecordTagResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       void    *file_be,*file_p;
-       glite_jpps_fplug_data_t **pd = NULL;
-
-       glite_jp_tagval_t       mytag;
-
-       file_be = file_p = NULL;
-
-       /* XXX: we assume just one plugin and also that TAGS plugin handles
-        * just one uri/class */
-
-       if (glite_jpps_fplug_lookup(ctx,GLITE_JP_FILETYPE_TAGS,&pd)
-               || glite_jppsbe_open_file(ctx,in->jobid,pd[0]->classes[0],NULL,
-                                               O_RDWR|O_CREAT,&file_be)
-                       /* XXX: tags need reading to check magic number */
-       ) {
-               free(pd);
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       s2jp_tag(in->tag,&mytag);
-
-       /* XXX: assuming tag plugin handles just one type */
-       if (pd[0]->ops.open(pd[0]->fpctx,file_be,GLITE_JP_FILETYPE_TAGS,&file_p)
-               || pd[0]->ops.generic(pd[0]->fpctx,file_p,GLITE_JP_FPLUG_TAGS_APPEND,&mytag))
-       {
-               err2fault(ctx,soap);
-               if (file_p) pd[0]->ops.close(pd[0]->fpctx,file_p);
-               glite_jppsbe_close_file(ctx,file_be);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       if (pd[0]->ops.close(pd[0]->fpctx,file_p)
-               || glite_jppsbe_close_file(ctx,file_be))
-       {
-               err2fault(ctx,soap);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       /* XXX: ignore errors but don't fail silenty */
-       glite_jpps_match_tag(ctx,in->jobid,&mytag);
-
-       free(pd);
-       return SOAP_OK;
-}
-
-extern char *glite_jp_default_namespace;
-
-/* XXX: should be public */
-#define GLITE_JP_TAGS_NAMESPACE "http://glite.org/services/jp/tags"
-
-static void s2jp_attr(const char *in,glite_jp_attr_t *out)
-{
-       char    *buf = strdup(in),*name = strchr(buf,':'),*ns = NULL;
-
-       if (name) {
-               ns = buf; 
-               *name++ = 0;
-       }
-       else {
-               name = buf; 
-               ns = glite_jp_default_namespace;
-       }
-
-       memset(out,0,sizeof *out);
-
-       if (strcmp(ns,glite_jp_default_namespace))
-               out->type = strcmp(ns,GLITE_JP_TAGS_NAMESPACE) ?
-                       GLITE_JP_ATTR_GENERIC : GLITE_JP_ATTR_TAG;
-       else {
-               if (!strcmp(name,"owner")) out->type = GLITE_JP_ATTR_OWNER;
-               else if (!strcmp(name,"time")) out->type = GLITE_JP_ATTR_OWNER;
-
-       }
-
-       if (out->type) {
-               out->name = strdup(name);
-               out->namespace = strdup(ns);
-       }
-}
-
-static void s2jp_queryval(
-               const char *in,
-               glite_jp_attrtype_t type,
-               union _glite_jp_query_rec_val *out)
-{
-       switch (type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TAG:
-               case GLITE_JP_ATTR_GENERIC:
-                       out->s = strdup(in);
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       out->time.tv_sec = atoi(in);
-                       break;
-       }
-}
-
-static void s2jp_query(const struct jptype__primaryQuery *in, glite_jp_query_rec_t *out)
-{
-       s2jp_attr(in->attr,&out->attr);
-
-       switch (in->op) {
-               case EQUAL: out->op = GLITE_JP_QUERYOP_EQUAL; break;
-               case UNEQUAL: out->op = GLITE_JP_QUERYOP_UNEQUAL; break;
-               case LESS: out->op = GLITE_JP_QUERYOP_LESS; break;
-               case GREATER: out->op = GLITE_JP_QUERYOP_GREATER; break;
-               case WITHIN:
-                       out->op = GLITE_JP_QUERYOP_WITHIN;
-                       s2jp_queryval(in->value2,out->attr.type,&out->value2);
-                       break;
-       }
-
-       s2jp_queryval(in->value,out->attr.type,&out->value);
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndex(
-               struct soap *soap,
-               struct _jpelem__FeedIndex *in,
-               struct _jpelem__FeedIndexResponse *out)
-{      
-
-/* deferred processing: return feed_id to the index server first,
- * start feeding it afterwards -- not before the index server actually
- * knows feed_id and is ready to accept the feed.
- *
- * Has to be done within the same server slave, 
- * passed through the context */
-
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *feed_id = NULL;
-       time_t  expires = 0;
-       int     ret = SOAP_OK;
-
-       glite_jp_attr_t *attrs = calloc(in->__sizeattributes+1,sizeof *attrs);
-       glite_jp_query_rec_t    *qry = calloc(in->__sizeconditions+1,sizeof *qry);
-       int     i;
-
-       glite_jp_clear_error(ctx);
-
-       for (i = 0; i<in->__sizeattributes; i++) s2jp_attr(in->attributes[i],attrs+i);
-       for (i = 0; i<in->__sizeconditions; i++) s2jp_query(in->conditions[i],qry+i);
-
-       if (in->history) {
-               if (glite_jpps_run_feed(ctx,in->destination,attrs,qry,&feed_id)) {
-                       err2fault(ctx,soap);
-                       ret = SOAP_FAULT;
-                       goto cleanup;
-               }
-       }
-
-       if (in->continuous) {
-               if (glite_jpps_register_feed(ctx,in->destination,attrs,qry,&feed_id,&expires)) {
-                       err2fault(ctx,soap);
-                       ret = SOAP_FAULT;
-                       goto cleanup;
-               }
-       }
-
-       if (!in->history && !in->continuous) {
-               glite_jp_error_t        err;
-               memset(&err,0,sizeof err);
-               err.code = EINVAL;
-               err.source = __FUNCTION__;
-               err.desc = "at least one of <history> and <continous> must be true";
-               glite_jp_stack_error(ctx,&err);
-               err2fault(ctx,soap);
-               ret = SOAP_FAULT;
-               goto cleanup;
-       }
-
-       out->feedExpires = expires;
-       out->feedId = soap_strdup(soap,feed_id);
-
-cleanup:
-       free(feed_id);
-       for (i=0; attrs[i].type; i++) free(attrs[i].name);
-       free(attrs);
-       for (i=0; qry[i].attr.type; i++) glite_jp_free_query_rec(qry+i);
-       free(qry);
-
-       return ret;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndexRefresh(
-               struct soap *soap,
-               struct _jpelem__FeedIndexRefresh *in,
-               struct _jpelem__FeedIndexRefreshResponse *out)
-{
-       fprintf(stderr,"%s: not implemented\n",__FUNCTION__);
-       abort();
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJob(
-               struct soap *soap,
-               struct _jpelem__GetJob *in,
-               struct _jpelem__GetJobResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *url;
-
-       int     i,n;
-       glite_jp_error_t        err;
-       void    **pd;
-       struct jptype__jppsFile         **f = NULL;
-
-       memset(&err,0,sizeof err);
-       out->__sizefiles = 0;
-
-       for (pd = ctx->plugins; *pd; pd++) {
-               glite_jpps_fplug_data_t *plugin = *pd;
-
-               for (i=0; plugin->uris[i]; i++) {
-                       glite_jp_clear_error(ctx);
-                       switch (glite_jppsbe_get_job_url(ctx,in->jobid,plugin->classes[i],NULL,&url)) {
-                               case 0: n = out->__sizefiles++;
-                                       f = realloc(f,out->__sizefiles * sizeof *f);
-                                       f[n] = soap_malloc(soap, sizeof **f);
-                                       f[n]->class_ = soap_strdup(soap,plugin->uris[i]);
-                                       f[n]->name = NULL;
-                                       f[n]->url = soap_strdup(soap,url);
-                                       free(url);
-                                       break;
-                               case ENOENT:
-                                       break;
-                               default: 
-                                       err.code = ctx->error->code;
-                                       err.source = "jpsrv__GetJob()";
-                                       err.desc = plugin->uris[i];
-                                       glite_jp_stack_error(ctx,&err);
-                                       err2fault(ctx,soap);
-                                       glite_jp_clear_error(ctx);
-                                       return SOAP_FAULT;
-                       }
-               }
-       }
-
-       if (!out->__sizefiles) {
-               glite_jp_clear_error(ctx);
-               err.code = ENOENT;
-               err.source = __FUNCTION__;
-               err.desc = "No file found for this job";
-               glite_jp_stack_error(ctx,&err);
-               err2fault(ctx,soap);
-               glite_jp_clear_error(ctx);
-               return SOAP_FAULT;
-       }
-
-       out->files = soap_malloc(soap,out->__sizefiles * sizeof *f);
-       memcpy(out->files,f,out->__sizefiles * sizeof *f);
-
-       return SOAP_OK;
-}
-
diff --git a/org.glite.jp.client/src/tags.c b/org.glite.jp.client/src/tags.c
deleted file mode 100644 (file)
index 1f11b4d..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include <glite/jp/types.h>
-#include "tags.h"
-#include "backend.h"
-
-/* magic name_len value_len binary sequence timestamp */
-#define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#"
-#define HEADER_SIZE 48
-
-int glite_jpps_tag_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       const glite_jp_tagval_t *tag
-)
-{
-       char    hdr[HEADER_SIZE+1];
-       glite_jp_error_t        err;
-
-       unsigned long   vlen = tag->binary ? tag->size :
-                               (tag->value ? strlen(tag->value) : 0);
-       int     nlen;
-
-       memset(&err,0,sizeof err);
-       err.source = "glite_jpps_tag_append()";
-
-       if (!tag->name) {
-               err.code = EINVAL;
-               err.desc = "tag name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       nlen = strlen(tag->name);
-
-       assert(sprintf(hdr,HEADER,nlen,vlen,
-                       tag->binary ? "B" : "S",
-                       tag->sequence, tag->timestamp) == HEADER_SIZE);
-
-       if (glite_jppsbe_append(ctx,handle,hdr,HEADER_SIZE)) {
-               err.code = EIO;
-               err.desc = "write tag header";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jppsbe_append(ctx,handle,tag->name,nlen)) {
-               err.code = EIO;
-               err.desc = "write tag name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jppsbe_append(ctx,handle,tag->value,vlen)) {
-               err.code = EIO;
-               err.desc = "write tag value";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jpps_tagval_copy(
-       glite_jp_context_t ctx,
-       glite_jp_tagval_t *from,
-       glite_jp_tagval_t *to
-)
-{
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       to->name = strdup(from->name);
-       if (!to->name) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       to->sequence = from->sequence;
-       to->timestamp = from->timestamp;
-       to->binary = from->binary;
-       to->size = from->size;
-       to->value = (char *) malloc(to->size);
-       if (!to->value) {
-               free(to->name);
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(from->value, to->value, to->size);
-
-       return 0;
-}
-
-int glite_jpps_tag_read(
-       glite_jp_context_t ctx,
-       void *handle,
-       off_t offset,
-       glite_jp_tagval_t *tagvalue,
-       size_t *shift
-)
-{
-       char hdr[HEADER_SIZE+1];
-       unsigned int nlen;
-       unsigned long  vlen;
-       char binary;
-       unsigned sequence;
-       unsigned timestamp;
-       char * name = NULL;
-       char * value = NULL;
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       hdr[HEADER_SIZE] = '\0';
-       if (glite_jppsbe_pread(ctx, handle, hdr, HEADER_SIZE, offset, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag header";
-               goto error_out;
-       }
-       if (ret == 0) {
-               err.code = ENOENT;
-               err.desc = "No more tags in the file";
-               goto error_out;
-       }
-       /* #define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#" */
-       if (sscanf(hdr, HEADER, &nlen, &vlen, &binary, &sequence, &timestamp) < 5) {
-               err.code = EILSEQ;
-               err.desc = "Incorrect tag header format";
-               goto error_out;
-       }
-       name = (char*) malloc(nlen + 1);
-       if (!name) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       name[nlen] = '\0';
-       value = (char*) malloc(vlen + 1);
-       if (!value) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       value[vlen] = '\0';
-       if (glite_jppsbe_pread(ctx, handle, name, nlen, offset + HEADER_SIZE, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag name";
-               goto error_out;
-       }
-       if (glite_jppsbe_pread(ctx, handle, value, vlen, offset + HEADER_SIZE + nlen, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag value";
-               goto error_out;
-       }
-       
-       tagvalue->name = name;
-       tagvalue->sequence = sequence;
-       tagvalue->timestamp = timestamp;
-       tagvalue->binary = (binary == 'B') ? 1 : 0;
-       tagvalue->size = vlen;
-       tagvalue->value = value;
-
-       *shift = HEADER_SIZE + nlen + vlen;
-
-       return 0;
-error_out:
-       free(name);
-       free(value);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-/*
-int glite_jpps_tag_read(glite_jp_context_t, void *, off_t, glite_jp_tagval_t *, size_t);
-int glite_jpps_tag_readall(glite_jp_context_t, void *, glite_jp_tagval_t **);
-*/
-
-int glite_jpps_tag_readall(
-       glite_jp_context_t ctx,
-       void *handle,
-       glite_jp_tagval_t **tags_out
-)
-{
-       glite_jp_tagval_t * tags = NULL;
-       void * newspace;
-       int ntags = 0;
-       int ntagspace = 0;
-       off_t offset = 0;
-       int ret;
-       size_t shift;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       ntagspace = 1;
-       tags = (glite_jp_tagval_t *) calloc(ntagspace + 1, sizeof(*tags));
-       if (!tags) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       while (!(ret = glite_jpps_tag_read(ctx, handle, offset, &tags[ntags], &shift))) {
-               offset += shift;
-               ntags++;
-               if (ntagspace <= ntags) {
-                       ntagspace += 1;
-                       newspace = realloc(tags, (ntagspace + 1) * sizeof(*tags));
-                       if (!newspace) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       tags = (glite_jp_tagval_t *) newspace;
-               }
-       }
-       if (ret == ENOENT) {
-               *tags_out = tags;
-               return 0;
-       } else {
-               err.code = EIO;
-               err.desc = "Error reading tag value";
-       }
-
-error_out:
-       for (; ntags-- ;) {
-               free(tags[ntags].name);
-               free(tags[ntags].value);
-       }
-       free(tags);
-       return glite_jp_stack_error(ctx,&err);
-}
diff --git a/org.glite.jp.client/src/tags.h b/org.glite.jp.client/src/tags.h
deleted file mode 100644 (file)
index 0d8afa8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int glite_jpps_tag_append(glite_jp_context_t,void *,const glite_jp_tagval_t *);
diff --git a/org.glite.jp.client/src/tags_plugin.c b/org.glite.jp.client/src/tags_plugin.c
deleted file mode 100644 (file)
index 95dabd8..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-#include <stdlib.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <string.h>
-#include <errno.h>
-#include <stdint.h>
-
-#include <glite/jp/types.h>
-
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-
-static int tagappend(void *,void *,int,...);
-static int tagopen(void *,void *,const char *uri,void **);
-static int tagclose(void *,void *);
-
-#define TAGS_MAGIC 0x74c016f2  /* two middle digits encode version, i.e. 01 */
-
-static int tagdummy()
-{
-       puts("tagdummy()");
-       return -1;
-}
-
-struct tags_handle {
-       void    *bhandle;
-       int     n;
-       glite_jp_tagval_t       *tags;
-};
-
-int init(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data)
-{
-       data->fpctx = ctx;
-
-       data->uris = calloc(2,sizeof *data->uris);
-       data->uris[0] = strdup(GLITE_JP_FILETYPE_TAGS);
-
-       data->classes = calloc(2,sizeof *data->classes);
-       data->classes[0] = strdup("tags");
-
-       data->ops.open = tagopen;
-       data->ops.close = tagclose;
-       data->ops.attr = tagdummy;
-       data->ops.generic = tagappend;
-       
-       printf("tags_plugin: URI: \"%s\"; magic number: 0x%08lx\n",GLITE_JP_FILETYPE_TAGS,TAGS_MAGIC);
-       return 0;
-}
-
-static int tagopen(void *fpctx,void *bhandle,const char *uri,void **handle)
-{
-       struct tags_handle *h = calloc(1,sizeof *h);
-       h->n = -1;
-       h->bhandle = bhandle;
-
-       *handle = h;
-
-       return 0;
-}
-
-static int tagclose(void *fpctx,void *handle)
-{
-       int     i;
-       struct tags_handle *h = handle;
-
-       for (i=0; i<h->n; i++) {
-               free(h->tags[i].name);
-               free(h->tags[i].value);
-       }
-       free(h->tags);
-       free(h);
-
-       return 0;
-}
-
-static int tagappend(void *fpctx,void *handle,int oper,...)
-{
-       glite_jp_tagval_t       *tag;
-       va_list ap;
-       char    *hdr,*rec;
-       glite_jp_context_t      ctx = fpctx;
-       struct tags_handle      *h = handle;
-       uint32_t                magic,hlen,rlen,rlen_n;
-       size_t                  r;
-       glite_jp_error_t        err;
-
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       glite_jp_clear_error(ctx);
-
-       va_start(ap,oper);
-       tag = va_arg(ap,glite_jp_tagval_t *);
-       va_end(ap);
-
-       printf("tagappend: %s,%d,%s\n",tag->name,tag->sequence,tag->value);
-
-       assert(oper == GLITE_JP_FPLUG_TAGS_APPEND);
-
-       if (glite_jppsbe_pread(ctx,h->bhandle,&magic,sizeof magic,0,&r)) {
-               err.code = EIO;
-               err.desc = "reading magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (r == 0) {
-               magic = htonl(TAGS_MAGIC);
-               if (glite_jppsbe_pwrite(ctx,h->bhandle,&magic,sizeof magic,0)) {
-                       err.code = EIO;
-                       err.desc = "writing magic number";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-       }
-       else if (r != sizeof magic) {
-               err.code = EIO;
-               err.desc = "can't read magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       else if (magic != htonl(TAGS_MAGIC)) {
-               err.code = EINVAL;
-               err.desc = "invalid magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&hdr,"%d %ld %c",tag->sequence,
-                       tag->timestamp,tag->binary ? 'B' : 'S');
-
-       rlen = strlen(tag->name) + strlen(hdr) + 2 /* \0 after name and after hdr */ +
-               (r = tag->binary ? tag->size : (tag->value ? strlen(tag->value) : 0));
-
-       rlen_n = htonl(rlen);
-
-       rec = malloc(rlen + sizeof rlen_n);
-       *((uint32_t *) rec) = rlen_n;
-       strcpy(rec + sizeof rlen_n,tag->name);
-       strcpy(rec + (hlen = sizeof rlen_n + strlen(tag->name) + 1),hdr);
-
-       if (r) memcpy(rec + hlen + strlen(hdr) + 1,tag->value,r);
-       free(hdr);
-
-       if (glite_jppsbe_append(ctx,h->bhandle,rec,rlen + sizeof rlen_n)) {
-               err.code = EIO;
-               err.desc = "writing tag record";
-               free(rec);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       
-       return 0;
-}
diff --git a/org.glite.jp.client/src/typemap.dat b/org.glite.jp.client/src/typemap.dat
deleted file mode 100644 (file)
index 72f515f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-jpsrv = http://glite.org/wsdl/services/jp
-jptype = http://glite.org/wsdl/types/jp
-jpelem = http://glite.org/wsdl/elements/jp
diff --git a/org.glite.jp.common/.cvsignore b/org.glite.jp.common/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp.common/Makefile b/org.glite.jp.common/Makefile
deleted file mode 100644 (file)
index 3f84bcd..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# defaults
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-lbprefix=lb
-package=glite-jp-common
-version=0.0.0
-PREFIX=/opt/glite
-
-glite_location=/opt/glite
-globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-expat_prefix=/opt/expat
-ares_prefix=/opt/ares
-gsoap_prefix=/software/gsoap-2.6
-
-CC=gcc
-
--include Makefile.inc
-
-
-VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/project:${jpproject}
-
-GLOBUSINC:= -I${globus_prefix}/include/${nothrflavour}
-
-
-DEBUG:=-g -O0 
-CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${stagedir}/include \
-       ${GLOBUSINC}
-
-LINK:=libtool --mode=link ${CC} ${LDFLAGS} -rpath ${stagedir}/lib
-LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
-INSTALL:=libtool --mode=install install
-COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
-
-HDRS:=types.h context.h strmd5.h
-
-SRCS:=context.c strmd5.c attr.c
-OBJS:=${SRCS:.c=.lo}
-
-commonlib:= libglite_jp_common.la
-
-default all: compile
-
-compile: ${commonlib}
-
-${commonlib}: ${OBJS}
-       ${LINK} -o $@ ${OBJS}
-
-check: 
-       -echo nothing yet
-
-doc:
-
-stage: compile
-       $(MAKE) install PREFIX=${stagedir}
-
-install:
-       -mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix}
-       cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${jpprefix}
-       -mkdir -p ${PREFIX}/lib
-       ${INSTALL} -m 755 ${commonlib} ${PREFIX}/lib
-
-dist: distsrc distbin
-
-# FIXME: just copied from LB
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir}
-       save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir
-       rm -rf tmpbuilddir
-        
-clean:
-
-%.lo: %.c
-       ${COMPILE} -o $@ -c $< 
diff --git a/org.glite.jp.common/build.xml b/org.glite.jp.common/build.xml
deleted file mode 100755 (executable)
index 6e50854..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the GLite JP Common module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/11/22 13:36:42  dimeglio
-       First version of this file
-       
-       Revision 1.1.1.1  2004/10/15 09:49:02  akrenek
--->
-
-<project name="common" default="dist">
-       
-       <!-- =========================================
-                Builds the GLite JP Primary Module
-            ========================================= -->
-       
-       <!-- =========================================
-            Import properties (order is important)
-            ========================================= -->
-
-       <!-- import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-                Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-       
-       <!-- =========================================
-                 Load configure options (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-                Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-                       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <import file="${global.targets-simple_make.file}" />
-
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-               
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-
-               <antcall target="lbmakefiles" />
-       </target>
-               
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-       
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.common/interface/context.h b/org.glite.jp.common/interface/context.h
deleted file mode 100644 (file)
index 20effb2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __GLITE_JP_CONTEXT
-#define __GLITE_JP_CONTEXT
-
-int glite_jp_init_context(glite_jp_context_t *);
-void glite_jp_free_query_rec(glite_jp_query_rec_t *);
-
-char *glite_jp_peer_name(glite_jp_context_t);
-char *glite_jp_error_chain(glite_jp_context_t);
-
-int glite_jp_stack_error(glite_jp_context_t, const glite_jp_error_t *);
-int glite_jp_clear_error(glite_jp_context_t); 
-
-int glite_jp_add_deferred(glite_jp_context_t,int (*)(glite_jp_context_t,void *),void *);
-int glite_jp_run_deferred(glite_jp_context_t);
-
-
-#endif
diff --git a/org.glite.jp.common/interface/strmd5.h b/org.glite.jp.common/interface/strmd5.h
deleted file mode 100755 (executable)
index c5d76b6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _GLITE_STRMD5_H
-#define _GLITE_STRMD5_H
-
-#ident "$Header$"
-
-/* Compute MD5 sum of the first argument.
- * The sum is returned in the 16-byte array pointed to by 2nd argument
- *     (if not NULL)
- *
- * Return value: ASCII string of the sum, i.e. 32 characters [0-9a-f]
- *     (pointer to static area, changed by subsequent calls)
- */
-
-char *strmd5(const char *src, unsigned char *dst);
-
-/**
- * Returns: allocated 32bytes long ASCII string with md5 sum
- * of the first argument
- */
-char *str2md5(const char *src);
-
-/**
- * Returns: allocated 22bytes long ASCII string with md5 sum in base64
- * format of the source argument
- */
-char *str2md5base64(const char *src);
-
-#endif /* _GLITE_STRMD5_H */
diff --git a/org.glite.jp.common/interface/type_plugin.h b/org.glite.jp.common/interface/type_plugin.h
deleted file mode 100644 (file)
index bb34744..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef __GLITE_JP_TYPEPLUGIN
-#define __GLITE_JP_TYPEPLUGIN
-
-typedef struct _glite_jp_tplug_data_t {
-       
-       char    *namespace;
-       void    *pctx;
-
-/** Compare attribute values. 
-  * \param[in] a value to compare
-  * \param[in] b value to compare
-  * \param[out] result like strcmp()
-  * \param[out] err set if the values cannot be compared
-  * \retval 0 OK
-  * \retval other error
-  */
-       int (*cmp)(
-               void    *ctx,
-               const glite_jp_attrval_t *a,
-               const glite_jp_attrval_t *b,
-               int     *result);
-
-/** Convert to and from XML representation */
-       char (*to_xml)(void *,const glite_jp_attrval_t *a);
-       glite_jp_attrval_t (*from_xml)(void *,const char *,const char *);
-
-/** Convert to and from database string representation */
-       char (*to_db)(void *,const glite_jp_attrval_t *a);
-       glite_jp_attrval_t (*from_db)(void *,const char *);
-
-/** Query for database type. 
- * Useful for db column dynamic creation etc.
- */
-       const char (*db_type)(void *,const glite_jp_attr_t *);
-
-} glite_jp_tplug_data_t;
-
-/** Plugin init function.
-    Must be called init, supposed to be called as many times as required
-    for different param's (e.g. xsd files).
- */
-
-typedef int (*glite_jp_tplug_init_t)(
-       glite_jp_context_t      ctx,
-       const char              *param,
-       glite_jp_tplug_data     *plugin_data
-);
-
-#endif
diff --git a/org.glite.jp.common/interface/types.h b/org.glite.jp.common/interface/types.h
deleted file mode 100644 (file)
index 06ba2b3..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef __GLITE_JP_TYPES
-#define __GLITE_JP_TYPES
-
-#include <sys/time.h>
-
-#define GLITE_JP_SYSTEM_NS     "http://egee.cesnet.cz/en/WSDL/jp-system"
-#define GLITE_JP_ATTR_OWNER    GLITE_JP_SYSTEM_NS ":owner"
-
-typedef struct _glite_jp_error_t {
-       int     code;
-       const char      *desc;
-       const char      *source;
-       struct _glite_jp_error_t *reason;
-} glite_jp_error_t;
-
-typedef struct _glite_jp_context {
-       glite_jp_error_t *error;
-       int     (**deferred_func)(struct _glite_jp_context *,void *);
-       void    **deferred_arg;
-       void    *feeds;
-       struct soap     *other_soap;
-       char    *peer;
-       void    **plugins;
-       void    *dbhandle;
-       char    **trusted_peers;
-} *glite_jp_context_t;
-
-typedef enum {
-       GLITE_JP_ATTR_ORIG_ANY,         /**< for queries: don't care about origin */
-       GLITE_JP_ATTR_ORIG_SYSTEM,      /**< JP internal, e.g. job owner */
-       GLITE_JP_ATTR_ORIG_USER,        /**< inserted by user explicitely */
-       GLITE_JP_ATTR_ORIG_FILE         /**< coming from uploaded file */
-} glite_jp_attr_orig_t;
-
-typedef struct {
-       char    *name;          /**< including namespace */
-       char    *value;
-       int     binary;         /**< value is binary */
-       size_t  size;           /**< in case of binary value */
-       glite_jp_attr_orig_t    origin; 
-       char    *origin_detail; /**< where it came from, i.e. file URI:name */
-       time_t  timestamp;
-} glite_jp_attrval_t;
-
-
-typedef enum {
-       GLITE_JP_QUERYOP_UNDEF,
-       GLITE_JP_QUERYOP_EQUAL,
-       GLITE_JP_QUERYOP_UNEQUAL,
-       GLITE_JP_QUERYOP_LESS,
-       GLITE_JP_QUERYOP_GREATER,
-       GLITE_JP_QUERYOP_WITHIN,
-       GLITE_JP_QUERYOP__LAST,
-} glite_jp_queryop_t;
-
-typedef struct {
-       char    *attr;
-       glite_jp_queryop_t op;
-       char    *value, *value2;
-       int     binary;
-       size_t  size,size2;
-       glite_jp_attr_orig_t origin;
-} glite_jp_query_rec_t;
-
-void glite_jp_attrval_free(glite_jp_attrval_t *,int);
-
-#endif
diff --git a/org.glite.jp.common/project/build.number b/org.glite.jp.common/project/build.number
deleted file mode 100644 (file)
index c680c72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=36
diff --git a/org.glite.jp.common/project/build.properties b/org.glite.jp.common/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.common/project/configure.properties.xml b/org.glite.jp.common/project/configure.properties.xml
deleted file mode 100644 (file)
index 5f0ea37..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Configuration options for the gLite JP Common module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/11/22 13:36:42  dimeglio
-       First version of this file
-       
-       Revision 1.1.1.1  2004/10/15 09:49:02  akrenek
--->
-
-       <!-- ======================================================
-         Define extra properties here ...
-         ====================================================== -->
-        
-       <project name="JP Common configuration options">                                                                        
-               <target name="lbmakefiles">
-                       <exec executable="ln" failonerror="true">
-                               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-                       </exec>
-                       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-jpprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-glite_location=${with.glite.location}
-globus_prefix=${with.globus.prefix}
-expat_prefix=${with.expat.prefix}
-gsoap_prefix=${with.gsoap.prefix}
-ares_prefix=${with.ares.prefix}
-thrflavour=${with.globus.thr.flavor}
-nothrflavour=${with.globus.nothr.flavor}
-cppunit=${with.cppunit.prefix}
-jpproject=${subsystem.project.dir}
-project=${component.project.dir}
-                       </echo>
-           </target>
-       </project>
diff --git a/org.glite.jp.common/project/properties.xml b/org.glite.jp.common/project/properties.xml
deleted file mode 100755 (executable)
index b9d669d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP Common component
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$ 
-       
-       Revision history:
-       $Log$
-       Revision 1.1.1.1  2004/10/15 09:49:02  akrenek
--->
-
-<project name="JP Common component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-          Define corresponding subsystem properties
-                ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-          Define component properties
-                ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="common" />
-                       
-       <!-- ======================================================
-          Define general component properties
-                ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                
-                                                               
-</project>
diff --git a/org.glite.jp.common/project/tar_exclude b/org.glite.jp.common/project/tar_exclude
deleted file mode 100644 (file)
index e1fcd1a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-tar_exclude
-CVS
-build.xml
-build
-build.properties
-properties.xml
-configure.properties.xml
-.cvsignore
-.project
-.cdtproject
diff --git a/org.glite.jp.common/project/version.properties b/org.glite.jp.common/project/version.properties
deleted file mode 100644 (file)
index cd1e9e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=1
diff --git a/org.glite.jp.common/src/attr.c b/org.glite.jp.common/src/attr.c
deleted file mode 100644 (file)
index 250ef5a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "types.h"
-
-void glite_jp_attrval_free(glite_jp_attrval_t *a,int f)
-{
-       free(a->name);
-       free(a->value);
-       free(a->origin_detail);
-       if (f) free(a);
-}
diff --git a/org.glite.jp.common/src/context.c b/org.glite.jp.common/src/context.c
deleted file mode 100644 (file)
index fc7b0bf..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-
-#include "types.h"
-#include "context.h"
-
-int glite_jp_init_context(glite_jp_context_t *ctx)
-{
-       *ctx = calloc(1,sizeof **ctx);
-}
-
-char *glite_jp_peer_name(glite_jp_context_t ctx)
-{
-       return strdup(ctx->peer ? ctx->peer : "unknown");
-}
-
-char *glite_jp_error_chain(glite_jp_context_t ctx)
-{
-       char    *ret = NULL,indent[300] = "";
-       int     len = 0,add;
-       char    buf[2000];
-
-       glite_jp_error_t *ep = ctx->error;
-
-       do {
-               add = snprintf(buf,sizeof buf,"%s%s: %s (%s)\n",
-                               indent,
-                               ep->source,
-                               strerror(ep->code),
-                               ep->desc ? ep->desc : "");
-               ret = realloc(ret,len + add + 1);
-               strncpy(ret + len,buf,add); ret[len += add] = 0;
-               strcat(indent,"  ");
-       } while (ep = ep->reason);
-
-       return ret;
-}
-
-int glite_jp_stack_error(glite_jp_context_t ctx, const glite_jp_error_t *err)
-{
-       glite_jp_error_t        *reason = ctx->error;
-
-       ctx->error = calloc(1,sizeof *ctx->error);
-       ctx->error->code = err->code;
-       ctx->error->desc = err->desc ? strdup(err->desc) : NULL;
-       ctx->error->source = err->source ? strdup(err->source) : NULL;
-       ctx->error->reason = reason;
-
-       return err->code;
-}
-
-int glite_jp_clear_error(glite_jp_context_t ctx)
-{
-       glite_jp_error_t        *e = ctx->error, *r;
-
-       while (e) {
-               r = e->reason;
-               free((char *) e->source);
-               free((char *) e->desc);
-               free(e);
-               e = r;
-       }
-       ctx->error = NULL;
-       return 0;
-}
-
-
-void glite_jp_free_query_rec(glite_jp_query_rec_t *q)
-{
-       free(q->attr); 
-       free(q->value);
-       free(q->value2);
-       memset(q,0,sizeof *q);
-}
-
-int glite_jp_queryrec_copy(glite_jp_query_rec_t *dst, const glite_jp_query_rec_t *src)
-{
-       if (src->attr) dst->attr = strdup(src->attr);
-       if (src->value) dst->value = strdup(src->value);
-       if (src->value2) dst->value2 = strdup(src->value2);
-       dst->op = src->op;
-       dst->origin = src->origin;
-       return 0;
-}
-
-int glite_jp_run_deferred(glite_jp_context_t ctx)
-{
-       int     i,cnt,ret;
-
-       if (!ctx->deferred_func) return 0;
-
-       glite_jp_clear_error(ctx);
-       for (cnt=0;ctx->deferred_func[cnt];cnt++);
-       for (i=0; i<cnt; i++) {
-               if (ret = (*ctx->deferred_func)(ctx,*ctx->deferred_arg)) {
-                       glite_jp_error_t        err;
-                       char    desc[100];
-
-                       sprintf(desc,"calling func #%d, %p",i,*ctx->deferred_func);
-                       err.code = ret;
-                       err.desc = desc;
-                       err.source = "glite_jp_run_deferred()";
-
-                       glite_jp_stack_error(ctx,&err);
-                       return ret;
-               }
-               else {
-                       memmove(ctx->deferred_func,ctx->deferred_func+1,
-                                       (cnt-i) * sizeof *ctx->deferred_func);
-                       memmove(ctx->deferred_arg,ctx->deferred_arg+1,
-                                       (cnt-i) * sizeof *ctx->deferred_arg);
-               }
-       }
-       free(ctx->deferred_func); ctx->deferred_func = NULL;
-       free(ctx->deferred_arg); ctx->deferred_arg = NULL;
-       return 0;
-}
-
-int glite_jp_add_deferred(
-               glite_jp_context_t ctx,
-               int (*func)(glite_jp_context_t, void *),
-               void *arg
-)
-{
-       int     (**v)(glite_jp_context_t, void *) = ctx->deferred_func;
-       int     i;
-
-       for (i=0; v && *v; i++);
-
-       ctx->deferred_func = realloc(ctx->deferred_func, (i+1) * sizeof *ctx->deferred_func);
-       ctx->deferred_func[i] = func;
-       ctx->deferred_func[i+1] = NULL;
-
-       ctx->deferred_arg = realloc(ctx->deferred_arg,(i+1) * sizeof *ctx->deferred_arg);
-       ctx->deferred_arg[i] = arg;
-       ctx->deferred_arg[i+1] = NULL;
-
-       return 0;
-}
diff --git a/org.glite.jp.common/src/stdtypes.c b/org.glite.jp.common/src/stdtypes.c
deleted file mode 100644 (file)
index 6995e77..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "lb/trio.h"
-
-#include "types.h"
-#include "type_plugin.h"
-
-static char *namespace = "http://glite.org/wsdl/types/jp_std_attr";
-
-static int check_namespace(const glite_jp_attr_t *a)
-{
-       if (a->namespace && strcmp(a->namespace,namespace)) return -1;
-       return 0;
-}
-
-static int *cmp(
-       void *ctx,
-       const glite_jp_attrval_t *a,
-       const glite_jp_attrval_t *b,
-       int     *result
-{
-       struct timeval  t;
-       int     r;
-
-       if (check_namespace(&a->attr) || check_namespace(&b->attr)) return -1;
-       if (glite_jp_attr_cmp(&a->attr,&b->attr)) return -1;
-
-       switch (a->attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-                       r = strcmp(a->value.s,b->value.s);
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       t = a->value.time;
-                       t.tv_sec -= b->value.time.tv_sec;
-                       if ((t.tv_usec -= b->value.time.tv_usec) < 0) {
-                               t.tv_usec += 1000000;
-                               t.tv_sec--;
-                       }
-                       r = t.tv_sec ? t.tv_sec : t.tv_usec;
-                       if (r) r = r > 0 ? 1 : -1;
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       if (a->value.tag.binary != b->value.tag.binary) return -1;
-                       if (a->value.tag.binary) {
-                               /* FIXME: I'm lazy. */
-                               abort();
-                       }
-                       else r = strcmp(a->value.tag.value,b->value.tag.value);
-               default: return -1;
-       }
-       *result = r;
-       return 0;
-}
-
-static char *to_xml(void *ctx,const glite_jp_attrval_t *a)
-{
-       char    *out = NULL;
-       
-       if (check_namespace(a)) return NULL;
-
-       switch (a->attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-                       trio_asprintf(&out,"%|Xs",a->value.s);
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       /* XXX */
-                       trio_asprintf(&out,"%ld.06%ld",a->value.time.tv_sec,
-                                       a->value.time.tv_usec);
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       /* FIXME */ assert(!a->value.tag.binary);
-
-                       trio_asprintf(&out,"<seq>%d</seq><timestamp>%ld></timestamp>%|Xs",a->value.tag.sequence,a->value.tag.timestamp,a->value.tag.value);
-                       break;
-               default:
-                       break;
-       }
-       return out;
-}
-
-static glite_jp_attrval_t *from_xml(void *ctx,const char *name,const char *val)
-{
-       /* FIXME: I'm lazy. */
-       abort();
-}
-
-static char *to_db(void *ctx,const glite_jp_attrval_t *a)
-{
-       /* FIXME: I'm lazy. */
-       abort();
-}
-
-static glite_jp_attrval_t *from_db(void *ctx,const char *a)
-{
-       /* FIXME: I'm lazy. */
-       abort();
-}
-
-static const char *db_type(void *ctx,const glite_jp_attr_t *a)
-{
-       if check_namespace(a) return NULL;
-       switch (a->type) {
-               case GLITE_JP_ATTR_OWNER: return "varchar(250) binary";
-               case GLITE_JP_ATTR_TIME: return "datetime";
-               case GLITE_JP_ATTR_TAG: return "mediumblob";
-               default: return NULL;
-       }
-}
-
-int init(
-       glite_jp_context_t      ctx,
-       const char              *param,
-       glite_jp_tplug_data     *pd
-)
-{
-       pd->namespace = namespace;
-       pd->cmp = cmp;
-       pd->to_xml = to_xml;
-       pd->from_xml = from_xml;
-       pd->to_db = to_db;
-       pd->from_db = from_db;
-       pd->db_type = db_type;
-       pd->pctx = ctx;
-}
-
diff --git a/org.glite.jp.common/src/strmd5.c b/org.glite.jp.common/src/strmd5.c
deleted file mode 100755 (executable)
index 87fd400..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <openssl/md5.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "strmd5.h"
-
-static char mbuf[33];
-
-static int base64_encode(const void *enc, int enc_size, char *out, int out_max_size)
-{
-    static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
-
-    unsigned char* enc_buf = (unsigned char*)enc;
-    int                  out_size = 0;
-    unsigned int  bits = 0;
-    unsigned int  shift = 0;
-
-    while ( out_size < out_max_size ) {
-       if ( enc_size>0 ) {
-           // Shift in byte
-           bits <<= 8;
-           bits |= *enc_buf;
-           shift += 8;
-           // Next byte
-           enc_buf++;
-           enc_size--;
-       } else if ( shift>0 ) {
-           // Pad last bits to 6 bits - will end next loop
-           bits <<= 6 - shift;
-           shift = 6;
-       } else {
-           // Terminate with Mime style '='
-           *out = '=';
-           out_size++;
-
-           return out_size;
-       }
-
-       // Encode 6 bit segments
-       while ( shift>=6 ) {
-           shift -= 6;
-           *out = b64[ (bits >> shift) & 0x3F ];
-           out++;
-           out_size++;
-       }
-    }
-
-    // Output overflow
-    return -1;
-}
-
-char *strmd5(const char *s, unsigned char *digest)
-{
-    MD5_CTX md5;
-    unsigned char d[16];
-    int        i;
-
-    MD5_Init(&md5);
-    MD5_Update(&md5,s,strlen(s));
-    MD5_Final(d,&md5);
-
-    if (digest) memcpy(digest,d,sizeof(d));
-
-    for (i=0; i<16; i++) {
-       int     dd = d[i] & 0x0f;
-       mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a';
-       dd = d[i] >> 4;
-       mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a';
-    }
-    mbuf[32] = 0;
-    return (char *) mbuf;
-}
-
-char *str2md5(const char *s)
-{
-    MD5_CTX md5;
-    unsigned char d[16];
-    char* ret = malloc(33);
-    int        i;
-
-    if (!ret)
-       return NULL;
-
-    MD5_Init(&md5);
-    MD5_Update(&md5, s, strlen(s));
-    MD5_Final(d, &md5);
-
-    for (i=0; i<16; i++) {
-       int  dd = d[i] & 0x0f;
-       ret[2*i+1] = dd<10 ? dd+'0' : dd-10+'a';
-       dd = d[i] >> 4;
-       ret[2*i] = dd<10 ? dd+'0' : dd-10+'a';
-    }
-    ret[32] = 0;
-    return ret;
-}
-
-char *str2md5base64(const char *s)
-{
-    MD5_CTX md5;
-    unsigned char d[16];
-    char buf[50];
-    int l;
-
-    MD5_Init(&md5);
-    MD5_Update(&md5, s, strlen(s));
-    MD5_Final(d, &md5);
-
-    l = base64_encode(d, 16, buf, sizeof(buf) - 1);
-    if (l < 1)
-       return NULL;
-    buf[l - 1] = 0;
-    return strdup(buf);
-}
diff --git a/org.glite.jp.index/.cvsignore b/org.glite.jp.index/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp.index/Makefile b/org.glite.jp.index/Makefile
deleted file mode 100644 (file)
index 3b893cd..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-# defaults
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-lbprefix=lb
-package=glite-lb-server
-version=0.0.0
-PREFIX=/opt/glite
-
-glite_location=/opt/glite
-globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-expat_prefix=/opt/expat
-ares_prefix=/opt/ares
-gsoap_prefix=/software/gsoap-2.6
-
-CC=gcc
-
--include Makefile.inc
-
-
-VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/test:${top_srcdir}/project:${jpproject}
-
-GLOBUS_LIBS:=-L${globus_prefix}/lib \
-       -lglobus_common_${nothrflavour} \
-       -lglobus_gssapi_gsi_${nothrflavour}
-
-DEBUG:=-g -O0  -DDEBUG
-
-CFLAGS:=${DEBUG} -I. -I${gsoap_prefix}/include -I${stagedir}/include
-LDFLAGS:=-L${stagedir}/lib
-
-LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
-LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
-INSTALL:=libtool --mode=install install
-
-
-daemon:=glite-jp-indexd
-example:=jpis-test
-soap_prefix:=jpis_
-
-SRCS:= simple_server.c soap_ops.c \
-       ${soap_prefix}C.c \
-       ${soap_prefix}Server.c
-
-EXA_SRCS:=jpis-test.c ${soap_prefix}C.c ${soap_prefix}Client.c
-
-
-OBJS:=${SRCS:.c=.o} stdsoap2.o
-EXA_OBJS:=${EXA_SRCS:.c=.o} stdsoap2.o
-
-COMMONLIB:=-lglite_jp_common
-
-default all: compile
-
-compile: ${daemon} ${example}
-
-${daemon}: ${OBJS}
-       ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GLOBUS_LIBS}
-
-${example}: ${EXA_OBJS}
-       ${LINK} -o $@ ${EXA_OBJS}
-
-JobProvenanceIS.xh: JobProvenanceIS.wsdl JobProvenanceTypes.wsdl typemap.dat
-       cp  ${jpproject}/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $<
-       rm -f JobProvenanceTypes.wsdl
-
-${soap_prefix}C.c ${soap_prefix}H.h: JobProvenanceIS.xh
-       ${gsoap_prefix}/bin/soapcpp2 -w -c -p ${soap_prefix} JobProvenanceIS.xh
-
-#$(SOAP_PREFIX)H.h $(SOAP_PREFIX)C.c: LB.xh
-#        $(GSOAP_BIN_PATH)/soapcpp2 -w -c -p $(SOAP_PREFIX) LB.xh
-#
-#LB.xh: LB.wsdl typemap.dat
-#         $(GSOAP_BIN_PATH)/wsdl2h -c -o $@ LB.wsdl
-#
-
-
-check: 
-       -echo nothing yet
-
-doc:
-
-stage: compile
-       ${INSTALL} -m 755 ${daemon} ${stagedir}/bin
-
-dist: distsrc distbin
-
-# FIXME: just copied from LB
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir}
-       save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir
-       rm -rf tmpbuilddir
-        
-install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d
-       for p in bkserverd bkindex; do \
-               ${INSTALL} -m 755 "glite_lb_$$p" "${PREFIX}/bin/glite-lb-$$p"; \
-       done
-
-       for f in dbsetup.sql index.conf.template; do \
-               ${INSTALL} -m 644 ${top_srcdir}/config/"glite-lb-$$f" ${PREFIX}/etc; \
-       done
-
-       ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-lb-bkserverd
-
-clean:
-
-soap_ops.o jpis-test.o simple_server.o: ${soap_prefix}H.h
-
-# we have no real config.h but have to force gSoap not to use
-# linux ftime with broken (aka obsolete) DST information
-
-stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c
-       test -f config.h || touch config.h
-       @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless'
-       ${CC} -o $@ -c -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c
-
diff --git a/org.glite.jp.index/build.xml b/org.glite.jp.index/build.xml
deleted file mode 100755 (executable)
index 3a97943..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the gLite JP Index module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/11/22 14:00:37  dimeglio
-       Updated to use standard files
-       Fixed names (was using common instead of real module name)
-       
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-<project name="index" default="dist">
-       
-       <!-- =========================================
-                Builds the GLite JP Index Module
-            ========================================= -->
-       
-       <!-- =========================================
-            Import properties (order is important)
-            ========================================= -->
-
-       <!-- import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-                Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-       
-       <!-- =========================================
-                 Load configure options (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-                Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-                       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <import file="${global.targets-simple_make.file}" />
-
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-               
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-
-               <antcall target="lbmakefiles" />
-       </target>
-               
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-       
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.index/project/JobProvenanceIS.wsdl b/org.glite.jp.index/project/JobProvenanceIS.wsdl
deleted file mode 100644 (file)
index 26f97a4..0000000
+++ /dev/null
@@ -1,531 +0,0 @@
-<WSDL:definitions
-       xmlns:tns="http://glite.org/wsdl/services/jp"
-       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-       xmlns:jp="http://glite.org/wsdl/types/jp"
-       xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
-       xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
-       xmlns="http://schemas.xmlsoap.org/wsdl/"
-       targetNamespace="http://glite.org/wsdl/services/jp"
-       name="JobProvenance">
-
-       <WSDL:types>
-               <schema
-                       targetNamespace="http://glite.org/wsdl/types/jp"
-                       xmlns="http://www.w3.org/2001/XMLSchema"
-                       elementFormDefault="unqualified" attributeFormDefault="unqualified">
-                       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-                       <simpleType name="Attribute">
-                               <restriction base="xsd:string">
-                               </restriction>
-                       </simpleType>
-                       <simpleType name="UploadClass">
-                               <restriction base="xsd:string">
-                                       <enumeration value="INPUT-SANDBOX"/>
-                                       <enumeration value="OUTPUT-SANDBOX"/>
-                                       <enumeration value="JOB-LOG"/>
-                               </restriction>
-                       </simpleType>
-                       <simpleType name="QueryOp">
-                               <restriction base="xsd:string">
-                                       <enumeration value="EQUAL"/>
-                                       <enumeration value="UNEQUAL"/>
-                                       <enumeration value="LESS"/>
-                                       <enumeration value="GREATER"/>
-                                       <enumeration value="WITHIN"/>
-                               </restriction>
-                       </simpleType>
-                       <complexType name="TagValue">
-                               <sequence>
-                                       <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
-                                       <element name="sequence" type="xsd:int" minOccurs="0" maxOccurs="1"/>
-                                       <element name="timestamp" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="stringValue" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="blobValue" type="xsd:base64Binary" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="Attributes">
-                               <sequence>
-                                       <element name="item" type="jp:Attribute" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="GenericJPFaultType">
-                               <sequence>
-                                       <element name="source" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="code" type="xsd:int" minOccurs="1" maxOccurs="1"/>
-                                       <element name="text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-                                       <element name="reason" type="jp:GenericJPFaultType" minOccurs="0" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="PrimaryQueryElement">
-                               <sequence>
-                                       <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
-                                       <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="PrimaryQuery">
-                               <sequence>
-                                       <element name="item" type="jp:PrimaryQueryElement" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQueryRecord">
-                               <sequence>
-                                       <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQueryElement">
-                               <sequence>
-                                       <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
-                                       <element name="record" type="jp:IndexQueryRecord" minOccurs="1"  maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQuery">
-                               <sequence>
-                                       <element name="item" type="jp:IndexQueryElement" minOccurs="1" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobRecord">
-                               <sequence>
-                                       <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="PSContact" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobRecords">
-                               <sequence>
-                                       <element name="record" type="jp:JobRecord" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-
-                       <complexType name="AttrUpdate">
-                               <sequence>
-                                       <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="AttrUpdates">
-                               <sequence>
-                                       <element name="item" type="jp:AttrUpdate" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobUpdate">
-                               <sequence>
-                                       <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="attributes" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
-                                       <element name="tags" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="UpdateJobsData">
-                               <sequence>
-                                       <element name="job" type="jp:JobUpdate" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                               
-                       <complexType name="FeedIndexResponse">
-                               <sequence>
-                                       <element name="feedId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="expires" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="GetJobResponse">
-                               <sequence>
-                                       <element name="jobLog" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="inputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="outputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="tags" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="StartUploadResponse">
-                               <sequence>
-                                       <element name="destination" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="commitBefore" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <element name="GenericJPFault" type="jp:GenericJPFaultType"/>
-               </schema>
-       </WSDL:types>
-       <message name="RegisterJobRequest">
-               <part name="x" type="xsd:string"/>
-       </message>
-       <message name="StartUploadRequest">
-               <part name="uclass" type="jp:UploadClass"/>
-               <part name="commitTimeout" type="xsd:duration"/>
-               <part name="contentType" type="xsd:string"/>
-       </message>
-       <message name="StartUploadResponse">
-               <part name="destination" type="xsd:string"/>
-               <part name="commitBefore" type="xsd:dateTime"/>
-       </message>
-       <message name="CommitUploadRequest">
-               <part name="destination" type="xsd:string"/>
-       </message>
-       <message name="RecordTagRequest">
-               <part name="jobid" type="xsd:string"/>
-               <part name="tag" type="jp:TagValue"/>
-       </message>
-       <message name="FeedIndexRequest">
-               <part name="destination" type="xsd:string"/>
-               <part name="attributes" type="jp:Attributes"/>
-               <part name="conditions" type="jp:PrimaryQuery"/>
-               <part name="continuous" type="xsd:boolean"/>
-       </message>
-       <message name="FeedIndexResponse">
-               <part name="feedId" type="xsd:string"/>
-               <part name="expires" type="xsd:dateTime"/>
-       </message>
-       <message name="FeedIndexRefreshRequest">
-               <part name="feedId" type="xsd:string"/>
-       </message>
-       <message name="GetJobRequest">
-               <part name="jobid" type="xsd:string"/>
-       </message>
-       <message name="GetJobResponse">
-               <part name="jobLog" type="xsd:string"/>
-               <part name="inputSandbox" type="xsd:string"/>
-               <part name="outputSandbox" type="xsd:string"/>
-               <part name="tags" type="xsd:string"/>
-       </message>
-       <message name="GenericJPFault">
-               <part name="fault" element="jp:GenericJPFault"/>
-       </message>
-       <message name="EmptyResponse"/>
-       <portType name="JobProvenancePS_PortType">
-               <operation name="RegisterJob">
-                       <documentation>Register job with JP primary storage.
-Job registration in LB is propagated to JP immediately so that JP is aware of the job,
-despite no furhter information is available in it.
-
-Input: JobId
-
-Output: N/A
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:RegisterJobRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="StartUpload">
-                       <documentation>Initiate upload of of sandbox/dump of job life log from LB.
-WM component responsible for job sandbox management and LB server call JP to declare
-intention to upload intput/output sandbox and job life log.
-
-Input:
-
-uclass: type of the upload - INPUT_SANDBOX, OUTPUT_SANDBOX, JOB_LOG
-
-commitTimeout: upper limit on time for which JP waits for committing this upload transaction
-
-contentType: MIME type of the uploaded file
-
-Output:
-
-destination: URL where the client should upload the file
-
-commitBefore: acutual time when the upload transaction times out
-
-Faults: GenericJPFault
-
-
-Initiate upload of of sandbox/dump of job life log from LB.</documentation>
-                       <input message="tns:StartUploadRequest"/>
-                       <output message="tns:StartUploadResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="CommitUpload">
-                       <documentation>Confirm upload.
-Should be called after a file upload initiaded with StartUpload is finished.
-
-Input:
-
-destination: Upload destination URL (to match with the original request)
-
-Output:
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:CommitUploadRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="RecordTag">
-                       <documentation>Record a value of user tag.
-JP tags are either standalone or override values of their LB counterparts.
-However, JP tag values are still distinguishable those inherited from LB.
-JP tags may be either strings or blobs.
-
-Input:
-
-jobid:
-
-tag: structure containing name, timestamp, optional sequence number to order tag values
-without relying on timestamps, and string or blob value.
-
-Output: N/A
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:RecordTagRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="FeedIndex">
-                       <documentation>Start feeding JP index server.
-Called by the index server to start batch feed, and optionally also subscribe for incremental feed.
-
-JP index server subscribes with JP primary storage using a query
-containing conditions on primary metadata and a list of queryable attributes
-of the index server (i.e. data which should be sent to the index server).
-
-When a matching job record is created or modified within the primary storage
-the job record data are sent to the subscribed index server.
-
-The subscription is soft-state, it expires after certain time unless refreshed by the client explicitely.
-
-In the batch mode the query has the same form
-with additional flag asking for all matching records (i.e.\ not only
-arriving afterwards).
-
-Input:
-
-destination: where to send the job record data
-
-attributes: which job record attributes should be sent to the requesting index server
-
-conditions: list of query conditions. Each conditions has the form Attribute Operator Value,
-where Attribute is any of job record attributes and Operator is one of EQUAL, UNEQUAL, LESS, GREATER, WITHIN.
-
-continuous: flag determining that the query is incremental (not batch) 
-
-Output:
-
-feedId: unique Id of the feed request, to be used in refresh, cancelation etc.
-
-expires: when the feed times out. Must be refreshed before this time.
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:FeedIndexRequest"/>
-                       <output message="tns:FeedIndexResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="FeedIndexRefresh">
-                       <documentation>Extend batch feed subscription (used by index server)
-
-Input: feedId returned previously by FeedIndex
-
-Output: the same as for FeedIndex
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:FeedIndexRefreshRequest"/>
-                       <output message="tns:FeedIndexResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="GetJob">
-                       <documentation>Retrieve job record URL's when jobid is known
-Used either to bypass JP index server query for this specific case, or after the index server query to
-retrieve actual job record.
-
-Input: jobid
-
-Output:
-
-jobLog, inputSandbox, outputSandbox, tags: URL's to components of the job record.
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:GetJobRequest"/>
-                       <output message="tns:GetJobResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-       </portType>
-       <binding name="JobProvenancePS" type="tns:JobProvenancePS_PortType">
-               <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-               <operation name="RegisterJob">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="StartUpload">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="CommitUpload">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="RecordTag">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="FeedIndex">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="FeedIndexRefresh">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="GetJob">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-       </binding>
-       <service name="JobProvenancePS">
-               <documentation>Job Provenance Primary Storage service</documentation>
-               <port name="JobProvenancePS" binding="tns:JobProvenancePS">
-                       <SOAP:address location="http://localhost:10001"/>
-               </port>
-       </service>
-
-       <message name="QueryJobsRequest">
-               <part name="conditions" type="jp:IndexQuery"/>
-       </message>
-
-       <message name="QueryJobsResponse">
-               <part name="jobs" type="jp:JobRecords"/>
-       </message>
-               
-       <message name="UpdateJobsRequest">
-               <part name="feedId" type="xsd:string"/>
-               <part name="data" type="jp:UpdateJobsData"/>
-               <part name="feedDone" type="xsd:boolean"/>
-       </message>
-       
-       <portType name="JobProvenanceIS_PortType">
-               <operation name="UpdateJobs">
-                       <documentation>Store or update information on jobs within the JP index server.
-Called directly by the primary storage, used for both batch and incremental feed.
-
-Input:
-
-data: list of job record updates. Each contains jobid, list of JP attribute values and user tag values.
-
-feedDone: flag indicating end of batch feed. (In order to avoid potential problems with buffer allocation
-the huge dataset of batch feed is split into reasonable chunks and delivered with more UpdateJobs calls.)
-
-Output: N/A
-
-Faults: GenericJPFault
-
-
-                       </documentation>
-                       <input message="tns:UpdateJobsRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="QueryJobs">
-                       <documentation>Retrieve pointers to job records of jobs matching a query.
-Input: conditions - list of lists of query conditions.
-       Elements of the inner lists refer to a single job attribute, the conditions are or-ed.
-       Elements of the outer list may refer to different job attributes, they are and-ed.
-
-Output:
-
-jobs: list of JobId, PSContact (URL of the primary storage which manges this job) pairs
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:QueryJobsRequest"/>
-                       <output message="tns:QueryJobsResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-       </portType>
-
-       <binding name="JobProvenanceIS" type="tns:JobProvenanceIS_PortType">
-               <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-               <operation name="UpdateJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="QueryJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-       </binding>
-
-       <service name="JobProvenanceIS">
-               <documentation>Job Provenance Index service</documentation>
-               <port name="JobProvenanceIS" binding="tns:JobProvenanceIS">
-                       <SOAP:address location="http://localhost:10001"/>
-               </port>
-       </service>
-               
-
-</WSDL:definitions>
diff --git a/org.glite.jp.index/project/build.number b/org.glite.jp.index/project/build.number
deleted file mode 100644 (file)
index 95388e3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=9
diff --git a/org.glite.jp.index/project/build.properties b/org.glite.jp.index/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.index/project/configure.properties.xml b/org.glite.jp.index/project/configure.properties.xml
deleted file mode 100644 (file)
index 72af8f4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Configuration options for the gLite JP Index module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/11/22 14:00:37  dimeglio
-       Updated to use standard files
-       Fixed names (was using common instead of real module name)
-       
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-       <!-- ======================================================
-         Define extra properties here ...
-         ====================================================== -->
-        
-       <project name="JP Common configuration options">                                                                        
-               <target name="lbmakefiles">
-                       <exec executable="ln" failonerror="true">
-                               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-                       </exec>
-                       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-lbprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-glite_location=${with.glite.location}
-globus_prefix=${with.globus.prefix}
-expat_prefix=${with.expat.prefix}
-gsoap_prefix=${with.gsoap.prefix}
-ares_prefix=${with.ares.prefix}
-thrflavour=${with.globus.thr.flavor}
-nothrflavour=${with.globus.nothr.flavor}
-cppunit=${with.cppunit.prefix}
-jpproject=${subsystem.project.dir}
-project=${component.project.dir}
-                       </echo>
-           </target>
-       </project>
diff --git a/org.glite.jp.index/project/properties.xml b/org.glite.jp.index/project/properties.xml
deleted file mode 100755 (executable)
index 5f56392..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP Index component
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$ 
-       
-       Revision history:
-       $Log$
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-<project name="JP Index component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-          Define corresponding subsystem properties
-                ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-          Define component properties
-                ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="index" />
-                       
-       <!-- ======================================================
-          Define general component properties
-                ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                
-                                                               
-</project>
diff --git a/org.glite.jp.index/project/tar_exclude b/org.glite.jp.index/project/tar_exclude
deleted file mode 100644 (file)
index e1fcd1a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-tar_exclude
-CVS
-build.xml
-build
-build.properties
-properties.xml
-configure.properties.xml
-.cvsignore
-.project
-.cdtproject
diff --git a/org.glite.jp.index/project/version.properties b/org.glite.jp.index/project/version.properties
deleted file mode 100644 (file)
index cd1e9e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=1
diff --git a/org.glite.jp.index/src/simple_server.c b/org.glite.jp.index/src/simple_server.c
deleted file mode 100644 (file)
index ccaa5a7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpis_H.h"
-
-int main() {
-   struct soap soap;
-   int i, m, s; // master and slave sockets
-
-   glite_jp_context_t  ctx;
-
-   soap_init(&soap);
-   glite_jp_init_context(&ctx);
-   soap.user = (void *) ctx;
-
-   srand48(time(NULL)); /* feed id generation */
-
-   m = soap_bind(&soap, NULL, 8902, 100);
-   if (m < 0)
-      soap_print_fault(&soap, stderr);
-   else
-   {
-      fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
-      for (i = 1; ; i++) {
-         s = soap_accept(&soap);
-         if (s < 0) {
-            soap_print_fault(&soap, stderr);
-            break;
-         }
-         soap_serve(&soap); // process RPC request
-         soap_destroy(&soap); // clean up class instances
-         soap_end(&soap); // clean up everything and close socket
-        glite_jp_run_deferred(ctx);
-      }
-   }
-   soap_done(&soap); // close master socket
-
-   return 0;
-}
diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c
deleted file mode 100644 (file)
index 5af7352..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpis_H.h"
-#include "JobProvenanceIS.nsmap"
-
-static struct jptype__GenericJPFaultType *jp2s_error(struct soap *soap,
-               const glite_jp_error_t *err)
-{
-       struct jptype__GenericJPFaultType *ret = NULL;
-       if (err) {
-               ret = soap_malloc(soap,sizeof *ret);
-               memset(ret,0,sizeof *ret);
-               ret->code = err->code;
-               ret->source = soap_strdup(soap,err->source);
-               ret->text = soap_strdup(soap,strerror(err->code));
-               ret->description = soap_strdup(soap,err->desc);
-               ret->reason = jp2s_error(soap,err->reason);
-       }
-       return ret;
-}
-
-static void err2fault(const glite_jp_context_t ctx,struct soap *soap)
-{
-       char    *et;
-       struct SOAP_ENV__Detail *detail = soap_malloc(soap,sizeof *detail);
-       struct _GenericJPFault *f = soap_malloc(soap,sizeof *f);
-
-
-       f->jptype__GenericJPFault = jp2s_error(soap,ctx->error);
-
-       detail->__type = SOAP_TYPE__GenericJPFault;
-       detail->value = f;
-       detail->__any = NULL;
-
-       soap_receiver_fault(soap,"Oh, shit!",NULL);
-       if (soap->version == 2) soap->fault->SOAP_ENV__Detail = detail;
-       else soap->fault->detail = detail;
-}
-
-static void s2jp_tag(const struct jptype__TagValue *stag,glite_jp_tagval_t *jptag)
-{
-       memset(jptag,0,sizeof *jptag);
-       jptag->name = strdup(stag->name);
-       jptag->sequence = stag->sequence ? *stag->sequence : 0;
-       jptag->timestamp = stag->timestamp ? *stag->timestamp : 0;
-       if (stag->stringValue) jptag->value = strdup(stag->stringValue);
-       else if (stag->blobValue) {
-               jptag->binary = 1;
-               jptag->size = stag->blobValue->__size;
-               jptag->value = (char *) stag->blobValue->__ptr;
-       }
-}
-
-#define CONTEXT_FROM_SOAP(soap,ctx) glite_jp_context_t ctx = (glite_jp_context_t) ((soap)->user)
-
-SOAP_FMAC5 int SOAP_FMAC6 jpsrv__UpdateJobs(
-       struct soap *soap,
-       char *feed_id,
-       struct jptype__UpdateJobsData *jobs,
-       enum xsd__boolean done
-)
-{
-       printf("%s items %d jobid %s\n",__FUNCTION__,jobs->__sizejob,
-                       jobs->job[0]->jobid);
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 jpsrv__QueryJobs(
-       struct soap *soap,
-       struct jptype__IndexQuery *query,
-       struct jpsrv__QueryJobsResponse *resp
-)
-{
-       puts(__FUNCTION__);
-       return SOAP_OK;
-}
-
diff --git a/org.glite.jp.index/src/typemap.dat b/org.glite.jp.index/src/typemap.dat
deleted file mode 100644 (file)
index 7032cb2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-jpsrv = http://glite.org/wsdl/services/jp
-jptype = http://glite.org/wsdl/types/jp
diff --git a/org.glite.jp.primary/.cvsignore b/org.glite.jp.primary/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp.primary/Makefile b/org.glite.jp.primary/Makefile
deleted file mode 100644 (file)
index 73d1c5a..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-# defaults
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-jpprefix=jp
-package=glite-jp-primary
-version=0.0.0
-PREFIX=/opt/glite
-
-glite_location=/opt/glite
-globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-expat_prefix=/opt/expat
-ares_prefix=/opt/ares
-gsoap_prefix=/software/gsoap-2.6
-
-CC=gcc
-
--include Makefile.inc
-
-
-VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/test:${top_srcdir}/project:${stagedir}/interface
-
-GLOBUS_LIBS:=-L${globus_prefix}/lib \
-       -lglobus_common_${nothrflavour} \
-       -lglobus_gssapi_gsi_${nothrflavour}
-
-GLOBUS_CFLAGS:=-I${globus_prefix}/include/${nothrflavour}
-
-DEBUG:=-g -O0  -DDEBUG
-
-CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${gsoap_prefix}/include -I${stagedir}/include ${GLOBUS_CFLAGS} -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql
-LDFLAGS:=-L${stagedir}/lib
-
-LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
-LTCOMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
-SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib
-LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
-INSTALL:=libtool --mode=install install
-
-daemon:=glite-jp-primarystoraged
-example:=jpps-test
-ps_prefix:=jpps_
-is_prefix:=jpis_
-
-plugins:=glite-jp-tags.la
-
-HDRS_I=file_plugin.h
-HDRS_S=builtin_plugins.h backend.h
-
-SRCS:= bones_server.c soap_ops.c \
-       new_ftp_backend.c mysql.c file_plugin.c \
-       feed.c authz.c\
-       is_client.c \
-       ${ps_prefix}ServerLib.c \
-       ${is_prefix}ClientLib.c jpps_C.c
-#      env_C.c
-
-EXA_SRCS:=jpps-test.c ${ps_prefix}C.c ${ps_prefix}Client.c
-
-
-OBJS:=${SRCS:.c=.o}
-EXA_OBJS:=${EXA_SRCS:.c=.o}
-
-COMMONLIB:=-lglite_jp_common
-BONESLIB:=-lglite_lb_server_bones
-GSOAPLIB:=-lglite_security_gsoap_plugin_${nothrflavour} -lglite_security_gss_${nothrflavour} \
-       -L${gsoap_prefix}/lib -lgsoap${GSOAP_DEBUG} -L${ares_prefix}/lib -lares
-TRIOLIB:=-lglite_lb_trio
-
-ifneq (${mysql_prefix},/usr)
-       ifeq ($(shell echo ${mysql_version} | cut -d. -f1,2),4.1)
-               MYSQLIB := -L${mysql_prefix}/lib/mysql -lmysqlclient
-        else
-               MYSQLIB := -L${mysql_prefix}/lib -lmysqlclient
-        endif
-else
-       MYSQLIB := -lmysqlclient
-endif
-
-default all: compile
-
-compile: ${daemon} ${example} ${plugins}
-
-${daemon}: ${OBJS}
-       ${LINK} -o $@ -export-dynamic ${OBJS} ${BONESLIB} ${TRIOLIB} ${COMMONLIB} ${GSOAPLIB} ${GLOBUS_LIBS} ${MYSQLIB} 
-
-${example}: ${EXA_OBJS}
-       ${LINK} -o $@ ${EXA_OBJS} ${GSOAPLIB} ${GLOBUS_LIBS}
-
-# XXX: piss off
-JobProvenanceIS.xh:
-       touch $@
-
-JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat
-       cp  ${stagedir}/interface/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h  -t ${top_srcdir}/src/typemap.dat -c -o $@ $<
-       rm -f JobProvenanceTypes.wsdl
-
-${ps_prefix}Client.c ${ps_prefix}ClientLib.c  \
-${ps_prefix}Server.c ${ps_prefix}ServerLib.c  \
-${ps_prefix}C.c ${ps_prefix}H.h: JobProvenancePS.xh
-       ${gsoap_prefix}/bin/soapcpp2 -n -w -c -p ${ps_prefix} JobProvenancePS.xh
-
-${is_prefix}ClientLib.c ${is_prefix}Client.c \
-${is_prefix}C.c ${is_prefix}H.h: JobProvenanceIS.xh
-       ${gsoap_prefix}/bin/soapcpp2 -n -w -c -p ${is_prefix} JobProvenanceIS.xh
-
-env_C.c env_Server.c:
-       touch env.xh
-       cp  ${jpproject}/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h  -t ${top_srcdir}/src/typemap.dat -c -o env.xh JobProvenanceTypes.wsdl
-       rm -f JobProvenanceTypes.wsdl
-       ${gsoap_prefix}/bin/soapcpp2 -w -c -p env_ env.xh
-
-#$(SOAP_PREFIX)H.h $(SOAP_PREFIX)C.c: LB.xh
-#        $(GSOAP_BIN_PATH)/soapcpp2 -w -c -p $(SOAP_PREFIX) LB.xh
-#
-#LB.xh: LB.wsdl typemap.dat
-#         $(GSOAP_BIN_PATH)/wsdl2h -c -o $@ LB.wsdl
-#
-
-
-bones_server.o simple_server.o: ${is_prefix}H.h ${ps_prefix}H.h
-
-check: 
-       -echo nothing yet
-
-doc:
-
-stage: compile
-       ${MAKE} PREFIX=${stagedir} DOSTAGE=yes install
-
-dist: distsrc distbin
-
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir}
-       save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir
-       rm -rf tmpbuilddir
-        
-install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/examples ${PREFIX}/etc/init.d
-       ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin
-       ${INSTALL} -m 755 jpps-test ${PREFIX}/examples/glite-jp-primary-test
-       if [ x${DOSTAGE} = xyes ]; then \
-               mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix} ; \
-               (cd ${top_srcdir}/interface && install -m 644 ${HDRS_I} ${PREFIX}/include/${globalprefix}/${jpprefix}) ; \
-               (cd ${top_srcdir}/src && install -m 644 ${HDRS_S} ${PREFIX}/include/${globalprefix}/${jpprefix}) ; \
-       fi
-
-
-clean:
-
-simple_server.o soap_ops.o jpps-test.o: ${ps_prefix}H.h
-
-# we have no real config.h but have to force gSoap not to use
-# linux ftime with broken (aka obsolete) DST information
-
-stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c
-       test -f config.h || touch config.h
-       @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless'
-       ${CC} -o $@ -c -DWITH_NONAMESPACES -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c
-
-
-glite-jp-tags.la: tags_plugin.lo
-       ${SOLINK} -o $@ tags_plugin.lo
-
-%.lo: %.c
-       ${LTCOMPILE} -o $@ -c $<
-
-soap_ops.o bones_server.o: soap_version.h
-
-soap_version.h:
-       ${gsoap_prefix}/bin/soapcpp2 /dev/null
-       perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@
-       -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp 
diff --git a/org.glite.jp.primary/build.xml b/org.glite.jp.primary/build.xml
deleted file mode 100755 (executable)
index 439631b..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the GLite JP Primary module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.3  2004/11/22 14:00:19  dimeglio
-       Updated to use standard files
-       Fixed names (was using common instead of real module name)
-       
-       Revision 1.2  2004/11/22 13:55:30  dimeglio
-       First version of this file
-       Use central subsystem definition
-       
-       Revision 1.1.1.1  2004/10/15 09:49:24  akrenek
--->
-
-<project name="primary" default="dist">
-       
-       <!-- =========================================
-                Builds the gLite JP Primary Module
-            ========================================= -->
-       
-       <!-- =========================================
-            Import properties (order is important)
-            ========================================= -->
-
-       <!-- import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-                Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-       
-       <!-- =========================================
-                 Load configure options (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-                Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-                       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <import file="${global.targets-simple_make.file}" />
-
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-               
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-
-               <antcall target="lbmakefiles" />
-       </target>
-               
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-       
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql b/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql
deleted file mode 100644 (file)
index f253f1d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-create table jobs (
-       jobid           char(32)        binary not null,
-       dg_jobid        varchar(255)    binary not null,
-       owner           char(32)        binary not null,
-
-       reg_time        datetime        not null,
-       
-       primary key (jobid),
-       unique (dg_jobid),
-       index (owner),
-       index (owner,reg_time)
-);
-
-create table files (
-       jobid           char(32)        binary not null,
-       filename        varchar(255)    binary not null,
-       int_path        mediumblob      null,
-       ext_url         mediumblob      null,
-
-       state           char(32)        binary not null,
-       deadline        datetime        null,
-       ul_userid       char(32)        binary not null,
-
-       primary key (jobid,filename),
-       index (ext_url(255))
-);
-
-create table attrs (
-       jobid           char(32)        binary not null,
-       name            varchar(255)    binary not null,
-       value           mediumblob      null,
-
-       primary key (jobid,name)
-);
-
-create table users (
-       userid          char(32)        binary not null,
-       cert_subj       varchar(255)    binary not null,
-
-       primary key (userid),
-       unique (cert_subj)
-);
-
-create table backend_info (
-       version         char(32)        binary not null
-);
diff --git a/org.glite.jp.primary/examples/README.test b/org.glite.jp.primary/examples/README.test
deleted file mode 100644 (file)
index 6bfe1d8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-Create database:
-----------------
-
-$ mysqladmin -u root -p create jpps 
-$ mysql -u root -p
-mysql> grant all privileges on jpps.* to jpps@localhost identified by '';
-
-$ mysql -p -u jpps jpps <config/glite-jp-primary-dbsetup.sql
-
-
-Start server:
--------------
-
-$ glite-jp-primarystoraged -P .libs/glite-jp-tags.so -BI,/INTERNAL/PATH -BE,ftp://`hostname`/EXT/PREFIX -a trusted_peers
-
-/INTENAL/PATH points to the directory where JP files are stored
-
-/EXT/PREFIX prefix in URLs to manipulate with these files -- ftp should be
-configured to map ftp://`hostname`/EXT/PREFIX/file to 
-
-trusted_peers  line-by-line list of X509 subjects to be considered "trusted",
-       i.e. services (like LB) we accept data from
-
-
-
-Register job:
--------------
-
-$ jpps-test RegisterJob JOBID OWNER
-
-Returns:
-- OK 
-- File exists (Job already registered)
-- Operation not permitted (you are not a trusted peer)
-
-
-Record JP tag:
---------------
-
-$ jpps-test RecordTag JPBID TagA 1 blah
diff --git a/org.glite.jp.primary/examples/jpps-test.c b/org.glite.jp.primary/examples/jpps-test.c
deleted file mode 100644 (file)
index 857699c..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-#include <stdio.h>
-#include <sysexits.h>
-#include <string.h>
-#include <assert.h>
-
-#include "glite/security/glite_gsplugin.h"
-
-#include "jpps_H.h"
-#include "jpps_.nsmap"
-
-#include "jptype_map.h"
-
-#include "soap_version.h"
-#if GSOAP_VERSION <= 20602
-#define soap_call___jpsrv__RegisterJob soap_call___ns1__RegisterJob
-#define soap_call___jpsrv__StartUpload soap_call___ns1__StartUpload
-#define soap_call___jpsrv__CommitUpload soap_call___ns1__CommitUpload
-#define soap_call___jpsrv__RecordTag soap_call___ns1__RecordTag
-#define soap_call___jpsrv__FeedIndex soap_call___ns1__FeedIndex
-#define soap_call___jpsrv__FeedIndexRefresh soap_call___ns1__FeedIndexRefresh
-#define soap_call___jpsrv__GetJob soap_call___ns1__GetJob
-#endif
-
-
-static void usage(const char *me)
-{
-       fprintf(stderr,"%s: [-s server-url] operation args \n\n"
-                       "       operations are:\n"
-                       "               RegisterJob jobid owner\n"
-                       "               StartUpload jobid class commit_before mimetype\n"
-                       "               CommitUpload destination\n"
-                       "               RecordTag jobid tagname sequence stringvalue\n"
-                       "               GetJob jobid\n"
-                       "               FeedIndex destination query_number history continuous\n"
-                       "               FeedIndexRefresh feedid\n"
-               ,me);
-
-       exit (EX_USAGE);
-}
-       
-static int check_fault(struct soap *soap,int err) {
-       struct SOAP_ENV__Detail *detail;
-       struct jptype__genericFault     *f;
-       char    *reason,indent[200] = "  ";
-
-       switch(err) {
-               case SOAP_OK: puts("OK");
-                             break;
-               case SOAP_FAULT:
-               case SOAP_SVR_FAULT:
-                       if (soap->version == 2) {
-                               detail = soap->fault->SOAP_ENV__Detail;
-                               reason = soap->fault->SOAP_ENV__Reason;
-                       }
-                       else {
-                               detail = soap->fault->detail;
-                               reason = soap->fault->faultstring;
-                       }
-                       fputs(reason,stderr);
-                       putc('\n',stderr);
-                       assert(detail->__type == SOAP_TYPE__genericFault);
-#if GSOAP_VERSION >=20700
-                       f = ((struct _genericFault *) detail->fault)
-#else
-                       f = ((struct _genericFault *) detail->value)
-#endif
-                               -> jpelem__genericFault;
-
-                       while (f) {
-                               fprintf(stderr,"%s%s: %s (%s)\n",indent,
-                                               f->source,f->text,f->description);
-                               f = f->reason;
-                               strcat(indent,"  ");
-                       }
-                       return -1;
-
-               default: soap_print_fault(soap,stderr);
-                        return -1;
-       }
-       return 0;
-}
-
-/* FIXME: new wsdl */
-#if 0
-static struct jptype__Attribute sample_attr[] = {
-                       { OWNER, NULL },
-                       { TIME, "submitted" },
-                       { TAG, "test" },
-};
-
-static struct jptype__PrimaryQueryElement sample_query[][5] = {
-       {
-               { sample_attr+OWNER, EQUAL, "unknown", NULL },
-               { NULL, 0, NULL, NULL }
-       },
-};
-#endif
-
-int main(int argc,char *argv[])
-{
-       char    *server = "http://localhost:8901";
-       int     opt;
-       struct soap     *soap = soap_new();
-
-       if (argc < 2) usage(argv[0]); 
-
-       soap_init(soap);
-       soap_set_namespaces(soap, jpps__namespaces);
-
-       soap_register_plugin(soap,glite_gsplugin);
-
-       while ((opt = getopt(argc,argv,"s:")) >= 0) switch (opt) {
-               case 's': server = optarg;
-                         argv += 2;
-                       break;
-               case '?': usage(argv[0]);
-       }
-
-       if (!strcasecmp(argv[1],"RegisterJob")) {
-               struct _jpelem__RegisterJob     in;
-               struct _jpelem__RegisterJobResponse     empty;
-
-               if (argc != 4) usage(argv[0]);
-               in.job = argv[2];
-               in.owner = argv[3];
-               check_fault(soap,
-                       soap_call___jpsrv__RegisterJob(soap,server,"",&in,&empty));
-       } else if (!strcasecmp(argv[1], "StartUpload")) {
-               struct _jpelem__StartUpload             in;
-               struct _jpelem__StartUploadResponse     out;
-
-               in.job = argv[2];
-               in.class_ = argv[3];
-               in.name = NULL;
-               in.commitBefore = atoi(argv[4]) + time(NULL);
-               in.contentType = argv[5];
-
-               if (argc != 6) usage(argv[0]);
-               if (!check_fault(soap,
-                               soap_call___jpsrv__StartUpload(soap, server, "",&in,&out)))
-               {
-                       printf("Destination: %s\nCommit before: %s\n", out.destination, ctime(&out.commitBefore));
-               }
-       } else if (!strcasecmp(argv[1], "CommitUpload")) {
-               struct _jpelem__CommitUpload    in;
-               struct _jpelem__CommitUploadResponse    empty;
-
-               in.destination = argv[2];
-
-               if (argc != 3) usage(argv[0]);
-               if (!check_fault(soap,
-                               soap_call___jpsrv__CommitUpload(soap, server, "",&in,&empty))) {
-                       /* OK */
-               }
-       } else if (!strcasecmp(argv[1], "RecordTag")) {
-               struct _jpelem__RecordTag       in;
-               struct _jpelem__RecordTagResponse       empty;
-               struct jptype__tagValue tagval;
-               
-               int seq = 0;
-       
-               if (argc != 6) usage(argv[0]);
-               
-               in.jobid = argv[2];
-               in.tag = &tagval;
-               tagval.name = argv[3];
-               seq = atoi(argv[4]);
-               tagval.sequence = &seq;
-               tagval.timestamp = NULL;
-               tagval.stringValue = argv[5];
-               tagval.blobValue = NULL;
-               
-               if (!check_fault(soap,
-                               soap_call___jpsrv__RecordTag(soap, server, "",&in, &empty))) {
-                       /* OK */
-               }
-       } 
-/* FIXME: new wsdl  */
-#if 0
-        else if (!strcasecmp(argv[1],"FeedIndex")) {
-               struct jpsrv__FeedIndexResponse r;
-               struct jptype__Attribute        *ap[2];
-               struct jptype__Attributes       attr = { 2, ap };
-               struct jptype__PrimaryQueryElement *qp[100];
-               struct jptype__PrimaryQuery     qry = { 0, qp }; 
-
-               int     i,j,qi = atoi(argv[3])-1;
-
-               if (argc != 6) usage(argv[0]);
-
-               for (i=0; i<attr.__sizeitem; i++) ap[i] = sample_attr+i;
-
-               for (i=0; sample_query[qi][i].attr; i++)
-                       qp[i] = &sample_query[qi][i];
-               qry.__sizeitem = i;
-               
-               if (!check_fault(soap,soap_call_jpsrv__FeedIndex(soap,server,"",
-                               argv[2],&attr,&qry,!strcasecmp(argv[4],"true"),
-                                       !strcasecmp(argv[5],"true"),
-                                       &r)))
-               {
-                       printf("FeedId: %s\nExpires: %s\n",r.feedId,ctime(&r.expires));
-               }
-       } else if (!strcasecmp(argv[1], "FeedIndexRefresh")) {
-               struct jpsrv__FeedIndexRefreshResponse r;
-
-               if (argc != 3) usage(argv[0]);
-               if (!check_fault(soap,
-                               soap_call_jpsrv__FeedIndexRefresh(soap, server, "",
-                                       argv[2], &r))) {
-                       printf("FeedId: %s\nExpires: %s\n",r.feedId,ctime(&r.expires));
-               }
-       }
-#endif
-       else if (!strcasecmp(argv[1],"GetJob")) {
-               struct _jpelem__GetJob  in;
-               struct _jpelem__GetJobResponse  out;
-
-               if (argc != 3) usage(argv[0]);
-               in.jobid = argv[2];
-               
-               if (!check_fault(soap,soap_call___jpsrv__GetJob(soap,server,"",
-                                               &in,&out)))
-               {
-                       int     i;
-
-                       printf("JobLog:\n");
-
-                       for (i=0; i<out.__sizefiles;i++) {
-                               printf("\tclass = %s, name = %s, url = %s\n",
-                                               out.files[i]->class_,
-                                               out.files[i]->name,
-                                               out.files[i]->url);
-                       }
-               }
-
-       }
-       else usage(argv[0]);
-
-       return 0;
-}
-
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
diff --git a/org.glite.jp.primary/interface/file_plugin.h b/org.glite.jp.primary/interface/file_plugin.h
deleted file mode 100644 (file)
index eae219d..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef __GLITE_JP_FILEPLUGIN
-#define __GLITE_JP_FILEPLUGIN
-
-/** Methods of the file plugin. */
-
-typedef struct _glite_jpps_fplug_op_t {
-
-/** Open a file.
-\param[in] fpctx       Context of the plugin, returned by its init.
-\param[in] bhandle     Handle of the file via JPPS backend.
-\param[in] uri         URI (type) of the opened file.
-\param[out] handle     Handle to the opened file structure, to be passed to other plugin functions.
-*/
-       int     (*open)(void *fpctx,void *bhandle,const char *uri,void **handle);
-
-/** Close the file. Free data associated to a handle */
-       int     (*close)(void *fpctx,void *handle);
-
-/** Retrieve value(s) of an attribute.
-\param[in] fpctx       Plugin context.
-\param[in] handle      Handle of the opened file.
-\param[in] attr                Queried attribute.
-\param[out] attrval    GLITE_JP_ATTR_UNDEF-terminated list of value(s) of the attribute.
-                       If there are more and there is an interpretation of their order
-                       they must be sorted, eg. current value of tag is the last one.
-\retval        0 success
-\retval ENOSYS this attribute is not defined by this type of file
-\retval ENOENT no value is present 
-*/
-       int     (*attr)(void *fpctx,void *handle,const char *attr,glite_jp_attrval_t **attrval);
-
-/** File type specific operation. 
-\param[in] fpctx       Plugin context.
-\param[in] handle      Handle of the opened file.
-\param[in] oper                Code of the operation, specific for a concrete plugin.
-*/
-       int     (*generic)(void *fpctx,void *handle,int oper,...);
-       
-} glite_jpps_fplug_op_t;
-
-/** Data describing a plugin. */
-typedef struct _glite_jpps_fplug_data_t {
-       void    *fpctx;         /**< Context passed to plugin operations. */
-       char    **uris;         /**< NULL-terminated list of file types (URIs)
-                                       handled by the plugin. */
-       char    **classes;      /**< The same as uris but filesystem-friendly
-                                       (can be used to construct file names).*/
-       char    **namespaces;   /**< Which attribute namespaces this plugin handles. */
-
-       glite_jpps_fplug_op_t ops;      /**< Plugin operations. */
-} glite_jpps_fplug_data_t;
-       
-/** Initialisation function of the plugin. 
-  Called after dlopen(), must be named "init".
-\param[in] ctx         JPPS context
-\param[out] data       filled-in plugin data
-*/
-  
-typedef int (*glite_jpps_fplug_init_t)(
-       glite_jp_context_t ctx,
-       glite_jpps_fplug_data_t *plugin_data
-);
-
-
-
-
-/* XXX: not really public interface follows */
-
-int glite_jpps_fplug_load(glite_jp_context_t ctx,int argc,char **argv);
-int glite_jpps_fplug_lookup(glite_jp_context_t ctx,const char *uri, glite_jpps_fplug_data_t ***plugin_data);
-int glite_jpps_fplug_lookup_byclass(glite_jp_context_t, const char *class,glite_jpps_fplug_data_t ***plugin_data,char **uri);
-
-#endif
diff --git a/org.glite.jp.primary/project/build.number b/org.glite.jp.primary/project/build.number
deleted file mode 100644 (file)
index c680c72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=36
diff --git a/org.glite.jp.primary/project/build.properties b/org.glite.jp.primary/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.primary/project/configure.properties.xml b/org.glite.jp.primary/project/configure.properties.xml
deleted file mode 100644 (file)
index 5e1ce29..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Configuration options for the gLite JP Primary module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.3  2004/11/22 13:55:30  dimeglio
-       First version of this file
-       Use central subsystem definition
-       
-       Revision 1.2  2004/10/15 12:19:28  akrenek
-       build with gsoap 2.7 too
-       
-       Revision 1.1.1.1  2004/10/15 09:49:24  akrenek
--->
-
-       <!-- ======================================================
-         Define extra properties here ...
-         ====================================================== -->
-        
-       <project name="LB Common configuration options">                                                                        
-               <target name="lbmakefiles">
-                       <exec executable="ln" failonerror="true">
-                               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-                       </exec>
-                       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-lbprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-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}
-mysql_prefix=${with.mysql.prefix}
-mysql_version=${ext.mysql.version}
-thrflavour=${with.globus.thr.flavor}
-nothrflavour=${with.globus.nothr.flavor}
-cppunit=${with.cppunit.prefix}
-jpproject=${subsystem.project.dir}
-project=${component.project.dir}
-                       </echo>
-           </target>
-       </project>
diff --git a/org.glite.jp.primary/project/properties.xml b/org.glite.jp.primary/project/properties.xml
deleted file mode 100755 (executable)
index 2149dd4..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP Primary component
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$ 
-       
-       Revision history:
-       $Log$
--->
-
-<project name="JP Primary component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-          Define corresponding subsystem properties
-                ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-          Define component properties
-                ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="primary" />
-                       
-       <!-- ======================================================
-          Define general component properties
-                ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                
-                                                               
-</project>
diff --git a/org.glite.jp.primary/project/tar_exclude b/org.glite.jp.primary/project/tar_exclude
deleted file mode 100644 (file)
index e1fcd1a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-tar_exclude
-CVS
-build.xml
-build
-build.properties
-properties.xml
-configure.properties.xml
-.cvsignore
-.project
-.cdtproject
diff --git a/org.glite.jp.primary/project/version.properties b/org.glite.jp.primary/project/version.properties
deleted file mode 100644 (file)
index cd1e9e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=1
diff --git a/org.glite.jp.primary/src/authz.c b/org.glite.jp.primary/src/authz.c
deleted file mode 100644 (file)
index 3ceba02..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpps_H.h"
-#include "jptype_map.h"
-
-int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner)
-{
-       glite_jp_error_t        err;
-       char    buf[200];
-       int     i;
-
-       memset(&err,0,sizeof err);
-       glite_jp_clear_error(ctx);
-       err.source = __FUNCTION__;
-       err.code = EPERM;
-       
-       switch (op) {
-               case SOAP_TYPE___jpsrv__RegisterJob:
-               case SOAP_TYPE___jpsrv__StartUpload:
-               case SOAP_TYPE___jpsrv__CommitUpload:
-                       for (i=0; ctx->trusted_peers && ctx->trusted_peers[i]; i++) 
-                               if (!strcmp(ctx->trusted_peers[i],ctx->peer)) return 0;
-                       err.desc = "you are not a trusted peer";
-                       return glite_jp_stack_error(ctx,&err);
-
-               case SOAP_TYPE___jpsrv__GetJobFiles:
-               case SOAP_TYPE___jpsrv__GetJobAttributes:
-                       assert(owner);
-                       return strcmp(owner,ctx->peer) ? glite_jp_stack_error(ctx,&err) : 0;
-                       break;
-
-               default:
-                       snprintf(buf,sizeof buf,"%d: unknown operation",op);
-                       err.desc = buf;
-                       err.code = EINVAL;
-                       return glite_jp_stack_error(ctx,&err);
-       }
-}
-
-int glite_jpps_readauth(glite_jp_context_t ctx,const char *file)
-{
-       FILE    *f = fopen(file,"r");
-       glite_jp_error_t        err;
-       int     cnt = 0;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       if (!f) {
-               err.code = errno;
-               err.desc = file;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       ctx->trusted_peers = NULL;
-       while (!feof(f)) {
-               char    buf[BUFSIZ];
-
-               if (fscanf(f,"%[^\n]\n",buf) != 1) {
-                       err.code = EINVAL;
-                       err.desc = file;
-                       fclose(f);
-                       return glite_jp_stack_error(ctx,&err);
-               }
-
-               ctx->trusted_peers = realloc(ctx->trusted_peers, (cnt+2) * sizeof *ctx->trusted_peers);
-               ctx->trusted_peers[cnt++] = strdup(buf);
-               ctx->trusted_peers[cnt] = NULL;
-       }
-       fclose(f);
-       return 0;
-}
diff --git a/org.glite.jp.primary/src/authz.h b/org.glite.jp.primary/src/authz.h
deleted file mode 100644 (file)
index 9451aef..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Check authorisation of JPPS operation on job.
- *
- * \param[in] ctx      JP context including peer name & other credentials (VOMS etc.)
- * \param[in] op       operation, one of SOAP_TYPE___jpsrv__*
- * \param[in] job      jobid of the job to decide upon
- * \param[in] owner    current known owner of the job (may be NULL), shortcut to avoid
- *                     unnecessary database query.
- *
- * \retval 0           OK, operation permitted
- * \retval EPERM       denied
- * \retval other       error
- */
-
-int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner);
-
-int glite_jpps_readauth(glite_jp_context_t ctx,const char *file);
-
diff --git a/org.glite.jp.primary/src/backend.h b/org.glite.jp.primary/src/backend.h
deleted file mode 100644 (file)
index cf901fb..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef __GLITE_JP_BACKEND
-#define __GLITE_JP_BACKEND
-
-#include <sys/types.h>
-#include <unistd.h>
-
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-);
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-);
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-);
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,      /* must be filesystem-friendly */
-       const char *name,       /* optional name within the class */
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-);
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-);
-
-int glite_jppsbe_get_names(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       char    ***names_out
-);
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job_out,
-       char **class_out,
-       char **name_out
-);
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* optional within class */
-       char **url_out
-);
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* optional within class */
-       int mode,
-       void **handle_out
-);
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-);
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-);
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-);
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-);
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-);
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-#endif
diff --git a/org.glite.jp.primary/src/bones_server.c b/org.glite.jp.primary/src/bones_server.c
deleted file mode 100644 (file)
index dcc31d6..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "glite/lb/srvbones.h"
-#include "glite/security/glite_gss.h"
-
-#include <stdsoap2.h>
-#include "glite/security/glite_gsplugin.h"
-
-#include "backend.h"
-#include "file_plugin.h"
-
-#include "soap_version.h"
-#include "jpps_H.h"
-
-#define CONN_QUEUE     20
-
-extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[];
-
-static int newconn(int,struct timeval *,void *);
-static int request(int,struct timeval *,void *);
-static int reject(int);
-static int disconn(int,struct timeval *,void *);
-static int data_init(void **data);
-
-static struct glite_srvbones_service stab = {
-       "JP Primary Storage", -1, newconn, request, reject, disconn
-};
-
-static time_t cert_mtime;
-static char *server_cert, *server_key, *cadir;
-static gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL;
-static char *mysubj;
-
-static char *port = "8901";
-static int debug = 1;
-
-static glite_jp_context_t      ctx;
-
-static int call_opts(glite_jp_context_t,char *,char *,int (*)(glite_jp_context_t,int,char **));
-
-char *glite_jp_default_namespace;
-
-int main(int argc, char *argv[])
-{
-       int     one = 1,opt,i;
-       edg_wll_GssStatus       gss_code;
-       struct sockaddr_in      a;
-       char    *b_argv[20] = { "backend" },*p_argv[20] = { "plugins" },*com;
-       int     b_argc,p_argc;
-
-       glite_jp_init_context(&ctx);
-
-       b_argc = p_argc = 1;
-
-       while ((opt = getopt(argc,argv,"B:P:a:")) != EOF) switch (opt) {
-               case 'B':
-                       assert(b_argc < 20);
-                       if (com = strchr(optarg,',')) *com = 0;
-                       
-                       /* XXX: memleak -- who cares for once */
-                       asprintf(&b_argv[b_argc++],"-%s",optarg);
-                       if (com) b_argv[b_argc++] = com+1;
-
-                       break;
-               case 'P':
-                       assert(p_argc < 20);
-                       p_argv[p_argc++] = optarg;
-
-                       break;
-               case 'a':
-                       if (glite_jpps_readauth(ctx,optarg)) {
-                               fprintf(stderr,"%s: %s\n",argv[0],glite_jp_error_chain(ctx));
-                               exit (1);
-                       }
-                       break;
-               case '?': fprintf(stderr,"usage: %s: -Bb,val ... -Pplugin.so ...\n"
-                                         "b is backend option\n",argv[0]);
-                         exit (1);
-       }
-
-       if (b_argc == 1) {
-               fputs("-B required\n",stderr);
-               exit (1);
-       }
-       
-       optind = 0; /* XXX: getopt used internally */
-       if (glite_jppsbe_init(ctx,b_argc,b_argv)) {
-               fputs(glite_jp_error_chain(ctx), stderr);
-               exit(1);
-       }
-
-       optind = 0; /* XXX: getopt used internally */
-       if (b_argc > 1 && glite_jpps_fplug_load(ctx,p_argc,p_argv)) {
-               fputs(glite_jp_error_chain(ctx), stderr);
-               exit(1);
-       }
-
-       srand48(time(NULL)); /* feed id generation */
-
-#if GSOAP_VERSION <= 20602
-       for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"ns1"); i++);
-#else
-       for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"jpsrv"); i++);
-#endif
-       assert(jpps__namespaces[i].id);
-       glite_jp_default_namespace = jpps__namespaces[i].ns;
-
-       stab.conn = socket(PF_INET, SOCK_STREAM, 0);
-       if (stab.conn < 0) {
-               perror("socket");
-               return 1;
-       }
-
-       setsockopt(stab.conn,SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
-
-       a.sin_family = AF_INET;
-       a.sin_addr.s_addr = INADDR_ANY;
-       a.sin_port = htons(atoi(port));
-       if (bind(stab.conn,(struct sockaddr *) &a, sizeof(a)) ) {
-               char    buf[200];
-
-               snprintf(buf,sizeof(buf),"bind(%d)",atoi(port));
-               perror(buf);
-               return 1;
-       }
-
-       if (listen(stab.conn,CONN_QUEUE)) {
-               perror("listen()");
-               return 1;
-       }
-
-       if (!server_cert || !server_key)
-               fprintf(stderr, "%s: WARNING: key or certificate file not specified, "
-                               "can't watch them for changes\n",
-                               argv[0]);
-
-       if ( cadir ) setenv("X509_CERT_DIR", cadir, 1);
-       edg_wll_gss_watch_creds(server_cert, &cert_mtime);
-
-       if ( !edg_wll_gss_acquire_cred_gsi(server_cert, server_key, &mycred, &mysubj, &gss_code)) 
-               fprintf(stderr,"Server idenity: %s\n",mysubj);
-       else fputs("WARNING: Running unauthenticated\n",stderr);
-
-       /* XXX: daemonise */
-
-       glite_srvbones_set_param(GLITE_SBPARAM_SLAVES_COUNT,1);
-       glite_srvbones_run(data_init,&stab,1 /* XXX: entries in stab */,debug);
-
-       return 0;
-}
-
-static int data_init(void **data)
-{
-       *data = (void *) soap_new();
-
-       printf("[%d] slave started\n",getpid());
-       glite_jppsbe_init_slave(ctx);   /* XXX: global but slave's */
-
-       return 0;
-}
-
-static int newconn(int conn,struct timeval *to,void *data)
-{
-       struct soap     *soap = (struct soap *) data;
-       glite_gsplugin_Context  plugin_ctx;
-
-       gss_cred_id_t           newcred = GSS_C_NO_CREDENTIAL;
-       edg_wll_GssStatus       gss_code;
-       gss_name_t              client_name = GSS_C_NO_NAME;
-       gss_buffer_desc         token = GSS_C_EMPTY_BUFFER;
-       OM_uint32               maj_stat,min_stat;
-
-
-       int     ret = 0;
-
-       soap_init2(soap,SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE);
-       soap_set_namespaces(soap,jpps__namespaces);
-       soap->user = (void *) ctx; /* XXX: one instance per slave */
-
-/* not yet: client to JP index
-       ctx->other_soap = soap_new();
-       soap_init(ctx->other_soap);
-       soap_set_namespaces(ctx->other_soap,jpis__namespaces);
-*/
-
-
-       glite_gsplugin_init_context(&plugin_ctx);
-       plugin_ctx->connection = calloc(1,sizeof *plugin_ctx->connection);
-       soap_register_plugin_arg(soap,glite_gsplugin,plugin_ctx);
-
-       switch (edg_wll_gss_watch_creds(server_cert,&cert_mtime)) {
-               case 0: break;
-               case 1: if (!edg_wll_gss_acquire_cred_gsi(server_cert,server_key,
-                                               &newcred,NULL,&gss_code))
-                       {
-
-                               printf("[%d] reloading credentials\n",getpid()); /* XXX: log */
-                               gss_release_cred(&min_stat,&mycred);
-                               mycred = newcred;
-                       }
-                       break;
-               case -1:
-                       printf("[%d] edg_wll_gss_watch_creds failed\n", getpid()); /* XXX: log */
-                       break;
-       }
-
-       /* TODO: DNS paranoia etc. */
-
-       if (edg_wll_gss_accept(mycred,conn,to,plugin_ctx->connection,&gss_code)) {
-               printf("[%d] GSS connection accept failed, closing.\n", getpid());
-               ret = 1;
-               goto cleanup;
-       }
-
-       maj_stat = gss_inquire_context(&min_stat,plugin_ctx->connection->context,
-                       &client_name, NULL, NULL, NULL, NULL, NULL, NULL);
-
-       if (!GSS_ERROR(maj_stat))
-               maj_stat = gss_display_name(&min_stat,client_name,&token,NULL);
-
-       if (ctx->peer) free(ctx->peer);
-       if (!GSS_ERROR(maj_stat)) {
-               printf("[%d] client DN: %s\n",getpid(),(char *) token.value); /* XXX: log */
-
-               ctx->peer = strdup(token.value);
-               memset(&token, 0, sizeof(token));
-       }
-       else {
-               printf("[%d] annonymous client\n",getpid());
-               ctx->peer = NULL;
-       }
-
-       if (client_name != GSS_C_NO_NAME) gss_release_name(&min_stat, &client_name);
-       if (token.value) gss_release_buffer(&min_stat, &token);
-
-       return 0;
-
-cleanup:
-       glite_gsplugin_free_context(plugin_ctx);
-       soap_end(soap);
-
-       return ret;
-}
-
-static int request(int conn,struct timeval *to,void *data)
-{
-       struct soap             *soap = data;
-       glite_jp_context_t      ctx = soap->user;
-
-       glite_gsplugin_set_timeout(glite_gsplugin_get_context(soap),to);
-
-       soap->max_keep_alive = 1;       /* XXX: prevent gsoap to close connection */ 
-       soap_begin(soap);
-       if (soap_begin_recv(soap)) {
-               if (soap->error < SOAP_STOP) {
-                       soap_send_fault(soap);
-                       return EIO;
-               }
-               return ENOTCONN;
-       }
-
-       soap->keep_alive = 1;
-       if (soap_envelope_begin_in(soap)
-               || soap_recv_header(soap)
-               || soap_body_begin_in(soap)
-               || jpps__serve_request(soap)
-#if GSOAP_VERSION >= 20700
-               || (soap->fserveloop && soap->fserveloop(soap))
-#endif
-       )
-       {
-               soap_send_fault(soap);
-               if (ctx->error) {
-                       /* XXX: shall we die on some errors? */
-                       int     err = ctx->error->code;
-                       glite_jp_clear_error(ctx);
-                       return err;
-               }
-               return 0;
-       }
-
-       glite_jp_run_deferred(ctx);
-       return 0;
-}
-
-static int reject(int conn)
-{
-       int     flags = fcntl(conn, F_GETFL, 0);
-
-       fcntl(conn,F_SETFL,flags | O_NONBLOCK);
-       edg_wll_gss_reject(conn);
-
-       return 0;
-}
-
-static int disconn(int conn,struct timeval *to,void *data)
-{
-       struct soap     *soap = (struct soap *) data;
-       soap_end(soap); // clean up everything and close socket
-
-       return 0;
-}
-
-#define WSPACE "\t\n "
-
-static int call_opts(glite_jp_context_t ctx,char *opt,char *name,int (*f)(glite_jp_context_t,int,char **))
-{
-       int     ac = 1,ret,my_optind; 
-       char    **av = malloc(sizeof *av),*ap;
-
-       *av = name;
-       for (ap = strtok(opt,WSPACE); ap; ap = strtok(NULL,WSPACE)) {
-               av = realloc(av,(ac+1) * sizeof *av);
-               av[ac++] = ap;
-       }
-
-       my_optind = optind;
-       optind = 0;
-       ret = f(ctx,ac,av);
-       optind = my_optind;
-       free(av);
-       return ret;
-}
-
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
diff --git a/org.glite.jp.primary/src/builtin_plugins.h b/org.glite.jp.primary/src/builtin_plugins.h
deleted file mode 100644 (file)
index 3b2c201..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#define GLITE_JP_FILETYPE_TAGS "urn:org.glite.jp.primary:tags"
-#define GLITE_JP_FILETYPE_LB   "urn:org.glite.jp.primary:lb"
-#define GLITE_JP_FILETYPE_ISB  "urn:org.glite.jp.primary:isb"
-#define GLITE_JP_FILETYPE_OSB  "urn:org.glite.jp.primary:osb"
-
-#define GLITE_JP_FPLUG_TAGS_APPEND     0
diff --git a/org.glite.jp.primary/src/db.h b/org.glite.jp.primary/src/db.h
deleted file mode 100644 (file)
index 0b9f730..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef _DB_H
-#define _DB_H
-
-#ident "$Header$"
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct _glite_jp_db_stmt_t *glite_jp_db_stmt_t;
-
-int glite_jp_db_connect(
-       glite_jp_context_t,     /* INOUT: */
-       char *          /* IN: connect string user/password@host:database */
-);
-
-void glite_jp_db_close(glite_jp_context_t);
-
-
-/* Parse and execute SQL statement. Returns number of rows selected, created 
- * or affected by update, or -1 on error */
-
-int glite_jp_db_execstmt(
-       glite_jp_context_t,     /* INOUT: */
-       char *,         /* IN: SQL statement */
-       glite_jp_db_stmt_t *    /* OUT: statement handle. Usable for
-                                       select only */
-);
-
-
-/* Fetch next row of select statement. 
- * All columns are returned as fresh allocated strings 
- *
- * return values:
- *     >0 - number of fields of the retrieved row
- *      0 - no more rows
- *     -1 - error
- *
- * Errors are stored in context passed to previous glite_jp_db_execstmt() */
-
-int glite_jp_db_fetchrow(
-       glite_jp_db_stmt_t,     /* IN: statement */
-       char **         /* OUT: array of fetched values. 
-                        *      As number of columns is fixed and known,
-                        *      expects allocated array of pointers here */
-);
-
-/* Retrieve column names of a query statement */
-
-int glite_jp_db_querycolumns(
-       glite_jp_db_stmt_t,     /* IN: statement */
-       char **         /* OUT: result set column names. Expects allocated array. */
-);
-
-/* Free the statement structure */
-
-void glite_jp_db_freestmt(
-       glite_jp_db_stmt_t *    /* INOUT: statement */
-);
-
-
-/* convert time_t into database-specific time string 
- * returns pointer to static area that is changed by subsequent calls */
-
-char *glite_jp_db_timetodb(time_t);
-time_t glite_jp_db_dbtotime(char *);
-
-
-/**
- * Check database version.
- */
-int glite_jp_db_dbcheckversion(glite_jp_context_t);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/org.glite.jp.primary/src/feed.c b/org.glite.jp.primary/src/feed.c
deleted file mode 100644 (file)
index 1c80a8e..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <fcntl.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/strmd5.h"
-#include "feed.h"
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-#include "is_client.h"
-
-/* 
- * seconds before feed expires: should be 
- * XXX: should be configurable, default for real deployment sort of 1 hour
- */
-#define FEED_TTL       120
-
-static int check_qry_item(
-               glite_jp_context_t ctx,
-               const glite_jp_query_rec_t    *qry,
-               const glite_jp_attrval_t *attr
-)
-{
-       int     cmp,cmp2;
-       long    scmp,ucmp;
-
-       if (strcmp(qry->attr,attr->name)) return 0;
-
-       if (qry->origin && qry->origin != attr->origin) return 0;
-
-       /* FIXME: fallback only, loop over type plugins and use plugin compare function */
-       cmp = strcmp(attr->value,qry->value);
-
-       switch (qry->op) {
-               case GLITE_JP_QUERYOP_EQUAL: return !cmp;
-               case GLITE_JP_QUERYOP_UNEQUAL: return cmp;
-               case GLITE_JP_QUERYOP_LESS: return cmp < 0;
-               case GLITE_JP_QUERYOP_GREATER: return cmp > 0;
-
-               case GLITE_JP_QUERYOP_WITHIN:
-                       /* FIXME: the same */
-                       cmp2 = strcmp(attr->value,qry->value);
-                       return cmp >= 0 && cmp2 <= 0;
-       }
-}
-
-/* XXX: limit on query size -- I'm lazy to malloc() */
-#define QUERY_MAX      100
-
-static int match_feed(
-               glite_jp_context_t ctx,
-               const struct jpfeed *feed,
-               const char *job,
-
-/* XXX: not checked for correctness,
-       assuming single occurence only */
-               const glite_jp_attrval_t attrs[] 
-)
-{
-       int     i;
-       int     qi[QUERY_MAX];
-
-       glite_jp_attrval_t *newattr = NULL;
-
-       glite_jp_clear_error(ctx);
-
-       if (feed->qry) {
-               int     j,complete = 1;
-
-               memset(qi,0,sizeof qi);
-               for (i=0; feed->qry[i].attr; i++) {
-                       int     sat = 0;
-                       assert(i<QUERY_MAX);
-                       for (j=0; !sat && attrs[j].name; j++)
-                               if (!strcmp(attrs[j].name,feed->qry[i].attr)) {
-                                       if (check_qry_item(ctx,feed->qry+i,attrs+j)) { 
-                                               qi[i] = 1;
-                                               sat = 1; /* matched, needn't loop further */
-                                       }
-                                       else return 0;  /* can't be satisfied either */
-                               }
-
-                       if (!sat) complete = 0;
-               }
-
-               /* not all attributes in query are known from input 
-                * we have to retrieve job metadata from the backend
-                * 
-                * XXX: It is not optimal to retrieve it here without sharing
-                * over multiple invocations of match_feed() for the same job.
-                */
-               if (!complete) {
-                       glite_jp_attrval_t      meta[QUERY_MAX+1];
-                       int     qi2[QUERY_MAX];
-
-                       memset(meta,0,sizeof meta);
-                       j=0;
-                       for (i=0; feed->qry[i].attr; i++) if (!qi[i]) {
-                               assert(j<QUERY_MAX);
-                               meta[j].name = feed->qry[i].attr;
-                               qi2[j] = i;
-                               j++;
-                       }
-
-                       if (glite_jppsbe_get_job_metadata(ctx,job,meta)) {
-                               glite_jp_error_t        err;
-                               memset(&err,0,sizeof err);
-                               err.code = EIO;
-                               err.source = __FUNCTION__;
-                               err.desc = "complete query";
-                               return glite_jp_stack_error(ctx,&err);
-                       }
-
-                       for (i=0; meta[i].name; i++)
-                               if (!check_qry_item(ctx,feed->qry+qi2[i],meta+i))
-                                       return 0;
-               }
-       }
-
-       /* matched completely */
-       return glite_jpps_single_feed(ctx,feed->destination,job,attrs);
-       return 0;
-}
-
-int glite_jpps_match_attr(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t attrs[]
-)
-{
-       struct jpfeed   *f = (struct jpfeed *) ctx->feeds;
-       int     i,j,doit;
-
-       for (;f; f = f->next) {
-               doit = 0;
-
-               for (i=0; !doit && f->attrs[i]; i++) 
-                       for (j=0; !doit && attrs[j].name; j++)
-                               if (!strcmp(f->attrs[i],attrs[j].name)) doit = 1;
-
-               /* XXX: ignore any errors */
-               if (doit) match_feed(ctx,f,job,attrs);
-       }
-
-       return glite_jp_clear_error(ctx);
-}
-
-static int attr_void_cmp(const void *a, const void *b)
-{
-       char const * const *ca = (char const * const *) a;
-       char const * const *cb = (char const * const *) b;
-       return strcmp(*ca,*cb);
-}
-
-static void attr_union(char **a, char **b, char ***c)
-{
-       int     ca = 0,cb = 0,cnt,i,j;
-       char    **out;
-
-       if (a) for (ca = 0; a[ca]; ca++);
-       if (b) for (cb = 0; b[cb]; cb++);
-       out = malloc((ca+cb+1) * sizeof *out);
-       if (a) memcpy(out,a,ca * sizeof *out);
-       if (b) memcpy(out+ca,b,cb * sizeof *out);
-       out[cnt = ca+cb] = NULL;
-       qsort(out,cnt,sizeof *out,attr_void_cmp);
-
-       for (i=0; i<cnt; i++) {
-               for (j=i; j<cnt && !strcmp(out[i],out[j]); j++);
-               if (j < cnt && j > i+1) memmove(out+i+1,out+j,(cnt-j) * sizeof *out);
-               cnt -= j-i-1;
-       }
-
-       *c = out;
-}
-
-int glite_jpps_match_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name
-)
-{
-       glite_jpps_fplug_data_t **pd = NULL;
-       int     pi;
-       void    *bh = NULL;
-       int     ret;
-       struct  jpfeed  *f = ctx->feeds;
-
-       int     nvals = 0,j,i;
-       char            **attrs = NULL, **attrs2;
-       glite_jp_attrval_t      *vals = NULL,*oneval;
-
-       fprintf(stderr,"%s: %s %s %s\n",__FUNCTION__,job,class,name);
-
-       
-       switch (glite_jpps_fplug_lookup(ctx,class,&pd)) {
-               case ENOENT: return 0;  /* XXX: shall we complain? */
-               case 0: break;
-               default: return -1;
-       }
-
-       for (;f;f=f->next) {
-               attr_union(attrs,f->attrs,&attrs2);
-               free(attrs);
-               attrs = attrs2;
-       }
-
-       for (pi=0; pd[pi]; pi++) {
-               int     ci;
-               for (ci=0; pd[pi]->uris[ci]; ci++) if (!strcmp(pd[pi]->uris[ci],class)) {
-                       void    *ph;
-
-                       if (!bh && (ret = glite_jppsbe_open_file(ctx,job,pd[pi]->classes[ci],name,O_RDONLY,&bh))) {
-                               free(pd);
-                               return ret;
-                       }
-
-                       if (pd[pi]->ops.open(pd[pi]->fpctx,bh,class,&ph)) {
-                               /* XXX: complain more visibly */
-                               fputs("plugin open failed\n",stderr);
-                               continue;
-                       }
-
-                       for (i=0; attrs[i]; i++) 
-                               if (!pd[pi]->ops.attr(pd[pi]->fpctx,ph,attrs[i],&oneval)) {
-                               /* XXX: ignore error */
-                                       for (j=0; oneval[j].name; j++);
-                                       vals = realloc(vals,(nvals+j+1) * sizeof *vals);
-                                       memcpy(vals+nvals,oneval,(j+1) * sizeof *vals);
-                                       nvals += j;
-                                       free(oneval);
-                               }
-
-                       pd[pi]->ops.close(pd[pi]->fpctx,ph);
-               }
-       }
-
-       free(attrs);
-
-       for (f = ctx->feeds; f; f=f->next) {
-               int     k;
-               glite_jp_attrval_t      * fattr = malloc((nvals+1) * sizeof *fattr);
-
-               j = 0;
-               for (i=0; i<nvals; i++) for (k=0; f->attrs[k]; k++)
-                       if (!strcmp(f->attrs[k],vals[i].name))
-                               memcpy(fattr+j++,vals+i,sizeof *fattr);
-
-               memset(fattr+j,0,sizeof *fattr);
-               glite_jpps_single_feed(ctx,f->destination,job,fattr);
-               free(fattr);
-       }
-
-       for (i=0; vals[i].name; i++) glite_jp_attrval_free(vals+i,0);
-       free(vals);
-
-       if (bh) glite_jppsbe_close_file(ctx,bh);
-       free(pd);
-
-       return 0;
-}
-
-static char *generate_feedid(void)
-{
-       char    hname[200],buf[1000];
-
-       gethostname(hname,sizeof hname);
-       snprintf(buf,sizeof buf,"%s%d%ld",hname,getpid(),lrand48());
-       buf[sizeof buf-1] = 0;
-       return str2md5base64(buf);
-}
-
-
-int glite_jpps_run_feed(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char const * const *attrs,
-       const glite_jp_query_rec_t *qry,
-       char **feed_id)
-{
-       fprintf(stderr,"%s: \n",__FUNCTION__);
-       return 0;
-}
-
-static int register_feed_deferred(glite_jp_context_t ctx,void *feed)
-{
-       struct jpfeed   *f = feed;
-
-       f->next = ctx->feeds;
-       ctx->feeds = f;
-       return 0;
-}
-
-/* FIXME:
- * - volatile implementation: should store the registrations in a file
- *   and recover after restart
- * - should communicate the data among all server slaves
- */
-int glite_jpps_register_feed(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char const *const *attrs,
-       const glite_jp_query_rec_t *qry,
-       char **feed_id,
-       time_t *expires)
-{
-       int     i;
-       struct jpfeed   *f = calloc(1,sizeof *f);
-
-       if (!*feed_id) *feed_id = generate_feedid();
-       time(expires); *expires += FEED_TTL;
-
-       f->id = strdup(*feed_id);
-       f->destination = strdup(destination);
-       f->expires = *expires;
-       for (i=0; attrs[i]; i++) {
-               f->attrs = realloc(f->attrs,(i+2) * sizeof *f->attrs);
-               f->attrs[i] = strdup(attrs[i]);
-               f->attrs[i+1] = NULL;
-       }
-       for (i=0; qry[i].attr; i++) {
-               f->qry = realloc(f->qry,(i+2) * sizeof *f->qry);
-               glite_jp_queryrec_copy(f->qry+i,qry+i);
-               memset(f->qry+i+1,0,sizeof *f->qry);
-       }
-
-       glite_jp_add_deferred(ctx,register_feed_deferred,f);
-
-       return 0;
-}
-
diff --git a/org.glite.jp.primary/src/feed.h b/org.glite.jp.primary/src/feed.h
deleted file mode 100644 (file)
index d141c5b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __GLITE_JP_FEED
-#define __GLITE_JP_FEED
-
-
-struct jpfeed {
-       char    *id,*destination;
-       time_t  expires;
-       char    **attrs;
-       glite_jp_query_rec_t    *qry;
-       struct jpfeed   *next;
-};
-
-
-int glite_jpps_match_attr(glite_jp_context_t,const char *,const glite_jp_attrval_t[]);
-int glite_jpps_match_file(glite_jp_context_t,const char *,const char *,const char *);
-int glite_jpps_match_tag(glite_jp_context_t,const char *,const char *,const char *);
-int glite_jpps_run_feed(glite_jp_context_t,const char *,char const * const *,const glite_jp_query_rec_t *,char **);
-int glite_jpps_register_feed(glite_jp_context_t,const char *,char const * const *,const glite_jp_query_rec_t *,char **,time_t *);
-
-#endif
-
diff --git a/org.glite.jp.primary/src/file_plugin.c b/org.glite.jp.primary/src/file_plugin.c
deleted file mode 100644 (file)
index 144a231..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <dlfcn.h>
-#include <errno.h>
-
-#include <glite/jp/types.h>
-#include "file_plugin.h"
-
-static struct option opts[] = {
-       { "plugin", 1, NULL, 'p' },
-       { NULL }
-};
-
-static int loadit(glite_jp_context_t ctx,const char *so)
-{
-/* XXX: not stored but we never dlclose() yet */
-       void    *dl_handle = dlopen(so,RTLD_NOW);
-
-       glite_jp_error_t        err;
-       const char      *e;
-       glite_jpps_fplug_data_t *data,*dp;
-       int     i;
-
-       glite_jpps_fplug_init_t init;
-       memset(&err,0,sizeof err);
-
-       if (!dl_handle) {
-               err.source = "dlopen()";
-               err.code = EINVAL;
-               err.desc = dlerror();
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       dlerror();
-       init = dlsym(dl_handle,"init");
-       e = dlerror();
-       if (e) {
-               char    buf[300];
-               snprintf(buf,sizeof buf,"dlsym(\"%s\",\"init\")",so);
-               buf[299] = 0;
-               err.source = buf;
-               err.code = ENOENT;
-               err.desc = e;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       data = calloc(1,sizeof *data);
-
-       if (init(ctx,data)) return -1;
-
-       i = 0;
-       if (ctx->plugins) for (i=0; ctx->plugins[i]; i++);
-       ctx->plugins = realloc(ctx->plugins, (i+2) * sizeof *ctx->plugins);
-       ctx->plugins[i] = data;
-       ctx->plugins[i+1] = NULL;
-
-       /* TODO: check consistency of uri+class pairs wrt. previous plugins */
-       
-       return 0;
-}
-
-int glite_jpps_fplug_load(glite_jp_context_t ctx,int argc,char **argv)
-{
-       int     i;
-
-       for (i=1; i<argc; i++) if (loadit(ctx,argv[i])) {
-               glite_jp_error_t        err;
-               memset(&err,0,sizeof err);
-               err.source = __FUNCTION__;
-               err.code = EINVAL;
-               err.desc = argv[i];
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jpps_fplug_lookup(glite_jp_context_t ctx,const char *uri, glite_jpps_fplug_data_t ***plugin_data)
-{
-       int     i;
-
-       glite_jpps_fplug_data_t **out = NULL;
-       int     matches = 0;
-
-       glite_jp_error_t        err;
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       err.code = ENOENT;
-       err.desc = (char *) uri;        /* XXX: we don't modify it, believe me, gcc! */
-
-       glite_jp_clear_error(ctx);
-       if (!ctx->plugins) {
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       for (i = 0; ctx->plugins[i]; i++) {
-               int     j;
-               glite_jpps_fplug_data_t *p = ctx->plugins[i];
-
-               for (j=0; p->uris && p->uris[j]; j++)
-                       if (!strcmp(p->uris[j],uri)) {
-                               out = realloc(out, (matches+2) * sizeof *out);
-                               out[matches++] = p;
-                               out[matches] = NULL;
-                       }
-       }
-
-       if (matches) {
-               *plugin_data = out;
-               return 0;
-       }
-       else return glite_jp_stack_error(ctx,&err);
-}
-
diff --git a/org.glite.jp.primary/src/ftp_backend.c b/org.glite.jp.primary/src/ftp_backend.c
deleted file mode 100644 (file)
index 8bf523b..0000000
+++ /dev/null
@@ -1,1744 +0,0 @@
-#ident "$Header$"
-
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-#include "glite/jp/strmd5.h"
-
-#include "tags.h"
-#include "backend.h"
-
-#define UPLOAD_SUFFIX ".upload"
-#define LOCK_SUFFIX ".lock"
-
-struct ftpbe_config {
-       char *internal_path;
-       char *external_path;
-       char *gridmap;
-       char *logname;
-};
-
-static struct ftpbe_config *config = NULL;
-
-struct fhandle_rec {
-       int fd;
-       int fd_append;
-};
-typedef struct fhandle_rec *fhandle;
-
-static struct option ftpbe_opts[] = {
-       { "ftp-internal-path", 1, NULL, 'I' },
-       { "ftp-external-path", 1, NULL, 'E' },
-       { "ftp-gridmap",       1, NULL, 'G' },
-       { NULL,                0, NULL,  0  }
-};
-
-/* obsolete */
-#if 0
-static struct {
-       glite_jp_fileclass_t    type;
-       char *                  fname;
-       } class_to_fname_tab[] = {
-               { GLITE_JP_FILECLASS_INPUT,  "input" },
-               { GLITE_JP_FILECLASS_OUTPUT, "output" },
-               { GLITE_JP_FILECLASS_LBLOG,  "lblog" },
-               { GLITE_JP_FILECLASS_TAGS,   "tags" },
-               { GLITE_JP_FILECLASS_UNDEF,  NULL }
-       };
-
-static char *class_to_fname(glite_jp_fileclass_t type)
-{
-       int i;
-
-       for (i = 0; class_to_fname_tab[i].type != GLITE_JP_FILECLASS_UNDEF; i++)
-               if (type == class_to_fname_tab[i].type)
-                       return class_to_fname_tab[i].fname;
-
-       return NULL;
-}
-
-static glite_jp_fileclass_t fname_to_class(char* fname)
-{
-       int i;
-
-       for (i = 0; class_to_fname_tab[i].type != GLITE_JP_FILECLASS_UNDEF; i++)
-               if (!strcmp(fname, class_to_fname_tab[i].fname))
-                       return class_to_fname_tab[i].type;
-
-       return GLITE_JP_FILECLASS_UNDEF;
-}
-#endif
-
-static int config_check(
-       glite_jp_context_t ctx,
-       struct ftpbe_config *config)
-{
-       return config == NULL ||
-               config->internal_path == NULL ||
-               config->external_path == NULL ||
-               config->gridmap == NULL ||
-               config->logname == NULL;
-
-       /* XXX check reality */
-}
-
-static int jobid_unique_pathname(glite_jp_context_t ctx, const char *job, 
-                         char **unique, char **ju_path, int get_path)
-{
-       char *p;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       p = strrchr(job, '/');
-       if (!p) {
-               err.code = EINVAL;
-               err.desc = "Malformed jobid";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       /* XXX thorough checks */
-       if (!(*unique = strdup(p+1))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (get_path) {
-               if (!(*ju_path = strdup(p+1))) {
-                       free(*unique);
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               *(*ju_path + 10) = '\0';
-       }
-       return 0;
-}
-
-static int mkdirpath(const char* path, int prefixlen)
-{
-       char *wpath, *p;
-       int goout, ret;
-
-       wpath = strdup(path);
-       if (!wpath) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       p = wpath + prefixlen;
-       goout = 0;
-       while (!goout) {
-               while (*p == '/') p++;
-               while (*p != '/' && *p != '\0') p++;
-               goout = (*p == '\0');
-               *p = '\0';
-               ret = mkdir(wpath, S_IRUSR | S_IWUSR | S_IXUSR);
-               if (ret < 0 && errno != EEXIST) break;
-               *p = '/';
-       }
-       free(wpath);
-       return goout ? 0 : ret;
-}
-
-static long regtime_trunc(long tv_sec)
-{
-       return tv_sec / (86400*7);
-}
-
-static long regtime_ceil(long tv_sec)
-{
-       return (tv_sec % (86400*7)) ? tv_sec/(86400*7)+1 : tv_sec/(86400*7) ;
-}
-
-/********************************************************************************/
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-)
-{
-       glite_jp_error_t err;
-       int opt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       config = (struct ftpbe_config *) calloc(1, sizeof *config);
-       if (!config) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       config->logname = getlogin();
-
-       while ((opt = getopt_long(argc, argv, "I:E:G:", ftpbe_opts, NULL)) != EOF) {
-               switch (opt) {
-                       case 'I': config->internal_path = optarg; break;
-                       case 'E': config->external_path = optarg; break;
-                       case 'G': config->gridmap = optarg; break;
-                       default: break;
-               }
-       }
-
-       if (config_check(ctx, config)) {
-               err.code = EINVAL;
-               err.desc = "Invalid FTP backend configuration";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-)
-{
-       /* Nothing to do */
-}
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-)
-{
-       glite_jp_error_t err;
-       char *int_dir = NULL;
-       char *int_fname = NULL;
-       char *data_dir = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *ownerhash = NULL;
-       FILE *regfile = NULL;
-       struct timeval reg_tv;
-       long reg_tv_trunc;
-       struct stat statbuf;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job != NULL);
-       assert(owner != NULL);
-
-       gettimeofday(&reg_tv, NULL);
-       reg_tv_trunc = regtime_trunc(reg_tv.tv_sec);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_dir, "%s/regs/%s",
-                       config->internal_path, ju_path) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (mkdirpath(int_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               free(int_dir);
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's reg directory";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       free(int_dir);
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (stat(int_fname, &statbuf) < 0) {
-               if (errno != ENOENT) {
-                       err.code = errno;
-                       err.desc = "Cannot stat jobs's reg info file";
-                       goto error_out;
-               }
-       } else {
-               err.code = EEXIST;
-               err.desc = "Job already registered";
-               goto error_out;
-       }
-
-       regfile = fopen(int_fname, "w");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-
-       ownerhash = str2md5(owner); /* static buffer */
-       
-       if (fprintf(regfile, "%d %ld.%06ld %s %s %d %s\n", 1,
-               (long)reg_tv.tv_sec, (long)reg_tv.tv_usec, job,
-               ownerhash, strlen(owner), owner) < 1 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot write jobs's reg info file";
-               goto error_out;
-       }
-       if (fclose(regfile) != 0 ) {
-               err.code = errno;
-               err.desc = "Cannot close(write) jobs's reg info file";
-               goto error_out;
-       }
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_tv.tv_sec), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (asprintf(&data_fname, "%s/_info", data_dir) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (mkdirpath(data_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's data directory";
-               goto error_out;
-       }
-
-       if (link(int_fname, data_fname) < 0) {
-               err.code = errno;
-               err.desc = "Cannot link job's reg and data info files";
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(data_fname);
-       if (err.code && data_dir) rmdir(data_dir);
-       free(data_dir);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int add_to_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       gridmap = fopen(config->gridmap, "a");
-       if (!gridmap) {
-               err.code = errno;
-               err.desc = "Cannot open gridmap file";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (fprintf(gridmap, "\"%s\" %s\n", dn, config->logname) < 6 ||
-               ferror(gridmap)) {
-               err.code = EIO;
-               err.desc = "Cannot write to gridmap file";
-               fclose(gridmap);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       fclose(gridmap);
-       return 0;
-}
-
-static int remove_from_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       char *temp_name = NULL;
-       FILE *temp_file = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       /* XXX */
-       return 0;
-}
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-)
-{
-       char *int_fname = NULL;
-       char *lock_fname = NULL;
-       FILE *lockfile = NULL;
-       FILE *regfile = NULL;
-       char *data_dir = NULL;
-       char *data_lock = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *peername = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(destination_out!=NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       peername = glite_jp_peer_name(ctx);
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s ", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       /* XXX authorization */
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_time), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(&lock_fname, "%s/%s" LOCK_SUFFIX,
-                       data_dir, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (commit_before_inout != NULL)
-               *commit_before_inout = (time_t) LONG_MAX;  /* XXX no timeout enforced */
-
-       lockfile = fopen(lock_fname, "w");
-       if (lockfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open uploads's lock file";
-               goto error_out;
-       }
-
-       if (fprintf(lockfile, "%ld %d %s\n", (long)*commit_before_inout,
-               peername ? peername : 0,
-               peername ? peername : "") < 1 || ferror(regfile)) {
-               fclose(lockfile);
-               err.code = errno;
-               err.desc = "Cannot write upload's lock file";
-               goto error_out;
-       }
-       if (fclose(lockfile) != 0 ) {
-               err.code = errno;
-               err.desc = "Cannot close(write) upload's lock file";
-               goto error_out;
-       }
-
-       if (asprintf(destination_out, "%s/data/%s/%d/%s/%s" UPLOAD_SUFFIX,
-                       config->external_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (add_to_gridmap(ctx, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot add peer DN to ftp server authorization file";
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(data_dir);
-       if (err.code && data_lock) unlink(data_lock);
-       free(data_lock);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-)
-{
-       size_t dest_len;
-       size_t suff_len;
-       size_t extp_len;
-       long commit_before;
-       int lockpeerlen;
-       char *lockpeername = NULL;
-       char *peername = NULL;
-       char *dest_rw = NULL;
-       char *dest_rw_suff = NULL;
-       char *dest_rw_lock = NULL;
-       FILE *lockfile = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(destination != NULL);
-
-       suff_len = strlen(UPLOAD_SUFFIX);
-       dest_len = strlen(destination);
-       extp_len = strlen(config->external_path);
-
-       if (dest_len < suff_len ||
-               strcmp(UPLOAD_SUFFIX, destination + (dest_len - suff_len)) ||
-               strncmp(destination, config->external_path, extp_len)) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&dest_rw_suff, "%s%s", config->internal_path,
-               destination + extp_len) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       dest_rw = strdup(dest_rw_suff);
-       if (!dest_rw) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       *(dest_rw + (strlen(dest_rw_suff) - suff_len)) = '\0';
-
-       if (asprintf(&dest_rw_lock, "%s" LOCK_SUFFIX, dest_rw) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       lockfile = fopen(dest_rw_lock, "r");
-       if (lockfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open upload's lock file";
-               goto error_out;
-       }
-       if (fscanf(lockfile, "%ld %d ", &commit_before, &lockpeerlen) < 2 || ferror(lockfile)) {
-               fclose(lockfile);
-               err.code = errno;
-               err.desc = "Cannot read upload's lock file";
-               goto error_out;
-       }
-       if (lockpeerlen) {
-               lockpeername = (char*) calloc(1, lockpeerlen+1);
-               if (!lockpeername) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(lockpeername, lockpeerlen+1, lockfile) == NULL) {
-                       fclose(lockfile);
-                       err.code = errno;
-                       err.desc = "Cannot read upload's lock file";
-                       goto error_out;
-               }
-       }
-       fclose(lockfile);
-
-       peername = glite_jp_peer_name(ctx);
-       if (lockpeername && (!peername || strcmp(lockpeername, peername))) {
-               err.code = EPERM;
-               err.desc = "Upload started by client of different identity";
-               goto error_out;
-       }
-
-       if (rename(dest_rw_suff, dest_rw) < 0) {
-               err.code = errno;
-               err.desc = "Cannot move upload file to the final place";
-               goto error_out;
-       }
-
-       if (unlink(dest_rw_lock) < 0) {
-               err.code = errno;
-               err.desc = "Cannot unlink upload's lock file";
-               goto error_out;
-       }
-
-error_out:
-       free(dest_rw);
-       free(dest_rw_suff);
-       free(dest_rw_lock);
-       free(peername);
-       free(lockpeername);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job,
-       char **class,
-       char **name
-)
-{
-       size_t dest_len;
-       size_t suff_len;
-       size_t extp_len;
-       char *dest_rw = NULL;
-       char *dest_rw_suff = NULL;
-       char *dest_rw_info = NULL;
-       FILE *infofile = NULL;
-       char *classname = NULL;
-       char jobstr[256+1];
-       glite_jp_error_t err;
-
-       assert(destination != NULL);
-       assert(job != NULL);
-       assert(class != NULL);
-       assert(name != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       suff_len = strlen(UPLOAD_SUFFIX);
-       dest_len = strlen(destination);
-       extp_len = strlen(config->external_path);
-
-       if (dest_len < suff_len ||
-               strcmp(UPLOAD_SUFFIX, destination + (dest_len - suff_len)) ||
-               strncmp(destination, config->external_path, extp_len)) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&dest_rw_suff, "%s%s", config->internal_path,
-               destination + extp_len) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       dest_rw = strdup(dest_rw_suff);
-       if (!dest_rw) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       *(dest_rw + (strlen(dest_rw_suff) - suff_len)) = '\0';
-
-       classname = strrchr(dest_rw,'/');
-       if (classname == NULL) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               goto error_out;
-       }
-       *classname++ ='\0';
-       *class = strdup(classname);
-
-/* XXX: do we need similar check? 
-       if (!class == GLITE_JP_FILECLASS_UNDEF) {
-               err.code = EINVAL;
-               err.desc = "Forged destination path";
-               goto error_out;
-       }
-*/
-
-       /* TODO: */
-       *name = NULL;
-
-       if (asprintf(&dest_rw_info, "%s/_info", dest_rw) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       infofile = fopen(dest_rw_info, "r");
-       if (infofile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open _info file";
-               goto error_out;
-       }
-       if (fscanf(infofile, "%*d %*ld.%*ld %256s ", jobstr) < 1 || ferror(infofile)) {
-               fclose(infofile);
-               err.code = errno;
-               err.desc = "Cannot read _info file";
-               goto error_out;
-       }
-       *job = strdup(jobstr);
-       fclose(infofile);
-
-error_out:
-       free(dest_rw);
-       free(dest_rw_suff);
-       free(dest_rw_info);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       char **url_out
-)
-{
-       FILE *regfile = NULL;
-       char *int_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(url_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       if (asprintf(url_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int get_job_fname(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       char **fname_out
-)
-{
-       FILE *regfile = NULL;
-       char *int_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       int info_version;
-       long reg_time;
-       char ownerhash[33];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(fname_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%*ld %*s %s", &info_version,
-               &reg_time, ownerhash) < 3 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       fclose(regfile);
-
-       if (asprintf(fname_out, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_time), ju, class) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(int_fname);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       /* TODO */
-       int mode,
-       void **handle_out
-)
-{
-       fhandle handle = NULL;
-       char* fname = NULL;
-       glite_jp_error_t err;
-
-       assert(handle_out != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (get_job_fname(ctx, job, class, name, &fname)) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot construct internal filename";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       handle = (fhandle) calloc(1,sizeof(*handle));
-       if (handle == NULL) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       handle->fd = open(fname, mode, S_IRUSR | S_IWUSR);
-       if (handle->fd < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file";
-               free(handle);
-               goto error_out;
-       }
-       handle->fd_append = open(fname, mode | O_APPEND, S_IRUSR | S_IWUSR);
-       if (handle->fd_append < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file for append";
-               close(handle->fd);
-               free(handle);
-               goto error_out;
-       }
-       *handle_out = (void*) handle;
-
-error_out:
-       free(fname);
-       if (err.code) { 
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (close(((fhandle)handle)->fd_append) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor (fd_append)";
-               goto error_out;
-       }
-       if (close(((fhandle)handle)->fd) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor";
-               goto error_out;
-       }
-
-error_out:
-       free(handle);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-)
-{
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if ((ret = pread(((fhandle)handle)->fd, buf, nbytes, offset)) < 0) {
-               err.code = errno;
-               err.desc = "Error in pread()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       *nbytes_ret = ret;
-
-       return 0;
-}
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (pwrite(((fhandle)handle)->fd, buf, nbytes, offset) < 0) {
-               err.code = errno;
-               err.desc = "Error in pwrite()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (write(((fhandle)handle)->fd_append, buf, nbytes) < 0) {
-               err.code = errno;
-               err.desc = "Error in write()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-static int get_job_info(
-       glite_jp_context_t ctx,
-       const char *job,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       char *ju = NULL;
-       char *ju_path = NULL;
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char *int_fname = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %*s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, &ownerlen) < 4 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       free(int_fname);
-       free(ju);
-       free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-static int get_job_info_int(
-       glite_jp_context_t ctx,
-       const char *int_fname,
-       char **jobid,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char jobid_buf[256];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, jobid_buf, &ownerlen) < 5 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       *jobid = strdup(jobid_buf);
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-)
-{
-       int got_info = 0;
-       struct timeval tv_reg;
-       char *owner = NULL;
-       int got_tags = 0;
-       void *tags_handle = NULL;
-       glite_jp_tagval_t* tags = NULL;
-       int i,j;
-       glite_jp_error_t err;
-
-       assert(job != NULL);
-       assert(attrs_inout != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; attrs_inout[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TIME:
-*/
-                       if (!got_info) {
-                               if (get_job_info(ctx, job, &owner, &tv_reg)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot retrieve job info";
-                                       goto error_out;
-                               }
-                               got_info = 1;
-                       }
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       if (!got_tags) {
-                               if (glite_jppsbe_open_file(ctx, job, GLITE_JP_FILECLASS_TAGS,
-                                       O_RDONLY, &tags_handle)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot open tag file";
-                                       goto error_out;
-                               }
-                               if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot read tags";
-                                       glite_jppsbe_close_file(ctx, tags_handle);
-                                       goto error_out;
-                               }
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               got_tags = 1;
-                       }
-                       break;
-*/
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type";
-                       goto error_out;
-                       break;
-               }
-
-               switch (attrs_inout[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-                       attrs_inout[i].value.s = strdup(owner);
-                       if (!attrs_inout[i].value.s) {
-                               err.code = ENOMEM;
-                               err.desc = "Cannot copy owner string";
-                               goto error_out;
-                       }       
-                       break;
-               case GLITE_JP_ATTR_TIME:
-                       attrs_inout[i].value.time = tv_reg;
-                       break;
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       for (j = 0; tags[j].name != NULL; j++) {
-                               if (!strcmp(tags[j].name, attrs_inout[i].attr.name)) {
-                                       if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                               &attrs_inout[i].value.tag)) {
-                                               err.code = ENOMEM;
-                                               err.desc = "Cannot copy tag value";
-                                               goto error_out;
-                                       }
-                                       break;
-                               }
-                       }
-                       if (!tags[j].name) attrs_inout[i].value.tag.name = NULL;
-                       break;
-*/
-               default:
-                       break;
-               }
-       }
-
-error_out:
-       free(owner);
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       free(tags);
-       
-       if (err.code) {
-               while (i > 0) {
-                       i--;
-                       switch (attrs_inout[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               free(attrs_inout[i].value.s);
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               free(attrs_inout[i].value.tag.name);
-                               free(attrs_inout[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-static int compare_timeval(struct timeval a, struct timeval b)
-{
-       if (a.tv_sec < b.tv_sec) return -1;
-       if (a.tv_sec > b.tv_sec) return 1;
-       if (a.tv_usec < b.tv_usec) return -1;
-       if (a.tv_usec > b.tv_usec) return 1;
-       return 0;
-}
-
-
-/* FIXME: disabled -- clarification wrt. filetype plugin needed */
-
-#if 0
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       char *time_dirname = NULL;
-       DIR *time_dirp = NULL;
-       struct dirent *jobent;
-       char *info_fname = NULL;
-       char *jobid = NULL;
-       char *owner = NULL;
-       struct timeval tv_reg;
-       void *tags_handle = NULL;
-       int matching;
-       int i, j;
-       glite_jp_tagval_t* tags = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (asprintf(&time_dirname, "%s/data/%s/%d", config->internal_path,
-                       ownerhash, regtime_tr) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       time_dirp = opendir(time_dirname);
-       if (!time_dirp) {
-               free(time_dirname);
-               return 0; /* found nothing */
-       }
-       while ((jobent = readdir(time_dirp)) != NULL) {
-               if (!strcmp(jobent->d_name, ".")) continue;
-               if (!strcmp(jobent->d_name, "..")) continue;
-               if (asprintf(&info_fname, "%s/%s/_info", time_dirname,
-                               jobent->d_name) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (get_job_info_int(ctx, info_fname, &jobid, &owner,  &tv_reg)) {
-                       err.code = EIO;
-                       err.desc = "Cannot retrieve job info";
-                       goto error_out;
-               }
-               if (q_tags || md_tags) {
-                       if (glite_jppsbe_open_file(ctx, jobid, GLITE_JP_FILECLASS_TAGS,
-                               O_RDONLY, &tags_handle)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot open tag file";
-                               goto error_out;
-                       }
-                       if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot read tags";
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               goto error_out;
-                       }
-                       glite_jppsbe_close_file(ctx, tags_handle);
-                       tags_handle = NULL;
-               }
-
-               matching = 1;
-               for (i = 0; matching && query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (query[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               if (query[i].value.s == NULL || 
-                                       strcmp(query[i].value.s, owner)) matching = 0;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               switch (query[i].op) {
-                                       case GLITE_JP_QUERYOP_EQUAL:
-                                               matching = !compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_UNEQUAL:
-                                               matching = compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_LESS:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) < 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_GREATER:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) > 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_WITHIN:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) >= 0
-                                                       && compare_timeval(tv_reg, query[i].value2.time) <= 0;
-                                               break;
-                               }
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               if (!tags) {
-                                       matching = 0;
-                                       break;
-                               }
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, query[i].attr.name)) {
-                                               switch (query[i].op) {
-                                               case GLITE_JP_QUERYOP_EQUAL:
-                                                       matching = !strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_UNEQUAL:
-                                                       matching = strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_LESS:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) < 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_GREATER:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) > 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_WITHIN:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) >= 0 \
-                                                               && strcmp(tags[j].value, query[i].value2.s) <= 0 ;
-                                                       break;
-                                               default:
-                                                       break;
-                                               }
-                                       }
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               if (!matching) {
-                       free(info_fname); info_fname = NULL;
-                       free(jobid); jobid = NULL;
-                       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-                               free(tags[j].name);
-                               free(tags[j].value);
-                       }
-                       free(tags); tags = NULL;
-                       continue;
-               }
-
-               for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               metadata[i].value.s = owner;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               metadata[i].value.time = tv_reg;
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, metadata[i].attr.name)) {
-                                               if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                                       &metadata[i].value.tag)) {
-                                                       err.code = ENOMEM;
-                                                       err.desc = "Cannot copy tag value";
-                                                       goto error_out;
-                                               }
-                                               break;
-                                       }
-                               }
-                               if (!tags[j].name) {
-                                       metadata[i].value.tag.name = NULL;
-                                       metadata[i].value.tag.value = NULL;
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               (*callback)(ctx, jobid, metadata);
-               free(jobid); jobid = NULL;
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-       }
-
-error_out:
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       if (tags_handle) glite_jppsbe_close_file(ctx, tags_handle);
-       free(info_fname);
-       free(owner);
-       free(jobid);
-       closedir(time_dirp);
-       free(time_dirname);
-       if (err.code)  {
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else
-               return 0;
-}
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       /* XXX clone metadata */
-       int i;
-       char *q_exact_owner = NULL;
-       char *ownerhash = NULL;
-       long q_min_time = 0;
-       long q_max_time = LONG_MAX;
-       long q_min_time_tr;
-       long q_max_time_tr;
-       int q_with_tags = 0;
-       int md_info = 0;
-       int md_tags = 0;
-       char *owner_dirname = NULL;
-       DIR *owner_dirp = NULL;
-       struct dirent *ttimeent;
-       char *data_dirname = NULL;
-       DIR *data_dirp = NULL;
-       struct dirent *ownerent;
-       long ttime = 0;
-       glite_jp_attrval_t *metadata_templ = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               if (query[i].attr.type == GLITE_JP_ATTR_OWNER && query[i].op == GLITE_JP_QUERYOP_EQUAL) {
-                       q_exact_owner = query[i].value.s;
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TIME) {
-                       switch (query[i].op) {
-                       case GLITE_JP_QUERYOP_EQUAL:
-                               q_min_time = query[i].value.time.tv_sec;
-                               q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_LESS:
-                               if (q_max_time > query[i].value.time.tv_sec + 1)
-                                       q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_WITHIN:
-                               if (q_max_time > query[i].value2.time.tv_sec + 1)
-                                       q_max_time = query[i].value2.time.tv_sec + 1;
-                               /* fallthrough */
-                       case GLITE_JP_QUERYOP_GREATER:
-                               if (q_min_time < query[i].value.time.tv_sec)
-                                       q_min_time = query[i].value.time.tv_sec;
-                               break;
-                       default:
-                               err.code = EINVAL;
-                               err.desc = "Invalid query op";
-                               return glite_jp_stack_error(ctx,&err);
-                               break;
-                       }
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TAG) 
-                       q_with_tags = 1;
-
-       }
-
-       for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (metadata[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TIME:
-                       md_info = 1;
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       md_tags = 1;
-                       break;
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type in metadata parameter";
-                       return glite_jp_stack_error(ctx,&err);
-                       break;
-               }
-       }
-       metadata_templ = (glite_jp_attrval_t *) calloc(i + 1, sizeof(glite_jp_attrval_t));
-       if (!metadata_templ) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(metadata_templ, metadata, (i + 1) * sizeof(glite_jp_attrval_t));
-       
-       q_min_time_tr = regtime_trunc(q_min_time);
-       q_max_time_tr = regtime_ceil(q_max_time);
-
-       if (q_exact_owner) {
-               ownerhash = str2md5(q_exact_owner); /* static buffer */
-               if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, ownerhash) == -1) {
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               owner_dirp = opendir(owner_dirname);
-               free(owner_dirname);
-               if (!owner_dirp) {
-                       free(metadata_templ);
-                       return 0; /* found nothing */
-               }
-               while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                       if (!strcmp(ttimeent->d_name, ".")) continue;
-                       if (!strcmp(ttimeent->d_name, "..")) continue;
-                       ttime = atol(ttimeent->d_name);
-                       if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                               if (query_phase2(ctx, ownerhash, ttime, q_with_tags, md_tags,
-                                               query, metadata_templ, callback)) {
-                                       err.code = EIO;
-                                       err.desc = "query_phase2() error";
-                                       goto error_out;
-                               }
-                       }
-               }
-       } else { /* !q_exact_owner */
-               if (asprintf(&data_dirname, "%s/data", config->internal_path) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               data_dirp = opendir(data_dirname);
-               if (!data_dirp) {
-                       err.code = EIO;
-                       err.desc = "Cannot open data directory";
-                       goto error_out;
-               }
-               while ((ownerent = readdir(data_dirp)) != NULL) {
-                       if (!strcmp(ownerent->d_name, ".")) continue;
-                       if (!strcmp(ownerent->d_name, "..")) continue;
-                       if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path,
-                                       ownerent->d_name) == -1) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       owner_dirp = opendir(owner_dirname);
-                       free(owner_dirname);
-                       if (!owner_dirp) {
-                               err.code = EIO;
-                               err.desc = "Cannot open owner data directory";
-                               goto error_out;
-                       }
-                       while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                               if (!strcmp(ttimeent->d_name, ".")) continue;
-                               if (!strcmp(ttimeent->d_name, "..")) continue;
-                               ttime = atol(ttimeent->d_name);
-                               if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                                       if (query_phase2(ctx, ownerent->d_name, ttime, q_with_tags, md_tags,
-                                                       query, metadata_templ, callback)) {
-                                               err.code = EIO;
-                                               err.desc = "query_phase2() error";
-                                               goto error_out;
-                                       }
-                               }
-                       }
-                       closedir(owner_dirp); owner_dirp = NULL;
-               }
-               closedir(data_dirp); data_dirp = NULL;
-       }
-       return 0;
-
-error_out:
-       if (owner_dirp) closedir(owner_dirp);
-       if (data_dirp) closedir(data_dirp);
-       free(data_dirname);
-       free(metadata_templ);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#else 
-
-/* placeholder instead */
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       glite_jp_error_t        err;
-       err.code = ENOSYS;
-       err.desc = "not implemented";
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#endif
-
-/* XXX:
-- no primary authorization yet
-- no concurrency control yet
-- partial success in pwrite,append
-- "unique" part of jobid is assumed to be unique across bookkeeping servers
-- repository versioning not fully implemented yet
-*/
diff --git a/org.glite.jp.primary/src/is_client.c b/org.glite.jp.primary/src/is_client.c
deleted file mode 100644 (file)
index bb2ae45..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-
-#include "feed.h"
-#include "is_client.h"
-/* FIXME
-#include "jpis_H.h"
-#include "jpis_.nsmap"
-*/
-
-int glite_jpps_single_feed(
-               glite_jp_context_t ctx,
-               const char *destination,
-               const char *job,
-               glite_jp_attrval_t const *attrs
-)
-{
-       /* TODO: really call JP Index server (via interlogger) */
-       printf("feed to %s, job %s\n",destination,job);
-
-/* FIXME */
-#if 0
-       if (soap_call_jpsrv__UpdateJobs(ctx->other_soap,destination,"",
-               /* FIXME: feedId */ "",
-               /* FIXME: UpdateJobsData */ NULL,
-               0,
-               NULL
-       )) fprintf(stderr,"UpdateJobs: %s %s\n",ctx->other_soap->fault->faultcode,
-               ctx->other_soap->fault->faultstring);
-
-#endif
-       return 0;
-}
diff --git a/org.glite.jp.primary/src/is_client.h b/org.glite.jp.primary/src/is_client.h
deleted file mode 100644 (file)
index a15d998..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int glite_jpps_single_feed(glite_jp_context_t,const char *,const char *,glite_jp_attrval_t const *);
diff --git a/org.glite.jp.primary/src/jptype_map.h b/org.glite.jp.primary/src/jptype_map.h
deleted file mode 100644 (file)
index c620c83..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "soap_version.h"
-
-#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
-
-#else
-
-#define __jpsrv__RegisterJob __ns1__RegisterJob
-#define __jpsrv__StartUpload __ns1__StartUpload
-#define __jpsrv__CommitUpload __ns1__CommitUpload
-#define __jpsrv__RecordTag __ns1__RecordTag
-#define __jpsrv__FeedIndex __ns1__FeedIndex
-#define __jpsrv__FeedIndexRefresh __ns1__FeedIndexRefresh
-#define __jpsrv__GetJob __ns1__GetJob
-
-#define SOAP_TYPE___jpsrv__RegisterJob SOAP_TYPE___ns1__RegisterJob
-#define SOAP_TYPE___jpsrv__StartUpload SOAP_TYPE___ns1__StartUpload
-#define SOAP_TYPE___jpsrv__CommitUpload SOAP_TYPE___ns1__CommitUpload
-#define SOAP_TYPE___jpsrv__GetJob SOAP_TYPE___ns1__GetJob
-
-#endif
-
diff --git a/org.glite.jp.primary/src/mysql.c b/org.glite.jp.primary/src/mysql.c
deleted file mode 100644 (file)
index 0f080ce..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-#ident "$Header$"
-
-#include "mysql.h"     // MySql header file
-#include "mysqld_error.h"
-#include "errmsg.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <time.h>
-#include <limits.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "db.h"
-
-#define DEFAULTCS      "jpps/@localhost:jpps1"
-#define GLITE_JP_LB_MYSQL_VERSION 40018
-
-static int  my_err(glite_jp_context_t ctx, char *function)
-{      
-       glite_jp_error_t err; 
-
-       glite_jp_clear_error(ctx); 
-       memset(&err,0,sizeof err); 
-       err.source = function;
-       err.code = EIO; /* XXX */
-       err.desc = mysql_error((MYSQL *) ctx->dbhandle); 
-       return glite_jp_stack_error(ctx,&err); 
-}
-
-struct _glite_jp_db_stmt_t {
-       MYSQL_RES               *result;
-       glite_jp_context_t      ctx;
-};
-
-int glite_jp_db_connect(glite_jp_context_t ctx,char *cs)
-{
-       char    *buf = NULL;
-       char    *host,*user,*pw,*db; 
-       char    *slash,*at,*colon;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (!cs) cs = DEFAULTCS;
-
-       if (!(ctx->dbhandle = (void *) mysql_init(NULL))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       mysql_options(ctx->dbhandle, MYSQL_READ_DEFAULT_FILE, "my");
-
-       host = user = pw = db = NULL;
-
-       buf = strdup(cs);
-       slash = strchr(buf,'/');
-       at = strrchr(buf,'@');
-       colon = strrchr(buf,':');
-
-       if (!slash || !at || !colon) {
-               free(buf);
-               err.code = EINVAL;
-               err.desc = "Invalid DB connect string";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       *slash = *at = *colon = 0;
-       host = at+1;
-       user = buf;
-       pw = slash+1;
-       db = colon+1;
-
-       if (!mysql_real_connect((MYSQL *) ctx->dbhandle,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) {
-               free(buf);
-               return my_err(ctx, __FUNCTION__);
-       }
-
-       free(buf);
-       return 0;
-}
-
-void glite_jp_db_close(glite_jp_context_t ctx)
-{
-       mysql_close((MYSQL *) ctx->dbhandle);
-       ctx->dbhandle = NULL;
-}
-
-int glite_jp_db_execstmt(glite_jp_context_t ctx,char *txt,glite_jp_db_stmt_t *stmt)
-{
-       int     merr;
-       int     retry_nr = 0;
-       int     do_reconnect = 0;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (stmt) {
-               *stmt = NULL;
-       }
-
-       while (retry_nr == 0 || do_reconnect) {
-               do_reconnect = 0;
-               if (mysql_query((MYSQL *) ctx->dbhandle,txt)) {
-                       /* error occured */
-                       switch (merr = mysql_errno((MYSQL *) ctx->dbhandle)) {
-                               case 0:
-                                       break;
-                               case ER_DUP_ENTRY: 
-                                       err.code = EEXIST;
-                                       err.desc = mysql_error((MYSQL *) ctx->dbhandle);
-                                       glite_jp_stack_error(ctx,&err);
-                                       return -1;
-                                       break;
-                               case CR_SERVER_LOST:
-                                       if (retry_nr <= 0) 
-                                               do_reconnect = 1;
-                                       break;
-                               default:
-                                       my_err(ctx, __FUNCTION__);
-                                       return -1;
-                                       break;
-                       }
-               }
-               retry_nr++;
-       }
-
-       if (stmt) {
-               *stmt = malloc(sizeof(**stmt));
-               if (!*stmt) {
-                       err.code = ENOMEM;
-                       glite_jp_stack_error(ctx,&err);
-                       return -1;
-               }
-               memset(*stmt,0,sizeof(**stmt));
-               (**stmt).ctx = ctx;
-               (**stmt).result = mysql_store_result((MYSQL *) ctx->dbhandle);
-               if (!(**stmt).result) {
-                       if (mysql_errno((MYSQL *) ctx->dbhandle)) {
-                               my_err(ctx, __FUNCTION__);
-                               return -1;
-                       }
-               }
-       } else {
-               MYSQL_RES       *r = mysql_store_result((MYSQL *) ctx->dbhandle);
-               mysql_free_result(r);
-       }
-       
-       return mysql_affected_rows((MYSQL *) ctx->dbhandle);
-}
-
-int glite_jp_db_fetchrow(glite_jp_db_stmt_t stmt,char **res)
-{
-       MYSQL_ROW       row;
-       glite_jp_context_t      ctx = stmt->ctx;
-       int             nr,i;
-       unsigned long   *len;
-
-       glite_jp_clear_error(ctx);
-
-       if (!stmt->result) return 0;
-
-       if (!(row = mysql_fetch_row(stmt->result))) {
-               if (mysql_errno((MYSQL *) ctx->dbhandle)) {
-                       my_err(ctx, __FUNCTION__);
-                       return -1;
-               } else return 0;
-       }
-
-       nr = mysql_num_fields(stmt->result);
-       len = mysql_fetch_lengths(stmt->result);
-       for (i=0; i<nr; i++) res[i] = len[i] ? strdup(row[i]) : strdup("");
-
-       return nr;
-}
-
-int glite_jp_db_querycolumns(glite_jp_db_stmt_t stmt,char **cols)
-{
-       int     i = 0;
-       MYSQL_FIELD     *f;
-
-       while ((f = mysql_fetch_field(stmt->result))) cols[i++] = f->name;
-       return i == 0;
-}
-
-void glite_jp_db_freestmt(glite_jp_db_stmt_t *stmt)
-{
-       if (*stmt) {
-               if ((**stmt).result) mysql_free_result((**stmt).result);
-               free(*stmt);
-               *stmt = NULL;
-       }
-}
-
-
-char *glite_jp_db_timetodb(time_t t)
-{
-       struct tm       *tm = gmtime(&t);
-       char    tbuf[256];
-
-       /* XXX: the very end of our days */
-       if (!tm && t == (time_t) LONG_MAX) return strdup("9999-12-31 23:59:59");
-
-       sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d'",tm->tm_year+1900,tm->tm_mon+1,
-               tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec);
-       
-       return strdup(tbuf);
-}
-
-time_t glite_jp_db_dbtotime(char *t)
-{
-       struct tm       tm;
-
-       memset(&tm,0,sizeof(tm));
-       setenv("TZ","UTC",1); tzset();
-       sscanf(t,"%4d-%02d-%02d %02d:%02d:%02d",
-               &tm.tm_year,&tm.tm_mon,&tm.tm_mday,
-               &tm.tm_hour,&tm.tm_min,&tm.tm_sec);
-       tm.tm_year -= 1900;
-       tm.tm_mon--;
-
-       return mktime(&tm);
-}
-
-int glite_jp_db_dbcheckversion(glite_jp_context_t ctx)
-{
-       MYSQL   *m = (MYSQL *) ctx->dbhandle;
-       const   char *ver_s = mysql_get_server_info(m);
-       int     major,minor,sub,version;
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (!ver_s || 3 != sscanf(ver_s,"%d.%d.%d",&major,&minor,&sub)) {
-               err.code = EINVAL;
-               err.desc = "problem checking MySQL version";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       version = 10000*major + 100*minor + sub;
-
-       if (version < GLITE_JP_LB_MYSQL_VERSION) {
-               char    msg[300];
-
-               snprintf(msg,sizeof msg,"Your MySQL version is %d. At least %d required.",version, GLITE_JP_LB_MYSQL_VERSION);
-               err.code = EINVAL;
-               err.desc = msg;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
diff --git a/org.glite.jp.primary/src/new_ftp_backend.c b/org.glite.jp.primary/src/new_ftp_backend.c
deleted file mode 100644 (file)
index c94f20f..0000000
+++ /dev/null
@@ -1,1791 +0,0 @@
-#ident "$Header$"
-
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-#include "glite/jp/strmd5.h"
-
-#include "tags.h"
-#include "backend.h"
-#include "db.h"
-
-#include "jpps_H.h"    /* XXX: SOAP_TYPE___jpsrv__GetJob */
-
-#include "jptype_map.h"
-
-#define FTPBE_DEFAULT_DB_CS    "jpps/@localhost:jpps"
-
-struct ftpbe_config {
-       char *internal_path;
-       char *external_path;
-       char *db_cs;
-//     char *gridmap;
-       char *logname;
-};
-
-static struct ftpbe_config *config = NULL;
-
-struct fhandle_rec {
-       int fd;
-       int fd_append;
-};
-typedef struct fhandle_rec *fhandle;
-
-static struct option ftpbe_opts[] = {
-       { "ftp-internal-path", 1, NULL, 'I' },
-       { "ftp-external-path", 1, NULL, 'E' },
-       { "ftp-db-cs",         1, NULL, 'D' },
-//     { "ftp-gridmap",       1, NULL, 'G' },
-       { NULL,                0, NULL,  0  }
-};
-
-/*******************************************************************************
-       Internal helpers
-*******************************************************************************/
-
-
-static int config_check(
-       glite_jp_context_t ctx,
-       struct ftpbe_config *config)
-{
-       return config == NULL ||
-               config->internal_path == NULL ||
-               config->external_path == NULL ||
-               config->db_cs == NULL ||
-//             config->gridmap == NULL ||
-               config->logname == NULL;
-
-       /* XXX check reality */
-}
-
-static int jobid_unique_pathname(glite_jp_context_t ctx, const char *job, 
-                         char **unique, char **ju_path, int get_path)
-{
-       char *p;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       p = strrchr(job, '/');
-       if (!p) {
-               err.code = EINVAL;
-               err.desc = "Malformed jobid";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       /* XXX thorough checks */
-       if (!(*unique = strdup(p+1))) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (get_path) {
-               if (!(*ju_path = strdup(p+1))) {
-                       free(*unique);
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               *(*ju_path + 10) = '\0';
-       }
-       return 0;
-}
-
-static int mkdirpath(const char* path, int prefixlen)
-{
-       char *wpath, *p;
-       int goout, ret;
-
-       wpath = strdup(path);
-       if (!wpath) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       p = wpath + prefixlen;
-       goout = 0;
-       while (!goout) {
-               while (*p == '/') p++;
-               while (*p != '/' && *p != '\0') p++;
-               goout = (*p == '\0');
-               *p = '\0';
-               ret = mkdir(wpath, S_IRUSR | S_IWUSR | S_IXUSR);
-               if (ret < 0 && errno != EEXIST) break;
-               *p = '/';
-       }
-       free(wpath);
-       return goout ? 0 : ret;
-}
-
-static int store_user(glite_jp_context_t ctx, const char *userid, const char *subj)
-{
-       glite_jp_error_t err;
-       char *stmt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       assert(userid != NULL);
-       assert(subj != NULL);
-
-       trio_asprintf(&stmt,"insert into users(userid,cert_subj) "
-               "values ('%|Ss','%|Ss')",userid,subj);
-       if (!stmt) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) 
-                       glite_jp_clear_error(ctx);
-               else {
-                       free(stmt);
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-       }
-       free(stmt);
-
-       return 0;
-}
-
-static long regtime_trunc(long tv_sec)
-{
-       return tv_sec / (86400*7);
-}
-
-static long regtime_ceil(long tv_sec)
-{
-       return (tv_sec % (86400*7)) ? tv_sec/(86400*7)+1 : tv_sec/(86400*7) ;
-}
-
-/********************************************************************************
-       Backend calls
-********************************************************************************/
-int glite_jppsbe_init(
-       glite_jp_context_t ctx,
-       int argc,
-       char *argv[]
-)
-{
-       glite_jp_error_t err;
-       int opt;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       config = (struct ftpbe_config *) calloc(1, sizeof *config);
-       if (!config) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       config->logname = getlogin();
-
-       while ((opt = getopt_long(argc, argv, "I:E:" /* G: */, ftpbe_opts, NULL)) != EOF) {
-               switch (opt) {
-                       case 'I': config->internal_path = optarg; break;
-                       case 'E': config->external_path = optarg; break;
-                       case 'D': config->db_cs = optarg; break;
-//                     case 'G': config->gridmap = optarg; break;
-                       default: break;
-               }
-       }
-
-       /* Defaults */
-       if (!config->db_cs) config->db_cs = strdup(FTPBE_DEFAULT_DB_CS);
-
-       if (config_check(ctx, config)) {
-               err.code = EINVAL;
-               err.desc = "Invalid FTP backend configuration";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jp_db_connect(ctx, config->db_cs)) {
-               err.code = EIO;
-               err.desc = "Cannot access backend's database (during init)";
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               glite_jp_db_close(ctx); /* slaves open their own connections */
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_init_slave(
-       glite_jp_context_t ctx
-)
-{
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       if (glite_jp_db_connect(ctx, config->db_cs)) {
-               err.code = EIO;
-               err.desc = "Cannot access backend's database";
-               return glite_jp_stack_error(ctx,&err);
-       } 
-
-       return 0;
-}
-
-int glite_jppsbe_register_job( 
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *owner
-)
-{
-       glite_jp_error_t err;
-       char *data_dir = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *ownerhash = NULL;
-       struct timeval reg_tv;
-       char *stmt = NULL;
-       char *dbtime = NULL;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job != NULL);
-       assert(owner != NULL);
-
-       gettimeofday(&reg_tv, NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       ownerhash = str2md5(owner); /* static buffer */
-       if (store_user(ctx, ownerhash, owner)) {
-               err.code = EIO;
-               err.desc = "Cannot store user entry";
-               goto error_out;
-       }
-
-       dbtime = glite_jp_db_timetodb(reg_tv.tv_sec);
-       if (!dbtime) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt,"insert into jobs(jobid,dg_jobid,owner,reg_time) "
-               "values ('%|Ss','%|Ss','%|Ss', %s)",
-               ju, job, ownerhash, dbtime);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) {
-                       err.code = EEXIST;
-                       err.desc = "Job already registered";
-               }
-               else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       if (asprintf(&data_dir, "%s/data/%s/%d/%s",
-                       config->internal_path, ownerhash, regtime_trunc(reg_tv.tv_sec), ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (mkdirpath(data_dir, strlen(config->internal_path)) < 0 &&
-                       errno != EEXIST) {
-               err.code = errno;
-               err.desc = "Cannot mkdir jobs's data directory";
-               goto error_out;
-       }
-
-error_out:
-       free(data_dir);
-       free(stmt); free(dbtime);
-       free(ju); free(ju_path);
-
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-#if 0
-static int add_to_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       gridmap = fopen(config->gridmap, "a");
-       if (!gridmap) {
-               err.code = errno;
-               err.desc = "Cannot open gridmap file";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       if (fprintf(gridmap, "\"%s\" %s\n", dn, config->logname) < 6 ||
-               ferror(gridmap)) {
-               err.code = EIO;
-               err.desc = "Cannot write to gridmap file";
-               fclose(gridmap);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       fclose(gridmap);
-       return 0;
-}
-
-static int remove_from_gridmap(glite_jp_context_t ctx, const char *dn)
-{
-       FILE *gridmap = NULL;
-       char *temp_name = NULL;
-       FILE *temp_file = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       
-       /* XXX */
-       return 0;
-}
-#endif
-
-int glite_jppsbe_start_upload(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       const char *content_type,
-       char **destination_out,
-       time_t *commit_before_inout
-)
-{
-       char *data_basename = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-       char *peername = NULL;
-       char *peerhash = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL };
-
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(destination_out!=NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       peername = glite_jp_peer_name(ctx);
-       if (peername == NULL) {
-               err.code = EINVAL;
-               err.desc = "Cannot obtain client certificate info";
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt, "select owner, reg_time from jobs"
-               " where jobid='%|Ss'", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-       
-       /* XXX authorization done in soap_ops.c */
-
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "",
-               (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(&data_fname, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       if (asprintf(destination_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (commit_before_inout != NULL)
-       /* XXX no timeout enforced */
-               /* XXX: gsoap does not like so much, one year should be enough
-               *commit_before_inout = (time_t) LONG_MAX;
-               */
-               *commit_before_inout = time(NULL) + 365*24*60*60;
-       
-       /* 
-       if (add_to_gridmap(ctx, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot add peer DN to ftp server authorization file";
-               goto error_out;
-       }
-       */
-
-       peerhash = str2md5(peername); /* static buffer */
-       if (store_user(ctx, peerhash, peername)) {
-               err.code = EIO;
-               err.desc = "Cannot store upload user entry";
-               goto error_out;
-       }
-
-       free(stmt); stmt = NULL;
-       trio_asprintf(&stmt,"insert into files"
-               "(jobid,filename,int_path,ext_url,state,deadline,ul_userid) "
-               "values ('%|Ss','%|Ss','%|Ss','%|Ss','%|Ss', '%|Ss', '%|Ss')",
-               ju, data_basename, data_fname, *destination_out, "uploading", 
-               glite_jp_db_timetodb(*commit_before_inout), peerhash);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               if (ctx->error->code == EEXIST) {
-                       err.code = EEXIST;
-                       err.desc = "File already stored or upload in progress";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename); 
-       free(data_fname); 
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_commit_upload(
-       glite_jp_context_t ctx,
-       const char *destination
-)
-{
-       char *peername = NULL;
-       char *peerhash = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
-       int i;
-       
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(destination != NULL);
-
-       trio_asprintf(&stmt, "select * from files where "
-                            "ext_url='%|Ss' and state='uploading'", destination);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such upload in progress";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 7) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-       glite_jp_db_freestmt(&db_res);
-
-       peername = glite_jp_peer_name(ctx);
-       if (peername == NULL) {
-               err.code = EINVAL;
-               err.desc = "Cannot obtain client certificate info";
-               goto error_out;
-       }
-
-       peerhash = str2md5(peername); /* static buffer */
-       if (strcmp(peerhash, db_row[6])) {
-               err.code = EPERM;
-               err.desc = "Upload started by client with different identity";
-               goto error_out;
-       }
-
-       free(stmt);
-       trio_asprintf(&stmt,"update files set state='committed', deadline=NULL "
-               "where jobid='%|Ss' and filename='%|Ss'", db_row[0], db_row[1]);
-       
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) {
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-error_out:
-       for (i=0; i<7; i++) free(db_row[i]);
-       free(peername);
-       free(stmt);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-int glite_jppsbe_destination_info(
-       glite_jp_context_t ctx,
-       const char *destination,
-       char **job,
-       char **class,
-       char **name
-)
-{
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL};
-       int i;
-       char *cp = NULL;
-       
-       char *classname = NULL;
-       glite_jp_error_t err;
-
-       assert(destination != NULL);
-       assert(job != NULL);
-       assert(class != NULL);
-       assert(name != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       
-       trio_asprintf(&stmt, "select j.dg_jobid,f.filename from jobs j,files f where "
-                            "f.ext_url='%|Ss' and j.jobid=f.jobid", destination);
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "Invalid destination string";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-       glite_jp_db_freestmt(&db_res);
-
-       *job = strdup(db_row[0]);
-
-       cp = strchr(db_row[1],'.');
-       if (!cp) { 
-               *name = NULL;
-       } else {
-               *cp++ = '\0';
-               *name = strdup(cp);
-       }
-       *class = strdup(db_row[1]);
-
-       if (!*job || !*class)  {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       for (i=0; i<2; i++) free(db_row[i]);
-       free(stmt);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_get_job_url(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       char **url_out
-)
-{
-       char *data_basename = NULL;
-       char *data_fname = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[3] = { NULL, NULL, NULL };
-
-       long reg_time;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(url_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/ : ""name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&stmt, "select j.owner,reg_time,u.cert_subj from jobs j, users u "
-               "where j.jobid='%|Ss' and j.owner = u.userid", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-
-       free(stmt); stmt = NULL;
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 3) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJobFiles,job,db_row[2])) {
-               err.code = EPERM;
-               goto error_out;
-       }
-       
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "",
-               (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(url_out, "%s/data/%s/%d/%s/%s",
-                       config->external_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       trio_asprintf(&stmt,"select 'x' from files where jobid='%|Ss' "
-                               "and ext_url = '%|Ss' "
-                               "and state='committed' ",ju,*url_out);
-
-       if ((db_retn = glite_jp_db_execstmt(ctx,stmt,&db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "not uploaded yet";
-               }
-               else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               /* goto error_out; */
-       }
-
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-static int get_job_fname(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,       
-       char **fname_out
-)
-{
-       char *data_basename = NULL;
-       char *ju = NULL;
-       char *ju_path = NULL;
-
-       char *stmt = NULL;
-       glite_jp_db_stmt_t db_res;
-       int db_retn;
-       char *db_row[2] = { NULL, NULL };
-
-       long reg_time;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       assert(job!=NULL);
-       assert(fname_out != NULL);
-
-       assert(class!=NULL);
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&stmt, "select owner, reg_time from jobs "
-               "where jobid='%|Ss'", ju);
-
-       if (!stmt) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) {
-               if (db_retn == 0) {
-                       err.code = ENOENT;
-                       err.desc = "No such job registered";
-               } else {
-                       err.code = EIO;
-                       err.desc = "DB access failed";
-               }
-               goto error_out;
-       }
-       
-       db_retn = glite_jp_db_fetchrow(db_res, db_row);
-       if (db_retn != 2) {
-               glite_jp_db_freestmt(&db_res);
-               err.code = EIO;
-               err.desc = "DB access failed";
-               goto error_out;
-       }
-
-       glite_jp_db_freestmt(&db_res);
-       
-       /* XXX name length */
-       if (asprintf(&data_basename, "%s%s%s", class,
-               (name != NULL) ? "." : "", (name != NULL) ? name : "") == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       if (asprintf(fname_out, "%s/data/%s/%d/%s/%s",
-                       config->internal_path, db_row[0],
-                       regtime_trunc(glite_jp_db_dbtotime(db_row[1])),
-                       ju, data_basename) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-error_out:
-       free(db_row[0]); free(db_row[1]);
-       free(stmt);
-       free(data_basename);
-       free(ju); free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-
-
-int glite_jppsbe_open_file(
-       glite_jp_context_t ctx,
-       const char *job,
-       const char *class,
-       const char *name,
-       int mode,
-       void **handle_out
-)
-{
-       fhandle handle = NULL;
-       char* fname = NULL;
-       glite_jp_error_t err;
-
-       assert(handle_out != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (get_job_fname(ctx, job, class, name, &fname)) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot construct internal filename";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       handle = (fhandle) calloc(1,sizeof(*handle));
-       if (handle == NULL) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-
-       handle->fd = open(fname, mode, S_IRUSR | S_IWUSR);
-       if (handle->fd < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file";
-               free(handle);
-               goto error_out;
-       }
-       handle->fd_append = open(fname, mode | O_APPEND, S_IRUSR | S_IWUSR);
-       if (handle->fd_append < 0) {
-               err.code = errno;
-               err.desc = "Cannot open requested file for append";
-               close(handle->fd);
-               free(handle);
-               goto error_out;
-       }
-       *handle_out = (void*) handle;
-
-error_out:
-       free(fname);
-       if (err.code) { 
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_close_file(
-       glite_jp_context_t ctx,
-       void *handle
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (close(((fhandle)handle)->fd_append) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor (fd_append)";
-               goto error_out;
-       }
-       if (close(((fhandle)handle)->fd) < 0) {
-               err.code = errno;
-               err.desc = "Error closing file descriptor";
-               goto error_out;
-       }
-
-error_out:
-       free(handle);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_pread(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset,
-       ssize_t *nbytes_ret
-)
-{
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if ((ret = pread(((fhandle)handle)->fd, buf, nbytes, offset)) < 0) {
-               err.code = errno;
-               err.desc = "Error in pread()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       *nbytes_ret = ret;
-
-       return 0;
-}
-
-int glite_jppsbe_pwrite(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes,
-       off_t offset
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (pwrite(((fhandle)handle)->fd, buf, nbytes, offset) < 0) {
-               err.code = errno;
-               err.desc = "Error in pwrite()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jppsbe_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       void *buf,
-       size_t nbytes
-)
-{
-       glite_jp_error_t err;
-
-       assert(handle != NULL);
-       assert(buf != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (write(((fhandle)handle)->fd_append, buf, nbytes) < 0) {
-               err.code = errno;
-               err.desc = "Error in write()";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-static int get_job_info(
-       glite_jp_context_t ctx,
-       const char *job,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       char *ju = NULL;
-       char *ju_path = NULL;
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char *int_fname = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) {
-               err.code = ctx->error->code;
-               err.desc = "Cannot obtain jobid unique path/name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (asprintf(&int_fname, "%s/regs/%s/%s.info",
-                       config->internal_path, ju_path, ju) == -1) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               if (errno == ENOENT) 
-                       err.desc = "Job not registered";
-               else
-                       err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %*s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, &ownerlen) < 4 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       free(int_fname);
-       free(ju);
-       free(ju_path);
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-static int get_job_info_int(
-       glite_jp_context_t ctx,
-       const char *int_fname,
-       char **jobid,
-       char **owner,
-       struct timeval *tv_reg
-)
-{
-       FILE *regfile = NULL;
-       long reg_time_sec;
-       long reg_time_usec;
-       int ownerlen = 0;
-       int info_version;
-       char jobid_buf[256];
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       regfile = fopen(int_fname, "r");
-       if (regfile == NULL) {
-               err.code = errno;
-               err.desc = "Cannot open jobs's reg info file";
-               goto error_out;
-       }
-       if (fscanf(regfile, "%d %ld.%ld %s %*s %d ", &info_version,
-               &reg_time_sec, &reg_time_usec, jobid_buf, &ownerlen) < 5 || ferror(regfile)) {
-               fclose(regfile);
-               err.code = errno;
-               err.desc = "Cannot read jobs's reg info file";
-               goto error_out;
-       }
-       *jobid = strdup(jobid_buf);
-       if (ownerlen) {
-               *owner = (char *) calloc(1, ownerlen+1);
-               if (!*owner) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (fgets(*owner, ownerlen+1, regfile) == NULL) {
-                       fclose(regfile);
-                       free(*owner);
-                       err.code = errno;
-                       err.desc = "Cannot read jobs's reg info file";
-                       goto error_out;
-               }
-       }
-       fclose(regfile);
-
-       tv_reg->tv_sec = reg_time_sec;
-       tv_reg->tv_usec = reg_time_usec;
-
-error_out:
-       if (err.code) {
-               return glite_jp_stack_error(ctx,&err);
-       } else { 
-               return 0;
-       }
-}
-
-int glite_jppsbe_get_job_metadata(
-       glite_jp_context_t ctx,
-       const char *job,
-       glite_jp_attrval_t attrs_inout[]
-)
-{
-       int got_info = 0;
-       struct timeval tv_reg;
-       char *owner = NULL;
-/* do in plugin
-       int got_tags = 0;
-       void *tags_handle = NULL;
-       glite_jp_tagval_t* tags = NULL;
-*/
-       int i,j;
-       glite_jp_error_t err;
-
-       assert(job != NULL);
-       assert(attrs_inout != NULL);
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; attrs_inout[i].name; i++) {
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TIME:
-*/
-               if (!strcmp(attrs_inout[i].name,GLITE_JP_ATTR_OWNER)) {
-                       if (!got_info) {
-                               if (get_job_info(ctx, job, &owner, &tv_reg)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot retrieve job info";
-                                       goto error_out;
-                               }
-                               got_info = 1;
-                       }
-               }
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       if (!got_tags) {
-                               if (glite_jppsbe_open_file(ctx, job, GLITE_JP_FILECLASS_TAGS,
-                                       O_RDONLY, &tags_handle)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot open tag file";
-                                       goto error_out;
-                               }
-                               if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                                       err.code = ctx->error->code;
-                                       err.desc = "Cannot read tags";
-                                       glite_jppsbe_close_file(ctx, tags_handle);
-                                       goto error_out;
-                               }
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               got_tags = 1;
-                       }
-                       break;
-*/
-               else {
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type";
-                       goto error_out;
-                       break;
-               }
-
-               if (!strcmp(attrs_inout[i].name,GLITE_JP_ATTR_OWNER)) {
-                       attrs_inout[i].value = strdup(owner);
-                       if (!attrs_inout[i].value) {
-                               err.code = ENOMEM;
-                               err.desc = "Cannot copy owner string";
-                               goto error_out;
-                       }       
-                       attrs_inout[i].origin = GLITE_JP_ATTR_ORIG_SYSTEM;
-                       attrs_inout[i].origin_detail = NULL;
-
-                       /* FIXME: we must store job registration time somewhere */
-                       attrs_inout[i].timestamp = 0;
-               }
-       
-/* TODO:
-               case GLITE_JP_ATTR_TIME:
-                       attrs_inout[i].value.time = tv_reg;
-                       break;
-*/
-
-/* must be implemented via filetype plugin
-               case GLITE_JP_ATTR_TAG:
-                       for (j = 0; tags[j].name != NULL; j++) {
-                               if (!strcmp(tags[j].name, attrs_inout[i].attr.name)) {
-                                       if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                               &attrs_inout[i].value.tag)) {
-                                               err.code = ENOMEM;
-                                               err.desc = "Cannot copy tag value";
-                                               goto error_out;
-                                       }
-                                       break;
-                               }
-                       }
-                       if (!tags[j].name) attrs_inout[i].value.tag.name = NULL;
-                       break;
-*/
-       }
-
-error_out:
-       free(owner);
-/* plugin
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       free(tags);
-*/
-       
-       if (err.code) {
-               while (i > 0) {
-                       i--;
-                       glite_jp_attrval_free(attrs_inout+i,0);
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else {
-               return 0;
-       }
-}
-static int compare_timeval(struct timeval a, struct timeval b)
-{
-       if (a.tv_sec < b.tv_sec) return -1;
-       if (a.tv_sec > b.tv_sec) return 1;
-       if (a.tv_usec < b.tv_usec) return -1;
-       if (a.tv_usec > b.tv_usec) return 1;
-       return 0;
-}
-
-
-/* FIXME: disabled -- clarification wrt. filetype plugin needed */
-
-#if 0
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-);
-
-static int query_phase2(
-       glite_jp_context_t ctx,
-       const char *ownerhash,
-       long regtime_tr,
-       int q_tags,
-       int md_tags,
-       const glite_jp_query_rec_t query[],
-       glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       char *time_dirname = NULL;
-       DIR *time_dirp = NULL;
-       struct dirent *jobent;
-       char *info_fname = NULL;
-       char *jobid = NULL;
-       char *owner = NULL;
-       struct timeval tv_reg;
-       void *tags_handle = NULL;
-       int matching;
-       int i, j;
-       glite_jp_tagval_t* tags = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       if (asprintf(&time_dirname, "%s/data/%s/%d", config->internal_path,
-                       ownerhash, regtime_tr) == -1) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       time_dirp = opendir(time_dirname);
-       if (!time_dirp) {
-               free(time_dirname);
-               return 0; /* found nothing */
-       }
-       while ((jobent = readdir(time_dirp)) != NULL) {
-               if (!strcmp(jobent->d_name, ".")) continue;
-               if (!strcmp(jobent->d_name, "..")) continue;
-               if (asprintf(&info_fname, "%s/%s/_info", time_dirname,
-                               jobent->d_name) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               if (get_job_info_int(ctx, info_fname, &jobid, &owner,  &tv_reg)) {
-                       err.code = EIO;
-                       err.desc = "Cannot retrieve job info";
-                       goto error_out;
-               }
-               if (q_tags || md_tags) {
-                       if (glite_jppsbe_open_file(ctx, jobid, GLITE_JP_FILECLASS_TAGS,
-                               O_RDONLY, &tags_handle)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot open tag file";
-                               goto error_out;
-                       }
-                       if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) {
-                               err.code = ctx->error->code;
-                               err.desc = "Cannot read tags";
-                               glite_jppsbe_close_file(ctx, tags_handle);
-                               goto error_out;
-                       }
-                       glite_jppsbe_close_file(ctx, tags_handle);
-                       tags_handle = NULL;
-               }
-
-               matching = 1;
-               for (i = 0; matching && query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (query[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               if (query[i].value.s == NULL || 
-                                       strcmp(query[i].value.s, owner)) matching = 0;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               switch (query[i].op) {
-                                       case GLITE_JP_QUERYOP_EQUAL:
-                                               matching = !compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_UNEQUAL:
-                                               matching = compare_timeval(tv_reg, query[i].value.time);
-                                               break;
-                                       case GLITE_JP_QUERYOP_LESS:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) < 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_GREATER:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) > 0;
-                                               break;
-                                       case GLITE_JP_QUERYOP_WITHIN:
-                                               matching = compare_timeval(tv_reg, query[i].value.time) >= 0
-                                                       && compare_timeval(tv_reg, query[i].value2.time) <= 0;
-                                               break;
-                               }
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               if (!tags) {
-                                       matching = 0;
-                                       break;
-                               }
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, query[i].attr.name)) {
-                                               switch (query[i].op) {
-                                               case GLITE_JP_QUERYOP_EQUAL:
-                                                       matching = !strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_UNEQUAL:
-                                                       matching = strcmp(tags[j].value, query[i].value.s);
-                                                       break;
-                                               case GLITE_JP_QUERYOP_LESS:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) < 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_GREATER:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) > 0;
-                                                       break;
-                                               case GLITE_JP_QUERYOP_WITHIN:
-                                                       matching = strcmp(tags[j].value, query[i].value.s) >= 0 \
-                                                               && strcmp(tags[j].value, query[i].value2.s) <= 0 ;
-                                                       break;
-                                               default:
-                                                       break;
-                                               }
-                                       }
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               if (!matching) {
-                       free(info_fname); info_fname = NULL;
-                       free(jobid); jobid = NULL;
-                       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-                               free(tags[j].name);
-                               free(tags[j].value);
-                       }
-                       free(tags); tags = NULL;
-                       continue;
-               }
-
-               for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_OWNER:
-                               metadata[i].value.s = owner;
-                               break;
-                       case GLITE_JP_ATTR_TIME:
-                               metadata[i].value.time = tv_reg;
-                               break;
-                       case GLITE_JP_ATTR_TAG:
-                               for (j = 0; tags[j].name != NULL; j++) {
-                                       if (!strcmp(tags[j].name, metadata[i].attr.name)) {
-                                               if (glite_jpps_tagval_copy(ctx, &tags[j],
-                                                       &metadata[i].value.tag)) {
-                                                       err.code = ENOMEM;
-                                                       err.desc = "Cannot copy tag value";
-                                                       goto error_out;
-                                               }
-                                               break;
-                                       }
-                               }
-                               if (!tags[j].name) {
-                                       metadata[i].value.tag.name = NULL;
-                                       metadata[i].value.tag.value = NULL;
-                               }
-                               break;
-                       default:
-                               break;
-                       }
-               }
-               (*callback)(ctx, jobid, metadata);
-               free(jobid); jobid = NULL;
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-       }
-
-error_out:
-       if (tags) for (j = 0; tags[j].name != NULL; j++) {
-               free(tags[j].name);
-               free(tags[j].value);
-       }
-       if (tags_handle) glite_jppsbe_close_file(ctx, tags_handle);
-       free(info_fname);
-       free(owner);
-       free(jobid);
-       closedir(time_dirp);
-       free(time_dirname);
-       if (err.code)  {
-               while (i > 0) {
-                       i--;
-                       switch (metadata[i].attr.type) {
-                       case GLITE_JP_ATTR_TAG:
-                               free(metadata[i].value.tag.name);
-                               free(metadata[i].value.tag.value);
-                       default:
-                               break;
-                       }
-               }
-               return glite_jp_stack_error(ctx,&err);
-       } else
-               return 0;
-}
-
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       /* XXX clone metadata */
-       int i;
-       char *q_exact_owner = NULL;
-       char *ownerhash = NULL;
-       long q_min_time = 0;
-       long q_max_time = LONG_MAX;
-       long q_min_time_tr;
-       long q_max_time_tr;
-       int q_with_tags = 0;
-       int md_info = 0;
-       int md_tags = 0;
-       char *owner_dirname = NULL;
-       DIR *owner_dirp = NULL;
-       struct dirent *ttimeent;
-       char *data_dirname = NULL;
-       DIR *data_dirp = NULL;
-       struct dirent *ownerent;
-       long ttime = 0;
-       glite_jp_attrval_t *metadata_templ = NULL;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       for (i = 0; query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               if (query[i].attr.type == GLITE_JP_ATTR_OWNER && query[i].op == GLITE_JP_QUERYOP_EQUAL) {
-                       q_exact_owner = query[i].value.s;
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TIME) {
-                       switch (query[i].op) {
-                       case GLITE_JP_QUERYOP_EQUAL:
-                               q_min_time = query[i].value.time.tv_sec;
-                               q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_LESS:
-                               if (q_max_time > query[i].value.time.tv_sec + 1)
-                                       q_max_time = query[i].value.time.tv_sec + 1;
-                               break;
-                       case GLITE_JP_QUERYOP_WITHIN:
-                               if (q_max_time > query[i].value2.time.tv_sec + 1)
-                                       q_max_time = query[i].value2.time.tv_sec + 1;
-                               /* fallthrough */
-                       case GLITE_JP_QUERYOP_GREATER:
-                               if (q_min_time < query[i].value.time.tv_sec)
-                                       q_min_time = query[i].value.time.tv_sec;
-                               break;
-                       default:
-                               err.code = EINVAL;
-                               err.desc = "Invalid query op";
-                               return glite_jp_stack_error(ctx,&err);
-                               break;
-                       }
-               }
-               if (query[i].attr.type == GLITE_JP_ATTR_TAG) 
-                       q_with_tags = 1;
-
-       }
-
-       for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) {
-               switch (metadata[i].attr.type) {
-               case GLITE_JP_ATTR_OWNER:
-               case GLITE_JP_ATTR_TIME:
-                       md_info = 1;
-                       break;
-               case GLITE_JP_ATTR_TAG:
-                       md_tags = 1;
-                       break;
-               default:
-                       err.code = EINVAL;
-                       err.desc = "Invalid attribute type in metadata parameter";
-                       return glite_jp_stack_error(ctx,&err);
-                       break;
-               }
-       }
-       metadata_templ = (glite_jp_attrval_t *) calloc(i + 1, sizeof(glite_jp_attrval_t));
-       if (!metadata_templ) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(metadata_templ, metadata, (i + 1) * sizeof(glite_jp_attrval_t));
-       
-       q_min_time_tr = regtime_trunc(q_min_time);
-       q_max_time_tr = regtime_ceil(q_max_time);
-
-       if (q_exact_owner) {
-               ownerhash = str2md5(q_exact_owner); /* static buffer */
-               if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, ownerhash) == -1) {
-                       err.code = ENOMEM;
-                       return glite_jp_stack_error(ctx,&err);
-               }
-               owner_dirp = opendir(owner_dirname);
-               free(owner_dirname);
-               if (!owner_dirp) {
-                       free(metadata_templ);
-                       return 0; /* found nothing */
-               }
-               while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                       if (!strcmp(ttimeent->d_name, ".")) continue;
-                       if (!strcmp(ttimeent->d_name, "..")) continue;
-                       ttime = atol(ttimeent->d_name);
-                       if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                               if (query_phase2(ctx, ownerhash, ttime, q_with_tags, md_tags,
-                                               query, metadata_templ, callback)) {
-                                       err.code = EIO;
-                                       err.desc = "query_phase2() error";
-                                       goto error_out;
-                               }
-                       }
-               }
-       } else { /* !q_exact_owner */
-               if (asprintf(&data_dirname, "%s/data", config->internal_path) == -1) {
-                       err.code = ENOMEM;
-                       goto error_out;
-               }
-               data_dirp = opendir(data_dirname);
-               if (!data_dirp) {
-                       err.code = EIO;
-                       err.desc = "Cannot open data directory";
-                       goto error_out;
-               }
-               while ((ownerent = readdir(data_dirp)) != NULL) {
-                       if (!strcmp(ownerent->d_name, ".")) continue;
-                       if (!strcmp(ownerent->d_name, "..")) continue;
-                       if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path,
-                                       ownerent->d_name) == -1) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       owner_dirp = opendir(owner_dirname);
-                       free(owner_dirname);
-                       if (!owner_dirp) {
-                               err.code = EIO;
-                               err.desc = "Cannot open owner data directory";
-                               goto error_out;
-                       }
-                       while ((ttimeent = readdir(owner_dirp)) != NULL) {
-                               if (!strcmp(ttimeent->d_name, ".")) continue;
-                               if (!strcmp(ttimeent->d_name, "..")) continue;
-                               ttime = atol(ttimeent->d_name);
-                               if (ttime >= q_min_time_tr && ttime < q_max_time_tr) {
-                                       if (query_phase2(ctx, ownerent->d_name, ttime, q_with_tags, md_tags,
-                                                       query, metadata_templ, callback)) {
-                                               err.code = EIO;
-                                               err.desc = "query_phase2() error";
-                                               goto error_out;
-                                       }
-                               }
-                       }
-                       closedir(owner_dirp); owner_dirp = NULL;
-               }
-               closedir(data_dirp); data_dirp = NULL;
-       }
-       return 0;
-
-error_out:
-       if (owner_dirp) closedir(owner_dirp);
-       if (data_dirp) closedir(data_dirp);
-       free(data_dirname);
-       free(metadata_templ);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#else 
-
-/* placeholder instead */
-int glite_jppsbe_query(
-       glite_jp_context_t ctx,
-       const glite_jp_query_rec_t query[],
-       const glite_jp_attrval_t metadata[],
-       int (*callback)(
-               glite_jp_context_t ctx,
-               const char *job,
-               const glite_jp_attrval_t metadata[]
-       )
-)
-{
-       glite_jp_error_t        err;
-       err.code = ENOSYS;
-       err.desc = "not implemented";
-       return glite_jp_stack_error(ctx,&err);
-}
-
-#endif
-
-/* XXX:
-- no primary authorization yet
-- no concurrency control yet
-- partial success in pwrite,append
-- "unique" part of jobid is assumed to be unique across bookkeeping servers
-- repository versioning not fully implemented yet
-*/
diff --git a/org.glite.jp.primary/src/simple_server.c b/org.glite.jp.primary/src/simple_server.c
deleted file mode 100644 (file)
index 3bbb743..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpps_H.h"
-
-extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[];
-
-int main(int argc, char *argv[]) {
-   struct soap soap;
-   int i, m, s; // master and slave sockets
-
-   glite_jp_context_t  ctx;
-
-   soap_init(&soap);
-   soap_set_namespaces(&soap, jpps__namespaces);
-
-   glite_jp_init_context(&ctx);
-
-   if (glite_jppsbe_init(ctx, &argc, argv)) {
-          /* XXX log */
-          fputs(glite_jp_error_chain(ctx), stderr);
-          exit(1);
-   }
-
-   soap.user = (void *) ctx;
-
-   ctx->other_soap = soap_new();
-   soap_init(ctx->other_soap);
-   soap_set_namespaces(ctx->other_soap,jpis__namespaces);
-
-   srand48(time(NULL)); /* feed id generation */
-
-   m = soap_bind(&soap, NULL, 8901, 100);
-   if (m < 0)
-      soap_print_fault(&soap, stderr);
-   else
-   {
-      fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
-      for (i = 1; ; i++) {
-         s = soap_accept(&soap);
-         if (s < 0) {
-            soap_print_fault(&soap, stderr);
-            break;
-         }
-         jpps__serve(&soap); // process RPC request
-         soap_destroy(&soap); // clean up class instances
-         soap_end(&soap); // clean up everything and close socket
-        glite_jp_run_deferred(ctx);
-      }
-   }
-   soap_done(&soap); // close master socket
-
-   return 0;
-}
-
-/* XXX: we don't use it */
-SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} };
diff --git a/org.glite.jp.primary/src/soap_ops.c b/org.glite.jp.primary/src/soap_ops.c
deleted file mode 100644 (file)
index d49d112..0000000
+++ /dev/null
@@ -1,415 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-#include <assert.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "feed.h"
-
-#include "jpps_H.h"
-/* #include "JobProvenancePS.nsmap" */
-#include "jpps_.nsmap" 
-
-#include "jptype_map.h"
-
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-
-static struct jptype__genericFault *jp2s_error(struct soap *soap,
-               const glite_jp_error_t *err)
-{
-       struct jptype__genericFault *ret = NULL;
-       if (err) {
-               ret = soap_malloc(soap,sizeof *ret);
-               memset(ret,0,sizeof *ret);
-               ret->code = err->code;
-               ret->source = soap_strdup(soap,err->source);
-               ret->text = soap_strdup(soap,strerror(err->code));
-               ret->description = soap_strdup(soap,err->desc);
-               ret->reason = jp2s_error(soap,err->reason);
-       }
-       return ret;
-}
-
-static void err2fault(const glite_jp_context_t ctx,struct soap *soap)
-{
-       char    *et;
-       struct SOAP_ENV__Detail *detail = soap_malloc(soap,sizeof *detail);
-       struct _genericFault *f = soap_malloc(soap,sizeof *f);
-
-
-       f->jpelem__genericFault = jp2s_error(soap,ctx->error);
-
-       detail->__type = SOAP_TYPE__genericFault;
-#if GSOAP_VERSION >= 20700
-       detail->fault = f;
-#else
-       detail->value = f;
-#endif
-       detail->__any = NULL;
-
-       soap_receiver_fault(soap,"Oh, shit!",NULL);
-       if (soap->version == 2) soap->fault->SOAP_ENV__Detail = detail;
-       else soap->fault->detail = detail;
-}
-
-#define CONTEXT_FROM_SOAP(soap,ctx) glite_jp_context_t ctx = (glite_jp_context_t) ((soap)->user)
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RegisterJob(
-               struct soap *soap,
-               struct _jpelem__RegisterJob *in,
-               struct _jpelem__RegisterJobResponse *empty)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       glite_jp_attrval_t owner_val[2];
-
-       printf("%s %s %s\n",__FUNCTION__,in->job,in->owner);
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__RegisterJob,in->job,in->owner) ||
-               glite_jppsbe_register_job(ctx,in->job,in->owner))
-       {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       owner_val[0].name = GLITE_JP_ATTR_OWNER;
-       owner_val[0].value = in->owner;
-       owner_val[0].origin = GLITE_JP_ATTR_ORIG_SYSTEM;
-       owner_val[0].timestamp = time(NULL);
-       owner_val[0].origin_detail = NULL;
-       owner_val[1].name = NULL;
-
-/* XXX: errrors should be ingored but not silently */
-       glite_jpps_match_attr(ctx,in->job,owner_val); 
-
-       return SOAP_OK;
-}
-
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__StartUpload(
-               struct soap *soap,
-               struct _jpelem__StartUpload *in,
-               struct _jpelem__StartUploadResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *destination;
-       time_t  commit_before = in->commitBefore;
-       glite_jp_error_t        err;
-       glite_jpps_fplug_data_t **pd = NULL;
-       int     i;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__StartUpload,NULL,NULL)) {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       switch (glite_jpps_fplug_lookup(ctx,in->class_,&pd)) {
-               case ENOENT:
-                       err.code = ENOENT;
-                       err.source = __FUNCTION__;
-                       err.desc = "unknown file class";
-                       glite_jp_stack_error(ctx,&err);
-                       err2fault(ctx,soap);
-                       return SOAP_FAULT;
-               case 0: break;
-               default:
-                       err2fault(ctx,soap);
-                       return SOAP_FAULT;
-       }
-
-       for (i=0; pd[0]->uris[i] && strcmp(pd[0]->uris[i],in->class_); i++);
-       assert(pd[0]->uris[i]);
-
-       if (glite_jppsbe_start_upload(ctx,in->job,pd[0]->classes[i],in->name,in->contentType,
-                               &destination,&commit_before))
-       {
-               err2fault(ctx,soap);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       out->destination = soap_strdup(soap,destination);
-       free(destination);
-       out->commitBefore = commit_before;
-
-       free(pd);
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__CommitUpload(
-               struct soap *soap,
-               struct _jpelem__CommitUpload *in,
-               struct _jpelem__CommitUploadResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *job,*class,*name;
-
-       job = class = name = NULL;
-       
-       if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__CommitUpload,NULL,NULL) ||
-               glite_jppsbe_commit_upload(ctx,in->destination))
-       {
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       /* XXX: should not fail when commit_upload was OK */
-       assert(glite_jppsbe_destination_info(ctx,in->destination,&job,&class,&name) == 0);
-
-       /* XXX: ignore errors but don't fail silenty */
-       glite_jpps_match_file(ctx,job,class,name);
-
-       free(job); free(class); free(name);
-
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RecordTag(
-               struct soap *soap,
-               struct _jpelem__RecordTag *in,
-               struct _jpelem__RecordTagResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       void    *file_be,*file_p;
-       glite_jpps_fplug_data_t **pd = NULL;
-       glite_jp_attrval_t      attr[2];
-
-       file_be = file_p = NULL;
-
-       /* XXX: we assume just one plugin and also that TAGS plugin handles
-        * just one uri/class */
-
-       if (glite_jpps_fplug_lookup(ctx,GLITE_JP_FILETYPE_TAGS,&pd)
-               || glite_jppsbe_open_file(ctx,in->jobid,pd[0]->classes[0],NULL,
-                                               O_RDWR|O_CREAT,&file_be)
-                       /* XXX: tags need reading to check magic number */
-       ) {
-               free(pd);
-               err2fault(ctx,soap);
-               return SOAP_FAULT;
-       }
-
-       /* XXX: assuming tag plugin handles just one type */
-       if (pd[0]->ops.open(pd[0]->fpctx,file_be,GLITE_JP_FILETYPE_TAGS,&file_p)
-               || pd[0]->ops.generic(pd[0]->fpctx,file_p,GLITE_JP_FPLUG_TAGS_APPEND,in->tag->name,in->tag->value))
-       {
-               err2fault(ctx,soap);
-               if (file_p) pd[0]->ops.close(pd[0]->fpctx,file_p);
-               glite_jppsbe_close_file(ctx,file_be);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       if (pd[0]->ops.close(pd[0]->fpctx,file_p)
-               || glite_jppsbe_close_file(ctx,file_be))
-       {
-               err2fault(ctx,soap);
-               free(pd);
-               return SOAP_FAULT;
-       }
-
-       attr[0].name = in->tag->name;
-       attr[0].value = in->tag->value;
-       attr[0].origin = GLITE_JP_ATTR_ORIG_USER;
-       attr[0].timestamp = time(NULL);
-       attr[0].origin_detail = NULL;   /* XXX */
-
-       /* XXX: ignore errors but don't fail silenty */
-       glite_jpps_match_attr(ctx,in->jobid,attr);
-
-       free(pd);
-       return SOAP_OK;
-}
-
-static void s2jp_qval(const struct jptype__stringOrBlob *in, char **value, int *binary, size_t *size)
-{
-       if (in->string) {
-               *value = in->string;
-               *binary = 0;
-               *size = 0;
-       }
-       else {
-               assert(in->blob);       /* XXX: should report error instead */
-               *value = in->blob->__ptr;
-               *binary = 1;
-               *size = in->blob->__size;
-       }
-}
-
-static void s2jp_query(const struct jptype__primaryQuery *in, glite_jp_query_rec_t *out)
-{
-       int     b;
-
-       out->attr = in->attr;
-
-       s2jp_qval(in->value,&out->value,&out->binary,&out->size);
-       switch (in->op) {
-               case EQUAL: out->op = GLITE_JP_QUERYOP_EQUAL; break;
-               case UNEQUAL: out->op = GLITE_JP_QUERYOP_UNEQUAL; break;
-               case LESS: out->op = GLITE_JP_QUERYOP_LESS; break;
-               case GREATER: out->op = GLITE_JP_QUERYOP_GREATER; break;
-               case WITHIN:
-                       out->op = GLITE_JP_QUERYOP_WITHIN;
-                       s2jp_qval(in->value2,&out->value2,&b,&out->size2);
-                       assert(out->binary == b);       /* XXX: report error instead */
-
-                       break;
-       }
-
-       if (in->origin) switch (*in->origin) {
-               case jptype__attrOrig__SYSTEM: out->origin = GLITE_JP_ATTR_ORIG_SYSTEM; break;
-               case jptype__attrOrig__USER: out->origin = GLITE_JP_ATTR_ORIG_USER; break;
-               case jptype__attrOrig__FILE_: out->origin = GLITE_JP_ATTR_ORIG_FILE; break;
-       }
-       else out->origin = GLITE_JP_ATTR_ORIG_ANY;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndex(
-               struct soap *soap,
-               struct _jpelem__FeedIndex *in,
-               struct _jpelem__FeedIndexResponse *out)
-{      
-
-/* deferred processing: return feed_id to the index server first,
- * start feeding it afterwards -- not before the index server actually
- * knows feed_id and is ready to accept the feed.
- *
- * Has to be done within the same server slave, 
- * passed through the context */
-
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *feed_id = NULL;
-       time_t  expires = 0;
-       int     ret = SOAP_OK;
-
-       char    const **attrs = calloc(in->__sizeattributes+1,sizeof *attrs);
-       glite_jp_query_rec_t    *qry = calloc(in->__sizeconditions+1,sizeof *qry);
-       int     i;
-
-       glite_jp_clear_error(ctx);
-
-       memcpy(attrs,in->attributes,sizeof *attrs * in->__sizeattributes);
-       for (i = 0; i<in->__sizeconditions; i++) s2jp_query(in->conditions[i],qry+i);
-
-       if (in->history) {
-               if (glite_jpps_run_feed(ctx,in->destination,attrs,qry,&feed_id)) {
-                       err2fault(ctx,soap);
-                       ret = SOAP_FAULT;
-                       goto cleanup;
-               }
-       }
-
-       if (in->continuous) {
-               if (glite_jpps_register_feed(ctx,in->destination,attrs,qry,&feed_id,&expires)) {
-                       err2fault(ctx,soap);
-                       ret = SOAP_FAULT;
-                       goto cleanup;
-               }
-       }
-
-       if (!in->history && !in->continuous) {
-               glite_jp_error_t        err;
-               memset(&err,0,sizeof err);
-               err.code = EINVAL;
-               err.source = __FUNCTION__;
-               err.desc = "at least one of <history> and <continous> must be true";
-               glite_jp_stack_error(ctx,&err);
-               err2fault(ctx,soap);
-               ret = SOAP_FAULT;
-               goto cleanup;
-       }
-
-       out->feedExpires = expires;
-       out->feedId = soap_strdup(soap,feed_id);
-
-cleanup:
-       free(feed_id);
-       free(attrs);
-       free(qry);
-
-       return ret;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndexRefresh(
-               struct soap *soap,
-               struct _jpelem__FeedIndexRefresh *in,
-               struct _jpelem__FeedIndexRefreshResponse *out)
-{
-       fprintf(stderr,"%s: not implemented\n",__FUNCTION__);
-       abort();
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJobFiles(
-               struct soap *soap,
-               struct _jpelem__GetJobFiles *in,
-               struct _jpelem__GetJobFilesResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-       char    *url;
-
-       int     i,n;
-       glite_jp_error_t        err;
-       void    **pd;
-       struct jptype__jppsFile         **f = NULL;
-
-       memset(&err,0,sizeof err);
-       out->__sizefiles = 0;
-
-       for (pd = ctx->plugins; *pd; pd++) {
-               glite_jpps_fplug_data_t *plugin = *pd;
-
-               for (i=0; plugin->uris[i]; i++) {
-                       glite_jp_clear_error(ctx);
-                       switch (glite_jppsbe_get_job_url(ctx,in->jobid,plugin->classes[i],NULL,&url)) {
-                               case 0: n = out->__sizefiles++;
-                                       f = realloc(f,out->__sizefiles * sizeof *f);
-                                       f[n] = soap_malloc(soap, sizeof **f);
-                                       f[n]->class_ = soap_strdup(soap,plugin->uris[i]);
-                                       f[n]->name = NULL;
-                                       f[n]->url = soap_strdup(soap,url);
-                                       free(url);
-                                       break;
-                               case ENOENT:
-                                       break;
-                               default: 
-                                       err.code = ctx->error->code;
-                                       err.source = "jpsrv__GetJob()";
-                                       err.desc = plugin->uris[i];
-                                       glite_jp_stack_error(ctx,&err);
-                                       err2fault(ctx,soap);
-                                       glite_jp_clear_error(ctx);
-                                       return SOAP_FAULT;
-                       }
-               }
-       }
-
-       if (!out->__sizefiles) {
-               glite_jp_clear_error(ctx);
-               err.code = ENOENT;
-               err.source = __FUNCTION__;
-               err.desc = "No file found for this job";
-               glite_jp_stack_error(ctx,&err);
-               err2fault(ctx,soap);
-//             glite_jp_clear_error(ctx);
-               return SOAP_FAULT;
-       }
-
-       out->files = soap_malloc(soap,out->__sizefiles * sizeof *f);
-       memcpy(out->files,f,out->__sizefiles * sizeof *f);
-
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJobAttributes(
-               struct soap *soap,
-               struct _jpelem__GetJobAttributes *in,
-               struct _jpelem__GetJobAttributesResponse *out)
-{
-       CONTEXT_FROM_SOAP(soap,ctx);
-
-       /* TODO */
-       abort();
-}
diff --git a/org.glite.jp.primary/src/tags.c b/org.glite.jp.primary/src/tags.c
deleted file mode 100644 (file)
index 1f11b4d..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include <glite/jp/types.h>
-#include "tags.h"
-#include "backend.h"
-
-/* magic name_len value_len binary sequence timestamp */
-#define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#"
-#define HEADER_SIZE 48
-
-int glite_jpps_tag_append(
-       glite_jp_context_t ctx,
-       void *handle,
-       const glite_jp_tagval_t *tag
-)
-{
-       char    hdr[HEADER_SIZE+1];
-       glite_jp_error_t        err;
-
-       unsigned long   vlen = tag->binary ? tag->size :
-                               (tag->value ? strlen(tag->value) : 0);
-       int     nlen;
-
-       memset(&err,0,sizeof err);
-       err.source = "glite_jpps_tag_append()";
-
-       if (!tag->name) {
-               err.code = EINVAL;
-               err.desc = "tag name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       nlen = strlen(tag->name);
-
-       assert(sprintf(hdr,HEADER,nlen,vlen,
-                       tag->binary ? "B" : "S",
-                       tag->sequence, tag->timestamp) == HEADER_SIZE);
-
-       if (glite_jppsbe_append(ctx,handle,hdr,HEADER_SIZE)) {
-               err.code = EIO;
-               err.desc = "write tag header";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jppsbe_append(ctx,handle,tag->name,nlen)) {
-               err.code = EIO;
-               err.desc = "write tag name";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (glite_jppsbe_append(ctx,handle,tag->value,vlen)) {
-               err.code = EIO;
-               err.desc = "write tag value";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       return 0;
-}
-
-int glite_jpps_tagval_copy(
-       glite_jp_context_t ctx,
-       glite_jp_tagval_t *from,
-       glite_jp_tagval_t *to
-)
-{
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       to->name = strdup(from->name);
-       if (!to->name) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       to->sequence = from->sequence;
-       to->timestamp = from->timestamp;
-       to->binary = from->binary;
-       to->size = from->size;
-       to->value = (char *) malloc(to->size);
-       if (!to->value) {
-               free(to->name);
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       memcpy(from->value, to->value, to->size);
-
-       return 0;
-}
-
-int glite_jpps_tag_read(
-       glite_jp_context_t ctx,
-       void *handle,
-       off_t offset,
-       glite_jp_tagval_t *tagvalue,
-       size_t *shift
-)
-{
-       char hdr[HEADER_SIZE+1];
-       unsigned int nlen;
-       unsigned long  vlen;
-       char binary;
-       unsigned sequence;
-       unsigned timestamp;
-       char * name = NULL;
-       char * value = NULL;
-       ssize_t ret;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       hdr[HEADER_SIZE] = '\0';
-       if (glite_jppsbe_pread(ctx, handle, hdr, HEADER_SIZE, offset, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag header";
-               goto error_out;
-       }
-       if (ret == 0) {
-               err.code = ENOENT;
-               err.desc = "No more tags in the file";
-               goto error_out;
-       }
-       /* #define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#" */
-       if (sscanf(hdr, HEADER, &nlen, &vlen, &binary, &sequence, &timestamp) < 5) {
-               err.code = EILSEQ;
-               err.desc = "Incorrect tag header format";
-               goto error_out;
-       }
-       name = (char*) malloc(nlen + 1);
-       if (!name) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       name[nlen] = '\0';
-       value = (char*) malloc(vlen + 1);
-       if (!value) {
-               err.code = ENOMEM;
-               goto error_out;
-       }
-       value[vlen] = '\0';
-       if (glite_jppsbe_pread(ctx, handle, name, nlen, offset + HEADER_SIZE, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag name";
-               goto error_out;
-       }
-       if (glite_jppsbe_pread(ctx, handle, value, vlen, offset + HEADER_SIZE + nlen, &ret)) {
-               err.code = EIO;
-               err.desc = "Cannot read tag value";
-               goto error_out;
-       }
-       
-       tagvalue->name = name;
-       tagvalue->sequence = sequence;
-       tagvalue->timestamp = timestamp;
-       tagvalue->binary = (binary == 'B') ? 1 : 0;
-       tagvalue->size = vlen;
-       tagvalue->value = value;
-
-       *shift = HEADER_SIZE + nlen + vlen;
-
-       return 0;
-error_out:
-       free(name);
-       free(value);
-       return glite_jp_stack_error(ctx,&err);
-}
-
-/*
-int glite_jpps_tag_read(glite_jp_context_t, void *, off_t, glite_jp_tagval_t *, size_t);
-int glite_jpps_tag_readall(glite_jp_context_t, void *, glite_jp_tagval_t **);
-*/
-
-int glite_jpps_tag_readall(
-       glite_jp_context_t ctx,
-       void *handle,
-       glite_jp_tagval_t **tags_out
-)
-{
-       glite_jp_tagval_t * tags = NULL;
-       void * newspace;
-       int ntags = 0;
-       int ntagspace = 0;
-       off_t offset = 0;
-       int ret;
-       size_t shift;
-       glite_jp_error_t err;
-
-       glite_jp_clear_error(ctx);
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-
-       ntagspace = 1;
-       tags = (glite_jp_tagval_t *) calloc(ntagspace + 1, sizeof(*tags));
-       if (!tags) {
-               err.code = ENOMEM;
-               return glite_jp_stack_error(ctx,&err);
-       }
-       while (!(ret = glite_jpps_tag_read(ctx, handle, offset, &tags[ntags], &shift))) {
-               offset += shift;
-               ntags++;
-               if (ntagspace <= ntags) {
-                       ntagspace += 1;
-                       newspace = realloc(tags, (ntagspace + 1) * sizeof(*tags));
-                       if (!newspace) {
-                               err.code = ENOMEM;
-                               goto error_out;
-                       }
-                       tags = (glite_jp_tagval_t *) newspace;
-               }
-       }
-       if (ret == ENOENT) {
-               *tags_out = tags;
-               return 0;
-       } else {
-               err.code = EIO;
-               err.desc = "Error reading tag value";
-       }
-
-error_out:
-       for (; ntags-- ;) {
-               free(tags[ntags].name);
-               free(tags[ntags].value);
-       }
-       free(tags);
-       return glite_jp_stack_error(ctx,&err);
-}
diff --git a/org.glite.jp.primary/src/tags.h b/org.glite.jp.primary/src/tags.h
deleted file mode 100644 (file)
index 3aade74..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int glite_jpps_tag_append(glite_jp_context_t,void *,const char *, const char *);
diff --git a/org.glite.jp.primary/src/tags_plugin.c b/org.glite.jp.primary/src/tags_plugin.c
deleted file mode 100644 (file)
index 877201d..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-#include <stdlib.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <string.h>
-#include <errno.h>
-#include <stdint.h>
-
-#include <glite/jp/types.h>
-
-#include "file_plugin.h"
-#include "builtin_plugins.h"
-#include "backend.h"
-
-static int tagappend(void *,void *,int,...);
-static int tagopen(void *,void *,const char *uri,void **);
-static int tagclose(void *,void *);
-
-#define TAGS_MAGIC 0x74c016f2  /* two middle digits encode version, i.e. 01 */
-
-static int tagdummy()
-{
-       puts("tagdummy()");
-       return -1;
-}
-
-struct tags_handle {
-       void    *bhandle;
-       int     n;
-       glite_jp_tagval_t       *tags;
-};
-
-int init(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data)
-{
-       data->fpctx = ctx;
-
-       data->uris = calloc(2,sizeof *data->uris);
-       data->uris[0] = strdup(GLITE_JP_FILETYPE_TAGS);
-
-       data->classes = calloc(2,sizeof *data->classes);
-       data->classes[0] = strdup("tags");
-
-       data->ops.open = tagopen;
-       data->ops.close = tagclose;
-       data->ops.attr = tagdummy;
-       data->ops.generic = tagappend;
-       
-       printf("tags_plugin: URI: \"%s\"; magic number: 0x%08lx\n",GLITE_JP_FILETYPE_TAGS,TAGS_MAGIC);
-       return 0;
-}
-
-static int tagopen(void *fpctx,void *bhandle,const char *uri,void **handle)
-{
-       struct tags_handle *h = calloc(1,sizeof *h);
-       h->n = -1;
-       h->bhandle = bhandle;
-
-       *handle = h;
-
-       return 0;
-}
-
-static int tagclose(void *fpctx,void *handle)
-{
-       int     i;
-       struct tags_handle *h = handle;
-
-       for (i=0; i<h->n; i++) {
-               free(h->tags[i].name);
-               free(h->tags[i].value);
-       }
-       free(h->tags);
-       free(h);
-
-       return 0;
-}
-
-static int tagappend(void *fpctx,void *handle,int oper,...)
-{
-       glite_jp_tagval_t       *tag;
-       va_list ap;
-       char    *hdr,*rec;
-       glite_jp_context_t      ctx = fpctx;
-       struct tags_handle      *h = handle;
-       uint32_t                magic,hlen,rlen,rlen_n;
-       size_t                  r;
-       glite_jp_error_t        err;
-
-       memset(&err,0,sizeof err);
-       err.source = __FUNCTION__;
-       glite_jp_clear_error(ctx);
-
-       va_start(ap,oper);
-       tag = va_arg(ap,glite_jp_tagval_t *);
-       va_end(ap);
-
-       printf("tagappend: %s,%d,%s\n",tag->name,tag->sequence,tag->value);
-
-       assert(oper == GLITE_JP_FPLUG_TAGS_APPEND);
-
-       if (glite_jppsbe_pread(ctx,h->bhandle,&magic,sizeof magic,0,&r)) {
-               err.code = EIO;
-               err.desc = "reading magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       if (r == 0) {
-               magic = htonl(TAGS_MAGIC);
-               if (glite_jppsbe_pwrite(ctx,h->bhandle,&magic,sizeof magic,0)) {
-                       err.code = EIO;
-                       err.desc = "writing magic number";
-                       return glite_jp_stack_error(ctx,&err);
-               }
-       }
-       else if (r != sizeof magic) {
-               err.code = EIO;
-               err.desc = "can't read magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-       else if (magic != htonl(TAGS_MAGIC)) {
-               err.code = EINVAL;
-               err.desc = "invalid magic number";
-               return glite_jp_stack_error(ctx,&err);
-       }
-
-       trio_asprintf(&hdr,"%d %ld %c",tag->sequence,
-                       tag->timestamp,tag->binary ? 'B' : 'S');
-
-       rlen = strlen(tag->name) + strlen(hdr) + 2 /* \0 after name and after hdr */ +
-               (r = tag->binary ? tag->size : (tag->value ? strlen(tag->value) : 0));
-
-       rlen_n = htonl(rlen);
-
-       rec = malloc(rlen + sizeof rlen_n);
-       *((uint32_t *) rec) = rlen_n;
-       strcpy(rec + sizeof rlen_n,tag->name);
-       strcpy(rec + (hlen = sizeof rlen_n + strlen(tag->name) + 1),hdr);
-
-       if (r) memcpy(rec + hlen + strlen(hdr) + 1,tag->value,r);
-       free(hdr);
-
-       if (glite_jppsbe_append(ctx,h->bhandle,rec,rlen + sizeof rlen_n)) {
-               err.code = EIO;
-               err.desc = "writing tag record";
-               free(rec);
-               return glite_jp_stack_error(ctx,&err);
-       }
-       
-       return 0;
-}
diff --git a/org.glite.jp.primary/src/typemap.dat b/org.glite.jp.primary/src/typemap.dat
deleted file mode 100644 (file)
index 72f515f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-jpsrv = http://glite.org/wsdl/services/jp
-jptype = http://glite.org/wsdl/types/jp
-jpelem = http://glite.org/wsdl/elements/jp
diff --git a/org.glite.jp.ws-interface/.cvsignore b/org.glite.jp.ws-interface/.cvsignore
deleted file mode 100755 (executable)
index 1df717b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.project
-.cdtproject
\ No newline at end of file
diff --git a/org.glite.jp.ws-interface/LICENSE b/org.glite.jp.ws-interface/LICENSE
deleted file mode 100755 (executable)
index 01b973b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-LICENSE file for EGEE Middleware
-================================
-
-Copyright (c) 2004 on behalf of the EU EGEE Project: 
-The European Organization for Nuclear Research (CERN), 
-Istituto Nazionale di Fisica Nucleare (INFN), Italy
-Datamat Spa, Italy
-Centre National de la Recherche Scientifique (CNRS), France
-CS Systeme d'Information (CSSI), France
-Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-Universiteit van Amsterdam (UvA), Netherlands
-University of Helsinki (UH.HIP), Finlan
-University of Bergen (UiB), Norway
-Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met: 
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if
-any, must include the following acknowledgment: "This product includes
-software developed by The EU EGEE Project (http://cern.ch/eu-egee/)."
-Alternatively, this acknowledgment may appear in the software itself, if
-and wherever such third-party acknowledgments normally appear.
-
-4. The names EGEE and the EU EGEE Project must not be
-used to endorse or promote products derived from this software without
-prior written permission. For written permission, please contact
-<email address>.
-
-5. You are under no obligation whatsoever to provide anyone with any
-bug fixes, patches, or upgrades to the features, functionality or
-performance of the Software ("Enhancements") that you may develop over
-time; however, if you choose to provide your Enhancements to The EU
-EGEE Project, or if you choose to otherwise publish or distribute your
-Enhancements, in source code form without contemporaneously requiring
-end users of The EU EGEE Proejct to enter into a separate written license
-agreement for such Enhancements, then you hereby grant The EU EGEE Project
-a non-exclusive, royalty-free perpetual license to install, use, copy,
-modify, prepare derivative works, incorporate into the EGEE Middleware
-or any other computer software, distribute, and sublicense your
-Enhancements or derivative works thereof, in binary and source code
-form (if any), whether developed by The EU EGEE Project or third parties.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the EU EGEE Prject. For more information on The
-EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on
-EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/
-
-
diff --git a/org.glite.jp.ws-interface/Makefile b/org.glite.jp.ws-interface/Makefile
deleted file mode 100644 (file)
index ee80ab4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# Default values
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-package=glite-jp-ws-interface
-version=0.0.0
-PREFIX=/opt/glite
-
--include Makefile.inc
-
-VPATH=${top_srcdir}/interface:${top_srcdir}/src
-STAGETO=interface
-
-XSLTPROC=xsltproc
-XMLLINT:=xmllint
-docbookxls:=http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
-
-#WSDL=JobProvenancePS.wsdl JobProvenanceIS.wsdl JobProvenanceTypes.wsdl 
-WSDL=JobProvenancePS.wsdl JobProvenanceTypes.wsdl 
-
-all compile: ${WSDL}
-
-check: 
-       @echo No unit test required for interface-only module.
-
-stage: ${WSDL}
-       $(MAKE) install PREFIX=${stagedir}
-
-dist: distsrc distbin
-
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=${top_srcdir}/tmpbuilddir
-       cd ${top_srcdir}/tmpbuilddir && tar -czf ${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *
-       rm -rf ${top_srcdir}/tmpbuilddir
-       
-install:
-       -mkdir -p ${PREFIX}/${STAGETO}
-       -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
-       
-%.wsdl: %.xml
-       ${XSLTPROC} ../src/puke-wsdl.xsl $< >$@
-
-JobProvenancePS.html: doc.xml JobProvenancePS.xml JobProvenanceTypes.xml puke-ug.xsl
-       ${XSLTPROC} --novalid ../src/puke-ug.xsl $< >doc-html.xml
-       ${XMLLINT} --valid --noout doc-html.xml
-       ${XSLTPROC} --stringparam  chapter.autolabel 0 ${docbookxls} doc-html.xml >$@
diff --git a/org.glite.jp.ws-interface/build.xml b/org.glite.jp.ws-interface/build.xml
deleted file mode 100644 (file)
index ae5d49b..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       Build file for the GLite jp ws-interface component
-       
-       Authors: Joachim Flammer <Joachim.Flammer@Cern.ch>      
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.1.1.1  2004/12/10 09:32:29  akrenek
-       
-       
-       Revision 1.5  2004/07/20 16:08:30  flammer
-       Changed incorrect my_... instead of .._template entries for subsystem and component.
-       
-       Revision 1.4  2004/07/16 16:32:53  flammer
-       Added comment where to add language target.
-       
-       Revision 1.3  2004/07/16 14:56:55  flammer
-       Corrected input path of build.properties.
-       
-       Revision 1.2  2004/07/06 20:43:19  flammer
-       Update of configure & targets.
-       
-       Revision 1.1.1.1  2004/06/18 12:40:17  flammer
-       Added general component template.
-       
-       
--->
-
-<project name="ws-interface" default="dist">
-
-       <!-- ==============================================
-             Builds the GLite jp ws-interface component
-            ============================================== -->
-       
-       <!-- =========================================
-             Import properties (order is important)
-            ========================================= -->
-       
-       <!-- Import baseline properties & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-             Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-
-       <!-- =========================================
-                 Load configuration definitions (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-             Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <!-- Put your language target (java/c++-ant/c++-autotool/perl) here -->
-       <import file="${global.targets-simple_make.file}" />
-               
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-       
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-               <antcall target="lbmakefiles" />
-       </target>
-       
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.ws-interface/interface/JobProvenanceIS.wsdl b/org.glite.jp.ws-interface/interface/JobProvenanceIS.wsdl
deleted file mode 100644 (file)
index 84c8844..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<WSDL:definitions
-       xmlns:tns="http://glite.org/wsdl/services/jp"
-       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-       xmlns:jp="http://glite.org/wsdl/types/jp"
-       xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
-       xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
-       xmlns="http://schemas.xmlsoap.org/wsdl/"
-       targetNamespace="http://glite.org/wsdl/services/jp"
-       name="JobProvenanceIS">
-
-       <import namespace="http://glite.org/wsdl/types/jp" location="JobProvenanceTypes.wsdl"/>
-
-       <message name="GenericJPFault">
-               <part name="fault" element="jp:GenericJPFault"/>
-       </message>
-
-       <message name="QueryJobsRequest">
-               <part name="conditions" type="jp:IndexQuery"/>
-       </message>
-
-       <message name="QueryJobsResponse">
-               <part name="jobs" type="jp:JobRecords"/>
-       </message>
-               
-       <message name="UpdateJobsRequest">
-               <part name="feedId" type="xsd:string"/>
-               <part name="data" type="jp:UpdateJobsData"/>
-               <part name="feedDone" type="xsd:boolean"/>
-       </message>
-       <message name="EmptyResponse"/>
-       
-       <portType name="JobProvenanceIS_PortType">
-               <operation name="UpdateJobs">
-                       <documentation>Store or update information on jobs within the JP index server.
-Called directly by the primary storage, used for both batch and incremental feed.
-
-Input:
-
-data: list of job record updates. Each contains jobid, list of JP attribute values and user tag values.
-
-feedDone: flag indicating end of batch feed. (In order to avoid potential problems with buffer allocation
-the huge dataset of batch feed is split into reasonable chunks and delivered with more UpdateJobs calls.)
-
-Output: N/A
-
-Faults: GenericJPFault
-
-
-                       </documentation>
-                       <input message="tns:UpdateJobsRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="QueryJobs">
-                       <documentation>Retrieve pointers to job records of jobs matching a query.
-Input: conditions - list of lists of query conditions.
-       Elements of the inner lists refer to a single job attribute, the conditions are or-ed.
-       Elements of the outer list may refer to different job attributes, they are and-ed.
-
-Output:
-
-jobs: list of JobId, PSContact (URL of the primary storage which manges this job) pairs
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:QueryJobsRequest"/>
-                       <output message="tns:QueryJobsResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-       </portType>
-
-       <binding name="JobProvenanceIS" type="tns:JobProvenanceIS_PortType">
-               <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-               <operation name="UpdateJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="QueryJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-       </binding>
-
-       <service name="JobProvenanceIS">
-               <documentation>Job Provenance Index service</documentation>
-               <port name="JobProvenanceIS" binding="tns:JobProvenanceIS">
-                       <SOAP:address location="http://localhost:10001"/>
-               </port>
-       </service>
-               
-
-</WSDL:definitions>
diff --git a/org.glite.jp.ws-interface/project/build.number b/org.glite.jp.ws-interface/project/build.number
deleted file mode 100644 (file)
index 63f5995..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=33
diff --git a/org.glite.jp.ws-interface/project/build.properties b/org.glite.jp.ws-interface/project/build.properties
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/org.glite.jp.ws-interface/project/configure.properties.xml b/org.glite.jp.ws-interface/project/configure.properties.xml
deleted file mode 100644 (file)
index 4b08208..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-        Copyright (c) 2004 on behalf of the EU EGEE Project:
-        The European Organization for Nuclear Research (CERN),
-        Istituto Nazionale di Fisica Nucleare (INFN), Italy
-        Datamat Spa, Italy
-        Centre National de la Recherche Scientifique (CNRS), France
-        CS Systeme d'Information (CSSI), France
-        Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-        Universiteit van Amsterdam (UvA), Netherlands
-        University of Helsinki (UH.HIP), Finland
-        University of Bergen (UiB), Norway
-        Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-        Configuration build properties file for the GLite jp ws-interface component
-
-        Authors: Joachim Flammer <Joachim.Flammer@cern.ch>
-        Version info: $Id$
-        Release: $Name$
-
-        Revision history:
-        $Log$
-        Revision 1.3  2004/07/20 16:08:30  flammer
-        Changed incorrect my_... instead of .._template entries for subsystem and component.
-
-        Revision 1.2  2004/07/16 14:56:55  flammer
-        Corrected input path of build.properties.
-
-        Revision 1.1  2004/07/06 20:43:19  flammer
-        Update of configure & targets.
-
-
-
--->
-<project name="jp ws-interface component configuration properties">
-
-<target name="lbmakefiles">
-       <exec executable="ln" failonerror="true">
-               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-       </exec>
-       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-jpprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-glite_location=${with.glite.location}
-                </echo>
-    </target>
-</project>
diff --git a/org.glite.jp.ws-interface/project/glite-jp-ws-interface.spec b/org.glite.jp.ws-interface/project/glite-jp-ws-interface.spec
deleted file mode 100644 (file)
index dba6d55..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-Summary:Change me !!!
-Name:glite-jp-ws-interface
-Version:0.0.0
-Release:0
-Copyright:Open Source EGEE License
-Vendor:EU EGEE project
-Group:System/Application
-Prefix:/opt/glite
-BuildArch:x86_64
-BuildRoot:%{_builddir}/%{name}-%{version}
-Source:glite-jp-ws-interface-0.0.0_bin.tar.gz
-
-%define debug_package %{nil}
-
-%description
-Change me !!!
-
-%prep
-
-%setup -c
-
-%build
-
-%install
-
-%clean
-%pre
-%post
-%preun
-%postun
-%files
-%defattr(-,root,root)
-%{prefix}/interface/JobProvenancePS.wsdl
-%{prefix}/interface/JobProvenanceTypes.wsdl
-%{prefix}/share/doc/glite-jp-ws-interface-0.0.0/LICENSE
-
-%changelog
-
diff --git a/org.glite.jp.ws-interface/project/properties.xml b/org.glite.jp.ws-interface/project/properties.xml
deleted file mode 100644 (file)
index 4ec8018..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       Common build properties file for the GLite jp ws-interface component
-       
-       Authors: Joachim Flammer <Joachim.Flammer@cern.ch>
-       Version info: $Id$
-       Release: $Name$ 
-       
-       Revision history:
-       $Log$
-       Revision 1.4  2004/07/20 16:08:30  flammer
-       Changed incorrect my_... instead of .._template entries for subsystem and component.
-       
-       Revision 1.3  2004/07/16 14:56:55  flammer
-       Corrected input path of build.properties.
-       
-       Revision 1.2  2004/07/16 14:36:49  flammer
-       
-       Corrected build.properties include.
-       
-       Revision 1.1.1.1  2004/06/18 12:40:17  flammer
-       Added general component template.
-       
-       
--->
-
-<project name="jp ws-interface component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-              Define corresponding subsystem properties
-            ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-              Define component properties
-            ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="ws-interface" />
-                       
-       <!-- ======================================================
-              Define general component properties
-            ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-             Define extra properties here ...
-            ====================================================== -->
-       
-               
-</project>
diff --git a/org.glite.jp.ws-interface/project/tar_exclude b/org.glite.jp.ws-interface/project/tar_exclude
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.ws-interface/project/version.properties b/org.glite.jp.ws-interface/project/version.properties
deleted file mode 100755 (executable)
index 0ff5227..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=0
diff --git a/org.glite.jp.ws-interface/src/JobProvenancePS.xml b/org.glite.jp.ws-interface/src/JobProvenancePS.xml
deleted file mode 100644 (file)
index c4cb810..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<service name="JobProvenancePS"
-       ns="http://glite.org/wsdl/services/jp"
-       prefix="jp"
-       typeNs="http://glite.org/wsdl/types/jp"
-       typePrefix="jpt"
-       elemNs="http://glite.org/wsdl/elements/jp"
-       elemPrefix="jpe"
-       xmlns:jpt="http://glite.org/wsdl/types/jp">
-
-       <version>CVS revision: <![CDATA[ $Header$ ]]></version>
-
-       <import namespace="http://glite.org/wsdl/services/jp" location="JobProvenanceTypes.wsdl"/>
-
-       <doc>
-               <para>
-               The Job Provenance (JP) Primary Storage Service is responsible
-               to keep the JP data
-               (definition of submitted jobs, execution conditions and environment,
-               and important points of the job life cycle) in a compact and
-               economic form.
-               </para>
-
-               <para>
-               The JP Primary storage, as described in section 8.4 of
-               the 
-               <ulink url="https://edms.cern.ch/document/594698/">
-               Architecture deliverable DJRA1.1 
-               </ulink>
-               provides public interfaces for data storing,
-               retrieval based on basic metadata, and registration of Index servers for
-               incremental feed.
-               </para>
-
-               <para>
-               Command interface to JP is completely covered by the WS interface covered here.
-               Bulk file transfers are done via specialised protocols, currently gsiftp only.
-               </para>
-       </doc>
-
-       <fault name="genericFault"/>
-
-       <operations>
-               <op name="RegisterJob">
-                       Register job with the JP primary storage.
-                       <input name="job" type="xsd:string">Jobid of the registered job.</input>
-                       <input name="owner" type="xsd:string">Owner of the job (DN of X509 certificate).</input>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="StartUpload">
-                       Start uploading a file.
-                       <input name="job" type="xsd:string">Jobid to which this file is related.</input>
-                       <input name="class" type="xsd:string">
-                               Type of the file (URI). The server must have a plugin handing this type.
-                       </input>
-                       <input name="name" type="xsd:string">Name of the file (used to distinguish among more files of the same type).</input>
-                       <input name="commitBefore" type="xsd:dateTime">The client promisses to finish the upload before this time.</input>
-                       <input name="contentType" type="xsd:string">MIME type of the file.</input>
-                       <output name="destination" type="xsd:string">URL where the client should upload the file.</output>
-                       <output name="commitBefore" type="xsd:dateTime">Server's view on when the upload must be finished.</output>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="CommitUpload">
-                       Confirm a successfully finished file apload.
-                       <input name="destination" type="xsd:string">Destination URL returned by StartUpload before.</input>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="RecordTag">
-                       Record an additional user tag.
-                       <input name="jobid" type="xsd:string">Job to which the tag is added.</input>
-                       <input name="tag" type="tagValue">Name and value of the tag.</input>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="FeedIndex">
-                       Request for feeding a JP Index server (issued by this server).
-                       <input name="destination" type="xsd:string">Endpoint of the listening index server.</input>
-                       <input name="attributes" type="xsd:string" list="yes">Which attributes of jobs is the index server interested in.</input>
-                       <input name="conditions" type="primaryQuery" list="yes">Which jobs is the server interested in.</input>
-                       <input name="history" type="xsd:boolean">Data on jobs stored at PS in the past are required.</input>
-                       <input name="continuous" type="xsd:boolean">Data on jobs that will arrive in future are required.</input>
-                       <output name="feedId" type="xsd:string">Unique ID of the created feed session.</output>
-                       <output name="feedExpires" type="xsd:dateTime">When the session expires.</output>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="FeedIndexRefresh">
-                       Refresh an existing feed session.
-                       <input name="feedId" type="xsd:string">Existing feed session ID to be refreshed.</input>
-                       <output name="feedExpires" type="xsd:dateTime">New session expiration time.</output>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       
-               <op name="GetJobFiles">
-                       Return URL's of files for a given single job.
-                       <input name="jobid" type="xsd:string">The job.</input>
-                       <output name="files" type="jppsFile" list="yes" optional="yes">List of the stored files.</output>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-
-               <op name="GetJobAttributes">
-                       Query concrete attributes of a given job.
-                       <input name="jobid" type="xsd:string">The job.</input>
-                       <input name="attributes" type="xsd:string" list="yes">Which attributes should be retrieved.</input>
-                       <output name="attrValues" type="attrValue">Values of the queried attributes.</output>
-                       <fault name="genericFault" type="genericFault">Any error.</fault>
-               </op>
-       </operations>
-
-</service>
diff --git a/org.glite.jp.ws-interface/src/JobProvenanceTypes.xml b/org.glite.jp.ws-interface/src/JobProvenanceTypes.xml
deleted file mode 100644 (file)
index 49d3bf6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<service name="JobProvenanceTypes"
-       ns="http://glite.org/wsdl/services/jp"
-       typePrefix="jpt">
-
-       <version>CVS revision: <![CDATA[ $Header$ ]]></version>
-
-       <types ns="http://glite.org/wsdl/types/jp">
-
-               <enum name="queryOp">
-                       Operators used in queries. Most are self-explanatory.
-                       <val name="EQUAL"></val>
-                       <val name="UNEQUAL"></val>
-                       <val name="LESS"></val>
-                       <val name="GREATER"></val>
-                       <val name="WITHIN">The attribute is between two specified values.</val>
-               </enum>
-
-               <struct name="tagValue">
-                       A single user-recorded value for a job attribute.
-                       <elem name="name" type="xsd:string">Name of the attribute, including namespace.</elem>
-                       <elem name="value" type="xsd:string" optional="yes">Value - printable string.</elem>
-               </struct>
-       
-               <struct name="genericFault" fault="yes">
-                       <elem name="source" type="xsd:string"></elem>
-                       <elem name="code" type="xsd:int"></elem>
-                       <elem name="text" type="xsd:string"></elem>
-                       <elem name="description" type="xsd:string" optional="yes"></elem>
-                       <elem name="reason" type="genericFault" optional="yes"></elem>
-               </struct>
-       
-               <struct name="primaryQuery">
-                       A single condition on job.
-                       <elem name="attr" type="xsd:string">Attribute name to query.</elem>
-                       <elem name="op" type="queryOp">Operation.</elem>
-                       <elem name="origin" type="attrOrig" optional="yes">Where the attribute value came from.</elem>
-                       <elem name="value" type="stringOrBlob">Value to compare the job attribute with.</elem>
-                       <elem name="value2" type="stringOrBlob" optional="yes">Another value (for op = WITHIN).</elem>
-               </struct>
-
-               <struct name="jppsFile">
-                       JP primary storage file identification.
-                       <elem name="class" type="xsd:string">Type of the file (as set on StartUpload).</elem>
-                       <elem name="name" type="xsd:string">Name of the file (if there are more of the same type per job).</elem>
-                       <elem name="url" type="xsd:string">Where the file is stored on JP primary storage.</elem>
-               </struct>
-
-               <struct name="attrValue">
-                       Single value of an attribute.
-                       <elem name="name" type="xsd:string">Name of the attribute, including namespace.</elem>
-                       <elem name="value" type="stringOrBlob" optional="yes">String value.</elem>
-                       <elem name="timestamp" type="xsd:dateTime">When this value was recorded.</elem>
-                       <elem name="origin" type="attrOrig">Where this value came from.</elem>
-                       <elem name="originDetail" type="xsd:string" optional="yes"></elem>
-               </struct>
-
-               <choice name="stringOrBlob">
-                       <elem name="string" type="xsd:string">String value.</elem>
-                       <elem name="blob" type="xsd:base64Binary">Binary value.</elem>
-               </choice>
-
-               <enum name="attrOrig">
-                       Specification of attribute origin.
-                       <val name="SYSTEM">JP system value, e.g. job owner.</val>
-                       <val name="USER">Explicitely stored by the user via RecordTag operation.</val>
-                       <val name="FILE">Coming from uploaded file.</val>
-               </enum>
-       
-               <list name="string"/>
-       </types>
-
-</service>
-
diff --git a/org.glite.jp.ws-interface/src/doc.xml b/org.glite.jp.ws-interface/src/doc.xml
deleted file mode 100644 (file)
index 78cb6a5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<book/>
diff --git a/org.glite.jp.ws-interface/src/puke-ug.xsl b/org.glite.jp.ws-interface/src/puke-ug.xsl
deleted file mode 100644 (file)
index ff70ccf..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Header$ -->
-
-<xsl:stylesheet version="1.0"
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output indent="yes" doctype-public="-//OASIS//DTD DocBook XML V4.4//EN"
-      doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"/>
-
-<xsl:template match="book">
-       <chapter>
-               <title><xsl:value-of select="document('JobProvenancePS.xml')/service/@name"/></title>
-
-               <sect1>
-                       <title>Overview</title>
-                       <xsl:copy-of select="document('JobProvenancePS.xml')/service/doc/*"/>
-               </sect1>
-
-               <sect1>
-                       <title>Operations</title>
-                       <para> <emphasis><xsl:value-of select="document('JobProvenancePS.xml')/service/version"/></emphasis> </para>
-                               <!-- xsl:apply-templates select="operations/op" -->
-                               <xsl:apply-templates select="document('JobProvenancePS.xml')/service/operations/op">
-                                       <xsl:sort select="@name"/>
-                               </xsl:apply-templates>
-               </sect1>
-       
-               <sect1>
-                       <title>Types</title>
-                       <!--xsl:apply-templates select="types"/ -->
-                       <para> <emphasis><xsl:value-of select="document('JobProvenanceTypes.xml')/service/version"/></emphasis> </para>
-                       <xsl:apply-templates select="document('JobProvenanceTypes.xml')/service/types"/>
-               </sect1>
-       </chapter>
-</xsl:template>
-
-
-<xsl:template match="input|output|fault">
-       <varlistentry>
-               <term>
-                       <!--type-->
-                               <xsl:if test = "@list = 'yes'">list of </xsl:if>
-                               <xsl:choose>
-                                       <xsl:when test="not(starts-with(@type,'xsd:'))">
-                                               <link linkend="type:{@type}">
-                                                       <type><xsl:value-of select="@type "/> </type> </link>
-                                       </xsl:when>
-                                       <xsl:otherwise><type><xsl:value-of select="@type "/> </type> </xsl:otherwise>
-                               </xsl:choose>
-                       <!--/type-->
-                       <parameter> <xsl:value-of select=" @name"/></parameter>
-               </term>
-               <listitem>
-                       <simpara><xsl:value-of select="text()"/></simpara>
-               </listitem>
-       </varlistentry>
-</xsl:template>
-
-<xsl:template match="op" >
-       <sect2 id="op:{@name}">
-               <title><xsl:value-of select="@name"/></title>
-               <para><xsl:value-of select="text()"/></para>
-               <para>
-                       Inputs:
-                       <xsl:choose>
-                               <xsl:when test="count(./input)>0">
-                                       <variablelist>
-                                               <xsl:apply-templates select="./input"/>
-                                       </variablelist>
-                               </xsl:when>
-                               <xsl:otherwise>N/A</xsl:otherwise>
-                       </xsl:choose>
-               </para>
-               <para>
-                       Outputs:
-                       <xsl:choose>
-                               <xsl:when test="count(./output)>0">
-                                       <variablelist>
-                               <xsl:apply-templates select="./output"/>
-                                       </variablelist>
-                               </xsl:when>
-                               <xsl:otherwise>N/A</xsl:otherwise>
-                       </xsl:choose>
-               </para>
-       </sect2>
-</xsl:template>
-
-<xsl:template match="types">
-       <xsl:for-each select="flags|enum|struct|choice">
-               <xsl:sort select="@name"/>
-               <sect2 id="type:{@name}">
-                       <title> <xsl:value-of select="@name"/> </title>
-                       <para> <xsl:value-of select="text()"/> </para>
-                       <xsl:choose>
-                               <xsl:when test="name(.)='struct'">
-                                       <para> <emphasis>Structure</emphasis> (sequence complex type in WSDL)</para>
-                                       <para> Fields: ( <type>type </type> <structfield>name</structfield> description )</para>
-                               </xsl:when>
-                               <xsl:when test="name(.)='choice'">
-                                       <para> <emphasis>Union</emphasis> (choice complex type in WSDL)</para>
-                                       <para> Fields: ( <type>type </type> <structfield>name</structfield> description )</para>
-                               </xsl:when>
-                               <xsl:when test="name(.)='enum'">
-                                       <para> <emphasis>Enumeration</emphasis> (restriction of xsd:string in WSDL),
-                                               exactly one of the values must be specified.
-                                       </para>
-                                       <para> Values: </para>
-                               </xsl:when>
-                               <xsl:when test="name(.)='flags'">
-                                       <para> <emphasis>Flags</emphasis> (sequence of restricted xsd:string in WSDL),
-                                               any number of values can be specified together.
-                                       </para>
-                                       <para> Values: </para>
-                               </xsl:when>
-                       </xsl:choose>
-                       <variablelist>
-                               <xsl:for-each select="elem|val">
-                                       <varlistentry>
-                                               <term>
-                                                       <xsl:choose>
-                                                               <xsl:when test="name(.)='elem'">
-                                                                               <xsl:if test="@list = 'yes'">list of </xsl:if>
-                                                                               <xsl:choose>
-                                                                                       <xsl:when test="@type!='string' and @type!='int' and not(starts-with(@type,'xsd:'))">
-                                                                                               <link linkend="type:{@type}">
-                                                                                                       <type><xsl:value-of select="@type "/> </type>
-                                                                                               </link>
-                                                                                       </xsl:when>
-                                                                                       <xsl:otherwise><type><xsl:value-of select="@type "/></type></xsl:otherwise>
-                                                                               </xsl:choose>
-                                                                       <!-- <type><xsl:value-of select="@type"/></type> -->
-                                                                       <xsl:value-of select="' '"/>
-                                                                       <structfield><xsl:value-of select="@name"/></structfield>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <constant><xsl:value-of select="@name"/></constant>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </term>
-                                               <listitem>
-                                                       <simpara>
-                                                               <xsl:if test="@optional = 'yes'"> (optional) </xsl:if>
-                                                               <!-- <xsl:if test="@list = 'yes'"> (multiple occurence) </xsl:if> -->
-                                                               <xsl:value-of select=" text()"/>
-                                                       </simpara>
-                                               </listitem>
-                                       </varlistentry>
-                               </xsl:for-each>
-                       </variablelist>
-               </sect2>
-       </xsl:for-each>
-</xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/org.glite.jp.ws-interface/src/puke-wsdl.xsl b/org.glite.jp.ws-interface/src/puke-wsdl.xsl
deleted file mode 100644 (file)
index ea7598e..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0"
-       xmlns="http://schemas.xmlsoap.org/wsdl/"
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-
-       xmlns:jp="http://glite.org/wsdl/services/jp"
-       xmlns:jpe="http://glite.org/wsdl/elements/jp"
-       xmlns:jpt="http://glite.org/wsdl/types/jp">
-
-<xsl:output indent="yes"/>
-
-<xsl:template match="/service">
-       <definitions
-               xmlns="http://schemas.xmlsoap.org/wsdl/"
-               name="{@name}"
-               targetNamespace="{@ns}">
-       <documentation>
-                       <xsl:value-of select="version"/>
-                       <xsl:value-of select="text()"/> 
-               </documentation>
-
-               <xsl:apply-templates select="import"/>
-
-               <xsl:apply-templates select="types"/>
-               
-<!--           <xsl:apply-templates select="fault"/> -->
-
-               <xsl:apply-templates select="operations"/>
-               
-       </definitions>
-</xsl:template>
-
-<xsl:template match="types">
-       <wsdl:types>
-               <xsd:schema targetNamespace="{@ns}"
-                       elementFormDefault="unqualified"
-                       attributeFormDefault="unqualified">
-
-                       <xsl:apply-templates/>
-               </xsd:schema>
-       </wsdl:types>
-       <!-- <xsl:apply-templates select="struct[@fault='yes']" mode="message"/> -->
-</xsl:template>
-
-<!--
-<xsl:template match="simple">
-       <xsd:element name="{@name}" type="xsd:{@name}"/>
-       <xsd:complexType name="{@name}List">
-               <xsd:sequence>
-                       <xsd:element name="{@name}" type="xsd:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
-               </xsd:sequence>
-       </xsd:complexType>
-       <xsd:element name="{@name}List" type="{/service/@typePrefix}:{@name}List"/>
-</xsl:template>
-
-<xsl:template match="list">
-       <xsd:complexType name="{@name}List">
-               <xsd:sequence>
-                       <xsd:element name="{@name}" type="xsd:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
-               </xsd:sequence>
-       </xsd:complexType>
-</xsl:template>
--->
-
-<xsl:template match="enum">
-       <xsd:simpleType name="{@name}">
-               <xsd:restriction base="xsd:string">
-                       <xsl:for-each select="val"><xsd:enumeration value="{@name}"/></xsl:for-each>
-               </xsd:restriction>
-       </xsd:simpleType>
-<!--   <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/> -->
-</xsl:template>
-
-<xsl:template match="flags">
-       <xsd:simpleType name="{@name}Value">
-               <xsd:restriction base="xsd:string">
-                       <xsl:for-each select="val"><xsd:enumeration value="{@name}"/></xsl:for-each>
-               </xsd:restriction>
-       </xsd:simpleType>
-       <xsd:complexType name="{@name}">
-               <xsd:sequence>
-                       <xsd:element name="flag" type="{/service/@typePrefix}:{@name}Value" minOccurs="0" maxOccurs="unbounded"/>
-               </xsd:sequence>
-       </xsd:complexType>
-<!--   <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/> -->
-</xsl:template>
-
-<xsl:template match="struct">
-       <xsd:complexType name="{@name}">
-               <xsd:sequence>
-                       <xsl:call-template name="inner-struct"/>
-               </xsd:sequence>
-       </xsd:complexType>
-</xsl:template>
-
-<xsl:template match="choice">
-       <xsd:complexType name="{@name}">
-               <xsd:choice>
-                       <xsl:call-template name="inner-struct"/>
-               </xsd:choice>
-       </xsd:complexType>
-</xsl:template>
-
-
-<xsl:template name="inner-struct">
-       <xsl:variable name="nillable">
-               <xsl:choose>
-                       <xsl:when test="local-name(.)='choice'">true</xsl:when>
-                       <xsl:otherwise>false</xsl:otherwise>
-               </xsl:choose>
-       </xsl:variable>
-                       <xsl:for-each select="elem">
-                               <xsl:variable name="type">
-                                       <xsl:choose>
-                                               <xsl:when test="contains(@type,':')">
-                                                       <xsl:value-of select="@type"/>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:value-of select="/service/@typePrefix"/>:<xsl:value-of select="@type"/>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:variable>
-                               <xsl:variable name="min">
-                                       <xsl:choose>
-                                               <xsl:when test="@optional='yes'">0</xsl:when>
-                                               <xsl:otherwise>1</xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:variable>
-                               <xsl:variable name="max">
-                                       <xsl:choose>
-                                               <xsl:when test="@list='yes'">unbounded</xsl:when>
-                                               <xsl:otherwise>1</xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:variable>
-                               <xsd:element name="{@name}" type="{$type}" minOccurs="{$min}" maxOccurs="{$max}" nillable="{$nillable}"/>
-                       </xsl:for-each>
-<!--
-       <xsd:complexType name="{@name}List">
-               <xsd:sequence>
-                       <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}" minOccurs="0" maxOccurs="unbounded"></xsd:element>
-               </xsd:sequence>
-       </xsd:complexType>
-       <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/>
-       <xsd:element name="{@name}List" type="{/service/@typePrefix}:{@name}List"/>
--->
-</xsl:template>
-
-<xsl:template match="op" mode="message">
-       <wsdl:message name="{@name}Request">
-               <wsdl:part name="input" element="{/service/@elemPrefix}:{@name}">
-                       <wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
-               </wsdl:part>
-       </wsdl:message>
-       <wsdl:message name="{@name}Response">
-               <wsdl:part name="output" element="{/service/@elemPrefix}:{@name}Response">
-                       <wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
-               </wsdl:part>
-       </wsdl:message>
-</xsl:template>
-
-<xsl:template match="op" mode="element">
-       <xsd:element name="{@name}">
-               <xsd:complexType>
-                       <xsd:sequence>
-                               <xsl:for-each select="input">
-                                       <xsl:variable name="prefix">
-                                               <xsl:choose>
-                                                       <xsl:when test="starts-with(@type,'xsd:')"/>
-                                                       <xsl:otherwise><xsl:value-of select="/service/@typePrefix"/>:</xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:variable>
-                                       <xsl:variable name="max">
-                                               <xsl:choose>
-                                                       <xsl:when test="@list='yes'">unbounded</xsl:when>
-                                                       <xsl:otherwise>1</xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:variable>
-                                       <xsd:element name="{@name}" type="{$prefix}{@type}" minOccurs="1" maxOccurs="{$max}"/>
-                               </xsl:for-each>
-                       </xsd:sequence>
-               </xsd:complexType>
-       </xsd:element>
-       <xsd:element name="{@name}Response">
-               <xsd:complexType>
-                       <xsd:sequence>
-                               <xsl:for-each select="output">
-                                       <xsl:variable name="prefix">
-                                               <xsl:choose>
-                                                       <xsl:when test="starts-with(@type,'xsd:')"/>
-                                                       <xsl:otherwise><xsl:value-of select="/service/@typePrefix"/>:</xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:variable>
-                                       <xsl:variable name="max">
-                                               <xsl:choose>
-                                                       <xsl:when test="@list='yes'">unbounded</xsl:when>
-                                                       <xsl:otherwise>1</xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:variable>
-                                       <xsd:element name="{@name}" type="{$prefix}{@type}" minOccurs="1" maxOccurs="{$max}"/>
-                               </xsl:for-each>
-                       </xsd:sequence>
-               </xsd:complexType>
-       </xsd:element>
-</xsl:template>
-
-
-<xsl:template match="struct[@fault='yes']" mode="message">
-       <wsdl:message name="{@name}">
-               <wsdl:part name="{@name}" element="{/service/@typePrefix}:{@name}">
-                       <wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
-               </wsdl:part>
-       </wsdl:message>
-</xsl:template>
-
-<xsl:template match="op" mode="port-type">
-       <wsdl:operation name="{@name}">
-               <wsdl:documentation><xsl:value-of select="text()"/></wsdl:documentation>
-               <wsdl:input name="i" message="{/service/@prefix}:{@name}Request"/>
-               <wsdl:output name="o" message="{/service/@prefix}:{@name}Response"/>
-               <wsdl:fault name="f" message="{/service/@prefix}:{fault/@name}"/>
-       </wsdl:operation>
-</xsl:template>
-
-<xsl:template match="op" mode="binding">
-       <wsdl:operation name="{@name}">
-               <soap:operation style="document"/>
-               <wsdl:input name="i">
-                       <soap:body use="literal"/>
-               </wsdl:input>
-               <wsdl:output name="o">
-                       <soap:body use="literal"/>
-               </wsdl:output>
-               <wsdl:fault name="f">
-                       <soap:fault name="f" use="literal"/>
-               </wsdl:fault>
-       </wsdl:operation>
-</xsl:template>
-
-<xsl:template match="import">
-       <wsdl:import namespace="{@namespace}" location="{@location}"/>
-</xsl:template>
-
-<xsl:template match="operations">
-       <wsdl:types>
-               <xsd:schema targetNamespace="{/service/@elemNs}"
-                       elementFormDefault="unqualified"
-                       attributeFormDefault="unqualified">
-
-                       <xsl:apply-templates select="op" mode="element"/>
-
-                       <xsl:for-each select="/service/fault">
-                               <xsd:element name="{@name}" type="{/service/@typePrefix}:{@name}"/>
-                       </xsl:for-each>
-               </xsd:schema>
-       </wsdl:types>
-
-               <xsl:apply-templates select="/service/fault"/>
-
-               <xsl:apply-templates select="op" mode="message"/>
-
-               <wsdl:portType name="{/service/@name}PortType">
-                       <xsl:apply-templates select="op" mode="port-type"/>
-               </wsdl:portType>
-
-               <binding name="{/service/@name}" type="{/service/@prefix}:{/service/@name}PortType">
-                       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-                       <xsl:apply-templates select="op" mode="binding"/>
-               </binding>
-
-               <service name="{/service/@name}">
-                       <documentation><xsl:value-of select="text()"/></documentation>
-                       <port name="{/service/@name}" binding="{/service/@prefix}:{/service/@name}">
-                               <soap:address location="http://test.glite.org/{/service/@prefix}:8080"/>
-                       </port>
-
-               </service>
-
-</xsl:template>
-
-<xsl:template match="fault">
-       <wsdl:message name="{@name}">
-               <wsdl:part name="{@name}" element="{/service/@elemPrefix}:{@name}" />
-       </wsdl:message>
-</xsl:template>
-
-
-</xsl:stylesheet>
-
diff --git a/org.glite.jp/.cvsignore b/org.glite.jp/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp/build.xml b/org.glite.jp/build.xml
deleted file mode 100644 (file)
index f51954b..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the GLite Middleware Job Provenance Subsystem
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.4  2004/12/17 20:26:46  dimeglio
-       Removed index
-       
-       Revision 1.3  2004/12/10 09:46:41  akrenek
-       included ws-interface
-       
-       Revision 1.2  2004/12/01 18:36:00  zsalvet
-       Add component targets.
-       
-       Revision 1.1  2004/11/22 13:21:49  dimeglio
-       First version of this file
-       
--->
-
-<project name="jp" default="dist">
-
-       <description>
-               Ant build file to build the GLite Job Provenance Subsystem
-       </description>
-               
-       <!-- =========================================
-                Builds the GLite JP subsystem
-            ========================================= -->
-
-       <!-- Import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- Import subsystem build properties, 
-                             subsystem properties & 
-                             subsystem common properties -->
-       <import file="./project/properties.xml" />
-
-       <!-- Import global build properties and global properties -->
-       <import file="${global.properties.file}" />
-                               
-       <!-- =========================================
-                Load dependencies properties files (order is important) 
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${subsystem.dependencies.file}"/>
-       <property file="${global.dependencies.file}"/>  
-
-       <!-- =========================================
-                 Load configure options
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-                       
-       <!-- =========================================
-                Import global task definitions
-            ========================================= -->
-       <import file="${global.taskdefs.file}" />
-       
-       <!-- =========================================
-            Import global compiler definitions
-            ========================================= -->
-       <import file="${global.compilerdefs.file}" />
-               
-       <!-- =========================================
-                Import targets 
-            ========================================= -->
-       <import file="${global.targets-common.file}"/>
-       
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
-                       
-       <!-- ===============================================
-                 Public common targets
-            =============================================== -->
-
-       <target name="localinit" depends="envcheck">
-
-               <echo> Preparing directories ... </echo>
-               
-               <mkdir dir="${stage.bin.dir}" />
-               <mkdir dir="${stage.lib.dir}" />
-               <mkdir dir="${stage.java.dir}" />
-               <mkdir dir="${stage.inc.dir}" />
-               <mkdir dir="${stage.int.dir}" />
-
-               <mkdir dir="${dist.dir}" />
-
-       </target>
-
-       <target name="init" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="init"/>
-               </antcall>
-       </target>
-
-       <target name="checkstyle" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="checkstyle"/>
-               </antcall>
-       </target>
-
-       <target name="compile" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="compile"/>
-               </antcall>
-       </target>
-
-       <target name="compiletest" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="compiletest"/>
-               </antcall>
-       </target>
-
-       <target name="unittest" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="unittest"/>
-               </antcall>
-       </target>
-
-       <target name="unitcoverage" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="unitcoverage"/>
-               </antcall>
-       </target>
-
-       <target name="stage" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="stage"/>
-               </antcall>
-       </target>
-
-       <target name="dist" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="dist"/>
-               </antcall>
-       </target>
-
-       <target name="install" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="install"/>
-               </antcall>
-       </target>
-
-       <target name="doc" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="doc"/>
-               </antcall>
-       </target>
-
-       <target name="all" depends="localinit">
-               <antcall target="buildmodules">
-                       <param name="target" value="all"/>
-               </antcall>
-       </target>
-
-       <target name="clean" depends="envcheck">
-
-               <property name="offline.repository" value="true" />
-               <antcall target="buildmodules">
-                       <param name="target" value="clean"/>
-               </antcall>
-
-               <delete dir="${module.bin.dir}" />
-               <delete dir="${module.lib.dir}" />
-               <delete dir="${module.autosrc.dir}" />
-               <delete dir="${module.autodoc.dir}" />
-               <delete dir="${module.test.reports.dir}" />
-
-       </target>
-
-       <target name="cleanAll" depends="clean"/>
-
-       <!-- ===============================================
-                Private targets
-            =============================================== -->
-
-       <!-- ===============================================
-                Modules proxy targets
-            =============================================== -->
-
-       <!-- component targets definitions tag = do not remove = -->
-
-       <target name="ws-interface" unless="setenvonly" depends="envset" >
-               <if>
-                       <isset property="small.memory" />
-                       <then>
-                               <exec dir="${jp.subsystem.dir}.ws-interface" executable="${antExec}" failonerror="${failonerror}">
-                                       <arg line="${target} &quot;-Dsmall.memory=true&quot; &quot;-Dbootstrap=${bootstrap}&quot; &quot;-Dfailonerror=${failonerror}&quot; &quot;-Ddo.cvs.tag=${do.cvs.tag}&quot;"/>
-                               </exec>
-                       </then>
-                       <else>
-                               <ant dir="${jp.subsystem.dir}.ws-interface"
-                                       target="${target}"
-                                       inheritall="false" />
-                       </else>
-               </if>
-       </target>
-
-       <target name="common" unless="setenvonly" depends="envset" >
-               <if>
-                       <isset property="small.memory" />
-                       <then>
-                               <exec dir="${jp.subsystem.dir}.common" executable="${antExec}" failonerror="${failonerror}">
-                                       <arg line="${target} &quot;-Dsmall.memory=true&quot; &quot;-Dbootstrap=${bootstrap}&quot; &quot;-Dfailonerror=${failonerror}&quot; &quot;-Ddo.cvs.tag=${do.cvs.tag}&quot;"/>
-                               </exec>
-                       </then>
-                       <else>
-                               <ant dir="${jp.subsystem.dir}.common"
-                                       target="${target}"
-                                       inheritall="false" />
-                       </else>
-               </if>
-       </target>
-
-       <target name="index" unless="setenvonly" depends="envset, common" >
-               <if>
-                       <isset property="small.memory" />
-                       <then>
-                               <exec dir="${jp.subsystem.dir}.index" executable="${antExec}" failonerror="${failonerror}">
-                                       <arg line="${target} &quot;-Dsmall.memory=true&quot; &quot;-Dbootstrap=${bootstrap}&quot; &quot;-Dfailonerror=${failonerror}&quot; &quot;-Ddo.cvs.tag=${do.cvs.tag}&quot;"/>
-                               </exec>
-                       </then>
-                       <else>
-                               <ant dir="${jp.subsystem.dir}.index"
-                                       target="${target}"
-                                       inheritall="false" />
-                       </else>
-               </if>
-       </target>
-
-       <target name="primary" unless="setenvonly" depends="envset, ws-interface, common" >
-               <if>
-                       <isset property="small.memory" />
-                       <then>
-                               <exec dir="${jp.subsystem.dir}.primary" executable="${antExec}" failonerror="${failonerror}">
-                                       <arg line="${target} &quot;-Dsmall.memory=true&quot; &quot;-Dbootstrap=${bootstrap}&quot; &quot;-Dfailonerror=${failonerror}&quot; &quot;-Ddo.cvs.tag=${do.cvs.tag}&quot;"/>
-                               </exec>
-                       </then>
-                       <else>
-                               <ant dir="${jp.subsystem.dir}.primary"
-                                       target="${target}"
-                                       inheritall="false" />
-                       </else>
-               </if>
-       </target>
-
-       <!-- Main proxy -->
-       <target name="buildmodules" depends="envset,
-                                               ws-interface,
-                                               common,
-                                               primary">
-               <echo append="true" file="${global.project.dir}/cruisecontrol-stub.xml">
-       &lt;project name="${subsystem.name}" type="post-subsystem" packageName="${global.prefix}-${subsystem.prefix}"/&gt;
-               </echo>
-       </target>
-
-</project>
diff --git a/org.glite.jp/project/build.number b/org.glite.jp/project/build.number
deleted file mode 100644 (file)
index c680c72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module.build=36
diff --git a/org.glite.jp/project/build.properties b/org.glite.jp/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp/project/dependencies.properties b/org.glite.jp/project/dependencies.properties
deleted file mode 100644 (file)
index ab3b83f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-###################################################################
-# System dependencies
-###################################################################
-
-org.glite.version              = HEAD
-org.glite.jp.version           = HEAD
-
-# Component dependencies tag = do not remove this line =
-org.glite.jp.ws-interface.version      = HEAD
-org.glite.jp.common.version    = HEAD
-org.glite.jp.index.version     = HEAD
-org.glite.jp.primary.version   = HEAD
diff --git a/org.glite.jp/project/glite.jp.csf.xml b/org.glite.jp/project/glite.jp.csf.xml
deleted file mode 100644 (file)
index fd68f71..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-<?xml version="1.0"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       GLite Middleware Job Provenance Configuration Specification File
-       
-       Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>  
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/12/01 18:24:25  zsalvet
-       common, index, and primary components defined
-       
-       Revision 1.1  2004/11/22 13:21:49  dimeglio
-       First version of this file
-       
--->
-
-
-<project name="GLite Middleware JP CSF" default="all">
-
-       <!-- ===============================================
-                 Determine workspace directory 
-            =============================================== -->
-
-       <!-- Relative workspace root directory -->
-       <property name="workspace.dir" value="../.." />
-       
-       <!-- ===============================================
-                Load properties
-            =============================================== -->
-
-       <!-- load baseline and user properties -->
-       <import file="${workspace.dir}/org.glite/project/baseline.properties.xml" />
-
-       <!-- define build properties file location since we are already in project dir -->
-       <property name="subsystem.build.properties.file" value="./build.properties" />
-
-       <!-- Load subsystem-specific property file -->
-       <property file="./properties.xml"/>
-
-       <!-- load global properties -->
-       <import file="${global.properties.file}" />
-
-       <!-- ===============================================
-                Load dependencies 
-            =============================================== -->
-
-       <!-- Load user dependencies file -->
-       <property file="${user.dependencies.file}" />
-               
-       <!-- Load subsystem dependencies file -->
-       <property file="./dependencies.properties" />
-
-       <!-- Load global dependencies file -->
-       <property file="${global.dependencies.file}" />
-
-       <!-- ===============================================
-                Load targets
-                =============================================== -->
-       <import file="${global.targets-envchecks.file}" />
-       <import file="${global.targets-external-dependencies.file}" />  
-
-       <!-- ===============================================
-                Evaluate CVS tags
-                =============================================== -->
-
-       <target name="evaluate.cvs.tags" description="Figure out if we need tagged CVS checkout">
-               
-               <condition property="glite.head">
-                       <and>
-                               <equals arg1="${org.glite.version}" arg2="HEAD" />
-                               <or>
-                                       <istrue value="${update}" />
-                                       <not>
-                                               <available file="${global.dependencies.file}" type="file" />
-                                       </not>
-                               </or>
-                       </and>
-               </condition>
-               
-               <condition property="glite.tag">
-                       <and>
-                               <not>
-                                       <equals arg1="${org.glite.version}" arg2="HEAD" />
-                               </not>
-                               <or>
-                                       <istrue value="${update}" />
-                                       <not>
-                                               <available file="${global.dependencies.file}" type="file" />
-                                       </not>
-                               </or>
-                       </and>
-               </condition>
-               
-               <condition property="glite-jp.head">
-                       <and>
-                               <equals arg1="${org.glite.jp.version}" arg2="HEAD" />
-                               <istrue value="${update}" />
-                       </and>
-               </condition>
-               
-               <condition property="glite-jp.tag">
-                       <and>
-                               <not>
-                                       <equals arg1="${org.glite.jp.version}" arg2="HEAD" />
-                               </not>
-                               <istrue value="${update}" />
-                       </and>
-               </condition>
-
-               <!-- condition property tag = do not remove = -->
-
-               <condition property="common.head">
-                       <equals arg1="${org.glite.jp.common.version}" arg2="HEAD" />
-               </condition>
-
-               <condition property="ws-interface.head">
-                       <equals arg1="${org.glite.jp.ws-interface.version}" arg2="HEAD" />
-               </condition>
-
-               <condition property="index.head">
-                       <equals arg1="${org.glite.jp.index.version}" arg2="HEAD" />
-               </condition>
-
-               <condition property="primary.head">
-                       <equals arg1="${org.glite.jp.primary.version}" arg2="HEAD" />
-               </condition>
-
-       </target>
-
-       <presetdef name="cvs-co">
-               <cvs command="checkout" dest="${workspace.dir}" />
-       </presetdef>
-
-       <!-- =====================================================
-                Self-update if required
-            ===================================================== -->
-
-       <!-- Update main GLite module -->
-       <target name="org.glite" depends="get.glite.head, get.glite.tag"/>
-
-       <target name="get.glite.head" if="glite.head">
-               <cvs-co package="org.glite" />
-       </target>
-
-       <target name="get.glite.tag" if="glite.tag">
-               <cvs-co package="org.glite"
-                       tag="${org.glite.version}" />
-       </target>
-
-       <!-- Update the current module -->
-       <target name="org.glite.jp" depends="get.glite-jp.head, 
-                                                               get.glite-jp.tag"/>
-
-       <target name="get.glite-jp.head" if="glite-jp.head">
-               <cvs-co package="org.glite.jp" />
-               <fail>The org.glite and org.glite.jp modules have been updated, please rerun the configuration file</fail>
-       </target>
-
-       <target name="get.glite-jp.tag" if="glite-jp.tag">
-               <cvs-co package="org.glite.jp"
-                       tag="${org.glite.jp.version}" />
-               <fail>The org.glite and org.glite.jp modules have been updated, please rerun the configuration file</fail>
-       </target>
-
-       <!-- *****************************************************-->
-       <!-- Development tools                                    -->
-       <!-- *****************************************************-->
-       
-       <!-- All development tools -->
-       <target name="devtools" depends="oscheck,
-                                        junitcheck,
-                                        junit,
-                                        chkstyle,
-                                        jalopy,
-                                        ant-contrib,
-                                        cpptasks,
-                     log4j,
-                                        egee-ant-ext"
-               description="Get development tools into repository."/>          
-
-       <!-- =====================================================
-                External libraries
-            ===================================================== -->
-       
-       <!--  All external libraries -->
-       <target name="external" 
-               description="Install external packages" depends="oscheck"/>
-       
-       <!-- =====================================================
-                GLite Middleware jp modules
-            ===================================================== -->
-       
-       <!-- component targets tag = do not remove = -->
-
-       <!-- ws-interface -->
-       <target name="ws-interface" depends="evaluate.cvs.tags, get.ws-interface.head, get.ws-interface.tag"/>
-       <target name="get.ws-interface.head" if="ws-interface.head">
-               <cvs-co package="org.glite.jp.ws-interface" />
-       </target>
-       <target name="get.ws-interface.tag" unless="ws-interface.head">
-               <cvs-co package="org.glite.jp.ws-interface"
-                       tag="${org.glite.jp.ws-interface.version}" />
-       </target>
-
-       <!-- common -->
-       <target name="common" depends="evaluate.cvs.tags, get.common.head, get.common.tag"/>
-       <target name="get.common.head" if="common.head">
-               <cvs-co package="org.glite.jp.common" />
-       </target>
-       <target name="get.common.tag" unless="common.head">
-               <cvs-co package="org.glite.jp.common"
-                       tag="${org.glite.jp.common.version}" />
-       </target>
-
-       <!-- index -->
-       <target name="index" depends="evaluate.cvs.tags, get.index.head, get.index.tag"/>
-       <target name="get.index.head" if="index.head">
-               <cvs-co package="org.glite.jp.index" />
-       </target>
-       <target name="get.index.tag" unless="index.head">
-               <cvs-co package="org.glite.jp.index"
-                       tag="${org.glite.jp.index.version}" />
-       </target>
-       
-       <!-- primary -->
-       <target name="primary" depends="evaluate.cvs.tags, get.primary.head, get.primary.tag"/>
-       <target name="get.primary.head" if="primary.head">
-               <cvs-co package="org.glite.jp.primary" />
-       </target>
-       <target name="get.primary.tag" unless="primary.head">
-               <cvs-co package="org.glite.jp.primary"
-                       tag="${org.glite.jp.primary.version}" />
-       </target>
-
-       <!-- All project modules -->
-       <target name="project" depends="ws-interface,
-                                       common,
-                                       index,
-                                       primary" />
-    
-       <!-- ====================================================
-                Checkout all
-            ==================================================== -->
-               
-       <!-- All libraries -->
-       <target name="all" depends="oscheck,
-                                       evaluate.cvs.tags,
-                                       defaultenvchecks,
-                                       org.glite,
-                                       org.glite.jp,
-                                       devtools,
-                                       external,
-                                       project" />             
-
-       <!-- ====================================================
-                Print dependecies to console
-            ==================================================== -->
-       
-       <target name="dependencies">
-               <concat>
-                       <fileset dir="." includes="dependencies.properties" />
-               </concat>
-       </target>               
-
-</project>
diff --git a/org.glite.jp/project/properties.xml b/org.glite.jp/project/properties.xml
deleted file mode 100755 (executable)
index 276cf76..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP modules
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-                        Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
--->
-
-<project name="Job Provenance subsystem common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property name="subsystem.build.properties.file" value="./project/build.properties" />
-       <property file="${subsystem.build.properties.file}" />  
-
-       <!-- ======================================================
-          Define subsystem properties
-                ====================================================== -->
-       
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-       
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-       
-       <!-- ======================================================
-          Define general subsystem properties
-                ====================================================== -->
-               
-       <!-- Include common subsystem properties -->
-       <import file="${subsystem.general.properties.file}" />
-       
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                       
-               
-</project>
diff --git a/org.glite.jp/project/run-workspace b/org.glite.jp/project/run-workspace
deleted file mode 100644 (file)
index a5d1f54..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-cd ../..
-
-cvs co org.glite
-cvs co org.glite.jp
-                                                                                                                                                             
-cd org.glite.jp/project
-ant -f glite.jp.csf.xml
-
diff --git a/org.glite.jp/project/taskdefs.xml b/org.glite.jp/project/taskdefs.xml
deleted file mode 100755 (executable)
index c4cc889..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common Ant task definition file for the gLite Job Provenance modules
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-                        Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
--->
-
-<project name="Job Provenance subsystem common tasks and types definitions">
-       
-       <!-- ======================================================
-                Subsystem task definitions
-                ====================================================== -->
-       
-</project>
\ No newline at end of file
diff --git a/org.glite.jp/project/version.properties b/org.glite.jp/project/version.properties
deleted file mode 100644 (file)
index cd1e9e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module.version=1.0.0
-module.age=1
index 0ef0eb2..707ed52 100644 (file)
@@ -1,3 +1,3 @@
 #Thu May 19 13:15:52 CEST 2005
-module.version=2.0.0
+module.version=2.0.1
 module.age=1
index 7d24851..448aac0 100644 (file)
@@ -66,18 +66,55 @@ int edg_wll_log_proto_handle_gss_failures(edg_wll_Context context, int code, edg
 }
 
 
-static edg_wll_Context tmp_context;
-static edg_wll_PlainConnection *tmp_conn;
+static int
+read_il_data_thr(char **buffer, 
+            int (*reader)(char *, const int,edg_wll_Context,void *),edg_wll_Context ctx,void *conn)
+{
+  char buf[17];
+  int ret, len;
+
+  /* read 17 byte header */
+  len = (*reader)(buf, 17,ctx,conn);
+  if(len < 0) {
+    goto err;
+  }
+  buf[16] = 0;
+  if((len=atoi(buf)) <= 0) {
+    len = -1;
+    goto err;
+  }
+
+  /* allocate room for the body */
+  *buffer = malloc(len+1);
+  if(*buffer == NULL) {
+    len = -1;
+    goto err;
+  }
+
+  /* read body */
+  ret = (*reader)(*buffer, len,ctx,conn);
+  if(ret < 0) {
+    free(*buffer);
+    *buffer = NULL;
+    len = ret;
+    goto err;
+  }
+
+  (*buffer)[len] = 0;
+
+ err:
+  return(len);
+}
 
 static 
 int
-plain_reader(char *buffer, int max_len)
+plain_reader(char *buffer, int max_len,edg_wll_Context ctx,void *conn)
 {
        int len;
 
-       len = edg_wll_plain_read_full(tmp_conn, buffer, max_len, &tmp_context->p_tmp_timeout);
+       len = edg_wll_plain_read_full(conn, buffer, max_len, &ctx->p_tmp_timeout);
        if(len < 0) 
-               edg_wll_SetError(tmp_context, LB_PROTO, "get_reply_plain(): error reading message data");
+               edg_wll_SetError(ctx, LB_PROTO, "get_reply_plain(): error reading message data");
 
        return(len);
 }
@@ -98,9 +135,7 @@ get_reply_plain(edg_wll_Context context, edg_wll_PlainConnection *conn, char **b
        int len, code;
 
        code = 0;
-       tmp_context = context;
-       tmp_conn = conn;
-       len = read_il_data(&msg, plain_reader);
+       len = read_il_data_thr(&msg, plain_reader,context,conn);
        if(len < 0)
                goto get_reply_plain_end;
 
@@ -116,20 +151,18 @@ get_reply_plain_end:
 }
 
 
-static edg_wll_GssConnection *tmp_gss_conn;
-
 static 
 int
-gss_reader(char *buffer, int max_len)
+gss_reader(char *buffer, int max_len,edg_wll_Context ctx,void *conn)
 {
        int ret, len;
        edg_wll_GssStatus gss_code;
 
-       ret = edg_wll_gss_read_full(tmp_gss_conn, buffer, max_len, &tmp_context->p_tmp_timeout,
+       ret = edg_wll_gss_read_full(conn, buffer, max_len, &ctx->p_tmp_timeout,
                                    &len, &gss_code);
        if(ret < 0) {
-               edg_wll_log_proto_handle_gss_failures(tmp_context, ret, &gss_code, "edg_wll_gss_read_full");
-               edg_wll_UpdateError(tmp_context, LB_PROTO, "get_reply_gss(): error reading message");
+               edg_wll_log_proto_handle_gss_failures(ctx, ret, &gss_code, "edg_wll_gss_read_full");
+               edg_wll_UpdateError(ctx, LB_PROTO, "get_reply_gss(): error reading message");
        }
 
        return(ret);
@@ -143,9 +176,7 @@ get_reply_gss(edg_wll_Context context, edg_wll_GssConnection *conn, char **buf,
        char *msg;
        int code;
 
-       tmp_context = context;
-       tmp_gss_conn = conn;
-       code = read_il_data(&msg, gss_reader);
+       code = read_il_data_thr(&msg, gss_reader,context, conn);
        if(code < 0)
                goto get_reply_gss_end;
 
index 27c71fd..bd6905c 100644 (file)
@@ -127,7 +127,7 @@ static int edg_wll_DoLogEvent(
        if ((answer = edg_wll_gss_connect(cred,
                        context->p_destination, context->p_dest_port, 
                        &context->p_tmp_timeout, &con, &gss_stat)) < 0) {
-               edg_wll_log_proto_handle_gss_failures(context,answer,&gss_stat,"edg_wll_gss_connect()");
+               answer = edg_wll_log_proto_handle_gss_failures(context,answer,&gss_stat,"edg_wll_gss_connect()");
                goto edg_wll_DoLogEvent_end;
        }
 
@@ -274,7 +274,7 @@ static int edg_wll_DoLogEventDirect(
 #endif
        if ((answer = edg_wll_gss_connect(cred,host,port,
                        &context->p_tmp_timeout, &con, &gss_stat)) < 0) {
-               edg_wll_log_proto_handle_gss_failures(context,answer,&gss_stat,"edg_wll_gss_connect()");
+               answer = edg_wll_log_proto_handle_gss_failures(context,answer,&gss_stat,"edg_wll_gss_connect()");
                goto edg_wll_DoLogEventDirect_end;
        }
 
index ad6ec55..c25d98c 100644 (file)
@@ -1,3 +1,3 @@
 #Thu May 19 13:15:32 CEST 2005
-module.version=2.0.0
+module.version=2.0.1
 module.age=1
index a9e3fff..8c6e973 100644 (file)
@@ -7,15 +7,18 @@
 #include <unistd.h>
 #include <stdlib.h>
 
+#define IL_PROTOCOL_MAGIC_WORD "michal"
+
 int 
 encode_il_msg(char **buffer, const char *event)
 {
   int len;
   char *p;
+  char *protocol_magic_word = IL_PROTOCOL_MAGIC_WORD;
 
 
   /* allocate enough room to hold the message */
-  len = 17 + len_string((char*)event);
+  len = 17 + len_string(protocol_magic_word) + len_string((char*)event);
   if((*buffer = malloc(len)) == NULL) {
     return(-1);
   }
@@ -27,6 +30,7 @@ encode_il_msg(char **buffer, const char *event)
   p += 17;
 
   /* write rest of the message */
+  p = put_string(p, protocol_magic_word);
   p = put_string(p, (char*)event);
 
   return(p - *buffer);
@@ -59,8 +63,21 @@ int
 decode_il_msg(char **event, const char *buf)
 {
   char *p;
+  char *protocol_magic_word=NULL;
+  int magic_word_check_failed = 0;
+
+  /* First check that the protocol 'magic' word is there */
+  p = get_string((char*)buf, &protocol_magic_word);
+  if (protocol_magic_word) {
+    if (strcmp (protocol_magic_word, IL_PROTOCOL_MAGIC_WORD) != 0) {
+      magic_word_check_failed = 1;
+    }
+    free(protocol_magic_word);
+  }
+
+  if (magic_word_check_failed != 0) return (-1);
 
-  p = get_string((char*)buf, event);
+  p = get_string(p, event);
   if(p == NULL) {
     if(*event) { free(*event); *event = NULL; };
     return(-1);
index 6748bdb..230b6f1 100644 (file)
@@ -28,7 +28,7 @@ public:
        }
 
        void testEncodeMsg() {
-               CPPUNIT_ASSERT_EQUAL(len_msg, 26);
+               CPPUNIT_ASSERT_EQUAL(len_msg, 35);
                CPPUNIT_ASSERT(buffer_msg != NULL);
                CPPUNIT_ASSERT(!strncmp(buffer_msg, msg, len_msg));
        }
@@ -68,9 +68,9 @@ public:
                char *s;
 
                l = read_il_data(&s, test_reader);
-               CPPUNIT_ASSERT_EQUAL(l, 9);
+               CPPUNIT_ASSERT_EQUAL(l, 18);
                CPPUNIT_ASSERT(s != NULL);
-               CPPUNIT_ASSERT(!strcmp(s, "6 zprava\n"));
+               CPPUNIT_ASSERT(!strcmp(s, "6 michal\n6 zprava\n"));
                free(s);
        }
 
@@ -87,7 +87,7 @@ private:
        }
 };
 
-const char *IlMsgTest::msg = "               9\n6 zprava\n";
+const char *IlMsgTest::msg = "              18\n6 michal\n6 zprava\n";
 const char *IlMsgTest::rep = "              14\n10\n20\n5 chyba\n";
 int IlMsgTest::pos;
 
index b993122..f2e2528 100644 (file)
@@ -1,3 +1,3 @@
 #Thu May 19 13:16:38 CEST 2005
-module.version=1.1.1
+module.version=1.1.2
 module.age=1
index a1ce060..adbcd6b 100644 (file)
@@ -36,7 +36,11 @@ GSOAP_FILES_PREFIX:= bk_ws_
 YACC=bison -y
 CC=gcc
 
-VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/project
+ifeq ($(gsoap_version),2.7.0)
+       VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/project:${gsoap_prefix}
+else
+       VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/project
+endif
 AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
 
 TEST_LIBS:=-L${cppunit}/lib -lcppunit
@@ -56,7 +60,7 @@ CFLAGS:= \
        -I${top_srcdir}/interface \
        -I${expat_prefix}/include \
        -I${ares_prefix}/include \
-       -I${gsoap_prefix}/include \
+       -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
        ${COVERAGE_FLAGS} \
        -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql \
        -I${globus_prefix}/include/${nothrflavour} \
@@ -77,6 +81,12 @@ GLOBUS_LIBS:= -L${globus_prefix}/lib \
        -lglobus_common_${nothrflavour} \
        -lglobus_gssapi_gsi_${nothrflavour} \
 
+ifeq ($(shell ls ${gsoap_prefix}/bin/soapcpp2),${gsoap_prefix}/bin/soapcpp2)
+       gsoap_bin_prefix := ${gsoap_prefix}/bin
+else
+       gsoap_bin_prefix := ${gsoap_prefix}
+endif
+
 ifneq (${mysql_prefix},/usr)
        ifeq ($(shell echo ${mysql_version} | cut -d. -f1,2),4.1)
                mysqlib := -L${mysql_prefix}/lib/mysql
@@ -115,20 +125,33 @@ BKSERVER_BASE_OBJS:= \
        lb_xml_parse_V21.o \
        lock.o openserver.o query.o userjobs.o db_store.o request.o store.o \
        stored_master.o srv_purge.o server_state.o dump.o lb_authz.o load.o \
-       notification.o il_notification.o notif_match.o stats.o
+       notification.o il_notification.o notif_match.o stats.o 
 
 ifeq ($(GLITE_LB_SERVER_WITH_WS),yes)
-       BKSERVER_OBJS:= \
-               ${BKSERVER_BASE_OBJS} \
-               ${GSOAP_FILES_PREFIX}C.o ${GSOAP_FILES_PREFIX}Server.o \
-               ws_query.o ws_fault.o ws_typeref.o 
-
-       BKSERVER_LIBS= \
-               ${SRVBONES_LIB} \
-               -lglite_lb_common_${nothrflavour} \
-               -L${gsoap_prefix}/lib -lgsoap \
-               -lglite_security_gsoap_plugin_${nothrflavour} \
-               ${EXT_LIBS}
+       ifeq ($(gsoap_version),2.7.0)
+               BKSERVER_OBJS:= \
+                       ${BKSERVER_BASE_OBJS} \
+                       ${GSOAP_FILES_PREFIX}C.o ${GSOAP_FILES_PREFIX}Server.o \
+                       ws_query.o ws_fault.o ws_typeref.o stdsoap2.o
+
+               BKSERVER_LIBS= \
+                       ${SRVBONES_LIB} \
+                       -lglite_lb_common_${nothrflavour} \
+                       -lglite_security_gsoap_plugin_${nothrflavour} \
+                       ${EXT_LIBS}
+       else
+               BKSERVER_OBJS:= \
+                       ${BKSERVER_BASE_OBJS} \
+                       ${GSOAP_FILES_PREFIX}C.o ${GSOAP_FILES_PREFIX}Server.o \
+                       ws_query.o ws_fault.o ws_typeref.o 
+
+               BKSERVER_LIBS= \
+                       ${SRVBONES_LIB} \
+                       -lglite_lb_common_${nothrflavour} \
+                       -L${gsoap_prefix}/lib -lgsoap \
+                       -lglite_security_gsoap_plugin_${nothrflavour} \
+                       ${EXT_LIBS}
+       endif
 else
        BKSERVER_OBJS:= ${BKSERVER_BASE_OBJS}
                
@@ -191,7 +214,7 @@ lb_xml_parse.c: lb_xml_parse.c.T
        chmod -w $@ >/dev/null
 
 ${GSOAP_FILES_PREFIX}H.h ${GSOAP_FILES_PREFIX}C.c ${GSOAP_FILES_PREFIX}Server.c ${GSOAP_FILES_PREFIX}Client.c ${GSOAP_FILES_PREFIX}ServerLib.c ${GSOAP_FILES_PREFIX}ClientLib.c LoggingAndBookkeeping.nsmap: LB.xh
-       ${gsoap_prefix}/bin/soapcpp2 -w -c -p ${GSOAP_FILES_PREFIX} LB.xh
+       ${gsoap_bin_prefix}/soapcpp2 -w -c -p ${GSOAP_FILES_PREFIX} LB.xh
 
 # try several times -- LB.wsdl downloads BaseFault.xsd from www.ibm.com which may be failing
 # not used right now but may be useful one day
@@ -203,7 +226,7 @@ ${GSOAP_FILES_PREFIX}H.h ${GSOAP_FILES_PREFIX}C.c ${GSOAP_FILES_PREFIX}Server.c
 
 LB.xh: ws_typemap.dat ${stagedir}/interface/LB.wsdl
        cp ${stagedir}/interface/LBTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h -c -t ${top_srcdir}/src/ws_typemap.dat -o $@ ${stagedir}/interface/LB.wsdl
+       ${gsoap_bin_prefix}/wsdl2h -c -t ${top_srcdir}/src/ws_typemap.dat -o $@ ${stagedir}/interface/LB.wsdl
        rm -f LBTypes.wsdl
 
 test.xml: test_xml
@@ -324,7 +347,7 @@ test_query_events.o: %.o: %.cpp
        ${COMPILE} -o $@ -c $<
 
 soap_version.h:
-       ${gsoap_prefix}/bin/soapcpp2 /dev/null
+       ${gsoap_bin_prefix}/soapcpp2 /dev/null
        perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@
        -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp
 
index ffe0fff..5e1b1da 100644 (file)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.7  2005/08/03 09:30:28  akrenek
+       Merged the release 1.0 branch
+       
        Revision 1.6  2005/01/21 11:27:44  jpospi
        completely remove gridsite.prefix and voms.prefix
        
@@ -85,6 +88,7 @@ mysql_prefix=${with.mysql.prefix}
 mysql_version=${ext.mysql.version}
 cppunit=${with.cppunit.prefix}
 gsoap_prefix=${with.gsoap.prefix}
+gsoap_version=${ext.gsoap.version}
                        </echo>
            </target>
        </project>
index 21bc091..142f24a 100644 (file)
@@ -1,3 +1,3 @@
 #Thu May 19 13:16:56 CEST 2005
-module.version=1.2.4
+module.version=1.2.5
 module.age=1
index 6d9ae2f..50e2ffb 100644 (file)
@@ -3,15 +3,25 @@
 # System dependencies
 ###################################################################
 
-org.glite.version                                              = HEAD
-org.glite.lb.version                                   = HEAD
+       
+
+       org.glite.version                               = glite_R_1_0_5
+       org.glite.lb.version                            = glite-lb_R_1_1_1
+               
+       org.glite.lb.client-interface.version                           = glite-lb-client-interface_R_2_0_0
+                               
+       org.glite.lb.ws-interface.version                               = glite-lb-ws-interface_R_2_0_0
+                               
+       org.glite.lb.common.version                             = glite-lb-common_R_2_0_1
+                               
+       org.glite.lb.client.version                             = glite-lb-client_R_2_0_1
+                               
+       org.glite.lb.server-bones.version                               = glite-lb-server-bones_R_2_0_0
+                               
+       org.glite.lb.logger.version                             = glite-lb-logger_R_1_1_2
+                               
+       org.glite.lb.server.version                             = glite-lb-server_R_1_2_5
+                               
+       org.glite.lb.proxy.version                              = glite-lb-proxy_R_1_1_1
+                               
 
-# Component dependencies tag = do not remove this line =
-org.glite.lb.client-interface.version  = HEAD
-org.glite.lb.ws-interface.version              = HEAD
-org.glite.lb.common.version                    = HEAD
-org.glite.lb.client.version                    = HEAD
-org.glite.lb.server.version                    = HEAD
-org.glite.lb.proxy.version                             = HEAD
-org.glite.lb.server-bones.version              = HEAD
-org.glite.lb.logger.version                    = HEAD
index 0f20f80..0670fcd 100644 (file)
@@ -1,3 +1,3 @@
 #Thu May 19 13:17:34 CEST 2005
-module.version=1.1.0
+module.version=1.1.1
 module.age=1
index 6fce5b1..4e33f8c 100644 (file)
@@ -14,6 +14,7 @@ globus_prefix=/opt/globus
 nothrflavour=gcc32
 thrflavour=gcc32pthr
 gsoap_prefix=/opt/gsoap
+gsplugin_version_checking=yes
 
 CC=gcc
 
@@ -21,7 +22,6 @@ CC=gcc
 -include ../Makefile.inc
 
 GSPLUGIN_DEBUG?=no
-GSPLUGIN_VERSION_CHECKING?=yes
 
 version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :`
 
@@ -30,7 +30,7 @@ VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples
 TEST_LIBS:=-L${cppunit}/lib -lcppunit
 TEST_INC:=-I${cppunit}/include
 
-ifeq ($(GSPLUGIN_DEBUG),yes)
+ifeq ($(gsplugin_version_checking),yes)
        DEBUG:=-g -O0 -Wall -DGSPLUGIN_DEBUG
 else
        DEBUG:=-g -O0 -Wall
@@ -67,6 +67,8 @@ GSOAP_LIBS:= -L${gsoap_prefix}/lib -lgsoap
 
 EX_LIBS:= ${GLOBUS_LIBS} -L${ares_prefix}/lib -lares
 
+PATCHED_GSOAP_SRC:=stdsoap2_2.6.2.c
+
 HDRS:=glite_gss.h glite_gsplugin.h
 
 GSS_OBJS:=glite_gss.o
@@ -199,6 +201,7 @@ install:
        cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/glite/security/
        if [ x${DOSTAGE} = xyes ]; then \
                install -m 644 ${GSS_STATICLIB} ${GSS_THRSTATICLIB} ${STATICLIB} ${THRSTATICLIB} ${PREFIX}/lib; \
+               install -m 644 ${top_srcdir}/src/${PATCHED_GSOAP_SRC} ${PREFIX}/lib; \
        fi
 
 clean:
index b93e59c..1a2fc90 100755 (executable)
@@ -76,7 +76,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
+        <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
index 466bbe2..7b9f931 100644 (file)
@@ -45,6 +45,7 @@ thrflavour=${with.globus.thr.flavor}
 nothrflavour=${with.globus.nothr.flavor}
 cppunit=${with.cppunit.prefix}
 gsoap_prefix=${with.gsoap.prefix}
+gsplugin_version_checking=${gsplugin.version.checking}
                        </echo>
            </target>
        </project>
index b69e5b7..52a743f 100644 (file)
@@ -1,3 +1,2 @@
-# 1.2 pushed after branching 1.1, no added functionality yet
-module.version=1.2.0
+module.version=1.1.1
 module.age=0
index 43a1aee..8eaf169 100644 (file)
@@ -211,6 +211,8 @@ glite_gsplugin_connect(
                fprintf(stderr, "Client connect will work only with gSOAP v2.7.0e and later");
                return ENOSYS;
        }
+#else
+# warning "gSOAP version checking is switched off!"
 #endif
 
        ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx;
diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c
new file mode 100644 (file)
index 0000000..78c4872
--- /dev/null
@@ -0,0 +1,11020 @@
+/*
+
+stdsoap2.c[pp] 2.6.2
+
+Runtime environment.
+
+gSOAP XML Web services tools
+Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
+
+Contributors:
+
+Wind River Systems, Inc., for the following additions (marked WR[...]):
+  - vxWorks compatible
+  - Support for IPv6.
+
+--------------------------------------------------------------------------------
+gSOAP public license.
+
+The contents of this file are subject to the gSOAP Public License Version 1.3
+(the "License"); you may not use this file except in compliance with the
+License. You may obtain a copy of the License at
+http://www.cs.fsu.edu/~engelen/soaplicense.html
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Robert A. van Engelen.
+Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
+--------------------------------------------------------------------------------
+GPL license.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+Author contact information:
+engelen@genivia.com / engelen@acm.org
+--------------------------------------------------------------------------------
+
+Installation note:
+
+Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
+To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
+tab (the project file needs to be selected in the file view) and add
+"wsock32.lib" to the "Object/library modules" entry
+
+*/
+
+#include "stdsoap2.h"
+
+#ifdef __cplusplus
+SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.6.2 2004-06-12 12:00:00 GMT")
+extern "C" {
+#else
+SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.6.2 2004-06-12 12:00:00 GMT")
+#endif
+
+/* 8bit character representing unknown/nonrepresentable character data (not supported by current locale) */
+#ifndef SOAP_UNKNOWN_CHAR
+#define SOAP_UNKNOWN_CHAR (127)
+#endif
+
+/*      EOF=-1 */
+#define LT (wchar)(-2) /* XML character '<' */
+#define TT (wchar)(-3) /* XML character '</' */
+#define GT (wchar)(-4) /* XML character '>' */
+#define QT (wchar)(-5) /* XML character '"' */
+#define AP (wchar)(-6) /* XML character ''' */
+
+#define soap_blank(c)          ((c) >= 0 && (c) <= 32)
+#define soap_notblank(c)       ((c) > 32)
+#define soap_hash_ptr(p)       (((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1))
+
+static int soap_isxdigit(int);
+static wchar soap_char(struct soap*);
+static wchar soap_getchunkchar(struct soap*);
+static void soap_update_ptrs(struct soap*, char*, char*, long);
+static int soap_has_copies(struct soap*, char*, char*);
+static struct soap_ilist *soap_hlookup(struct soap*, const char*);
+static void soap_init_iht(struct soap*);
+static void soap_free_iht(struct soap*);
+static void soap_init_pht(struct soap*);
+static void soap_free_pht(struct soap*);
+static int soap_set_error(struct soap*, const char*, const char*, const char*, int);
+static int soap_copy_fault(struct soap*, const char*, const char*, const char*);
+static int soap_getattrval(struct soap*, char*, size_t, wchar);
+static void soap_set_local_namespaces(struct soap*);
+static size_t soap_begin_dime(struct soap*);
+static int soap_isnumeric(struct soap*, const char*);
+static void *fplugin(struct soap*, const char*);
+
+#ifndef WITH_LEAN
+static time_t soap_timegm(struct tm*);
+static void soap_init_logs(struct soap*);
+static void soap_close_logfile(struct soap*, int);
+static void soap_set_logfile(struct soap*, int, const char*);
+#endif
+
+#ifdef WITH_FAST
+/* Use look-aside buffers */
+static int soap_append_lab(struct soap*, const char*, size_t);
+#endif
+
+#ifndef WITH_LEANER
+static int soap_putdimefield(struct soap*, const char*, size_t);
+static char *soap_getdimefield(struct soap*, size_t);
+#endif
+
+#ifdef WITH_GZIP
+static int soap_getgzipheader(struct soap*);
+#endif
+
+#ifdef WITH_OPENSSL
+static int ssl_auth_init(struct soap*);
+static int ssl_verify_callback(int, X509_STORE_CTX*);
+static int ssl_password(char*, int, int, void *);
+/* This callback is included for future references. It should not be deleted
+static DH *ssl_tmp_dh(SSL*, int, int);
+*/
+#endif
+
+static const char *soap_strerror(struct soap*);
+static const char *tcp_error(struct soap*);
+static const char *http_error(struct soap*, int);
+static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
+static int http_get(struct soap*);
+static int http_post_header(struct soap*, const char*, const char*);
+static int http_response(struct soap*, int, size_t);
+static int http_parse(struct soap*);
+static int http_parse_header(struct soap*, const char*, const char*);
+static int tcp_connect(struct soap*, const char*, const char*, int);
+static int tcp_accept(struct soap*, int, struct sockaddr*, int*);
+static int tcp_disconnect(struct soap*);
+static int fsend(struct soap*, const char*, size_t);
+static size_t frecv(struct soap*, char*, size_t);
+
+/* WR[ */
+#ifdef VXWORKS
+static int vx_nonblocking = TRUE; /* ioctl argument */
+#endif
+/* ]WR */
+
+#ifndef PALM_2
+static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/";
+static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/";
+static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope";
+static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding";
+static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc";
+#endif
+
+#ifndef PALM_1
+const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF};
+static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63";
+#endif
+
+static const char soap_padding[3] = "\0\0";
+#define SOAP_STR_PADDING (soap_padding)
+#define SOAP_STR_EOS (soap_padding)
+
+#ifndef WITH_LEAN
+static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */
+{ { 160, "nbsp" },
+  { 161, "iexcl" },
+  { 162, "cent" },
+  { 163, "pound" },
+  { 164, "curren" },
+  { 165, "yen" },
+  { 166, "brvbar" },
+  { 167, "sect" },
+  { 168, "uml" },
+  { 169, "copy" },
+  { 170, "ordf" },
+  { 171, "laquo" },
+  { 172, "not" },
+  { 173, "shy" },
+  { 174, "reg" },
+  { 175, "macr" },
+  { 176, "deg" },
+  { 177, "plusmn" },
+  { 178, "sup2" },
+  { 179, "sup3" },
+  { 180, "acute" },
+  { 181, "micro" },
+  { 182, "para" },
+  { 183, "middot" },
+  { 184, "cedil" },
+  { 185, "sup1" },
+  { 186, "ordm" },
+  { 187, "raquo" },
+  { 188, "frac14" },
+  { 189, "frac12" },
+  { 190, "frac34" },
+  { 191, "iquest" },
+  { 192, "Agrave" },
+  { 193, "Aacute" },
+  { 194, "Acirc" },
+  { 195, "Atilde" },
+  { 196, "Auml" },
+  { 197, "Aring" },
+  { 198, "AElig" },
+  { 199, "Ccedil" },
+  { 200, "Egrave" },
+  { 201, "Eacute" },
+  { 202, "Ecirc" },
+  { 203, "Euml" },
+  { 204, "Igrave" },
+  { 205, "Iacute" },
+  { 206, "Icirc" },
+  { 207, "Iuml" },
+  { 208, "ETH" },
+  { 209, "Ntilde" },
+  { 210, "Ograve" },
+  { 211, "Oacute" },
+  { 212, "Ocirc" },
+  { 213, "Otilde" },
+  { 214, "Ouml" },
+  { 215, "times" },
+  { 216, "Oslash" },
+  { 217, "Ugrave" },
+  { 218, "Uacute" },
+  { 219, "Ucirc" },
+  { 220, "Uuml" },
+  { 221, "Yacute" },
+  { 222, "THORN" },
+  { 223, "szlig" },
+  { 224, "agrave" },
+  { 225, "aacute" },
+  { 226, "acirc" },
+  { 227, "atilde" },
+  { 228, "auml" },
+  { 229, "aring" },
+  { 230, "aelig" },
+  { 231, "ccedil" },
+  { 232, "egrave" },
+  { 233, "eacute" },
+  { 234, "ecirc" },
+  { 235, "euml" },
+  { 236, "igrave" },
+  { 237, "iacute" },
+  { 238, "icirc" },
+  { 239, "iuml" },
+  { 240, "eth" },
+  { 241, "ntilde" },
+  { 242, "ograve" },
+  { 243, "oacute" },
+  { 244, "ocirc" },
+  { 245, "otilde" },
+  { 246, "ouml" },
+  { 247, "divide" },
+  { 248, "oslash" },
+  { 249, "ugrave" },
+  { 250, "uacute" },
+  { 251, "ucirc" },
+  { 252, "uuml" },
+  { 253, "yacute" },
+  { 254, "thorn" },
+  { 255, "yuml" },
+  {   0, NULL }
+};
+#endif
+
+#ifndef WITH_LEAN
+static const struct soap_code_map h_error_codes[] =
+{
+#ifdef HOST_NOT_FOUND   
+  { HOST_NOT_FOUND, "Host not found" },
+#endif
+#ifdef TRY_AGAIN
+  { TRY_AGAIN, "Try Again" },
+#endif
+#ifdef NO_RECOVERY  
+  { NO_RECOVERY, "No Recovery" },
+#endif
+#ifdef NO_DATA
+  { NO_DATA, "No Data" },
+#endif
+#ifdef NO_ADDRESS
+  { NO_ADDRESS, "No Address" },
+#endif
+  { 0, NULL }
+};
+#endif
+
+#ifndef WITH_LEAN
+static const struct soap_code_map h_http_error_codes[] =
+{ { 201, "Created" },
+  { 202, "Accepted" },
+  { 203, "Non-Authoritative Information" },
+  { 204, "No Content" },
+  { 205, "Reset Content" },
+  { 206, "Partial Content" },
+  { 300, "Multiple Choices" },
+  { 301, "Moved Permanently" },
+  { 302, "Found" },
+  { 303, "See Other" },
+  { 304, "Not Modified" },
+  { 305, "Use Proxy" },
+  { 307, "Temporary Redirect" },
+  { 400, "Bad Request" },
+  { 401, "Unauthorized" },
+  { 402, "Payment Required" },
+  { 403, "Forbidden" },
+  { 404, "Not Found" },
+  { 405, "Method Not Allowed" },
+  { 406, "Not Acceptable" },
+  { 407, "Proxy Authentication Required" },
+  { 408, "Request Time-out" },
+  { 409, "Conflict" },
+  { 410, "Gone" },
+  { 411, "Length Required" },
+  { 412, "Precondition Failed" },
+  { 413, "Request Entity Too Large" },
+  { 414, "Request-URI Too Large" },
+  { 415, "Unsupported Media Type" },
+  { 416, "Requested range not satisfiable" },
+  { 417, "Expectation Failed" },
+  { 500, "Internal Server Error" },
+  { 501, "Not Implemented" },
+  { 502, "Bad Gateway" },
+  { 503, "Service Unavailable" },
+  { 504, "Gateway Time-out" },
+  { 505, "HTTP Version not supported" },
+  {   0, NULL }
+};
+#endif
+
+#ifdef WITH_OPENSSL
+static const struct soap_code_map h_ssl_error_codes[] =
+{
+#define _SSL_ERROR(e) { e, #e }
+  _SSL_ERROR(SSL_ERROR_SSL),
+  _SSL_ERROR(SSL_ERROR_ZERO_RETURN),
+  _SSL_ERROR(SSL_ERROR_WANT_READ),
+  _SSL_ERROR(SSL_ERROR_WANT_WRITE),
+  _SSL_ERROR(SSL_ERROR_WANT_CONNECT),
+  _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP),
+  _SSL_ERROR(SSL_ERROR_SYSCALL),
+  { 0, NULL }
+};
+#endif
+
+#ifdef WIN32
+static int tcp_done = 0;
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static int
+fsend(struct soap *soap, const char *s, size_t n)
+{ register int nwritten;
+#if defined(__cplusplus) && !defined(UNDER_CE)
+  if (soap->os)
+  { soap->os->write(s, n);
+    if (soap->os->good())
+      return SOAP_OK;
+    return SOAP_EOF;
+  }
+#endif
+  while (n)
+  { if (soap_valid_socket(soap->socket))
+    { 
+#ifndef WITH_LEAN
+      if (soap->send_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->send_timeout > 0)
+        { timeout.tv_sec = soap->send_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->send_timeout/1000000;
+          timeout.tv_usec = -soap->send_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            return SOAP_EOF;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            return SOAP_EOF;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+        nwritten = SSL_write(soap->ssl, s, n);
+      else
+#endif
+#ifndef PALM
+        nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+#else
+        nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags);
+#endif
+      if (nwritten <= 0)
+      {
+#ifdef WITH_OPENSSL
+       int err;
+        if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return SOAP_EOF;
+#endif
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    else
+    {
+#ifdef WITH_FASTCGI
+      nwritten = fwrite((void*)s, 1, n, stdout);
+      fflush(stdout);
+#else
+#ifdef UNDER_CE
+      nwritten = fwrite(s, 1, n, soap->sendfd);
+#else
+/* WR[ */
+#ifdef VXWORKS
+#ifdef WMW_RPM_IO
+      if (soap->rpmreqid)
+          {
+          httpBlockPut(soap->rpmreqid, s, n); 
+          nwritten = n;
+          }
+      else
+          {
+          nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+          }
+#else
+      nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w"));
+#endif /* WMW_RPM_IO */
+#else
+/* ]WR */
+      nwritten = write((SOAP_SOCKET)soap->sendfd, s, n);
+/* WR[ */
+#endif
+/* ]WR */
+#endif
+#endif
+      if (nwritten <= 0)
+      { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_errno;
+          return SOAP_EOF;
+        }
+        nwritten = 0; /* and call write() again */
+      }
+    }
+    n -= nwritten;
+    s += nwritten;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush_raw(struct soap *soap, const char *s, size_t n)
+{ 
+#ifndef WITH_LEAN
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+  { char *t;
+    if (!(t = (char*)soap_push_block(soap, n)))
+      return soap->error = SOAP_EOM;
+    memcpy(t, s, n);
+    return SOAP_OK;
+  }
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+  { char t[16];
+    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
+    DBGMSG(SENT, t, strlen(t));
+    if ((soap->error = soap->fsend(soap, t, strlen(t))))
+      return soap->error;
+    soap->chunksize += n;
+  }
+#endif
+  DBGMSG(SENT, s, n);
+  return soap->error = soap->fsend(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_flush(struct soap *soap)
+{ if (soap->bufidx)
+  {
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { soap->d_stream.next_in = (Byte*)soap->buf;
+      soap->d_stream.avail_in = (unsigned int)soap->bufidx;
+#ifdef WITH_GZIP
+      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->bufidx);
+#endif
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in));
+        if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+          return soap->error = SOAP_ZLIB_ERROR;
+        }
+        if (!soap->d_stream.avail_out)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
+            return soap->error;
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (soap->d_stream.avail_in);
+    }
+    else
+#endif
+    if (soap_flush_raw(soap, soap->buf, soap->bufidx))
+      return soap->error;
+    soap->bufidx = 0;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_raw(struct soap *soap, const char *s, size_t n)
+{ if (!n)
+    return SOAP_OK;
+  if (soap->mode & SOAP_IO_LENGTH)
+  { soap->count += n;
+    if (soap->fprepare)
+      return soap->fprepare(soap, s, n);
+    return SOAP_OK;
+  }
+  if (soap->mode & SOAP_IO)
+  { register size_t i = SOAP_BUFLEN - soap->bufidx;
+    while (n >= i)
+    { memcpy(soap->buf + soap->bufidx, s, i);
+      soap->bufidx = SOAP_BUFLEN;
+      if (soap_flush(soap))
+        return soap->error;
+      s += i;
+      n -= i;
+      i = SOAP_BUFLEN;
+    }
+    memcpy(soap->buf + soap->bufidx, s, n);
+    soap->bufidx += n;
+    return SOAP_OK;
+  }
+  return soap_flush_raw(soap, s, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send(struct soap *soap, const char *s)
+{ if (s)
+    return soap_send_raw(soap, s, strlen(s));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static size_t
+frecv(struct soap *soap, char *s, size_t n)
+{ register int r;
+  soap->errnum = 0;
+#if defined(__cplusplus) && !defined(UNDER_CE)
+  if (soap->is)
+  { if (soap->is->good())
+      return soap->is->read(s, n).gcount();
+    return 0;
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      struct timeval timeout;
+      fd_set fd;
+      if (soap->recv_timeout)
+      { if (soap->recv_timeout > 0)
+        { timeout.tv_sec = soap->recv_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->recv_timeout/1000000;
+          timeout.tv_usec = -soap->recv_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        for (;;)
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+          if (r > 0)
+            break;
+          if (r == 0)
+            return 0;
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            return 0;
+          }
+        }
+      }
+#endif
+#ifdef WITH_OPENSSL
+      if (soap->ssl)
+      { int err;
+       r = SSL_read(soap->ssl, s, n);
+        if ((err = SSL_get_error(soap->ssl, r)) == SSL_ERROR_NONE)
+          return (size_t)r;
+       if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+          return 0;
+      }
+      else
+#endif
+      { r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags);
+        if (r >= 0)
+          return (size_t)r;
+        if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#ifndef WITH_LEAN
+      { struct timeval timeout;
+        fd_set fd;
+        timeout.tv_sec = 0;
+        timeout.tv_usec = 10000;
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->socket, &fd);
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+        if (r < 0 && soap_socket_errno != SOAP_EINTR)
+        { soap->errnum = soap_socket_errno;
+          return 0;
+        }
+      }
+#endif
+    }
+  }
+#ifdef WITH_FASTCGI
+  return fread(s, 1, n, stdin);
+#else
+#ifdef UNDER_CE
+  return fread(s, 1, n, soap->recvfd);
+#else
+/* WR[ */
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+      {
+      r = httpBlockRead(soap->rpmreqid, s, n);
+      }
+  else
+      {
+      r = read(soap->recvfd, s, n);
+      }
+  if (r >= 0)
+  {
+    return r;
+  }
+  return 0;
+#else
+/* ]WR */
+  r = read((SOAP_SOCKET)soap->recvfd, s, n);
+  if (r >= 0)
+    return (size_t)r;
+  soap->errnum = soap_errno;
+  return 0;
+/* WR[ */
+#endif
+/* ]WR */
+#endif
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static wchar
+soap_getchunkchar(struct soap *soap)
+{ if (soap->bufidx < soap->buflen)
+    return soap->buf[soap->bufidx++];
+  soap->bufidx = 0;
+  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)soap->buflen));
+  DBGMSG(RECV, soap->buf, soap->buflen);
+  if (soap->buflen)
+    return soap->buf[soap->bufidx++];
+  return EOF;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_isxdigit(int c)
+{ switch (c)
+  { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
+    case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+    case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+      return 1;
+  }
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_raw(struct soap *soap)
+{ register size_t ret;
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { if (soap->d_stream.next_out == Z_NULL)
+      return EOF;
+    if (soap->d_stream.avail_in || !soap->d_stream.avail_out)
+    { register int r;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n"));
+      soap->d_stream.next_out = (Byte*)soap->buf;
+      soap->d_stream.avail_out = SOAP_BUFLEN;
+      r = inflate(&soap->d_stream, Z_NO_FLUSH);
+      if (r == Z_OK || r == Z_STREAM_END)
+      { soap->bufidx = 0;
+        soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out;
+        if (soap->zlib_in == SOAP_ZLIB_GZIP)
+          soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+        if (r == Z_STREAM_END)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+          soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+          soap->d_stream.next_out = Z_NULL;
+        }
+        if (soap->buflen)
+        { soap->count += soap->buflen;
+          return SOAP_OK;
+        }
+      }
+      else if (r != Z_BUF_ERROR)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        soap->d_stream.next_out = Z_NULL;
+        return EOF;
+      }
+    }
+zlib_again:
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize)
+    { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+      soap->buflen = soap->z_buflen;
+    }
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */
+  { 
+chunk_again:
+    if (soap->chunksize)
+    { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret));
+      DBGMSG(RECV, soap->buf, ret);
+      soap->bufidx = 0;
+      soap->chunksize -= ret;
+    }
+    else
+    { register wchar c;
+      char tmp[8], *t;
+      t = tmp;
+      if (!soap->chunkbuflen)
+      { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret));
+        DBGMSG(RECV, soap->buf, ret);
+        soap->bufidx = 0;
+        if (!ret)
+          return EOF;
+      }
+      else
+        soap->bufidx = soap->buflen;
+      soap->buflen = soap->chunkbuflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (%u %u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen));
+      while (!soap_isxdigit((int)(c = soap_getchunkchar(soap))))
+        if ((int)c == EOF)
+         return EOF;
+      do
+        *t++ = (char)c;
+      while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7);
+      while ((int)c != EOF && c != '\n')
+        c = soap_getchunkchar(soap);
+      if ((int)c == EOF)
+        return EOF;
+      *t = '\0';
+      soap->chunksize = soap_strtoul(tmp, &t, 16);
+      if (!soap->chunksize)
+      { soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n"));
+       while ((int)c != EOF && c != '\n')
+          c = soap_getchunkchar(soap);
+        return EOF;
+      }
+      soap->buflen = soap->bufidx + soap->chunksize;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to %u (%u %s)\n", (unsigned int)soap->buflen, (unsigned int)soap->bufidx, tmp));
+      if (soap->buflen > soap->chunkbuflen)
+      { soap->buflen = soap->chunkbuflen;
+        soap->chunksize -= soap->buflen - soap->bufidx;
+        soap->chunkbuflen = 0;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%lu bytes left)\n", (unsigned long)(soap->buflen - soap->bufidx)));
+      }
+      else if (soap->chunkbuflen)
+        soap->chunksize = 0;
+      ret = soap->buflen - soap->bufidx;
+      if (!ret)
+        goto chunk_again;
+    }
+  }
+  else
+  { soap->bufidx = 0;
+    soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret));
+    DBGMSG(RECV, soap->buf, ret);
+  }
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { int r;
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = (unsigned int)ret;
+    soap->d_stream.next_out = (Byte*)soap->buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    r = inflate(&soap->d_stream, Z_NO_FLUSH);
+    if (r == Z_OK || r == Z_STREAM_END)
+    { soap->bufidx = 0;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out;
+      if (soap->zlib_in == SOAP_ZLIB_GZIP)
+        soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret));
+      if (!ret)
+        goto zlib_again;
+      if (r == Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+        soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out;
+        soap->d_stream.next_out = Z_NULL;
+      }
+    }
+    else
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:""));
+      soap->d_stream.next_out = Z_NULL;
+      return EOF;
+    }
+  }
+#endif
+  soap->count += ret;
+  return !ret;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap->dime_buflen)
+    { char *s;
+      int i;
+      unsigned char tmp[12];
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));
+      soap->count += soap->dime_buflen - soap->buflen;
+      soap->buflen = soap->dime_buflen;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime_size&3));
+      for (i = -(long)soap->dime_size&3; i > 0; i--)
+      { soap->bufidx++;
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));
+      s = (char*)tmp;
+      for (i = 12; i > 0; i--)
+      { *s++ = soap->buf[soap->bufidx++];
+        if (soap->bufidx >= soap->buflen)
+          if (soap_recv_raw(soap))
+            return EOF;
+      }
+      soap->dime_flags = tmp[0] & 0x7;
+      soap->dime_size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime_size));
+      if (soap->dime_flags & SOAP_DIME_CF)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));
+        soap->dime_chunksize = soap->dime_size;
+        if (soap->buflen - soap->bufidx >= soap->dime_size)
+        { soap->dime_buflen = soap->buflen;
+          soap->buflen = soap->bufidx + soap->dime_chunksize;
+        }
+        else
+          soap->dime_chunksize -= soap->buflen - soap->bufidx;
+      }
+      else
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));
+        soap->dime_buflen = 0;
+        soap->dime_chunksize = 0;
+      }
+      soap->count = soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+    if (soap->dime_chunksize)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime_chunksize));
+      if (soap_recv_raw(soap))
+        return EOF;
+      if (soap->buflen - soap->bufidx >= soap->dime_chunksize)
+      { soap->dime_buflen = soap->buflen;
+        soap->count -= soap->buflen - soap->bufidx - soap->dime_chunksize;
+        soap->buflen = soap->bufidx + soap->dime_chunksize;
+      }
+      else
+        soap->dime_chunksize -= soap->buflen - soap->bufidx;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));
+      return SOAP_OK;
+    }
+  }
+#endif
+  return soap_recv_raw(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+wchar
+SOAP_FMAC2
+soap_getchar(struct soap *soap)
+{ register wchar c;
+  if (soap->ahead)
+  { c = soap->ahead;
+    soap->ahead = 0;
+    return c;
+  }
+  return soap_get1(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const struct soap_code_map*
+SOAP_FMAC2
+soap_code(const struct soap_code_map *map, const char *str)
+{ while (map->string)
+  { if (!strcmp(str, map->string))
+      return map;
+    map++;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_int_code(const struct soap_code_map *map, const char *str, long other)
+{ while (map->string)
+  { if (!strcmp(str, map->string))
+      return map->code;
+    map++;
+  }
+  return other;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_str_code(const struct soap_code_map *map, long code)
+{ while (map->code != code && map->string)
+    map++;
+  return map->string;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static wchar
+soap_char(struct soap *soap)
+{ char tmp[8];
+  register int i;
+  register wchar c;
+  register char *s = tmp;
+  for (i = 0; i < 7; i++)
+  { c = soap_get1(soap);
+    if (c == ';' || (int)c == EOF)
+      break;
+    *s++ = (char)c;
+  }
+  *s = '\0';
+  if (*tmp == '#')
+  { if (tmp[1] == 'x' || tmp[1] == 'X')
+      return soap_strtol(tmp + 2, NULL, 16);
+    return atol(tmp + 1);
+  }
+  if (!strcmp(tmp, "lt"))
+    return '<';
+  if (!strcmp(tmp, "gt"))
+    return '>';
+  if (!strcmp(tmp, "amp"))
+    return '&';
+  if (!strcmp(tmp, "quot"))
+    return '"';
+  if (!strcmp(tmp, "apos"))
+    return '\'';
+#ifndef WITH_LEAN
+  return (wchar)soap_int_code(html_entity_codes, tmp, 127);
+#else
+  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+wchar
+SOAP_FMAC2
+soap_get(struct soap *soap)
+{ register wchar c;
+  c = soap->ahead;
+  if (c)
+    soap->ahead = 0;
+  else
+    c = soap_get1(soap);
+  for (;;)
+  { if (soap->cdata)
+    { if (c == ']')
+      { c = soap_get1(soap);
+        if (c == ']')
+        { soap->cdata = 0;
+          soap_get1(soap); /* skip > */
+          c = soap_get1(soap);
+        }
+       else
+        { soap_revget1(soap);
+          return ']';
+        }
+      }
+      else
+        return c;
+    }
+    switch (c)
+    { case '<':
+        do c = soap_get1(soap);
+        while (soap_blank(c));
+        if (c == '!' || c == '?' || c == '%')
+        { if (c == '!')
+          { c = soap_get1(soap);
+            if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                break;
+              soap->cdata = 1;
+              c = soap_get1(soap);
+             continue;
+            }
+            if (c == '-' && (c = soap_get1(soap)) == '-')
+            { do
+              { c = soap_get1(soap);
+                if (c == '-' && (c = soap_get1(soap)) == '-')
+                  break;
+              } while ((int)c != EOF);
+            }
+          }
+          while ((int)c != EOF && c != '>')
+            c = soap_get1(soap);
+         if ((int)c == EOF)
+           break;
+          c = soap_get1(soap);
+          continue;
+        }
+        if (c == '/')
+          return TT;
+        soap_revget1(soap);
+        return LT;
+      case '>':
+        return GT;
+      case '"':
+        return QT;
+      case '\'':
+        return AP;
+      case '&':
+        return soap_char(soap) | 0x80000000;
+    }
+    break;
+  }
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+wchar
+SOAP_FMAC2
+soap_advance(struct soap *soap)
+{ register wchar c;
+  while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT)
+    ;
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+wchar
+SOAP_FMAC2
+soap_skip(struct soap *soap)
+{ register wchar c;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  return c;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_move(struct soap *soap, long n)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
+  for (; n > 0; n--)
+    if ((int)soap_getchar(soap) == EOF)
+      return SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_tell(struct soap *soap)
+{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pututf8(struct soap *soap, register unsigned long c)
+{ char tmp[16];
+  if (c > 0 && c < 0x80)
+  { *tmp = (char)c;
+    return soap_send_raw(soap, tmp, 1);
+  }
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { register char *t = tmp;
+    if (c < 0x0800)
+      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+    else
+    { if (c < 0x010000)
+        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+      else
+      { if (c < 0x200000)
+          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+        else
+        { if (c < 0x04000000)
+            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+          else
+          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+          }
+          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+        }     
+        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+      }
+      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+    }
+    *t++ = (char)(0x80 | (c & 0x3F));
+    *t = '\0';
+  }
+  else
+#endif
+    sprintf(tmp, "&#%lu;", c);
+  return soap_send(soap, tmp);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+wchar
+SOAP_FMAC2
+soap_getutf8(struct soap *soap)
+{ register wchar c, c1, c2, c3, c4;
+  c = soap_get(soap);
+  if (c < 0x80)
+    return c;
+  c1 = soap_get(soap);
+  if (c1 < 0x80)
+  { soap_unget(soap, c1);
+    return c;
+  }
+  c1 &= 0x3F;
+  if (c < 0xE0)
+    return ((wchar)(c & 0x1F) << 6) | c1;
+  c2 = (wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF0)
+    return ((wchar)(c & 0x0F) << 12) | (c1 << 6) | c2;
+  c3 = (wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xF8)
+    return ((wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
+  c4 = (wchar)soap_get1(soap) & 0x3F;
+  if (c < 0xFC)
+    return ((wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
+  return ((wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (wchar)(soap_get1(soap) & 0x3F);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthex(struct soap *soap, const unsigned char *s, int n)
+{ /* TODO: serialize to DOM (as an option) using new soap_s2hex() */
+  char d[2];
+  register int i;
+  for (i = 0; i < n; i++)
+  { register int m = *s++;
+    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
+    m &= 0x0F;
+    d[1] = (char)(m + (m > 9 ? '7' : '0'));
+    if (soap_send_raw(soap, d, 2))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_gethex(struct soap *soap, int *n)
+{
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register char *s;
+    register int i, k;
+    if (soap_append_lab(soap, NULL, 0))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = soap->lablen - soap->labidx;
+    soap->labidx = soap->lablen;
+    for (i = 0; i < k; i++)
+    { register char d1, d2;
+      register wchar c;
+      c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+       if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = (int)(soap->lablen - k + i);
+        p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+       if (p)
+         memcpy(p, soap->labbuf, soap->lablen - k + i);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register char d1, d2;
+      register wchar c = soap_get(soap);
+      if (soap_isxdigit(c))
+      { d1 = (char)c;
+        c = soap_get(soap); 
+       if (soap_isxdigit(c))
+          d2 = (char)c;
+        else 
+        { soap_end_block(soap);
+         soap->error = SOAP_TYPE;
+          return NULL;
+        }
+      }
+      else
+      { unsigned char *p;
+        soap_unget(soap, c);
+        if (n)
+          *n = soap_size_block(soap, i);
+        p = (unsigned char*)soap_save_block(soap, NULL);
+        return p;
+      }
+      *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putbase64(struct soap *soap, const unsigned char *s, int n)
+{ register int i;
+  register unsigned long m;
+  char d[4];
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
+    return soap_s2base64(soap, s, soap->dom->data, n);
+  }
+#endif
+  if (!s)
+    return SOAP_OK;
+  for (; n > 2; n -= 3, s += 3)
+  { m = ((unsigned long)((unsigned char*)s)[0] << 16) | ((unsigned long)((unsigned char*)s)[1] << 8) | (unsigned long)((unsigned char*)s)[2];
+    for (i = 4; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      d[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      d[i] = '=';
+    if (soap_send_raw(soap, d, 4))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+unsigned char*
+SOAP_FMAC2
+soap_getbase64(struct soap *soap, int *n, int malloc_flag)
+{ 
+#ifdef WITH_FAST
+  soap->labidx = 0;
+  for (;;)
+  { register int i, k;
+    register char *s;
+    if (soap_append_lab(soap, NULL, 2))
+      return NULL;
+    s = soap->labbuf + soap->labidx;
+    k = 3 * ((soap->lablen - soap->labidx) / 3);
+    soap->labidx = 3 * (soap->lablen / 3);
+    if (!s)
+      return NULL;
+    for (i = 0; i < k; i += 3)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+            *n = (int)(soap->lablen - k + i);
+          p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i);
+         if (p)
+           memcpy(p, soap->labbuf, soap->lablen - k + i);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT)
+              ;
+         }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#else
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { register int i;
+    register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
+    if (!s)
+    { soap_end_block(soap);
+      return NULL;
+    }
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { register unsigned long m = 0;
+      register int j = 0;
+      do
+      { register wchar c = soap_get(soap);
+        if (c == '=' || c < 0)
+        { unsigned char *p;
+          i *= 3;
+          switch (j)
+          { case 2:
+              *s++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *s++ = (char)((m >> 10) & 0xFF);
+              *s++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+           *n = (int)soap_size_block(soap, i);
+          p = (unsigned char*)soap_save_block(soap, NULL);
+          if (c >= 0)
+          { while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT)
+              ;
+         }
+          soap_unget(soap, c);
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      } while (j < 4);
+      *s++ = (char)((m >> 16) & 0xFF);
+      *s++ = (char)((m >> 8) & 0xFF);
+      *s++ = (char)(m & 0xFF);
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_strdup(struct soap *soap, const char *s)
+{ char *t = NULL;
+  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
+    strcpy(t, s);
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_new_block(struct soap *soap)
+{ struct soap_blist *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist));
+  if (!(p = (struct soap_blist*)SOAP_MALLOC(sizeof(struct soap_blist))))
+    return SOAP_EOM;   
+  p->next = soap->blist; 
+  p->ptr = NULL;
+  p->size = 0;
+  soap->blist = p;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_push_block(struct soap *soap, size_t n)
+{ char *p;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size));
+  if (!(p = (char*)SOAP_MALLOC(n + sizeof(char*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  *(char**)p = soap->blist->ptr;
+  *(size_t*)(p + sizeof(char*)) = n;
+  soap->blist->ptr = p;
+  soap->blist->size += n;
+  return p + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_block(struct soap *soap)
+{ char *p;
+  if (!soap->blist->ptr)
+    return;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
+  p = soap->blist->ptr;
+  soap->blist->size -= *(size_t*)(p + sizeof(char*));
+  soap->blist->ptr = *(char**)p;
+  SOAP_FREE(p);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void
+soap_update_ptrs(struct soap *soap, char *start, char *end, long offset)
+{ int i;
+  register struct soap_ilist *ip;
+  register void *p, **q;
+  for (i = 0; i < SOAP_IDHASH; i++)
+    for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
+        ip->ptr = (char*)ip->ptr + offset;
+      for (q = &ip->link; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + offset;
+        }
+      }
+      for (q = &ip->copy; q; q = (void**)p)
+      { p = *q;
+        if (p && (char*)p >= start && (char*)p < end)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy update id='%s' %p\n", ip->id, p));
+          *q = (char*)p + offset;
+        }
+      }
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_has_copies(struct soap *soap, register char *start, register char *end)
+{ int i;
+  register struct soap_ilist *ip;
+  register char *p;
+  for (i = 0; i < SOAP_IDHASH; i++)
+    for (ip = soap->iht[i]; ip; ip = ip->next)
+      for (p = (char*)ip->copy; p; p = *(char**)p)
+        if (p >= start && p < end)
+          return SOAP_ERR;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_resolve(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip;
+  short flag1 = 0, flag2;
+  for (i = 0; i < SOAP_IDHASH; i++)
+    for (ip = soap->iht[i]; ip; ip = ip->next)
+    { if (ip->ptr)
+        soap_resolve_ptr(ip);
+      else if (*ip->id == '#')
+        flag1 = 1;
+    }
+  do
+  { flag2 = 0;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n"));
+    for (i = 0; i < SOAP_IDHASH; i++)
+      for (ip = soap->iht[i]; ip; ip = ip->next)
+        if (ip->copy && ip->ptr && ip->size)
+          if (!soap_has_copies(soap, (char*)ip->ptr, (char*)ip->ptr + ip->size))
+          { register void *p, **q = (void**)ip->copy;
+            DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
+            ip->copy = NULL;
+            do
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
+             p = *q;
+              memcpy(q, ip->ptr, ip->size);
+              q = (void**)p;
+            } while (q);
+           flag2 = 1;
+         }
+  } while (flag2);
+  for (i = 0; i < SOAP_IDHASH; i++)
+    for (ip = soap->iht[i]; ip; ip = ip->next)
+    { register struct soap_flist *fp;
+      for (fp = ip->flist; fp; fp = fp->next)
+        if (fp->finsert)
+        { unsigned int k = fp->level;
+         void *p = ip->ptr;
+          DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded container data type=%d location=%p level=%u,%u\n", fp->type, fp->ptr, ip->level, fp->level));
+         while (ip->level < k)
+          { void **q = (void**)soap_malloc(soap, sizeof(void*));  
+           if (!q)
+             return SOAP_EOM;
+           *q = p;
+            p = (void*)q;
+            k--;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+          }
+         fp->finsert(soap, fp->type, fp->ptr, p);
+        }
+    }
+  if (flag1)
+    return soap->error = SOAP_MISSING_ID;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_resolve_ptr(struct soap_ilist *ip)
+{ register void *p, **q, *r;
+  q = (void**)ip->link;
+  ip->link = NULL;
+  r = ip->ptr;
+  while (q)
+  { p = *q;
+    *q = r;
+    q = (void**)p;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_size_block(struct soap *soap, size_t n)
+{ if (soap->blist->ptr)
+  { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n;
+    *(size_t*)(soap->blist->ptr + sizeof(char*)) = n;
+  }
+  return soap->blist->size;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_first_block(struct soap *soap)
+{ char *p, *q, *r;
+  p = soap->blist->ptr;
+  if (!p)
+    return NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
+  r = NULL;
+  do
+  { q = *(char**)p;
+    *(char**)p = r;
+    r = p;
+    p = q;
+  } while (p);
+  soap->blist->ptr = r;
+  return r + sizeof(char*) + sizeof(size_t);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_next_block(struct soap *soap)
+{ char *p;
+  p = soap->blist->ptr;
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
+    soap->blist->ptr = *(char**)p;
+    SOAP_FREE(p);
+    if (soap->blist->ptr)
+      return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+size_t
+SOAP_FMAC2
+soap_block_size(struct soap *soap)
+{ return *(size_t*)(soap->blist->ptr + sizeof(char*));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end_block(struct soap *soap)
+{ struct soap_blist *bp;
+  char *p, *q;
+  bp = soap->blist;
+  if (bp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
+    for (p = bp->ptr; p; p = q)
+    { q = *(char**)p;
+      SOAP_FREE(p);
+    }
+    soap->blist = bp->next;
+    SOAP_FREE(bp);
+  }
+  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_save_block(struct soap *soap, char *p)
+{ register size_t n;
+  register char *q, *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p));
+  if (soap->blist->size)
+  { if (!p)
+      p = (char*)soap_malloc(soap, soap->blist->size);
+    if (p)
+      for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap))
+      { n = soap_block_size(soap);
+        soap_update_ptrs(soap, q, q + n, (long)s - (long)q); /* pointers s and q may or may not be related */
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
+        memcpy(s, q, n);
+        s += n;
+      } 
+    else
+      soap->error = SOAP_EOM;
+  }
+  soap_end_block(soap);
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_store_block(struct soap *soap, char *p)
+{ p = soap_save_block(soap, p);
+  if (!soap->blist)
+  { struct soap_ilist *ip;
+    int i;
+    for (i = 0; i < SOAP_IDHASH; i++)
+      for (ip = soap->iht[i]; ip; ip = ip->next)
+        if (ip->ptr)
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolve link chain to point to %p\n", ip->ptr));
+          soap_resolve_ptr(ip);
+        }
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsize(struct soap *soap, const char *type, int size)
+{ return soap_putsizes(soap, type, &size, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
+{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
+{ int i;
+  if (!type)
+    return NULL;
+  if (soap->version == 2)
+  { sprintf(soap->type, "%s[%d", type, size[0]);
+    for (i = 1; i < dim; i++)
+      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
+  }
+  else
+  { if (offset)
+    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
+    }
+    else
+    { sprintf(soap->type, "%s[%d", type, size[0]);
+      for (i = 1; i < dim; i++)
+        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
+    }
+    strcat(soap->type, "]");
+  }
+  return soap->type;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffset(struct soap *soap, int offset)
+{ return soap_putoffsets(soap, &offset, 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_putoffsets(struct soap *soap, const int *offset, int dim)
+{ register int i;
+  sprintf(soap->arrayOffset, "[%d", offset[0]);
+  for (i = 1; i < dim; i++)
+    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
+  strcat(soap->arrayOffset, "]");
+  return soap->arrayOffset;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_size(const int *size, int dim)
+{ register int i, n = size[0];
+  for (i = 1; i < dim; i++)
+    n *= size[i];
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
+{ register int i, j = 0;
+  if (offset)
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += offset[i] = (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  else
+    for (i = 0; i < dim && attr && *attr; i++)
+    { attr++;
+      j *= size[i];
+      j += (int)atol(attr);
+      attr = strchr(attr, ',');
+    }
+  return j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsize(const char *attr1, const char *attr2, int *j)
+{ register int n, k;
+  char *s;
+  *j = 0;
+  if (!*attr1)
+    return -1;
+  n = 1;
+  do
+  { attr1++;
+    k = (int)soap_strtol(attr1, &s, 10);
+    n *= k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
+      return -1;
+    attr1 = strchr(s, ',');
+    if (!attr1)
+      attr1 = strchr(s, ' ');
+    if (attr2 && *attr2)
+    { attr2++;
+      *j *= k;
+      k = (int)soap_strtol(attr2, &s, 10);
+      *j += k;
+      if (k < 0)
+        return -1;
+      attr2 = s;
+    }
+  } while (attr1 && *attr1 != ']');
+  return n - *j;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getsizes(const char *attr, int *size, int dim)
+{ register int i, k, n;
+  if (!*attr)
+    return -1;
+  i = strlen(attr);
+  n = 1;
+  do
+  { for (i = i-1; i >= 0; i--)
+      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
+        break;
+    k = (int)atol(attr + i + 1);
+    n *= size[--dim] = k;
+    if (k < 0 || n > SOAP_MAXARRAYSIZE)
+      return -1;
+  } while (i >= 0 && attr[i] != '[');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getposition(const char *attr, int *pos)
+{ register int i, n;
+  if (!*attr)
+    return -1;
+  n = 0;
+  i = 1;
+  do
+  { pos[n++] = (int)atol(attr + i);
+    while (attr[i] && attr[i] != ',' && attr[i] != ']')
+      i++;
+    if (attr[i] == ',')
+      i++;
+  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
+  return n;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_namespace(struct soap *soap, const char *id, const char *ns)
+{ register struct soap_nlist *np;
+  register struct Namespace *p;
+  np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + strlen(id));
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strcpy(np->id, id);
+  np->level = soap->level;
+  np->index = -1;
+  np->ns = NULL;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
+  p = soap->local_namespaces;
+  if (p)
+  { register short i = 0;
+    if (!strcmp(ns, soap_env1))
+      soap->version = 1; /* make sure we use SOAP 1.1 */
+    else if (!strcmp(ns, soap_env2))
+      soap->version = 2; /* make sure we use SOAP 1.2 */
+    else
+    { for (; p->id; p++, i++)
+      { if (p->ns)
+          if (!strcmp(ns, p->ns))
+            break;
+        if (p->in)
+          if (!soap_tag_cmp(ns, p->in))
+          { if (p->out)
+              SOAP_FREE(p->out);
+            if ((p->out = (char*)SOAP_MALLOC(strlen(ns) + 1)))
+              strcpy(p->out, ns);
+            break;
+          }
+      }
+    }
+    if (i == 0 && (!p->ns || strcmp(ns, p->ns)))
+    { if (p[0].out)
+        SOAP_FREE(p[0].out);
+      if ((p[0].out = (char*)SOAP_MALLOC(strlen(ns) + 1)))
+        strcpy(p[0].out, ns);
+      if (p[1].out)
+          SOAP_FREE(p[1].out);
+      if (soap->version == 1)
+      { if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1))))
+          strcpy(p[1].out, soap_enc1);
+      }
+      else if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc2))))
+        strcpy(p[1].out, soap_enc2);
+    }
+    if (p && p->id)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));
+      np->index = i;
+    }
+  }
+  if (!p || !p->id)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));
+    np->ns = (char*)SOAP_MALLOC(strlen(ns) + 1);
+    if (!np->ns)
+      return soap->error = SOAP_EOM;
+    strcpy(np->ns, ns);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_push_default_namespace(struct soap *soap, const char *id, int n)
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && np->index >= -1)
+    np = np->next;
+  if (np && (!strncmp(np->id, id, n) && !np->id[n]))
+    return SOAP_OK;
+  np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + n);
+  if (!np)
+    return soap->error = SOAP_EOM;
+  np->next = soap->nlist;
+  soap->nlist = np;
+  strncpy(np->id, id, n);
+  np->id[n] = '\0';
+  np->level = soap->level;
+  np->index = -2;
+  np->ns = NULL;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_pop_namespace(struct soap *soap)
+{ register struct soap_nlist *np;
+  while (soap->nlist && soap->nlist->level >= soap->level)
+  { np = soap->nlist->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id));
+    if (soap->nlist->ns)
+      SOAP_FREE(soap->nlist->ns);
+    SOAP_FREE(soap->nlist);
+    soap->nlist = np;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) 
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && (np->index == -2 || (strncmp(np->id, id1, n1) || np->id[n1])))
+    np = np->next;
+  if (np)
+  { if (np->index < 0 || (np->index >= 0 && soap->local_namespaces[np->index].id && (strncmp(soap->local_namespaces[np->index].id, id2, n2) || soap->local_namespaces[np->index].id[n2])))
+      return SOAP_NAMESPACE;
+    return SOAP_OK;
+  }
+  if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2))
+    return SOAP_OK;
+  return SOAP_SYNTAX_ERROR; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_default_namespace(struct soap *soap)
+{ register struct soap_nlist *np = soap->nlist;
+  while (np && np->index >= -1)
+    np = np->next;
+  if (np)
+    return np->id;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_tag_cmp(register const char *s, register const char *t)
+{ for (; *s && *s != '"'; s++, t++)
+    if (tolower(*s) != tolower(*t))
+      if (*t != '-')
+      { if (*t != '*')
+          return 1;
+        if (*++t)
+        { register int c = tolower(*t);
+          for (; *s && *s != '"'; s++)
+          { if (tolower(*s) == c)
+              if (!soap_tag_cmp(s + 1, t + 1))
+                return 0;
+          }
+          break;
+        }
+        else
+          return 0;
+      }
+  if (*t == '*' && !t[1])
+    return 0;
+  return *t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
+{ register const char *s, *t;
+  if (!tag1 || !tag2 || !*tag2)
+    return SOAP_OK;
+  s = strchr(tag1, ':');
+  t = strchr(tag2, ':');
+  if (t)
+  { if (s)
+    { if (SOAP_STRCMP(s + 1, t + 1))
+        return SOAP_TAG_MISMATCH;
+      if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+        return SOAP_TAG_MISMATCH;
+      }
+    } 
+    else if (SOAP_STRCMP(tag1, t + 1))
+      return SOAP_TAG_MISMATCH;
+    else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
+      return SOAP_TAG_MISMATCH;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
+    return SOAP_OK;
+  }
+  if (s)
+  { if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER && soap->encodingStyle))
+      return SOAP_TAG_MISMATCH;
+    if (SOAP_STRCMP(s + 1, tag2))
+      return SOAP_TAG_MISMATCH;
+    if (!soap->encodingStyle)
+    { t = soap_default_namespace(soap);
+      if (!t || soap_match_namespace(soap, tag1, t, s - tag1, strlen(t)))
+        return SOAP_TAG_MISMATCH;
+    }
+  }
+  else if (SOAP_STRCMP(tag1, tag2))
+    return SOAP_TAG_MISMATCH;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_match_array(struct soap *soap, const char *type)
+{ if (*soap->arrayType)
+    if (soap_match_tag(soap, soap->arrayType, type)
+     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
+     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
+    )
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
+      return SOAP_TAG_MISMATCH;
+    }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+
+#ifdef WITH_OPENSSL
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid)
+{ int err;
+  soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  if (dhfile)
+  { soap->dhfile = dhfile;
+    soap->rsa = 0;
+  }
+  else
+  { soap->dhfile = NULL;
+    soap->rsa = 1;
+  }
+  soap->randfile = randfile;
+  soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION);
+  if (!(err = soap->fsslauth(soap)))
+    if (sid)
+      SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid));
+  return err; 
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile)
+{ soap->keyfile = keyfile;
+  soap->password = password;
+  soap->cafile = cafile;
+  soap->capath = capath;
+  soap->dhfile = NULL;
+  soap->rsa = 0;
+  soap->randfile = randfile;
+  soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION);
+  return soap->fsslauth(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void
+ssl_init()
+{ static int done = 0;
+  if (!done)
+  { done = 1;
+    SSL_library_init();
+#ifndef WITH_LEAN
+    SSL_load_error_strings();
+#endif
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char *
+ssl_error(struct soap *soap, int ret)
+{ int err = SSL_get_error(soap->ssl, ret);
+  const char *msg = soap_str_code(h_ssl_error_codes, err);
+  if (msg)
+    strcpy(soap->msgbuf, msg);
+  else
+    return ERR_error_string(err, soap->msgbuf);
+  if (ERR_peek_error())
+  { unsigned long r;
+    strcat(soap->msgbuf, "\n");
+    while ((r = ERR_get_error()))
+      ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf));
+  } 
+  else
+  { switch (ret)
+    { case 0:
+        strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information.");
+        break;
+      case -1:
+        sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno));  
+        break;
+    }
+  }
+  return soap->msgbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_password(char *buf, int num, int rwflag, void *userdata)
+{ if (num < (int)strlen((char*)userdata) + 1)
+    return 0;
+  return strlen(strcpy(buf, (char*)userdata));
+}
+#endif
+
+/******************************************************************************/
+/* This callback is included for future references. It should not be deleted
+#ifndef PALM_1
+static DH *
+ssl_tmp_dh(SSL *ssl, int is_export, int keylength)
+{ static DH *dh512 = NULL;
+  static DH *dh1024 = NULL;
+  DH *dh;
+  switch (keylength)
+  { case 512:
+      if (!dh512)
+      { BIO *bio = BIO_new_file("dh512.pem", "r");
+        if (bio)
+        { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+          return dh512;
+        }
+      }
+      else
+        return dh512;
+    default:
+      if (!dh1024)
+      { BIO *bio = BIO_new_file("dh1024.pem", "r");
+        if (bio)
+        { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+          BIO_free(bio);
+        }
+      }
+      dh = dh1024;
+  }
+  return dh;
+}
+#endif
+*/
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_auth_init(struct soap *soap)
+{ ssl_init();
+  if (!soap->ctx)
+    if (!(soap->ctx = SSL_CTX_new(SSLv23_method())))
+      return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR);
+  if (soap->randfile)
+  { if (!RAND_load_file(soap->randfile, -1))
+      return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR);
+  }
+  else if (!RAND_load_file("/dev/urandom", 1024))
+  { int r;
+#ifdef HAVE_RAND_R
+    unsigned int s = (unsigned int)time(NULL);
+#endif
+    RAND_seed(soap->buf, sizeof(soap->buf));
+    while (!RAND_status())
+    {
+#ifdef HAVE_RAND_R
+      r = rand_r(&s);
+#else
+      r = rand();
+#endif
+      RAND_seed(&r, sizeof(int));
+    }
+  }
+  if (soap->cafile || soap->capath)
+    if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and/or directory", SOAP_SSL_ERROR);
+  if (!SSL_CTX_set_default_verify_paths(soap->ctx))
+    return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR);
+  if (soap->keyfile)
+  { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile))
+      return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR);
+    if (soap->password)
+    { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password);
+      SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password);
+      if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM))
+        return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR);
+    }
+  }
+  if (soap->rsa)
+  { RSA *rsa = RSA_generate_key(512, RSA_F4, NULL, NULL);
+    if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa))
+    { if (rsa)
+        RSA_free(rsa);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR);
+    }
+    RSA_free(rsa);
+  }
+  else if (soap->dhfile)
+  { DH *dh = 0;
+    BIO *bio;
+    bio = BIO_new_file(soap->dhfile, "r");
+    if (!bio)
+      return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR);
+    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+    BIO_free(bio);
+    if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0)
+    { if (dh)
+        DH_free(dh);
+      return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR);
+    }
+    DH_free(dh);
+  }
+  SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+  SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify);
+#if (OPENSSL_VERSION_NUMBER < 0x00905100L)
+  SSL_CTX_set_verify_depth(soap->ctx, 1); 
+#endif  
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+ssl_verify_callback(int ok, X509_STORE_CTX *store)
+{
+#ifdef SOAP_DEBUG
+  if (!ok) 
+  { char data[256];
+    X509 *cert = X509_STORE_CTX_get_current_cert(store);
+    fprintf(stderr, "SSL Verify error with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store)));
+    X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate issuer %s\n", data);
+    X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data));
+    fprintf(stderr, "certificate subject %s\n", data);
+  }
+#endif
+  return ok;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_ssl_accept(struct soap *soap)
+{ int i, r;
+  if (!soap_valid_socket(soap->socket))
+    return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR);
+  if (!soap->ssl)
+  { soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+      return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+  }
+  else
+    SSL_clear(soap->ssl);
+  soap->imode |= SOAP_ENC_SSL;
+  soap->omode |= SOAP_ENC_SSL;
+#ifdef WIN32
+  u_long nonblocking = 1;
+  ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking);
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK);
+#endif
+  soap->bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE);
+  SSL_set_bio(soap->ssl, soap->bio, soap->bio);
+  i = 100;
+  while ((r = SSL_accept(soap->ssl)) <= 0)
+  { int err = SSL_get_error(soap->ssl, r);
+    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
+    { struct timeval timeout;
+      fd_set fd;
+      if (i-- <= 0)
+        break;
+      timeout.tv_sec = 0;
+      timeout.tv_usec = 100000;
+      FD_ZERO(&fd);
+      FD_SET((SOAP_SOCKET)soap->socket, &fd);
+      r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+      if (r < 0 && soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        return SOAP_EOF;
+      }
+    }
+    else
+    { soap->errnum = err;
+      break;
+    }
+  }
+#ifdef WIN32
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+  }
+#else
+  fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+  if (r <= 0)
+  { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR);
+    soap_closesock(soap);
+    return SOAP_SSL_ERROR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#endif /* WITH_OPENSSL */
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+tcp_init(struct soap *soap)
+{ soap->errmode = 1;
+#ifdef WIN32
+  if (tcp_done)
+    return 0;
+  else
+  { WSADATA w;
+    if (WSAStartup(MAKEWORD(1, 1), &w))
+      return -1;
+    tcp_done = 1;
+  }
+#endif
+#ifdef PALM
+  errno = 0;
+  h_errno = 0;
+  AppNetRefnum = 0;
+  NetUInit();
+  AppNetTimeout = 10000;
+  NetLibOpen(AppNetRefnum, &h_errno);
+#endif
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_done(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  int i;
+#endif
+  soap_free(soap);
+  while (soap->clist)
+  { struct soap_clist *p = soap->clist->next;
+    SOAP_FREE(soap->clist);
+    soap->clist = p;
+  }
+  soap->keep_alive = 0; /* to force close the socket */
+  soap_closesock(soap);
+#ifdef WITH_COOKIES
+  soap_free_cookies(soap);
+#endif
+  while (soap->plugins)
+  { register struct soap_plugin *p = soap->plugins->next;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id));
+    if (soap->plugins->fcopy || !soap->copy)
+      soap->plugins->fdelete(soap, soap->plugins);
+    SOAP_FREE(soap->plugins);
+    soap->plugins = p;
+  }
+  soap->fplugin = fplugin;
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+#ifndef MAC_CARBON
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+#endif
+  soap->fprepare = NULL;
+  soap->fignore = NULL;
+#ifdef WITH_OPENSSL
+  if (soap->session)
+  { SSL_SESSION_free(soap->session);
+    soap->session = NULL;
+  }
+#endif
+  if (!soap->copy)
+  { if (soap_valid_socket(soap->master))
+    { closesocket((SOAP_SOCKET)soap->master);
+      soap->master = SOAP_INVALID_SOCKET;
+    }
+#ifdef WITH_OPENSSL
+    if (soap->ctx)
+    { SSL_CTX_free(soap->ctx);
+      soap->ctx = NULL;
+    }
+#endif
+  }
+#ifndef WITH_LEAN
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap_close_logfile(soap, i);
+    if (soap->logfile[i])
+    { SOAP_FREE((void*)soap->logfile[i]);
+      soap->logfile[i] = NULL;
+    }
+  }
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_cleanup(struct soap *soap)
+{ soap_done(soap);
+#ifdef WIN32
+  if (!tcp_done)
+    return;
+  tcp_done = 0;
+  WSACleanup();
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char*
+tcp_error(struct soap *soap)
+{ register const char *msg = NULL;
+  switch (soap->errmode)
+  { case 0:
+      msg = soap_strerror(soap);
+      break;
+    case 1:
+      msg = "WSAStartup failed";
+      break;
+    case 2:
+    {
+#ifndef WITH_LEAN
+      msg = soap_str_code(h_error_codes, soap->errnum);
+      if (!msg)
+#endif
+      { sprintf(soap->msgbuf, "TCP error %d", soap->errnum);
+        msg = soap->msgbuf;
+      }
+    }
+  }
+  return msg;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char*
+http_error(struct soap *soap, int status)
+{ register const char *msg = NULL;
+#ifndef WITH_LEAN
+  msg = soap_str_code(h_http_error_codes, status);
+  if (!msg)
+#endif
+  { sprintf(soap->msgbuf, "HTTP error %d", status);
+    msg = soap->msgbuf;
+  }
+  return msg;
+}
+#endif
+
+/******************************************************************************/
+/* WR[ */
+#ifndef WITH_IPV6
+/* ]WR */
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static int
+soap_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
+{ unsigned long iadd;
+  struct hostent hostent, *host = &hostent;
+/* WR[ */
+#ifdef VXWORKS
+  int hostint;
+  char * addrcopy = (char*)malloc(strlen(addr) + 1); /*copy of addr. */
+  /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
+  strncpy(addrcopy, addr, strlen(addr)+1);
+  iadd = inet_addr(addrcopy);
+#else
+/* ]WR */
+#if defined(_AIXVERSION_431) || defined(TRU64)
+  struct hostent_data ht_data;
+#endif
+  iadd = inet_addr(addr);
+/* WR[ */
+#endif
+/* ]WR */
+  if ((int)iadd != -1)
+  { memcpy(inaddr, &iadd, sizeof(iadd));
+/* WR[ */
+#ifdef VXWORKS
+    free(addrcopy);
+#endif
+/* ]WR */
+    return 0;
+  }
+#if defined(__GLIBC__)
+  if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
+    host = NULL;
+#elif defined(_AIXVERSION_431) || defined(TRU64)
+  memset(&ht_data, 0, sizeof(ht_data));
+  if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
+  { host = NULL;
+    soap->errnum = h_errno;
+  }
+#elif defined(HAVE_GETHOSTBYNAME_R)
+  host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum);
+/* WR[ */
+#elif defined(VXWORKS)
+  /* If the DNS resolver library resolvLib has been configured in the vxWorks
+   * image, a query for the host IP address is sent to the DNS server, if the
+   * name was not found in the local host table. */
+  hostint = hostGetByName(addrcopy);
+  if (hostint == ERROR)
+    {
+    host = NULL;
+    soap->errnum = soap_errno; 
+    }
+  free(addrcopy);  /*free() is placed after the error checking to assure that
+                   * errno captured is that from hostGetByName() */
+/* ]WR */
+#else
+  if (!(host = gethostbyname(addr)))
+    soap->errnum = h_errno;
+#endif
+  if (!host)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n"));
+    return -1;
+  }
+/* WR[ */
+#ifdef VXWORKS
+  inaddr->s_addr = hostint;
+#else
+/* ]WR */
+  memcpy(inaddr, host->h_addr, host->h_length);
+/* WR[ */
+#endif
+/* ]WR */
+  return 0;
+}
+#endif
+#endif
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static int
+tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port)
+{ struct sockaddr_in sockaddr;
+/* WR[ */
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo;
+  struct addrinfo hints;
+  struct addrinfo resaddr;
+  struct sockaddr_storage addrstorage;
+  int err;
+#endif /* WITH_IPV6 */
+/* ]WR */
+  register int fd;
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->socket))
+    closesocket((SOAP_SOCKET)soap->socket);
+  soap->socket = SOAP_INVALID_SOCKET;
+  if (tcp_init(soap))
+  { soap_set_sender_error(soap, tcp_error(soap), "TCP initialization failed in tcp_connect()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  soap->errmode = 0;
+/* WR[ */
+#ifdef WITH_IPV6
+  memset(&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  soap->errmode = 2;
+  if (soap->proxy_host)
+    err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &addrinfo);
+  else
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  if (addrinfo)
+  { resaddr = *addrinfo;
+    addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr);
+    resaddr.ai_addr = (struct sockaddr *) &addrstorage;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_sender_error(soap, gai_strerror(err), 
+    "TCP getaddrinfo on proxy host failed in tcp_connect()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  fd = (int)socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol); /* modified to use fd */
+  soap->errmode = 0;
+#else /* WITH_IPV6 */
+/* ]WR */
+  fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+  if (fd < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP socket failed in tcp_connect()", SOAP_TCP_ERROR);
+    return -1;
+  }
+#ifndef WITH_LEAN
+  if (soap->connect_flags & SO_LINGER)
+  { struct linger linger;
+    memset(&linger, 0, sizeof(struct linger));
+    linger.l_onoff = 1;
+    linger.l_linger = 0;
+    if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+    { soap->errnum = soap_socket_errno;
+      soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR);
+      closesocket((SOAP_SOCKET)fd);
+      return -1;
+    }
+  }
+  if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt failed in tcp_connect()", SOAP_TCP_ERROR);
+    closesocket((SOAP_SOCKET)fd);
+    return -1;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR);
+    closesocket((SOAP_SOCKET)fd);
+    return -1;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    closesocket((SOAP_SOCKET)fd);
+    return -1;
+  }
+  if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR);
+    closesocket((SOAP_SOCKET)fd);
+    return -1;
+  }
+#ifdef TCP_NODELAY
+  if (setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR);
+    closesocket((SOAP_SOCKET)fd);
+    return -1;
+  }
+#endif
+#endif
+/* WR[ */
+#ifndef WITH_IPV6
+/* ]WR */
+  memset(&sockaddr, 0, sizeof(sockaddr));
+  sockaddr.sin_family = AF_INET;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Open socket %d to host='%s'\n", fd, host));
+  soap->errmode = 2;
+  if (soap->proxy_host)
+  { if (soap_gethost(soap, soap->proxy_host, &sockaddr.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "TCP get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      closesocket((SOAP_SOCKET)fd);
+      return -1;
+    }
+    sockaddr.sin_port = htons((short)soap->proxy_port);
+  }
+  else
+  { if (soap_gethost(soap, host, &sockaddr.sin_addr))
+    { soap_set_sender_error(soap, tcp_error(soap), "TCP get host by name failed in tcp_connect()", SOAP_TCP_ERROR);
+      closesocket((SOAP_SOCKET)fd);
+      return -1;
+    }
+    sockaddr.sin_port = htons((short)port);
+  }
+  soap->errmode = 0;
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long nonblocking = 1;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+  }
+/* WR[ */
+#elif defined(VXWORKS)
+  {
+    vx_nonblocking = TRUE;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */
+  }
+/* ]WR */
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+  else
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+/* WR[ */
+#elif defined(VXWORKS)
+  {
+    vx_nonblocking = FALSE;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */
+  }
+/* ]WR */
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  for (;;)
+  { 
+/* WR[ */
+#ifdef WITH_IPV6
+    if (connect((SOAP_SOCKET)fd, resaddr.ai_addr, resaddr.ai_addrlen)) /* modified to use fd */
+#else /* WITH_IPV6 */
+    if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr)))
+#endif /* WITH_IPV6 */
+/* ]WR */
+    { 
+#ifndef WITH_LEAN
+      if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK))
+      { struct timeval timeout;
+#if defined(SOCKLEN_T)
+        SOCKLEN_T n = sizeof(struct sockaddr_in);
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN)
+        socklen_t n = sizeof(struct sockaddr_in);
+#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+        int n = sizeof(struct sockaddr_in);
+#else
+        size_t n = sizeof(struct sockaddr_in);
+#endif
+        fd_set fds;
+        if (soap->connect_timeout > 0)
+        { timeout.tv_sec = soap->connect_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->connect_timeout/1000000;
+          timeout.tv_usec = -soap->connect_timeout%1000000;
+        }
+        FD_ZERO(&fds);
+        FD_SET((SOAP_SOCKET)fd, &fds);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+          if (r > 0)
+           break;
+          if (!r)
+          { soap->errnum = 0;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+            soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            closesocket((SOAP_SOCKET)fd);
+            return -1;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+            soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR);
+            closesocket((SOAP_SOCKET)fd);
+            return -1;
+          }
+        }
+       n = sizeof(soap->errnum);
+        if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &n) && !soap->errnum)
+          break;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        closesocket((SOAP_SOCKET)fd);
+        return -1;
+      }
+      else
+#endif
+      if (soap_socket_errno != SOAP_EINTR)
+      { soap->errnum = soap_socket_errno;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n"));
+        soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR);
+        closesocket((SOAP_SOCKET)fd);
+        return -1;
+      }
+    }  
+    else
+      break;
+  }
+#ifndef WITH_LEAN
+  if (soap->connect_timeout)
+#if defined(WIN32)
+  { u_long blocking = 0;
+    ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+  }
+/* WR[ */
+#elif defined(VXWORKS)
+  {
+    vx_nonblocking = FALSE;
+    ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */
+  }
+/* ]WR */
+#else
+    fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+  soap->socket = fd;
+#ifdef WITH_OPENSSL
+  soap->imode &= ~SOAP_ENC_SSL;
+  soap->omode &= ~SOAP_ENC_SSL;
+  if (!strncmp(endpoint, "https:", 6))
+  { int r;
+    if (soap->proxy_host)
+    { unsigned int k = soap->omode; /* make sure we only parse HTTP */
+      size_t n = soap->count; /* save the content length */
+      soap->omode &= ~0xFF; /* mask IO and ENC */
+      soap->omode |= SOAP_IO_BUFFER;
+      soap_begin_send(soap);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n"));
+      sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return -1;
+#ifndef WITH_LEAN
+      if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+      { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+        strcpy(soap->tmpbuf, "Basic ");
+        soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+        if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+          return soap->error;
+      }
+#endif
+      if ((soap->error = soap->fposthdr(soap, NULL, NULL))
+       || soap_flush(soap))
+        return -1;
+      soap->omode = k;
+      k = soap->imode;
+      soap->imode &= ~0xFF; /* mask IO and ENC */
+      if (soap_begin_recv(soap))
+        return -1;
+      soap->imode = k;
+      soap->count = n;
+      soap_begin_send(soap);
+    }
+    if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR);
+      return -1;
+    }
+    soap->ssl = SSL_new(soap->ctx);
+    if (!soap->ssl)
+    { soap->error = SOAP_SSL_ERROR;
+      return -1;
+    }
+    if (soap->session)
+    { if (!strcmp(soap->session_host, host) && soap->session_port == port)
+        SSL_set_session(soap->ssl, soap->session);
+      SSL_SESSION_free(soap->session);
+      soap->session = NULL;
+    }
+    soap->imode |= SOAP_ENC_SSL;
+    soap->omode |= SOAP_ENC_SSL;
+    soap->bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE);
+    SSL_set_bio(soap->ssl, soap->bio, soap->bio);
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long nonblocking = 1;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking);
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK);
+#endif
+#endif
+    for (;;)
+    { if ((r = SSL_connect(soap->ssl)) <= 0)
+      { int err = SSL_get_error(soap->ssl, r);
+        if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE)
+        { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR);
+          return -1;
+        }
+        if (soap->connect_timeout)
+        { struct timeval timeout;
+          fd_set fds;
+          if (soap->connect_timeout > 0)
+          { timeout.tv_sec = soap->connect_timeout;
+            timeout.tv_usec = 0;
+          }
+          else
+          { timeout.tv_sec = -soap->connect_timeout/1000000;
+            timeout.tv_usec = -soap->connect_timeout%1000000;
+          }
+          FD_ZERO(&fds);
+          FD_SET((SOAP_SOCKET)(soap->socket), &fds);
+          for (;;)
+          { int r = select((SOAP_SOCKET)(soap->socket + 1), &fds, NULL, &fds, &timeout);
+            if (r > 0)
+             break;
+            if (!r)
+            { soap->errnum = 0;
+              DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n"));
+              soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR);
+              return -1;
+            }
+          }
+         continue;
+        }
+      }
+      break;
+    }
+#ifndef WITH_LEAN
+    if (soap->connect_timeout)
+#ifdef WIN32
+    { u_long blocking = 0;
+      ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking);
+    }
+#else
+      fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+    if (soap->require_server_auth)
+    { X509 *peer;
+      int err;
+      if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK)
+      { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate cannot be verified in tcp_connect()", SOAP_SSL_ERROR);
+        return -1;
+      }
+      peer = SSL_get_peer_certificate(soap->ssl);
+      if (!peer)
+      { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR);
+        return -1;
+      }
+      X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf));
+      X509_free(peer);
+      if (soap_tag_cmp(soap->msgbuf, host))
+      { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR);
+        return -1;
+      }
+    }
+  }
+#endif
+  return fd;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_bind(struct soap *soap, const char *host, int port, int backlog)
+{ struct sockaddr_in sockaddr;
+/* WR[ */
+#ifdef WITH_IPV6
+  struct addrinfo *addrinfo;
+  struct addrinfo hints;
+  struct addrinfo resaddr;
+  struct sockaddr_storage addrstorage;
+  int err;
+#endif /* WITH_IPV6 */
+/* ]WR */
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  if (soap_valid_socket(soap->master))
+  { closesocket((SOAP_SOCKET)soap->master);
+    soap->master = SOAP_INVALID_SOCKET;
+  }
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 1;
+  if (tcp_init(soap))
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+/* WR[ */
+#ifdef WITH_IPV6
+  memset(&hints, 0, sizeof(hints));
+  hints.ai_family = PF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+  soap->errmode = 2;
+  if (host)
+    err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo);
+  else
+    err = getaddrinfo(NULL, soap_int2s(soap, port), &hints, &addrinfo);
+  if (NULL != addrinfo)
+  {
+    resaddr = *addrinfo;
+    addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr);
+    resaddr.ai_addr = (struct sockaddr *) &addrstorage;
+    freeaddrinfo(addrinfo);
+  }
+  if (err)
+  { soap_set_receiver_error(soap, gai_strerror(err), "TCP getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  soap->errmode = 0;
+  if ((soap->master = socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol)) < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+#else /* WITH_IPV6 */
+/* ]WR */
+  soap->errmode = 0;
+  if ((soap->master = (int)socket(AF_INET, SOCK_STREAM, 0)) < 0)
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+#ifndef WITH_LEAN
+  if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+  if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+#ifdef TCP_NODELAY
+  if (setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }
+#endif
+#endif
+/* WR[ */
+#ifdef WITH_IPV6
+  soap->errmode = 0;
+  if (bind(soap->master, resaddr.ai_addr, resaddr.ai_addrlen) || listen(soap->master, backlog))
+  { 
+    soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }  
+#else /* WITH_IPV6 */
+/* ]WR */
+  memset(&sockaddr, 0, sizeof(sockaddr));
+  sockaddr.sin_family = AF_INET;
+  soap->errmode = 2;
+  if (host)
+  { if (soap_gethost(soap, host, &sockaddr.sin_addr))
+    { soap_set_receiver_error(soap, tcp_error(soap), "TCP get host by name failed in soap_bind()", SOAP_TCP_ERROR);
+      return -1;
+    }
+  }
+  else
+    sockaddr.sin_addr.s_addr = htonl(INADDR_ANY);
+  sockaddr.sin_port = htons((short)port);
+  soap->errmode = 0;
+  if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&sockaddr, sizeof(sockaddr)) || listen((SOAP_SOCKET)soap->master, backlog))
+  { soap->errnum = soap_socket_errno;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n"));
+    soap_closesock(soap);
+    soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR);
+    return -1;
+  }  
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+#ifdef WITH_OPENSSL
+  if (!soap->ctx && (soap->error = soap->fsslauth(soap)))
+    return -1;
+#endif
+  return soap->master;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_poll(struct soap *soap)
+{ 
+#ifndef WITH_LEAN
+  struct timeval timeout;
+  fd_set sfd,rfd;
+  int r;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 0;
+  FD_ZERO(&rfd);
+  FD_ZERO(&sfd);
+  if (soap->socket >= 0)
+  { FD_SET(soap->socket, &rfd);
+    FD_SET(soap->socket, &sfd);
+    r = select(soap->socket + 1, &rfd, &sfd, NULL, &timeout);
+  }
+  else if (soap->master >= 0)
+  { FD_SET(soap->master, &rfd);
+    r = select(soap->master + 1, &rfd, &sfd, NULL, &timeout);
+  }
+  else
+  { FD_SET(soap->sendfd, &sfd);
+    FD_SET(soap->recvfd, &rfd);
+    r = select((soap->sendfd > soap->recvfd ? soap->sendfd : soap->recvfd) + 1, &rfd, &sfd, NULL, &timeout);
+  }
+  if (r > 0)
+  {
+#ifdef WITH_OPENSSL
+    if (soap->ssl)
+    { if ((soap->socket >= 0) && FD_ISSET(soap->socket, &rfd))
+      { char buf = '\0';
+       if (SSL_peek(soap->ssl, &buf, 1) <= 0)
+         return SOAP_EOF;
+      }
+    }
+#endif   
+    return SOAP_OK;
+  }
+  if (r < 0 && (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR)
+  { soap->errnum = soap_socket_errno;
+    soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
+    return soap->error = SOAP_TCP_ERROR;
+  }
+  else
+    soap->errnum = soap_errno;
+  return SOAP_EOF;
+#else
+  return SOAP_OK;
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static int
+tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n)
+{
+#if defined(SOCKLEN_T)
+  return (int)accept((SOAP_SOCKET)s, a, (SOCKLEN_T*)n);
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN)
+  return (int)accept((SOAP_SOCKET)s, a, (socklen_t*)n);
+#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
+  return (int)accept((SOAP_SOCKET)s, a, n);
+#else
+  return (int)accept((SOAP_SOCKET)s, a, (size_t*)n);
+#endif
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_accept(struct soap *soap)
+{ 
+/* WR[ */
+#ifdef WITH_IPV6
+  struct sockaddr_storage sockaddr;
+#else /* WITH_IPV6 */
+/* ]WR */
+  struct sockaddr_in sockaddr;
+/* WR[ */
+#endif
+/* ]WR */
+  int n = (int)sizeof(struct sockaddr);
+#ifndef WITH_LEAN
+  int len = SOAP_BUFLEN;
+  int set = 1;
+#endif
+  memset(&sockaddr, 0, sizeof(sockaddr));
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->errmode = 0;
+  if (soap_valid_socket(soap->master))
+  { for (;;)
+    { 
+#ifndef WITH_LEAN
+      if (soap->accept_timeout)
+      { struct timeval timeout;
+        fd_set fd;
+        if (soap->accept_timeout > 0)
+        { timeout.tv_sec = soap->accept_timeout;
+          timeout.tv_usec = 0;
+        }
+        else
+        { timeout.tv_sec = -soap->accept_timeout/1000000;
+          timeout.tv_usec = -soap->accept_timeout%1000000;
+        }
+        FD_ZERO(&fd);
+        FD_SET((SOAP_SOCKET)soap->master, &fd);
+        for (;;)
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+          if (r > 0)
+            break;
+          if (!r)
+          { soap->errnum = 0;
+            soap_set_receiver_error(soap, "Timeout", "TCP accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return -1;
+          }
+          if (soap_socket_errno != SOAP_EINTR)
+          { soap->errnum = soap_socket_errno;
+            soap_closesock(soap);
+            soap_set_sender_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR);
+            return -1;
+          }
+        }
+#if defined(WIN32)
+       { u_long nonblocking = 1;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking);
+        }
+#elif defined(VXWORKS)
+        { vx_nonblocking = TRUE;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking));
+        }
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK);
+#endif
+      }
+      else
+#if defined(WIN32)
+      { u_long blocking = 0;
+        ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+      }
+/* WR[ */
+#elif defined(VXWORKS)
+       {
+        vx_nonblocking = FALSE;
+        ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking));
+       }
+/* ]WR */
+#else
+        fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+#endif
+#endif
+      if ((soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&sockaddr, &n)) >= 0)
+      {
+/* WR[ */
+#ifdef WITH_IPV6
+/* Use soap->host to store the numeric form of the remote host */
+        getnameinfo((struct sockaddr*)&sockaddr, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); 
+        soap->ip = 0; /* info stored in soap->host */
+        soap->port = 0; /* info stored in soap->host */
+#else /* WITH_IPV6 */
+/* ]WR */
+        soap->ip = ntohl(sockaddr.sin_addr.s_addr);
+        soap->port = (int)ntohs(sockaddr.sin_port);
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+        soap->keep_alive = ((soap->imode & SOAP_IO_KEEPALIVE) != 0);
+#ifndef WITH_LEAN
+       if (soap->accept_flags & SO_LINGER)
+        { struct linger linger;
+          memset(&linger, 0, sizeof(struct linger));
+          linger.l_onoff = 1;
+          linger.l_linger = 0;
+         if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger)))
+          { soap->errnum = soap_socket_errno;
+           soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR);
+            return -1;
+         }
+        }
+        if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_accept()", SOAP_TCP_ERROR);
+          return -1;
+        }
+        if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR);
+          return -1;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR);
+          return -1;
+        }
+        if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR);
+          return -1;
+        }
+#ifdef TCP_NODELAY
+        if (setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int)))
+        { soap->errnum = soap_socket_errno;
+          soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR);
+          return -1;
+        }
+#endif
+#endif
+        if (soap->accept_timeout)
+        {
+#if defined(WIN32)
+          u_long blocking = 0;
+          ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking);
+          ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking);
+/* WR[ */
+#elif defined(VXWORKS)
+          vx_nonblocking = FALSE;
+          ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking));
+          ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&vx_nonblocking));
+/* ]WR */
+#else
+          fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK);
+          fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK);
+#endif
+       }
+        return soap->socket;
+      }
+      if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN)
+      { soap->errnum = soap_socket_errno;
+        soap_set_receiver_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR);
+        return -1;
+      }
+    }
+  }
+  else
+  { soap_set_receiver_error(soap, tcp_error(soap), "TCP no master socket in soap_accept()", SOAP_TCP_ERROR);
+    return -1;
+  }
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef MAC_CARBON
+#ifndef PALM_1
+static int
+tcp_disconnect(struct soap *soap)
+{
+#ifdef WITH_OPENSSL
+  if (soap->ssl)
+  { int r, s = 0;
+    if (soap->session)
+      SSL_SESSION_free(soap->session);
+    if (*soap->host)
+    { soap->session = SSL_get1_session(soap->ssl);
+      if (soap->session)
+      { strcpy(soap->session_host, soap->host);
+        soap->session_port = soap->port;
+      }
+    }
+    r = SSL_shutdown(soap->ssl);
+    if (r != 1)
+    { s = ERR_get_error();
+      if (s)
+      { if (soap_valid_socket(soap->socket))
+        { shutdown((SOAP_SOCKET)soap->socket, 1);
+          soap->socket = SOAP_INVALID_SOCKET;
+        }
+        r = SSL_shutdown(soap->ssl);
+      }
+    }
+    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));
+    SSL_free(soap->ssl);
+    soap->ssl = NULL;
+    if (s)
+      return SOAP_SSL_ERROR;
+    ERR_remove_state(0);
+  }
+#endif
+  if (soap_valid_socket(soap->socket))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Closing socket %d\n", soap->socket));
+    shutdown((SOAP_SOCKET)soap->socket, 2);
+    closesocket((SOAP_SOCKET)soap->socket);
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_closesock(struct soap *soap)
+{ register int status = soap->error;
+#ifndef MAC_CARBON
+  if (status == SOAP_EOF || !soap->keep_alive)
+  { if ((soap->error = soap->fclose(soap)))
+      return soap->error;
+    soap->socket = SOAP_INVALID_SOCKET;
+  }
+#endif
+#ifdef WITH_ZLIB
+  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
+    deflateEnd(&soap->d_stream);
+  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
+    inflateEnd(&soap->d_stream);
+  soap->zlib_state = SOAP_ZLIB_NONE;
+#endif
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_hash(register const char *s)
+{ register int h = 0;
+  while (*s)
+    h += *s++ & 0x1F;
+  return h % SOAP_IDHASH;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void
+soap_init_pht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
+  for (i = 0; i < SOAP_PTRHASH; i++)
+    soap->pht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new()
+{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap));
+  if (soap)
+    soap_init(soap);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new1(int mode)
+{ return soap_new2(mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_new2(int imode, int omode)
+{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap));
+  if (soap)
+    soap_init2(soap, imode, omode);
+  return soap;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static void
+soap_free_pht(struct soap *soap)
+{ register struct soap_plist *pp, *next;
+  register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n"));
+  for (i = 0; i < SOAP_PTRHASH; i++)
+  { for (pp = soap->pht[i]; pp; pp = next)
+    { next = pp->next;
+      SOAP_FREE(pp);
+    }
+    soap->pht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed_element(struct soap *soap, const void *p, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if ((i = soap_pointer_lookup(soap, p, type, &pp)))
+  { if (soap_is_embedded(soap, pp) || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embed_array(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
+{ register int i;
+  struct soap_plist *pp;
+  if (soap->version != 1)
+    soap->encoding = 1;
+  if ((i = soap_array_pointer_lookup(soap, p, a, n, type, &pp)))
+  { if (soap_is_embedded(soap, pp) || soap_is_single(soap, pp))
+      return 0;
+    soap_set_embedded(soap, pp);
+  }
+  return i;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  *ppp = NULL;
+  if (p)
+    for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
+      if (pp->ptr == p && pp->type == type)
+      { *ppp = pp;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
+        return pp->id;
+      }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
+{ struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
+    if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr && pp->array->__size == n)
+    { *ppp = pp;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
+      return pp->id;
+    }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_pointer_enter(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
+{ register struct soap_plist *pp;
+  if (!p)
+  { *ppp = NULL;
+    return 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enter location=%p type=%d id=%lu\n", p, type, soap->idnum+1));
+  *ppp = pp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist));
+  if (pp)
+  { register int h = soap_hash_ptr(p);
+    pp->next = soap->pht[h];
+    pp->type = type;
+    if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER)
+    { pp->mark1 = 0;
+      pp->mark2 = 0;
+    }
+    else
+    { pp->mark1 = 1;
+      pp->mark2 = 1;
+    }
+    pp->ptr = p;
+    pp->array = NULL;
+    soap->pht[h] = pp;
+    return pp->id = ++soap->idnum;
+  }
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int type, struct soap_plist **ppp)
+{ struct soap_plist *pp;
+  *ppp = NULL;
+  if (!p || !a->__ptr)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array enter location=%p size=%d type=%d id=%lu\n", a->__ptr, a->__size, type, soap->idnum+1));
+  *ppp = pp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist));
+  if (pp)
+  { register int h = soap_hash_ptr(a->__ptr);
+    pp->next = soap->pht[h];
+    pp->type = type;
+    if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER)
+    { pp->mark1 = 0;
+      pp->mark2 = 0;
+    }
+    else
+    { pp->mark1 = 1;
+      pp->mark2 = 1;
+    }
+    pp->ptr = p;
+    pp->array = a;
+    soap->pht[h] = pp;
+    return pp->id = ++soap->idnum;
+  }
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin_count(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  if (soap->mode & SOAP_ENC_DIME)
+    soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME;
+  else
+  { soap->mode = soap->omode;
+    if (((soap->mode & (SOAP_IO_STORE | SOAP_IO_CHUNK)) || (soap->mode & SOAP_ENC_XML)) && !soap->fprepare)
+      soap->mode &= ~SOAP_IO_LENGTH;
+    else
+      soap->mode |= SOAP_IO_LENGTH;
+  }
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (!(soap->mode & SOAP_ENC_DIME))
+      soap->mode &= ~SOAP_IO_LENGTH;
+    if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  soap->count = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  soap->dime_count = 0; /* count # of attachments */
+  soap->dime_size = 0; /* accumulate total size of attachments */
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=%hd count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_send(struct soap *soap)
+{ soap_clr_attr(soap);
+  soap_set_local_namespaces(soap);
+  soap->mode = (soap->omode & ~SOAP_IO_LENGTH) | (soap->mode & SOAP_ENC_DIME);
+  if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH)
+  { if (soap->mode & SOAP_ENC_XML)
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket))
+  { if (soap->count || (soap->mode & SOAP_ENC_XML))
+      soap->mode |= SOAP_IO_BUFFER;
+    else
+      soap->mode |= SOAP_IO_STORE;
+  }
+  if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    soap_new_block(soap);
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->sendfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+  if (soap->mode & SOAP_IO)
+  { soap->bufidx = 0;
+    soap->buflen = 0;
+  }
+  soap->chunksize = 0;
+  soap->ns = 0;
+  soap->null = 0;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  soap->encoding = 0;
+  soap->part = SOAP_BEGIN;
+  soap->idnum = 0;
+  soap->level = 0;
+#ifdef WITH_ZLIB
+  soap->z_ratio_out = 1.0;
+  if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE)
+  {
+#ifdef WITH_GZIP
+    memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10);
+    soap->d_stream.next_out = (Byte*)soap->z_buf + 10;
+    soap->d_stream.avail_out = SOAP_BUFLEN - 10;
+    soap->z_crc = crc32(0L, NULL, 0);
+    if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+#else
+    soap->d_stream.next_out = (Byte*)soap->z_buf;
+    soap->d_stream.avail_out = SOAP_BUFLEN;
+    if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK)
+#endif
+      return soap->error = SOAP_ZLIB_ERROR;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n"));
+    soap->zlib_state = SOAP_ZLIB_DEFLATE;
+  }
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=%hd count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_embedded(struct soap *soap, const void *p, int t)
+{ struct soap_plist *pp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d\n", p, t));
+  if (soap_pointer_lookup(soap, p, t, &pp))
+  { pp->mark1 = 1;
+    pp->mark2 = 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d set to %d\n", p, t, (int)pp->mark1));
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_reference(struct soap *soap, const void *p, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p)
+    return 1;
+  i = soap_pointer_lookup(soap, p, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else
+  { soap_pointer_enter(soap, p, t, &pp);
+    pp->mark1 = 0;
+    pp->mark2 = 0;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type = %d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
+{ register int i;
+  struct soap_plist *pp;
+  if (!p)
+    return 1;
+  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
+  if (i)
+  { if (pp->mark1 == 0)
+    { pp->mark1 = 2;
+      pp->mark2 = 2;
+    }
+  }
+  else if (!soap_array_pointer_enter(soap, p, a, t, &pp))
+    return 1;
+  pp->mark1 = 0;
+  pp->mark2 = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p size=%d type = %d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
+  return pp->mark1;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_embedded_id(struct soap *soap, int id, const void *p, int t)
+{ struct soap_plist *pp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)) && soap->part != SOAP_IN_HEADER)
+  { if (id < 0)
+    { id = soap_pointer_lookup(soap, p, t, &pp);
+      if (id > 0 && pp)
+      { if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 2;
+        else
+          pp->mark2 = 2;
+      }
+      return -1;
+    }
+    return id;
+  }
+  if (id < 0)
+    id = soap_pointer_lookup(soap, p, t, &pp);
+  else
+    soap_pointer_lookup(soap, p, t, &pp);
+  if (id > 0 && pp)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      pp->mark1 = 1;
+    else
+      pp->mark2 = 1;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
+  }
+  return id;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
+  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)) && soap->part != SOAP_IN_HEADER)
+  { if (soap->mode & SOAP_IO_LENGTH)
+      return pp->mark1 != 0;
+    return pp->mark2 != 0;
+  }
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 1;
+  return pp->mark2 == 1;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_single(struct soap *soap, struct soap_plist *pp)
+{ if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER)
+    return 1;
+  if (!pp)
+    return 0;
+  if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 0;
+  return pp->mark2 == 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_is_multi(struct soap *soap, struct soap_plist *pp)
+{ if (soap->mode & SOAP_IO_LENGTH)
+    return pp->mark1 == 2;
+  return pp->mark2 == 2;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_embedded(struct soap *soap, struct soap_plist *pp)
+{ if (!pp)
+    return;
+  if (soap->mode & SOAP_IO_LENGTH)
+    pp->mark1 = 1;
+  else
+    pp->mark2 = 1;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_attached(struct soap *soap, struct soap_plist *pp, const char *id, const char *type, const char *options, size_t size)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attached id='%s' type='%s'\n", id?id:"", type?type:""));
+  if (soap->mode & SOAP_IO_LENGTH)
+  { if (pp->mark1 != 3)
+    { pp->mark1 = 3;
+      soap->dime_count++; /* one more attachment found */
+      soap->dime_size += 12; /* increase total size (DIME fields) */
+      if (id)
+        soap->dime_size += (strlen(id)+3)&(~3);
+      if (type)
+        soap->dime_size += (strlen(type)+3)&(~3);
+      if (options)
+        soap->dime_size += 4 + (((((unsigned char)options[2] << 8 | (unsigned char)options[3]))+3)&(~3));
+      soap->dime_size += (size+3)&(~3);
+    }
+  }
+  else if (pp->mark2 != 3)
+    pp->mark2 = 3;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void
+soap_init_iht(struct soap *soap)
+{ register int i;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+    soap->iht[i] = NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static void
+soap_free_iht(struct soap *soap)
+{ register int i;
+  register struct soap_ilist *ip, *p;
+  register struct soap_flist *fp, *q;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
+  for (i = 0; i < SOAP_IDHASH; i++)
+  { for (ip = soap->iht[i]; ip; ip = p)
+    { for (fp = ip->flist; fp; fp = q)
+      { q = fp->next;
+        SOAP_FREE(fp);
+      }
+      p = ip->next;
+      SOAP_FREE(ip);
+    }
+    soap->iht[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static struct soap_ilist *
+soap_hlookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
+    if (!strcmp(ip->id, id))
+      return ip;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_lookup(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  ip = soap_hlookup(soap, id);
+#ifndef WITH_LEANER
+  if (!ip && *id != '#' && !strchr(id, ':')) /* try content id "cid:" with DIME attachments */
+  { char cid[SOAP_TAGLEN];
+    strcpy(cid, "cid:");
+    strncat(cid + 4, id, sizeof(cid) - 5);
+    cid[sizeof(cid) - 1] = '\0';
+    ip = soap_hlookup(soap, cid);
+  }
+#endif
+  return ip;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_ilist *
+SOAP_FMAC2
+soap_enter(struct soap *soap, const char *id)
+{ register int h;
+  register struct soap_ilist *ip;
+  ip = (struct soap_ilist*)SOAP_MALLOC(sizeof(struct soap_ilist) + strlen(id));
+  if (ip)
+  { h = soap_hash(id);
+    strcpy(ip->id, id);
+    ip->next = soap->iht[h];
+    soap->iht[h] = ip;
+    return ip;
+  }
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_malloc(struct soap *soap, size_t n)
+{ register char *p;
+  if (!n)
+    return NULL;
+  if (!soap)
+    return SOAP_MALLOC(n);
+  n += (-(long)n) & 7;
+  if (!(p = (char*)SOAP_MALLOC(n + sizeof(void*) + sizeof(size_t))))
+  { soap->error = SOAP_EOM;
+    return NULL;
+  }
+  /* keep chain of alloced cells for later destruction */
+  soap->alloced = 1;
+  *(void**)(p + n) = soap->alist;
+  *(size_t*)(p + n + sizeof(void*)) = n;
+  soap->alist = p + n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Malloc %u bytes at location %p\n", (unsigned int)n, p));
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_dealloc(struct soap *soap, void *p)
+{ if (!soap)
+    return;
+  if (p)
+  { register char **q;
+    for (q = (char**)&soap->alist; *q; q = *(char***)q)
+    { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+      { *q = **(char***)q;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p));
+        SOAP_FREE(p);
+        return;
+      }
+    }
+    soap_delete(soap, p);
+  }
+  else
+  { register char *q;
+    while (soap->alist)
+    { q = (char*)soap->alist;
+      soap->alist = *(void**)q;
+      q -= *(size_t*)(q + sizeof(void*));
+      if (q == (char*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q == (char*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      SOAP_FREE(q);
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Dealloc all data done\n"));
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_delete(struct soap *soap, void *p)
+{ register struct soap_clist **cp = &soap->clist;
+  if (p)
+  { while (*cp)
+    { if (p == (*cp)->ptr)
+      { register struct soap_clist *q = *cp;
+        *cp = q->next;
+        q->fdelete(q);
+        SOAP_FREE(q);
+        return;
+      }
+      cp = &(*cp)->next;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
+  }
+  else
+  { while (*cp)
+    { register struct soap_clist *q = *cp;
+      *cp = q->next;
+      if (q->ptr == (void*)soap->fault)
+        soap->fault = NULL; /* this was deallocated */
+      else if (q->ptr == (void*)soap->header)
+        soap->header = NULL; /* this was deallocated */
+      q->fdelete(q);
+      SOAP_FREE(q);
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_clist *
+SOAP_FMAC2
+soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*))
+{ register struct soap_clist *cp;
+  if ((cp = (struct soap_clist*)SOAP_MALLOC(sizeof(struct soap_clist))))
+  { cp->next = soap->clist;
+    cp->type = t;
+    cp->size = n; 
+    cp->ptr = p;
+    cp->fdelete = fdelete;
+    soap->clist = cp;
+  }
+  return cp;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_unlink(struct soap *soap, const void *p)
+{ register char **q;
+  register struct soap_clist **cp;
+  if (!soap || !p)
+    return;
+  for (q = (char**)&soap->alist; *q; q = *(char***)q)
+  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
+    { *q = **(char***)q;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
+      return;
+    }
+  }
+  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
+  { if (p == (*cp)->ptr)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
+      q = (char**)*cp;
+      *cp = (*cp)->next;
+      SOAP_FREE(q);
+      return;
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_lookup_type(struct soap *soap, const char *id)
+{ register struct soap_ilist *ip;
+  if (*id)
+  { ip = soap_lookup(soap, id);
+    if (ip)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
+      return ip->type;
+    }
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
+  return 0;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k)
+{ struct soap_ilist *ip;
+  void **q;
+  if (*id == '\0')
+    return p;
+  soap->alloced = 0;
+  if (!p)
+    p = (void**)soap_malloc(soap, sizeof(void*));
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' %p (%u bytes)\n", id, p, (unsigned int)n));
+    ip->type = t;
+    ip->size = n; 
+    ip->link = p;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    ip->ptr = NULL;
+    ip->level = k;
+    *p = NULL;
+  }
+  else if (!soap->blist && ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type='%d' (%u bytes)\n", id, t, (unsigned int)n));
+    if (ip->type != t)
+    { soap->error = SOAP_HREF;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Object mismatch: id's type='%d' href's type='%d'\n", ip->type, t));
+      return NULL;
+    }
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      if (!q)
+        return NULL;
+      *p = (void*)q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    *p = ip->ptr;
+  }
+  else if (ip->level > k)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id));
+    while (ip->level > k)
+    { void *s, **r = &ip->link;
+      q = (void**)ip->link;
+      while (q)
+      { *r = (void*)soap_malloc(soap, sizeof(void*));
+        s = *q;
+        *q = *r;
+        r = *(void***)q;
+        q = (void**)s;
+      }
+      *r = NULL;
+      ip->size = n; 
+      ip->copy = NULL;
+      ip->level = ip->level - 1;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' (%u bytes)\n", id, (unsigned int)n));
+    while (ip->level < k)
+    { q = (void**)soap_malloc(soap, sizeof(void*));  
+      *p = q;
+      p = q;
+      k--;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
+    }
+    q = (void**)ip->link;
+    ip->link = p;
+    *p = (void*)q;
+  }
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_forward(struct soap *soap, const char *href, void *p, int t, size_t n)
+{ struct soap_ilist *ip;
+  if (!p || !*href)
+    return p;
+  ip = soap_lookup(soap, soap->href); /* lookup pointer to hash table entry for string id */
+  if (!ip)
+  { if (n >= sizeof(void*))
+    { ip = soap_enter(soap, href); /* new hash table entry for string id */
+      ip->type = t;
+      ip->size = n;
+      ip->link = NULL;
+      ip->copy = p;
+      ip->flist = NULL;
+      *(void**)p = NULL;
+      ip->ptr = NULL;
+      ip->level = 0;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first copying address %p for type %d href='%s'\n", p, t, href));
+      return p;
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding problem: copying location %p too small (%u) for href='%s'\n", p, (unsigned int)n, href));
+    soap->error = SOAP_HREF;
+    return NULL;
+  }
+  else if (ip->ptr)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying value from location %p to location %p to resolve href='%s'\n", ip->ptr, p, href));
+    memcpy(p, ip->ptr, n);
+  }
+  else if (n >= sizeof(void*))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type %d href='%s' (prev in chain = %p)\n", p, t, href, ip->copy));
+    *(void**)p = ip->copy;
+    ip->copy = p;
+    return p;
+  }
+  else
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding problem: copying location %p too small (%u) for href='%s'\n", p, (unsigned int)n, href));
+    soap->error = SOAP_HREF; /* href to object too small to hold pointer */
+    return NULL;
+  }
+  return ip->ptr;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void*
+SOAP_FMAC2
+soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, int k)
+{ struct soap_ilist *ip;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%d level=%d\n", id, t, p, (int)n, k));
+  soap->alloced = 0;
+  if (*id == '\0')
+  { if (!p)
+      return soap_malloc(soap, n);
+    else
+      return p;
+  }
+  ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s'\n", id));
+  if (!ip)
+  { ip = soap_enter(soap, id); /* new hash table entry for string id */
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%u\n", id, t, (unsigned int)n));
+    ip->type = t;
+    ip->size = n;
+    ip->link = NULL;
+    ip->copy = NULL;
+    ip->flist = NULL;
+    if (!p)
+      p = soap_malloc(soap, n);
+    ip->ptr = p;
+    ip->level = k;
+  }
+  else if (ip->ptr) /* storage address was forwarded */
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
+    if (p)
+    { soap->error = SOAP_MULTI_ID;
+      return NULL;
+    }
+  }
+  else 
+  { if (!p)
+      p = soap_malloc(soap, n);
+    ip->ptr = p;
+    if (!soap->blist)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolve link chain to point to %p\n", ip->ptr));
+      soap_resolve_ptr(ip);
+    }
+  }
+  return ip->ptr;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_send(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
+  if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
+  { if (soap_flush(soap))
+#ifdef WITH_ZLIB
+    { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE)
+      { soap->zlib_state = SOAP_ZLIB_NONE;
+        deflateEnd(&soap->d_stream);
+      }
+      return soap->error;
+    }
+#else
+      return soap->error;
+#endif
+#ifdef WITH_ZLIB
+    if (soap->mode & SOAP_ENC_ZLIB)
+    { int r;
+      soap->d_stream.avail_in = 0;
+      do
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n"));
+        r = deflate(&soap->d_stream, Z_FINISH);
+        if (soap->d_stream.avail_out != SOAP_BUFLEN)
+        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out))
+          { soap->zlib_state = SOAP_ZLIB_NONE;
+            deflateEnd(&soap->d_stream);
+            return soap->error;
+         }
+          soap->d_stream.next_out = (Byte*)soap->z_buf;
+          soap->d_stream.avail_out = SOAP_BUFLEN;
+        }
+      } while (r == Z_OK);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out));
+      soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in;
+      soap->mode &= ~SOAP_ENC_ZLIB;
+      soap->zlib_state = SOAP_ZLIB_NONE;
+      if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:""));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+#ifdef WITH_GZIP
+      soap->z_buf[0] = soap->z_crc & 0xFF;
+      soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF;
+      soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF;
+      soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF;
+      soap->z_buf[4] = soap->d_stream.total_in & 0xFF;
+      soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF;
+      soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF;
+      soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF;
+      if (soap_flush_raw(soap, soap->z_buf, 8))
+        return soap->error;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", soap->z_crc));
+#endif
+    }
+#endif
+#ifndef WITH_LEAN
+    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
+    { char *p;
+      if (!(soap->mode & SOAP_ENC_XML))
+      { soap->mode--;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size));
+        if (soap->status >= SOAP_POST)
+          soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size);
+        else if (soap->status != SOAP_STOP)
+          soap->error = soap->fresponse(soap, soap->status, soap->blist->size);
+        if (soap->error || soap_flush(soap))
+          return soap->error;
+        soap->mode++;
+      }
+      for (p = soap_first_block(soap); p; p = soap_next_block(soap))
+      { DBGMSG(SENT, p, soap_block_size(soap));
+        if ((soap->error = soap->fsend(soap, p, soap_block_size(soap))))
+        { soap_end_block(soap);
+          return soap->error;
+        }
+      }
+      soap_end_block(soap);
+    }
+    else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { DBGMSG(SENT, "\r\n0\r\n\r\n", 7);
+      if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7)))
+        return soap->error;
+    }
+#endif
+  }
+#ifdef WITH_OPENSSL
+  if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive)
+    shutdown((SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#else
+  if (soap_valid_socket(soap->socket) && !soap->keep_alive)
+    shutdown((SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */
+#endif
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send message ok\n"));
+  soap->part = SOAP_END;
+  soap->count = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_end_recv(struct soap *soap)
+{ soap->part = SOAP_END;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
+#ifdef WITH_ZLIB
+  if (soap->mode & SOAP_ENC_ZLIB)
+  { soap->mode &= ~SOAP_ENC_ZLIB;
+    memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN);
+    soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf;
+    soap->buflen = soap->z_buflen;
+    soap->zlib_state = SOAP_ZLIB_NONE;
+    if (inflateEnd(&soap->d_stream) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+#ifdef WITH_GZIP
+    if (soap->zlib_in == SOAP_ZLIB_GZIP)
+    { wchar c;
+      short i;
+      for (i = 0; i < 8; i++)
+      { if ((int)(c = soap_getchar(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        soap->z_buf[i] = (char)c;
+      }
+      if (soap->z_crc != ((unsigned char)soap->z_buf[0] | (unsigned long)((unsigned char)soap->z_buf[1] << 8) | (unsigned long)((unsigned char)soap->z_buf[2] << 16) | (unsigned long)((unsigned char)soap->z_buf[3] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", soap->z_crc));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+      if (soap->d_stream.total_out != ((unsigned char)soap->z_buf[4] | (unsigned long)((unsigned char)soap->z_buf[5] << 8) | (unsigned long)((unsigned char)soap->z_buf[6] << 16) | (unsigned long)((unsigned char)soap->z_buf[7] << 24)))
+      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n"));
+        return soap->error = SOAP_ZLIB_ERROR;
+      }
+    }
+#endif
+  }
+#endif
+  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */
+      ;
+  if (soap->fdisconnect)
+    if ((soap->error = soap->fdisconnect(soap)))
+      return soap->error;
+  return soap_resolve(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free(struct soap *soap)
+{ register struct soap_nlist *np;
+  register struct soap_attribute *tp;
+  register struct Namespace *ns;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
+  while (soap->nlist)
+  { np = soap->nlist->next;
+    if (soap->nlist->ns)
+      SOAP_FREE(soap->nlist->ns);
+    SOAP_FREE(soap->nlist);
+    soap->nlist = np;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
+  while (soap->blist)
+    soap_end_block(soap);
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attributes\n"));
+  while (soap->attributes)
+  { tp = soap->attributes->next;
+    if (soap->attributes->value)
+      SOAP_FREE(soap->attributes->value);
+    SOAP_FREE(soap->attributes);
+    soap->attributes = tp;
+  }
+  if (soap->labbuf)
+    SOAP_FREE(soap->labbuf);
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+  soap_free_pht(soap);
+  soap_free_iht(soap);
+  ns = soap->local_namespaces;
+  if (ns)
+  { for (; ns->id; ns++)
+    { if (ns->out)
+      { SOAP_FREE(ns->out);
+       if (soap->encodingStyle == ns->out)
+          soap->encodingStyle = SOAP_STR_EOS;
+        ns->out = NULL;
+      }
+      if (soap->encodingStyle == ns->ns)
+        soap->encodingStyle = SOAP_STR_EOS;
+    }
+    SOAP_FREE(soap->local_namespaces);
+    soap->local_namespaces = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_init_logs(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+  { soap->logfile[i] = NULL;
+    soap->fdebug[i] = NULL;
+  }
+#ifdef SOAP_DEBUG  
+  soap_set_recv_logfile(soap, "RECV.log");
+  soap_set_sent_logfile(soap, "SENT.log");
+  soap_set_test_logfile(soap, "TEST.log");
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_open_logfile(struct soap *soap, int i)
+{ if (soap->logfile[i])
+    soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a");
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_close_logfile(struct soap *soap, int i)
+{ if (soap->fdebug[i])
+  { fclose(soap->fdebug[i]);
+    soap->fdebug[i] = NULL;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_close_logfiles(struct soap *soap)
+{ int i;
+  for (i = 0; i < SOAP_MAXLOGS; i++)
+    soap_close_logfile(soap, i);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static void
+soap_set_logfile(struct soap *soap, int i, const char *logfile)
+{ char *s = NULL;
+  soap_close_logfile(soap, i);
+  if (soap->logfile[i])
+    SOAP_FREE((void*)soap->logfile[i]);
+  if (logfile)
+    if ((s = (char*)SOAP_MALLOC(strlen(logfile) + 1)))
+      strcpy(s, logfile);
+  soap->logfile[i] = s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_recv_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_sent_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_test_logfile(struct soap *soap, const char *logfile)
+{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy(struct soap *soap)
+{ return soap_copy_context((struct soap*)SOAP_MALLOC(sizeof(struct soap)), soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+struct soap*
+SOAP_FMAC2
+soap_copy_context(struct soap *copy, struct soap *soap)
+{ if (copy)
+  { register struct soap_plugin *p;
+    memcpy(copy, soap, sizeof(struct soap));
+    copy->copy = 1;
+    copy->user = NULL;
+    copy->userid = NULL;
+    copy->passwd = NULL;
+    copy->nlist = NULL;
+    copy->blist = NULL;
+    copy->clist = NULL;
+    copy->alist = NULL;
+    copy->attributes = NULL;
+    copy->local_namespaces = NULL;
+    soap_set_local_namespaces(copy);
+    soap_init_iht(copy);
+    soap_init_pht(copy);
+    copy->header = NULL;
+    copy->fault = NULL;
+    copy->action = NULL;
+    *copy->host = '\0';
+#ifndef WITH_LEAN
+#ifdef WITH_COOKIES
+    copy->cookies = soap_copy_cookies(soap);
+#else
+    copy->cookies = NULL;
+#endif
+    soap_init_logs(copy);
+#endif
+    copy->plugins = NULL;
+    for (p = soap->plugins; p; p = p->next)
+    { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin));
+      if (!q)
+        return NULL;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
+      *q = *p;
+      if (p->fcopy && (soap->error = p->fcopy(soap, q, p)))
+      { SOAP_FREE(q);
+        return NULL;
+      }
+      q->next = copy->plugins;
+      copy->plugins = q;
+    }
+  }
+  else
+    soap->error = SOAP_EOM;
+  return copy;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init(struct soap *soap)
+{ soap->version = 1; /* default SOAP 1.1 */
+  soap_imode(soap, SOAP_IO_DEFAULT);
+  soap_omode(soap, SOAP_IO_DEFAULT);
+  soap->copy = 0;
+  soap->plugins = NULL;
+  soap->user = NULL;
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->fpost = http_post;
+  soap->fget = http_get;
+  soap->fposthdr = http_post_header;
+  soap->fresponse = http_response;
+  soap->fparse = http_parse;
+  soap->fparsehdr = http_parse_header;
+  soap->fconnect = NULL;
+  soap->fdisconnect = NULL;
+#ifndef MAC_CARBON
+  soap->faccept = tcp_accept;
+  soap->fopen = tcp_connect;
+  soap->fclose = tcp_disconnect;
+  soap->fsend = fsend;
+  soap->frecv = frecv;
+#endif
+  soap->fprepare = NULL;
+  soap->fignore = NULL;
+  soap->fplugin = fplugin;
+  soap->fdimereadopen = NULL;
+  soap->fdimewriteopen = NULL;
+  soap->fdimereadclose = NULL;
+  soap->fdimewriteclose = NULL;
+  soap->fdimeread = NULL;
+  soap->fdimewrite = NULL;
+  soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
+  soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
+  soap->dime_id_format = "cid:id%d"; /* default DIME id format */
+  soap->http_version = "1.1";
+  soap->encodingStyle = SOAP_STR_EOS;
+  soap->actor = NULL;
+  soap->max_keep_alive = SOAP_MAXKEEPALIVE;
+  soap->keep_alive = 0;
+  soap->recv_timeout = 0;
+  soap->send_timeout = 0;
+  soap->connect_timeout = 0;
+  soap->accept_timeout = 0;
+  soap->socket_flags = 0;
+  soap->connect_flags = 0;
+  soap->bind_flags = 0;
+  soap->accept_flags = 0;
+  soap->ip = 0;
+  soap->labbuf = NULL;
+  soap->lablen = 0;
+  soap->labidx = 0;
+#ifndef WITH_NONAMESPACES
+  soap->namespaces = namespaces;
+#else
+  soap->namespaces = NULL;
+#endif
+  soap->local_namespaces = NULL;
+  soap->nlist = NULL;
+  soap->blist = NULL;
+  soap->clist = NULL;
+  soap->alist = NULL;
+  soap->attributes = NULL;
+  soap->header = NULL;
+  soap->fault = NULL;
+  soap->master = SOAP_INVALID_SOCKET;
+  soap->socket = SOAP_INVALID_SOCKET;
+  soap->os = NULL;
+  soap->is = NULL;
+  soap->dom = NULL;
+#ifndef UNDER_CE
+  soap->recvfd = 0;
+  soap->sendfd = 1;
+#else
+  soap->recvfd = stdin;
+  soap->sendfd = stdout;
+#endif 
+  soap->host[0] = '\0';
+  soap->port = 0;
+  soap->action = NULL;
+  soap->proxy_host = NULL;
+  soap->proxy_port = 8080;
+  soap->proxy_userid = NULL;
+  soap->proxy_passwd = NULL;
+#ifdef WITH_OPENSSL
+  soap->fsslauth = ssl_auth_init;
+  soap->fsslverify = ssl_verify_callback;
+  soap->bio = NULL;
+  soap->ssl = NULL;
+  soap->ctx = NULL;
+  soap->require_server_auth = 0;
+  soap->require_client_auth = 0;
+  soap->rsa = 0;
+  soap->keyfile = NULL;
+  soap->password = NULL;
+  soap->dhfile = NULL;
+  soap->cafile = NULL;
+  soap->capath = NULL;
+  soap->randfile = NULL;
+  soap->session = NULL;
+#endif
+#ifdef WITH_ZLIB
+  soap->zlib_state = SOAP_ZLIB_NONE;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.zalloc = NULL;
+  soap->d_stream.zfree = NULL;
+  soap->d_stream.opaque = NULL;
+  soap->z_level = 6;
+#endif
+#ifndef WITH_LEAN
+  soap->cookies = NULL;
+  soap->cookie_domain = NULL;
+  soap->cookie_path = NULL;
+  soap->cookie_max = 32;
+  soap_init_logs(soap);
+#endif
+/* WR[ */
+#ifdef WMW_RPM_IO
+  soap->rpmreqid = NULL;
+#endif /* WMW_RPM_IO */
+/* ]WR */
+  soap_init_iht(soap);
+  soap_init_pht(soap);
+  soap_begin(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init1(struct soap *soap, int mode)
+{ soap_init2(soap, mode, mode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_init2(struct soap *soap, int imode, int omode)
+{ soap_init(soap);
+  soap_imode(soap, imode);
+  soap_omode(soap, omode);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_begin(struct soap *soap)
+{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n"));
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0);
+  soap->null = 0;
+  soap->position = 0;
+  soap->encoding = 0;
+  soap->mustUnderstand = 0;
+  soap->mode = 0;
+  soap->ns = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  soap->error = SOAP_OK;
+  soap->peeked = 0;
+  soap->ahead = 0;
+  soap->idnum = 0;
+  soap->level = 0;
+  soap->endpoint[0] = '\0';
+  soap->dime_chunksize = 0;
+  soap->dime_buflen = 0;
+  soap->dot_net_bug = 0;
+  soap_free(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_end(struct soap *soap)
+{ register struct soap_clist *cp;
+  soap_free(soap);
+  soap_dealloc(soap, NULL);
+  while (soap->clist)
+  { cp = soap->clist->next;
+    SOAP_FREE(soap->clist);
+    soap->clist = cp;
+  }
+  soap_closesock(soap);
+#ifndef WITH_LEAN
+  soap_close_logfiles(soap);
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_namespaces(struct soap *soap, struct Namespace *p)
+{ struct Namespace *ns = soap->local_namespaces;
+  struct soap_nlist *np, *nq, *nr;
+  unsigned int level = soap->level;
+  soap->namespaces = p;
+  soap->local_namespaces = NULL;
+  soap_set_local_namespaces(soap);
+  /* reverse the list */
+  np = soap->nlist;
+  soap->nlist = NULL;
+  if (np)
+  { nq = np->next;
+    np->next = NULL;
+    while (nq)
+    { nr = nq->next;
+      nq->next = np;
+      np = nq;
+      nq = nr;
+    }
+  }
+  while (np)
+  { soap->level = np->level; /* preserve element nesting level */
+    if (np->ns)
+    { if (soap_push_namespace(soap, np->id, np->ns))
+        return soap->error;
+    }
+    else if (np->index >= 0 && ns)
+    { if (ns[np->index].out)
+      { if (soap_push_namespace(soap, np->id, ns[np->index].out))
+          return soap->error;
+      }
+      else if (soap_push_namespace(soap, np->id, ns[np->index].ns))
+        return soap->error;
+    }
+    if (np->ns)
+      SOAP_FREE(np->ns);
+    nq = np;
+    np = np->next;
+    SOAP_FREE(nq);
+  }
+  if (ns)
+  { int i;
+    for (i = 0; ns[i].id; i++)
+    { if (ns[i].out)
+      { SOAP_FREE(ns[i].out);
+        ns[i].out = NULL;
+      }
+    }
+    SOAP_FREE(ns);
+  }
+  soap->level = level; /* restore level */
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static void
+soap_set_local_namespaces(struct soap *soap)
+{ if (soap->namespaces && !soap->local_namespaces)
+  { register struct Namespace *ns;
+    register size_t n = 1;
+    for (ns = soap->namespaces; ns->id; ns++)
+      n++;
+    if (n > 3)
+    { n *= sizeof(struct Namespace);
+      ns = (struct Namespace*)SOAP_MALLOC(n);
+      if (ns)
+      { memcpy(ns, soap->namespaces, n);
+        ns[0].id = "SOAP-ENV";
+        ns[1].id = "SOAP-ENC";
+        ns[2].id = "xsi";
+        if (ns[0].ns)
+        { if (!strcmp(ns[0].ns, soap_env1))
+            soap->version = 1;
+          else
+            soap->version = 2;
+        }
+        soap->local_namespaces = ns;
+      }
+    }
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element(struct soap *soap, const char *tag, int id, const char *type)
+{ struct Namespace *ns = soap->local_namespaces;
+  register const char *s;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:""));
+/**/
+#ifdef WITH_DOM
+  if (soap->mode & SOAP_XML_DOM)
+  { register struct soap_dom_element *p, *e = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element));
+    e->next = NULL;
+    e->prnt = soap->dom;
+    e->nstr = NULL;
+    e->name = soap_strdup(soap, tag); /* check EOM? */
+    e->data = NULL;
+    e->type = 0;
+    e->node = NULL;
+    e->elts = NULL;
+    e->atts = NULL;
+    if (soap->dom)
+    { p = soap->dom->elts;
+      if (p)
+      { while (p->next)
+          p = p->next;
+        p->next = e;
+      }
+      else
+        soap->dom->elts = e;
+    }
+    soap->dom = e;
+  }
+  else
+#endif
+{
+  soap->level++;
+  if (!soap->ns && !(soap->mode & SOAP_XML_CANONICAL))
+    if (soap_send(soap, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"))
+      return soap->error;
+  if (soap_send_raw(soap, "<", 1))
+    return soap->error;
+  s = tag;
+  if (ns && soap->part != SOAP_IN_ENVELOPE && (soap->part == SOAP_IN_HEADER || !soap->encodingStyle))
+  { register const char *t = strchr(s, ':');
+    if (t)
+    { s = t + 1;
+      for (ns++; ns->id; ns++)
+      { if ((ns->out || ns->ns) && !strncmp(ns->id, tag, t - tag) && !ns->id[t - tag])
+        { if (soap_send(soap, s) || soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns))
+            return soap->error;
+         s = NULL;
+          break;
+        }
+      }
+    }
+  }
+  if (s)
+    if (soap_send(soap, tag))
+      return soap->error;
+}
+/**/
+  if (!soap->ns)
+  { for (ns = soap->local_namespaces; ns && ns->id; ns++)
+    { if (*ns->id && (ns->out || ns->ns))
+      { sprintf(soap->tmpbuf, "xmlns:%s", ns->id);
+        if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns))
+          return soap->error;
+      }
+    }   
+    soap->ns = 1;
+  }
+  if (id > 0)
+  { sprintf(soap->tmpbuf, "_%d", id);
+    if (soap_attribute(soap, "id", soap->tmpbuf))
+      return soap->error;
+  }
+  if (type && *type)
+  { if (soap_attribute(soap, "xsi:type", type))
+      return soap->error;
+  }
+  if (soap->null && soap->position > 0)
+  { int i;
+    sprintf(soap->tmpbuf, "[%d", soap->positions[0]);
+    for (i = 1; i < soap->position; i++)
+      sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]);
+    strcat(soap->tmpbuf, "]");
+    if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf))
+      return soap->error;
+  }
+  if (soap->mustUnderstand)
+  { if (soap->actor && *soap->actor)
+    { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor))
+        return soap->error;
+    }
+    if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1"))
+      return soap->error;
+    soap->mustUnderstand = 0;
+  }
+  if (soap->encoding)
+  { if (soap->encodingStyle)
+    { if (!*soap->encodingStyle && soap->local_namespaces)
+      { if (soap->local_namespaces[1].out)
+          soap->encodingStyle = soap->local_namespaces[1].out;
+        else
+          soap->encodingStyle = soap->local_namespaces[1].ns;
+      }
+      if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle))
+        return soap->error;
+    }
+    soap->encoding = 0;
+  }
+  soap->null = 0;
+  soap->position = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
+{ if (*tag == '-')
+    return SOAP_OK;
+  if (soap_element(soap, tag, id, type))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRRCHR
+SOAP_FMAC1
+char*
+SOAP_FMAC2
+soap_strrchr(const char *s, int t)
+{ register char *r = NULL;
+  while (*s)
+    if (*s++ == t)
+      r = (char*)s - 1;
+  return r;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOL
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_strtol(const char *s, char **t, int b)
+{ register long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { short neg = 0;
+    if (*s == '-')
+    { s++;
+      neg = 1;
+    }
+    else if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n > 214748364)
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+    if (neg)
+      n = -n;
+  }
+  else /* b == 16 and value is always positive */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x07FFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+#ifndef HAVE_STRTOUL
+SOAP_FMAC1
+unsigned long
+SOAP_FMAC2
+soap_strtoul(const char *s, char **t, int b)
+{ unsigned long n = 0;
+  register int c;
+  while (*s > 0 && *s <= 32)
+    s++;
+  if (b == 10)
+  { if (*s == '+')
+      s++;
+    while ((c = *s) && c >= '0' && c <= '9')
+    { if (n > 429496729)
+        break;
+      n *= 10;
+      n += c - '0';
+      s++;
+    }
+  }
+  else /* b == 16 */
+  { while ((c = *s))
+    { if (c >= '0' && c <= '9')
+        c -= '0';
+      else if (c >= 'A' && c <= 'F')
+        c -= 'A' - 10;
+      else if (c >= 'a' && c <= 'f')
+        c -= 'a' - 10;
+      if (n > 0x0FFFFFFF)
+        break;
+      n <<= 4;
+      n += c;
+      s++;
+    }
+  }
+  if (t)
+    *t = (char*)s;
+  return n;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
+{ if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
+    return soap->error;
+  if (soap->version == 2)
+  { const char *s;
+    s = soap_strrchr(type, '[');
+    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
+    { strncpy(soap->tmpbuf, type, s - type);
+      soap->tmpbuf[s - type] = '\0';
+      if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)))
+        return soap->error;
+      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
+        return soap->error;
+    }
+  }
+  else
+  { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset)))
+      return soap->error;
+    if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
+      return soap->error;
+  }
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_start_end_out(struct soap *soap, const char *tag)
+{ register struct soap_attribute *tp;
+/**/
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { for (tp = soap->attributes; tp; tp = tp->next)
+    { if (tp->visible)
+      { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+       a->next = soap->dom->atts;
+        a->nstr = NULL;
+        a->name = soap_strdup(soap, tp->name); /* check EOM */
+        a->data = soap_strdup(soap, tp->value); /* check EOM */
+        a->wide = NULL;
+       soap->dom->atts = a;
+        tp->visible = 0;
+      }
+    }
+    return SOAP_OK;
+  }
+#endif
+/**/
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible)
+    { if (soap_send_raw(soap, " ", 1)
+       || soap_send(soap, tp->name))
+        return soap->error;
+      if (tp->visible == 2 && tp->value)
+        if (soap_send_raw(soap, "=\"", 2)
+        || soap_string_out(soap, tp->value, 1)
+        || soap_send_raw(soap, "\"", 1))
+          return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if (tag)
+  { soap->level--;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { if (soap_send_raw(soap, ">", 1)
+       || soap_element_end_out(soap, tag))
+        return soap->error;
+      return SOAP_OK;
+    }
+#endif
+    return soap_send_raw(soap, "/>", 2);
+  }
+  return soap_send_raw(soap, ">", 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_out(struct soap *soap, const char *tag)
+{ if (*tag == '-')
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
+/**/
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { if (soap->dom->prnt)
+      soap->dom = soap->dom->prnt;
+    return SOAP_OK;
+  }
+#endif
+/**/
+  if (soap->part != SOAP_IN_ENVELOPE && (soap->part == SOAP_IN_HEADER || !soap->encodingStyle) && soap->local_namespaces)
+  { const char *s = strchr(tag, ':');
+    if (s && strncmp(tag, "SOAP-ENV", s - tag))
+      tag = s + 1;
+  }
+  soap->level--;
+  if (soap_send_raw(soap, "</", 2)
+   || soap_send(soap, tag)
+   || soap_send_raw(soap, ">", 1))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_ref(struct soap *soap, const char *tag, int id, int href)
+{ int n = 0;
+  if (soap_element(soap, tag, id, NULL))
+    return soap->error;
+  if (soap->version == 2)
+    n = 1;
+  sprintf(soap->tmpbuf, "#_%d", href);
+  if (soap_attribute(soap, "href" + n, soap->tmpbuf + n)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_href(struct soap *soap, const char *tag, int id, const char *href)
+{ if (soap_element(soap, tag, id, NULL)
+   || soap_attribute(soap, "href", href)
+   || soap_element_start_end_out(soap, tag))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
+{ struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (tp->visible)
+      break;
+  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
+  { if (soap_element(soap, tag, id, type))
+      return soap->error;
+    if (soap->part != SOAP_IN_HEADER && soap->encodingStyle)
+      if (soap_attribute(soap, "xsi:nil", "true"))
+        return soap->error;
+    return soap_element_start_end_out(soap, tag);
+  }
+  soap->null = 1;
+  soap->position = 0;
+  soap->mustUnderstand = 0;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_result(struct soap *soap, const char *tag)
+{ if (soap->version == 2 && soap->encodingStyle)
+    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+     || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
+     || soap_element_start_end_out(soap, NULL)
+     || soap_string_out(soap, tag, 0)
+     || soap_element_end_out(soap, "SOAP-RPC:result"))
+      return soap->error;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_attribute(struct soap *soap, const char *name, const char *value)
+{ 
+/**/
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
+    a->next = soap->dom->atts;
+    a->nstr = NULL;
+    a->name = soap_strdup(soap, name); /* check EOM */
+    a->data = soap_strdup(soap, value); /* check EOM */
+    a->wide = NULL;
+    soap->dom->atts = a;
+    return SOAP_OK;
+  }
+#endif
+/**/
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { if (soap_set_attr(soap, name, value))
+      return soap->error;
+  }
+  else
+#endif
+  { if (soap_send_raw(soap, " ", 1)
+     || soap_send(soap, name))
+      return soap->error;
+    if (value)
+      if (soap_send_raw(soap, "=\"", 2)
+       || soap_string_out(soap, value, 1)
+       || soap_send_raw(soap, "\"", 1))
+        return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_begin_in(struct soap *soap, const char *tag)
+{ if (tag && *tag == '-')
+    return SOAP_OK;
+  if (!soap_peek_element(soap))
+  { if (soap->other)
+      return soap->error = SOAP_TAG_MISMATCH;
+    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
+    { if (tag && !soap->encodingStyle)
+      { const char *s = strchr(tag, ':');
+        if (s)
+          soap_push_default_namespace(soap, tag, s - tag);
+      }
+      soap->peeked = 0;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" ));
+      if (soap->body)
+        soap->level++;
+    }
+  }
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_element_end_in(struct soap *soap, const char *tag)  
+{ register wchar c;
+  register char *s;
+  register const char *t;
+  if (tag && *tag == '-')
+    return SOAP_OK;
+  soap->level--;
+  soap_pop_namespace(soap);
+  if (soap->peeked)
+  { if (*soap->tag == '\0')
+    { soap->peeked = 0;
+      soap->error = SOAP_OK;
+    }
+    else
+      return soap->error = SOAP_SYNTAX_ERROR;
+  }
+  else
+  { while (((c = soap_get(soap)) != TT))
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      if (c == LT)
+        return soap->error = SOAP_SYNTAX_ERROR;
+    }
+  }
+  s = soap->tag;
+  do c = soap_get(soap);
+  while (soap_blank(c));
+  do
+  { *s++ = (char)c;
+    c = soap_get(soap);
+  } while (soap_notblank(c));
+  *s = '\0';
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  while (soap_blank(c))
+    c = soap_get(soap);
+  if (c != GT)
+    return soap->error = SOAP_SYNTAX_ERROR;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:""));
+  if (!tag)
+    return SOAP_OK;
+  if ((s = strchr(soap->tag, ':')))
+    s++;
+  else
+    s = soap->tag;
+  if ((t = strchr(tag, ':')))
+    t++;
+  else
+    t = tag;
+  if (!SOAP_STRCMP(s, t))
+    return SOAP_OK;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element does not match\n"));
+  return soap->error = SOAP_SYNTAX_ERROR;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+struct soap_attribute *
+SOAP_FMAC2
+soap_attr(struct soap *soap, const char *name)
+{ register struct soap_attribute *tp;
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!soap_match_tag(soap, tp->name, name))
+      return tp;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char *
+SOAP_FMAC2
+soap_attr_value(struct soap *soap, const char *name)
+{ register struct soap_attribute *tp = soap_attr(soap, name);
+  if (tp && tp->visible == 2)
+    return tp->value;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_attr(struct soap *soap, const char *name, const char *value)
+{ register struct soap_attribute *tp;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:""));
+  for (tp = soap->attributes; tp; tp = tp->next)
+    if (!strcmp(tp->name, name))
+      break;
+  if (!tp)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
+    if (!(tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(name))))
+      return soap->error = SOAP_EOM;
+    tp->ns = NULL;
+#ifndef WITH_LEAN
+    if (soap->mode & SOAP_XML_CANONICAL)
+    { struct soap_attribute **tpp = &soap->attributes;
+      const char *s = strchr(name, ':');
+      if (!strncmp(name, "xmlns", 5))
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0)
+            break;
+      }
+      else if (!s)
+      { for (; *tpp; tpp = &(*tpp)->next)
+          if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0))
+            break;
+      }
+      else
+      { int k;
+        for (; *tpp; tpp = &(*tpp)->next)
+       { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name])
+         { if (!tp->ns)
+            { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns));
+             tp->ns = (*tpp)->ns;
+           }
+         }
+          else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0)))
+            break;
+        }
+      }
+      tp->next = *tpp;
+      *tpp = tp;
+    }
+    else
+#endif
+    { tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    strcpy(tp->name, name);
+    tp->value = NULL;
+  }
+  else if (value && tp->value && tp->size <= strlen(value))
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
+    SOAP_FREE(tp->value);
+    tp->value = NULL;
+    tp->ns = NULL;
+  }
+  if (value)
+  { if (!tp->value)
+    { tp->size = strlen(value) + 1;
+      if (!(tp->value = (char*)SOAP_MALLOC(tp->size)))
+        return soap->error = SOAP_EOM;
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value));
+    }
+    strcpy(tp->value, value);
+    if (!strncmp(tp->name, "xmlns:", 6))
+      tp->ns = tp->value;
+    tp->visible = 2;
+  }
+  else
+    tp->visible = 1;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_attr(struct soap *soap)
+{ register struct soap_attribute *tp;
+#ifndef WITH_LEAN
+  if (soap->mode & SOAP_XML_CANONICAL)
+  { while (soap->attributes)
+    { tp = soap->attributes->next;
+      SOAP_FREE(soap->attributes->value);
+      SOAP_FREE(soap->attributes);
+      soap->attributes = tp;
+    }
+  }
+  else
+#endif
+  { for (tp = soap->attributes; tp; tp = tp->next)
+      tp->visible = 0;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int
+soap_getattrval(struct soap *soap, char *s, size_t n, wchar d)
+{ size_t i;
+  wchar c;
+  for (i = 0; i < n; i++)
+  { c = soap_getutf8(soap);
+    switch (c)
+    {
+    case TT:
+      *s++ = '<';
+      soap_unget(soap, '/');
+      break;
+    case LT:
+      *s++ = '<';
+      break;
+    case GT:
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '>';
+      break;
+    case QT:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '"';
+      break;
+    case AP:
+      if (c == d)
+      { *s = '\0';
+        return SOAP_OK;
+      }
+      *s++ = '\'';
+      break;
+    case '\t':
+    case '\n':
+    case '\r':
+    case ' ':
+    case '/':
+      if (d == ' ')
+      { soap_unget(soap, c);
+        *s = '\0';
+        return SOAP_OK;
+      }
+    default:
+      if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+      *s++ = (char)c;
+    }
+  }
+  return soap->error = SOAP_EOM;
+}
+#endif
+
+/******************************************************************************/
+#ifdef WITH_FAST
+#ifndef PALM_2
+static int 
+soap_append_lab(struct soap *soap, const char *s, size_t n)
+{ if (soap->labidx + n >= soap->lablen)
+  { register char *t = soap->labbuf;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
+    if (soap->lablen == 0)
+      soap->lablen = SOAP_LABLEN;
+    while (soap->labidx + n >= soap->lablen)
+      soap->lablen <<= 1;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
+    soap->labbuf = (char*)SOAP_MALLOC(soap->lablen);
+    if (!soap->labbuf)
+    { if (t)
+        free(t);
+      return soap->error = SOAP_EOM;
+    }
+    if (t && soap->labidx)
+    { memcpy(soap->labbuf, t, soap->labidx);
+      free(t);
+    }
+  }
+  if (s)
+  { memcpy(soap->labbuf + soap->labidx, s, n);
+    soap->labidx += n;
+  }
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_peek_element(struct soap *soap)
+{ struct soap_attribute *tp;
+  const char *t;
+  register char *s;
+  register wchar c;
+  register int i;
+  if (soap->peeked)
+  { if (*soap->tag == '\0')
+      return soap->error = SOAP_NO_TAG;
+    return SOAP_OK;
+  }
+  soap->peeked = 1;
+  for (;;)
+  { while (((c = soap_get(soap)) != LT) && c != TT)
+    { if ((int)c == EOF)
+        return soap->error = SOAP_EOF;
+    }
+    if (c == TT)
+    { *soap->tag = '\0';
+      return soap->error = SOAP_NO_TAG; /* ending tag found */
+    }
+    s = soap->tag;
+    do c = soap_get(soap);
+    while (soap_blank(c));
+    i = sizeof(soap->tag);
+    while (c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get(soap);
+    }
+    while (soap_blank(c))
+      c = soap_get(soap);
+    *s = '\0';
+    if (*soap->tag != '?')
+      break;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <%s?>\n", soap->tag));
+    while ((int)c != EOF && c != GT && c != '?')
+    { s = soap->tmpbuf;
+      i = sizeof(soap->tmpbuf) - 2;
+      while (c != '=' && c != GT && c != '?' && soap_notblank(c))
+      { if (--i > 0)
+          *s++ = (char)c;
+        c = soap_get(soap);
+      }
+      while (soap_blank(c))
+        c = soap_get(soap);
+      if (c == '=')
+      { *s++ = '=';
+       do c = soap_get(soap);
+        while (soap_blank(c));
+        if (c != QT && c != AP)
+        { soap_unget(soap, c);
+          c = ' '; /* blank delimiter */
+        }
+        if (soap_getattrval(soap, s, i, c) == SOAP_EOM)
+         while (soap_getattrval(soap, soap->tmpbuf, sizeof(soap->tmpbuf), c) == SOAP_EOM)
+           ;
+        else if (!strcmp(soap->tag, "?xml") && (!soap_tag_cmp(soap->tmpbuf, "encoding=iso-8859-1") || !soap_tag_cmp(soap->tmpbuf, "encoding=latin1")))
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML latin1 encoding\n"));
+          soap->mode |= SOAP_C_LATIN;
+        }
+      }
+      do c = soap_get(soap);
+      while (soap_blank(c));
+    }
+  }
+  soap->id[0] = '\0';
+  soap->href[0] = '\0';
+  soap->type[0] = '\0';
+  soap->arrayType[0] = '\0';
+  soap->arraySize[0] = '\0';
+  soap->arrayOffset[0] = '\0';
+  soap->other = 0;
+  soap->root = -1;
+  soap->position = 0;
+  soap->null = 0;
+  soap->mustUnderstand = 0;
+  soap_clr_attr(soap);
+  soap_pop_namespace(soap);
+  while ((int)c != EOF && c != GT && c != '/')
+  { s = soap->tmpbuf;
+    i = sizeof(soap->tmpbuf);
+    while (c != '=' && c != '/' && soap_notblank(c))
+    { if (--i > 0)
+        *s++ = (char)c;
+      c = soap_get(soap);
+    }
+    *s = '\0';
+    if (i == sizeof(soap->tmpbuf))
+      return soap->error = SOAP_SYNTAX_ERROR;
+    if (!strncmp(soap->tmpbuf, "xmlns:", 6))
+    { soap->tmpbuf[5] = '\0';
+      t = soap->tmpbuf + 6;
+    }
+    else if (!strcmp(soap->tmpbuf, "xmlns"))
+      t = SOAP_STR_EOS;
+    else
+      t = NULL;
+    tp = soap_attr(soap, soap->tmpbuf);
+    if (!tp)
+    { tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(soap->tmpbuf));
+      if (!tp)
+        return soap->error = SOAP_EOM;
+      strcpy(tp->name, soap->tmpbuf);
+      tp->value = NULL;
+      tp->size = 0;
+      tp->next = soap->attributes;
+      soap->attributes = tp;
+    }
+    while (soap_blank(c))
+      c = soap_get(soap);
+    if (c == '=')
+    { do c = soap_get(soap);
+      while (soap_blank(c));
+      if (c != QT && c != AP)
+      { soap_unget(soap, c);
+        c = ' '; /* blank delimiter */
+      }
+      if (soap_getattrval(soap, tp->value, tp->size, c))
+      {
+#ifdef WITH_FAST
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+       soap->labidx = 0;
+       if (soap_append_lab(soap, tp->value, tp->size))
+         return soap->error;
+       SOAP_FREE(tp->value);
+       for (;;)
+       { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c))
+         { if (soap->error != SOAP_EOM)
+             return soap->error;
+            soap->error = SOAP_OK;
+           soap->labidx = soap->lablen;
+           if (soap_append_lab(soap, NULL, 0))
+             return soap->error;
+         }
+         else
+           break;
+       }
+        tp->size = soap->lablen;
+       if (!(tp->value = (char*)SOAP_MALLOC(tp->size)))
+         return soap->error = SOAP_EOM;
+        memcpy(tp->value, soap->labbuf, soap->lablen);
+#else
+       size_t n;
+        if (soap->error != SOAP_EOM)
+          return soap->error;
+        soap->error = SOAP_OK;
+        if (soap_new_block(soap))
+          return soap->error;
+        for (;;)
+        { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN)))
+            return soap->error;
+          if (soap_getattrval(soap, s, SOAP_BLKLEN, c))
+          { if (soap->error != SOAP_EOM)
+              return soap->error;
+            soap->error = SOAP_OK;
+          }
+          else
+            break;
+        }
+       n = tp->size + soap->blist->size;
+        if (!(s = (char*)SOAP_MALLOC(n)))
+          return soap->error = SOAP_EOM;
+        if (tp->value)
+        { memcpy(s, tp->value, tp->size);
+          SOAP_FREE(tp->value);
+        }
+        soap_save_block(soap, s + tp->size);
+        tp->value = s;
+        tp->size = n;
+#endif
+      }
+      do c = soap_get(soap);
+      while (soap_blank(c));
+      tp->visible = 2; /* seen this attribute w/ value */
+    }
+    else
+      tp->visible = 1; /* seen this attribute w/o value */
+    if (t && tp->value)
+    { if (soap_push_namespace(soap, t, tp->value))
+        return soap->error;
+      tp->visible = 0;
+    }
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  for (tp = soap->attributes; tp; tp = tp->next)
+  { if (tp->visible && tp->value)
+    { if (!strcmp(tp->name, "id"))
+      { if (soap->part != SOAP_IN_HEADER || !soap->dot_net_bug)
+        { *soap->id = '#';
+          strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2);
+        }
+      }
+      else if (soap->version == 1 && !strcmp(tp->name, "href"))
+        strncpy(soap->href, tp->value, sizeof(soap->href) - 1);
+      else if (soap->version == 2 && !strcmp(tp->name, "ref"))
+      { *soap->href = '#';
+        strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2);
+      }
+      else if (!soap_match_tag(soap, tp->name, "xsi:type"))
+        strncpy(soap->type, tp->value, sizeof(soap->type) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType"))
+      { s = soap_strrchr(tp->value, '[');
+        if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType))
+        { strncpy(soap->arrayType, tp->value, s - tp->value);
+          soap->arrayType[s - tp->value] = '\0';
+          strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1);
+        }
+        else
+          strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      }
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType"))
+        strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1);
+      else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize"))
+        strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset"))
+        strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset));
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position"))
+        soap->position = soap_getposition(tp->value, soap->positions);
+      else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root"))
+        soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true")));
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor")
+            || !soap_match_tag(soap, tp->name, "SOAP-ENV:role"))
+      { if ((!soap->actor || strcmp(soap->actor, tp->value))
+         && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")
+         && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next"))
+          soap->other = 1;
+      }
+      else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand")
+            && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true")))
+        soap->mustUnderstand = 1;
+      else if ((!soap_match_tag(soap, tp->name, "xsi:null")
+             || !soap_match_tag(soap, tp->name, "xsi:nil"))
+            && (!strcmp(tp->value, "1")
+             || !strcmp(tp->value, "true")))
+        soap->null = 1;
+    }
+  }
+  if (!(soap->body = (c != '/')))
+    do c = soap_get(soap);
+    while (soap_blank(c));
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_retry(struct soap *soap)
+{ soap->peeked = 1;
+  soap->error = SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_revert(struct soap *soap)
+{ soap->peeked = 1;
+  if (soap->body)
+    soap->level--;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level));
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_string_out(struct soap *soap, const char *s, int flag)
+{ register const char *t;
+  register wchar c;
+  register wchar mask = 0x80000000;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->data = soap_strdup(soap, s); /* check EOM */
+    return SOAP_OK;
+  }
+#endif
+  if (soap->mode & SOAP_C_UTFSTRING)
+    mask = 0;
+  t = s;
+  while ((c = *t++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
+         return soap->error;
+        s = t;
+      }
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
+         return soap->error;
+        s = t;
+      }
+      break;
+    case 13:
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '&':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
+        return soap->error;
+      s = t;
+      break;
+    case '<':
+      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
+        return soap->error;
+      s = t;
+      break;
+    case '>':
+      if (!flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
+         return soap->error;
+        s = t;
+      }
+      break;
+    case '"':
+      if (flag)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
+         return soap->error;
+        s = t;
+      }
+      break;
+    default:
+#ifdef HAVE_MBTOWC
+      if (soap->mode & SOAP_C_MBSTRING)
+      { wchar_t wc;
+        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
+        if (m > 0 && wc != c)
+        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
+            return soap->error;
+         s = t + m - 1;
+         continue;
+        }
+      }
+#endif
+      if (c & mask)
+      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
+          return soap->error;
+        s = t;
+      }
+    }
+  }
+  return soap_send_raw(soap, s, t - s - 1);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_string_in(struct soap *soap, int flag)
+{ register char *s;
+  char *t = NULL;
+  register size_t i;
+  register int n = 0;
+  register int m = 0;
+  register wchar c;
+#ifdef HAVE_WCTOMB
+  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];
+#else
+  char buf[8];
+#endif
+#ifdef WITH_CDATA
+  if (!flag)
+  { register int state = 0;
+#ifdef WITH_FAST
+    soap->labidx = 0;                  /* use look-aside buffer */
+#else
+    if (soap_new_block(soap))
+      return NULL;
+#endif
+    for (;;)
+    { 
+#ifdef WITH_FAST
+      register size_t k;
+      if (soap_append_lab(soap, NULL, 0))      /* allocate more space in look-aside buffer if necessary */
+        return NULL;
+      s = soap->labbuf + soap->labidx; /* space to populate */
+      k = soap->lablen - soap->labidx; /* number of bytes available */
+      soap->labidx = soap->lablen;     /* claim this space */
+#else
+      register size_t k = SOAP_BLKLEN;
+      if (!(s = (char*)soap_push_block(soap, k)))
+        return NULL;
+#endif
+      for (i = 0; i < k; i++)
+      { if (m > 0)
+        { *s++ = *t++; /* copy multibyte characters */
+         m--;
+          continue;
+        }
+        c = soap_getchar(soap);
+       if ((int)c == EOF)
+          goto end;
+        if (c >= 0x80 && !(soap->mode & SOAP_C_LATIN))
+        { soap_unget(soap, c);
+         c = soap_getutf8(soap);
+         if (soap->mode & SOAP_C_UTFSTRING)
+          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < AP)
+            { c &= 0x7FFFFFFF;
+              t = buf;
+              if (c < 0x0800)
+                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+              else
+              { if (c < 0x010000)
+                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+                else
+                { if (c < 0x200000)
+                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+                  else
+                  { if (c < 0x04000000)
+                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                    else
+                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                    }
+                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+                  }     
+                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+              }
+              *t++ = (char)(0x80 | (c & 0x3F));
+             m = (int)(t - buf) - 1;
+              t = buf;
+              *s++ = *t++;
+              continue;
+           }
+          }
+        }
+       switch (state)
+        { case 1:
+            if (c == ']')
+             state = 4;
+           *s++ = c;
+           continue;
+         case 2:
+           if (c == '-')
+              state = 6;
+           *s++ = c;
+           continue;
+         case 3:
+           if (c == '?')
+             state = 8;
+           *s++ = c;
+           continue;
+          /* CDATA */
+         case 4:
+           if (c == ']')
+              state = 5;
+           else
+             state = 1;
+           *s++ = c;
+           continue;
+         case 5:
+           if (c == '>')
+             state = 0;
+           else
+             state = 1;
+           *s++ = c;
+           continue;
+          /* comment */
+          case 6:
+            if (c == '-')
+             state = 7;
+           else
+             state = 2;
+           *s++ = c;
+           continue;
+          case 7:
+            if (c == '>')
+             state = 0;
+           else
+             state = 2;
+           *s++ = c;
+           continue;
+          /* PI */
+         case 8:
+            if (c == '>')
+             state = 0;
+           else
+             state = 3;
+           *s++ = c;
+           continue;
+        }
+        switch (c)
+        {
+        case '/':
+          if (n > 0)
+          { c = soap_get1(soap);
+            if (c == '>')
+              n--;
+            soap_unget(soap, c);
+          }
+          *s++ = '/';
+          break;
+        case '<':
+         c = soap_get1(soap);
+         if (c == '/')
+         { if (n == 0)
+           { c = TT;
+             goto end;
+           }
+           n--;
+         }
+         else if (c == '!')
+         { c = soap_get1(soap);
+           if (c == '[')
+            { do c = soap_get1(soap);
+              while ((int)c != EOF && c != '[');
+              if ((int)c == EOF)
+                 goto end;
+             t = (char*)"![CDATA[";
+             state = 1;
+           }
+            else if (c == '-')
+           { if ((c = soap_get1(soap)) == '-')
+               state = 2;
+             t = (char*)"!-";
+             soap_unget(soap, c);
+           }
+           else
+           { t = (char*)"!";
+             soap_unget(soap, c);
+           }
+           *s++ = '<';
+           break;
+         }
+         else if (c == '?')
+           state = 3;
+         else
+           n++;
+          soap_unget(soap, c);
+          *s++ = '<';
+          break;
+        case '>':
+          *s++ = '>';
+          break;
+        case '"':
+          *s++ = '"';
+          break;
+        default:
+#ifdef HAVE_WCTOMB
+          if (soap->mode & SOAP_C_MBSTRING)
+          { m = wctomb(buf, c & 0x7FFFFFFF);
+            if (m >= 1)
+            { t = buf;
+              *s++ = *t++;
+              m--;
+            }
+            else
+              *s++ = SOAP_UNKNOWN_CHAR;
+          }
+          else
+#endif
+            *s++ = (char)(c & 0xFF);
+        }
+      }
+    }
+  }
+#endif
+#ifdef WITH_FAST
+  soap->labidx = 0;                    /* use look-aside buffer */
+#else
+  if (soap_new_block(soap))
+    return NULL;
+#endif
+  for (;;)
+  { 
+#ifdef WITH_FAST
+    register size_t k;
+    if (soap_append_lab(soap, NULL, 0))        /* allocate more space in look-aside buffer if necessary */
+      return NULL;
+    s = soap->labbuf + soap->labidx;   /* space to populate */
+    k = soap->lablen - soap->labidx;   /* number of bytes available */
+    soap->labidx = soap->lablen;       /* claim this space */
+#else
+    register size_t k = SOAP_BLKLEN;
+    if (!(s = (char*)soap_push_block(soap, k)))
+      return NULL;
+#endif
+    for (i = 0; i < k; i++)
+    { if (m > 0)
+      { *s++ = *t++;   /* copy multibyte characters */
+        m--;
+        continue;
+      }
+      if (soap->mode & SOAP_C_UTFSTRING)
+      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < AP)
+        { c &= 0x7FFFFFFF;
+          t = buf;
+          if (c < 0x0800)
+            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
+          else
+          { if (c < 0x010000)
+              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
+            else
+            { if (c < 0x200000)
+                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
+              else
+              { if (c < 0x04000000)
+                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
+                else
+                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
+                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
+                }
+                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
+              }     
+              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
+            }
+            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
+          }
+          *t++ = (char)(0x80 | (c & 0x3F));
+         m = (int)(t - buf) - 1;
+          t = buf;
+          *s++ = *t++;
+          continue;
+        }
+      }
+      else if (soap->mode & SOAP_C_LATIN)
+        c = soap_get(soap);
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case LT:
+        n++;
+        *s++ = '<';
+        break;
+      case GT:
+        *s++ = '>';
+        break;
+      case QT:
+        *s++ = '"';
+        break;
+      case AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_get(soap);
+          if (c == GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = '<';
+        else
+        { *s++ = '&';
+          t = (char*)"lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = '>';
+        else
+        { *s++ = '&';
+          t = (char*)"gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = '"';
+        else
+        { *s++ = '&';
+          t = (char*)"quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+#ifdef HAVE_WCTOMB
+        if (soap->mode & SOAP_C_MBSTRING)
+        { m = wctomb(buf, c & 0x7FFFFFFF);
+          if (m >= 1)
+          { t = buf;
+            *s++ = *t++;
+            m--;
+          }
+          else
+            *s++ = SOAP_UNKNOWN_CHAR;
+        }
+        else
+#endif
+          *s++ = (char)(c & 0xFF);
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+#ifdef WITH_FAST
+  t = soap_strdup(soap, soap->labbuf);
+#else
+  soap_size_block(soap, i+1);
+  t = soap_save_block(soap, NULL);
+#endif
+  if (flag == 2)
+    if (soap_s2QName(soap, t, &t))
+      return NULL;
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_wstring_out(struct soap *soap, const wchar_t *s, int flag)
+{ const char *t;
+  char tmp;
+  register wchar c;
+#ifdef WITH_DOM
+  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
+  { soap->dom->wide = NULL; /* soap_malloc() ??? */
+    return SOAP_OK;
+  }
+#endif
+  while ((c = *s++))
+  { switch (c)
+    { 
+    case 9:
+      if (flag)
+        t = "&#x9;";
+      else
+        t = "\t";
+      break;
+    case 10:
+      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
+        t = "&#xA;";
+      else
+        t = "\n";
+      break;
+    case 13:
+      t = "&#xD;";
+      break;
+    case '&':
+      t = "&amp;";
+      break;
+    case '<':
+      t = "&lt;";
+      break;
+    case '>':
+      if (flag)
+        t = ">";
+      else
+       t = "&gt;";
+      break;
+    case '"':
+      if (flag)
+        t = "&quot;";
+      else
+        t = "\"";
+      break;
+    default:
+      if (c > 0 && c < 0x80)
+      { tmp = (char)c;
+        if (soap_send_raw(soap, &tmp, 1))
+          return soap->error;
+      }
+      else if (soap_pututf8(soap, (unsigned long)c))
+        return soap->error;
+      continue;
+    }
+    if (soap_send(soap, t))
+      return soap->error;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t *
+SOAP_FMAC2
+soap_wstring_in(struct soap *soap, int flag)
+{ wchar_t *s;
+  register int i, n = 0;
+  register wchar c;
+  const char *t = NULL;
+  if (soap_new_block(soap))
+    return NULL;
+  for (;;)
+  { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
+      return NULL;
+    for (i = 0; i < SOAP_BLKLEN; i++)
+    { if (t)
+      { *s++ = (wchar_t)*t++;
+        if (!*t)
+          t = NULL;
+        continue;
+      }
+      if (soap->mode & SOAP_C_LATIN)
+        c = soap_get(soap);
+      else
+        c = soap_getutf8(soap);
+      switch (c)
+      {
+      case TT:
+        if (n == 0)
+          goto end;
+        n--;
+        *s++ = '<';
+        soap_unget(soap, '/');
+        break;
+      case LT:
+        n++;
+        *s++ = '<';
+        break;
+      case GT:
+        *s++ = '>';
+        break;
+      case QT:
+        *s++ = '"';
+        break;
+      case AP:
+        *s++ = '\'';
+        break;
+      case '/':
+        if (n > 0)
+        { c = soap_getutf8(soap);
+          if (c == GT)
+            n--;
+          soap_unget(soap, c);
+        }
+        *s++ = '/';
+        break;
+      case '<':
+        if (flag)
+          *s++ = (wchar)'<';
+        else
+        { *s++ = (wchar)'&';
+          t = "lt;";
+        }
+        break;
+      case '>':
+        if (flag)
+          *s++ = (wchar)'>';
+        else
+        { *s++ = (wchar)'&';
+          t = "gt;";
+        }
+        break;
+      case '"':
+        if (flag)
+          *s++ = (wchar)'"';
+        else
+        { *s++ = (wchar)'&';
+          t = "quot;";
+        }
+        break;
+      default:
+        if ((int)c == EOF)
+          goto end;
+        *s++ = (wchar_t)c & 0x7FFFFFFF;
+      }
+    }
+  }
+end:
+  soap_unget(soap, c);
+  *s = '\0';
+  soap_size_block(soap, sizeof(wchar_t) * (i + 1));
+  return (wchar_t*)soap_save_block(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_int2s(struct soap *soap, int n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n)
+{ long m = (long)*p;
+  return soap_outlong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2int(struct soap *soap, const char *s, int *p)
+{ if (s)
+  { char *r;
+    *p = (int)soap_strtol(s, &r, 10);
+    if (*r)
+      return soap->error = SOAP_TYPE;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int *
+SOAP_FMAC2
+soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0);
+  if (p && soap->body && !*soap->href)
+    soap_s2int(soap, soap_value(soap), p);
+  else
+    p = (int*)soap_id_forward(soap, soap->href, p, t, sizeof(int));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_long2s(struct soap *soap, long n)
+{ sprintf(soap->tmpbuf, "%ld", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_long2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2long(struct soap *soap, const char *s, long *p)
+{ if (s)
+  { char *r;
+    *p = soap_strtol(s, &r, 10);
+    if (*r)
+      return soap->error = SOAP_TYPE;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+long *
+SOAP_FMAC2
+soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0);
+  if (p && soap->body && !*soap->href)
+    soap_s2long(soap, soap_value(soap), p);
+  else
+    p = (long*)soap_id_forward(soap, soap->href, p, t, sizeof(long));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_LONG642s(struct soap *soap, LONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_LONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p)
+{ if (s && sscanf(s, SOAP_LONG_FORMAT, p) != 1)
+    return soap->error = SOAP_TYPE;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+LONG64 *
+SOAP_FMAC2
+soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0);
+  if (soap->body && !*soap->href)
+    soap_s2LONG64(soap, soap_value(soap), p);
+  else
+    p = (LONG64*)soap_id_forward(soap, soap->href, p, t, sizeof(LONG64));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_byte2s(struct soap *soap, char n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n)
+{ long m = (long)*p;
+  return soap_outlong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2byte(struct soap *soap, const char *s, char *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (*r || n < -128 || n > 127)
+      return soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0);
+  if (soap->body && !*soap->href)
+    soap_s2byte(soap, soap_value(soap), p);
+  else
+    p = (char*)soap_id_forward(soap, soap->href, p, t, sizeof(char));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_short2s(struct soap *soap, short n)
+{ return soap_long2s(soap, (long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n)
+{ long m = (long)*p;
+  return soap_outlong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2short(struct soap *soap, const char *s, short *p)
+{ if (s)
+  { long n;
+    char *r;
+    n = soap_strtol(s, &r, 10);
+    if (*r || n < -32768 || n > 32767)
+      return soap->error = SOAP_TYPE;
+    *p = (char)n;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+short *
+SOAP_FMAC2
+soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0);
+  if (soap->body && !*soap->href)
+    soap_s2short(soap, soap_value(soap), p);
+  else
+    p = (short*)soap_id_forward(soap, soap->href, p, t, sizeof(short));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_float2s(struct soap *soap, float n)
+{ const char *s;
+  if (isnan(n))
+    s = "NaN";
+  else if (n >= FLT_PINFTY)
+    s = "INF";
+  else if (n <= FLT_NINFTY)
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->float_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_float2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2float(struct soap *soap, const char *s, float *p)
+{ if (s)
+  { if (!soap_tag_cmp(s, "INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = FLT_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = FLT_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = FLT_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = (float)strtod(s, &r);
+      if (*r)
+#endif
+        if (sscanf(s, soap->float_format, p) != 1)
+          return soap->error = SOAP_TYPE;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+static int soap_isnumeric(struct soap *soap, const char *type)
+{ if (soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":float")
+   && soap_match_tag(soap, soap->type, ":double")
+   && soap_match_tag(soap, soap->type, ":decimal")
+   && soap_match_tag(soap, soap->type, ":integer")
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":negativeInteger")
+   && soap_match_tag(soap, soap->type, ":nonPositiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":long")
+   && soap_match_tag(soap, soap->type, ":int")
+   && soap_match_tag(soap, soap->type, ":short")
+   && soap_match_tag(soap, soap->type, ":byte")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return SOAP_ERR;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+float *
+SOAP_FMAC2
+soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0);
+  if (soap->body && !*soap->href)
+    soap_s2float(soap, soap_value(soap), p);
+  else
+    p = (float*)soap_id_forward(soap, soap->href, p, t, sizeof(float));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_double2s(struct soap *soap, double n)
+{ const char *s;
+  if (isnan(n))
+    s = "NaN";
+  else if (n >= DBL_PINFTY)
+    s = "INF";
+  else if (n <= DBL_NINFTY)
+    s = "-INF";
+  else
+  { sprintf(soap->tmpbuf, soap->double_format, n);
+    s = soap->tmpbuf;
+  }
+  return s;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_double2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2double(struct soap *soap, const char *s, double *p)
+{ if (s)
+  { if (!soap_tag_cmp(s, "INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "+INF"))
+      *p = DBL_PINFTY;
+    else if (!soap_tag_cmp(s, "-INF"))
+      *p = DBL_NINFTY;
+    else if (!soap_tag_cmp(s, "NaN"))
+      *p = DBL_NAN;
+    else
+    {
+#ifdef HAVE_STRTOD
+      char *r;
+      *p = strtod(s, &r);
+      if (*r)
+#endif
+        if (sscanf(s, soap->double_format, p) != 1)
+          return soap->error = SOAP_TYPE;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+double *
+SOAP_FMAC2
+soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type != '\0' && soap_isnumeric(soap, type))
+    return NULL;
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0);
+  if (soap->body && !*soap->href)
+    soap_s2double(soap, soap_value(soap), p);
+  else
+    p = (double*)soap_id_forward(soap, soap->href, p, t, sizeof(double));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedByte2s(struct soap *soap, unsigned char n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n)
+{ unsigned long m = (unsigned long)*p;
+  return soap_outunsignedLong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (*r || n > 255)
+      return soap->error = SOAP_TYPE;
+    *p = (unsigned char)n;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned char *
+SOAP_FMAC2
+soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0);
+  if (soap->body && !*soap->href)
+    soap_s2unsignedByte(soap, soap_value(soap), p);
+  else
+    p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned char));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedShort2s(struct soap *soap, unsigned short n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n)
+{ unsigned long m = (unsigned long)*p;
+  return soap_outunsignedLong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p)
+{ if (s)
+  { unsigned long n;
+    char *r;
+    n = soap_strtoul(s, &r, 10);
+    if (*r || n > 65535)
+      return soap->error = SOAP_TYPE;
+    *p = (unsigned short)n;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+unsigned short *
+SOAP_FMAC2
+soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0);
+  if (soap->body && !*soap->href)
+    soap_s2unsignedShort(soap, soap_value(soap), p);
+  else
+    p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned short));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedInt2s(struct soap *soap, unsigned int n)
+{ return soap_unsignedLong2s(soap, (unsigned long)n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n)
+{ unsigned long m = (unsigned long)*p;
+  return soap_outunsignedLong(soap, tag, id, &m, type, n);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p)
+{ if (s)
+  { char *r;
+    *p = (unsigned int)soap_strtoul(s, &r, 10);
+    if (*r)
+      return soap->error = SOAP_TYPE;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned int *
+SOAP_FMAC2
+soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0);
+  if (soap->body && !*soap->href)
+    soap_s2unsignedInt(soap, soap_value(soap), p);
+  else
+    p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned int));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_unsignedLong2s(struct soap *soap, unsigned long n)
+{ sprintf(soap->tmpbuf, "%lu", n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p)
+{ if (s)
+  { char *r;
+    *p = soap_strtoul(s, &r, 10);
+    if (*r)
+      return soap->error = SOAP_TYPE;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+unsigned long *
+SOAP_FMAC2
+soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0);
+  if (soap->body && !*soap->href)
+    soap_s2unsignedLong(soap, soap_value(soap), p);
+  else
+    p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned long));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_ULONG642s(struct soap *soap, ULONG64 n)
+{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n);
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_ULONG642s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p)
+{ if (s && sscanf(s, SOAP_ULONG_FORMAT, p) != 1)
+    return soap->error = SOAP_TYPE;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+ULONG64 *
+SOAP_FMAC2
+soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":positiveInteger")
+   && soap_match_tag(soap, soap->type, ":nonNegativeInteger")
+   && soap_match_tag(soap, soap->type, ":unsignedLong")
+   && soap_match_tag(soap, soap->type, ":unsignedInt")
+   && soap_match_tag(soap, soap->type, ":unsignedShort")
+   && soap_match_tag(soap, soap->type, ":unsignedByte"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0);
+  if (soap->body && !*soap->href)
+    soap_s2ULONG64(soap, soap_value(soap), p);
+  else
+    p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, sizeof(ULONG64));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2string(struct soap *soap, const char *s, char **t)
+{ *t = NULL;
+  if (s && !(*t = soap_strdup(soap, s)))
+    return soap->error = SOAP_EOM;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2QName(struct soap *soap, const char *s, char **t)
+{ if (s)
+  { struct soap_nlist *np = soap->nlist;
+    const char *p = strchr(s, ':');
+    if (p)
+    { int n = p - s;
+      while (np && (np->index == -2 || strncmp(np->id, s, n) || np->id[n]))
+        np = np->next;
+      p++;
+    }
+    else
+    { while (np && *np->id)
+        np = np->next;
+      p = s;
+    }
+    if (np)
+    { if (np->index >= 0 && soap->local_namespaces)
+      { const char *q = soap->local_namespaces[np->index].id;
+        if (q)
+        { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2)))
+            sprintf(*t, "%s:%s", q, p);
+          return SOAP_OK;
+        }
+      }
+      if (np->ns)
+      { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4)))
+          sprintf(*t, "\"%s\":%s", np->ns, p);
+        return SOAP_OK;
+      }
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:""));
+      return soap->error = SOAP_NAMESPACE; 
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s));
+    if ((*t = (char*)soap_malloc(soap, strlen(p) + 4)))
+      sprintf(*t, "\"\":%s", p);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_QName2s(struct soap *soap, const char *s)
+{ struct Namespace *p;
+  char *t;
+  int n;
+  if (!s || *s != '"')
+    return s;
+  s++;
+  if ((p = soap->local_namespaces))
+  { for (; p->id; p++)
+    { if (p->ns)
+        if (!soap_tag_cmp(s, p->ns))
+          break;
+      if (p->in)
+        if (!soap_tag_cmp(s, p->in))
+          break;
+    }
+    if (p && p->id)
+    { s = strchr(s, '"');
+      if (s)
+      { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s));
+        strcpy(t, p->id);
+       strcat(t, s + 1);
+        return t;
+      }
+    }
+  }
+  t = (char*)strchr(s, '"');
+  if (t)
+    n = t - s;
+  else
+    n = 0;
+  t = soap_strdup(soap, s);
+  t[n] = '\0';
+  sprintf(soap->tmpbuf, "xmlns:_%lu", soap->idnum++);
+  soap_set_attr(soap, soap->tmpbuf, t);
+  s = strchr(s, '"');
+  if (s)
+  { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6);
+    strcpy(t, soap->tmpbuf + 6);
+    strcat(t, s + 1);
+  }
+  return t;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) 
+{ if (!*p)
+  { if (soap_element_null(soap, tag, id, type))
+      return soap->error;
+  }
+  else
+  { struct soap_plist *pp;
+    int i = soap_pointer_lookup(soap, *p, n, &pp);
+    if (id > 0)
+    { if (i)
+      { if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        soap_set_embedded(soap, pp);
+      }
+      else
+      { i = soap_pointer_enter(soap, *p, n, &pp);
+        if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 0;
+        else
+          pp->mark2 = 0;
+      }
+    }
+    else if (i)
+    { if (soap_is_embedded(soap, pp))
+      { if (soap_element_ref(soap, tag, 0, i))
+          return soap->error;
+      }
+      else if (soap_is_single(soap, pp))
+      { if (soap_element_begin_out(soap, tag, 0, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+      }
+      else
+      { if (soap_element_begin_out(soap, tag, i, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        soap_set_embedded(soap, pp);
+      }
+    }
+    else
+    { soap_pointer_enter(soap, *p, n, &pp);
+      if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+        return soap->error;
+      if (soap->mode & SOAP_IO_LENGTH)
+        pp->mark1 = 0;
+      else
+        pp->mark2 = 0;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { p = (char**)soap_id_enter(soap, soap->id, p, t, sizeof(char**), 0);
+    if (p)
+      *p = NULL;
+  }
+  else if (soap->body && !*soap->href)
+  { if (soap_match_tag(soap, soap->type, "PointerTostring") == 0)
+    { p = (char**)soap_id_enter(soap, soap->id, p, t, sizeof(char**), 0);
+      p = (char**)soap_instring(soap, "string", p, type, t, flag);
+    }
+    else
+    { if (!p)
+        if ((p = (char**)soap_id_enter(soap, SOAP_STR_EOS, p, t, sizeof(char**), 0)) == NULL)
+          return NULL;
+      *p = (char*)soap_id_enter(soap, soap->id, soap_string_in(soap, flag), t, 0, 0);
+    }
+  }
+  else
+    p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char*), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) 
+{ if (!*p)
+  { if (soap_element_null(soap, tag, id, type))
+      return soap->error;
+  }
+  else
+  { struct soap_plist *pp;
+    int i = soap_pointer_lookup(soap, *p, n, &pp);
+    if (id > 0)
+    { if (i)
+      { if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        soap_set_embedded(soap, pp);
+      }
+      else
+      { i = soap_pointer_enter(soap, *p, n, &pp);
+        if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        if (soap->mode & SOAP_IO_LENGTH)
+          pp->mark1 = 0;
+        else
+          pp->mark2 = 0;
+      }
+    }
+    else if (i)
+    { if (soap_is_embedded(soap, pp))
+      { if (soap_element_ref(soap, tag, 0, i))
+          return soap->error;
+      }
+      else if (soap_is_single(soap, pp))
+      { if (soap_element_begin_out(soap, tag, 0, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+      }
+      else
+      { if (soap_element_begin_out(soap, tag, i, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+          return soap->error;
+        soap_set_embedded(soap, pp);
+      }
+    }
+    else
+    { if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag))
+        return soap->error;
+      if (soap->mode & SOAP_IO_LENGTH)
+        pp->mark1 = 0;
+      else
+        pp->mark2 = 0;
+    }
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { p = (wchar_t**)soap_id_enter(soap, soap->id, p, t, sizeof(wchar_t**), 0);
+    if (p)
+      *p = NULL;
+  }
+  else if (soap->body && !*soap->href)
+  { if (soap_match_tag(soap, soap->type, "PointerTostring") == 0)
+      p = (wchar_t**)soap_inwstring(soap, "string", (wchar_t**)soap_id_enter(soap, soap->id, p, t, sizeof(wchar_t**), 0), type, t);
+    else
+    { if (!p)
+        if (!(p = (wchar_t**)soap_id_enter(soap, SOAP_STR_EOS, p, t, sizeof(wchar_t**), 0)))
+          return NULL;
+      *p = (wchar_t*)soap_id_enter(soap, soap->id, soap_wstring_in(soap, 1), t, 0, 0);
+    }
+  }
+  else
+    p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t*), 0);
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+static time_t
+soap_timegm(struct tm *T)
+{
+#if defined(HAVE_TIMEGM)
+  return timegm(T);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone t;
+  struct timeval tv;
+  gettimeofday(&tv, &t); /* doesn't work properly on Solaris */
+  T->tm_min -= t.tz_minuteswest;
+  T->tm_isdst = (t.tz_dsttime != 0);
+  return mktime(T);
+/* WR[ */
+  /* The following define was added for VxWorks*/
+#elif defined(HAVE_MKTIME)
+  /* FOR VXWORKS:
+  vxWorks does not seem to have any variable representation of time zones, but
+  timezone information can be set in INSTALL_DIR/target/h/private/timeP.h header
+  file, by setting the ZONEBUFFER define.  The ZONEBUFFER define follows this 
+  format:
+  
+    name_of_zone:<(unused)>:time_in_minutes_from_UTC:daylight_start:daylight_end 
+    
+  To calculate local time, the value of time_in_minutes_from_UTC is subtracted
+  from UTC; time_in_minutes_from_UTC must be positive. Daylight information is 
+  expressed as mmddhh (month-day-hour), for example: 
+
+    UTC::0:040102:100102
+    
+  */
+  return mktime(T);
+/* ]WR */
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+  t.timezone = 0;
+  t.dstflag = -1;
+  ftime(&t);
+  T->tm_min -= t.timezone;
+  T->tm_isdst = t.dstflag; /* doesn't work properly on Solaris */
+  return mktime(T);
+#else
+#warning "time_t (de)serialization is not MT safe on this platform"
+  time_t t;
+  char *tz = getenv("TZ");
+  putenv("TZ=UTC");
+  tzset();
+  t = mktime(T);
+  if (tz)
+  { char tmp[16];
+    strcpy(tmp, "TZ=");
+    strncat(tmp, tz, 12);
+    tmp[15] = '\0';
+    putenv(tmp);
+  }
+  else
+    putenv("TZ=");
+  tzset();
+  return t;
+#endif
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_dateTime2s(struct soap *soap, time_t n)
+{ struct tm T;
+  struct tm *pT = &T;
+#if defined(HAVE_GMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+/* WR[ */
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PGMTIME_R)
+  if (gmtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_PGMTIME)
+  if (gmtime(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+/* ]WR */
+#elif defined(HAVE_GMTIME)
+  if ((pT = gmtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT);
+#elif defined(HAVE_GETTIMEOFDAY)
+  struct timezone t;
+#if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { struct timeval tv;
+    gettimeofday(&tv, &t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.tz_minuteswest/60-(t.tz_dsttime!=0), abs(t.tz_minuteswest)%60);
+  }
+#else
+  if ((pT = localtime(&n)))
+  { struct timeval tv;
+    gettimeofday(&tv, &t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.tz_minuteswest/60-(t.tz_dsttime!=0), abs(t.tz_minuteswest)%60);
+  }
+#endif
+#elif defined(HAVE_FTIME)
+  struct timeb t;
+#if defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60-(t.dstflag!=0), abs(t.timezone)%60);
+  }
+/* WR[ */
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+  { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60);
+  }
+/* ]WR */
+#else
+  if ((pT = localtime(&n)))
+  { ftime(&t);
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+    sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60-(t.dstflag!=0), abs(t.timezone)%60);
+  }
+#endif
+#elif defined(HAVE_LOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+/* WR[ */
+  /* The following defines were added for VxWorks*/
+#elif defined(HAVE_PLOCALTIME_R)
+  if (localtime_r(&n, pT))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+/* ]WR */
+#else
+  if ((pT = localtime(&n)))
+    strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT);
+#endif
+  else
+    strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z");
+  return soap->tmpbuf;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n)
+{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type)
+   || soap_string_out(soap, soap_dateTime2s(soap, *p), 0))
+    return soap->error;
+  return soap_element_end_out(soap, tag);
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2dateTime(struct soap *soap, const char *s, time_t *p)
+{ if (s)
+  { struct tm T;
+    char zone[16];
+    memset(&T, 0, sizeof(struct tm));
+    zone[sizeof(zone)-1] = '\0';
+    sscanf(s, "%d-%d-%dT%d:%d:%d%15s", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone);
+    if (T.tm_year == 1)
+      T.tm_year = 70;
+    else
+      T.tm_year -= 1900;
+    T.tm_mon--;
+    if (*zone)
+    { if (*zone == '.')
+      { for (s = zone + 1; *s; s++)
+          if (*s < '0' || *s > '9')
+            break;
+      }
+      else
+        s = zone;
+      if (*s != 'Z')
+      { int h = 0, m = 0;
+        sscanf(s, "%d:%d", &h, &m);
+        T.tm_hour -= h;
+        if (h >= 0)
+          T.tm_min -= m;
+        else
+          T.tm_min += m;
+      }
+      *p = soap_timegm(&T);
+    }
+    else
+      *p = mktime(&T); /* no time zone: suppose it is localtime? */
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+time_t *
+SOAP_FMAC2
+soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (soap->null)
+  { if (soap->mode & SOAP_XML_NIL)
+    { soap->error = SOAP_NULL;
+      return NULL;
+    }
+    return p;
+  }
+  if (*soap->type
+   && soap_match_tag(soap, soap->type, type)
+   && soap_match_tag(soap, soap->type, ":dateTime"))
+  { soap->error = SOAP_TYPE;
+    soap_revert(soap);
+    return NULL;
+  }
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0);
+  if (soap->body && !*soap->href)
+    soap_s2dateTime(soap, soap_value(soap), p);
+  else
+    p = (time_t*)soap_id_forward(soap, soap->href, p, t, sizeof(time_t));
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outliteral(struct soap *soap, const char *tag, char *const*p)
+{ int i;
+  const char *t = NULL;
+  if (tag && *tag != '-')
+  { if ((t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p && *p)
+  { if (soap_send(soap, *p))
+      return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char **
+SOAP_FMAC2
+soap_inliteral(struct soap *soap, const char *tag, char **p)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (!p)
+    if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
+      return NULL;
+  if (soap->null)
+    *p = NULL;
+  else if (soap->body)
+    *p = soap_string_in(soap, 0);
+  else
+    *p = NULL;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
+{ int i;
+  const char *t = NULL;
+  wchar_t c;
+  const wchar_t *s;
+  if (tag && *tag != '-')
+  { if (tag && (t = strchr(tag, ':')))
+    { strncpy(soap->tmpbuf, tag, t-tag);
+      soap->tmpbuf[t-tag] = '\0';
+      for (i = 0; soap->local_namespaces[i].id; i++)
+        if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id))
+          break;
+      t++;
+      sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS);
+    }
+    else
+    { t = tag;
+      sprintf(soap->tmpbuf, "<%s>", tag);
+    }
+    if (soap_send(soap, soap->tmpbuf))
+      return soap->error;
+  }
+  if (p)
+  { s = *p;
+    while ((c = *s++))
+      if (soap_pututf8(soap, (unsigned char)c))
+        return soap->error;
+  }
+  if (t)
+  { sprintf(soap->tmpbuf, "</%s>", t);
+    return soap_send(soap, soap->tmpbuf);
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+wchar_t **
+SOAP_FMAC2
+soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
+{ if (soap_element_begin_in(soap, tag))
+    return NULL;
+  if (!p)
+    if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
+      return NULL;
+  if (soap->null)
+    *p = NULL;
+  else if (soap->body)
+    *p = soap_wstring_in(soap, 0);
+  else
+    *p = NULL;
+  if (soap->body && soap_element_end_in(soap, tag))
+    return NULL;
+  return p;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_value(struct soap *soap)
+{ size_t i;
+  wchar c = 0;
+  char *s;
+  s = soap->tmpbuf;
+  for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++)
+  { c = soap_get(soap);
+    if (c == TT || (int)c == EOF || soap_blank(c))
+      break;
+    *s++ = (char)c;
+  }
+  if ((int)c == EOF || c == TT)
+    soap_unget(soap, c);
+  *s = '\0';
+  return soap->tmpbuf; /* return non-null pointer */
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getline(struct soap *soap, char *s, int len)
+{ int i = len;
+  wchar c = 0;
+  for (;;)
+  { while (--i > 0)
+    { c = soap_getchar(soap);
+      if (c == '\r' || c == '\n' || (int)c == EOF)
+        break;
+      *s++ = (char)c;
+    }
+    *s = '\0';
+    while (c != '\n' && (int)c != EOF)
+      c = soap_getchar(soap);
+    if ((int)c == EOF)
+      return SOAP_EOF;
+    if (i+1 == len) /* empty line: end of HTTP header */
+      break;
+    c = soap_unget(soap, soap_getchar(soap));
+    if (c != ' ' && c != '\t') /* HTTP line continuation? */
+      break;
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static size_t
+soap_begin_dime(struct soap *soap)
+{ 
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { size_t count;
+    sprintf(soap->id, soap->dime_id_format, 0);
+    soap->dime_id = soap->id;
+    if (soap->local_namespaces)
+    { if (soap->local_namespaces[0].out)
+        soap->dime_type = (char*)soap->local_namespaces[0].out;
+      else
+        soap->dime_type = (char*)soap->local_namespaces[0].ns;
+    }
+    soap->dime_options = NULL;
+    count = soap->dime_size + 12 + ((soap->count+3)&(~3)) + ((strlen(soap->dime_id)+3)&(~3)) + ((strlen(soap->dime_type)+3)&(~3));
+    soap->dime_size = soap->count;
+    if (soap->dime_count)
+      soap->dime_flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
+    else
+      soap->dime_flags = SOAP_DIME_MB | SOAP_DIME_ME | SOAP_DIME_ABSURI;
+    return count;
+  }
+#endif
+  return soap->count;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static int
+soap_putdimefield(struct soap *soap, const char *s, size_t n)
+{ if (soap_send_raw(soap, s, n))
+    return soap->error;
+  return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_dime_option(struct soap *soap, unsigned short type, const char *option)
+{ size_t n;
+  char *s = NULL;
+  if (option)
+  { n = strlen(option);
+    s = (char*)soap_malloc(soap, n + 5);
+    if (s)
+    { s[0] = type >> 8;
+      s[1] = type & 0xFF;
+      s[2] = n >> 8;
+      s[3] = n & 0xFF;
+      strcpy(s + 4, option);
+    }
+  }
+  return s;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdimehdr(struct soap *soap)
+{ unsigned char tmp[12];
+  size_t optlen = 0, idlen = 0, typelen = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime_id?soap->dime_id:""));
+  if (soap->dime_options)
+    optlen = (((unsigned char)soap->dime_options[2] << 8) | ((unsigned char)soap->dime_options[3])) + 4;
+  if (soap->dime_id)
+    idlen = strlen(soap->dime_id);
+  if (soap->dime_type)
+    typelen = strlen(soap->dime_type);
+  tmp[0] = SOAP_DIME_VERSION | (soap->dime_flags & 0x7);
+  tmp[1] = soap->dime_flags & 0xF0;
+  tmp[2] = optlen >> 8;
+  tmp[3] = optlen & 0xFF;
+  tmp[4] = idlen >> 8;
+  tmp[5] = idlen & 0xFF;
+  tmp[6] = typelen >> 8;
+  tmp[7] = typelen & 0xFF;
+  tmp[8] = soap->dime_size >> 24;
+  tmp[9] = (soap->dime_size >> 16) & 0xFF;
+  tmp[10] = (soap->dime_size >> 8) & 0xFF;
+  tmp[11] = soap->dime_size & 0xFF;
+  if (soap_send_raw(soap, (char*)tmp, 12)
+   || soap_putdimefield(soap, soap->dime_options, optlen)
+   || soap_putdimefield(soap, soap->dime_id, idlen)
+   || soap_putdimefield(soap, soap->dime_type, typelen))
+    return soap->error;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putdime(struct soap *soap, int i, char *id, char *type, char *options, void *ptr, size_t size)
+{ void *h;
+  if (id)
+    soap->dime_id = id;
+  else
+  { sprintf(soap->id, soap->dime_id_format, i);
+    soap->dime_id = soap->id;
+  }
+  soap->dime_type = type;
+  soap->dime_options = options;
+  soap->dime_size = size;
+  soap->dime_flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA;
+  if (soap->fdimereadopen && ((h = soap->fdimereadopen(soap, (void*)ptr, soap->dime_id, type, options)) || soap->error))
+  { size_t n;
+    if (!h)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n"));
+      return soap->error;
+    }
+    if (!size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE))
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n"));
+      n = sizeof(soap->tmpbuf);
+      do 
+      { size = soap->fdimeread(soap, h, soap->tmpbuf, n);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size));
+        if (size == n)
+          soap->dime_flags |= SOAP_DIME_CF;
+        else
+       { soap->dime_flags &= ~SOAP_DIME_CF;
+          if (--soap->dime_count == 0)  
+            soap->dime_flags |= SOAP_DIME_ME;
+        }
+       soap->dime_size = size;
+        if (soap_putdimehdr(soap)
+        || soap_send_raw(soap, soap->tmpbuf, size)
+        || soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime_size&3))
+          break;
+        if (soap->dime_id)
+       { soap->dime_flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
+          soap->dime_id = NULL;
+          soap->dime_type = NULL;
+          soap->dime_options = NULL;
+        }  
+       } while (size >= n);
+    }
+    else
+    { if (--soap->dime_count == 0)
+        soap->dime_flags |= SOAP_DIME_ME;
+      if (soap_putdimehdr(soap))
+        return soap->error;
+      do
+      { if (size < sizeof(soap->tmpbuf))
+          n = size;
+        else
+          n = sizeof(soap->tmpbuf);
+        if (!(n = soap->fdimeread(soap, h, soap->tmpbuf, n)))
+        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime_size));
+          soap->error = SOAP_EOF;
+         break;
+        }
+        if (soap_send_raw(soap, soap->tmpbuf, n))
+          break;
+        size -= n;
+      } while (size);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+      soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime_size&3);
+    }
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n"));
+    if (soap->fdimereadclose)
+      soap->fdimereadclose(soap, h);
+    return soap->error;
+  }
+  if (--soap->dime_count == 0)
+     soap->dime_flags |= SOAP_DIME_ME;
+  if (soap_putdimehdr(soap))
+     return soap->error;
+  return soap_putdimefield(soap, (char*)ptr, size);
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+static char *
+soap_getdimefield(struct soap *soap, size_t n)
+{ register wchar c;
+  register int i;
+  register char *s;
+  char *p = NULL;
+  if (n)
+  { p = (char*)soap_malloc(soap, n + 1);
+    if (p)
+    { s = p;
+      for (i = n; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+        { soap->error = SOAP_EOF;
+          return NULL;
+        }
+        *s++ = (char)c;
+      }
+      *s = '\0';
+      if ((soap->error = soap_move(soap, -(long)n&3)))
+        return NULL;
+    }
+    else
+      soap->error = SOAP_EOM;
+  }
+  return p;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdimehdr(struct soap *soap)
+{ register wchar c;
+  register char *s;
+  register int i;
+  unsigned char tmp[12];
+  size_t optlen, idlen, typelen;
+  if (!(soap->mode & SOAP_ENC_DIME))
+    return soap->error = SOAP_EOD;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n"));
+  if (soap->dime_buflen || soap->dime_chunksize)
+  { if (soap_move(soap, (long)(soap->dime_size - soap_tell(soap))))
+      return soap->error = SOAP_EOF;
+    soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n"));
+    return SOAP_OK;
+  }
+  s = (char*)tmp;
+  for (i = 12; i > 0; i--)
+  { if ((int)(c = soap_getchar(soap)) == EOF)
+      return soap->error = SOAP_EOF;
+    *s++ = (char)c;
+  }
+  if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION)
+    return soap->error = SOAP_DIME_MISMATCH;
+  soap->dime_flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0);
+  optlen = (tmp[2] << 8) | tmp[3];
+  idlen = (tmp[4] << 8) | tmp[5];
+  typelen = (tmp[6] << 8) | tmp[7];
+  soap->dime_size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11];
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%u flags=0x%X\n", (unsigned int)soap->dime_size, soap->dime_flags));
+  if (!(soap->dime_options = soap_getdimefield(soap, optlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime_id = soap_getdimefield(soap, idlen)) && soap->error)
+    return soap->error;
+  if (!(soap->dime_type = soap_getdimefield(soap, typelen)) && soap->error)
+    return soap->error;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime_id?soap->dime_id:"", soap->dime_type?soap->dime_type:"", soap->dime_options?soap->dime_options+4:""));
+  if (soap->dime_flags & SOAP_DIME_ME)
+    soap->mode &= ~SOAP_ENC_DIME;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEANER
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getdime(struct soap *soap)
+{ if (soap_getdimehdr(soap))
+    return soap->error;
+  if (soap->fdimewriteopen && ((soap->dime_ptr = (char*)soap->fdimewriteopen(soap, soap->dime_id, soap->dime_type, soap->dime_options)) || soap->error))
+  { char *id, *type, *options;
+    size_t size, n;
+    if (!soap->dime_ptr)
+      return soap->error;
+    id = soap->dime_id;
+    type = soap->dime_type;
+    options = soap->dime_options;
+    for (;;)
+    { size = soap->dime_size;
+      for (;;)
+      { n = soap->buflen - soap->bufidx;
+        if (size < n)
+          n = size;
+        if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime_ptr, soap->buf + soap->bufidx, n)))
+          break;
+       size -= n;
+       if (!size)
+       { soap->bufidx += n;
+         break;
+       }
+       if (soap_recv(soap))
+        { soap->error = SOAP_EOF;
+         goto end;
+        }
+      }
+      if (soap_move(soap, -(long)soap->dime_size&3))
+      { soap->error = SOAP_EOF;
+       break;
+      }
+      if (!(soap->dime_flags & SOAP_DIME_CF))
+        break;
+      if (soap_getdimehdr(soap))
+        break;
+    }
+end:
+    if (soap->fdimewriteclose)
+      soap->fdimewriteclose(soap, (void*)soap->dime_ptr);
+    soap->dime_size = 0;
+    soap->dime_id = id;
+    soap->dime_type = type;
+    soap->dime_options = options;
+  }
+  else if (soap->dime_flags & SOAP_DIME_CF)
+  { char *id, *type, *options;
+    register wchar c;
+    register char *s;
+    register int i;
+    id = soap->dime_id;
+    type = soap->dime_type;
+    options = soap->dime_options;
+    if (soap_new_block(soap))
+      return SOAP_EOM;
+    for (;;)
+    { s = (char*)soap_push_block(soap, soap->dime_size);
+      if (!s)
+        return soap->error = SOAP_EOM;
+      for (i = soap->dime_size; i > 0; i--)
+      { if ((int)(c = soap_get1(soap)) == EOF)
+          return soap->error = SOAP_EOF;
+        *s++ = (char)c;
+      }
+      if (soap_move(soap, -(long)soap->dime_size&3))
+        return soap->error = SOAP_EOF;
+      if (!(soap->dime_flags & SOAP_DIME_CF))
+        break;
+      if (soap_getdimehdr(soap))
+        return soap->error;
+    }
+    soap->dime_size = soap->blist->size++; /* allocate one more for '\0' */
+    if (!(soap->dime_ptr = soap_save_block(soap, NULL)))
+      return soap->error;
+    soap->dime_ptr[soap->dime_size] = '\0'; /* make 0-terminated to enable string-based attachments */
+    soap->dime_id = id;
+    soap->dime_type = type;
+    soap->dime_options = options;
+  }
+  else
+    soap->dime_ptr = soap_getdimefield(soap, soap->dime_size);
+  return soap->error;
+}
+#endif
+#endif
+
+/******************************************************************************/
+
+#ifdef WITH_COOKIES
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_encode_cookie(const char *s, char *t, int len)
+{ register int c;
+  register int n = len;
+  while ((c = *s++) && --n > 0)
+  { if (c > ' ' && c < 128 && c != ';' && c != ',')
+      *t++ = c;
+    else if (n > 2)
+    { *t++ = '%';
+      *t++ = (c >> 4) + (c > 159 ? '7' : '0');
+      c &= 0xF;
+      *t++ = c + (c > 9 ? '7' : '0');
+      n -= 2;
+    }
+    else
+      break;
+  }
+  *t = '\0';
+  return len - n;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_decode_cookie(char *buf, int len, const char *val)
+{ const char *s;
+  char *t;
+  for (s = val; *s; s++)
+    if (*s != ' ' && *s != '=')
+      break;
+  if (*s == '"')
+  { t = buf;
+    s++;
+    while (*s && *s != '"' && --len)
+      *t++ = *s++;
+    *t = '\0';
+    do s++;
+    while (*s && *s != ';' && *s != '=');
+  }
+  else
+  { t = buf;
+    while (*s && *s != ';' && *s != '=' && --len)
+      switch (*s)
+      { case ' ':
+          s++;
+          break;
+        case '%':
+          *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4)
+               + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0');
+          s += 3;
+          break;
+        default:
+          *t++ = *s++;
+      }
+    *t = '\0';
+  }
+  return s;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  size_t n;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (*path == '/')
+    path++;
+  n = strlen(path);
+  for (p = soap->cookies; p; p = p->next)
+    if (!strcmp(p->name, name)
+     && domain
+     && p->domain
+     && !strcmp(p->domain, domain)
+     && !strncmp(p->path, path, n))
+      break;
+  return p;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  int n;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:""));
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR);
+    return NULL;
+  }
+  if (*path == '/')
+    path++;
+  q = soap_cookie(soap, name, domain, path);
+  if (!q)
+  { if ((q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie))))
+    { if ((q->name = (char*)SOAP_MALLOC(strlen(name)+1)))
+        strcpy(q->name, name);
+      q->value = NULL;
+      q->domain = NULL;
+      q->path = NULL;
+      q->expire = -1;
+      q->version = 0;
+      q->secure = 0;
+      q->env = 0;
+      q->modified = 0;
+      for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--)
+        if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0)
+          break;
+      if (n)
+      { q->next = *p;
+        *p = q;
+      }
+      else
+      { SOAP_FREE(q->name);
+        SOAP_FREE(q);
+        q = NULL;
+      }
+    }
+  }
+  else
+    q->modified = 1;
+  if (q)
+  { if (q->value)
+    { SOAP_FREE(q->value);
+      q->value = NULL;
+    }
+    if (q->domain)
+    { SOAP_FREE(q->domain);
+      q->domain = NULL;
+    }
+    if (q->path)
+    { SOAP_FREE(q->path);
+      q->path = NULL;
+    }
+    if (value && *value && (q->value = (char*)SOAP_MALLOC(strlen(value)+1)))
+      strcpy(q->value, value);
+    if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(strlen(domain)+1)))
+      strcpy(q->domain, domain);
+    if (path && *path && (q->path = (char*)SOAP_MALLOC(strlen(path)+1)))
+      strcpy(q->path, path);
+    q->session = 1;
+  }
+  return q;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie **p, *q;
+  if (!domain)
+    domain = soap->cookie_domain;
+  if (!domain)
+  { soap_set_receiver_error(soap, "Cookie domain not set", SOAP_STR_EOS, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (!path)
+    path = soap->cookie_path;
+  if (!path)
+  { soap_set_receiver_error(soap, "Cookie path not set", SOAP_STR_EOS, SOAP_HTTP_ERROR);
+    return;
+  }
+  if (*path == '/')
+    path++;
+  for (p = &soap->cookies, q = *p; q; q = *p)
+    if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path)))
+    { if (q->value)
+        SOAP_FREE(q->value);
+      if (q->domain)
+        SOAP_FREE(q->domain);
+      if (q->path)
+        SOAP_FREE(q->path);
+      *p = q->next;
+      SOAP_FREE(q);
+    }
+    else
+      p = &q->next;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+char *
+SOAP_FMAC2
+soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->value;
+  return NULL;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+long
+SOAP_FMAC2
+soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+    return p->expire;
+  return -1;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->expire = expire;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 1;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path)
+{ struct soap_cookie *p;
+  if ((p = soap_cookie(soap, name, domain, path)))
+  { p->session = 0;
+    p->modified = 1;
+    return SOAP_OK;
+  }
+  return SOAP_ERR;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putsetcookies(struct soap *soap)
+{ struct soap_cookie *p;
+  char *s, tmp[4096];
+  const char *t;
+  for (p = soap->cookies; p; p = p->next)
+    if (p->modified || !p->env)
+    { s = tmp;
+      if (p->name)
+        s += soap_encode_cookie(p->name, s, tmp-s+4064);
+      if (p->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(p->value, s, tmp-s+4064);
+      }
+      if (p->domain && (int)strlen(p->domain) < tmp-s+4064)
+        sprintf(s, ";Domain=%s", p->domain);
+      else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064)
+        sprintf(s, ";Domain=%s", soap->cookie_domain);
+      strcpy(s, ";Path=/");
+      if (p->path)
+        t = p->path;
+      else
+        t = soap->cookie_path;
+      if (t)
+      { if (*t == '/')
+          t++;
+        if ((int)strlen(t) < tmp-s+4064)
+          strcat(s, t);
+      }
+      s += strlen(s);
+      if (p->version > 0)
+      { sprintf(s, ";Version=%u", p->version);
+        s += strlen(s);
+      }
+      if (p->expire >= 0)
+      { sprintf(s, ";Max-Age=%ld", p->expire);
+        s += strlen(s);
+      }
+      if (p->secure)
+        strcpy(s, ";Secure");
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp));
+      if (soap->fposthdr(soap, "Set-Cookie", tmp))
+        return soap->error;
+    }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure)
+{ struct soap_cookie **p, *q;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  char *s, tmp[4096];
+  p = &soap->cookies;
+  while ((q = *p))
+  { if (q->expire && now > q->expire)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name));
+      SOAP_FREE(q->name);
+      if (q->value)
+        SOAP_FREE(q->value);
+      if (q->domain)
+        SOAP_FREE(q->domain);
+      if (q->path)
+        SOAP_FREE(q->path);
+      *p = q->next;
+      SOAP_FREE(q);
+    }
+    else if ((!q->domain || !strcmp(q->domain, domain))
+          && (!q->path || !strncmp(q->path, path, strlen(q->path)))
+          && (!q->secure || secure))
+    { s = tmp;
+      if (q->version != version)
+      { sprintf(s, "$Version=%u;", q->version);
+        version = q->version;
+      }
+      if (q->name)
+        s += soap_encode_cookie(q->name, s, tmp-s+4080);
+      if (q->value)
+      { *s++ = '=';
+        s += soap_encode_cookie(q->value, s, tmp-s+4080);
+      }
+      if (q->path && (int)strlen(q->path) < tmp-s+4080)
+      { sprintf(s, ";$Path=/%s", q->path);
+        s += strlen(s);
+      }
+      if (q->domain && (int)strlen(q->domain) < tmp-s+4080)
+        sprintf(s, ";$Domain=%s", q->domain);
+      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp));
+      if (soap->fposthdr(soap, "Cookie", tmp))
+        return soap->error;
+      p = &q->next;
+    }
+    else
+      p = &q->next;
+  }
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_getcookies(struct soap *soap, const char *val)
+{ struct soap_cookie *p = NULL, *q;
+  const char *s;
+  char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  char *domain = NULL;
+  char *path = NULL;
+  unsigned int version = 0;
+  time_t now = time(NULL);
+  if (!val)
+    return;
+  s = val;
+  while (*s)
+  { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+    if (!soap_tag_cmp(tmp, "$Version"))
+    { if ((s = soap_decode_cookie(tmp, sizeof(tmp), s)))
+      { if (p)
+          p->version = (int)atol(tmp);
+        else
+          version = (int)atol(tmp);
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Path"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->path)
+          SOAP_FREE(p->path);
+        p->path = t;
+      }
+      else
+      { if (path)
+          SOAP_FREE(path);
+        path = t;
+      }
+    }
+    else if (!soap_tag_cmp(tmp, "$Domain"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      if (*tmp)
+      { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1)))
+          strcpy(t, tmp);
+      }
+      else
+        t = NULL;
+      if (p)
+      { if (p->domain)
+          SOAP_FREE(p->domain);
+       p->domain = t;
+      }
+      else
+      { if (domain)
+          SOAP_FREE(domain);
+        domain = t;
+      }
+    }
+    else if (p && !soap_tag_cmp(tmp, "Path"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      if (p->path)
+        SOAP_FREE(p->path);
+      if (*tmp)
+      { if ((p->path = (char*)SOAP_MALLOC(strlen(tmp)+1)))
+          strcpy(p->path, tmp);
+      }
+      else
+        p->path = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Domain"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      if (p->domain)
+        SOAP_FREE(p->domain);
+      if (*tmp)
+      { if ((p->domain = (char*)SOAP_MALLOC(strlen(tmp)+1)))
+          strcpy(p->domain, tmp);
+      }
+      else
+        p->domain = NULL;
+    }
+    else if (p && !soap_tag_cmp(tmp, "Version"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      p->version = (unsigned int)atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Max-Age"))
+    { s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      p->expire = now + atol(tmp);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Expires"))
+    { struct tm T;
+      char a[3]; 
+      static const char mns[] = "anebarprayunulugepctovec";
+      s = soap_decode_cookie(tmp, sizeof(tmp), s);
+      memset(&T, 0, sizeof(struct tm));
+      a[0] = tmp[4];
+      a[1] = tmp[5];
+      a[2] = '\0';
+      T.tm_mday = (int)atol(a);
+      a[0] = tmp[8];
+      a[1] = tmp[9];
+      T.tm_mon = (strstr(mns, a) - mns) / 2;
+      a[0] = tmp[11];
+      a[1] = tmp[12];
+      T.tm_year = 100 + (int)atol(a);
+      a[0] = tmp[13];
+      a[1] = tmp[14];
+      T.tm_hour = (int)atol(a);
+      a[0] = tmp[16];
+      a[1] = tmp[17];
+      T.tm_min = (int)atol(a);
+      a[0] = tmp[19];
+      a[1] = tmp[20];
+      T.tm_sec = (int)atol(a);
+      p->expire = soap_timegm(&T);
+    }
+    else if (p && !soap_tag_cmp(tmp, "Secure"))
+      p->secure = 1;
+    else
+    { if (p)
+      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+        if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+        { q->version = p->version;
+          q->expire = p->expire;
+          q->secure = p->secure;
+          q->env = 1;
+        }
+        if (p->name)
+          SOAP_FREE(p->name);
+        if (p->value)
+          SOAP_FREE(p->value);
+        if (p->domain)
+          SOAP_FREE(p->domain);
+        if (p->path)
+          SOAP_FREE(p->path);
+        SOAP_FREE(p);
+      }
+      if ((p = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie))))
+      { p->name = (char*)SOAP_MALLOC(strlen(tmp)+1);
+        strcpy(p->name, tmp);
+        s = soap_decode_cookie(tmp, sizeof(tmp), s);
+        if (*tmp)
+        { p->value = (char*)SOAP_MALLOC(strlen(tmp)+1);
+          strcpy(p->value, tmp);
+        }
+        else
+          p->value = NULL;
+        p->domain = domain;
+        p->path = path;
+        p->expire = 0;
+        p->secure = 0;
+        p->version = version;
+      }
+    }
+    if (*s == ';')
+      s++;
+  }
+  if (p)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure));
+    if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path)))
+    { q->version = p->version;
+      q->expire = p->expire;
+      q->secure = p->secure;
+    }
+    if (p->name)
+      SOAP_FREE(p->name);
+    if (p->value)
+      SOAP_FREE(p->value);
+    if (p->domain)
+      SOAP_FREE(p->domain);
+    if (p->path)
+      SOAP_FREE(p->path);
+    SOAP_FREE(p);
+  }
+  if (domain)
+    SOAP_FREE(domain);
+  if (path)
+    SOAP_FREE(path);
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_getenv_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  const char *s;
+  char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */
+  if (!(s = getenv("HTTP_COOKIE")))
+    return SOAP_ERR;
+  do
+  { s = soap_decode_cookie(key, sizeof(key), s);
+    s = soap_decode_cookie(val, sizeof(val), s);
+    p = soap_set_cookie(soap, key, val, NULL, NULL);
+    if (p)
+      p->env = 1;
+    if (*s == ';')
+      s++;
+  } while (*s);
+  return SOAP_OK;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+struct soap_cookie*
+SOAP_FMAC2
+soap_copy_cookies(struct soap *soap)
+{ struct soap_cookie *p, **q, *r;
+  q = &r;
+  for (p = soap->cookies; p; p = p->next)
+  { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie))))
+      return r;
+    **q = *p;
+    if (p->name)
+    { if (((*q)->name = (char*)SOAP_MALLOC(strlen(p->name)+1)))
+        strcpy((*q)->name, p->name);
+    }
+    if (p->value)
+    { if (((*q)->value = (char*)SOAP_MALLOC(strlen(p->value)+1)))
+        strcpy((*q)->value, p->value);
+    }
+    if (p->domain)
+    { if (((*q)->domain = (char*)SOAP_MALLOC(strlen(p->domain)+1)))
+        strcpy((*q)->domain, p->domain);
+    }
+    if (p->path)
+    { if (((*q)->path = (char*)SOAP_MALLOC(strlen(p->path)+1)))
+        strcpy((*q)->path, p->path);
+    }
+    q = &(*q)->next;
+  }
+  *q = NULL;
+  return r;
+}
+
+/******************************************************************************/
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_free_cookies(struct soap *soap)
+{ struct soap_cookie *p;
+  for (p = soap->cookies; p; p = soap->cookies)
+  { soap->cookies = p->next;
+    SOAP_FREE(p->name);
+    if (p->value)
+      SOAP_FREE(p->value);
+    if (p->domain)
+      SOAP_FREE(p->domain);
+    if (p->path)
+      SOAP_FREE(p->path);
+    SOAP_FREE(p);
+  }
+}
+
+/******************************************************************************/
+#endif /* WITH_COOKIES */
+
+/******************************************************************************/
+#ifdef WITH_GZIP
+#ifndef PALM_2
+static int
+soap_getgzipheader(struct soap *soap)
+{ int i;
+  wchar c, f = 0;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n"));
+  for (i = 0; i < 9; i++)
+  { if ((int)(c = soap_get1(soap) == EOF))
+      return soap->error = SOAP_EOF;
+    if (i == 2)
+      f = c;
+  }
+  if (f & 0x04) /* FEXTRA */
+  { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--)
+      if ((int)soap_get1(soap) == EOF)
+        return soap->error = SOAP_EOF;
+  }
+  if (f & 0x08) /* FNAME */
+    do
+      c = soap_get1(soap);
+    while (c && (int)c != EOF);
+  if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */
+    do
+      c = soap_get1(soap);
+    while (c && (int)f != EOF);
+  if ((int)c != EOF && (f & 0x01)) /* FHCRC */
+  { if ((int)(c = soap_get1(soap)) != EOF)
+      c = soap_get1(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  return SOAP_OK;
+}
+#endif
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_begin_recv(struct soap *soap)
+{ wchar c;
+  soap_set_local_namespaces(soap);
+  soap->version = 0;   /* don't assume we're parsing SOAP content by default */
+  soap_free_iht(soap);
+  if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->omode |= SOAP_IO_CHUNK;
+  soap->imode &= ~SOAP_IO;
+  soap->mode = soap->imode;
+  if (!soap->keep_alive)
+  { soap->buflen = 0;
+    soap->bufidx = 0;
+  }
+  if (!(soap->mode & SOAP_IO_KEEPALIVE))
+    soap->keep_alive = 0;
+  soap->ahead = 0;
+  soap->peeked = 0;
+  soap->level = 0;
+  soap->part = SOAP_BEGIN;
+  soap->alloced = 0;
+  soap->count = 0;
+  soap->length = 0;
+  soap->cdata = 0;
+  *soap->endpoint = '\0';
+  soap->userid = NULL;
+  soap->passwd = NULL;
+  soap->action = NULL;
+  soap->dime_chunksize = 0;
+  soap->dime_buflen = 0;
+#ifdef WIN32
+#ifndef UNDER_CE
+#ifndef WITH_FASTCGI
+  if (!soap_valid_socket(soap->socket))
+#ifdef __BORLANDC__
+    setmode((SOAP_SOCKET)soap->recvfd, O_BINARY);
+#else
+    _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY);
+#endif
+#endif
+#endif
+#endif
+#ifdef WITH_ZLIB
+  soap->mode &= ~SOAP_ENC_ZLIB;
+  soap->zlib_in = SOAP_ZLIB_NONE;
+  soap->zlib_out = SOAP_ZLIB_NONE;
+  soap->d_stream.next_in = Z_NULL;
+  soap->d_stream.avail_in = 0;
+  soap->d_stream.next_out = (Byte*)soap->buf;
+  soap->d_stream.avail_out = SOAP_BUFLEN;
+  soap->z_ratio_in = 1.0;
+#endif
+  c = soap_getchar(soap);
+  if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20)
+    soap->mode |= SOAP_ENC_DIME;
+#ifdef WITH_GZIP
+  else if (c == 0x1F)
+  { if (soap_getgzipheader(soap))
+      return soap->error;
+    if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+      return soap->error = SOAP_ZLIB_ERROR;
+    soap->zlib_state = SOAP_ZLIB_INFLATE;
+    soap->mode |= SOAP_ENC_ZLIB;
+    soap->zlib_in = SOAP_ZLIB_GZIP;
+    soap->z_crc = crc32(0L, NULL, 0);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+    memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+    /* should not chunk over plain transport, so why bother to check? */
+    /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */
+    /*   soap->z_buflen = soap->bufidx; */
+    /* else */
+    soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+    soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+    soap->z_buflen = soap->buflen;
+    soap->buflen = soap->bufidx;
+  }  
+#endif
+  else
+  { if (c == 0xEF && !(soap->mode & SOAP_C_LATIN))
+    { soap_unget(soap, c);
+      c = soap_getutf8(soap);
+      if (c == 0xFEFF)
+        c = soap_getchar(soap);
+    }
+    while (soap_blank(c))
+      c = soap_getchar(soap);
+  }
+  if ((int)c == EOF)
+    return soap->error = SOAP_EOF;
+  soap_unget(soap, c);
+  if (c != '<' && !(soap->mode & (SOAP_ENC_DIME | SOAP_ENC_ZLIB)))
+  { soap->mode &= ~SOAP_IO;
+    if ((soap->error = soap->fparse(soap)))
+    { if (soap->error == 307)  /* HTTP redirect */
+      { soap_getline(soap, soap->endpoint, sizeof(soap->endpoint));
+        soap->keep_alive = 0; /* force close when soap_closesock() */
+      }
+      return soap->error;
+    }
+    if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
+    { soap->chunkbuflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+      soap->chunksize = 0;
+    }
+#ifdef WITH_ZLIB
+    if (soap->zlib_in)
+    { /* fparse should not use soap_unget */
+#ifdef WITH_GZIP
+      c = soap_get1(soap);
+      if (c == 0x1F)
+      { if (soap_getgzipheader(soap))
+          return soap->error;
+        if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        soap->z_crc = crc32(0L, NULL, 0);
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n"));
+      }
+      else
+      { soap_revget1(soap);
+#else
+      {
+#endif
+        if (inflateInit(&soap->d_stream) != Z_OK)
+          return soap->error = SOAP_ZLIB_ERROR;
+        soap->zlib_state = SOAP_ZLIB_INFLATE;
+        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n"));
+      }
+      soap->mode |= SOAP_ENC_ZLIB;
+      memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN);
+      soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx);
+      soap->d_stream.avail_in = soap->buflen - soap->bufidx;
+      soap->z_buflen = soap->buflen;
+      soap->buflen = soap->bufidx;
+    }
+#endif
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+  { if (soap_getdimehdr(soap))
+      return soap->error;
+    if (soap->dime_flags & SOAP_DIME_CF)
+    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n"));
+      soap->dime_chunksize = soap->dime_size;
+      if (soap->buflen - soap->bufidx >= soap->dime_chunksize)
+      { soap->dime_buflen = soap->buflen;
+        soap->buflen = soap->bufidx + soap->dime_chunksize;
+      }
+      else
+        soap->dime_chunksize -= soap->buflen - soap->bufidx;
+    }
+    soap->count = soap->buflen - soap->bufidx;
+  }
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_parse(struct soap *soap)
+{ char header[SOAP_HDRLEN], *s;
+  unsigned short g = 0, k;
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n"));
+  *soap->endpoint = '\0';
+  soap->length = 0;
+  do
+  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
+      return SOAP_EOF;
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));
+    for (;;)
+    { if (soap_getline(soap, header, SOAP_HDRLEN))
+        return SOAP_EOF;
+      if (!*header)
+        break;
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));
+      s = strchr(header, ':');
+      if (s)
+      { *s = '\0';
+        do s++;
+        while (*s && *s <= 32);
+        if ((soap->error = soap->fparsehdr(soap, header, s)))
+          return soap->error;
+      }
+    }
+    if ((s = strchr(soap->msgbuf, ' ')))
+      k = (unsigned short)soap_strtoul(s, NULL, 10);
+    else
+      k = 0;
+  } while (k == 100);
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));
+  s = strstr(soap->msgbuf, "HTTP/");
+  if (s && s[7] != '1')
+  { if (soap->keep_alive == 1)
+      soap->keep_alive = 0;
+    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */
+    { soap->imode |= SOAP_IO_CHUNK;
+      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
+    }
+  }
+  if (soap->keep_alive < 0)
+    soap->keep_alive = 1;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));
+  if (s && (((g = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))
+  { size_t m = strlen(soap->endpoint);
+    size_t n = m + (s - soap->msgbuf) - 5 - (!g);
+    if (n >= sizeof(soap->endpoint))
+      n = sizeof(soap->endpoint) - 1;
+    strncpy(soap->path, soap->msgbuf + 4 + (!g), n - m);
+    soap->path[n - m] = '\0';
+    strcat(soap->endpoint, soap->path);
+    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));
+    if (g)
+    { soap->error = soap->fget(soap);
+      if (soap->error == SOAP_OK)
+        soap->error = SOAP_STOP; /* prevents further processing */
+      return soap->error;
+    }
+    return SOAP_OK;
+  }
+  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)
+    return SOAP_OK;
+  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_parse_header(struct soap *soap, const char *key, const char *val)
+{ if (!soap_tag_cmp(key, "Host"))
+  { 
+#ifdef WITH_OPENSSL
+    if (soap->imode & SOAP_ENC_SSL)
+      strcpy(soap->endpoint, "https://");
+    else
+#endif
+    strcpy(soap->endpoint, "http://");
+    strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8);
+    soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
+  }
+  else if (!soap_tag_cmp(key, "Content-Type"))
+  { if (!soap_tag_cmp(val, "*application/dime*"))
+      soap->mode |= SOAP_ENC_DIME;
+  }
+  else if (!soap_tag_cmp(key, "Content-Length"))
+    soap->length = soap_strtoul(val, NULL, 10);
+  else if (!soap_tag_cmp(key, "Content-Encoding"))
+  { if (!soap_tag_cmp(val, "deflate*"))
+#ifdef WITH_ZLIB
+      soap->zlib_in = SOAP_ZLIB_DEFLATE;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+    else if (!soap_tag_cmp(val, "gzip*"))
+#ifdef WITH_GZIP
+      soap->zlib_in = SOAP_ZLIB_GZIP;
+#else
+      return SOAP_ZLIB_ERROR;
+#endif
+  }
+#ifdef WITH_ZLIB
+  else if (!soap_tag_cmp(key, "Accept-Encoding"))
+  {
+#ifdef WITH_GZIP
+    if (strchr(val, '*') || !soap_tag_cmp(val, "*gzip*"))
+      soap->zlib_out = SOAP_ZLIB_GZIP;
+    else
+#endif
+    if (strchr(val, '*') || !soap_tag_cmp(val, "*deflate*"))
+      soap->zlib_out = SOAP_ZLIB_DEFLATE;
+    else
+      soap->zlib_out = SOAP_ZLIB_NONE;
+  }
+#endif
+  else if (!soap_tag_cmp(key, "Transfer-Encoding"))
+  { soap->mode &= ~SOAP_IO;
+    if (!soap_tag_cmp(val, "chunked*"))
+      soap->mode |= SOAP_IO_CHUNK;
+  }
+  else if (!soap_tag_cmp(key, "Connection"))
+  { if (!soap_tag_cmp(val, "keep-alive*"))
+      soap->keep_alive = -soap->keep_alive;
+    else if (!soap_tag_cmp(val, "close*"))
+      soap->keep_alive = 0;
+  }
+#ifndef WITH_LEAN
+  else if (!soap_tag_cmp(key, "Authorization"))
+  { if (!soap_tag_cmp(val, "basic *"))
+    { size_t n;
+      char *s;
+      soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n);
+      soap->tmpbuf[n] = '\0';
+      if ((s = strchr(soap->tmpbuf, ':')))
+      { *s = '\0';
+       soap->userid = soap_strdup(soap, soap->tmpbuf);
+       soap->passwd = soap_strdup(soap, s + 1);
+      }
+    }
+  }
+#endif
+  else if (!soap_tag_cmp(key, "SOAPAction"))
+  { if (val[0] && val[1])
+    { soap->action = soap_strdup(soap, val + 1);
+      soap->action[strlen(soap->action) - 1] = '\0';
+    }
+  }
+/* [ Deal with .NET bug (invalid XML id-ref) */
+  else if (!soap_tag_cmp(key, "Server"))
+  { if (!soap_tag_cmp(val, "Microsoft-IIS*"))
+      soap->dot_net_bug = 1;
+  }
+  else if (!soap_tag_cmp(key, "User-Agent"))
+  { if (!soap_tag_cmp(val, "*.NET CLR*") || !soap_tag_cmp(val, "*MS Web Services Client Protocol*"))
+      soap->dot_net_bug = 1;
+  }
+/* ] */
+#ifdef WITH_COOKIES
+  else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie"))
+    soap_getcookies(soap, val);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_ENVELOPE;
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+  soap->part = SOAP_END_ENVELOPE;
+#ifndef WITH_LEANER
+  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
+    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->count&3);
+#endif
+  return SOAP_OK;
+} 
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_ENVELOPE;
+  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope"))
+    return soap->error = SOAP_VERSIONMISMATCH;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_envelope_end_in(struct soap *soap)
+{ if (soap_element_end_in(soap, "SOAP-ENV:Envelope"))
+    return soap->error;
+  soap->part = SOAP_END_ENVELOPE;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_out(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  if (soap->version == 1)
+    soap->encoding = 1;
+  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+    return soap->error;
+  if (soap_attribute(soap, "id", "_0"))
+    return soap->error;
+  return soap_element_start_end_out(soap, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_out(struct soap *soap)
+{ if (soap_element_end_out(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_IN_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_begin_in(struct soap *soap)
+{ soap->part = SOAP_IN_BODY;
+  return soap_element_begin_in(soap, "SOAP-ENV:Body");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_body_end_in(struct soap *soap)
+{ if (soap_element_end_in(soap, "SOAP-ENV:Body"))
+    return soap->error;
+  soap->part = SOAP_END_BODY;
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_2
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_header(struct soap *soap)
+{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
+    soap->error = SOAP_OK;
+  return soap->error;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_endpoint(struct soap *soap, const char *endpoint)
+{ register const char *s;
+  register size_t i, n;
+  *soap->endpoint = '\0';
+  *soap->host = '\0';
+  *soap->path = '\0';
+  soap->port = 80;
+  if (!endpoint || !*endpoint)
+    return;
+#ifdef WITH_OPENSSL
+  if (!strncmp(endpoint, "https:", 6))
+    soap->port = 443;
+#endif
+  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
+  s = strchr(endpoint, ':');
+  if (s && s[1] == '/' && s[2] == '/')
+    s += 3;
+  else
+    s = endpoint;
+  n = strlen(s);
+  if (n >= sizeof(soap->host))
+    n = sizeof(soap->host) - 1;
+/* WR[ */
+#ifdef WITH_IPV6
+  if ('[' == s[0])
+  {
+    s++;
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (']' == s[i])
+      {
+        s++;
+        break; 
+      }
+    }
+  }
+  else
+  {
+    for (i = 0; i < n; i++)
+    { soap->host[i] = s[i];
+      if (s[i] == '/' || s[i] == ':')
+        break; 
+    }
+  }
+#else /* WITH_IPV6 */
+/* ]WR */
+  for (i = 0; i < n; i++)
+  { soap->host[i] = s[i];
+    if (s[i] == '/' || s[i] == ':')
+      break; 
+  }
+/* WR[ */
+#endif /* WITH_IPV6 */
+/* ]WR */
+  soap->host[i] = '\0';
+  if (s[i] == ':')
+  { soap->port = (int)atol(s + i + 1);
+    for (i++; i < n; i++)
+      if (s[i] == '/')
+        break;
+  }
+  if (s[i])
+  { strncpy(soap->path, s + i + 1, sizeof(soap->path));
+    soap->path[sizeof(soap->path) - 1] = '\0';
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect(struct soap *soap, const char *endpoint, const char *action)
+{ return soap_connect_command(soap, SOAP_POST, endpoint, action);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action)
+{ char host[sizeof(soap->host)];
+  int port;
+  size_t count;
+  strcpy(host, soap->host); /* save to compare */
+  port = soap->port; /* save to compare */
+  soap_set_endpoint(soap, endpoint);
+  if (action)
+    soap->action = soap_strdup(soap, action);
+  if (soap->fconnect)
+  {
+    if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port)))
+      return soap->error;
+  }
+  else if (*soap->host)
+  { soap->status = http_command;
+    if (!soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port)
+    { soap->keep_alive = 0; /* force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+      soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0);
+    }
+    else if (!soap->keep_alive || soap_poll(soap))
+    { soap->keep_alive = 0; /* force close */
+      soap_closesock(soap);
+      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port));
+      soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port);
+      if (soap->error)
+        return soap->error;
+    }
+  }
+  count = soap_begin_dime(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint)
+  { unsigned int k = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((k & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count)))
+      return soap->error;
+    if ((k & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+    soap->mode = k;
+  }
+  if (http_command != SOAP_POST)
+    return soap_end_send(soap);
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+    return soap_putdimehdr(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_s2base64(struct soap *soap, const unsigned char *s, char *t, size_t n)
+{ register size_t i;
+  register unsigned long m;
+  if (!t)
+    return SOAP_EOM;
+  t[0] = '\0';
+  if (!s)
+    return SOAP_OK;
+  for (; n > 2; n -= 3, s += 3)
+  { m = ((unsigned long)((unsigned char*)s)[0] << 16) | ((unsigned long)((unsigned char*)s)[1] << 8) | (unsigned long)((unsigned char*)s)[2];
+    for (i = 4; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    t += 4;
+  }
+  t[0] = '\0';
+  if (n > 0)
+  { m = 0;
+    for (i = 0; i < n; i++)
+      m = (m << 8) | *s++;
+    for (; i < 3; i++)
+      m <<= 8;
+    for (i++; i > 0; m >>= 6)
+      t[--i] = soap_base64o[m & 0x3F];
+    for (i = 3; i > n; i--)
+      t[i] = '=';
+    t[4] = '\0';
+  }
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef WITH_LEAN
+SOAP_FMAC1
+const char*
+SOAP_FMAC2
+soap_base642s(struct soap *soap, const char *s, char *t, size_t l, size_t *n)
+{ register int i, j, c;
+  register unsigned long m;
+  char *p = t;
+  if (n)
+    *n = 0;
+  for (;;)
+  { for (i = 0; i < SOAP_BLKLEN; i++)
+    { m = 0;
+      j = 0;
+      while (j < 4)
+      { c = *s++;
+        if (c == '=' || !c)
+        { i *= 3;
+          switch (j)
+          { case 2:
+              *t++ = (char)((m >> 4) & 0xFF);
+              i++;
+              break;
+            case 3:
+              *t++ = (char)((m >> 10) & 0xFF);
+              *t++ = (char)((m >> 2) & 0xFF);
+              i += 2;
+          }
+          if (n)
+           *n += i;
+          return p;
+        }
+        c -= '+';
+        if (c >= 0 && c <= 79)
+        { m = (m << 6) + soap_base64i[c];
+          j++;
+        }
+      }
+      *t++ = (char)((m >> 16) & 0xFF);
+      *t++ = (char)((m >> 8) & 0xFF);
+      *t++ = (char)(m & 0xFF);
+      if (l < 3)
+      { if (n)
+         *n += i;
+        return p;
+      }
+      l -= 3;
+    }
+    if (n)
+      *n += 3 * SOAP_BLKLEN;
+  }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_puthttphdr(struct soap *soap, int status, size_t count)
+{ const char *s;
+  if (status == SOAP_FILE)
+    s = soap->http_content;
+  else if (status == SOAP_HTML)
+    s = "text/html; charset=utf-8";
+  else if (soap->mode & SOAP_ENC_DIME)
+    s = "application/dime";
+  else if (soap->version == 2)
+    s = "application/soap+xml; charset=utf-8";
+  else
+    s = "text/xml; charset=utf-8";
+  soap->error = soap->fposthdr(soap, "Content-Type", s);
+  if (soap->error)
+    return soap->error;
+#ifdef WITH_ZLIB
+  if (soap->omode & SOAP_ENC_ZLIB)
+#ifdef WITH_GZIP
+    soap->error = soap->fposthdr(soap, "Content-Encoding", "gzip");
+#else
+    soap->error = soap->fposthdr(soap, "Content-Encoding", "deflate");
+#endif
+#endif
+  if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)
+    soap->error = soap->fposthdr(soap, "Transfer-Encoding", "chunked");
+  else if (count > 0)
+  { sprintf(soap->tmpbuf, "%lu", (unsigned long)count);
+    soap->error = soap->fposthdr(soap, "Content-Length", soap->tmpbuf);
+  }
+  if (soap->error)
+    return soap->error;
+  return soap->error = soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_get(struct soap *soap)
+{ return SOAP_GET_METHOD;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count)
+{ const char *s;
+  if (soap->status == SOAP_GET)
+  { s = "GET";
+    count = 0;
+  }
+  else
+    s = "POST";
+#ifndef PALM
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)))
+#else
+  if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8))
+#endif
+    return SOAP_OK;
+  if (soap->proxy_host)
+    sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
+  else
+    sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, path, soap->http_version);
+  if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    return soap->error;
+  if (port != 80)
+    sprintf(soap->tmpbuf, "%s:%d", host, port);
+  else
+    strcpy(soap->tmpbuf, host); 
+  if ((soap->error = soap->fposthdr(soap, "Host", soap->tmpbuf))
+   || (soap->error = soap->fposthdr(soap, "User-Agent", "gSOAP/2.6"))
+   || (soap->error = soap_puthttphdr(soap, SOAP_OK, count)))
+    return soap->error;
+#ifdef WITH_ZLIB
+#ifdef WITH_GZIP
+  if ((soap->error = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate")))
+#else
+  if ((soap->error = soap->fposthdr(soap, "Accept-Encoding", "deflate")))
+#endif
+    return soap->error;
+#endif
+#ifndef WITH_LEAN
+  if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((soap->error = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+      return soap->error;
+  }
+  if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761)
+  { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
+    strcpy(soap->tmpbuf, "Basic ");
+    soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262));
+    if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+      return soap->error;
+  }
+#endif
+#ifdef WITH_COOKIES
+#ifdef WITH_OPENSSL
+  if (soap_putcookies(soap, host, path, soap->ssl != NULL))
+    return soap->error;
+#else
+  if (soap_putcookies(soap, host, path, 0))
+    return soap->error;
+#endif
+#endif
+  if (action)
+  { sprintf(soap->tmpbuf, "\"%s\"", action);
+    if ((soap->error = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
+      return soap->error;
+  }
+  return soap->error = soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_post_header(struct soap *soap, const char *key, const char *val)
+{ if (key)
+  { if (soap_send(soap, key))
+      return soap->error;
+    if (val && (soap_send(soap, ": ") || soap_send(soap, val)))
+      return soap->error;
+  }
+  return soap_send(soap, "\r\n");
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+http_response(struct soap *soap, int status, size_t count)
+{
+/* WR[ */
+#ifdef WMW_RPM_IO
+  if (soap->rpmreqid)
+      {
+      httpOutputEnable(soap->rpmreqid);
+      }
+#endif  /* WMW_RPM_IO */
+/* ]WR */
+  if (!status || status == SOAP_HTML || status == SOAP_FILE)
+  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n"));
+/* WR[ */
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+/* ]WR */
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+/* WR[ */
+#endif /* WMW_RPM_IO */
+/* ]WR */
+    { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return soap->error;
+    }
+    else if ((soap->error = soap->fposthdr(soap, "Status", "200 OK")))
+      return soap->error;
+  }
+  else if (status > 200 && status < 600)
+  { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
+    if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      return soap->error;
+    if (status == 401)
+      if ((soap->error = soap->fposthdr(soap, "WWW-Authenticate", "Basic realm=\"gSOAP Service\"")))
+        return soap->error;
+  }
+  else
+  { const char *s = *soap_faultcode(soap);
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error\n"));
+    if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender"))
+      s = "400 Bad Request";
+    else
+      s = "500 Internal Server Error";
+/* WR[ */
+#ifdef WMW_RPM_IO
+    if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */
+#else
+/* ]WR */
+    if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
+/* WR[ */
+#endif /* WMW_RPM_IO */
+/* ]WR */
+    { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
+      if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+        return soap->error;
+    }
+    else if ((soap->error = soap->fposthdr(soap, "Status", s)))
+      return soap->error;
+  }
+  if ((soap->error = soap->fposthdr(soap, "Server", "gSOAP/2.6"))
+   || (soap->error = soap_puthttphdr(soap, status, count)))
+    return soap->error;
+#ifdef WITH_COOKIES
+  if (soap_putsetcookies(soap))
+    return soap->error;
+#endif
+  return soap->error = soap->fposthdr(soap, NULL, NULL);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_response(struct soap *soap, int status)
+{ register size_t count;
+  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
+   && (status == SOAP_HTML || status == SOAP_FILE))
+  { soap->omode &= ~SOAP_IO;
+    soap->omode |= SOAP_IO_STORE;
+  }
+  soap->status = status;
+  count = soap_begin_dime(soap);
+  if (soap_begin_send(soap))
+    return soap->error;
+  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
+  { register int n = soap->mode;
+    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
+    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
+      soap->mode |= SOAP_IO_BUFFER;
+    if ((soap->error = soap->fresponse(soap, status, count)))
+      return soap->error;
+    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
+    { if (soap_flush(soap))
+        return soap->error;
+    }
+    soap->mode = n;
+  }
+#ifndef WITH_LEANER
+  if (soap->mode & SOAP_ENC_DIME)
+    return soap_putdimehdr(soap);
+#endif
+  return SOAP_OK;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_set_fault(struct soap *soap)
+{ const char **c = soap_faultcode(soap);
+  const char **s = soap_faultstring(soap);
+  if (!*c)
+  { if (soap->version == 2)
+      *c = "SOAP-ENV:Sender";
+    else
+      *c = "SOAP-ENV:Client";
+  }
+  if (*s)
+    return;
+  switch (soap->error)
+  { case SOAP_CLI_FAULT:
+      *s = "Client fault";
+      break;
+    case SOAP_SVR_FAULT:
+      *s = "Server fault";
+      break;
+    case SOAP_TAG_MISMATCH:
+      sprintf(soap->msgbuf, "Tag mismatch: element '%s' does not correspond to expected element", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_TYPE:
+      sprintf(soap->msgbuf, "Data type '%s' mismatch in element '%s'", soap->type, soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_SYNTAX_ERROR:
+      *s = "XML syntax error";
+      break;
+    case SOAP_NO_TAG:
+      *s = "No XML element tag found";
+      break;
+    case SOAP_MUSTUNDERSTAND:
+      *c = "SOAP-ENV:MustUnderstand";
+      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_VERSIONMISMATCH:
+      *c = "SOAP-ENV:VersionMismatch";
+      *s = "SOAP version mismatch or invalid SOAP message";
+      break;
+    case SOAP_DATAENCODINGUNKNOWN:
+      *c = "SOAP-ENV:DataEncodingUnknown";
+      *s = "Unsupported SOAP data encoding";
+      break;
+    case SOAP_DIME_MISMATCH:
+      *s = "DIME version mismatch";
+      break;
+    case SOAP_NAMESPACE:
+      sprintf(soap->msgbuf, "Namespace URI mismatch in element '%s'", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_OBJ_MISMATCH:
+      *s = "Object mismatch";
+      break;
+    case SOAP_FATAL_ERROR:
+      *s = "Fatal error";
+      break;
+    case SOAP_NO_METHOD:
+      sprintf(soap->msgbuf, "Method '%s' not implemented", soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_GET_METHOD:
+      *s = "HTTP GET method not implemented";
+      break;
+    case SOAP_EOM:
+      *s = "Out of memory";
+      break;
+    case SOAP_IOB:
+      *s = "Array index out of bounds";
+      break;
+    case SOAP_NULL:
+      sprintf(soap->msgbuf, "Cannot create nilable object for type '%s' in element '%s'", soap->type, soap->tag);
+      *s = soap->msgbuf;
+      break;
+    case SOAP_MULTI_ID:
+      *s = "Non-unique id attribute";
+      break;
+    case SOAP_MISSING_ID:
+      *s = "Missing id: referenced data is missing or had to be ignored";
+      break;
+    case SOAP_HREF:
+      *s = "Invalid XML: object reference with href attribute is incompatible with actual object referred to";
+      break;
+    case SOAP_FAULT:
+      break;
+    case SOAP_TCP_ERROR:
+      *s = tcp_error(soap);
+      break;
+    case SOAP_HTTP_ERROR:
+      *s = "HTTP error";
+      break;
+    case SOAP_SSL_ERROR:
+      *s = "SSL error";
+      break;
+    case SOAP_PLUGIN_ERROR:
+      *s = "Plugin registry error";
+      break;
+    case SOAP_DIME_ERROR:
+      *s = "DIME error";
+      break;
+    case SOAP_ZLIB_ERROR:
+#ifdef WITH_ZLIB
+      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:"");
+      *s = soap->msgbuf;
+#else
+      *s = "Zlib not installed for required message (de)compression";
+#endif
+      break;
+    case SOAP_EOD:
+      *s = "End of DIME error";
+      break;
+    case SOAP_REQUIRED:
+      *s = "Validation failure: XML attribute required";
+      break;
+    case SOAP_OCCURS:
+      *s = "Validation failure: XML element occurs count";
+      break;
+    case SOAP_EOF:
+      sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap));
+      *s = soap->msgbuf;
+      break;
+    default:
+      if (soap->error > 200 && soap->error < 600)
+      { sprintf(soap->msgbuf, "HTTP Error: '%s'", http_error(soap, soap->error));
+        *s = soap->msgbuf;
+      }
+      else
+        *s = "Unknown error code";
+    }
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_send_fault(struct soap *soap)
+{ register int status = soap->error;
+  if (status == SOAP_STOP)
+    return status;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error));
+  soap->keep_alive = 0; /* to terminate connection */
+  soap_set_fault(soap);
+  if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && soap_poll(soap) == SOAP_OK)
+  { soap->error = SOAP_OK;
+    soap_serializeheader(soap);
+    soap_serializefault(soap);
+    soap_begin_count(soap);
+    if (soap->mode & SOAP_IO_LENGTH)
+    { soap_envelope_begin_out(soap);
+      soap_putheader(soap);
+      soap_body_begin_out(soap);
+      soap_putfault(soap);
+      soap_body_end_out(soap);
+      soap_envelope_end_out(soap);
+    }
+    if (soap_response(soap, status)
+     || soap_envelope_begin_out(soap)
+     || soap_putheader(soap)
+     || soap_body_begin_out(soap)
+     || soap_putfault(soap)
+     || soap_body_end_out(soap)
+     || soap_envelope_end_out(soap))
+      return soap_closesock(soap);
+    soap_end_send(soap);
+  }
+  soap_closesock(soap);
+  return soap->error = status;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_recv_fault(struct soap *soap)
+{ register int status = soap->error;
+  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n"));
+  soap->error = SOAP_OK;
+  if (soap_getfault(soap))
+  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n"));
+    *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client");
+    soap->error = status;
+    soap_set_fault(soap);
+  }
+  else
+  { register const char *s = *soap_faultcode(soap);
+    if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver"))
+      status = SOAP_SVR_FAULT; 
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender"))
+      status = SOAP_CLI_FAULT;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand"))
+      status = SOAP_MUSTUNDERSTAND;
+    else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch"))
+      status = SOAP_VERSIONMISMATCH;
+    else
+    { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s));
+      status = SOAP_FAULT;
+    }
+    if (soap_body_end_in(soap)
+     || soap_envelope_end_in(soap)
+     || soap_end_recv(soap))
+      return soap_closesock(soap);
+    soap->error = status;
+  }
+  return soap_closesock(soap);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static const char*
+soap_strerror(struct soap *soap)
+{ int err = soap->errnum;
+  if (!err)
+    err = soap_errno;
+  if (err)
+  {
+#ifndef UNDER_CE
+    return strerror(err);
+#else
+    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->werrorstr, 256, NULL);
+    wcstombs(soap->errorstr, soap->werrorstr, 256);
+    return soap->errorstr;
+#endif
+  }
+  return "Operation interrupted or timed out";
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_set_error(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail, int soaperror)
+{ *soap_faultcode(soap) = faultcode;
+  *soap_faultstring(soap) = faultstring;
+  if (faultdetail && *faultdetail)
+  { register const char **s = soap_faultdetail(soap);
+    if (s)
+      *s = faultdetail;
+  }
+  return soap->error = soaperror;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror)
+{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail, soaperror);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static int
+soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail)
+{ char *s = NULL, *t = NULL;
+  if (faultstring)
+    s = soap_strdup(soap, faultstring);
+  if (faultdetail)
+    t = soap_strdup(soap, faultdetail);
+  return soap_set_error(soap, faultcode, s, t, SOAP_FAULT);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail)
+{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail);
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault(struct soap *soap, FILE *fd)
+{ if (soap->error)
+  { const char **s;
+    if (!*soap_faultcode(soap))
+      soap_set_fault(soap);
+    fprintf(fd, "SOAP FAULT: %s\n\"%s\"\n", *soap_faultcode(soap), *soap_faultstring(soap));
+    s = soap_faultdetail(soap);
+    if (s && *s)
+      fprintf(fd, "Detail: %s\n", *s);
+  }
+}
+#endif
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void
+SOAP_FMAC2
+soap_print_fault_location(struct soap *soap, FILE *fd)
+{ 
+#ifndef WITH_LEAN
+  int c;
+  if (soap->error && soap->buflen > 0)
+  { if (soap->bufidx == 0)
+      soap->bufidx = 1;
+    c = soap->buf[soap->bufidx - 1];
+    soap->buf[soap->bufidx - 1] = '\0';
+    soap->buf[soap->buflen - 1] = '\0';
+    if (soap->bufidx < soap->buflen)
+      fprintf(fd, "%s%c\n** HERE **\n%s\n", soap->buf, c, soap->buf + soap->bufidx);
+    else
+      fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c);
+  }
+#endif
+}
+#endif
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+int
+SOAP_FMAC2
+soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
+{ register struct soap_plugin *p;
+  register int r;
+  if (!(p = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin))))
+    return soap->error = SOAP_EOM;
+  p->id = NULL;
+  p->data = NULL;
+  p->fcopy = NULL;
+  p->fdelete = NULL;
+  r = fcreate(soap, p, arg);
+  if (!r && p->fdelete)
+  { p->next = soap->plugins;
+    soap->plugins = p;
+    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
+    return SOAP_OK;
+  }
+  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
+  SOAP_FREE(p);
+  return r;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+static void *
+fplugin(struct soap *soap, const char *id)
+{ register struct soap_plugin *p;
+  for (p = soap->plugins; p; p = p->next)
+    if (p->id == id || !strcmp(p->id, id))
+      return p->data;
+  return NULL;
+}
+#endif
+
+/******************************************************************************/
+#ifndef PALM_1
+SOAP_FMAC1
+void *
+SOAP_FMAC2
+soap_lookup_plugin(struct soap *soap, const char *id)
+{ return soap->fplugin(soap, id);
+}
+#endif
+
+/******************************************************************************/
+#ifdef __cplusplus
+}
+#endif
+
index 630de3f..083b71a 100644 (file)
@@ -1,16 +1,13 @@
 #include <iostream>
-#include <fstream>
 #include <sys/types.h>
 #include <unistd.h>
-#include <assert.h>
+
 
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/XmlOutputter.h>
-#include <cppunit/TestRunner.h>
-#include <cppunit/TestResult.h>
-#include <cppunit/TestResultCollector.h>
+#include <cppunit/ui/text/TestRunner.h>
+
 
 #include "glite_gss.h"
 
@@ -18,14 +15,11 @@ class GSSTest: public  CppUnit::TestFixture
 {
        CPPUNIT_TEST_SUITE(GSSTest);
        CPPUNIT_TEST(echo);
-       CPPUNIT_TEST(echo);
-       CPPUNIT_TEST(bigecho);
        CPPUNIT_TEST(errorTest);
        CPPUNIT_TEST_SUITE_END();
 
 public:
        void echo();
-       void bigecho();
        void errorTest();
 
        void setUp();
@@ -37,6 +31,7 @@ private:
        struct timeval  timeout;
        
        void replier();
+       
 };
 
 
@@ -46,10 +41,9 @@ void GSSTest::replier() {
        struct sockaddr_in      a;
        socklen_t               alen = sizeof(a);
        int                     s, len;
-       char                    buf[8*BUFSIZ];
-       
-       std::cerr << "replier " << getpid() << std::endl;
+       char                    buf[100];
        
+
        if ( (s = accept(sock, (struct sockaddr *) &a, &alen)) < 0 ) exit(1);
        
        if ( edg_wll_gss_accept(my_cred, s, &timeout, &conn, &stat) ) exit(1);
@@ -69,9 +63,8 @@ void GSSTest::setUp(void) {
        socklen_t               alen = sizeof(a);
        char *                  cred_file = NULL;
        char *                  key_file = NULL;
-       char *                  to = getenv("GSS_TEST_TIMEOUT");
 
-       timeout.tv_sec = to ? atoi(to) : 10 ;
+       timeout.tv_sec = 10;
        timeout.tv_usec = 0;
        
        key_file = cred_file = getenv("X509_USER_PROXY");
@@ -113,7 +106,6 @@ void GSSTest::echo()
        char                    buf[] = "f843fejwfanczn nc4*&686%$$&^(*)*#$@WSH";       
        char                    buf2[100];      
 
-       std::cerr << "echo " << getpid() << std::endl;
 
        err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat);
        CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err);
@@ -130,32 +122,6 @@ void GSSTest::echo()
                
 }
 
-void GSSTest::bigecho()
-{
-       edg_wll_GssConnection   conn;
-       edg_wll_GssStatus       stat;
-       size_t                  total;
-       int                     err;
-       char                    buf[7*BUFSIZ];
-       char                    buf2[7*BUFSIZ]; 
-
-       std::cerr << "bigecho " << getpid() << std::endl;
-
-       err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat);
-       CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err);
-       
-       err = edg_wll_gss_write(&conn, buf, sizeof buf, &timeout, &stat);
-       CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_write()", !err);
-       
-       err = edg_wll_gss_read_full(&conn, buf2, sizeof buf2, &timeout, &total, &stat);
-       CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_read_full()", !err);
-
-       CPPUNIT_ASSERT(sizeof buf == total && !memcmp(buf,buf2,sizeof buf) );
-
-       edg_wll_gss_close(&conn, &timeout);
-               
-}
-
 
 void GSSTest::errorTest()
 {
@@ -175,24 +141,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION( GSSTest );
 
 int main (int ac,const char *av[])
 {
-       assert(ac == 2);
-       std::ofstream   xml(av[1]);
-
        CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
-       CppUnit::TestRunner runner;
-
-       CppUnit::TestResult controller;
-       CppUnit::TestResultCollector result;
-       controller.addListener( &result );
-
+       CppUnit::TextUi::TestRunner runner;
+       
        runner.addTest(suite);
-       runner.run(controller);
-
-
-       CppUnit::XmlOutputter xout( &result, xml );
-       CppUnit::CompilerOutputter tout( &result, std::cout);
-       xout.write();
-       tout.write();
-
-       return result.wasSuccessful() ? 0 : 1 ;
+       return runner.run() ? 0 : 1;
 }
index 6ebb14f..0bf0729 100755 (executable)
@@ -95,7 +95,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
index 3d6914b..4122b9d 100644 (file)
 
     Revision history:
     $Log$
-    Revision 1.3  2005/03/08 12:51:23  dkouril
-    - Removed unused code
-    - enabled (and partly rewritten) support for renewal of VOMS attributes
-    - internal VOMS headers added - they are necessary to work with ASN.1 encoded
-      VOMS attribures (hopefully new version of the VOMS API will provide better
-      support)
-
-    Revision 1.2  2004/07/12 16:18:37  dimeglio
-    Modified to use myproxy from the repository if available
-
 -->
 
        <!-- ======================================================
@@ -55,6 +45,7 @@ globus_prefix=${with.globus.prefix}
 thrflavour=${with.globus.thr.flavor}
 nothrflavour=${with.globus.nothr.flavor}
 myproxy_prefix=${with.myproxy.prefix}
+voms_prefix=${with.glite.location}
                        </echo>
            </target>
        </project>
index 80cbe6b..be12c11 100644 (file)
@@ -1,2 +1,4 @@
-module.version=1.2.2
-module.age=1
+
+module.version = 1.0.14
+module.age = 1
+                               
diff --git a/org.glite.security.proxyrenewal/src/acstack.h b/org.glite.security.proxyrenewal/src/acstack.h
deleted file mode 100755 (executable)
index a833a31..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*********************************************************************
- *
- * Authors: Vincenzo Ciaschini - Vincenzo.Ciaschini@cnaf.infn.it 
- *
- * Copyright (c) 2002, 2003 INFN-CNAF on behalf of the EU DataGrid.
- * For license conditions see LICENSE file or
- * http://www.edg.org/license.html
- *
- * Parts of this code may be based upon or even include verbatim pieces,
- * originally written by other people, in which case the original header
- * follows.
- *
- *********************************************************************/
-#ifndef _ACSTACK_H
-#define _ACSTACK_H
-
-#include <openssl/asn1.h>
-#include <openssl/stack.h>
-#include <openssl/safestack.h>
-
-#define IMPL_STACK(type) \
-   DECLARE_STACK_OF(type) \
-   STACK_OF(type) *sk_##type##_new (int (*cmp)(const type * const *, const type * const *)) \
-       { return sk_new ( (int (*)(const char * const *, const char * const *))cmp);} \
-   STACK_OF(type) *sk_##type##_new_null () { return sk_new_null(); } \
-   void   sk_##type##_free (STACK_OF(type) *st) { sk_free(st); } \
-   int    sk_##type##_num (const STACK_OF(type) *st) { return sk_num(st); } \
-   type  *sk_##type##_value (const STACK_OF(type) *st, int i) { return (type *)sk_value(st, i); } \
-   type  *sk_##type##_set (STACK_OF(type) *st, int i, type *val) { return ((type *)sk_set(st, i, (char *)val)); } \
-   void   sk_##type##_zero (STACK_OF(type) *st) { sk_zero(st);} \
-   int    sk_##type##_push (STACK_OF(type) *st, type *val) { return sk_push(st, (char *)val); } \
-   int    sk_##type##_unshift (STACK_OF(type) *st, type *val) { return sk_unshift(st, (char *)val); } \
-   int    sk_##type##_find (STACK_OF(type) *st, type *val) { return sk_find(st, (char *)val); } \
-   type  *sk_##type##_delete (STACK_OF(type) *st, int i) { return (type *)sk_delete(st, i); } \
-   type  *sk_##type##_delete_ptr (STACK_OF(type) *st, type *ptr) { return (type *)sk_delete_ptr(st, (char *)ptr); } \
-   int    sk_##type##_insert (STACK_OF(type) *st, type *val, int i) { return sk_insert(st, (char *)val, i); } \
-   int (*sk_##type##_set_cmp_func (STACK_OF(type) *st, int (*cmp)(const type * const *, const type * const *)))(const type * const *, const type * const *) \
-       { return (int ((*)(const type * const *, const type * const *)))sk_set_cmp_func (st, (int (*)(const char * const *, const char * const *))cmp); } \
-   STACK_OF(type) *sk_##type##_dup (STACK_OF(type) *st) { return sk_dup(st); } \
-   void   sk_##type##_pop_free (STACK_OF(type) *st, void (*func)(type *)) { sk_pop_free(st, (void (*)(void *))func); } \
-   type  *sk_##type##_shift (STACK_OF(type) *st) { return (type *)sk_shift(st); } \
-   type  *sk_##type##_pop (STACK_OF(type) *st) { return (type *)sk_pop(st); } \
-   void   sk_##type##_sort (STACK_OF(type) *st) { sk_sort(st); } \
-   STACK_OF(type) *d2i_ASN1_SET_OF_##type (STACK_OF(type) **st, unsigned char **pp, long length, type *(*d2ifunc)(), void (*freefunc)(type *), int ex_tag, int ex_class) \
-       { return d2i_ASN1_SET(st, pp, length, (char *(*)())d2ifunc, (void (*)(void *))freefunc, ex_tag, ex_class); } \
-   int i2d_ASN1_SET_OF_##type (STACK_OF(type) *st, unsigned char **pp, int (*i2dfunc)(), int ex_tag, int ex_class, int is_set) \
-       { return i2d_ASN1_SET(st, pp, i2dfunc, ex_tag, ex_class, is_set); }  \
-   unsigned char *ASN1_seq_pack_##type (STACK_OF(type) *st, int (*i2d)(), unsigned char **buf, int *len) { return ASN1_seq_pack(st, i2d, buf, len); } \
-   STACK_OF(type) *ASN1_seq_unpack_##type (unsigned char *buf, int len, type *(*d2i)(), void (*freefunc)(type *)) \
-       { return ASN1_seq_unpack(buf, len, (char *(*)())d2i, (void (*)(void *))freefunc); }
-
-
-#define DECL_STACK(type) \
-   DECLARE_STACK_OF(type) \
-   extern STACK_OF(type) *sk_##type##_new (int (*)(const type * const *, const type * const *)); \
-   extern STACK_OF(type) *sk_##type##_new_null (); \
-   extern void   sk_##type##_free (STACK_OF(type) *); \
-   extern int    sk_##type##_num (const STACK_OF(type) *); \
-   extern type  *sk_##type##_value (const STACK_OF(type) *, int); \
-   extern type  *sk_##type##_set (STACK_OF(type) *, int, type *); \
-   extern void   sk_##type##_zero (STACK_OF(type) *); \
-   extern int    sk_##type##_push (STACK_OF(type) *, type *); \
-   extern int    sk_##type##_unshift (STACK_OF(type) *, type *); \
-   extern int    sk_##type##_find (STACK_OF(type) *, type *); \
-   extern type  *sk_##type##_delete (STACK_OF(type) *, int); \
-   extern type  *sk_##type##_delete_ptr (STACK_OF(type) *, type *); \
-   extern int    sk_##type##_insert (STACK_OF(type) *, type *, int); \
-   extern int (*sk_##type##_set_cmp_func (STACK_OF(type) *, int (*)(const type * const *, const type * const *)))(const type * const *, const type * const *); \
-   extern STACK_OF(type) *sk_##type##_dup (STACK_OF(type) *); \
-   extern void   sk_##type##_pop_free (STACK_OF(type) *, void (*)(type *)); \
-   extern type  *sk_##type##_shift (STACK_OF(type) *); \
-   extern type  *sk_##type##_pop (STACK_OF(type) *); \
-   extern void   sk_##type##_sort (STACK_OF(type) *); \
-   extern STACK_OF(type) *d2i_ASN1_SET_OF_##type (STACK_OF(type) **, unsigned char **, long, type *(*)(), void (*)(type *), int, int); \
-   extern int i2d_ASN1_SET_OF_##type (STACK_OF(type) *, unsigned char **, int (*)(), int, int, int); \
-   extern unsigned char *ASN1_seq_pack_##type (STACK_OF(type) *, int (*)(), unsigned char **, int *); \
-   extern STACK_OF(type) *ASN1_seq_unpack_##type (unsigned char *, int, type *(*)(), void (*)(type *)) ;
-
-#endif
diff --git a/org.glite.security.proxyrenewal/src/newformat.h b/org.glite.security.proxyrenewal/src/newformat.h
deleted file mode 100755 (executable)
index 0efeb7e..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*********************************************************************
- *
- * Authors: Vincenzo Ciaschini - Vincenzo.Ciaschini@cnaf.infn.it 
- *
- * Copyright (c) 2002, 2003 INFN-CNAF on behalf of the EU DataGrid.
- * For license conditions see LICENSE file or
- * http://www.edg.org/license.html
- *
- * Parts of this code may be based upon or even include verbatim pieces,
- * originally written by other people, in which case the original header
- * follows.
- *
- *********************************************************************/
-#ifndef _NEW_FORMAT_H
-#define _NEW_FORMAT_H
-#include <openssl/evp.h>
-#include <openssl/asn1.h>
-#include <openssl/asn1_mac.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/stack.h>
-#include <openssl/safestack.h>
-
-#include "acstack.h"
-#if 0
-static STACK_OF(CRYPT_EX_DATA_FUNS) *AC_meth = NULL;
-
-static AC_METHOD meth = {
-  (int (*)())  i2d_AC,
-  (char *(*)())d2i_AC,
-  (char *(*)())AC_new,
-  (void (*)()) AC_free};
-a
-ASN1_METHOD *AC_asn1_meth(void)
-{
-  return &meth;
-}
-#endif
-
-typedef struct ACDIGEST {
-  ASN1_ENUMERATED *type;
-  ASN1_OBJECT     *oid;
-  X509_ALGOR      *algor;
-  ASN1_BIT_STRING *digest;
-} AC_DIGEST;
-
-typedef struct ACIS {
-  STACK_OF(GENERAL_NAME) *issuer;
-  ASN1_INTEGER  *serial;
-  ASN1_BIT_STRING *uid;
-} AC_IS;
-
-typedef struct ACFORM {
-  STACK_OF(GENERAL_NAME) *names;
-  AC_IS         *is;
-  AC_DIGEST     *digest;
-} AC_FORM;
-
-typedef struct ACACI {
-  STACK_OF(GENERAL_NAME) *names;
-  AC_FORM       *form;
-} AC_ACI;
-
-typedef struct ACHOLDER {
-  AC_IS         *baseid;
-  STACK_OF(GENERAL_NAMES) *name;
-  AC_DIGEST     *digest;
-} AC_HOLDER;
-
-typedef struct ACVAL {
-  ASN1_GENERALIZEDTIME *notBefore;
-  ASN1_GENERALIZEDTIME *notAfter;
-} AC_VAL;
-
-typedef struct asn1_string_st AC_IETFATTRVAL;
-
-typedef struct ACIETFATTR {
-  STACK_OF(GENERAL_NAMES)   *names;
-  STACK_OF(AC_IETFATTRVAL) *values;
-} AC_IETFATTR;
-
-typedef struct ACTARGET {
-  GENERAL_NAME *name;
-  GENERAL_NAME *group;
-  AC_IS        *cert;
-} AC_TARGET;
-typedef struct ACTARGETS {
-  STACK_OF(AC_TARGET) *targets;
-} AC_TARGETS;
-
-typedef struct ACATTR {
-  ASN1_OBJECT           *type;
-  STACK_OF(AC_IETFATTR) *ietfattr;
-} AC_ATTR;
-
-typedef struct ACINFO {
-  ASN1_INTEGER             *version;
-  AC_HOLDER                *holder;
-  AC_FORM                  *form;
-  X509_ALGOR               *alg;
-  ASN1_INTEGER             *serial;
-  AC_VAL                   *validity;
-  STACK_OF(AC_ATTR)        *attrib;
-  ASN1_BIT_STRING          *id;
-  STACK_OF(X509_EXTENSION) *exts;
-} AC_INFO;
-
-typedef struct ACC {
-  AC_INFO         *acinfo;
-  X509_ALGOR      *sig_alg;
-  ASN1_BIT_STRING *signature;
-} AC;
-
-typedef struct ACSEQ {
-  STACK_OF(AC) *acs;
-} AC_SEQ;
-
-DECL_STACK(AC_TARGET)
-DECL_STACK(AC_TARGETS)
-DECL_STACK(AC_IETFATTR)
-DECL_STACK(AC_IETFATTRVAL)
-DECL_STACK(AC_ATTR)
-DECL_STACK(AC);
-DECL_STACK(AC_INFO);
-DECL_STACK(AC_VAL);
-DECL_STACK(AC_HOLDER);
-DECL_STACK(AC_ACI);
-DECL_STACK(AC_FORM);
-DECL_STACK(AC_IS);
-DECL_STACK(AC_DIGEST);
-
-extern int i2d_AC_ATTR(AC_ATTR *a, unsigned char **pp);
-extern AC_ATTR *d2i_AC_ATTR(AC_ATTR **a, unsigned char **p, long length);
-extern AC_ATTR *AC_ATTR_new();
-extern void AC_ATTR_free(AC_ATTR *a);
-extern int i2d_AC_IETFATTR(AC_IETFATTR *a, unsigned char **pp);
-extern AC_IETFATTR *d2i_AC_IETFATTR(AC_IETFATTR **a, unsigned char **p, long length);
-extern AC_IETFATTR *AC_IETFATTR_new();
-extern void AC_IETFATTR_free (AC_IETFATTR *a);
-extern int i2d_AC_IETFATTRVAL(AC_IETFATTRVAL *a, unsigned char **pp);
-extern AC_IETFATTRVAL *d2i_AC_IETFATTRVAL(AC_IETFATTRVAL **a, unsigned char **pp, long length);
-extern AC_IETFATTRVAL *AC_IETFATTRVAL_new();
-extern void AC_IETFATTRVAL_free(AC_IETFATTRVAL *a);
-extern int i2d_AC_DIGEST(AC_DIGEST *a, unsigned char **pp);
-extern AC_DIGEST *d2i_AC_DIGEST(AC_DIGEST **a, unsigned char **pp, long length);;
-extern AC_DIGEST *AC_DIGEST_new(void);
-extern void AC_DIGEST_free(AC_DIGEST *a);
-extern int i2d_AC_IS(AC_IS *a, unsigned char **pp);
-extern AC_IS *d2i_AC_IS(AC_IS **a, unsigned char **pp, long length);
-extern AC_IS *AC_IS_new(void);
-extern void AC_IS_free(AC_IS *a);
-extern int i2d_AC_FORM(AC_FORM *a, unsigned char **pp);
-extern AC_FORM *d2i_AC_FORM(AC_FORM **a, unsigned char **pp, long length);
-extern AC_FORM *AC_FORM_new(void);
-extern void AC_FORM_free(AC_FORM *a);
-extern int i2d_AC_ACI(AC_ACI *a, unsigned char **pp);
-extern AC_ACI *d2i_AC_ACI(AC_ACI **a, unsigned char **pp, long length);
-extern AC_ACI *AC_ACI_new(void);
-extern void AC_ACI_free(AC_ACI *a);
-
-extern int i2d_AC_HOLDER(AC_HOLDER *a, unsigned char **pp);
-extern AC_HOLDER *d2i_AC_HOLDER(AC_HOLDER **a, unsigned char **pp, long length);
-extern AC_HOLDER *AC_HOLDER_new(void);
-extern void AC_HOLDER_free(AC_HOLDER *a);
-
-/* new AC_VAL functions by Valerio */
-extern int i2d_AC_VAL(AC_VAL *a, unsigned char **pp);
-extern AC_VAL *d2i_AC_VAL(AC_VAL **a, unsigned char **pp, long length);
-extern AC_VAL *AC_VAL_new(void);
-extern void AC_VAL_free(AC_VAL *a);
-/* end*/
-
-extern int i2d_AC_INFO(AC_INFO *a, unsigned char **pp);
-extern AC_INFO *d2i_AC_INFO(AC_INFO **a, unsigned char **p, long length);
-extern AC_INFO *AC_INFO_new(void);
-extern void AC_INFO_free(AC_INFO *a);
-extern int i2d_AC(AC *a, unsigned char **pp) ;
-extern AC *d2i_AC(AC **a, unsigned char **pp, long length);
-extern AC *AC_new(void);
-extern void AC_free(AC *a);
-extern int i2d_AC_TARGETS(AC_TARGETS *a, unsigned char **pp) ;
-extern AC_TARGETS *d2i_AC_TARGETS(AC_TARGETS **a, unsigned char **pp, long length);
-extern AC_TARGETS *AC_TARGETS_new(void);
-extern void AC_TARGETS_free(AC_TARGETS *a);
-extern int i2d_AC_TARGET(AC_TARGET *a, unsigned char **pp) ;
-extern AC_TARGET *d2i_AC_TARGET(AC_TARGET **a, unsigned char **pp, long length);
-extern AC_TARGET *AC_TARGET_new(void);
-extern void AC_TARGET_free(AC_TARGET *a);
-extern int i2d_AC_SEQ(AC_SEQ *a, unsigned char **pp) ;
-extern AC_SEQ *d2i_AC_SEQ(AC_SEQ **a, unsigned char **pp, long length);
-extern AC_SEQ *AC_SEQ_new(void);
-extern void AC_SEQ_free(AC_SEQ *a);
-
-#endif
index f570fd4..950e60e 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "glite/security/voms/voms_apic.h"
 
-#include "newformat.h"
+#include "glite/security/voms/newformat.h"
 
 char * Decode(const char *, int, int *);
 char **listadd(char **, char *, int);
index d12e8c2..1ccd89d 100755 (executable)
@@ -83,7 +83,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
index 30f379f..1f1e9ef 100755 (executable)
 #
 #       Revision history:
 #       $Log$
+#       Revision 1.10.2.1  2005/04/04 00:48:20  dimeglio
+#       Increased revision number
+#
+#       Revision 1.10  2004/12/10 07:31:35  eronchie
+#       Increased version
+#
 #       Revision 1.9  2004/11/16 15:31:13  eronchie
 #       Increased version
 #
@@ -52,7 +58,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT([GLite WMS Utils Exception], [1.0.0])
+AC_INIT([GLite WMS Utils Exception], [1.0.2])
 AC_CONFIG_AUX_DIR([./project])
 AM_INIT_AUTOMAKE([1.6.3 subdir-objects])
 AC_CONFIG_SRCDIR([src/Exception.cpp])
index cd1e9e7..54d6b19 100755 (executable)
@@ -1,2 +1,4 @@
-module.version=1.0.0
-module.age=1
+
+module.version = 1.0.2
+module.age = 1
+                               
index 38c086d..810758b 100644 (file)
@@ -12,14 +12,14 @@ namespace wmsutils{
 namespace exception {
 using namespace std ;
 pthread_mutex_t METHOD_MUTEX  ;  // This mutex is used in order to lock the file for writing log infornation
-
 /* *********************************
 * Exception Class Implementation
 ************************************/
 //Constructor/Destructor
+
 Exception::Exception () {
        line = 0;
-};
+} ;
 
 Exception::~Exception() throw(){ }
 
@@ -33,6 +33,7 @@ void Exception::push_back (const string& source, int line_number,  const string&
        line = line_number;
        method_name = method;
        error_message = "";
+       exception_name = "";
 }
 
 Exception::Exception( const std::string& file, int line_number,  const std::string& method,  int code, const std::string& name)
@@ -58,7 +59,8 @@ int Exception::getCode(){
 
 const char* Exception::what() const throw(){
   if (!ancestor.empty()) return ancestor.c_str();
-   return error_message.c_str();
+  return error_message.c_str();
 };
 
 string Exception::getExceptionName(){
@@ -96,14 +98,17 @@ vector<string> Exception::getStackTrace(){
 
 string Exception::dbgMessage(){
    string result ;
-   result = "";
-   // Exception name should be displayed only once
-   if (stack_strings.size()==0){result +=exception_name;};
+   //Adding exception Name
+   result = exception_name;
+   
    //Adding error msg
    if (error_message!="") result +=": " + string(what());
+   
    if (result != "") result+="\n";
+   
    //Adding  Source
    result +="\tat " + method_name  +"[" +source_file;
+   
    //Adding line number
    if (line!=0){
       char buffer [1024] ;
diff --git a/org.glite.wms-utils.exception/test/Makefile.am b/org.glite.wms-utils.exception/test/Makefile.am
deleted file mode 100755 (executable)
index a972450..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-## *********************************************************************
-## *
-## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid.
-## * For license conditions see LICENSE file or
-## * http://www.edg.org/license.html
-## *
-## *********************************************************************
-
-EXCEPTION_LIBS = $(top_builddir)/src/libglite_wmsutils_exception.la
-
-TESTS = glite-wmsutils-exception
-
-check_PROGRAMS = $(TESTS)
-
-glite_wmsutils_exception_SOURCES = exception_cu_suite.cpp \
-       exception_cu_suite.h \
-       exception_cu_main.cpp
-       
-glite_wmsutils_exception_LDADD =  \
-       $(GLITE_WMSUTILS_EXCEPTION_LIBS) \
-       $(GLOBUS_GSS_THR_LIBS) \
-       $(EXCEPTION_LIBS) \
-       $(CPPUNIT_LIBS) 
-
-AM_CPPFLAGS =  \
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/test \
-       $(GLITE_CFLAGS) \
-       $(GLOBUS_THR_CFLAGS) \
-       $(CPPUNIT_CFLAGS)
-
-MAINTAINERCLEANFILES = Makefile.in *~
-
diff --git a/org.glite.wms-utils.exception/test/exception_cu_main.cpp b/org.glite.wms-utils.exception/test/exception_cu_main.cpp
deleted file mode 100644 (file)
index 182df4c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include "exception_cu_suite.h"
-
-#include <cppunit/TestResult.h>
-#include <cppunit/TestRunner.h>
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TextOutputter.h>
-#include <cppunit/XmlOutputter.h>
-
-using namespace CppUnit;
-using namespace std;
-
-int main (int argc , char** argv)
-{
-       std::ofstream xml("./cppUnit_output.xml",ios::app);
-       
-       CppUnit::TestResult controller;
-       CppUnit::TestResultCollector result;
-       controller.addListener( &result );
-       
-       TestRunner runner;
-       runner.addTest(Exception_test::suite());
-       runner.run(controller);
-       
-       CppUnit::XmlOutputter outputter( &result, xml );
-       CppUnit::TextOutputter outputter2( &result, std::cerr );
-       outputter.write();
-       outputter2.write();
-       
-       return result.wasSuccessful() ? 0 : 1 ;
-}
diff --git a/org.glite.wms-utils.exception/test/exception_cu_suite.cpp b/org.glite.wms-utils.exception/test/exception_cu_suite.cpp
deleted file mode 100644 (file)
index f749af9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "exception_cu_suite.h"
-#include "glite/wmsutils/exception/Exception.h"
-#include <string>
-#include <vector>
-
-using namespace CppUnit;
-using namespace std;
-using namespace glite::wmsutils::exception;
-
-void Exception_test::setUp()
-{}
-
-void Exception_test::tearDown()
-{}
-
-
-void Exception_test::constructor_case()
-{
-  
-  //constructor class name, line number, method name, code, exception name
-  glite::wmsutils::exception::Exception exc_5("TEST_Class", 3, "test_method", 1, "exception_test");
-  
-  //constructor class name, method name, code, exception name
-  glite::wmsutils::exception::Exception exc_4("TEST_Class", "test_method", 1, "exception_test");
-  
-  CPPUNIT_ASSERT(exc_5.getExceptionName() == "exception_test");
-  CPPUNIT_ASSERT(exc_5.getCode() == 1);
-}
-
-void Exception_test::tostring_case()
-{
-   cout<<"TEST TO STRING METHODS"<<endl;
-   glite::wmsutils::exception::Exception exc_5("TEST_Class", 3, "test_method", 1, "exception_test");
-   cout << exc_5.dbgMessage() << endl;
-   cout << exc_5.printStackTrace() << endl;
-   exc_5.log("exception_file");
-
-   cout<<"END TEST TO STRING"<<endl;
-}
-
-void Exception_test::stackTrace_case()
-{
-   glite::wmsutils::exception::Exception exc_5("TEST_Class", 3, "test_method", 1, "exception_test");
-   
-   exc_5.push_back("Second_Class", 5, "second_method");
-   
-   vector<string> msgvec = exc_5.getStackTrace();
-   
-   for (int i=0; i<msgvec.size(); i++)
-   {
-       cout << msgvec[i] << endl;
-   }
-   
-}
-
-
diff --git a/org.glite.wms-utils.exception/test/exception_cu_suite.h b/org.glite.wms-utils.exception/test/exception_cu_suite.h
deleted file mode 100644 (file)
index 7eb7da6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include<iostream>
-#include<string>
-#include<pthread.h>
-                                   
-#include <cppunit/extensions/HelperMacros.h>
-
-
-class Exception_test : public CppUnit::TestFixture {
-
-  CPPUNIT_TEST_SUITE(Exception_test);
-    CPPUNIT_TEST(constructor_case);
-    CPPUNIT_TEST(tostring_case);
-    CPPUNIT_TEST(stackTrace_case);     
-  CPPUNIT_TEST_SUITE_END();
-
-
-public:
-
-       void setUp();
-       void tearDown();
-  
-    void constructor_case();
-    void tostring_case();
-    void stackTrace_case();
-
-};
-
-
-
index 44c110c..009513f 100755 (executable)
@@ -83,7 +83,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
-       <property file="${module.build.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
index b0d07ce..f7c1bb5 100755 (executable)
@@ -15,7 +15,7 @@
 typedef struct _edg_wlc_jobid_s* edg_wlc_jobid_t;
 
 namespace glite { 
-namespace wmsutils {
+namespace wmsutils { 
 namespace jobid {
 
 /**
@@ -39,22 +39,12 @@ public:
     JobId() ;
     /**
      * Instantiates a JobId object from the passed dg_jobId in string format.
-     * @param  jobid a string representig a classAd expression
+     * @param  job_id_string a string representig a classAd expression
      * @throws  WrongIdException When a string is passed in a wrong format
      */
-    JobId(const std::string& jobid ) ;
-    /**
-     * Instantiates a JobId object from the passed JobId instance
-     * @param jobid a JobId instance to copy from
-     * @throws  WrongIdException When a string is passed in a wrong format
-     */
-    JobId(const JobId& jobid );
-    /**
-     * Instantiates a JobId object from the passed  JobId internal reference
-     * @param  jobid the JobId internal reference
-     * @throws  WrongIdException When a string is passed in a wrong format
-     */
-    JobId(const edg_wlc_JobId& jobid);
+    JobId(const std::string& job_id_string ) ;
+    JobId(const JobId&);
+    JobId(const edg_wlc_JobId&);
     /**
      * Destructor
      * Destroy the Job Id instance
@@ -96,14 +86,9 @@ public:
     /** Converts the jobId into a string
     @return the string representation of a JobId*/
     std::string toString() const;
-    /** casting operator */
     operator const edg_wlc_JobId() const { return m_JobId; }
-    /** Operator "=" create a deep copy of the JobId instance*/
     JobId & operator=(JobId const &);
-    /** Operator "=" create a deep copy of the JobId instance*/
     JobId & operator=(const edg_wlc_JobId &);
-    /** Retrieve the internal id reference 
-    *@return the JobId internal reference used by some LB methods */
     edg_wlc_JobId  getId() const ;
 private:
     // This Variable stores the Job unique identification String
@@ -111,9 +96,8 @@ private:
     mutable char* m_pStr;
     mutable char* m_pBkserver;
     mutable char* m_pUnique;
-    /** Operator "<"*/
+
     friend bool operator<(JobId const& lhs, JobId const& rhs);
-    /** Operator "=="*/
     friend bool operator==(JobId const& lhs, JobId const& rhs);
 };
 
index cd1e9e7..bc58475 100755 (executable)
@@ -1,2 +1,4 @@
-module.version=1.0.0
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
diff --git a/org.glite.wms-utils.jobid/test/Makefile.am b/org.glite.wms-utils.jobid/test/Makefile.am
deleted file mode 100755 (executable)
index 5111c30..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-## *********************************************************************
-## *
-## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid.
-## * For license conditions see LICENSE file or
-## * http://www.edg.org/license.html
-## *
-## *********************************************************************
-
-JOBID_LIBS = $(top_builddir)/src/jobid/libglite_wmsutils_jobid.la 
-CJOBID_LIBS = $(top_builddir)/src/jobid/libglite_wmsutils_cjobid.la
-
-TESTS = glite-wmsutils-jobid \
-               glite-wmsutils-manipulation
-
-check_PROGRAMS = $(TESTS)
-
-glite_wmsutils_jobid_SOURCES = jobid_cu_suite.cpp \
-       jobid_cu_suite.h \
-       jobid_cu_main.cpp
-       
-glite_wmsutils_jobid_LDADD =  \
-       $(GLITE_WMSUTILS_EXCEPTION_LIBS) \
-       $(GLOBUS_GSS_THR_LIBS) \
-       $(CPPUNIT_LIBS) \
-       $(JOBID_LIBS) \
-       $(CJOBID_LIBS)
-       
-glite_wmsutils_manipulation_SOURCES = manipulation_cu_suite.cpp \
-       manipulation_cu_suite.h \
-       manipulation_cu_main.cpp
-       
-glite_wmsutils_manipulation_LDADD =  \
-       $(GLITE_WMSUTILS_EXCEPTION_LIBS) \
-       $(GLOBUS_GSS_THR_LIBS) \
-       $(CPPUNIT_LIBS) \
-       $(JOBID_LIBS) \
-       $(CJOBID_LIBS)
-
-
-AM_CPPFLAGS = -I$(top_srcdir)/interface \
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/test \
-       $(GLITE_CFLAGS) \
-       $(GLOBUS_THR_CFLAGS) \
-       $(CPPUNIT_CFLAGS)
-
-MAINTAINERCLEANFILES = Makefile.in *~
-
diff --git a/org.glite.wms-utils.jobid/test/jobid_cu_main.cpp b/org.glite.wms-utils.jobid/test/jobid_cu_main.cpp
deleted file mode 100644 (file)
index 770e306..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include "jobid_cu_suite.h"
-
-#include <cppunit/TestResult.h>
-#include <cppunit/TestRunner.h>
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TextOutputter.h>
-#include <cppunit/XmlOutputter.h>
-
-using namespace CppUnit;
-using namespace std;
-
-int main (int argc , char** argv)
-{
-       std::ofstream xml("./cppUnit_output.xml",ios::app);
-       
-       CppUnit::TestResult controller;
-       CppUnit::TestResultCollector result;
-       controller.addListener( &result );
-       
-       TestRunner runner;
-       runner.addTest(Jobid_test::suite());
-       runner.run(controller);
-       
-       CppUnit::XmlOutputter outputter( &result, xml );
-       CppUnit::TextOutputter outputter2( &result, std::cerr );
-       outputter.write();
-       outputter2.write();
-       
-       return result.wasSuccessful() ? 0 : 1 ;
-}
diff --git a/org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp b/org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp
deleted file mode 100644 (file)
index ebe04da..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#include "jobid_cu_suite.h"
-
-
-using namespace CppUnit;
-using namespace std;
-using namespace glite::wmsutils::jobid;
-
-
-void Jobid_test::setUp()
-{}
-
-void Jobid_test::tearDown()
-{}
-
-void Jobid_test::Constructor_case()
-{
-       //EMPTY CONSTRUCTOR
-       JobId empty;
-       
-       CPPUNIT_ASSERT(empty.isSet()==false);
-       
-       //create a string with cjobid
-       string bkserver="grid012g.cnaf.infn.it";
-       edg_wlc_JobId jobid;
-       int bkport=6000;
-       int ok=edg_wlc_JobIdCreate(bkserver.c_str(), bkport, &jobid);
-       CPPUNIT_ASSERT(ok == 0);
-   if (ok==0) 
-       { 
-               string jobstring=edg_wlc_JobIdUnparse(jobid);
-               
-       //STRING CONSTRUCTOR
-       JobId stringCons(jobstring);
-       
-       //EDG_WLC CONSTRUCTOR
-       JobId edg_wlc_Cons(jobid);
-       
-       //test copy constructor 
-       JobId copycon(stringCons);
-       
-       CPPUNIT_ASSERT(stringCons.isSet());
-               CPPUNIT_ASSERT(edg_wlc_Cons.isSet());
-               CPPUNIT_ASSERT(copycon.isSet());
-               
-               //test =
-               JobId testequal;
-               testequal=stringCons;
-               CPPUNIT_ASSERT(testequal.isSet());
-               
-               JobId testoperator;
-               testoperator=jobid;
-               CPPUNIT_ASSERT(testoperator.isSet());
-                       
-               edg_wlc_JobId testget = edg_wlc_Cons.getId();
-               char *server;
-               unsigned int port;
-               edg_wlc_JobIdGetServerParts(testget, &server, &port);
-               string serverstring = server;
-               CPPUNIT_ASSERT(port==bkport);
-               CPPUNIT_ASSERT(serverstring==bkserver);
-       } 
-       
-       CPPUNIT_ASSERT_THROW( JobId stringwrong("grid012"), WrongIdException);
-}
-
-void Jobid_test::Clear_case()
-{
-       JobId *element;
-       string jobstring="https://grid012g.cnaf.infn.it:6000/qaKyEoV3G144rmoyXeW6QA";
-       CPPUNIT_ASSERT_NO_THROW(element= new JobId(jobstring));
-
-       CPPUNIT_ASSERT(element->isSet());
-       element->clear();
-       CPPUNIT_ASSERT(element->isSet()==false);
-       delete element;
-}
-
-void Jobid_test::SetandGet_case()
-{
-       JobId element;
-       string lbserver="grid012g.cnaf.infn.it";
-       int port=6000;
-       string unique ="qaKyEoV3G144rmoyXeW6QA";
-       element.setJobId(lbserver, port, unique);
-       
-       string server=element.getServer();
-       lbserver=lbserver+":6000";
-       
-       CPPUNIT_ASSERT(server==lbserver);
-       string lonely=element.getUnique();
-       CPPUNIT_ASSERT(lonely==unique);
-       
-       string descr=element.toString();
-       cout << "!!! BEGIN TEST toString() METHOD!!!"<< endl;
-       cout << descr <<endl;
-       cout << "!!! END TEST toString() METHOD!!!"<< endl;
-       
-       JobId wrongelement;
-       CPPUNIT_ASSERT_THROW(string server=wrongelement.getServer(), EmptyIdException);
-       CPPUNIT_ASSERT_THROW(string server=wrongelement.getUnique(), EmptyIdException);
-       
-}
diff --git a/org.glite.wms-utils.jobid/test/jobid_cu_suite.h b/org.glite.wms-utils.jobid/test/jobid_cu_suite.h
deleted file mode 100644 (file)
index 526fe6f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include<iostream>
-#include<string>
-#include<pthread.h>
-                                   
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "glite/wmsutils/jobid/JobId.h"
-#include "glite/wmsutils/jobid/cjobid.h"
-#include "glite/wmsutils/jobid/JobIdExceptions.h"
-
-class Jobid_test : public CppUnit::TestFixture {
-
-  CPPUNIT_TEST_SUITE(Jobid_test);
-       
-       CPPUNIT_TEST(Constructor_case);
-       CPPUNIT_TEST(Clear_case);
-       CPPUNIT_TEST(SetandGet_case);
-       
-  CPPUNIT_TEST_SUITE_END();
-
-
-public:
-
-       void setUp();
-       void tearDown();
-
-       void Constructor_case();
-       void Clear_case();
-       void SetandGet_case();
-
-};
-
-
-
diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp b/org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp
deleted file mode 100644 (file)
index 07d2914..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include "manipulation_cu_suite.h"
-
-#include <cppunit/TestResult.h>
-#include <cppunit/TestRunner.h>
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TextOutputter.h>
-#include <cppunit/XmlOutputter.h>
-
-using namespace CppUnit;
-using namespace std;
-
-int main (int argc , char** argv)
-{
-       std::ofstream xml("./cppUnit_output.xml",ios::app);
-       
-       CppUnit::TestResult controller;
-       CppUnit::TestResultCollector result;
-       controller.addListener( &result );
-       
-       TestRunner runner;
-       runner.addTest(Manipulation_test::suite());
-       runner.run(controller);
-       
-       CppUnit::XmlOutputter outputter( &result, xml );
-       CppUnit::TextOutputter outputter2( &result, std::cerr );
-       outputter.write();
-       outputter2.write();
-       
-       return result.wasSuccessful() ? 0 : 1 ;
-}
diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp b/org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp
deleted file mode 100644 (file)
index a6a69d8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "manipulation_cu_suite.h"
-
-
-using namespace CppUnit;
-using namespace std;
-using namespace glite::wmsutils::jobid;
-
-
-void Manipulation_test::setUp()
-{}
-
-void Manipulation_test::tearDown()
-{}
-
-void Manipulation_test::to_fromfile_case()
-{
-       JobId element;
-       
-       string lbserver="grid012g.cnaf.infn.it";
-       int port=6000;
-       string unique ="qaKyEoV3G144rmoyXeW6QA";
-       element.setJobId(lbserver, port, unique);
-       
-       string filename=to_filename(element);
-       
-       JobId newelement = from_filename(filename);
-       
-       string reduced = get_reduced_part(element, 7);
-
-       string newreduced = get_reduced_part(newelement, 7);
-       
-       CPPUNIT_ASSERT(reduced==newreduced);
-}
-
diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.h b/org.glite.wms-utils.jobid/test/manipulation_cu_suite.h
deleted file mode 100644 (file)
index 287b902..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include<iostream>
-#include<string>
-#include<pthread.h>
-                                   
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "glite/wmsutils/jobid/JobId.h"
-#include "glite/wmsutils/jobid/manipulation.h"
-
-class Manipulation_test : public CppUnit::TestFixture {
-
-  CPPUNIT_TEST_SUITE(Manipulation_test);
-       
-       CPPUNIT_TEST(to_fromfile_case);
-       
-  CPPUNIT_TEST_SUITE_END();
-
-
-public:
-
-       void setUp();
-       void tearDown();
-
-       void to_fromfile_case();
-
-};
-
-
-
index 5a7716a..cd9cd56 100644 (file)
@@ -1,7 +1,5 @@
 * Fri Jun 10 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
-- ==== GridSite version 1.1.11 ====
-* Fri Jun 10 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
-- Tidy up gsexec vs GridSiteDiskMode
+- Tidy up gsexec vs GridSiteDiskPerms
 * Fri Jun 10 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
 - ==== GridSite version 1.1.10 ====
 * Wed Jun 8 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
@@ -18,8 +16,6 @@
 - Include gsexec, a drop-in replacement for suexec,
   which can do suexec execution of CGI programs or
   pool-account mapping based on client DN.
-* Tue May 24 2005 Shiv Kaushal <shiv@hep.man.ac.uk>
-- Add XACML support to GACL code in libgridsite.
 * Tue May 24 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
 - ==== GridSite version 1.1.9 ====
 * Mon Apr 25 2005 Andrew McNab <Andrew.McNab@man.ac.uk>
index befd74b..ce67433 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (c) 2002-5, Andrew McNab and Shiv Kaushal,
+Copyright (c) 2002-4, Andrew McNab and Shiv Kaushal,
 University of Manchester. All rights reserved.
 
 Redistribution and use in source and binary forms, with or
@@ -32,7 +32,7 @@ Clearly marked portions of the published GridSite source code
 are derived from Apache httpd or its modules, and are covered
 by the Apache Software License:
 
-Copyright 2001-2005 The Apache Software Foundation
+Copyright 2001-2004 The Apache Software Foundation
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
index 2e3c1a3..13a3b5c 100644 (file)
@@ -1,4 +1,4 @@
 MAJOR_VERSION=1
 MINOR_VERSION=1.1
-PATCH_VERSION=1.1.11
+PATCH_VERSION=1.1.10
 VERSION=$(PATCH_VERSION)
index 82be605..40efdd2 100644 (file)
@@ -16,7 +16,7 @@ C/C++ in the GridSite library.
 <h2>Credentials</h2>
 
 <p>
-In GridSite 1.1.x, four credential types are supported:
+In GridSite 1.0.x, four credential types are supported:
 
 <p>
 &lt;person&gt;
index a5845de..91a60d2 100644 (file)
@@ -13,30 +13,26 @@ Guide to decide which is the easiest route for your system.
 <h2>Installing with RPM</h2>
 
 <p>
-If you are installing on Linux with a binary RPM release, you can skip
+If you are installing on Linux with the binary RPM release, you can skip
 most of this Guide, install the binary rpm(s) and go straight
 to the Config Guide.
 
-<!--
 <p>
 We currently distribute GridSite RPMs for RedHat Linux versions 9 and 7.3
 from our download area at 
 <a href="https://www.gridsite.org/download/">
 https://www.gridsite.org/download/</a>
--->
 
 <p>
-<b>RedHat 9, Fedora, RHEL, Scientific Linix</b>:
+<b>RedHat 9</b>:
 This is the simpler case, since the standard release includes a suitable
 version of Apache 2.0: just install the gridsite-...-1.i386.rpm to get the
 various GridSite components. 
 
 <p>
-<b>Earlier, eg RedHat 7.3</b>:
+<b>RedHat 7.3</b>:
 This is more complicated because you must also install a back-ported Apache
-2.0 RPM or build it from source. 
-<!--
-We distribute RPMs built on 7.3 aimed at RedHat 7.3 
+2.0 RPM. We distribute RPMs built on 7.3 aimed at RedHat 7.3 
 machines with updates, from our download area. These are built from the 
 tar.gz and .spec files distributed by the
 Apache Foundation itself, using the 
@@ -44,11 +40,10 @@ Apache Foundation itself, using the
 /usr/share/doc/gridsite directory. The Apache RPMs install in /usr, and you
 should at least install the httpd and mod_ssl RPMs.
 You must also install the gridsite-...-1.i386.rpm as above.
--->
 
 <p>
 GridSite also depends on shared libraries from libcurl and libxml2, and the
-RPMs distributed as part of the standard RedHat, from 7.3 onwards, are
+RPMs distributed as part of the standard RedHat 7.3 and 9 releases are
 sufficient. 
 
 <p>
@@ -70,11 +65,8 @@ tools (htcp, urlencode.)
 <p>
 All of the components use the GridSite library, and this in turn depends on
 libcurl and libxml2. You will need the development versions of these
-packages installed before you can proceed. 
-<!--
-(They are available as part of
+packages installed before you can proceed. (They are available as part of
 RedHat Linux releases 7.x onwards, for instance.) 
--->
 
 <h2>Building GridSite with Make</h2>
 
@@ -119,13 +111,11 @@ directory ../RPMTMP/RPMS/i386 relative to the working directory. An SRPM is
 put into ../RPMTMP/SRPMS
 This build assumes the Apache 2.0 includes are in /usr/include/httpd.
 
-<!--
 <p>
-<b>If you make RPMs on a RedHat 9 system (or a 7.3 system with a 2.0 httpd RPM
+<b>If you make RPMs on a RedHat 9 system (or a 7.3 system with our httpd RPM
 installed), you can install the resulting GridSite 
 RPM alongside the standard Apache 2.0 RPM without having to
 modify shared library or Apache module paths.</b>
--->
 
 <p>
 For other configurations,
index 9cc97d4..7f2096e 100644 (file)
@@ -201,64 +201,6 @@ GridSite features in different ways.
     (Default: none)
 <p>
 
-<dt><b>GridSiteDowngrade on|off</b>
-<dd>Enable HTTPS Downgrade for this server, virtual server or directory:
-    HTTPS requests made with the header HTTP-Downgrade-Size: 
-    will be redirected to an HTTP version of the file, unless the file is
-    smaller than the given size.
-    <br>
-    (Default: off)
-<p>
-
-<dt><b>GridSiteAuthCookiesDir path</b>
-<dd>Location of authentication cookies directory, relative to ServerRoot.
-    Used by HTTPS Downgrade to record the credentials obtained via HTTPS,
-    and available to the corresponding HTTP request.
-    <br>
-    (Default: gridauthcookies)
-<p>
-
-<dt><b>GridSiteACLFormat GACL|XACML</b>
-<dd>Format to use when writing .gacl files. (Both formats are automatically
-    recognised when reading.)
-    <br>
-    (Default: GACL)
-<p>
-
-<dt><b>GridSiteExecMethod nosetuid|suexec|X509DN|directory</b>
-<dd>Execution strategy for CGI scripts and executables. For options other
-    than nosetuid, suexec (or gsexec renamed suexec) must installed. For
-    X509DN and directory, gsexec must be installed, as suexec. 
-    <br>
-    With X509DN, the CGI process runs as a pool user, detemined using lock
-    files in the pool mapping directory chosen as build time of gsexec.
-    (/var/www/execmapdir by default.) The pool user is chosen according
-    to the client's full certificate X.509 DN (ie without any GSI proxy
-    name components.)
-    <br>
-    With directory, the CGI process runs as a pool user chosen according
-    to the directory in which the CGI is located: all CGIs in that directory
-    run as the same pool user.
-    <br>
-    (Default: nosetuid)
-<p>
-
-<dt><b>GridSiteUserGroup user group</b>
-<dd>Unix user and group when using suexec (or gsexec as suexec.) This
-    is equivalent to the suexec SuexecUserGroup directive, but can be
-    specified on a per-directory basis.
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteDiskMode GroupNone|GroupRead|GroupWrite WorldNone|WorldRead</b>
-<dd>The file creation permissions mode, taking two arguments to specify
-    the group and other permissions. The mode always includes read and write
-    permission for the CGI user itself.
-    <br>
-    (Default: GroupNone WorldNone)
-<p>
-
 </dl>
 
 <h2>Environment variables</h2>
@@ -324,27 +266,6 @@ in effect.
 <dd>If set, do not include credit links to GridSite in page footers.
 <p>
 
-<dt><b>GRST_ACL_FORMAT</b>
-<dd>Format to use when writing .gacl files: either GACL or XACML.
-<p>
-
-<dt><b>GRST_EXEC_METHOD</b>
-<dd>Specified by GridSiteExecMethod, either suexec, X509DN or directory.
-<p>
-
-<dt><b>GRST_EXEC_DIRECTORY</b>
-<dd>The directory containing the CGI script or executable (used by gsexec
-    to determine which pool account to use in directory mapping mode.)
-<p>
-
-<dt><b>GRST_DISK_MODE</b>
-<dd>The <b>Apache</b> disk permission modes bit pattern, in hexadecimal,
-    starting with 0x. 
-    (Similar to the Unix bit pattern, except with hexadecimal rather than
-    octal values: eg 0x600 [Apache] vs 0600 [Unix] 
-    are both read/write for user only.)
-<p>
-
 </dl>
 
 </body>
index 14f88e0..e47d005 100644 (file)
@@ -336,7 +336,7 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = . ../interface
+INPUT                  =
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
index a9e9f0e..22f0da5 100644 (file)
@@ -87,7 +87,7 @@ void GRSThttpError(char *status)
   printf("Server-CGI: GridSite Admin %s\n", VERSION);
   printf("Content-Length: %d\n", 2 * strlen(status) + 58);
   puts("Content-Type: text/html\n");
-
+   
   printf("<head><title>%s</title></head>\n", status);
   printf("<body><h1   >%s</h1   ></body>\n", status);
    
@@ -108,7 +108,7 @@ void adminfooter(GRSThttpBody *bp, char *dn, char *help_uri, char *dir_uri,
                       dir_uri, admin_file);
   else GRSThttpPrintf(bp, "<a href=\"%s\">"
                       "Back&nbsp;to&nbsp;directory</a> .\n", dir_uri);
-
+  
   if (help_uri != NULL) 
     GRSThttpPrintf(bp, "<a href=\"%s\">Website&nbsp;Help</a> .\n", help_uri);
 
@@ -179,13 +179,13 @@ void justfooter(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
                 char *dir_uri, char *admin_file)
 {
   GRSThttpBody bp;
-
   puts("Status: 200 OK\nContent-Type: text/html");
    
   GRSThttpBodyInit(&bp);
  
   if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasWrite(perm) 
-                                || GRSTgaclPermHasAdmin(perm))
+                                || GRSTgaclPermHasAdmin(perm)) 
                adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
 
   GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
@@ -195,10 +195,10 @@ void justfooter(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
 
 int main()
 {
-  int           i, gsiproxylimit_i = 1;
+  int           gsiproxylimit_i = 1;
   char         *cmd, *dir_uri, *file, *dir_path, *admin_file, *dn = NULL,
                *help_uri, *p, *content_type, *request_uri, *button, 
-               *grst_cred_0, *gsiproxylimit, *dn_lists, buf[12];
+               *grst_cred_0, *gsiproxylimit, *dn_lists;
   GRSTgaclCred *cred;
   GRSTgaclUser *user = NULL;
   GRSTgaclAcl  *acl;
@@ -233,24 +233,11 @@ int main()
           if ((p = index(grst_cred_0, ' ')) &&
               (p = index(++p, ' ')) &&
               (p = index(++p, ' ')) &&
-              (p = index(++p, ' '))) dn = &p[1];
-        }
-             /* User has a cert so check for voms attributes */
-      for(i=1; ; i++)
-        {
-          sprintf (buf, "GRST_CRED_%d", i);
-
-
-          grst_cred_0 = getenv(buf);
-          if (grst_cred_0==NULL) break;
-
-           if (cred=GRSTx509CompactToCred(grst_cred_0))
-                     GRSTgaclUserAddCred(user, cred);
-        }
-      /* no more voms attributes found found */
+              (p = index(++p, ' '))) dn = &p[1];          
+        }                                               
     }
   else if ((dn = getenv("SSL_CLIENT_S_DN")) != NULL)
-    {
+    {      
       cred = GRSTgaclCredNew("person");
       GRSTgaclCredAddValue(cred, "dn", dn);
       user = GRSTgaclUserNew(cred);
@@ -290,7 +277,7 @@ int main()
 
   if ((content_type != NULL) &&
       (GRSTstrCmpShort(content_type, "multipart/form-data; boundary=") == 0))
-    {
+    {    
       uploadfile(dn, perm, help_uri, dir_path, dir_uri, admin_file);
       return 0;
     }
index 1df2f02..e5180de 100644 (file)
@@ -837,7 +837,8 @@ int GRSTgaclUserHasCred(GRSTgaclUser *user, GRSTgaclCred *cred)
 {
   GRSTgaclCred      *crediter;
   GRSTgaclNamevalue *usernamevalue, *crednamevalue;
-
+  int i;
+  char buf[12];
 
   if (cred == NULL) return 0;
 
@@ -853,8 +854,33 @@ int GRSTgaclUserHasCred(GRSTgaclUser *user, GRSTgaclCred *cred)
       
       return GRSTgaclDNlistHasUser((cred->firstname)->value, user);
     }
+  /* Check for voms attributes*/
+  
+  if  (strcmp(cred->type, "voms")==0)
+    {
+      if ( (user->firstcred==NULL) ||
+           ((user->firstcred)->firstname == NULL) ||
+           (cred->firstname == NULL) ||
+           (strcmp((cred->firstname)->name, "fqan") != 0) ||
+           ((cred->firstname)->next != NULL)) return 0;
+          
+      /*assuimng only one name/value pair per cred*/
+      for(i=1; ; i++)
+      {
+             sprintf (buf, "GRST_CRED_%d", i);
+             if (getenv(buf)==NULL) break;
+
+             if (strcmp ( 
+                          index(getenv(buf),'/'), 
+                          (cred->firstname)->value
+                        )  
+                  == 0) return 1;
+      }
+      /* no match found */
+      return 0;
+    }
 
-  if (strcmp(cred->type, "dns") == 0)
+  if (strcmp(cred->type, "dns") == 0) 
     {
       if ((user->firstcred == NULL) ||
           ((user->firstcred)->firstname == NULL) ||
index ccf6100..942dd7e 100644 (file)
@@ -647,7 +647,7 @@ GRSTgaclCred *GRSTx509CompactToCred(char *grst_cred)
 
    if (strncmp(grst_cred, "VOMS ", 5) == 0)
      {
-       if ((sscanf(grst_cred, "VOMS %lu %lu %d",
+       if ((sscanf(grst_cred, "VOMS %lu %lu", 
                               &notbefore, &notafter, &delegation) == 3)
             && (now >= notbefore)
             && (now <= notafter)
@@ -658,11 +658,11 @@ GRSTgaclCred *GRSTx509CompactToCred(char *grst_cred)
          {
            /* include /VO/group/subgroup/Role=role/Capability=cap */
 
-           if (p[1] != '/') return NULL; /* must begin with / */
+           if (*p != '/') return NULL; /* must begin with / */
 
            cred = GRSTgaclCredNew("voms");
            GRSTgaclCredSetDelegation(cred, delegation);
-           GRSTgaclCredAddValue(cred, "fqan", &p[1]);
+           GRSTgaclCredAddValue(cred, "fqan", p);
          }
 
        return cred;