[condor] Pre-release 7.7.0 and allow condor-qmf Scheduler connection to Cumin

matt matt at fedoraproject.org
Fri May 13 21:15:02 UTC 2011


commit 0f2f8222ec3a46958723aa93f9cb6471682d2e12
Author: Matthew Farrellee <matt at redhat.com>
Date:   Fri May 13 17:14:27 2011 -0400

    Pre-release 7.7.0 and allow condor-qmf Scheduler connection to Cumin

 7.6.1-catch_up.patch        |68814 -------------------------
 7.7.0-catch-up.patch        |117592 +++++++++++++++++++++++++++++++++++++++++++
 condor.spec                 |   14 +-
 condor_config.generic.patch |  123 +-
 4 files changed, 117629 insertions(+), 68914 deletions(-)
---
diff --git a/7.7.0-catch-up.patch b/7.7.0-catch-up.patch
new file mode 100644
index 0000000..367a460
--- /dev/null
+++ b/7.7.0-catch-up.patch
@@ -0,0 +1,117592 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e6435f5..0c9e69f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,7 +29,7 @@ set(PACKAGE "condor")
+ #   Condor and other systems parse this number. Keep it simple:
+ #   Number.Number.Number. Do nothing else.  If you need to add
+ #   more information, PRE_RELEASE is usually the right location.
+-set(VERSION "7.6.0")
++set(VERSION "7.7.0")
+ 
+ # Set PRE_RELEASE to either a string (i.e. "PRE-RELEASE-UWCS") or OFF
+ #   This shuld be "PRE-RELEASE-UWCS most of the time, and OFF when
+@@ -90,15 +90,18 @@ include (CondorStaticLib)
+ include (CondorPlugin)
+ include (CheckCXXCompilerFlag)
+ include (CheckCXXSourceCompiles)
+-include (CondorConfigure)     # will initiate the configure
+ include (AddSubdirectories)
+ include (CondorPLTest)
+ include (CondorExeTest)
+ include (CondorStdExeTest)
+ include (SrcTargetRef)
+ include (DumpLocalFlags)
++include (CondorPreExternal)
++include (CondorPostExternal)
++include (CondorConfigure)     # will initiate the configure
+ include (TarGz) # Must be after include(CondorPackageConfig)
+ 
++
+ if ( WINDOWS )
+ 	set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ endif ( WINDOWS )
+diff --git a/build/cmake/CondorConfigure.cmake b/build/cmake/CondorConfigure.cmake
+index ad69e0c..2994924 100644
+--- a/build/cmake/CondorConfigure.cmake
++++ b/build/cmake/CondorConfigure.cmake
+@@ -128,7 +128,15 @@ if( NOT WINDOWS)
+ 
+ 	set(HAVE_PTHREAD_H ${CMAKE_HAVE_PTHREAD_H})
+ 
+-	find_library(HAVE_DMTCP dmtcpaware HINTS /usr/local/lib/dmtcp )
++	find_library( HAVE_DMTCP dmtcpaware HINTS /usr/local/lib/dmtcp )
++	find_library( LIBRESOLV_PATH resolv )
++    if( NOT "${LIBRESOLV_PATH}" MATCHES "-NOTFOUND" )
++      set(HAVE_LIBRESOLV ON)
++    endif()
++	find_library( LIBDL_PATH resolv )
++    if( NOT "${LIBDL_PATH}" MATCHES "-NOTFOUND" )
++      set(HAVE_LIBDL ON)
++    endif()
+ 	check_library_exists(dl dlopen "" HAVE_DLOPEN)
+ 	check_symbol_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_DECL_RES_INIT)
+ 
+@@ -140,7 +148,6 @@ if( NOT WINDOWS)
+ 	check_function_exists("_fstati64" HAVE__FSTATI64)
+ 	check_function_exists("getdtablesize" HAVE_GETDTABLESIZE)
+ 	check_function_exists("getpagesize" HAVE_GETPAGESIZE)
+-	check_function_exists("getwd" HAVE_GETWD)
+ 	check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY)
+ 	check_function_exists("inet_ntoa" HAS_INET_NTOA)
+ 	check_function_exists("lchown" HAVE_LCHOWN)
+@@ -198,7 +205,11 @@ if( NOT WINDOWS)
+ 
+ 	check_struct_has_member("struct statfs" f_fstyp "sys/statfs.h" HAVE_STRUCT_STATFS_F_FSTYP)
+ 	if (NOT ${OS_NAME} STREQUAL "DARWIN")
+-		check_struct_has_member("struct statfs" f_fstypename "sys/statfs.h" HAVE_STRUCT_STATFS_F_FSTYPENAME)
++  	  if( HAVE_SYS_STATFS_H )
++		check_struct_has_member("struct statfs" f_fstypename "sys/statfs.h" HAVE_STRUCT_STATFS_F_FSTYPENAME )
++	  else()
++		check_struct_has_member("struct statfs" f_fstypename "sys/mount.h" HAVE_STRUCT_STATFS_F_FSTYPENAME )
++	  endif()
+ 	endif()
+ 	check_struct_has_member("struct statfs" f_type "sys/statfs.h" HAVE_STRUCT_STATFS_F_TYPE)
+ 	check_struct_has_member("struct statvfs" f_basetype "sys/types.h;sys/statvfs.h" HAVE_STRUCT_STATVFS_F_BASETYPE)
+@@ -322,6 +333,10 @@ elseif(${OS_NAME} STREQUAL "HPUX")
+ 	set(HPUX ON)
+ 	set(DOES_SAVE_SIGSTATE ON)
+ 	set(NEEDS_64BIT_STRUCTS ON)
++elseif(${OS_NAME} STREQUAL "HPUX")
++	set(HPUX ON)
++	set(DOES_SAVE_SIGSTATE ON)
++	set(NEEDS_64BIT_STRUCTS ON)
+ endif()
+ 
+ ##################################################
+@@ -338,6 +353,7 @@ option(BUILD_TESTS "Will build internal test applications" ON)
+ option(WANT_CONTRIB "Enable quill functionality" OFF)
+ option(WANT_FULL_DEPLOYMENT "Install condors deployment scripts, libs, and includes" ON)
+ option(WANT_GLEXEC "Build and install condor glexec functionality" ON)
++option(ENABLE_JAVA_TESTS "Enable java tests" ON)
+ 
+ if (UW_BUILD OR WINDOWS)
+   option(PROPER "Try to build using native env" OFF)
+@@ -397,47 +413,40 @@ if (PROPER)
+ 	find_path(HAVE_OPENSSL_SSL_H "openssl/ssl.h")
+ 	find_path(HAVE_PCRE_H "pcre.h")
+ 	find_path(HAVE_PCRE_PCRE_H "pcre/pcre.h" )
+-else(PROPER)
++else()
+ 	message(STATUS "********* Configuring externals using [uw-externals] a.k.a NONPROPER *********")
+-	# temporarily disable cacheing externals on windows, primarily b/c of nmi.
+-	option(SCRATCH_EXTERNALS "Will put the externals into scratch location" OFF)
+-
+ endif(PROPER)
+ 
+-## this primarily exists for nmi cached building.. yuk!
+-if (SCRATCH_EXTERNALS AND EXISTS "/scratch/externals/cmake")
+-	if (WINDOWS)
+-		set (EXTERNAL_STAGE C:/temp/${PACKAGE_NAME})
+-		set (EXTERNAL_DL C:/temp/${PACKAGE_NAME}/download)
+-	else(WINDOWS)
+-		set (EXTERNAL_STAGE /scratch/externals/cmake/${PACKAGE_NAME}_${PACKAGE_VERSION}/stage/root)
+-		set (EXTERNAL_DL /scratch/externals/cmake/${PACKAGE_NAME}_${PACKAGE_VERSION}/externals/stage/download)
+-
+-		set (EXTERNAL_MOD_DEP /scratch/externals/cmake/${PACKAGE_NAME}_${PACKAGE_VERSION}/mod.txt)
+-		add_custom_command(
+-		OUTPUT ${EXTERNAL_MOD_DEP}
+-		COMMAND chmod
+-		ARGS -f -R a+rwX /scratch/externals/cmake && touch ${EXTERNAL_MOD_DEP}
+-		COMMENT "changing ownership on externals cache because so on multiple user machines they can take advantage" )
+-	endif(WINDOWS)
++if (WINDOWS)
++	# the environment variable CONDOR_BLD_EXTERNAL_STAGE will be set to the
++	# path for externals if the invoker wants shared externals. otherwise
++	# just build externals in a sub-directory of the project directory
++	#
++	set (EXTERNAL_STAGE $ENV{CONDOR_BLD_EXTERNAL_STAGE})
++	if (EXTERNAL_STAGE)
++        # cmake doesn't like windows paths, so make sure that this path separators are unix style
++	    string (REPLACE "\\" "/" EXTERNAL_STAGE "${EXTERNAL_STAGE}")
++	else()
++	   set (EXTERNAL_STAGE ${PROJECT_BINARY_DIR}/bld_external)
++    endif(EXTERNAL_STAGE)
+ else()
+-	set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/root/${PACKAGE_NAME}_${PACKAGE_VERSION})
+-	set (EXTERNAL_DL ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/download/${PACKAGE_NAME}_${PACKAGE_VERSION})
+-endif()
++	if (PROPER)
++		set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/root/${PACKAGE_NAME}_${PACKAGE_VERSION})
++	else()
++		# temporarily disable AFS cache. 
++		#if ( EXISTS /p/condor/workspaces/externals  )
++		#	set (EXTERNAL_STAGE /p/condor/workspaces/externals/cmake/${OS_NAME}/${SYS_ARCH})
++		#else()
++			# in case someone tries something funky insert OS & ARCH in path
++			set (EXTERNAL_STAGE /scratch/condor_externals) #${OS_NAME}/${SYS_ARCH})
++		#endif()	
++	endif()
++endif(WINDOWS)
+ 
+ dprint("EXTERNAL_STAGE=${EXTERNAL_STAGE}")
+-set (EXTERNAL_BUILD_PREFIX ${EXTERNAL_STAGE}/opt)
+-
+-# let cmake carve out the paths for the externals
+-file (MAKE_DIRECTORY ${EXTERNAL_DL}
+-	${EXTERNAL_STAGE}/include
+-	${EXTERNAL_STAGE}/lib
+-	${EXTERNAL_STAGE}/lib64
+-	${EXTERNAL_STAGE}/opt
+-	${EXTERNAL_STAGE}/src )
+-
+-include_directories( ${EXTERNAL_STAGE}/include )
+-link_directories( ${EXTERNAL_STAGE}/lib64 ${EXTERNAL_STAGE}/lib )
++if (NOT EXISTS ${EXTERNAL_STAGE})
++	file ( MAKE_DIRECTORY ${EXTERNAL_STAGE} )
++endif()
+ 
+ ###########################################
+ add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/boost/1.39.0)
+@@ -460,12 +469,14 @@ if (NOT WINDOWS)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libxml2/2.7.3)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libvirt/0.6.2)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libdeltacloud/0.7)
++	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libcgroup/0.37)
+ 
+ 	# globus is an odd *beast* which requires a bit more config.
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/globus/5.0.1-p1)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/blahp/1.16.1)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/voms/1.9.10_4)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/cream/1.12.1_14)
++	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/wso2/2.1.0)
+ 
+ 	# the following logic if for standard universe *only*
+ 	if (LINUX AND NOT CLIPPED AND GLIBC_VERSION AND NOT PROPER)
+@@ -528,8 +539,8 @@ add_definitions(-DHAVE_CONFIG_H)
+ 
+ ###########################################
+ # include and link locations
+-include_directories(${EXTERNAL_STAGE}/include ${EXTERNAL_INCLUDES} )
+-link_directories(${EXTERNAL_STAGE}/lib)
++include_directories( ${CONDOR_EXTERNAL_INCLUDE_DIRS} )
++link_directories( ${CONDOR_EXTERNAL_LINK_DIRS} )
+ 
+ if ( $ENV{JAVA_HOME} )
+ 	include_directories($ENV{JAVA_HOME}/include)
+@@ -669,7 +680,7 @@ else(MSVC)
+ 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--warn-once -Wl,--warn-common")
+ 	endif(LINUX)
+ 
+-	if(HAVE_DLOPEN AND NOT DARWIN)
++	if( HAVE_LIBDL AND NOT BSD_UNIX )
+ 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl")
+ 	endif()
+ 
+@@ -678,7 +689,7 @@ else(MSVC)
+ 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-berok -Wl,-bstatic -lstdc++ -Wl,-bdynamic -lcfg -lodm -static-libgcc")
+ 	endif(AIX)
+ 
+-	if (NOT PROPER AND NOT AIX)
++	if ( NOT PROPER AND HAVE_LIBRESOLV )
+ 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lresolv")
+ 		if (NOT DARWIN)
+ 			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lcrypt")
+@@ -818,9 +829,15 @@ dprint ( "CONDOR_PACKAGE_NAME: ${CONDOR_PACKAGE_NAME}" )
+ # is TRUE on all UNIX-like OS's, including Apple OS X and CygWin
+ dprint ( "UNIX: ${UNIX}" )
+ 
++# is TRUE on all BSD-derived UNIXen
++dprint ( "BSD_UNIX: ${BSD_UNIX}" )
++
+ # is TRUE on all UNIX-like OS's, including Apple OS X and CygWin
+ dprint ( "Linux: ${LINUX_NAME}" )
+ 
++# Print FreeBSD info
++dprint ( "FreeBSD: ${FREEBSD_MAJOR}.${FREEBSD_MINOR}" )
++
+ # is TRUE on Windows, including CygWin
+ dprint ( "WIN32: ${WIN32}" )
+ 
+diff --git a/build/cmake/CondorPackageConfig.cmake b/build/cmake/CondorPackageConfig.cmake
+index 57b2700..b42e414 100644
+--- a/build/cmake/CondorPackageConfig.cmake
++++ b/build/cmake/CondorPackageConfig.cmake
+@@ -119,6 +119,7 @@ set( C_INCLUDE		include)
+ set( C_MAN			man)
+ set( C_SRC			src)
+ set( C_SQL			sql)
++set( C_SERVICES     services)
+ 
+ set( C_INIT			etc/init.d )
+ set( C_ETC			etc/examples )
+@@ -152,6 +153,7 @@ elseif ( ${OS_NAME} MATCHES "WIN" )
+ 	set( C_SBIN bin )
+ 	set( C_ETC etc )
+ 
++	set (CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
+ 	set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CONDOR_PACKAGE_NAME}")
+ 	set (CPACK_PACKAGE_FILE_NAME "${CONDOR_PACKAGE_NAME}")
+ 	set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CONDOR_VERSION}")
+diff --git a/build/cmake/macros/CondorPostExternal.cmake b/build/cmake/macros/CondorPostExternal.cmake
+new file mode 100644
+index 0000000..20208db
+--- /dev/null
++++ b/build/cmake/macros/CondorPostExternal.cmake
+@@ -0,0 +1,54 @@
++ ###############################################################
++ # 
++ # Copyright 2011 Red Hat, Inc. 
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ############################################################### 
++ 
++MACRO (CONDOR_POST_EXTERNAL _TARGET _INC_DIR _LIB_DIR)
++
++	string( TOUPPER "${_TARGET}" _UP_TARGET )
++
++	if (WINDOWS)
++		set_property( TARGET ${_TARGET} PROPERTY FOLDER "externals" )
++	endif()	
++		
++	# if a local built copy exists disable from all build 
++	if ( ${_UP_TARGET}_PREBUILT )  
++		set_target_properties( ${_TARGET} PROPERTIES EXCLUDE_FROM_ALL TRUE)
++		message (STATUS "--> (${_TARGET}): excluded from all target, cached version exists") 
++	else()
++		append_var(CONDOR_EXTERNALS ${_TARGET})
++		append_var(${_UP_TARGET}_REF ${_TARGET})
++	endif()
++	
++	set( ${_UP_TARGET}_FOUND ${${_UP_TARGET}_FOUND} PARENT_SCOPE )
++	set( HAVE_EXT_${_UP_TARGET} ON PARENT_SCOPE )
++
++	# used by --with packages
++	set( ${_UP_TARGET}_INSTALL_LOC ${${_UP_TARGET}_INSTALL_LOC} PARENT_SCOPE)
++
++	set(${_TARGET}INCLUDE ${_INC_DIR})
++	if(${_TARGET}INCLUDE)
++		append_var(CONDOR_EXTERNAL_INCLUDE_DIRS ${${_UP_TARGET}_INSTALL_LOC}/${_INC_DIR})
++		append_var(${_UP_TARGET}_INCLUDE ${${_UP_TARGET}_INSTALL_LOC}/${_INC_DIR})
++	endif()
++	
++	set(${_TARGET}LINK ${_LIB_DIR})
++	if(${_TARGET}LINK)
++		append_var(CONDOR_EXTERNAL_LINK_DIRS ${${_UP_TARGET}_INSTALL_LOC}/${_LIB_DIR})
++		append_var(${_UP_TARGET}_LD ${${_UP_TARGET}_INSTALL_LOC}/${_LIB_DIR})
++	endif()
++
++ENDMACRO(CONDOR_POST_EXTERNAL)
+diff --git a/build/cmake/macros/CondorPreExternal.cmake b/build/cmake/macros/CondorPreExternal.cmake
+new file mode 100644
+index 0000000..c4c790c
+--- /dev/null
++++ b/build/cmake/macros/CondorPreExternal.cmake
+@@ -0,0 +1,53 @@
++ ###############################################################
++ # 
++ # Copyright 2011 Red Hat, Inc. 
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ############################################################### 
++
++
++################################################################
++# 
++#
++#
++# The macro defines the following variables:
++#   ${_TARGET_VER} - equal to input ${_VER}
++#   ${_TARGET}_STAGE - base location where files will be placed
++#   ${_TARGET}_INSTALL_LOC - install location which will be used as reference
++#   ${_TARGET}_PREBUILT - indicates if it is prebuilt used by condor_post_external
++# Example usage:
++#   condor_pre_external(DRMAA drmaa-1.6 "include;lib" "include/drmaa.h")
++
++MACRO (CONDOR_PRE_EXTERNAL _TARGET _VER _INSTALL_DIRS _EXISTANCE_CHECK )
++
++	# set variables which will be used throughout
++	set ( ${_TARGET}_VER ${_VER} )
++	set ( ${_TARGET}_STAGE ${EXTERNAL_STAGE}/${${_TARGET}_VER} )
++	set ( ${_TARGET}_INSTALL_LOC ${${_TARGET}_STAGE}/install )
++	
++	file ( MAKE_DIRECTORY ${${_TARGET}_INSTALL_LOC} )
++	foreach ( dir ${_INSTALL_DIRS} )
++		if (NOT EXISTS ${${_TARGET}_INSTALL_LOC}/${dir})
++			file ( MAKE_DIRECTORY ${${_TARGET}_INSTALL_LOC}/${dir} )
++		endif()
++	endforeach(dir)
++
++	# Check for existance of 
++	#message (STATUS "Checking ${${_TARGET}_INSTALL_LOC}/${_EXISTANCE_CHECK}") 
++	if ( EXISTS ${${_TARGET}_INSTALL_LOC}/${_EXISTANCE_CHECK} )
++		#message (STATUS "FOUND!") 
++		set (${_TARGET}_PREBUILT ON )
++	endif()
++
++ENDMACRO (CONDOR_PRE_EXTERNAL)
+diff --git a/build/cmake/macros/SystemSpecificInformations.cmake b/build/cmake/macros/SystemSpecificInformations.cmake
+index 125de4b..a694153 100644
+--- a/build/cmake/macros/SystemSpecificInformations.cmake
++++ b/build/cmake/macros/SystemSpecificInformations.cmake
+@@ -227,9 +227,41 @@ if(UNIX)
+       else()
+ 	set(LINUX_NAME "NOT-FOUND")
+       endif(LINUX_NAME)
++    endif(EXISTS "/etc/issue")
++
++  elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++    string(REGEX MATCH "(([0-9]+)\\.([0-9]+))-RELEASE" FREEBSD "${CMAKE_SYSTEM_VERSION}")
++    set( FREEBSD_RELEASE "${CMAKE_MATCH_1}" )
++    set( FREEBSD_MAJOR "${CMAKE_MATCH_2}" )
++    set( FREEBSD_MINOR "${CMAKE_MATCH_3}" )
++    set( FREEBSD_VERSION "${CMAKE_SYSTEM_VERSION}" )
++    set( SYSTEM_NAME "freebsd_${FREEBSD_RELEASE}" )
++    set( CONDOR_FREEBSD ON )
++    set( BSD_UNIX ON )
++    if(FREEBSD_MAJOR MATCHES "4" )
++      set( CONDOR_FREEBSD4 ON )
++    elseif(FREEBSD_MAJOR MATCHES "5" )
++      set( CONDOR_FREEBSD5 ON )
++    elseif(FREEBSD_MAJOR MATCHES "6" ) 
++      set( CONDOR_FREEBSD6 ON )
++    elseif(FREEBSD_MAJOR MATCHES "7" )
++      set( CONDOR_FREEBSD7 ON )
++    elseif(FREEBSD_MAJOR MATCHES "8" )
++      set( CONDOR_FREEBSD8 ON )
++    endif()
++    if( CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" )
++      set( SYS_ARCH "x86_64")
++    elseif( CMAKE_SYSTEM_PROCESSOR MATCHES "i386" )
++      set( SYS_ARCH "x86")
++    endif( )
++    set( PLATFORM "${SYS_ARCH}_freebsd_${FREEBSD_RELEASE}")
++
++  elseif(OS_NAME MATCHES "DARWIN")
++    set( BSD_UNIX ON )
+ 
+-    endif(EXISTS "/etc/issue")      
+   endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
++
+   set(SPECIFIC_SYSTEM_VERSION_NAME "${SPECIFIC_SYSTEM_VERSION_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+   set(SPECIFIC_COMPILER_NAME "")
++
+ endif(UNIX)
+diff --git a/build/cmake/macros/gSOAPGen.cmake b/build/cmake/macros/gSOAPGen.cmake
+index 08515f8..734a5eb 100644
+--- a/build/cmake/macros/gSOAPGen.cmake
++++ b/build/cmake/macros/gSOAPGen.cmake
+@@ -50,8 +50,8 @@ if ( HAVE_EXT_GSOAP )
+ 			ALL
+ 			DEPENDS ${${_DAEMON}_SOAP_SRCS} )
+ 			
+-	if (NOT PROPER)
+-		add_dependencies( gen_${_DAEMON}_soapfiles gsoap )
++	if (NOT PROPER AND GSOAP_REF)
++		add_dependencies( gen_${_DAEMON}_soapfiles ${GSOAP_REF} )
+ 	endif()
+ 	
+ 	if (WINDOWS)
+diff --git a/build/cmake/modules/ExternalProjectPatched.cmake b/build/cmake/modules/ExternalProjectPatched.cmake
+index 0fc4633..816b7f2 100644
+--- a/build/cmake/modules/ExternalProjectPatched.cmake
++++ b/build/cmake/modules/ExternalProjectPatched.cmake
+@@ -264,6 +264,10 @@ function(_ep_write_extractfile_script script_filename filename tmp directory)
+     set(args xfz)
+   endif()
+ 
++  if(filename MATCHES ".bz2$")
++    set(args xfj)
++  endif()
++
+   if(filename MATCHES ".tar.gz$")
+     set(args xfz)
+   endif()
+@@ -403,7 +407,9 @@ function(_ep_set_directories name)
+   foreach(var ${places})
+     string(TOUPPER "${var}" VAR)
+     get_property(dir TARGET ${name} PROPERTY _EP_${VAR}_DIR)
+-    file(MAKE_DIRECTORY "${dir}")
++    if(NOT EXISTS "${dir}")
++        file(MAKE_DIRECTORY "${dir}")
++    endif()
+     if(NOT EXISTS "${dir}")
+       message(FATAL_ERROR "dir '${dir}' does not exist after file(MAKE_DIRECTORY)")
+     endif()
+@@ -648,7 +654,7 @@ function(_ep_add_download_command name)
+     set(work_dir ${download_dir})
+     
+     string(REGEX MATCH "[^/]*$" fname "${url}")
+-    if(NOT "${fname}" MATCHES "\\.(tar|tgz|zip|tar\\.gz)$")
++    if(NOT "${fname}" MATCHES "\\.(tar|tgz|zip|tar\\.gz|bz2)$")
+ 		message(FATAL_ERROR "Could not extract tarball filename from url:\n  ${url}")
+     endif()
+     
+diff --git a/externals/bundles/blahp/1.16.1/CMakeLists.txt b/externals/bundles/blahp/1.16.1/CMakeLists.txt
+index 2e23ac6..3ba9b82 100644
+--- a/externals/bundles/blahp/1.16.1/CMakeLists.txt
++++ b/externals/bundles/blahp/1.16.1/CMakeLists.txt
+@@ -28,32 +28,33 @@ if ( WITH_BLAHP )
+ 	if ( NOT PROPER )
+ 		message(STATUS "TODO:TSTCLAIR BLAHP eval if linking correct popt w/o mundging Makefile.am")
+ 
+-		set(POPT_VER popt-1.14)
+-		set(BLAHP_VER blahp-1.16.1)
++		########################################
++		condor_pre_external( POPT popt-1.14 "lib;include" "lib/libpopt.a")
+ 
+ 		ExternalProject_Add(popt
+-						PREFIX ${EXTERNAL_BUILD_PREFIX}/${POPT_VER}
+ 						#-- Download Step ----------
+ 						DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${POPT_VER}.tar.gz ${CMD_TERM}
+-						DOWNLOAD_DIR ${EXTERNAL_DL}
++						DOWNLOAD_DIR ${POPT_STAGE}/dl
+ 						URL http://parrot.cs.wisc.edu/externals/${POPT_VER}.tar.gz
+ 						#--Configure step ----------
+-			    		CONFIGURE_COMMAND cd ${POPT_VER} && ./configure --prefix=${EXTERNAL_STAGE}
++			    		CONFIGURE_COMMAND cd ${POPT_VER} && ./configure --prefix=${POPT_INSTALL_LOC}
+ 						#--Build Step ----------
+ 						BUILD_COMMAND cd ${POPT_VER} && make
+ 						BUILD_IN_SOURCE 1
+ 						#--install Step ----------
+-						INSTALL_DIR ${EXTERNAL_STAGE}
++						INSTALL_DIR ${POPT_INSTALL_LOC}
+ 						INSTALL_COMMAND cd ${POPT_VER} && make install )
+ 
+-		#dprint("we ingore the return param from bootstrap.. there are errors!")
++		condor_post_external( popt OFF OFF )
+ 
++		########################################
++		condor_pre_external( BLAHP blahp-1.16.1 "lib;include" "done")
++		
+ 		ExternalProject_Add(blahp
+-						DEPENDS openssl globus popt
+-					    PREFIX ${EXTERNAL_BUILD_PREFIX}/${BLAHP_VER}
++						DEPENDS ${OPENSSL_REF} ${GLOBUS_REF} ${POPT_REF}
+ 					    #-- Download Step ----------
+ 						DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${BLAHP_VER}.tar.gz ${CMD_TERM}
+-					    DOWNLOAD_DIR ${EXTERNAL_DL}
++					    DOWNLOAD_DIR ${BLAHP_STAGE}/dl
+ 						URL http://parrot.cs.wisc.edu/externals/${BLAHP_VER}.tar.gz
+ 						#--Patch step ----------
+ 						PATCH_COMMAND patch -i ${CMAKE_CURRENT_SOURCE_DIR}/classad.patch -p0 &&
+@@ -67,27 +68,27 @@ if ( WITH_BLAHP )
+ 							mv org.glite.ce.blahp/config/blah.config.template org.glite.ce.blahp/config/batch_gahp.config.template
+ 						#--Configure step ----------
+ 						CONFIGURE_COMMAND cd org.glite.ce.blahp &&
+-							./bootstrap || ./configure --with-classads-prefix=${EXTERNAL_STAGE}
+-							--with-openssl-prefix=${EXTERNAL_STAGE}
+-							--with-globus-prefix=${EXTERNAL_STAGE}
++							./bootstrap || ./configure --with-classads-prefix=${CLASSADS_INSTALL_LOC}
++							--with-openssl-prefix=${OPENSSL_INSTALL_LOC}
++							--with-globus-prefix=${GLOBUS_INSTALL_LOC}
+ 							--with-globus-nothr-flavor=gcc${BIT_MODE}dbg
+-							--prefix=${EXTERNAL_STAGE}/opt/glite
++							--prefix=${BLAHP_INSTALL_LOC}/opt/glite
+ 						#--Build Step ----------
+ 						BUILD_COMMAND cd org.glite.ce.blahp && make
+ 						BUILD_IN_SOURCE 1
+ 						#--install Step ----------
+-						INSTALL_DIR ${EXTERNAL_STAGE}
+-						INSTALL_COMMAND cd org.glite.ce.blahp && make install )
++						INSTALL_DIR ${BLAHP_INSTALL_LOC}
++						INSTALL_COMMAND cd org.glite.ce.blahp && make install && touch ${BLAHP_INSTALL_LOC}/done )
++
++		add_dependencies(blahp ${CLASSADS_FOUND})
+ 
+ 		### set the install
+-		install ( DIRECTORY ${EXTERNAL_STAGE}/opt/glite DESTINATION ${C_LIBEXEC} USE_SOURCE_PERMISSIONS )
++		install ( DIRECTORY ${BLAHP_INSTALL_LOC}/opt/glite DESTINATION ${C_LIBEXEC} USE_SOURCE_PERMISSIONS )
+ 
+-		add_dependencies(blahp classads)	
++		condor_post_external( blahp OFF OFF )
+ 
+ 		set(BLAHP_FOUND ON)
+ 
+-		append_var (CONDOR_EXTERNALS blahp)
+-
+ 	else ( NOT PROPER )
+ 
+ 		find_program( BLAHP_FOUND BLClient HINTS /usr/bin )
+@@ -99,7 +100,6 @@ if ( WITH_BLAHP )
+ endif( WITH_BLAHP )
+ 
+ if ( BLAHP_FOUND )
+-
+ 	message( STATUS "external configured (blahp) BLAHP_FOUND=${BLAHP_FOUND}" )
+ 	set( BLAHP_FOUND ${BLAHP_FOUND} PARENT_SCOPE )
+ 	set( HAVE_EXT_BLAHP ON PARENT_SCOPE )
+diff --git a/externals/bundles/blahp/1.16.1/classads.m4 b/externals/bundles/blahp/1.16.1/classads.m4
+index 424536f..33608eb 100644
+--- a/externals/bundles/blahp/1.16.1/classads.m4
++++ b/externals/bundles/blahp/1.16.1/classads.m4
+@@ -16,7 +16,7 @@ AC_DEFUN(AC_CLASSADS,
+     AC_MSG_CHECKING([for CLASSAD installation])
+ 
+     CLASSAD_CFLAGS=""
+-    CLASSAD_LIBS="-lclassad_ns -lpcre"
++    CLASSAD_LIBS="-lclassad -lpcre"
+     CLASSAD_DL_LIBS="-lclassad_dl"
+     if test -n "$with_classads_prefix" -a "$with_classads_prefix" != "/usr" ; then
+             AC_MSG_RESULT([prefix: $with_classads_prefix])
+@@ -24,7 +24,7 @@ AC_DEFUN(AC_CLASSADS,
+             ac_classads_prefix=$with_classads_prefix
+ 
+             CLASSAD_CFLAGS="-I$with_classads_prefix/include"
+-            CLASSAD_LIBS="$with_classads_prefix/lib/libclassad_ns.a $with_classads_prefix/lib/libpcre.a"
++            CLASSAD_LIBS="$with_classads_prefix/lib/libclassad.a $with_classads_prefix/lib/libpcre.a"
+ 	    CLASSAD_DL_LIBS="-L$with_classads_prefix/lib $CLASSAD_DL_LIBS"
+     fi
+ 
+diff --git a/externals/bundles/boost/1.39.0/CMakeLists.txt b/externals/bundles/boost/1.39.0/CMakeLists.txt
+index 3d58fcf..10c2d77 100644
+--- a/externals/bundles/boost/1.39.0/CMakeLists.txt
++++ b/externals/bundles/boost/1.39.0/CMakeLists.txt
+@@ -28,6 +28,8 @@ if (WITH_BOOST )
+ 
+   if (NOT PROPER)
+ 
++		condor_pre_external( BOOST boost_1_39_0 "lib;include" "include/boost")
++		
+ 		if (WINDOWS)
+ 		  # need to expand the configure and
+ 		  set(TOOLSET msvc)
+@@ -51,7 +53,7 @@ if (WITH_BOOST )
+ 		  set(BOOST_INSTALL ${EXEC}bjam -a --with-thread
+ 		  --with-program_options --with-system --with-regex
+ 		  --with-filesystem --with-date_time --build-type=complete
+-		  --prefix=${EXTERNAL_STAGE} --libdir=${EXTERNAL_STAGE}/lib
++		  --prefix=${BOOST_INSTALL_LOC} --libdir=${BOOST_INSTALL_LOC}/lib
+ 		  define=BOOST_HAS_THREADS link=shared variant=release toolset=${TOOLSET}
+ 		  install)
+ 		else()
+@@ -60,42 +62,37 @@ if (WITH_BOOST )
+ 
+ 
+ 		# so the idea of privately staging boost is silly.
+-		set (BOOST_VER 1_39_0)
+ 		ExternalProject_Add(boost
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/boost_${BOOST_VER}
+ 				    #-- Download Step ----------
+-					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/boost_${BOOST_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/boost_${BOOST_VER}.tar.gz
++					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${BOOST_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${BOOST_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${BOOST_VER}.tar.gz
+ 					#--Patch step ----------
+ 					PATCH_COMMAND ${BOOST_PATCH}
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd boost_${BOOST_VER} ${CMD_TERM}
+-				    	./bootstrap.${JAM_EXT} --prefix=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${BOOST_VER} ${CMD_TERM}
++				    	./bootstrap.${JAM_EXT} --prefix=${BOOST_INSTALL_LOC}
+ 				    #--Build Step ----------
+-				    BUILD_COMMAND cd boost_${BOOST_VER} &&
+-				    ${EXEC}bjam --with-thread --layout=system --prefix=${EXTERNAL_STAGE} --libdir=${EXTERNAL_STAGE}/lib define=BOOST_HAS_THREADS link=static variant=release toolset=${TOOLSET} install
++				    BUILD_COMMAND cd ${BOOST_VER} &&
++				    ${EXEC}bjam --with-thread --layout=system --prefix=${BOOST_INSTALL_LOC} --libdir=${BOOST_INSTALL_LOC}/lib define=BOOST_HAS_THREADS link=static variant=release toolset=${TOOLSET} install
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd boost_${BOOST_VER} && ${BOOST_INSTALL} )
+-				  
+-
+-	append_var(CONDOR_EXTERNALS boost)
++				    INSTALL_DIR ${BOOST_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${BOOST_VER} && ${BOOST_INSTALL} )
++				  	
+ 	
+ 	if (WINDOWS)
+-		set_property( TARGET boost PROPERTY FOLDER "externals" )
+-		set(BOOST_ROOT ${EXTERNAL_STAGE} PARENT_SCOPE)
++		set(BOOST_ROOT ${BOOST_INSTALL_LOC} PARENT_SCOPE)
+ 
+         if (WANT_CONTRIB)
+ 
+             # binding dep to VS-2008 :-( there is no easy solution to this
+-            install ( FILES ${EXTERNAL_STAGE}/lib/boost_date_time-vc90-mt-1_39.dll
+-                        ${EXTERNAL_STAGE}/lib/boost_filesystem-vc90-mt-1_39.dll
+-                        ${EXTERNAL_STAGE}/lib/boost_program_options-vc90-mt-1_39.dll
+-                        ${EXTERNAL_STAGE}/lib/boost_regex-vc90-mt-1_39.dll
+-                        ${EXTERNAL_STAGE}/lib/boost_system-vc90-mt-1_39.dll
+-                        ${EXTERNAL_STAGE}/lib/boost_thread-vc90-mt-1_39.dll
++            install ( FILES ${BOOST_INSTALL_LOC}/lib/boost_date_time-vc90-mt-1_39.dll
++                        ${BOOST_INSTALL_LOC}/lib/boost_filesystem-vc90-mt-1_39.dll
++                        ${BOOST_INSTALL_LOC}/lib/boost_program_options-vc90-mt-1_39.dll
++                        ${BOOST_INSTALL_LOC}/lib/boost_regex-vc90-mt-1_39.dll
++                        ${BOOST_INSTALL_LOC}/lib/boost_system-vc90-mt-1_39.dll
++                        ${BOOST_INSTALL_LOC}/lib/boost_thread-vc90-mt-1_39.dll
+                     DESTINATION ${C_LIB} )
+ 
+         endif()
+@@ -104,13 +101,15 @@ if (WITH_BOOST )
+         dprint ("TBD: NON-PROPER INSTALL for CONTRIB")
+ 	endif()
+ 
++	condor_post_external( boost "include" OFF )
++	
+   else()
+ 
+ 	# For proper builds use the .so/.dll's .
+ 	set(Boost_USE_MULTITHREADED ON)
+ 	find_package( Boost 1.33.1 COMPONENTS thread program_options system regex filesystem)
+ 	if(Boost_FOUND)
+-		append_var (EXTERNAL_INCLUDES ${Boost_INCLUDE_DIRS})
++		append_var (CONDOR_EXTERNAL_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
+ 		set (BOOST_VER ${Boost_VERSION})
+ 	endif(Boost_FOUND)
+ 
+diff --git a/externals/bundles/coredumper/0.2/CMakeLists.txt b/externals/bundles/coredumper/0.2/CMakeLists.txt
+index eb9217c..8d925ae 100644
+--- a/externals/bundles/coredumper/0.2/CMakeLists.txt
++++ b/externals/bundles/coredumper/0.2/CMakeLists.txt
+@@ -25,26 +25,26 @@ if (WITH_COREDUMPER)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set (CRDPR_VER coredumper-0.2)
++		condor_pre_external( COREDUMPER coredumper-0.2 "lib;include" "done")
+ 
+ 		ExternalProject_Add(coredumper
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${CRDPR_VER}
+ 				    #-- Download Step ----------
+-					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${CRDPR_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/${CRDPR_VER}.tar.gz
++				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${COREDUMPER_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${COREDUMPER_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${COREDUMPER_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${CRDPR_VER} && ./configure --prefix=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${COREDUMPER_VER} && ./configure --prefix=${COREDUMPER_INSTALL_LOC}
+ 				    #--Build Step ----------
+-				    BUILD_COMMAND cd ${CRDPR_VER} && make
++				    BUILD_COMMAND cd ${COREDUMPER_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd ${CRDPR_VER} && make install )
++				    INSTALL_DIR ${COREDUMPER_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${COREDUMPER_VER} && make install && touch ${COREDUMPER_INSTALL_LOC}/done)
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(COREDUMPER_FOUND "${EXTERNAL_STAGE}/lib/libcoredumper.a")
+-		append_var (CONDOR_EXTERNALS coredumper)
++		set(COREDUMPER_FOUND "${COREDUMPER_INSTALL_LOC}/lib/libcoredumper.a")
++
++		condor_post_external( coredumper include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/cream/1.12.1_14/CMakeLists.txt b/externals/bundles/cream/1.12.1_14/CMakeLists.txt
+index 9cc7224..cf99c78 100644
+--- a/externals/bundles/cream/1.12.1_14/CMakeLists.txt
++++ b/externals/bundles/cream/1.12.1_14/CMakeLists.txt
+@@ -22,121 +22,132 @@ endif()
+   
+ if ( WITH_CREAM )
+ 
+-		# cream is sandboxed as not to pollute the local staging directory
+-		# this is primarily for gsoap collision and to keep other elements
+-		# out of condor proper. 
+-		set (CREAM_STAGE ${EXTERNAL_STAGE}/opt/cream)
+-		file (MAKE_DIRECTORY ${CREAM_STAGE}
+-			${CREAM_STAGE}/lib
+-			${CREAM_STAGE}/include
+-			${CREAM_STAGE}/include/glite/security)
+-
+-#################### Generic localized packages 
+-		set (GSOAP_VER gsoap_2.7.6b)
+-		ExternalProject_Add(cream_soap
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${GSOAP_VER}
++		# we define cream 1st because other externals will place bits there.
++		condor_pre_external( CREAM org.glite.ce.cream-client-api-c-1.12.1-14 "lib;include;include/glite/security;opt" "done")
++
++#########################################
++		condor_pre_external( CREAMSOAP gsoap_2.7.6b "lib;include" "done")
++		ExternalProject_Add(creamsoap
+ 				    #-- Download Step ----------
+-				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GSOAP_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/${GSOAP_VER}.tar.gz
++				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${CREAMSOAP_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${CREAMSOAP_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${CREAMSOAP_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd gsoap-2.7 && ./configure --prefix=${CREAM_STAGE}
++				    CONFIGURE_COMMAND cd gsoap-2.7 && ./configure --prefix=${CREAM_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd gsoap-2.7 && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
+-				    INSTALL_COMMAND cd gsoap-2.7 && make install && cp soapcpp2/wsdl/stlvector.h ${CREAM_STAGE}/include )
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
++				    INSTALL_COMMAND cd gsoap-2.7 && make
++				    install && cp -f soapcpp2/wsdl/stlvector.h
++				    ${CREAM_INSTALL_LOC}/include && touch
++				    ${CREAMSOAP_INSTALL_LOC}/done )
++
++		condor_post_external( creamsoap OFF OFF )
+ 
+-		set (CARES_VER c-ares-1.3.0)
+-		ExternalProject_Add(c-ares
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${CARES_VER}
++#########################################
++
++		condor_pre_external( CARES c-ares-1.3.0 "lib;include" "done")
++		ExternalProject_Add(cares
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${CARES_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${CARES_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${CARES_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${CARES_VER} && ./configure --prefix=${CREAM_STAGE}
++				    CONFIGURE_COMMAND cd ${CARES_VER} && ./configure --prefix=${CREAM_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd ${CARES_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
+-				    INSTALL_COMMAND cd ${CARES_VER} && make install )
+-				    
+-		set (LOG4CPP_VER log4cpp-1.0-3)
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${CARES_VER} && make
++				    install && touch ${CARES_INSTALL_LOC}/done )
++		condor_post_external( cares OFF OFF )
++
++#########################################
++
++		condor_pre_external( LOG4CPP log4cpp-1.0-3 "lib;include" "lib/liblog4cpp.a")
+ 		ExternalProject_Add(log4cpp
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${LOG4CPP_VER}
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LOG4CPP_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${LOG4CPP_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${LOG4CPP_VER}.tar.gz
+ 					#--Patch step ----------
+ 				    PATCH_COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/log4errors.patch &&
+ 					  patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/log4configure.patch
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd log4cpp-1.0 && ./configure --prefix=${CREAM_STAGE}
++				    CONFIGURE_COMMAND cd log4cpp-1.0 && ./configure --prefix=${LOG4CPP_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd log4cpp-1.0 && make && make check
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
++				    INSTALL_DIR ${LOG4CPP_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd log4cpp-1.0 && make install )
++		condor_post_external( log4cpp include OFF )
+ 
+-#################### cream/gss packages.
++######################################### cream/gss packages.
+ 
+-		# build gridsite
+-		set (GRIDSITE_VER gridsite-1.6.0)
++		condor_pre_external( GRIDSITE gridsite-1.6.0 "lib;include" "done")
+ 		ExternalProject_Add(gridsite
+-					DEPENDS libxml2
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${GRIDSITE_VER}
++				    DEPENDS ${LIBXML2_REF}
+ 				    #-- Download Step ----------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GRIDSITE_VER}.src.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${GRIDSITE_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${GRIDSITE_VER}.src.tar.gz
+ 				    #--Configure step ----------
+ 				    CONFIGURE_COMMAND echo "no config"
+ 				    #--Build Step ----------
+-				    BUILD_COMMAND export MYCFLAGS='-I. -I../interface -I${EXTERNAL_STAGE}/include/libxml2' &&
++				    BUILD_COMMAND export MYCFLAGS='-I. -I../interface -I${LIBXML2_INSTALL_LOC}/include/libxml2' &&
+ 					  export MYCFLAGS &&
+ 					  cd org.gridsite.core/src &&
+ 					  make libgridsite.a
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
+-				    INSTALL_COMMAND cd org.gridsite.core/src && cp libgridsite.a ${CREAM_STAGE}/lib && cp ../interface/*.h ${CREAM_STAGE}/include )
+-
+-		
+-		set (GLITE_SECURITY_VER org.glite.security.gss-2.0.1-1)
+-		ExternalProject_Add(glite_gss
+-				    DEPENDS globus gridsite c-ares
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${GLITE_SECURITY_VER}
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
++				    INSTALL_COMMAND cd org.gridsite.core/src && 
++				    cp -f libgridsite.a ${CREAM_INSTALL_LOC}/lib && 
++				    cp -f ../interface/*.h ${CREAM_INSTALL_LOC}/include && 
++				    touch ${GRIDSITE_INSTALL_LOC}/done )
++		condor_post_external( gridsite OFF OFF )
++
++#########################################
++
++		condor_pre_external( GLITE_SECURITY org.glite.security.gss-2.0.1-1 "lib;include" "done")
++		ExternalProject_Add(glite_security
++				    DEPENDS ${GLOBUS_REF} ${GRIDSITE_REF} ${CARES_REF}
+ 				    #-- Download Step ----------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GLITE_SECURITY_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${GLITE_SECURITY_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${GLITE_SECURITY_VER}.tar.gz
+ 				    #--Configure step ----------
+ 				    CONFIGURE_COMMAND echo "no config"
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd org.glite.security.gss/src && 
+-					  gcc -g -O0 -W -Wall -Wno-unused-parameter -I../interface -I${EXTERNAL_STAGE}/include -I${EXTERNAL_STAGE}/include/${GLOBUS_FLAVOR}pthr -I${CREAM_STAGE}/include -o glite_gss.thr.o -c glite_gss.c && 
++					  gcc -g -O0 -W -Wall
++					  -Wno-unused-parameter -I../interface
++					  -I${CREAM_INSTALL_LOC}/include -I${KRB5_INSTALL_LOC}/include -I${GLOBUS_INSTALL_LOC}/include/${GLOBUS_FLAVOR}pthr -o glite_gss.thr.o -c glite_gss.c && 
+ 					  ar crv libglite_security_gss_${GLOBUS_FLAVOR}pthr.a glite_gss.thr.o &&
+ 					  ranlib libglite_security_gss_${GLOBUS_FLAVOR}pthr.a
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd org.glite.security.gss/src &&
+-					  cp ../interface/* ${CREAM_STAGE}/include/glite/security &&
+-					  cp libglite_security_gss_${GLOBUS_FLAVOR}pthr.a ${CREAM_STAGE}/lib)
++					  cp ../interface/* ${CREAM_INSTALL_LOC}/include/glite/security &&
++					  cp libglite_security_gss_${GLOBUS_FLAVOR}pthr.a ${CREAM_INSTALL_LOC}/lib && 
++					  touch ${GLITE_SECURITY_INSTALL_LOC}/done )
++		condor_post_external( glite_security OFF OFF )
++
++#########################################
+ 
+ 		# build gsoap plugin.
+-		set (CSP_CC_FLAGS -g -O0 -W -Wall -Wno-unused-parameter -I. -I../interface -DWITH_NONAMESPACES -I${CREAM_STAGE}/include -D_GNU_SOURCE)
++		set (CSP_CC_FLAGS -g -O0 -W -Wall -Wno-unused-parameter -I. -I../interface -DWITH_NONAMESPACES -I${CREAM_INSTALL_LOC}/include -D_GNU_SOURCE)
++		condor_pre_external( CREAM_SOAP_PLUGIN org.glite.security.gsoap-plugin-2.0.1-3 "lib;include" "done")
+ 		ExternalProject_Add(cream_soap_plugin
+-					DEPENDS cream_soap glite_gss
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/cream_soap_plugin
++					DEPENDS ${CREAMSOAP_REF} ${GLITE_SECURITY_REF}
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/org.glite.security.gsoap-plugin-2.0.1-3.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${CREAM_SOAP_PLUGIN_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/org.glite.security.gsoap-plugin-2.0.1-3.tar.gz
+ 				    #--Configure step ----------
+ 				    CONFIGURE_COMMAND cd org.glite.security.gsoap-plugin/src &&
+@@ -149,40 +160,41 @@ if ( WITH_CREAM )
+ 						ranlib libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}/lib
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}/lib
+ 				    INSTALL_COMMAND  cd org.glite.security.gsoap-plugin/src &&
+-						cp libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a ${CREAM_STAGE}/lib && 
+-						cp ../interface/*.h ${CREAM_STAGE}/include/glite/security
+-				)
+-
++						cp libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a ${CREAM_INSTALL_LOC}/lib && 
++						cp ../interface/*.h ${CREAM_INSTALL_LOC}/include/glite/security && 
++						touch ${CREAM_SOAP_PLUGIN_INSTALL_LOC}/done )
++		condor_post_external( cream_soap_plugin OFF OFF )
+ 
++		condor_pre_external( CREAM_WSDL org.glite.ce.wsdl-1.12.1-14 "lib;include" "done")
+ 		ExternalProject_Add(cream_wsdl
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/cream_wsdl
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/org.glite.ce.wsdl-1.12.1-14.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${CREAM_WSDL_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/org.glite.ce.wsdl-1.12.1-14.tar.gz
+ 				    #--Configure step ----------
+ 				    CONFIGURE_COMMAND echo "nothing to do"
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd org.glite.ce.wsdl && 
+-					  project/install.sh ${CREAM_STAGE} ${CREAM_STAGE} 1.12.1 2.0.0
++					  project/install.sh ${CREAM_INSTALL_LOC} ${CREAM_INSTALL_LOC} 1.12.1 2.0.0
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${CREAM_STAGE}
+-				    INSTALL_COMMAND cd org.glite.ce.wsdl && ln -s share/wsdl ${CREAM_STAGE}/interface )
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
++				    INSTALL_COMMAND cd org.glite.ce.wsdl && ln -fs share/wsdl ${CREAM_INSTALL_LOC}/interface && touch ${CREAM_WSDL_INSTALL_LOC}/done )
++		condor_post_external( cream_wsdl OFF OFF )
+ 
+ 		set (CREAM_PATCH patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/cream.patch)
+ 		if (DARWIN)
+ 		  set (CREAM_PATCH ${CREAM_PATCH} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/bsd.patch && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/macos.patch )
+ 		endif(DARWIN)
+ 
++	
+ 		ExternalProject_Add(cream
+-				    DEPENDS voms cream_soap boost log4cpp gridsite c-ares cream_soap_plugin cream_wsdl
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/cream
+-				    #-- Download Step ----------
++				    DEPENDS ${VOMS_REF} ${CREAMSOAP_REF} ${BOOST_REF} ${LOG4CPP_REF} ${GRIDSITE_REF} ${CARES_REF} ${CREAM_SOAP_PLUGIN_REF} ${CREAM_WSDL_REF}
++				    #-- Download Step -------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/org.glite.ce.cream-client-api-c-1.12.1-14.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${CREAM_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/org.glite.ce.cream-client-api-c-1.12.1-14.tar.gz
+ 					#--Patch step ----------
+ 					PATCH_COMMAND ${CREAM_PATCH}
+@@ -190,33 +202,25 @@ if ( WITH_CREAM )
+ 				    CONFIGURE_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.m4 org.glite.ce.cream-client-api-c/project &&    
+ 						cd org.glite.ce.cream-client-api-c &&
+ 						./bootstrap &&
+-						./configure --prefix=${CREAM_STAGE} --with-globus-prefix=${EXTERNAL_STAGE} --with-globus-thr-flavor=${GLOBUS_FLAVOR}pthr --with-globus-nothr-flavor=${GLOBUS_FLAVOR} --with-openssl-prefix=${EXTERNAL_STAGE} --with-voms-prefix=${EXTERNAL_STAGE} --with-boost-prefix=${EXTERNAL_STAGE} --with-classads-prefix=${EXTERNAL_STAGE} --with-log4cpp-prefix=${CREAM_STAGE} --with-gsoap-location=${CREAM_STAGE} --with-glite-location=${CREAM_STAGE} --with-ce-wsdl-version=1.12.1 --with-delegation-wsdl-version=2.0.0
++						./configure --prefix=${CREAM_INSTALL_LOC} --with-globus-prefix=${GLOBUS_INSTALL_LOC} --with-globus-thr-flavor=${GLOBUS_FLAVOR}pthr --with-globus-nothr-flavor=${GLOBUS_FLAVOR} --with-openssl-prefix=${OPENSSL_INSTALL_LOC} --with-voms-prefix=${VOMS_INSTALL_LOC} --with-boost-prefix=${BOOST_INSTALL_LOC} --with-classads-prefix=${CLASSADS_INSTALL_LOC} --with-log4cpp-prefix=${LOG4CPP_INSTALL_LOC} --with-gsoap-location=${CREAM_INSTALL_LOC} --with-glite-location=${CREAM_INSTALL_LOC} --with-ce-wsdl-version=1.12.1 --with-delegation-wsdl-version=2.0.0
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd org.glite.ce.cream-client-api-c && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${CREAM_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd org.glite.ce.cream-client-api-c &&
+-						make install
++						make install && touch ${CREAM_INSTALL_LOC}/done
+ 				)
+ 
+-		add_dependencies(cream classads)
+-
+-	# Set the target dependencies which the rest of condor depends on.
+-	if(DARWIN)
+-		set (BOOST_LIB ${EXTERNAL_STAGE}/lib/libboost_thread.a)
+-	else()
+-		set (BOOST_LIB ${EXTERNAL_STAGE}/lib/libboost_thread.a)
+-	endif()
++		
++		add_dependencies(cream ${CLASSADS_FOUND})
+ 
+-	set(CREAM_FOUND "${CREAM_STAGE}/lib/libglite_ce_cream_client_soap.a;${CREAM_STAGE}/lib/libglite_ce_cream_client_util.a;${CREAM_STAGE}/lib/libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a;${CREAM_STAGE}/lib/libglite_security_gss_${GLOBUS_FLAVOR}pthr.a;${CREAM_STAGE}/lib/liblog4cpp.a;${CREAM_STAGE}/lib/libgridsite.a;${BOOST_LIB};${CREAM_STAGE}/lib/libcares.a")
++		set (BOOST_LIB ${BOOST_INSTALL_LOC}/lib/libboost_thread.a)
++		set(CREAM_FOUND "${CREAM_INSTALL_LOC}/lib/libglite_ce_cream_client_soap.a;${CREAM_INSTALL_LOC}/lib/libglite_ce_cream_client_util.a;${CREAM_INSTALL_LOC}/lib/libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a;${CREAM_INSTALL_LOC}/lib/libglite_security_gss_${GLOBUS_FLAVOR}pthr.a;${LOG4CPP_INSTALL_LOC}/lib/liblog4cpp.a;${CREAM_INSTALL_LOC}/lib/libgridsite.a;${BOOST_LIB};${CREAM_INSTALL_LOC}/lib/libcares.a")
+ 
+-	append_var(CONDOR_EXTERNALS cream)
++		condor_post_external( cream include OFF )
+ 
+-	message (STATUS "external configured (CREAM_FOUND=${CREAM_FOUND})")
+-	set( CREAM_FOUND ${CREAM_FOUND} PARENT_SCOPE )
+-	set( HAVE_EXT_CREAM ON PARENT_SCOPE )
+-	set( CREAM_STAGE ${CREAM_STAGE} PARENT_SCOPE )
++		message (STATUS "external configured (CREAM_FOUND=${CREAM_FOUND})")
+ 
+ else()
+ 	message (STATUS "external skipped (cream)")
+diff --git a/externals/bundles/cream/1.12.1_14/classads.m4 b/externals/bundles/cream/1.12.1_14/classads.m4
+index 424536f..33608eb 100644
+--- a/externals/bundles/cream/1.12.1_14/classads.m4
++++ b/externals/bundles/cream/1.12.1_14/classads.m4
+@@ -16,7 +16,7 @@ AC_DEFUN(AC_CLASSADS,
+     AC_MSG_CHECKING([for CLASSAD installation])
+ 
+     CLASSAD_CFLAGS=""
+-    CLASSAD_LIBS="-lclassad_ns -lpcre"
++    CLASSAD_LIBS="-lclassad -lpcre"
+     CLASSAD_DL_LIBS="-lclassad_dl"
+     if test -n "$with_classads_prefix" -a "$with_classads_prefix" != "/usr" ; then
+             AC_MSG_RESULT([prefix: $with_classads_prefix])
+@@ -24,7 +24,7 @@ AC_DEFUN(AC_CLASSADS,
+             ac_classads_prefix=$with_classads_prefix
+ 
+             CLASSAD_CFLAGS="-I$with_classads_prefix/include"
+-            CLASSAD_LIBS="$with_classads_prefix/lib/libclassad_ns.a $with_classads_prefix/lib/libpcre.a"
++            CLASSAD_LIBS="$with_classads_prefix/lib/libclassad.a $with_classads_prefix/lib/libpcre.a"
+ 	    CLASSAD_DL_LIBS="-L$with_classads_prefix/lib $CLASSAD_DL_LIBS"
+     fi
+ 
+diff --git a/externals/bundles/curl/7.19.6-p1/CMakeLists.txt b/externals/bundles/curl/7.19.6-p1/CMakeLists.txt
+index 572fe3d..36081e7 100644
+--- a/externals/bundles/curl/7.19.6-p1/CMakeLists.txt
++++ b/externals/bundles/curl/7.19.6-p1/CMakeLists.txt
+@@ -23,6 +23,8 @@ option(WITH_CURL "Compiling with support for CURL" ON)
+ if (WITH_CURL)
+ 
+ 	if ( NOT PROPER )
++		
++		condor_pre_external( CURL curl-7.19.6 "lib;include" "include/curl/curl.h")
+ 
+ 		if (WINDOWS)
+ 			set (CURL_PATCH pushd "lib" ${CMD_TERM}
+@@ -30,26 +32,23 @@ if (WITH_CURL)
+ 						popd)
+ 			set (CURL_CONFIGURE echo "Nothing to configure")
+ 			set (CURL_MAKE pushd "lib" ${CMD_TERM}
+-						nmake -f Makefile.vc9 CFG=release-ssl WINDOWS_SDK_PATH="${WIN_SDK_PATH}" OPENSSL_PATH="${EXTERNAL_STAGE}" ${CMD_TERM}
++						nmake -f Makefile.vc9 CFG=release-ssl WINDOWS_SDK_PATH="${WIN_SDK_PATH}" OPENSSL_PATH="${OPENSSL_INSTALL_LOC}" ${CMD_TERM}
+ 						popd ${CMD_TERM})
+-			set (CURL_DEPENDS openssl)
+-			set (CURL_INSTALL cp -f lib/lib*.lib ${EXTERNAL_STAGE}/lib && cp -rf include/curl ${EXTERNAL_STAGE}/include )
++			set (CURL_DEPENDS ${OPENSSL_REF})
++			set (CURL_INSTALL cp -f lib/lib*.lib ${CURL_INSTALL_LOC}/lib && cp -rf include/curl ${CURL_INSTALL_LOC}/include )
+ 		else()
+ 			set (CURL_PATCH echo "Nothing to patch on Unix")
+-			set (CURL_CONFIGURE PKG_CONFIG_PATH=${EXTERNAL_STAGE} LIBS=-ldl ./configure --prefix=${EXTERNAL_STAGE} --with-ssl=${EXTERNAL_STAGE} --disable-shared --disable-ipv6 )
++			set (CURL_CONFIGURE PKG_CONFIG_PATH=${CURL_INSTALL_LOC} LIBS=-ldl ./configure --prefix=${CURL_INSTALL_LOC} --with-ssl=${OPENSSL_INSTALL_LOC} --disable-shared --disable-ipv6 --disable-ldap --disable-ldaps )
+ 			set (CURL_MAKE make)
+ 			set (CURL_INSTALL make install)
+-			set (CURL_DEPENDS openssl zlib)
++			set (CURL_DEPENDS ${OPENSSL_REF} ${ZLIB_REF})
+ 		endif()
+ 
+-		set (CURL_VER curl-7.19.6)
+-
+ 		ExternalProject_Add(curl
+ 							DEPENDS ${CURL_DEPENDS}
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${CURL_VER}
+ 							#-- Download Step ----------
+ 							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${CURL_VER}.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
++							DOWNLOAD_DIR ${CURL_STAGE}/dl
+ 							URL http://parrot.cs.wisc.edu/externals/${CURL_VER}.tar.gz
+ 							#--Patch Step ----------
+ 							PATCH_COMMAND cd ${CURL_VER} ${CMD_TERM} ${CURL_PATCH}
+@@ -59,22 +58,20 @@ if (WITH_CURL)
+ 							BUILD_COMMAND cd ${CURL_VER} && ${CURL_MAKE}
+ 							BUILD_IN_SOURCE 1
+ 							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}
++							INSTALL_DIR ${CURL_INSTALL_LOC}
+ 							INSTALL_COMMAND cd ${CURL_VER} && ${CURL_INSTALL} )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		if (WINDOWS)
+-			set(CURL_FOUND "${EXTERNAL_STAGE}/lib/libcurl.lib")
+-			set_property( TARGET curl PROPERTY FOLDER "externals" )
++			set(CURL_FOUND "${CURL_INSTALL_LOC}/lib/libcurl.lib")
+ 		else()
+ 			# libcurl is dependent on these libraries on some
+ 			# platforms.
+ 			find_multiple( "rt;idn" CURL_FOUND )
+-			set(CURL_FOUND "${EXTERNAL_STAGE}/lib/libcurl.a;${CURL_FOUND}")
++			set(CURL_FOUND "${CURL_INSTALL_LOC}/lib/libcurl.a;${CURL_FOUND}")
+ 		endif()
+-
+-		append_var (CONDOR_EXTERNALS curl)
+-
++		
++		condor_post_external( curl include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/drmaa/1.6/CMakeLists.txt b/externals/bundles/drmaa/1.6/CMakeLists.txt
+index ce958d2..28b8ea4 100644
+--- a/externals/bundles/drmaa/1.6/CMakeLists.txt
++++ b/externals/bundles/drmaa/1.6/CMakeLists.txt
+@@ -22,38 +22,37 @@ endif()
+ 
+ if ( WITH_DRMAA )
+ 
+-	set (DRMAA_VER drmaa-1.6)
+-
++	condor_pre_external( DRMAA drmaa-1.6 "lib;include" "include/drmaa.h")
++	
+ 	if (NOT WINDOWS)
+-		set (DRMAA_CONFIGURE ./configure --prefix=${EXTERNAL_STAGE})
++		set (DRMAA_CONFIGURE ./configure --prefix=${DRMAA_INSTALL_LOC})
+ 		set (DRMAA_MAKE make)
+-		set (DRMAA_INSTALL cp drmaa.h README ${EXTERNAL_STAGE}/include/ &&
+-						   cp libcondordrmaa.a ${EXTERNAL_STAGE}/lib )
++		set (DRMAA_INSTALL cp libcondordrmaa.a ${DRMAA_INSTALL_LOC}/lib &&
++						   cp drmaa.h README ${DRMAA_INSTALL_LOC}/include/ )
+ 
+ 		if(DARWIN)
+-			set (DRMAA_INSTALL cp libdrmaa.dylib ${EXTERNAL_STAGE}/lib/ && ${DRMAA_INSTALL})
+-			set( DRMAA_FOUND "${EXTERNAL_STAGE}/lib/libdrmaa.dylib;${EXTERNAL_STAGE}/lib/libcondordrmaa.a" )
++			set (DRMAA_INSTALL cp libdrmaa.dylib ${DRMAA_INSTALL_LOC}/lib/ && ${DRMAA_INSTALL})
++			set( DRMAA_FOUND "${DRMAA_INSTALL_LOC}/lib/libdrmaa.dylib;${DRMAA_INSTALL_LOC}/lib/libcondordrmaa.a" )
+ 		else()
+-			set (DRMAA_INSTALL cp libdrmaa.so ${EXTERNAL_STAGE}/lib/ && ${DRMAA_INSTALL})
+-			set( DRMAA_FOUND "${EXTERNAL_STAGE}/lib/libdrmaa.so;${EXTERNAL_STAGE}/lib/libcondordrmaa.a" )
++			set (DRMAA_INSTALL cp libdrmaa.so ${DRMAA_INSTALL_LOC}/lib/ && ${DRMAA_INSTALL})
++			set( DRMAA_FOUND "${DRMAA_INSTALL_LOC}/lib/libdrmaa.so;${DRMAA_INSTALL_LOC}/lib/libcondordrmaa.a" )
+ 		endif()
+ 
+ 	else()
+ 		set (DRMAA_CONFIGURE echo "Nothing to configure for Windows")
+ 		set (DRMAA_MAKE nmake /f libdrmaa.mak CFG="libdrmaa - Win32 Release")
+-		set (DRMAA_INSTALL  cp Release/* ${EXTERNAL_STAGE}/lib \r\n
+-		                    cp drmaa.h README ${EXTERNAL_STAGE}/include)
++		set (DRMAA_INSTALL  cp Release/* ${DRMAA_INSTALL_LOC}/lib \r\n
++		                    cp drmaa.h README ${DRMAA_INSTALL_LOC}/include)
+ 			
+-		set( DRMAA_FOUND "${EXTERNAL_STAGE}/lib/libdrmaa.lib" )
++		set( DRMAA_FOUND "${DRMAA_INSTALL_LOC}/lib/libdrmaa.lib" )
+ 
+-		install ( FILES ${EXTERNAL_STAGE}/lib/libdrmaa.dll DESTINATION ${C_BIN} )
++		install ( FILES ${DRMAA_INSTALL_LOC}/lib/libdrmaa.dll DESTINATION ${C_BIN} )
+ 	endif()
+ 
+ 	ExternalProject_Add(drmaa
+-						PREFIX ${EXTERNAL_BUILD_PREFIX}/${DRMAA_VER}
+ 						#-- Download Step ----------
+ 						DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${DRMAA_VER}.tar.gz ${CMD_TERM}
+-						DOWNLOAD_DIR ${EXTERNAL_DL}
++						DOWNLOAD_DIR ${DRMAA_STAGE}/dl
+ 						URL http://parrot.cs.wisc.edu/externals/${DRMAA_VER}.tar.gz
+ 						#--Configure step ----------
+ 						CONFIGURE_COMMAND ${DRMAA_CONFIGURE}
+@@ -61,22 +60,17 @@ if ( WITH_DRMAA )
+ 						BUILD_COMMAND ${DRMAA_MAKE}
+ 						BUILD_IN_SOURCE 1
+ 						#--install Step ----------
+-						INSTALL_DIR ${EXTERNAL_STAGE}
++						INSTALL_DIR ${DRMAA_INSTALL_LOC}
+ 						INSTALL_COMMAND ${DRMAA_INSTALL})
+ 
+-	if (WINDOWS)
+-		set_property( TARGET drmaa PROPERTY FOLDER "externals" )
+-	endif()
+-		
++	# set standard globals include and link loc
++	condor_post_external( drmaa include OFF )
+ 	message (STATUS "external configured (DRMAA_FOUND=${DRMAA_FOUND})")
+-	set( DRMAA_FOUND ${DRMAA_FOUND} PARENT_SCOPE )
+-	set( HAVE_EXT_DRMAA ON PARENT_SCOPE )
+-	append_var (CONDOR_EXTERNALS drmaa)
+-
++	
+ 	# i've tar bundled drmaa, does anyone actually use this?  if so I can explode.
+-	install ( FILES ${EXTERNAL_DL}/${DRMAA_VER}.tar.gz DESTINATION ${C_SRC}/drmaa )
+-	install ( FILES ${EXTERNAL_STAGE}/include/drmaa.h
+-			  ${EXTERNAL_STAGE}/include/README
++	install ( FILES ${DRMAA_STAGE}/dl/${DRMAA_VER}.tar.gz DESTINATION ${C_SRC}/drmaa )
++	install ( FILES ${DRMAA_INSTALL_LOC}/include/drmaa.h
++			  ${DRMAA_INSTALL_LOC}/include/README
+ 			  DESTINATION ${C_INCLUDE} )
+ 			  
+ 	install ( FILES ${DRMAA_FOUND} DESTINATION ${C_LIB} )
+diff --git a/externals/bundles/expat/2.0.1/CMakeLists.txt b/externals/bundles/expat/2.0.1/CMakeLists.txt
+index a7b3435..3d998b7 100644
+--- a/externals/bundles/expat/2.0.1/CMakeLists.txt
++++ b/externals/bundles/expat/2.0.1/CMakeLists.txt
+@@ -24,26 +24,26 @@ if ( WITH_EXPAT )
+ 
+ 	if( NOT PROPER )
+ 
+-		set ( EXPAT_VER expat-2.0.1 )
++		condor_pre_external( EXPAT expat-2.0.1 "lib;include" "lib/libexpat.a")
+ 
+ 		ExternalProject_Add(expat
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${EXPAT_VER}
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${EXPAT_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${EXPAT_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${EXPAT_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${EXPAT_VER} && ./configure --prefix=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${EXPAT_VER} && ./configure --prefix=${EXPAT_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd ${EXPAT_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${EXPAT_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd ${EXPAT_VER} && make install )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(EXPAT_FOUND "${EXTERNAL_STAGE}/lib/libexpat.a")
+-		append_var (CONDOR_EXTERNALS expat)
++		set(EXPAT_FOUND "${EXPAT_INSTALL_LOC}/lib/libexpat.a")
++
++		condor_post_external( expat include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/gcb/1.5.6/CMakeLists.txt b/externals/bundles/gcb/1.5.6/CMakeLists.txt
+deleted file mode 100644
+index a64471a..0000000
+--- a/externals/bundles/gcb/1.5.6/CMakeLists.txt
++++ /dev/null
+@@ -1,59 +0,0 @@
+- ###############################################################
+- # 
+- # Copyright 2011 Red Hat, Inc. 
+- # 
+- # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
+- # 
+- # Unless required by applicable law or agreed to in writing, software 
+- # distributed under the License is distributed on an "AS IS" BASIS, 
+- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- # See the License for the specific language governing permissions and 
+- # limitations under the License. 
+- # 
+- ############################################################### 
+-
+-if (NOT PROPER AND LINUX)
+-  option(WITH_GCB "Compiling with support for GCB" ON)
+-endif()
+-
+-if (WITH_GCB)
+-
+-	set (GCB_VER gcb-1.5.6)
+-
+-	ExternalProject_Add(gcb
+-				    	PREFIX ${EXTERNAL_BUILD_PREFIX}/${GCB_VER}
+-				    	#-- Download Step ----------
+-						DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GCB_VER}.tar.gz ${CMD_TERM}
+-				    	DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    	URL http://parrot.cs.wisc.edu/externals/${GCB_VER}.tar.gz
+-			    		#--Configure step ----------
+-				    	CONFIGURE_COMMAND cd ${GCB_VER} && ./configure --prefix=${EXTERNAL_STAGE}
+-				    	#--Build Step ----------
+-				    	BUILD_COMMAND cd ${GCB_VER} && make
+-				    	BUILD_IN_SOURCE 1
+-				    	#--install Step ----------
+-				    	INSTALL_DIR ${EXTERNAL_STAGE}
+-				    	INSTALL_COMMAND cd ${GCB_VER} && make install )
+-
+-	# Set the target dependencies which the rest of condor depends on.
+-	set(GCB_FOUND "${EXTERNAL_STAGE}/lib/libGCB.a")
+-	message (STATUS "external configured (GCB_FOUND=${GCB_FOUND})")
+-	set( GCB_FOUND ${GCB_FOUND} PARENT_SCOPE )
+-	set( HAVE_EXT_GCB ON PARENT_SCOPE )
+-	append_var ( CONDOR_EXTERNALS gcb )
+-
+-	# setup the install target
+-	install (FILES ${EXTERNAL_STAGE}/bin/gcb_broker_query DESTINATION ${C_SBIN})
+-	install (FILES ${EXTERNAL_STAGE}/bin/gcb_broker
+-			${EXTERNAL_STAGE}/bin/gcb_relay_server
+-			DESTINATION ${C_LIBEXEC} )
+-
+-else()
+-
+-	message (STATUS "external skipped (gcb)")
+-
+-endif()
+diff --git a/externals/bundles/glibc/CMakeLists.txt b/externals/bundles/glibc/CMakeLists.txt
+index 86c6817..6a555dc 100644
+--- a/externals/bundles/glibc/CMakeLists.txt
++++ b/externals/bundles/glibc/CMakeLists.txt
+@@ -31,8 +31,8 @@ if (NOT CLIPPED)
+ 	# check only the major and minor bits of gcc version.
+ 	string(SUBSTRING ${CMAKE_C_COMPILER_VERSION} 0 2 GCC_VER_CHECK)
+ 	# corner off glibc b/c it effect  
+-	set(GLIBC_PREFIX ${EXTERNAL_STAGE}/opt/glibc/)
+ 	set(GLIBC_DETECTED ON)
++        set(GLIBC_BUILD_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/glibc-prefix/src/glibc)
+ 
+ 	if (${GLIBC_VERSION} STREQUAL "23")
+ 		set (VER 2.3.2.27.9.7)
+@@ -45,7 +45,7 @@ if (NOT CLIPPED)
+ 			set (GLIBC_PATCH  ${GLIBC_PATCH} && patch --binary -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${VER}/gcc-4-fixes.patch )
+ 		endif()
+ 
+-		set (GLIBC_CONFIGURE ./configure --enable-static-nss --enable-add-ons=linuxthreads,c_stubs,glibc-compat --disable-shared --prefix=${GLIBC_PREFIX} --without-cvs)
++		set (GLIBC_CONFIGURE ./configure --enable-static-nss --enable-add-ons=linuxthreads,c_stubs,glibc-compat --disable-shared --without-cvs)
+ 
+ 		set (GLIBC_MAKE make )
+ 
+@@ -55,14 +55,14 @@ if (NOT CLIPPED)
+ 
+ 			set (VER 2.5-20061008T1257-x86_64-p0)
+ 
+-			set (GLIBC_CONFIGURE ./configure --prefix=${GLIBC_PREFIX} --enable-add-ons=nptl,rtkaio,c_stubs,libidn --without-cvs --enable-kernel=2.6.9 --with-headers=$HOME/junk/glibc-2.5-20061008T1257/override_headers:/usr/include --enable-bind-now --with-tls --with-__thread --build x86_64-redhat-linux --host x86_64-redhat-linux --disable-profile --enable-static-nss)
++			set (GLIBC_CONFIGURE ./configure --enable-add-ons=nptl,rtkaio,c_stubs,libidn --without-cvs --enable-kernel=2.6.9 --with-headers=$HOME/junk/glibc-2.5-20061008T1257/override_headers:/usr/include --enable-bind-now --with-tls --with-__thread --build x86_64-redhat-linux --host x86_64-redhat-linux --disable-profile --enable-static-nss)
+ 
+ 			set (GLIBC_MAKE make -j2 -r 'CFLAGS=-mtune=generic -DNDEBUG=1 -g -O3 ' PARALLELMFLAGS=-s)
+ 
+ 		else()
+ 			set (VER 2.5-20061008T1257-p0)
+ 
+-			set (GLIBC_CONFIGURE ./configure --prefix=${GLIBC_PREFIX} --enable-add-ons=nptl,rtkaio,c_stubs,libidn --without-cvs --enable-kernel=2.6.9 --with-headers=$HOME/junk/glibc-2.5-20061008T1257/override_headers:/usr/include --enable-bind-now --with-tls --with-__thread --build i486-redhat-linux --host i486-redhat-linux --disable-profile --enable-static-nss)
++			set (GLIBC_CONFIGURE ./configure --enable-add-ons=nptl,rtkaio,c_stubs,libidn --without-cvs --enable-kernel=2.6.9 --with-headers=$HOME/junk/glibc-2.5-20061008T1257/override_headers:/usr/include --enable-bind-now --with-tls --with-__thread --build i486-redhat-linux --host i486-redhat-linux --disable-profile --enable-static-nss)
+ 
+ 			set (GLIBC_MAKE make -j2 -r 'CFLAGS=-march=i386 -mtune=generic -mno-tls-direct-seg-refs -DNDEBUG=1 -g -O3 ' PARALLELMFLAGS=-s )
+ 		endif()
+@@ -76,7 +76,7 @@ if (NOT CLIPPED)
+ 
+ 			set (GLIBC_FLAGS CC=gcc-4.3 CXX=g++-4.3 AUTOCONF=false MAKEINFO=: CFLAGS='-pipe -O2 -fstrict-aliasing -g ')
+ 
+-            set (GLIBC_CONFIGURE ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=${GLIBC_PREFIX} --without-cvs --enable-add-ons=libidn,nptl --without-selinux --enable-kernel=2.6.8 --disable-profile --with-headers=${EXTERNAL_BUILD_PREFIX}/glibc-${VER}/src/glibc/glibc-${VER}/debian/include --enable-bind-now --with-tls --with-__thread --enable-static-nss)
++            set (GLIBC_CONFIGURE ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --without-cvs --enable-add-ons=libidn,nptl --without-selinux --enable-kernel=2.6.8 --disable-profile --with-headers=${GLIBC_BUILD_PREFIX}/glibc-${VER}/debian/include --enable-bind-now --with-tls --with-__thread --enable-static-nss)
+ 
+ 			set (GLIBC_MAKE make -j2 -r)
+ 		else()
+@@ -84,7 +84,7 @@ if (NOT CLIPPED)
+ 
+ 			set (GLIBC_FLAGS CC=gcc-4.3 CXX=g++-4.3 AUTOCONF=false MAKEINFO=: CFLAGS='-pipe -O2 -fstrict-aliasing -g -march=i686 -mtune=i686 -O3 ')
+ 
+-			set (GLIBC_CONFIGURE ./configure --host=i686-linux --build=i486-linux-gnu --prefix=${GLIBC_PREFIX} --without-cvs --enable-add-ons=libidn,nptl --without-selinux --enable-kernel=2.6.8 --disable-profile --with-headers=${EXTERNAL_BUILD_PREFIX}/glibc-${VER}/src/glibc/glibc-${VER}/debian/include --enable-bind-now --with-tls --with-__thread --enable-static-nss)
++			set (GLIBC_CONFIGURE ./configure --host=i686-linux --build=i486-linux-gnu --without-cvs --enable-add-ons=libidn,nptl --without-selinux --enable-kernel=2.6.8 --disable-profile --with-headers=${GLIBC_BUILD_PREFIX}/glibc-${VER}/debian/include --enable-bind-now --with-tls --with-__thread --enable-static-nss)
+ 
+ 			set (GLIBC_MAKE make -j2 -r 'CFLAGS=-pipe -O2 -fstrict-aliasing -g -march=i686 -mtune=i686 -O3 ' PARALLELMFLAGS=-s)
+ 		endif()
+@@ -98,36 +98,37 @@ if (NOT CLIPPED)
+ 	endif()
+ 
+ 	if (GLIBC_DETECTED)
+-	  set (GLIBC_VER glibc-${VER})
++
++	  condor_pre_external( GLIBC glibc-${VER} "lib;include" "lib/libc.a")
+ 	  set (GLIBC_INSTALL make install )
+ 
+ 	  ExternalProject_Add(glibc
+-					  PREFIX ${EXTERNAL_BUILD_PREFIX}/${GLIBC_VER}
+ 					  #-- Download Step ----------
+ 					  DOWNLOAD_COMMAND wget -N
+ 					  http://parrot.cs.wisc.edu/externals/${GLIBC_VER}.tar.gz ${CMD_TERM}
+-					  DOWNLOAD_DIR ${EXTERNAL_DL}
++					  DOWNLOAD_DIR ${GLIBC_STAGE}/dl
+ 					  URL http://parrot.cs.wisc.edu/externals/${GLIBC_VER}.tar.gz
+ 					  #--Patch step ----------
+ 					  PATCH_COMMAND cd ${GLIBC_VER} && ${GLIBC_PATCH}
+ 					  #--Configure step ----------
+-					  CONFIGURE_COMMAND ${GLIBC_FLAGS} ${GLIBC_VER}/${GLIBC_CONFIGURE}
++					  CONFIGURE_COMMAND ${GLIBC_FLAGS} ${GLIBC_VER}/${GLIBC_CONFIGURE} --prefix=${GLIBC_INSTALL_LOC}
+ 					  #--Build Step ----------
+ 					  BUILD_COMMAND ${GLIBC_MAKE}
+ 					  BUILD_IN_SOURCE 1
+ 					  #--install Step ----------
+-					  INSTALL_DIR ${EXTERNAL_STAGE}
++					  INSTALL_DIR ${GLIBC_INSTALL_LOC}
+ 					  INSTALL_COMMAND ${GLIBC_INSTALL} )
+ 
+-	  set( EXT_GLIBC_FOUND "${GLIBC_PREFIX}/lib/libc.a" )
++	  set( EXT_GLIBC_FOUND "${GLIBC_INSTALL_LOC}/lib/libc.a" )
+ 	  message ( STATUS "external configured (EXT_GLIBC_FOUND=${EXT_GLIBC_FOUND})" )
+ 	  set( EXT_GLIBC_FOUND ${EXT_GLIBC_FOUND} PARENT_SCOPE )
+-	  append_var(CONDOR_EXTERNALS glibc)
++	  
++	  condor_post_external( glibc OFF OFF )
+ 
+-	  install ( FILES ${GLIBC_PREFIX}/lib/libc.a DESTINATION ${C_LIB} RENAME libcondor_c.a)
+-	  install ( FILES ${GLIBC_PREFIX}/lib/libnss_files.a DESTINATION ${C_LIB} RENAME libcondor_nss_files.a)
+-	  install ( FILES ${GLIBC_PREFIX}/lib/libnss_dns.a DESTINATION ${C_LIB} RENAME libcondor_nss_dns.a)
+-	  install ( FILES ${GLIBC_PREFIX}/lib/libresolv.a DESTINATION ${C_LIB} RENAME libcondor_resolv.a)
++	  install ( FILES ${GLIBC_INSTALL_LOC}/lib/libc.a DESTINATION ${C_LIB} RENAME libcondor_c.a)
++	  install ( FILES ${GLIBC_INSTALL_LOC}/lib/libnss_files.a DESTINATION ${C_LIB} RENAME libcondor_nss_files.a)
++	  install ( FILES ${GLIBC_INSTALL_LOC}/lib/libnss_dns.a DESTINATION ${C_LIB} RENAME libcondor_nss_dns.a)
++	  install ( FILES ${GLIBC_INSTALL_LOC}/lib/libresolv.a DESTINATION ${C_LIB} RENAME libcondor_resolv.a)
+   endif(GLIBC_DETECTED)
+ 
+ endif(NOT CLIPPED)
+diff --git a/externals/bundles/globus/5.0.1-p1/CMakeLists.txt b/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
+index 9d7d775..831459e 100644
+--- a/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
++++ b/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
+@@ -16,20 +16,20 @@
+  # 
+  ############################################################### 
+ 
+-option(WITH_GLOBUS "Compiling with support for GLOBUS" ON)
++if (LINUX OR DARWIN)
++	option(WITH_GLOBUS "Compiling with support for GLOBUS" ON)
++endif()
+ 
+ if (WITH_GLOBUS)
+ 
+ 	if (NOT PROPER)
+-		set (GT4_VER globus-4.0.8 )
+-		set (GT42_VER globus-4.2.1 )
+-		set (GLOBUS_VER globus-5.0.1)
+ 
++		###################################################
++		condor_pre_external( GT4 globus-4.0.8 "lib;include" "lib/gt4/gt4-java")
+ 		ExternalProject_Add(gt4
+-					PREFIX ${EXTERNAL_BUILD_PREFIX}/${GT4_VER}
+ 					#-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GT4_VER}-java.tar.gz ${CMD_TERM}
+-					DOWNLOAD_DIR ${EXTERNAL_DL}
++					DOWNLOAD_DIR ${GT4_STAGE}/dl
+ 					URL http://parrot.cs.wisc.edu/externals/${GT4_VER}-java.tar.gz
+ 					#--Configure step ----------
+ 					CONFIGURE_COMMAND echo "Nothing to do"
+@@ -37,14 +37,18 @@ if (WITH_GLOBUS)
+ 					BUILD_COMMAND echo "Nothing to do"
+ 					BUILD_IN_SOURCE 1
+ 					#--install Step ----------
+-					INSTALL_DIR ${EXTERNAL_STAGE}/lib
+-					INSTALL_COMMAND cp -r gt4-java ${EXTERNAL_STAGE}/lib/gt4 )
++					INSTALL_DIR ${GT4_INSTALL_LOC}/lib
++					INSTALL_COMMAND cp -r gt4-java ${GT4_INSTALL_LOC}/lib/gt4 )
++		
++		install ( DIRECTORY ${GT4_INSTALL_LOC}/lib/gt4 DESTINATION ${C_LIB} )
++		condor_post_external( gt4 OFF OFF )
++		###################################################
++		condor_pre_external( GT42 globus-4.2.1 "lib;include" "lib/gt42/gt42-java")
+ 
+ 		ExternalProject_Add(gt42
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${GT42_VER}
+ 							#-- Download Step ----------
+ 							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GT42_VER}-java.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
++							DOWNLOAD_DIR ${GT42_STAGE}/dl
+ 							URL http://parrot.cs.wisc.edu/externals/${GT42_VER}-java.tar.gz
+ 							#--Configure step ----------
+ 							CONFIGURE_COMMAND echo "Nothing to do"
+@@ -52,8 +56,22 @@ if (WITH_GLOBUS)
+ 							BUILD_COMMAND echo "Nothing to do"
+ 							BUILD_IN_SOURCE 1
+ 							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}/lib
+-							INSTALL_COMMAND cp -r gt42-java ${EXTERNAL_STAGE}/lib/gt42 )
++							INSTALL_DIR ${GT42_INSTALL_LOC}/lib
++							INSTALL_COMMAND cp -r gt42-java ${GT42_INSTALL_LOC}/lib/gt42 )
++
++		install ( DIRECTORY ${GT42_INSTALL_LOC}/lib/gt42 DESTINATION ${C_LIB} )
++		condor_post_external( gt42 OFF OFF )
++		###################################################
++
++		if(${SYS_ARCH} MATCHES "IA64|X86_64")
++			set( GLOBUS_FLAVOR gcc64dbg )
++		elseif(AIX)
++			set( GLOBUS_FLAVOR vendorcc32dbg )
++		else ()
++			set( GLOBUS_FLAVOR gcc32dbg )
++		endif()
++
++		condor_pre_external( GLOBUS globus-5.0.1 "lib;include" "done")
+ 
+ 		set (GLOBUS_PATCH patch -i ${CMAKE_CURRENT_SOURCE_DIR}/xio-plugins.patch -p0 &&
+ 						patch -i ${CMAKE_CURRENT_SOURCE_DIR}/rfc_proxy.patch -p0 &&
+@@ -82,73 +100,56 @@ if (WITH_GLOBUS)
+ 						ln -f -s ../../../../../source-trees/xio/src/builtins/popen/globus_xio_popen_driver.c . &&
+ 						ln -f -s ../../../../../source-trees/xio/src/builtins/popen/globus_xio_popen_driver.h . )
+ 
+-		if(SOLARIS)
+-			set ( GLOBUS_PATCH patch -i ${CMAKE_CURRENT_SOURCE_DIR}/putenv.patch -p0 && ${GLOBUS_PATCH} )
+-		elseif(DARWIN)
++		if(DARWIN)
+ 			set ( GLOBUS_PATCH ${GLOBUS_PATCH} && cd ../../../../../../ && patch -i ${CMAKE_CURRENT_SOURCE_DIR}/xio-plugins-2.patch -p0 )
+ 		endif()
+ 
+-		set (GLOBUS_FLAGS CFLAGS=-I${EXTERNAL_STAGE}/include && export CFLAGS &&
+-						LDFLAGS=-L${EXTERNAL_STAGE}/lib && export LDFLAGS &&
+-						OPENSSL_CFLAGS=-I${EXTERNAL_STAGE}/include && export OPENSSL_CFLAGS &&
+-						OPENSSL_LDFLAGS=-L${EXTERNAL_STAGE}/lib && export OPENSSL_LDFLAGS  )
++		#CFLAGS=-I${}/include && export CFLAGS &&
++		#LDFLAGS=-L${GLOBUS_INSTALL_LOC}/lib && export LDFLAGS &&
++		set (GLOBUS_FLAGS OPENSSL_CFLAGS=-I${OPENSSL_INSTALL_LOC}/include && export OPENSSL_CFLAGS &&
++						OPENSSL_LDFLAGS=-L${OPENSSL_INSTALL_LOC}/lib && export OPENSSL_LDFLAGS  )
+ 
+-		if( SOLARIS OR LINUX)
++		if(LINUX)
+ 			set (GLOBUS_FLAGS ${GLOBUS_FLAGS} && OPENSSL_LIBS='-lssl -lcrypto -ldl' && export OPENSSL_LIBS)
+ 		elseif(DARWIN)
+ 			set (GLOBUS_FLAGS ${GLOBUS_FLAGS} &&
+ 							OPENSSL_LIBS='-lssl -lcrypto' && export OPENSSL_LIBS &&
+-							OPENSSL_LDFLAGS='-L${EXTERNAL_STAGE}/lib -Wl,-search_paths_first' && export OPENSSL_LDFLAGS &&
++							OPENSSL_LDFLAGS='-L${OPENSSL_INSTALL_LOC}/lib -Wl,-search_paths_first' && export OPENSSL_LDFLAGS &&
+ 							LT_MULTI_MODULE=1 && export LT_MULTI_MODULE)
+ 		endif()
+ 
+-		set (GLOBUS_DEPENDS openssl gt4 gt42)
+-		if (KRB5_FOUND)
+-			set (GLOBUS_DEPENDS ${GLOBUS_DEPENDS} krb5)
+-		endif(KRB5_FOUND)
+-
+-		if(${SYS_ARCH} MATCHES "IA64|X86_64")
+-			set( GLOBUS_FLAVOR gcc64dbg )
+-		elseif(AIX)
+-			set( GLOBUS_FLAVOR vendorcc32dbg )
+-		else ()
+-			set( GLOBUS_FLAVOR gcc32dbg )
+-		endif()
++		set (GLOBUS_DEPENDS ${OPENSSL_REF} ${GT4_REF} ${GT42_REF} ${KRB5_REF})
+ 
+ 		# honestly the build of globus is one of the strangest things I have ever seen and it makes no sense to me.
+ 		ExternalProject_Add(globus
+ 							DEPENDS ${GLOBUS_DEPENDS}
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${GLOBUS_VER}
+ 							#-- Download Step ----------
+ 							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GLOBUS_VER}.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
++							DOWNLOAD_DIR ${GLOBUS_STAGE}/dl
+ 							URL http://parrot.cs.wisc.edu/externals/${GLOBUS_VER}.tar.gz
+ 							#--Patch step ----------
+ 							PATCH_COMMAND ${GLOBUS_PATCH}
+ 							#--Configure step ----------
+ 							CONFIGURE_COMMAND cd gt5.0.1-all-source-installer &&
+ 								${GLOBUS_FLAGS} &&
+-							./configure --prefix=${EXTERNAL_STAGE} --with-flavor=${GLOBUS_FLAVOR}pthr &&
++							./configure --prefix=${GLOBUS_INSTALL_LOC} --with-flavor=${GLOBUS_FLAVOR}pthr &&
+ 								make gpt gssapi_error globus-resource-management-sdk
+ 							#--Build Step ----------
+ 							BUILD_COMMAND cd gt5.0.1-all-source-installer &&
+ 								${GLOBUS_FLAGS} &&
+-								./configure --prefix=${EXTERNAL_STAGE} --with-flavor=${GLOBUS_FLAVOR} &&
++								./configure --prefix=${GLOBUS_INSTALL_LOC} --with-flavor=${GLOBUS_FLAVOR} &&
+ 								make gpt gssapi_error globus-resource-management-sdk &&
+-								GLOBUS_LOCATION=${EXTERNAL_STAGE} && export GLOBUS_LOCATION &&
++								GLOBUS_LOCATION=${GLOBUS_INSTALL_LOC} && export GLOBUS_LOCATION &&
+ 								make globus_gridftp_server &&
+-								${EXTERNAL_STAGE}/sbin/gpt-build -force -static -srcdir=source-trees/gridftp/server/src ${GLOBUS_FLAVOR} &&
+-								mv ${EXTERNAL_STAGE}/sbin/globus-gridftp-server ${EXTERNAL_STAGE}/sbin/globus-gridftp-server.dynamic
++								${GLOBUS_INSTALL_LOC}/sbin/gpt-build -force -static -srcdir=source-trees/gridftp/server/src ${GLOBUS_FLAVOR} &&
++								mv ${GLOBUS_INSTALL_LOC}/sbin/globus-gridftp-server ${GLOBUS_INSTALL_LOC}/sbin/globus-gridftp-server.dynamic
+ 							BUILD_IN_SOURCE 1
+ 							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}
+-							INSTALL_COMMAND echo "done with the craziness that is globus" )
++							INSTALL_DIR ${GLOBUS_INSTALL_LOC}
++							INSTALL_COMMAND touch ${GLOBUS_INSTALL_LOC}/done)
+ 
+ 			## Set all the config information
+-			set (GLOBUS_FOUND "${EXTERNAL_STAGE}/lib/libglobus_gss_assist_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gssapi_gsi_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gsi_proxy_core_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gsi_credential_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gsi_callback_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gsi_sysconfig_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_oldgaa_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gsi_cert_utils_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_openssl_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_openssl_error_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_proxy_ssl_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_callout_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_common_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libltdl_${GLOBUS_FLAVOR}.a")
+-			if ( AIX )
+-				set (GLOBUS_FOUND "-Wl,-bstatic;${GLOBUS_FOUND};-Wl,-bdynamic")
+-			endif()
++			set (GLOBUS_FOUND "${GLOBUS_INSTALL_LOC}/lib/libglobus_gss_assist_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gssapi_gsi_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gsi_proxy_core_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gsi_credential_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gsi_callback_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gsi_sysconfig_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_oldgaa_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gsi_cert_utils_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_openssl_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_openssl_error_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_proxy_ssl_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_callout_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_common_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libltdl_${GLOBUS_FLAVOR}.a")
+ 			
+ 			# primarily used by cream 
+ 			foreach (_glob_lib ${GLOBUS_FOUND})
+@@ -157,27 +158,20 @@ if (WITH_GLOBUS)
+ 			endforeach(_glob_lib)
+ 
+ 			set (GLOBUS_GRID_UNIVERSE_COMMON
+-			"${EXTERNAL_STAGE}/lib/libglobus_gssapi_error_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_xio_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_io_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_rsl_${GLOBUS_FLAVOR}.a")
+-			if ( AIX )
+-				set (GLOBUS_GRID_UNIVERSE_COMMON "-Wl,-bstatic;${GLOBUS_GRID_UNIVERSE_COMMON};-Wl,-bdynamic")
+-			endif()
++			"${GLOBUS_INSTALL_LOC}/lib/libglobus_gssapi_error_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_xio_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_io_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_rsl_${GLOBUS_FLAVOR}.a")
+ 			
+ 			set (GLOBUS_GRID_UNIVERSE_GT2
+-			"${EXTERNAL_STAGE}/lib/libglobus_gass_transfer_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gram_client_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_gram_protocol_${GLOBUS_FLAVOR}.a")
+-			if ( AIX )
+-				set (GLOBUS_GRID_UNIVERSE_GT2 "-Wl,-bstatic;${GLOBUS_GRID_UNIVERSE_GT2};-Wl,-bdynamic")
+-			endif()
++			"${GLOBUS_INSTALL_LOC}/lib/libglobus_gass_transfer_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gram_client_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_gram_protocol_${GLOBUS_FLAVOR}.a")
++
+ 			set (GLOBUS_GRID_UNIVERSE_NORDUGRID
+-			"${EXTERNAL_STAGE}/lib/libglobus_ftp_client_${GLOBUS_FLAVOR}.a;${EXTERNAL_STAGE}/lib/libglobus_ftp_control_${GLOBUS_FLAVOR}.a")
++			"${GLOBUS_INSTALL_LOC}/lib/libglobus_ftp_client_${GLOBUS_FLAVOR}.a;${GLOBUS_INSTALL_LOC}/lib/libglobus_ftp_control_${GLOBUS_FLAVOR}.a")
+ 			if ( AIX )
+ 				set (GLOBUS_GRID_UNIVERSE_NORDUGRID "-Wl,-bstatic;${GLOBUS_GRID_UNIVERSE_NORDUGRID};-Wl,-bdynamic")
+ 			endif()
+-			append_var (CONDOR_EXTERNALS globus)
+-			append_var (EXTERNAL_INCLUDES ${EXTERNAL_STAGE}/include/${GLOBUS_FLAVOR})
+ 
+-			install ( DIRECTORY ${EXTERNAL_STAGE}/lib/gt4 DESTINATION ${C_LIB} )
+-			install ( DIRECTORY ${EXTERNAL_STAGE}/lib/gt42 DESTINATION ${C_LIB} )
+-			install ( PROGRAMS ${EXTERNAL_STAGE}/sbin/globus-gridftp-server.dynamic DESTINATION ${C_LIBEXEC} RENAME globus-gridftp-server )
++			condor_post_external( globus "include/${GLOBUS_FLAVOR}" OFF )
++
++			install ( PROGRAMS "${GLOBUS_INSTALL_LOC}/sbin/globus-gridftp-server.dynamic" DESTINATION ${C_LIBEXEC} RENAME globus-gridftp-server )
+ 
+ 	else( NOT PROPER )
+ 
+@@ -186,7 +180,7 @@ if (WITH_GLOBUS)
+ 		find_multiple( "globus_gass_transfer;globus_gram_client;globus_gram_protocol" GLOBUS_GRID_UNIVERSE_GT2 )
+ 		find_multiple( "globus_ftp_client;globus_ftp_control" GLOBUS_GRID_UNIVERSE_NORDUGRID)
+ 		if (GLOBUS_FOUND)
+-		  append_var (EXTERNAL_INCLUDES "/usr/include/globus;/usr/lib64/globus/include;/usr/lib/globus/include")
++		  append_var (CONDOR_EXTERNAL_INCLUDE_DIRS "/usr/include/globus;/usr/lib64/globus/include;/usr/lib/globus/include")
+ 		endif(GLOBUS_FOUND)
+ 
+ 	endif(NOT PROPER)
+diff --git a/externals/bundles/gsoap/2.7.10-p5/CMakeLists.txt b/externals/bundles/gsoap/2.7.10-p5/CMakeLists.txt
+index b8445cb..a9c4fb4 100644
+--- a/externals/bundles/gsoap/2.7.10-p5/CMakeLists.txt
++++ b/externals/bundles/gsoap/2.7.10-p5/CMakeLists.txt
+@@ -20,9 +20,10 @@ option(WITH_GSOAP "Compiling with support for GSOAP" ON)
+ 
+ if (WITH_GSOAP)
+ 
+-	if ( NOT PROPER )
++	# this is only done in proper mode to cache local mods which are done to gsoap
++	condor_pre_external( GSOAP gsoap-2.7.10 "src;include" "done")
+ 
+-		set (GSOAP_VER gsoap-2.7.10)
++	if ( NOT PROPER )
+ 
+ 		if (WINDOWS)
+ 			set (GSOAP_PATCH cp ${CMAKE_CURRENT_SOURCE_DIR}/config.WINDOWS.h gsoap/src/config.h)
+@@ -32,23 +33,24 @@ if (WITH_GSOAP)
+ 			set (GSOAP_MAKE set BISON_SIMPLE=${BISON_SIMPLE}\r\n
+ 			                gmake -f Makefile.win32 -C gsoap/src )
+ 			
+-			set (GSOAP_INSTALL set PACKAGE_INSTALL_DIR=${EXTERNAL_STAGE}\r\n
++			set (GSOAP_INSTALL set PACKAGE_INSTALL_DIR=${GSOAP_INSTALL_LOC}\r\n
+ 			                   gmake -f Makefile.win32 install -C gsoap/src )
+ 		else(WINDOWS)
+ 			set (GSOAP_PATCH  patch --binary -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/install_soapcpp2_wsdl2h_aux-2.7.10-Makefile.in.patch &&
+ 							  patch --binary -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/fix_xlocale_insanity.patch &&
+ 							  patch --binary -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/nmi_prereq_hack.patch)
+-			set (GSOAP_CONFIGURE ./configure --prefix=${EXTERNAL_STAGE} --disable-dependency-tracking CPPFLAGS=-I${EXTERNAL_STAGE}/include/)
++			set (GSOAP_CONFIGURE ./configure --prefix=${GSOAP_INSTALL_LOC} --disable-dependency-tracking CPPFLAGS=-I${OPENSSL_INSTALL_LOC}/include/)
+ 			set (GSOAP_MAKE make )
+ 			set (GSOAP_INSTALL make install )
+ 		endif(WINDOWS)
+ 
++		message (STATUS "OPENSSL_INSTALL_LOC = ${OPENSSL_INSTALL_LOC}")
++
+ 		ExternalProject_Add( gsoap
+-					DEPENDS openssl
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${GSOAP_VER}
++				    DEPENDS ${OPENSSL_REF}
+ 				    #-- Download Step ----------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GSOAP_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${GSOAP_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${GSOAP_VER}.tar.gz
+ 					#--Patch step ----------
+ 					PATCH_COMMAND cd ${GSOAP_VER} ${CMD_TERM} ${GSOAP_PATCH}
+@@ -58,22 +60,25 @@ if (WITH_GSOAP)
+ 				    BUILD_COMMAND cd ${GSOAP_VER} ${CMD_TERM} ${GSOAP_MAKE}
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd ${GSOAP_VER} ${CMD_TERM} ${GSOAP_INSTALL} )
++				    INSTALL_DIR ${GSOAP_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${GSOAP_VER}
++				    ${CMD_TERM} ${GSOAP_INSTALL} ${CMD_TERM}
++				    touch ${GSOAP_INSTALL_LOC}/done )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		if (NOT WINDOWS)
+-			set(GSOAP_FOUND "${EXTERNAL_STAGE}/lib/libgsoapssl++.a")
+-			set(SOAPCPP2 "${EXTERNAL_STAGE}/bin/soapcpp2")
++			set(GSOAP_FOUND "${GSOAP_INSTALL_LOC}/lib/libgsoapssl++.a")	
++			set(SOAPCPP2 "${GSOAP_INSTALL_LOC}/bin/soapcpp2")
++			condor_post_external( gsoap include OFF )
+ 		else(NOT WINDOWS)
++			condor_post_external( gsoap include OFF )
++			# gsoap is handled differently on windows
+ 			set(GSOAP_FOUND ON)
+-			set(GSOAP_SRC "${EXTERNAL_STAGE}/src/stdsoap2.cpp" PARENT_SCOPE )
+-			set(SOAPCPP2 "${EXTERNAL_STAGE}/soapcpp2.exe")
+-			set_property( TARGET gsoap PROPERTY FOLDER "externals" )
+-		endif(NOT WINDOWS)
+-
+-		set ( GSOAP_SHARE "${EXTERNAL_BUILD_PREFIX}/${GSOAP_VER}/src/gsoap/${GSOAP_VER}/gsoap" )
+-		append_var (CONDOR_EXTERNALS gsoap)
++			set(GSOAP_SRC "${GSOAP_INSTALL_LOC}/src/stdsoap2.cpp" PARENT_SCOPE )
++			set(SOAPCPP2 "${GSOAP_INSTALL_LOC}/soapcpp2.exe")
++		endif(NOT WINDOWS)		
++		
++		set ( GSOAP_SHARE "${GSOAP_INSTALL_LOC}/share/gsoap" )
+ 		set(WSSEAPI "WSSEAPI-NOTFOUND")
+ 
+ 	else( NOT PROPER )
+@@ -95,12 +100,12 @@ if (WITH_GSOAP)
+ 		find_file(WSSEAPI wsseapi.cpp HINTS ${GSOAP_SHARE}/plugin/ )
+ 
+ 		exec_program ( cp
+-					   ARGS ${GSOAP_SHARE}/plugin/wsseapi.c ${EXTERNAL_STAGE}/src/wsseapi.cpp && patch -p3 ${EXTERNAL_STAGE}/src/wsseapi.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wsseapi.patch
++					   ARGS ${GSOAP_SHARE}/plugin/wsseapi.c ${GSOAP_INSTALL_LOC}/src/wsseapi.cpp && patch -p3 ${GSOAP_INSTALL_LOC}/src/wsseapi.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wsseapi.patch
+ 					   RETURN_VALUE WSSEAPI_PATCH )
+ 		
+ 		dprint("WSSEAPI_PATCH = ${WSSEAPI_PATCH}")
+ 		if (WSSEAPI_PATCH EQUAL 0)
+-		  set(WSSEAPI ${EXTERNAL_STAGE}/src/wsseapi.cpp)
++		  set(WSSEAPI ${GSOAP_INSTALL_LOC}/src/wsseapi.cpp)
+ 		  set(PRE_WSEAPPI_CPP ON PARENT_SCOPE)
+ 		endif()
+ 
+@@ -113,15 +118,15 @@ if (WITH_GSOAP)
+ 			set( GSOAP_FOUND ${GSOAP_FOUND} PARENT_SCOPE )
+ 
+ 			# removing dependencies from condor-proper.
+-			command_target( cp_smdevp cp "${GSOAP_SHARE}/plugin/smdevp.c;${EXTERNAL_STAGE}/src/smdevp.cpp" "${EXTERNAL_STAGE}/src/smdevp.cpp" )
++			command_target( cp_smdevp cp "${GSOAP_SHARE}/plugin/smdevp.c;${GSOAP_INSTALL_LOC}/src/smdevp.cpp" "${GSOAP_INSTALL_LOC}/src/smdevp.cpp" )
+ 			append_var (CONDOR_EXTERNALS cp_smdevp)
+ 			add_dependencies(cp_smdevp gsoap)
+ 
+ 			if (${WSSEAPI} STREQUAL "WSSEAPI-NOTFOUND" )
+ 
+-			  command_target(cp_wsseapi cp "${GSOAP_SHARE}/plugin/wsseapi.c;${EXTERNAL_STAGE}/src/wsseapi.cpp;&&;patch;-p3;${EXTERNAL_STAGE}/src/wsseapi.cpp;${CMAKE_CURRENT_SOURCE_DIR}/wsseapi.patch" "${EXTERNAL_STAGE}/src/wsseapi.cpp")
++			  command_target(cp_wsseapi cp "${GSOAP_SHARE}/plugin/wsseapi.c;${GSOAP_INSTALL_LOC}/src/wsseapi.cpp;&&;patch;-p3;${GSOAP_INSTALL_LOC}/src/wsseapi.cpp;${CMAKE_CURRENT_SOURCE_DIR}/wsseapi.patch" "${GSOAP_INSTALL_LOC}/src/wsseapi.cpp")
+ 
+-			  set(WSSEAPI ${EXTERNAL_STAGE}/src/wsseapi.cpp)
++			  set(WSSEAPI ${GSOAP_INSTALL_LOC}/src/wsseapi.cpp)
+ 			  set(PRE_WSEAPPI_CPP ON PARENT_SCOPE)
+ 			  add_dependencies(cp_wsseapi gsoap)
+ 			  append_var (CONDOR_EXTERNALS cp_wsseapi)
+@@ -129,7 +134,7 @@ if (WITH_GSOAP)
+ 			endif()
+ 
+ 			set( WSSEAPI ${WSSEAPI} PARENT_SCOPE )
+-			set( SMDEVP  ${EXTERNAL_STAGE}/src/smdevp.cpp PARENT_SCOPE )
++			set( SMDEVP  ${GSOAP_INSTALL_LOC}/src/smdevp.cpp PARENT_SCOPE )
+ 		
+ 		endif(NOT WINDOWS)
+ 		
+diff --git a/externals/bundles/hadoop/0.21.0/CMakeLists.txt b/externals/bundles/hadoop/0.21.0/CMakeLists.txt
+index 8dc10b1..40222b3 100644
+--- a/externals/bundles/hadoop/0.21.0/CMakeLists.txt
++++ b/externals/bundles/hadoop/0.21.0/CMakeLists.txt
+@@ -22,51 +22,51 @@ if ( NOT PROPER )
+     option( WITH_HADOOP "Compiling with support for HADOOP" ON )
+ 
+ 	if (WITH_HADOOP)
+-
+-		set (HADOOP_VER hadoop-0.21.0)
++		
++		condor_pre_external( HADOOP hadoop-0.21.0 "hdfs" "hdfs/conf/hdfs-default.xml")
++	
+ 		if ( WINDOWS )
+-			set ( HADOOP_INSTALL md \"${EXTERNAL_STAGE}/hdfs/conf\" ${CMD_TERM}
+-								cp -r lib ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								rm -rf ${EXTERNAL_STAGE}/hdfs/lib/native ${CMD_TERM}
+-								cp -r webapps ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hadoop-common-0.21.0.jar ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hadoop-hdfs-0.21.0.jar ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hdfs/src/java/hdfs-default.xml ${EXTERNAL_STAGE}/hdfs/conf ${CMD_TERM} )
++			set ( HADOOP_INSTALL md \"${HADOOP_INSTALL_LOC}/hdfs/conf\" ${CMD_TERM}
++								cp -r lib ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								rm -rf ${HADOOP_INSTALL_LOC}/hdfs/lib/native ${CMD_TERM}
++								cp -r webapps ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hadoop-common-0.21.0.jar ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hadoop-hdfs-0.21.0.jar ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hdfs/src/java/hdfs-default.xml ${HADOOP_INSTALL_LOC}/hdfs/conf ${CMD_TERM} )
+ 		else()
+-			set ( HADOOP_INSTALL mkdir -p ${EXTERNAL_STAGE}/hdfs/conf ${CMD_TERM}
+-								cp -r lib ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp -r webapps ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hadoop-common-0.21.0.jar ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hadoop-hdfs-0.21.0.jar ${EXTERNAL_STAGE}/hdfs ${CMD_TERM}
+-								cp hdfs/src/java/hdfs-default.xml ${EXTERNAL_STAGE}/hdfs/conf )
++			set ( HADOOP_INSTALL mkdir -p ${HADOOP_INSTALL_LOC}/hdfs/conf ${CMD_TERM}
++								cp -r lib ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp -r webapps ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hadoop-common-0.21.0.jar ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hadoop-hdfs-0.21.0.jar ${HADOOP_INSTALL_LOC}/hdfs ${CMD_TERM}
++								cp hdfs/src/java/hdfs-default.xml ${HADOOP_INSTALL_LOC}/hdfs/conf )
+ 		endif()
+ 		# a couple of odd things, this macro requires a configure and build command.  
+ 		ExternalProject_Add(hadoop
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${HADOOP_VER}
+-							#-- Download Step ----------
+-							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${HADOOP_VER}.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
+-							URL http://parrot.cs.wisc.edu/externals/${HADOOP_VER}.tar.gz
+-							# PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/hadoop-0.20.0-patch
+-							CONFIGURE_COMMAND echo "nothing to configure"
+-							BUILD_COMMAND echo "nothing to build"
+-							BUILD_IN_SOURCE 1
+-							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}
+-							INSTALL_COMMAND cd ${HADOOP_VER} ${CMD_TERM} ${HADOOP_INSTALL} )
++					#-- Download Step ----------
++					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${HADOOP_VER}.tar.gz ${CMD_TERM}
++					DOWNLOAD_DIR ${HADOOP_STAGE}/dl
++					URL http://parrot.cs.wisc.edu/externals/${HADOOP_VER}.tar.gz
++					# PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/hadoop-0.20.0-patch
++					CONFIGURE_COMMAND echo "nothing to configure"
++					BUILD_COMMAND echo "nothing to build"
++					BUILD_IN_SOURCE 1
++					#--install Step ----------
++					INSTALL_DIR ${HADOOP_INSTALL_LOC}
++					INSTALL_COMMAND cd ${HADOOP_VER} ${CMD_TERM} ${HADOOP_INSTALL} )
+ 
+ 		## Set all the config information
+ 		set( HADOOP_TARGET ${HADOOP_TARGET} PARENT_SCOPE )
+ 		set( HAVE_EXT_HADOOP ON PARENT_SCOPE )
+-		append_var(CONDOR_EXTERNALS hadoop)
+-		message (STATUS "external configured (HADOOP_FOUND=${EXTERNAL_STAGE}/hdfs)")
++		message (STATUS "external configured (HADOOP_FOUND=${HADOOP_INSTALL_LOC}/hdfs)")
+ 
+ 		if (WINDOWS)
+-		  set_property( TARGET hadoop PROPERTY FOLDER "externals" )
+-		  install ( DIRECTORY ${EXTERNAL_STAGE}/hdfs/ DESTINATION ./hdfs )
++		  install ( DIRECTORY ${HADOOP_INSTALL_LOC}/hdfs/ DESTINATION ./hdfs )
+ 		else()
+-		  install ( DIRECTORY ${EXTERNAL_STAGE}/hdfs DESTINATION ${C_LIBEXEC} )
++		  install ( DIRECTORY ${HADOOP_INSTALL_LOC}/hdfs DESTINATION ${C_LIBEXEC} )
+ 		endif()
++		
++		condor_post_external( hadoop OFF OFF )
+ 
+ 	else()
+ 		message (STATUS "external skipped (hadoop)")
+diff --git a/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt b/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
+index 97e6d6e..517ad6b 100644
+--- a/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
++++ b/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
+@@ -25,7 +25,7 @@ if (WITH_KRB5)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set (KRB5_VER krb5-1.4.3-p0)
++		condor_pre_external( KRB5 krb5-1.4.3-p0 "lib;include" "include/krb5.h")
+ 
+ 		if (WINDOWS)
+ 			# Just so it is noted this is a complete and total hack build of an arcane 
+@@ -57,25 +57,24 @@ if (WITH_KRB5)
+ 			               nmake NODEBUG=1 "DEFS=-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NON_CONFORMING_SWPRINTFS -wd4002 -wd4005 -wd4013 -wd4018 -wd4028 -wd4047 -wd4090 -wd4091 -wd4101 -wd4102 -wd4133 -wd4146 -wd4244 -wd4700 -wd4996")
+ 
+ 			# Something is wrong with the default install (make install suck-o)
+-			set (KRB5_INSTALL cp ${CMAKE_CURRENT_SOURCE_DIR}/win-mac.post.h  ${EXTERNAL_STAGE}/include/win-mac.h \r\n
+-							  cp -r src/lib/obj/i386/rel/* ${EXTERNAL_STAGE}/lib \r\n
+-							  cp -r src/include/* ${EXTERNAL_STAGE}/include \r\n
++			set (KRB5_INSTALL cp ${CMAKE_CURRENT_SOURCE_DIR}/win-mac.post.h  ${KRB5_INSTALL_LOC}/include/win-mac.h \r\n
++							  cp -r src/lib/obj/i386/rel/* ${KRB5_INSTALL_LOC}/lib \r\n
++							  cp -r src/include/* ${KRB5_INSTALL_LOC}/include \r\n
+ 							  cd \"\\\" \r\n
+-							  cd /D "${EXTERNAL_STAGE}/lib" \r\n 
++							  cd /D "${KRB5_INSTALL_LOC}/lib" \r\n 
+ 							  ${CMAKE_CURRENT_SOURCE_DIR}/manifest.bat )
+ 
+ 		else()
+ 			set (KRB5_PATCH  cp ${CMAKE_CURRENT_SOURCE_DIR}/src.appl.telnet.configure src/appl/telnet/configure )
+-			set (KRB5_CONFIGURE src/configure --prefix=${EXTERNAL_STAGE} --without-tcl --enable-static --sysconfdir=/etc --disable-thread-support )
++			set (KRB5_CONFIGURE src/configure --prefix=${KRB5_INSTALL_LOC} --without-tcl --enable-static --sysconfdir=/etc --disable-thread-support )
+ 			set (KRB5_MAKE make )
+ 			set (KRB5_INSTALL make install )
+ 		endif()
+ 
+ 		ExternalProject_Add(krb5
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${KRB5_VER}
+ 				    #-- Download Step ----------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${KRB5_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${KRB5_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${KRB5_VER}.tar.gz
+ 					#--Patch step ----------
+ 					PATCH_COMMAND cd ${KRB5_VER} ${CMD_TERM} ${KRB5_PATCH}
+@@ -85,31 +84,28 @@ if (WITH_KRB5)
+ 				    BUILD_COMMAND cd ${KRB5_VER} ${CMD_TERM} ${KRB5_MAKE}
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${KRB5_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd ${KRB5_VER} ${CMD_TERM} ${KRB5_INSTALL} )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		if (WINDOWS)
+-			set(KRB5_FOUND "${EXTERNAL_STAGE}/lib/comerr32.lib;${EXTERNAL_STAGE}/lib/gssapi32.lib;${EXTERNAL_STAGE}/lib/k5sprt32.lib;${EXTERNAL_STAGE}/lib/krb5_32.lib;${EXTERNAL_STAGE}/lib/xpprof32.lib")
++			set(KRB5_FOUND "${KRB5_INSTALL_LOC}/lib/comerr32.lib;${KRB5_INSTALL_LOC}/lib/gssapi32.lib;${KRB5_INSTALL_LOC}/lib/k5sprt32.lib;${KRB5_INSTALL_LOC}/lib/krb5_32.lib;${KRB5_INSTALL_LOC}/lib/xpprof32.lib")
+ 
+ 			#this may become the common case.
+-			install ( FILES ${EXTERNAL_STAGE}/lib/comerr32.dll
+-							${EXTERNAL_STAGE}/lib/gssapi32.dll
+-							${EXTERNAL_STAGE}/lib/k5sprt32.dll
+-							${EXTERNAL_STAGE}/lib/krb5_32.dll
+-							${EXTERNAL_STAGE}/lib/xpprof32.dll
++			install ( FILES ${KRB5_INSTALL_LOC}/lib/comerr32.dll
++							${KRB5_INSTALL_LOC}/lib/gssapi32.dll
++							${KRB5_INSTALL_LOC}/lib/k5sprt32.dll
++							${KRB5_INSTALL_LOC}/lib/krb5_32.dll
++							${KRB5_INSTALL_LOC}/lib/xpprof32.dll
+ 					  DESTINATION ${C_LIB} )
+-					  
+-			set_property( TARGET krb5 PROPERTY FOLDER "externals" )
+-
+ 		else()
+-			set(KRB5_FOUND "${EXTERNAL_STAGE}/lib/libkrb5.a;${EXTERNAL_STAGE}/lib/libk5crypto.a;${EXTERNAL_STAGE}/lib/libcom_err.a;${EXTERNAL_STAGE}/lib/libkrb5support.a")
++			set(KRB5_FOUND "${KRB5_INSTALL_LOC}/lib/libkrb5.a;${KRB5_INSTALL_LOC}/lib/libk5crypto.a;${KRB5_INSTALL_LOC}/lib/libcom_err.a;${KRB5_INSTALL_LOC}/lib/libkrb5support.a")
+ 			if ( AIX )
+ 				set (KRB5_FOUND "-Wl,-bstatic;${KRB5_FOUND};-Wl,-bdynamic")
+ 			endif()
+ 		endif()
+ 
+-		append_var(CONDOR_EXTERNALS krb5)
++		condor_post_external( krb5 include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/libcgroup/0.37/CMakeLists.txt b/externals/bundles/libcgroup/0.37/CMakeLists.txt
+new file mode 100644
+index 0000000..0b3a072
+--- /dev/null
++++ b/externals/bundles/libcgroup/0.37/CMakeLists.txt
+@@ -0,0 +1,64 @@
++ ###############################################################
++ #
++ # Copyright (C) 1990-2010, Redhat.
++ #
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ #
++ # Unless required by applicable law or agreed to in writing, software
++ # distributed under the License is distributed on an "AS IS" BASIS,
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and
++ # limitations under the License.
++ #
++ ###############################################################
++
++if (LINUX)
++	option(WITH_LIBCGROUP "Compiling with support for libcgroup" ON)
++endif()
++
++if (WITH_LIBCGROUP)
++
++	if ( NOT PROPER )
++
++		condor_pre_external( LIBCGROUP libcgroup-0.37 "lib;include" "lib/libcgroup.a")
++
++		ExternalProject_Add( libcgroup
++				    #-- Download Step ----------
++				    DOWNLOAD_COMMAND wget -N http://cdnetworks-us-1.dl.sourceforge.net/project/libcg/libcgroup/v0.37/${LIBCGROUP_VER}.tar.bz2 ${CMD_TERM}
++				    DOWNLOAD_DIR ${LIBCGROUP_STAGE}/dl
++				    URL http://cdnetworks-us-1.dl.sourceforge.net/project/libcg/libcgroup/v0.37/${LIBCGROUP_VER}.tar.bz2
++				    #--Configure step ----------
++				    CONFIGURE_COMMAND cd ${LIBCGROUP_VER} ${CMD_TERM} ./configure --prefix=${LIBCGROUP_INSTALL_LOC} --enable-static=yes --disable-dependency-tracking
++				    #--Build Step ----------
++				    BUILD_COMMAND cd ${LIBCGROUP_VER} ${CMD_TERM} make
++				    BUILD_IN_SOURCE 1
++				    #--install Step ----------
++				    INSTALL_DIR ${LIBCGROUP_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${LIBCGROUP_VER} ${CMD_TERM} make install )
++
++		# Set the target dependencies which the rest of condor depends on.
++		set(LIBCGROUP_FOUND "${LIBCGROUP_INSTALL_LOC}/lib/libcgroup.a")
++
++		#set ( LIBCGROUP_SHARE "${EXTERNAL_BUILD_PREFIX}/${LIBCGROUP_VER}/src/libcgroup/${LIBCGROUP_VER}/libcgroup" )
++
++		condor_post_external( libcgroup include OFF )
++
++	else( NOT PROPER )
++
++		find_multiple( "cgroup" LIBCGROUP_FOUND)
++
++	endif( NOT PROPER )
++
++endif()
++	
++if (LIBCGROUP_FOUND)
++	set( LIBCGROUP_FOUND ${LIBCGROUP_FOUND} PARENT_SCOPE )
++	set( HAVE_EXT_LIBCGROUP ON PARENT_SCOPE )
++	message ( STATUS "external configured (LIBCGROUP_FOUND=${LIBCGROUP_FOUND})" )
++else()
++	message (STATUS "external skipped (libcgroup)")
++endif()
+diff --git a/externals/bundles/libdeltacloud/0.7/CMakeLists.txt b/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
+index 08113bb..e73c1fc 100644
+--- a/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
++++ b/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
+@@ -24,27 +24,27 @@ if (WITH_LIBDELTACLOUD)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set(LIBDELTACLOUD_VER libdeltacloud-0.7)
++		condor_pre_external( LIBDELTACLOUD libdeltacloud-0.7 "lib;include" "lib/libdeltacloud.a")
+ 
+ 		ExternalProject_Add(libdeltacloud
+-				DEPENDS curl libxml2
+-				PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBDELTACLOUD_VER}
++				DEPENDS ${CURL_REF} ${LIBXML2_REF}
+ 				#-- Download Step ----------
+ 				DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz ${CMD_TERM}
+-				DOWNLOAD_DIR ${EXTERNAL_DL}
++				DOWNLOAD_DIR ${LIBDELTACLOUD_STAGE}/dl
+ 				URL http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz
+ 				#--Configure step ----------
+-			    	CONFIGURE_COMMAND cd ${LIBDELTACLOUD_VER} && ./configure --prefix=${EXTERNAL_STAGE} --with-libxml=${EXTERNAL_STAGE} --with-libcurl=${EXTERNAL_STAGE} --disable-shared
++				CONFIGURE_COMMAND cd ${LIBDELTACLOUD_VER} && ./configure --prefix=${LIBDELTACLOUD_INSTALL_LOC} --with-libxml=${LIBXML2_INSTALL_LOC} --with-libcurl=${CURL_INSTALL_LOC} --disable-shared
+ 				#--Build Step ----------
+ 				BUILD_COMMAND cd ${LIBDELTACLOUD_VER} && make
+ 				BUILD_IN_SOURCE 1
+ 				#--install Step ----------
+-				INSTALL_DIR ${EXTERNAL_STAGE}
++				INSTALL_DIR ${LIBDELTACLOUD_INSTALL_LOC}
+ 				INSTALL_COMMAND cd ${LIBDELTACLOUD_VER} && make install )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(LIBDELTACLOUD_FOUND "${EXTERNAL_STAGE}/lib/libdeltacloud.a")
+-		append_var( CONDOR_EXTERNALS libdeltacloud )
++		set(LIBDELTACLOUD_FOUND "${LIBDELTACLOUD_INSTALL_LOC}/lib/libdeltacloud.a")
++
++		condor_post_external( libdeltacloud include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/libvirt/0.6.2/CMakeLists.txt b/externals/bundles/libvirt/0.6.2/CMakeLists.txt
+index ef0f877..0e8fbfb 100644
+--- a/externals/bundles/libvirt/0.6.2/CMakeLists.txt
++++ b/externals/bundles/libvirt/0.6.2/CMakeLists.txt
+@@ -26,28 +26,29 @@ if (WITH_LIBVIRT)
+ 
+ 	if ( NOT PROPER AND NOT LIBVIRT_FOUND )
+ 
+-		set (LIBVERT_VER libvirt-0.6.2)
++		condor_pre_external( LIBVIRT libvirt-0.6.2 "lib;include" "lib/libvirt.a" )
+ 
+ 		ExternalProject_Add(libvirt
+-					DEPENDS libxml2
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBVERT_VER}
++					DEPENDS ${LIBXML2_REF}
+ 				    #-- Download Step ----------
+-					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBVERT_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/${LIBVERT_VER}.tar.gz
+-					PATCH_COMMAND cd ${LIBVERT_VER} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_gnutls.patch
++					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBVIRT_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${LIBVIRT_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${LIBVIRT_VER}.tar.gz
++				    PATCH_COMMAND cd ${LIBVIRT_VER} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_gnutls.patch
+ 					#--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${LIBVERT_VER} && ./configure --prefix=${EXTERNAL_STAGE} --disable-shared --without-python --without-xen --without-libvirtd --without-remote --without-test --without-uml --without-openvz --without-avahi --without-selinux --without-sasl --with-libxml=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${LIBVIRT_VER} &&
++				    ./configure --prefix=${LIBVIRT_INSTALL_LOC} --disable-shared --without-python --without-xen --without-libvirtd --without-remote --without-test --without-uml --without-openvz --without-avahi --without-selinux --without-sasl --with-libxml=${LIBXML2_INSTALL_LOC}
+ 				    #--Build Step ----------
+-				    BUILD_COMMAND cd ${LIBVERT_VER} && make
++				    BUILD_COMMAND cd ${LIBVIRT_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd ${LIBVERT_VER} && make install )
++				    INSTALL_DIR ${LIBVIRT_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${LIBVIRT_VER} && make install )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(LIBVIRT_FOUND "${EXTERNAL_STAGE}/lib/libvirt.a")
+-		append_var(CONDOR_EXTERNALS libvirt)
++		set(LIBVIRT_FOUND "${LIBVIRT_INSTALL_LOC}/lib/libvirt.a")
++		
++		condor_post_external( libvirt include OFF )
+ 
+ 	endif( NOT PROPER AND NOT LIBVIRT_FOUND )
+ 
+diff --git a/externals/bundles/libxml2/2.7.3/CMakeLists.txt b/externals/bundles/libxml2/2.7.3/CMakeLists.txt
+index 271f9dc..94cca3c 100644
+--- a/externals/bundles/libxml2/2.7.3/CMakeLists.txt
++++ b/externals/bundles/libxml2/2.7.3/CMakeLists.txt
+@@ -24,29 +24,31 @@ if (WITH_LIBXML2)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set (LIBXML2_VER libxml2-2.7.3 )
++		condor_pre_external( LIBXML2 libxml2-2.7.3 "lib;include" "lib/libxml2")
++
+ 		ExternalProject_Add( libxml2
+-					DEPENDS zlib
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBXML2_VER}
++					DEPENDS ${ZLIB_REF}
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBXML2_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${LIBXML2_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${LIBXML2_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${LIBXML2_VER} && ./configure --prefix=${EXTERNAL_STAGE} --disable-shared --with-zlib=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${LIBXML2_VER} && ./configure --prefix=${LIBXML2_INSTALL_LOC} --disable-shared --with-zlib=${ZLIB_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd ${LIBXML2_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${LIBXML2_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd ${LIBXML2_VER} && make install )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(LIBXML2_FOUND "${EXTERNAL_STAGE}/lib/libxml2.a")
+-		append_var(CONDOR_EXTERNALS libxml2)
++		set(LIBXML2_FOUND "${LIBXML2_INSTALL_LOC}/lib/libxml2.a")
++
++		condor_post_external( libxml2 OFF OFF )
++
+ 	else()
+ 	
+-    		find_multiple( "xml2" LIBXML2_FOUND )
++    	find_multiple( "xml2" LIBXML2_FOUND )
+ 
+ 	endif( NOT PROPER )
+ 
+diff --git a/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt b/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt
+index 7430df0..3d62b75 100644
+--- a/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt
++++ b/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt
+@@ -22,7 +22,7 @@ if (WITH_OPENSSL)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set(OPENSSL_VER openssl-0.9.8h)
++		condor_pre_external( OPENSSL openssl-0.9.8h "lib;include" "include/openssl/ssl.h")
+ 
+ 		if (WINDOWS)
+ 			set (OPENSSL_PATCH patch --binary -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/renegotiate.patch \r\n
+@@ -31,23 +31,23 @@ if (WITH_OPENSSL)
+ 			set (OPENSSL_CONFIGURE perl Configure VC-WIN32 )
+ 			set (OPENSSL_MAKE  call ms/do_nt.bat \r\n
+ 							   nmake -f ms/ntdll.mak )
+-			set (OPENSSL_INSTALL cp out32dll/*.lib ${EXTERNAL_STAGE}/lib \r\n
+-								 cp out32dll/*.dll ${EXTERNAL_STAGE}/lib \r\n
+-								 cp -r inc32/* ${EXTERNAL_STAGE}/include \r\n
+-								 cp ${CMAKE_CURRENT_SOURCE_DIR}/ossl_typ-post.h ${EXTERNAL_STAGE}/include/openssl/ossl_typ.h )
++			set (OPENSSL_INSTALL cp out32dll/*.lib ${OPENSSL_INSTALL_LOC}/lib \r\n
++								 cp out32dll/*.dll ${OPENSSL_INSTALL_LOC}/lib \r\n
++								 cp -r inc32/* ${OPENSSL_INSTALL_LOC}/include \r\n
++								 cp ${CMAKE_CURRENT_SOURCE_DIR}/ossl_typ-post.h ${OPENSSL_INSTALL_LOC}/include/openssl/ossl_typ.h )
+ 		else(WINDOWS)
+ 			set (OPENSSL_PATCH patch --binary -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/renegotiate.patch &&
+ 							   sed 's/-fomit-frame-pointer//' Configure > Configure.new &&
+ 							   mv Configure.new Configure &&
+ 							   chmod a+rx Configure )
+ 
+-			set (OPENSSL_CONFIGURE ./config --prefix=${EXTERNAL_STAGE} no-asm )
++			set (OPENSSL_CONFIGURE ./config --prefix=${OPENSSL_INSTALL_LOC} no-asm )
+ 			
+ 			if (DARWIN)
+ 			  string(SUBSTRING ${OS_VER} 0 2 DARWIN_MAJOR)
+ 			  if(${DARWIN_MAJOR} STREQUAL "10")
+ 				dprint("OPENSSL_CONVERT")
+-				set (OPENSSL_CONFIGURE ./Configure darwin64-x86_64-cc --prefix=${EXTERNAL_STAGE} no-asm -fPIC )
++				set (OPENSSL_CONFIGURE ./Configure darwin64-x86_64-cc --prefix=${OPENSSL_INSTALL_LOC} no-asm -fPIC )
+ 			  endif()
+ 			endif()
+ 			 
+@@ -59,10 +59,9 @@ if (WITH_OPENSSL)
+ 		endif(WINDOWS)
+ 
+ 		ExternalProject_Add( openssl
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${OPENSSL_VER}
+ 				    #-- Download Step ----------
+ 				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${OPENSSL_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${OPENSSL_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${OPENSSL_VER}.tar.gz
+ 					#--Patch step ----------
+ 					PATCH_COMMAND cd ${OPENSSL_VER} ${CMD_TERM} ${OPENSSL_PATCH}
+@@ -72,25 +71,23 @@ if (WITH_OPENSSL)
+ 				    BUILD_COMMAND cd ${OPENSSL_VER} ${CMD_TERM} ${OPENSSL_MAKE}
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${OPENSSL_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd ${OPENSSL_VER} ${CMD_TERM} ${OPENSSL_INSTALL} )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		if (WINDOWS)
+-			set(OPENSSL_FOUND "${EXTERNAL_STAGE}/lib/libeay32.lib;${EXTERNAL_STAGE}/lib/ssleay32.lib")
++			set(OPENSSL_FOUND "${OPENSSL_INSTALL_LOC}/lib/libeay32.lib;${OPENSSL_INSTALL_LOC}/lib/ssleay32.lib")
+ 
+ 			#this may become the common case.
+-			install ( FILES ${EXTERNAL_STAGE}/lib/libeay32.dll
+-							${EXTERNAL_STAGE}/lib/ssleay32.dll
++			install ( FILES ${OPENSSL_INSTALL_LOC}/lib/libeay32.dll
++							${OPENSSL_INSTALL_LOC}/lib/ssleay32.dll
+ 					  DESTINATION ${C_LIB} )
+-			
+-			set_property( TARGET openssl PROPERTY FOLDER "externals" )
+ 
+ 		else(WINDOWS)
+-			set(OPENSSL_FOUND "${EXTERNAL_STAGE}/lib/libssl.a;${EXTERNAL_STAGE}/lib/libcrypto.a")
++			set(OPENSSL_FOUND "${OPENSSL_INSTALL_LOC}/lib/libssl.a;${OPENSSL_INSTALL_LOC}/lib/libcrypto.a")
+ 		endif(WINDOWS)
+ 
+-		append_var(CONDOR_EXTERNALS openssl)
++		condor_post_external( openssl include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+@@ -101,6 +98,7 @@ if (WITH_OPENSSL)
+ 	if (OPENSSL_FOUND)
+ 		message (STATUS "external configured (OPENSSL_FOUND=${OPENSSL_FOUND})")
+ 		set( OPENSSL_FOUND ${OPENSSL_FOUND} PARENT_SCOPE )
++		set( OPENSSL_INSTALL_LOC ${OPENSSL_INSTALL_LOC} PARENT_SCOPE )
+ 		set( HAVE_EXT_OPENSSL ON PARENT_SCOPE )
+ 		set( HAVE_OPENSSL_SSL_H ON PARENT_SCOPE )
+ 	endif(OPENSSL_FOUND)
+diff --git a/externals/bundles/pcre/7.6/CMakeLists.txt b/externals/bundles/pcre/7.6/CMakeLists.txt
+index 3c1e08a..1c0013d 100644
+--- a/externals/bundles/pcre/7.6/CMakeLists.txt
++++ b/externals/bundles/pcre/7.6/CMakeLists.txt
+@@ -16,80 +16,70 @@
+  # 
+  ############################################################### 
+ 
+-# currently hard dependency
+-#option(WITH_PCRE "Compiling with support for PCRE" ON)
+-#if (WITH_PCRE)
++if ( NOT PROPER )
+ 
+-	if ( NOT PROPER )
++	condor_pre_external( PCRE pcre-7.6 "lib;include" "include/pcre.h")
+ 
+-		set (PCRE_VER pcre-7.6)
+-		if (WINDOWS)
+-			set (PCRE_PATCH cp ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.win32 . \r\n
+-							cp ${CMAKE_CURRENT_SOURCE_DIR}/pcre.h.win32 pcre.h \r\n
+-							cp ${CMAKE_CURRENT_SOURCE_DIR}/libpcre.def.win32 libpcre.def )
+-			set (PCRE_CONFIGURE cp ${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32 config.h)
+-			set (PCRE_MAKE gmake -f Makefile.win32 )
+-			set (PCRE_INSTALL cp libpcre.lib ${EXTERNAL_STAGE}/lib \r\n
+-							  cp libpcre.dll ${EXTERNAL_STAGE}/lib \r\n
+-							  cp pcre.h ${EXTERNAL_STAGE}/include )
+-		else()
+-			set (PCRE_PATCH  patch --binary -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/longlong.patch &&
+-							 patch --binary -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/unittests.patch )
+-			set (PCRE_CONFIGURE ./configure --prefix=${EXTERNAL_STAGE} --disable-cpp )
+-			set (PCRE_MAKE make && make test )
+-			set (PCRE_INSTALL make install )
+-		endif()
+-
+-		ExternalProject_Add(pcre
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${PCRE_VER}
+-				    #-- Download Step ----------
+-				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${PCRE_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/${PCRE_VER}.tar.gz
+-					#--Patch step ----------
+-					PATCH_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_PATCH}
+-				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_CONFIGURE}
+-				    #--Build Step ----------
+-				    BUILD_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_MAKE}
+-				    BUILD_IN_SOURCE 1
+-				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_INSTALL} )
+-
+-		# Set the target dependencies which the rest of condor depends on.
+-		if (WINDOWS)
+-			set(PCRE_FOUND "${EXTERNAL_STAGE}/lib/libpcre.lib")
++	if (WINDOWS)
++		set (PCRE_PATCH cp ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.win32 . \r\n
++						cp ${CMAKE_CURRENT_SOURCE_DIR}/pcre.h.win32 pcre.h \r\n
++						cp ${CMAKE_CURRENT_SOURCE_DIR}/libpcre.def.win32 libpcre.def )
++		set (PCRE_CONFIGURE cp ${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32 config.h)
++		set (PCRE_MAKE gmake -f Makefile.win32 )
++		set (PCRE_INSTALL cp libpcre.lib ${PCRE_INSTALL_LOC}/lib \r\n
++						  cp libpcre.dll ${PCRE_INSTALL_LOC}/lib \r\n
++						  cp pcre.h ${PCRE_INSTALL_LOC}/include )
++	else()
++		set (PCRE_PATCH  patch --binary -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/longlong.patch &&
++						 patch --binary -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/unittests.patch )
++		set (PCRE_CONFIGURE ./configure --prefix=${PCRE_INSTALL_LOC} --disable-cpp )
++		set (PCRE_MAKE make && make test )
++		set (PCRE_INSTALL make install )
++	endif()
+ 
+-			#this may become the common case.
+-			install ( FILES ${EXTERNAL_STAGE}/lib/libpcre.dll DESTINATION ${C_LIB} )
+-			
+-			set_property( TARGET pcre PROPERTY FOLDER "externals" )
+-			
+-		else()
+-			set(PCRE_FOUND "${EXTERNAL_STAGE}/lib/libpcre.a")
+-			if ( AIX )
+-				set (PCRE_FOUND "-Wl,-bstatic;${PCRE_FOUND};-Wl,-bdynamic")
+-			endif()
+-		endif()
++	ExternalProject_Add(pcre
++						#-- Download Step ----------
++						DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${PCRE_VER}.tar.gz ${CMD_TERM}
++						DOWNLOAD_DIR ${PCRE_STAGE}/dl
++						URL http://parrot.cs.wisc.edu/externals/${PCRE_VER}.tar.gz
++						#--Patch step ----------
++						PATCH_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_PATCH}
++						#--Configure step ----------
++						CONFIGURE_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_CONFIGURE}
++						#--Build Step ----------
++						BUILD_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_MAKE}
++						BUILD_IN_SOURCE 1
++						#--install Step ----------
++						INSTALL_DIR ${PCRE_INSTALL_LOC}
++						INSTALL_COMMAND cd ${PCRE_VER} ${CMD_TERM} ${PCRE_INSTALL} )
++	
++	#################################################################
++	# Set the target dependencies which the rest of condor depends on.
++	if (WINDOWS)
++		set(PCRE_FOUND "${PCRE_INSTALL_LOC}/lib/libpcre.lib")
++		install ( FILES ${PCRE_INSTALL_LOC}/lib/libpcre.dll DESTINATION ${C_LIB} )
++	else()
++		set(PCRE_FOUND "${PCRE_INSTALL_LOC}/lib/libpcre.a")
++	endif()
++	#
++	#################################################################
+ 
+-		append_var(CONDOR_EXTERNALS pcre)
++	condor_post_external( pcre include OFF )
+ 
+-	else( NOT PROPER )
++else( NOT PROPER )
+ 
+-		find_multiple( "pcre;libpcre" PCRE_FOUND )
++	find_multiple( "pcre" PCRE_FOUND )
+ 
+-	endif( NOT PROPER )
++endif( NOT PROPER )
+ 
+-	if (PCRE_FOUND)
+-		message (STATUS "external configured (PCRE_FOUND=${PCRE_FOUND})")
+-		set( PCRE_FOUND ${PCRE_FOUND} PARENT_SCOPE )
+-		set( HAVE_EXT_PCRE ON PARENT_SCOPE )
+-		set( HAVE_PCRE_H ON PARENT_SCOPE )
+-	else()
+-	  message (FATAL_ERROR "pcre not found and is required to build")
+-	endif(PCRE_FOUND)
++##################### 
++## Hard failure if there is no PCRE
++if (PCRE_FOUND)
++	message (STATUS "external configured (PCRE_FOUND=${PCRE_FOUND})")
++	set( PCRE_FOUND ${PCRE_FOUND} PARENT_SCOPE )
++	set( HAVE_EXT_PCRE ON PARENT_SCOPE )
++	set( HAVE_PCRE_H ON PARENT_SCOPE )
++else()
++	message (FATAL_ERROR "pcre not found and is required to build")
++endif(PCRE_FOUND)
+ 
+-#else(WITH_PCRE)
+-#	message (STATUS "external skipped (pcre)")
+-#endif(WITH_PCRE)
+diff --git a/externals/bundles/postgresql/8.2.3-p1/CMakeLists.txt b/externals/bundles/postgresql/8.2.3-p1/CMakeLists.txt
+index 67f8082..a928c2d 100644
+--- a/externals/bundles/postgresql/8.2.3-p1/CMakeLists.txt
++++ b/externals/bundles/postgresql/8.2.3-p1/CMakeLists.txt
+@@ -26,30 +26,29 @@ if (WITH_POSTGRESQL)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set (POSTGRESQL_VER postgresql-8.2.3)
++		condor_pre_external( POSTGRESQL postgresql-8.2.3 "lib;include" "include/postgres.h")
+ 
+ 		if (WINDOWS)
+ 			set (POSTGRESQL_CONFIGURE echo "Nothing to patch on Windows")
+ 			set (POSTGRESQL_MAKE cd src \r\n
+ 			                     nmake -f win32.mak )
+-			set (POSTGRESQL_INSTALL cp src/interfaces/libpq/Release/*.lib  ${EXTERNAL_STAGE}/lib \r\n
+-									cp src/interfaces/libpq/Release/*.dll ${EXTERNAL_STAGE}/lib \r\n
+-									cp src/interfaces/libpq/libpq-fe.h ${EXTERNAL_STAGE}/include \r\n
+-									cp -r src/include/* ${EXTERNAL_STAGE}/include )
++			set (POSTGRESQL_INSTALL cp src/interfaces/libpq/Release/*.lib  ${POSTGRESQL_INSTALL_LOC}/lib \r\n
++									cp src/interfaces/libpq/Release/*.dll ${POSTGRESQL_INSTALL_LOC}/lib \r\n
++									cp src/interfaces/libpq/libpq-fe.h ${POSTGRESQL_INSTALL_LOC}/include \r\n
++									cp -r src/include/* ${POSTGRESQL_INSTALL_LOC}/include )
+ 									
+-									#mt.exe /manifest ${CMAKE_CURRENT_SOURCE_DIR}/libpq.dll.manifest /outputresource:${EXTERNAL_STAGE}/lib/libpq.dll)
++									#mt.exe /manifest ${CMAKE_CURRENT_SOURCE_DIR}/libpq.dll.manifest /outputresource:${POSTGRESQL_INSTALL_LOC}/lib/libpq.dll)
+ 									#imbedding custom manifests is a bad idea.
+ 		else()
+-			set (POSTGRESQL_CONFIGURE ./configure --prefix=${EXTERNAL_STAGE} --without-readline --without-zlib)
++			set (POSTGRESQL_CONFIGURE ./configure --prefix=${POSTGRESQL_INSTALL_LOC} --without-readline --without-zlib)
+ 			set (POSTGRESQL_MAKE make)
+ 			set (POSTGRESQL_INSTALL make install)
+ 		endif()
+ 
+ 		ExternalProject_Add(postgresql
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${POSTGRESQL_VER}
+ 							#-- Download Step ----------
+ 							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${POSTGRESQL_VER}.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
++							DOWNLOAD_DIR ${POSTGRESQL_STAGE}/dl
+ 							URL http://parrot.cs.wisc.edu/externals/${POSTGRESQL_VER}.tar.gz
+ 							#--Configure step ----------
+ 							CONFIGURE_COMMAND cd ${POSTGRESQL_VER} ${CMD_TERM} ${POSTGRESQL_CONFIGURE}
+@@ -57,24 +56,22 @@ if (WITH_POSTGRESQL)
+ 							BUILD_COMMAND cd ${POSTGRESQL_VER} ${CMD_TERM} ${POSTGRESQL_MAKE}
+ 							BUILD_IN_SOURCE 1
+ 							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}
++							INSTALL_DIR ${POSTGRESQL_INSTALL_LOC}
+ 							INSTALL_COMMAND cd ${POSTGRESQL_VER} ${CMD_TERM} ${POSTGRESQL_INSTALL} )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		if (WINDOWS)
+-			set(POSTGRESQL_FOUND "${EXTERNAL_STAGE}/lib/libpqdll.lib")
++			set(POSTGRESQL_FOUND "${POSTGRESQL_INSTALL_LOC}/lib/libpqdll.lib")
+ 
+ 			#this may become the common case.
+-			install ( FILES ${EXTERNAL_STAGE}/lib/libpq.dll
++			install ( FILES ${POSTGRESQL_INSTALL_LOC}/lib/libpq.dll
+ 					  DESTINATION ${C_LIB})
+ 			
+-			set_property( TARGET postgresql PROPERTY FOLDER "externals" )
+-			
+ 		else()
+-			set(POSTGRESQL_FOUND "${EXTERNAL_STAGE}/lib/libpq.a")
++			set(POSTGRESQL_FOUND "${POSTGRESQL_INSTALL_LOC}/lib/libpq.a")
+ 		endif()
+ 
+-		append_var(CONDOR_EXTERNALS postgresql)
++		condor_post_external( postgresql include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/externals/bundles/qpid/0.7.946106/CMakeLists.txt b/externals/bundles/qpid/0.7.946106/CMakeLists.txt
+deleted file mode 100644
+index 82a4fa6..0000000
+--- a/externals/bundles/qpid/0.7.946106/CMakeLists.txt
++++ /dev/null
+@@ -1,97 +0,0 @@
+-###############################################################
+- # 
+- # Copyright (C) 1990-2010, Red Hat Inc. 
+- # 
+- # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
+- # 
+- # Unless required by applicable law or agreed to in writing, software 
+- # distributed under the License is distributed on an "AS IS" BASIS, 
+- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- # See the License for the specific language governing permissions and 
+- # limitations under the License. 
+- # 
+- ############################################################### 
+-
+-# qpid is for condor_contrib/mgmt/qmf
+-if (WANT_CONTRIB AND (LINUX OR WINDOWS))
+-	option(WITH_QPID "Compiling with support for QPID" ON)
+-endif()
+-
+-if (WITH_QPID)
+-
+-	if ( NOT PROPER )
+-	
+-		set (QPID_VER qpid-cpp-mrg-0.7.946106 )
+-
+-		if (NOT WINDOWS)
+-			set (QPID_CONFIGURE ./bootstrap && ./configure --prefix=${EXTERNAL_STAGE} )
+-			set (QPID_BUILD make )
+-			set (QPID_INSTALL make install )
+-		else()
+-			set (QPID_CONFIGURE cmake -DBOOST_ROOT:PATH=${BOOST_ROOT} -DCMAKE_INSTALL_PREFIX:PATH=${EXTERNAL_STAGE} -G \"Visual Studio 9 2008\" -DGEN_DOXYGEN:BOOL=OFF -DBoost_DEBUG:BOOL=TRUE )
+-			set (QPID_BUILD devenv qpid-cpp.sln /Rebuild RelWithDebInfo /project INSTALL )
+-			set (QPID_INSTALL echo "Done" )
+-		endif()
+-
+-		ExternalProject_Add(qpid
+-					DEPENDS boost
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/qpid-${QPID_VER}
+-				    #-- Download Step ----------
+-					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${QPID_VER}-28.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/${QPID_VER}-28.tar.gz
+-				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${QPID_VER}/cpp && ${QPID_CONFIGURE}
+-				    #--Build Step ----------
+-				    BUILD_COMMAND cd ${QPID_VER}/cpp && ${QPID_BUILD}
+-				    BUILD_IN_SOURCE 1
+-				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd ${QPID_VER}/cpp && ${QPID_INSTALL} )
+-
+-		# Set the target dependencies which the rest of condor depends on.
+-		# all of the below locations need to be verified.
+-		if (WINDOWS)
+-			set( QPID_FOUND "${EXTERNAL_STAGE}/bin/qpidcommon.lib;${EXTERNAL_STAGE}/bin/qpidclient.lib;${EXTERNAL_STAGE}/bin/qmf.lib;${EXTERNAL_STAGE}/bin/qpidtypes.lib" )
+-			install ( FILES ${EXTERNAL_STAGE}/bin/qpidcommon.dll
+-					  ${EXTERNAL_STAGE}/bin/qpidclient.dll
+-					  ${EXTERNAL_STAGE}/bin/qmf.dll
+-					  ${EXTERNAL_STAGE}/bin/qpidtypes.dll
+-					  DESTINATION ${C_LIB} )
+-					  
+-			set( QMF_GEN ${EXTERNAL_STAGE}/managementgen/qmf-gen )
+-			
+-			set_property( TARGET qpid PROPERTY FOLDER "externals" )
+-			
+-		else()
+-			set( QPID_FOUND "${EXTERNAL_STAGE}/lib/libqpidcommon.so;${EXTERNAL_STAGE}/lib/libqpidclient.so;${EXTERNAL_STAGE}/lib/libqmf.so;${EXTERNAL_STAGE}/lib/libqpidtypes.so" )
+-			# TODO: so are we going to need to install qpid.so's along with condor..? or should we -static the plugins.
+-			# add linux install target
+-			#set( QMF_GEN ${EXTERNAL_STAGE}/managementgen/qmf-gen ) ?
+-		endif()
+-
+-		append_var(CONDOR_EXTERNALS qpid)
+-
+-	else( NOT PROPER )
+-
+-		# I don't know how we check versions for native search of qpid-qmf? header check? program_exec?
+-		find_multiple( "qpidcommon;qpidclient;qmf;qmfengine;qpidtypes" QPID_FOUND)
+-		find_program ( QMF_GEN qmf-gen )
+-
+-	endif( NOT PROPER )
+-
+-	# you will need to update config.h.cmake with your var.
+-	message (STATUS "external configured QPID_FOUND=(${QPID_FOUND}) QMF_GEN=(${QMF_GEN})")
+-	set( HAVE_EXT_QPID ON PARENT_SCOPE )
+-	set (QPID_FOUND ${QPID_FOUND} PARENT_SCOPE)
+-	set (QMF_GEN ${QMF_GEN} PARENT_SCOPE)
+-
+-else(WITH_QPID)
+-
+-	message (STATUS "external skipped (qpid)")
+-
+-endif(WITH_QPID)
+diff --git a/externals/bundles/qpid/0.8-RC3/CMakeLists.txt b/externals/bundles/qpid/0.8-RC3/CMakeLists.txt
+index 05a688b..7088d84 100644
+--- a/externals/bundles/qpid/0.8-RC3/CMakeLists.txt
++++ b/externals/bundles/qpid/0.8-RC3/CMakeLists.txt
+@@ -26,55 +26,53 @@ if (WITH_QPID)
+ 	if ( NOT PROPER )
+ 	
+ 		set (QPID_VER 0.8)
++		condor_pre_external( QPID qpid-0.8 "lib;include" "include/qpid")
+ 
+ 		if (NOT WINDOWS)
+-			set (QPID_CONFIGURE ./bootstrap && ./configure --prefix=${EXTERNAL_STAGE} )
++			set (QPID_CONFIGURE ./bootstrap && ./configure --prefix=${QPID_INSTALL_LOC} )
+ 			set (QPID_BUILD make )
+ 			set (QPID_INSTALL make install )
+ 		else()
+-			set (QPID_CONFIGURE cmake -DBOOST_ROOT:PATH=${BOOST_ROOT} -DCMAKE_INSTALL_PREFIX:PATH=${EXTERNAL_STAGE} -G \"Visual Studio 9 2008\" -DGEN_DOXYGEN:BOOL=OFF -DBoost_DEBUG:BOOL=TRUE )
++			set (QPID_CONFIGURE cmake -DBOOST_ROOT:PATH=${BOOST_ROOT} -DCMAKE_INSTALL_PREFIX:PATH=${QPID_INSTALL_LOC} -G \"Visual Studio 9 2008\" -DGEN_DOXYGEN:BOOL=OFF -DBoost_DEBUG:BOOL=TRUE )
+ 			set (QPID_BUILD devenv qpid-cpp.sln /Rebuild RelWithDebInfo /project INSTALL )
+ 			set (QPID_INSTALL echo "Done" )
+ 		endif()
+ 
+ 		ExternalProject_Add(qpid
+ 					DEPENDS boost
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/qpid-${QPID_VER}
+ 				    #-- Download Step ----------
+-					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/qpid-${QPID_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
+-				    URL http://parrot.cs.wisc.edu/externals/qpid-${QPID_VER}.tar.gz
++					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${QPID_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${QPID_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${QPID_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd qpid-${QPID_VER}/cpp && ${QPID_CONFIGURE}
++				    CONFIGURE_COMMAND cd ${QPID_VER}/cpp && ${QPID_CONFIGURE}
+ 				    #--Build Step ----------
+-				    BUILD_COMMAND cd qpid-${QPID_VER}/cpp && ${QPID_BUILD}
++				    BUILD_COMMAND cd ${QPID_VER}/cpp && ${QPID_BUILD}
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
+-				    INSTALL_COMMAND cd qpid-${QPID_VER}/cpp && ${QPID_INSTALL} )
++				    INSTALL_DIR ${QPID_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${QPID_VER}/cpp && ${QPID_INSTALL} )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+ 		# all of the below locations need to be verified.
+ 		if (WINDOWS)
+-			set( QPID_FOUND "${EXTERNAL_STAGE}/bin/qpidcommon.lib;${EXTERNAL_STAGE}/bin/qpidclient.lib;${EXTERNAL_STAGE}/bin/qmf.lib;${EXTERNAL_STAGE}/bin/qpidtypes.lib" )
+-			install ( FILES ${EXTERNAL_STAGE}/bin/qpidcommon.dll
+-					  ${EXTERNAL_STAGE}/bin/qpidclient.dll
+-					  ${EXTERNAL_STAGE}/bin/qmf.dll
+-					  ${EXTERNAL_STAGE}/bin/qpidtypes.dll
++			set( QPID_FOUND "${QPID_INSTALL_LOC}/bin/qpidcommon.lib;${QPID_INSTALL_LOC}/bin/qpidclient.lib;${QPID_INSTALL_LOC}/bin/qmf.lib;${QPID_INSTALL_LOC}/bin/qpidtypes.lib" )
++			install ( FILES ${QPID_INSTALL_LOC}/bin/qpidcommon.dll
++					  ${QPID_INSTALL_LOC}/bin/qpidclient.dll
++					  ${QPID_INSTALL_LOC}/bin/qmf.dll
++					  ${QPID_INSTALL_LOC}/bin/qpidtypes.dll
+ 					  DESTINATION ${C_LIB} )
+ 					  
+-			set( QMF_GEN ${EXTERNAL_STAGE}/managementgen/qmf-gen )
+-			
+-			set_property( TARGET qpid PROPERTY FOLDER "externals" )
++			set( QMF_GEN ${QPID_INSTALL_LOC}/managementgen/qmf-gen )
+ 			
+ 		else()
+-			set( QPID_FOUND "${EXTERNAL_STAGE}/lib/libqpidcommon.so;${EXTERNAL_STAGE}/lib/libqpidclient.so;${EXTERNAL_STAGE}/lib/libqmf.so;${EXTERNAL_STAGE}/lib/libqpidtypes.so;${EXTERNAL_STAGE}/lib/qpidmessaging.so;${EXTERNAL_STAGE}/lib/libqmfconsole.so;${EXTERNAL_STAGE}/lib/libqmf2.so" )
++			set( QPID_FOUND "${QPID_INSTALL_LOC}/lib/libqpidcommon.so;${QPID_INSTALL_LOC}/lib/libqpidclient.so;${QPID_INSTALL_LOC}/lib/libqmf.so;${QPID_INSTALL_LOC}/lib/libqpidtypes.so;${QPID_INSTALL_LOC}/lib/qpidmessaging.so;${QPID_INSTALL_LOC}/lib/libqmfconsole.so;${QPID_INSTALL_LOC}/lib/libqmf2.so" )
+ 			# TODO: so are we going to need to install qpid.so's along with condor..? or should we -static the plugins.
+ 			# add linux install target
+-			#set( QMF_GEN ${EXTERNAL_STAGE}/managementgen/qmf-gen ) ?
++			#set( QMF_GEN ${QPID_INSTALL_LOC}/managementgen/qmf-gen ) ?
+ 		endif()
+ 
+-		append_var(CONDOR_EXTERNALS qpid)
++		condor_post_external( qpid include OFF )
+ 
+ 	else( NOT PROPER )
+ 
+@@ -84,14 +82,17 @@ if (WITH_QPID)
+ 
+ 	endif( NOT PROPER )
+ 
++endif()
++
++# only enable if qpid and qmf bits are all present.
++if (QPID_FOUND AND NOT "${QMF_GEN}" MATCHES "-NOTFOUND" )
+ 	# you will need to update config.h.cmake with your var.
+ 	message (STATUS "external configured QPID_FOUND=(${QPID_FOUND}) QMF_GEN=(${QMF_GEN})")
+ 	set( HAVE_EXT_QPID ON PARENT_SCOPE )
+ 	set (QPID_FOUND ${QPID_FOUND} PARENT_SCOPE)
+ 	set (QMF_GEN ${QMF_GEN} PARENT_SCOPE)
+-
+-else(WITH_QPID)
++else()
+ 
+ 	message (STATUS "external skipped (qpid)")
+ 
+-endif(WITH_QPID)
++endif()
+diff --git a/externals/bundles/unicoregahp/1.2.0/CMakeLists.txt b/externals/bundles/unicoregahp/1.2.0/CMakeLists.txt
+index 0cd3871..9df2e1b 100644
+--- a/externals/bundles/unicoregahp/1.2.0/CMakeLists.txt
++++ b/externals/bundles/unicoregahp/1.2.0/CMakeLists.txt
+@@ -20,26 +20,27 @@ option(WITH_UNICOREGAHP "Compiling with support for UNICOREGAHP" ON)
+ 
+ if ( WITH_UNICOREGAHP AND NOT PROPER )
+ 
+-	set (UCGAHP_VER unicoregahp-1.2.0)
++	condor_pre_external( UNICOREGAHP unicoregahp-1.2.0 "usr/share/java" "usr/share/java/ugahp.jar")
++
+ 	ExternalProject_Add(unicoregahp
+-			    PREFIX ${EXTERNAL_BUILD_PREFIX}/${UCGAHP_VER}
+ 			    #-- Download Step ----------
+-				DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${UCGAHP_VER}.tar.gz ${CMD_TERM}
+-			    DOWNLOAD_DIR ${EXTERNAL_DL}
+-			    URL http://parrot.cs.wisc.edu/externals/${UCGAHP_VER}.tar.gz
++				DOWNLOAD_COMMAND wget -N
++				http://parrot.cs.wisc.edu/externals/${UNICOREGAHP_VER}.tar.gz ${CMD_TERM}
++			    DOWNLOAD_DIR ${UNICOREGAHP_STAGE}/dl
++			    URL http://parrot.cs.wisc.edu/externals/${UNICOREGAHP_VER}.tar.gz
+ 				#--Configure step ----------
+ 				CONFIGURE_COMMAND echo "nothing to do"
+ 				#--Build Step ----------
+ 				BUILD_COMMAND echo "nothing to do"
+ 				BUILD_IN_SOURCE 1
+ 				#--install Step ----------
+-			    INSTALL_DIR ${EXTERNAL_STAGE}/usr/share/java
+-			    INSTALL_COMMAND cp ugahp.jar ${EXTERNAL_STAGE}/usr/share/java )
++			    INSTALL_DIR ${UNICOREGAHP_INSTALL_LOC}/usr/share/java
++			    INSTALL_COMMAND cp ugahp.jar ${UNICOREGAHP_INSTALL_LOC}/usr/share/java )
+ 
+ 	message (STATUS "external configured (unicoregahp)")
+-	set( HAVE_EXT_UNICOREGAHP ON PARENT_SCOPE )
+-	append_var(CONDOR_EXTERNALS unicoregahp)
+-	install(FILES ${EXTERNAL_STAGE}/usr/share/java/ugahp.jar DESTINATION ${C_LIB})
++
++	condor_post_external( unicoregahp OFF OFF )
++	install(FILES "${UNICOREGAHP_INSTALL_LOC}/usr/share/java/ugahp.jar" DESTINATION ${C_LIB})
+ 
+ else()
+ 	message (STATUS "external skipped (unicoregahp)")
+diff --git a/externals/bundles/voms/1.9.10_4/CMakeLists.txt b/externals/bundles/voms/1.9.10_4/CMakeLists.txt
+index 99bbef6..c78c3f0 100644
+--- a/externals/bundles/voms/1.9.10_4/CMakeLists.txt
++++ b/externals/bundles/voms/1.9.10_4/CMakeLists.txt
+@@ -24,15 +24,20 @@ endif(LINUX OR DARWIN)
+ if ( WITH_VOMS )
+ 
+ 	if (NOT PROPER)
++		if(${SYS_ARCH} MATCHES "X86_64")
++			set(VOMS_LIB lib64)
++		else()
++			set(VOMS_LIB lib)
++		endif()
+ 
+-		set (VOMS_VER voms-1.9.10_4)
++	
++		condor_pre_external( VOMS voms-1.9.10_4 "include;${VOMS_LIB}" "done")
+ 
+ 		ExternalProject_Add(voms
+-							DEPENDS expat openssl globus zlib
+-							PREFIX ${EXTERNAL_BUILD_PREFIX}/${VOMS_VER}
++							DEPENDS ${EXPAT_REF} ${OPENSSL_RED} ${GLOBUS_REF} ${ZLIB_REF}
+ 							#-- Download Step ----------
+ 							DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${VOMS_VER}.tar.gz ${CMD_TERM}
+-							DOWNLOAD_DIR ${EXTERNAL_DL}
++							DOWNLOAD_DIR ${VOMS_STAGE}/dl
+ 							URL http://parrot.cs.wisc.edu/externals/${VOMS_VER}.tar.gz
+ 							#--Patch step ----------
+ 							PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/configure.patch &&
+@@ -42,28 +47,23 @@ if ( WITH_VOMS )
+ 							#--Configure step ----------
+ 							CONFIGURE_COMMAND cd org.glite.security.voms &&
+ 								./configure
+-								--prefix=${EXTERNAL_STAGE}
++								--prefix=${VOMS_INSTALL_LOC}
+ 								--with-api-only
+-								--with-openssl-prefix=${EXTERNAL_STAGE}
+-								--with-expat-prefix=${EXTERNAL_STAGE}
+-								--with-globus-prefix=${EXTERNAL_STAGE}
++								--with-openssl-prefix=${OPENSSL_INSTALL_LOC}
++								--with-expat-prefix=${EXPAT_INSTALL_LOC}
++								--with-globus-prefix=${GLOBUS_INSTALL_LOC}
+ 								--with-globus-flavor=${GLOBUS_FLAVOR} --disable-java --disable-docs --disable-glite
+ 							#--Build Step ----------
+ 							BUILD_COMMAND cd org.glite.security.voms && make
+ 							BUILD_IN_SOURCE 1
+ 							#--install Step ----------
+-							INSTALL_DIR ${EXTERNAL_STAGE}
+-							INSTALL_COMMAND cd org.glite.security.voms && make install
++							INSTALL_DIR ${VOMS_INSTALL_LOC}
++							INSTALL_COMMAND cd org.glite.security.voms && make install && touch ${VOMS_INSTALL_LOC}/done
+ 				)
+ 
+-		# On Mac OS X, giving the basename of the library causes
+-		# it to be dynamically linked. On linux, the library may
+-		# be in lib/ or lib64/.
+-		if ( DARWIN )
+-			set( VOMS_FOUND "${EXTERNAL_STAGE}/lib/libvomsapi_${GLOBUS_FLAVOR}.a" )
+-		else()
+-			set( VOMS_FOUND "libvomsapi_${GLOBUS_FLAVOR}.a" )
+-		endif()
++		set( VOMS_FOUND "${VOMS_INSTALL_LOC}/${VOMS_LIB}/libvomsapi_${GLOBUS_FLAVOR}.a" )
++
++		condor_post_external( voms include/glite/security OFF )
+ 
+ 	else(NOT PROPER)
+ 
+@@ -75,8 +75,6 @@ if ( WITH_VOMS )
+ 		message ( STATUS "external configured (VOMS_FOUND=${VOMS_FOUND})" )
+ 		set( HAVE_EXT_VOMS ON PARENT_SCOPE )
+ 		set( VOMS_FOUND ${VOMS_FOUND} PARENT_SCOPE )
+-		append_var(CONDOR_EXTERNALS voms)
+-		append_var(EXTERNAL_INCLUDES ${EXTERNAL_STAGE}/include/glite/security)
+ 	endif()
+ 
+ endif()
+diff --git a/externals/bundles/wso2/2.1.0/CMakeLists.txt b/externals/bundles/wso2/2.1.0/CMakeLists.txt
+new file mode 100644
+index 0000000..305dfd7
+--- /dev/null
++++ b/externals/bundles/wso2/2.1.0/CMakeLists.txt
+@@ -0,0 +1,94 @@
++ ###############################################################
++ # 
++ # Copyright 2011 Red Hat, Inc. 
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ############################################################### 
++if (WANT_CONTRIB AND LINUX AND PROPER)
++    option(WITH_WSO2 "Compiling with support for WITH_WSO2" ON)
++endif()
++
++if (WITH_WSO2)
++
++	# need to embed libDir in axis2.xml
++	if ( ${SYS_ARCH} STREQUAL "X86_64" )
++		set (WS02_LIB_ROOT "/usr/lib64")
++	else()
++		set (WS02_LIB_ROOT "/usr/lib")
++	endif ()
++
++	if ( NOT PROPER )
++
++		set ( WSO2_VER wso2-2.0.1 )
++
++		#ExternalProject_Add(zlib
++		#		    PREFIX ${EXTERNAL_BUILD_PREFIX}/${WSO2_VER}
++		#		    #-- Download Step ----------
++		#			DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${WSO2_VER}.tar.gz ${CMD_TERM}
++		#		    DOWNLOAD_DIR ${EXTERNAL_DL}
++		#		    URL http://parrot.cs.wisc.edu/externals/${WSO2_VER}.tar.gz
++		#		    #--Configure step ----------
++		#		    CONFIGURE_COMMAND cd ${WSO2_VER} && ./configure --prefix=${EXTERNAL_STAGE}
++		#		    #--Build Step ----------
++		#		    BUILD_COMMAND cd ${WSO2_VER} && make
++		#		    #--install Step ----------
++		#		    INSTALL_DIR ${EXTERNAL_STAGE}
++		#		    INSTALL_COMMAND cd ${WSO2_VER} && make install )
++		#
++		# Set the target dependencies which the rest of condor depends on.
++		#set(WSO2_FOUND "${EXTERNAL_STAGE}/STUFF?")
++		#append_var(CONDOR_EXTERNALS zlib)
++		#
++		#install ( FILES ${EXTERNAL_STAGE}/lib/libz.a DESTINATION ${C_LIB} RENAME libcondor_z.a)
++
++		
++		#########################################################
++		#### import from pmackinn's stuff.
++		#if ( NOT DEFINED ENV{WSFCPP_HOME} )
++		#	message( FATAL_ERROR "WSFCPP_HOME not defined for non-proper build")
++		#endif ()
++		#
++		#set ( AXIS2_LIBS -L$ENV{WSFCPP_HOME}/lib
++		#	-libaxis2_engine
++		#	-laxutil -laxis2_axiom -laxis2_parser
++		#	-lneethi -lguththila
++		#	-laxis2_http_common -laxis2_http_receiver -laxis2_http_sender
++		#	-lwso2_wsf )
++		#
++		#include_directories(
++		#		$ENV{WSFCPP_HOME}/include/axis2-1.6.0
++		#		$ENV{WSFCPP_HOME}/include/wso2-wsf-cpp
++		#		$ENV{WSFCPP_HOME}/include/axis2-1.6.0/platforms )
++		#	set(axis2_repo_loc $ENV{WSFCPP_HOME})
++	else( )
++
++		find_multiple( "axis2_engine;axutil;axis2_axiom;axis2_parser;axis2_http_common;axis2_http_receiver;axis2_http_sender;neethi;guththila;wso2_wsf" WSO2_FOUND )
++		append_var (WSO2_INCLUDES "/usr/include/axis2-1.6.0;/usr/include/wso2-wsf-cpp;/usr/include/axis2-1.6.0/platforms")
++
++		install (CODE "execute_process(COMMAND echo Local testing instructions )" )
++		install (CODE "execute_process(COMMAND echo set WSFCPP_HOME to \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}axis2.xml)" )
++		install (CODE "execute_process(COMMAND echo change the servicesDir parameter in axis2.xml to \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}services)" )
++
++	endif( NOT PROPER )
++
++endif(WITH_WSO2)
++
++if (WSO2_FOUND)
++	message (STATUS "external configured (WSO2_FOUND=${WSO2_FOUND})")
++	set( WSO2_FOUND ${WSO2_FOUND} PARENT_SCOPE )
++	set( HAVE_EXT_WSO2 ON PARENT_SCOPE )
++	set( WS02_LIB_ROOT ${WS02_LIB_ROOT} PARENT_SCOPE )
++else()
++	message (STATUS "external skipped (wso2)")
++endif()
+diff --git a/externals/bundles/zlib/1.2.3/CMakeLists.txt b/externals/bundles/zlib/1.2.3/CMakeLists.txt
+index 5ffbda3..f473706 100644
+--- a/externals/bundles/zlib/1.2.3/CMakeLists.txt
++++ b/externals/bundles/zlib/1.2.3/CMakeLists.txt
+@@ -23,28 +23,27 @@ if (WITH_ZLIB)
+ 
+ 	if ( NOT PROPER )
+ 
+-		set (ZLIB_VER zlib-1.2.3)
++		condor_pre_external( ZLIB  zlib-1.2.3 "lib;include" "lib/libz.a")
+ 
+ 		ExternalProject_Add(zlib
+-				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${ZLIB_VER}
+ 				    #-- Download Step ----------
+ 					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${ZLIB_VER}.tar.gz ${CMD_TERM}
+-				    DOWNLOAD_DIR ${EXTERNAL_DL}
++				    DOWNLOAD_DIR ${ZLIB_STAGE}/dl
+ 				    URL http://parrot.cs.wisc.edu/externals/${ZLIB_VER}.tar.gz
+ 				    #--Configure step ----------
+-				    CONFIGURE_COMMAND cd ${ZLIB_VER} && ./configure --prefix=${EXTERNAL_STAGE}
++				    CONFIGURE_COMMAND cd ${ZLIB_VER} && ./configure --prefix=${ZLIB_INSTALL_LOC}
+ 				    #--Build Step ----------
+ 				    BUILD_COMMAND cd ${ZLIB_VER} && make
+ 				    BUILD_IN_SOURCE 1
+ 				    #--install Step ----------
+-				    INSTALL_DIR ${EXTERNAL_STAGE}
++				    INSTALL_DIR ${ZLIB_INSTALL_LOC}
+ 				    INSTALL_COMMAND cd ${ZLIB_VER} && make install )
+ 
+ 		# Set the target dependencies which the rest of condor depends on.
+-		set(ZLIB_FOUND "${EXTERNAL_STAGE}/lib/libz.a")
+-		append_var(CONDOR_EXTERNALS zlib)
++		set(ZLIB_FOUND "${ZLIB_INSTALL_LOC}/lib/libz.a")
++		condor_post_external( zlib include OFF )
+ 
+-		install ( FILES ${EXTERNAL_STAGE}/lib/libz.a DESTINATION ${C_LIB} RENAME libcondor_z.a)
++		install ( FILES "${ZLIB_INSTALL_LOC}/lib/libz.a" DESTINATION ${C_LIB} RENAME libcondor_z.a)
+ 
+ 	else( NOT PROPER )
+ 
+diff --git a/msconfig/set_build_env.bat b/msconfig/set_build_env.bat
+index 3ce64a3..cb66c05 100644
+--- a/msconfig/set_build_env.bat
++++ b/msconfig/set_build_env.bat
+@@ -41,46 +41,86 @@ REM   user's environments by the default compiler install.)
+ REM
+ REM
+ 
+-REM assume that this file is in the msconfig subfolder of the condor
+-REM sources or that MSCONFIG_TOOLS_DIR is set.
++:: check to see if MSCONFIG_TOOLS_DIR is set, if it is not set assume that it
++:: is where this file is. also strip off an trailing \ from the path.
++::
+ if "~%MSCONFIG_TOOLS_DIR%"=="~" set MSCONFIG_TOOLS_DIR=%~sdp0
+ if "~%MSCONFIG_TOOLS_DIR:~-1%"=="~\" Set MSCONFIG_TOOLS_DIR=%MSCONFIG_TOOLS_DIR:~0,-1%
+-if not exist %MSCONFIG_TOOLS_DIR%\license.rtf echo MSCONFIG_TOOLS_DIR is not valid!
++if not exist %MSCONFIG_TOOLS_DIR%\license.rtf (
++   echo MSCONFIG_TOOLS_DIR is not valid!
++)
+ 
+-REM cmake should be in the path, or CMAKE_BIN_DIR must be set,
+-REM we don't want CMAKE_BIN_DIR to have a trailing slash.
++:: set CMAKE_BIN_DIR if it is not already set, look first in the path then
++:: in the registry and finally both of those fail just set it to C:\tools\cmake
++::
+ if "~%CMAKE_BIN_DIR%"=="~" for %%I in (cmake.exe) DO Set CMAKE_BIN_DIR=%%~sdp$PATH:I
++if "~%CMAKE_BIN_DIR%"=="~" (
++   @echo Searching for CMake.exe...
++   for /F "tokens=1,2*" %%I in ('reg query "HKLM\SOFTWARE" /k /f "CMake*" /ve /s') do (
++      if "%%I"=="(Default)" (
++         if "%%J"=="REG_SZ" (
++            set CMAKE_BIN_DIR=%%K\bin
++            @echo found CMake in the registry at %%K
++         )
++      )
++   )
++)
+ if "~%CMAKE_BIN_DIR%"=="~" set CMAKE_BIN_DIR=c:\Tools\CMake\bin
++
++:: we don't want CMAKE_BIN_DIR to have a trailing slash.
++::
+ if "~%CMAKE_BIN_DIR:~-1%"=="~\" Set CMAKE_BIN_DIR=%CMAKE_BIN_DIR:~0,-1%
+ echo CMAKE_BIN_DIR=%CMAKE_BIN_DIR%
+-if not exist %CMAKE_BIN_DIR%\cmake.exe echo CMake is not in CMAKE_BIN_DIR!
++if not exist %CMAKE_BIN_DIR%\cmake.exe (
++  echo can't find CMake.exe, please set CMAKE_BIN_DIR to the path to it.
++)
+ 
+-REM WiX should be in the path or WIX_BIN_DIR must be set
++:: find ActivePerl bin dir
++::
++:: set PERL_BIN_DIR=%SystemDrive%\Perl\bin
++if "~%PERL_BIN_DIR%"=="~" for %%I in (perl.exe) DO Set PERL_BIN_DIR=%%~sdp$PATH:I
++if "~%PERL_BIN_DIR%"=="~" (
++   @echo Searching for Perl.exe...
++   for /F "tokens=1,2*" %%I in ('reg query "HKLM\Software" /f "Perl.exe"') do (
++      if "%%I"=="BinDir" (
++         set PERL_BIN_DIR=%%~sfK
++      )
++   )
++)
++if "~%PERL_BIN_DIR:~-1%"=="~\" Set PERL_BIN_DIR=%PERL_BIN_DIR:~0,-1%
++echo PERL_BIN_DIR=%PERL_BIN_DIR%
++if not exist %PERL_BIN_DIR%\perl.exe echo could not find ActiveState Perl.exe, this is needed to build Condor
++
++:: WiX should be in the path or WIX_BIN_DIR must be set
++::
+ if "~%WIX_BIN_DIR%"=="~" for %%I in (wix.dll) DO Set WIX_BIN_DIR=%%~sdp$PATH:I
+ if "~%WIX_BIN_DIR%"=="~" set WIX_BIN_DIR=c:\Tools\WiX\bin
+ if "~%WIX_BIN_DIR:~-1%"=="~\" Set WIX_BIN_DIR=%WIX_BIN_DIR:~0,-1%
+ echo WIX_BIN_DIR=%WIX_BIN_DIR%
+-if not exist %WIX_BIN_DIR%\wix.dll echo Wix is not in WIX_BIN_DIR!
++if not exist %WIX_BIN_DIR%\wix.dll echo could not find WiX binaries which are needed to create the Installer
+ 
+-REM need the 7zip path also
++:: need the 7zip path also
++::
+ if "~%ZIP_BIN_DIR%"=="~" for %%I in (7z.exe) do set ZIP_BIN_DIR=%%~sdp$PATH:I
+ if "~%ZIP_BIN_DIR%"=="~" set ZIP_BIN_DIR=c:\Tools\7-zip
+ if "~%ZIP_BIN_DIR:~-1%"=="~\" Set ZIP_BIN_DIR=%ZIP_BIN_DIR:~0,-1%
+ echo ZIP_BIN_DIR=%ZIP_BIN_DIR%
+-if not exist %ZIP_BIN_DIR%\7z.exe echo 7z.exe is not in ZIP_BIN_DIR!
++if not exist %ZIP_BIN_DIR%\7z.exe echo could not find 7z.exe, this is needed to PACKAGE condor
+ 
+-REM setup GIT_BIN_DIR if we can find git
+-REM
++:: setup GIT_BIN_DIR if we can find git. this isn't needed to build condor
++:: but it is needed to do condor development.
++::
+ if "~%GIT_BIN_DIR%"=="~" for %%I in (git.exe) Do Set GIT_BIN_DIR=%%~sdp$PATH:I
+ if "~%GIT_BIN_DIR%"=="~" set GIT_BIN_DIR=c:\Tools\Git\bin
+ if "~%GIT_BIN_DIR:~-1%"=="~\" Set GIT_BIN_DIR=%GIT_BIN_DIR:~0,-1%
+ echo GIT_BIN_DIR=%GIT_BIN_DIR%
+-if not exist %GIT_BIN_DIR%\git.exe echo Git.exe is not in GIT_BIN_DIR!
++if not exist %GIT_BIN_DIR%\git.exe echo could not find Git.exe, (but it is not needed to build condor)
+ 
+-REM set USER_TOOLS_DIR to point to c:\tools if it exists and doesn't
+-REM already point to something.
++:: set USER_TOOLS_DIR if it isn't already set.  we point it at c:\tools if
++:: that directory exists.
++::
+ if "~%USER_TOOLS_DIR%"=="~" (
+-  if exist c:\Tools\NUL set USER_TOOLS_DIR=C:\Tools
++REM if exist c:\Tools\NUL set USER_TOOLS_DIR=C:\Tools
+ )
+ echo USER_TOOLS_DIR=%USER_TOOLS_DIR%
+ 
+@@ -92,10 +132,14 @@ REM I'll harden it further if there is a requirement for it.)
+ set PROGRAMS_DIR=%ProgramFiles%
+ if not "~%ProgramFiles(x86)%"=="~" set PROGRAMS_DIR=%SystemDrive%\PROGRA~2
+ 
+-
++:: If Visual Studio 2008 is installed, then VS90COMNTOOLS should be defined
++:: we can use that to setup the compiler environment. if it's not set
++:: then all we can do is choose default values for environment variables.
++::
+ if "~%VS90COMNTOOLS%"=="~" goto use_default_paths
+-REM don't guess about paths, derive them from available from VS90COMNTOOLS 
+-REM
++
++:: derive from VS90COMNTOOLS
++::
+ for /D %%I in ("%VS90COMNTOOLS%..") do set VS90ROOT=%%~sdpI
+ set VS_DIR=%VS90ROOT:~0,-1%
+ set VC_DIR=%VS_DIR%\VC
+@@ -103,18 +147,27 @@ set VC_BIN=%VC_DIR%\bin
+ set DBG_TOOLS_DIR=%ProgramFiles%\Debugging Tools for Windows (x86);%ProgramFiles%\Debugging Tools for Windows (x64)
+ set DOTNET_DIRS=%SystemRoot%\Microsoft.NET\Framework\v3.5;%SystemRoot%\Microsoft.NET\Framework\v2.0.50727
+ 
+-if "~%SDK_DIR%"=="~"  set SDK_DIR=%SystemDrive%\PROGRA~1\MICROS~3\Windows\v7.0
+-rem if "~%SDK_DIR%"=="~"  set SDK_DIR=%SystemDrive%\Win2003Sdk
+-if "~%PERL_BIN_DIR%"=="~" set PERL_BIN_DIR=%SystemDrive%\Perl\bin
++:: find the latest windows SDK dir
++::
++::set SDK_DIR=%SystemDrive%\PROGRA~1\MICROS~3\Windows\v7.0
++if "~%SDK_DIR%"=="~" (
++   for /F "tokens=1,2*" %%I in ('reg query "HKLM\Software\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') do (
++      if "%%I"=="CurrentInstallFolder" (
++         set SDK_DIR=%%~sfK
++      )
++   )
++)
++if "~%SDK_DIR:~-1%"=="~\" Set SDK_DIR=%SDK_DIR:~0,-1%
++
++
+ goto got_paths
+ 
+ 
+-REM don't have VS90COMNTOOLS defined, so we will have to assume default
+-REM installation paths
+-REM
++:: don't have VS90COMNTOOLS defined, so we will have to assume default
++:: installation paths for compiler
++::
+ :use_default_paths
+-
+-REM Set paths to Visual C++, the Platform SDKs, and Perl
++:: Set default paths for Visual C++, the Platform SDKs, and Perl
+ set VS_DIR=%PROGRAMS_DIR%\Microsoft Visual Studio 9.0
+ set VC_DIR=%VS_DIR%\VC
+ set VC_BIN=%VC_DIR%\bin
+@@ -156,10 +209,25 @@ set LIB=%LIB%;%VC_DIR%\atlmfc\lib
+ if NOT "~%SDK_DIR%"=="~" set LIB=%LIB%;%SDK_DIR%\lib
+ 
+ REM Dump the Windows build environment at this point
+-REM echo ----------------------- WIN ENV DUMP ----------------------
+- at echo PATH=%PATH%
+- at echo INCLUDE=%INCLUDE%
+- at echo LIB=%LIB%
+-REM echo ----------------------- WIN ENV DUMP ----------------------
++REM echo ----------------------- BUILD ENV ----------------------
++setlocal
++ at echo PATH is
++set _remain_=%PATH%
++call :listenv
++ at echo INCLUDE is
++set _remain_=%INCLUDE%
++call :listenv
++ at echo LIB is
++set _remain_=%LIB%
++call :listenv
++REM echo --------------------------------------------------------
+ 
+ exit /B 0
++
++:listenv
++if "~%_remain_%"=="~" goto :EOF
++for /F "delims=; tokens=1,*" %%I in ("%_remain_%") do (
++   set _remain_=%%J
++   echo.   %%I
++)
++goto listenv
+diff --git a/nmi_tools/continuous/README b/nmi_tools/continuous/README
+new file mode 100644
+index 0000000..5f135da
+--- /dev/null
++++ b/nmi_tools/continuous/README
+@@ -0,0 +1,5 @@
++To add a new platform for a continuous run edit run.sh and submit and replace "PLATFORM" with 
++the platform you wish to add (use the NMI platform string, e.g. x86_64_rhap_5).
++
++Currently these are put in /home/cndrauto/continuous on nmi-s006.
++They are submitted to Condor (as Condor-Cron jobs)
+diff --git a/nmi_tools/continuous/run.sh b/nmi_tools/continuous/run.sh
+new file mode 100755
+index 0000000..ac752cb
+--- /dev/null
++++ b/nmi_tools/continuous/run.sh
+@@ -0,0 +1,26 @@
++#!/bin/sh
++
++GITDIR=/space/git/CONDOR_SRC.git
++export GITDIR
++
++PATH=/prereq/bin:$PATH
++
++cd /home/cndrauto/continuous/PLATFORM
++
++set -x
++exec > run.sh.out
++exec 2>&1 
++
++git --git-dir=$GITDIR fetch
++git --git-dir=/space/git/CONDOR_EXT.git fetch
++git --git-dir=/space/git/CONDOR_DOC.git fetch
++
++sha1=`git --git-dir=$GITDIR log --pretty=oneline -n 1 origin/master | awk '{print $1}'`
++
++git --git-dir=$GITDIR archive origin/master nmi_tools | tar xf - nmi_tools
++
++./nmi_tools/condor_nmi_submit --notify=condor-builds at cs.wisc.edu --build --git --tag=origin/master --module=FOO --use-externals-cache --desc="Continuous Build - PLATFORM" --platforms="PLATFORM"  --notify-fail-only --sha1=$sha1 > condor_nmi_submit.out
++
++runid=`awk '/^Run ID:/ {print $3}' condor_nmi_submit.out`
++echo "$runid	$sha1" >> runs.out
++exit 0
+diff --git a/nmi_tools/continuous/submit b/nmi_tools/continuous/submit
+new file mode 100644
+index 0000000..a034a16
+--- /dev/null
++++ b/nmi_tools/continuous/submit
+@@ -0,0 +1,27 @@
++universe = local
++
++BASE=/home/cndrauto/continuous/PLATFORM
++
++executable = $(BASE)/run.sh
++
++output = $(BASE)/output
++error  = $(BASE)/error
++log    = $(BASE)/log
++
++# This isn't necessary to work properly, it is just in place to make
++# the condor_q command easily show which job is for which platform.
++Args = PLATFORM
++
++CronHour    = 1,4,7,9,10,11,12,13,14,15,16,17,18,19
++CronMinute  = 30
++CronDayOfMonth  = *
++CronMonth       = *
++CronDayOfWeek   = *
++
++notification = never
++getenv = true
++
++CronPrepTime = 6
++deferral_window = 300
++on_exit_remove = false
++queue
+diff --git a/nmi_tools/glue/SubmitInfo.pm b/nmi_tools/glue/SubmitInfo.pm
+index 62a03f8..05e0946 100755
+--- a/nmi_tools/glue/SubmitInfo.pm
++++ b/nmi_tools/glue/SubmitInfo.pm
+@@ -33,16 +33,17 @@ package SubmitInfo;
+ # With nmi_condor_submit, one can request a build/test set to submit.
+ ###############################################################################
+ 
+-# The sets of ports we know about nativly in the glue script.
++# The sets of ports we know about natively in the glue script.
+ our %build_and_test_sets = (
+ 	# The ports we officially support and for which we provide native binaries
+ 	# on our download site.
+ 	# If you don't specify what platforms you'd like built, then this is the
+ 	# list to which we default.
+-
++	
+ 	# NOTE: Keep the stable or developer release branches synchronized with
+ 	# https://condor-wiki.cs.wisc.edu/index.cgi/wiki?p=DeveloperReleasePlan
+ 	'official_ports' => [
++		'x86_64_deb_6.0-updated', # this will switch to non-updated when NMI has that platform
+ 		'x86_64_deb_5.0',
+ 		'x86_64_rhap_5',
+ 		'x86_64_rhas_3',
+@@ -52,29 +53,35 @@ our %build_and_test_sets = (
+ 		'x86_rhas_3',
+ 		'x86_winnt_5.1',
+ 	],
+-
+-	# Occasionally, NMI would like a port on a bunch of odd platforms. These
+-	# are those platforms.
++	
++	# NMI will need builds on a set of platforms that we do not provide in our
++	# core builds.	These are those platforms.
+ 	'nmi_one_offs' => [
++		'x86_64_sol_5.10',
++		'x86_64_sol_5.11',
++		'x86_freebsd_7.4',
++		'x86_64_freebsd_8.2',
++	],
++	
++	# We will build on a set of machines that we want to be sure continue building
++	# but we do not release them so they are not included in the 'official ports' 
++	# section above.  Platforms in this list include things like the latest Fedora
++	# release - a build problem on this platform could indicate problems on a future
++	# release of RHEL.
++	'extra_builds' => [
+ 		'x86_64_rhap_5.3-updated',
++		'x86_64_fedora_14-updated',
+ 		'x86_64_opensuse_11.3-updated',
+ 		'x86_64_opensuse_11.4-updated',
+-		'x86_64_sol_5.10',
+-		'x86_64_sol_5.11',
+-		'x86_64_fedora_12-updated',
+ 	],
+-
+-        # This is a placeholder that is intended to remain empty in V7_6-branch.
+-        # It is populated in the master.
+-        'extra_builds' => [],
+-
++	
+ 	'stduniv' => [
+ 		'x86_64_deb_5.0',
+ 		'x86_64_rhap_5',
+ 		'x86_64_rhas_3',
+ 		'x86_deb_5.0',
+ 	],
+-);
++	);
+ 
+ ###############################################################################
+ # For every build, test, and cross test, of condor everywhere,
+@@ -90,7 +97,7 @@ my @default_prereqs = (
+ 	'bison-1.25',
+ 	'wget-1.9.1',
+ 	'm4-1.4.1',
+-);
++	);
+ 
+ ###############################################################################
+ # Minimal build configuration
+@@ -103,29 +110,29 @@ my @default_prereqs = (
+ ###############################################################################
+ my @minimal_build_configure_args =
+ 	(
+-		'-DPROPER:BOOL=OFF'			=> undef,
+-        '-D_VERBOSE:BOOL=ON'         => undef,
+-		'-DCLIPPED:BOOL=ON'			=> undef,
+-		'-DWITH_BLAHP:BOOL=OFF'		=> undef,
+-		'-DWITH_BOOST:BOOL=OFF'		=> undef,
+-		'-DWITH_COREDUMPER:BOOL=OFF'	=> undef,
+-		'-DWITH_CREAM:BOOL=OFF'		=> undef,
+-		'-DWITH_DRMAA:BOOL=OFF'		=> undef,
+-		'-DWITH_EXPAT:BOOL=OFF'		=> undef,
+-		'-DWITH_GCB:BOOL=OFF'		=> undef,
+-		'-DWITH_GLOBUS:BOOL=OFF' 	=> undef,
+-		'-DWITH_GSOAP:BOOL=OFF'		=> undef,
+-		'-DWITH_HADOOP:BOOL=OFF'	=> undef,
+-		'-DWITH_KRB5:BOOL=OFF'		=> undef,
+-		'-DWITH_LIBDELTACLOUD:BOOL=OFF'	=> undef,
+-		'-DWITH_LIBVIRT:BOOL=OFF'		=> undef,
+-		'-DWITH_LIBXML2:BOOL=OFF'		=> undef,
+-		'-DWITH_UNICOREGAHP:BOOL=OFF'	=> undef,
+-		'-DWITH_VOMS:BOOL=OFF'		=> undef,
++	 '-DPROPER:BOOL'			 => 'OFF',
++	 '-D_VERBOSE:BOOL'			  => 'ON',
++	 '-DCLIPPED:BOOL'			  => 'ON',
++	 '-DWITH_BLAHP:BOOL'		 => 'OFF',
++	 '-DWITH_BOOST:BOOL'		 => 'OFF',
++	 '-DWITH_COREDUMPER:BOOL'	 => 'OFF',
++	 '-DWITH_CREAM:BOOL'		 => 'OFF',
++	 '-DWITH_DRMAA:BOOL'		 => 'OFF',
++	 '-DWITH_EXPAT:BOOL'		 => 'OFF',
++	 '-DWITH_GCB:BOOL'			 => 'OFF',
++	 '-DWITH_GLOBUS:BOOL'		 => 'OFF',
++	 '-DWITH_GSOAP:BOOL'		 => 'OFF',
++	 '-DWITH_HADOOP:BOOL'		 => 'OFF',
++	 '-DWITH_KRB5:BOOL'			 => 'OFF',
++	 '-DWITH_LIBDELTACLOUD:BOOL' => 'OFF',
++	 '-DWITH_LIBVIRT:BOOL'		 => 'OFF',
++	 '-DWITH_LIBXML2:BOOL'		 => 'OFF',
++	 '-DWITH_UNICOREGAHP:BOOL'	 => 'OFF',
++	 '-DWITH_VOMS:BOOL'			 => 'OFF',
+ 	);
+ 
+ ###############################################################################
+-# Default List of Tests to Run.
++# DEFAULT List of Tests to Run.
+ #
+ # This specifies the test suite testclasses (more than one if you'd like)
+ # which are run by default for any test. The default of 'quick' means the
+@@ -141,7 +148,7 @@ my @default_testclass = ( 'quick' );
+ ###############################################################################
+ my @default_test_configure_args =
+ 	(
+-	'-DNOTHING_SPECIAL:BOOL=ON' => undef,
++	 '-DNOTHING_SPECIAL:BOOL' => 'ON',
+ 	);
+ 
+ ###############################################################################
+@@ -155,9 +162,9 @@ my @default_test_configure_args =
+ ###############################################################################
+ my @default_build_configure_args =
+ 	(
+-	'-DPROPER:BOOL=OFF' 	=> undef,
+-    '-D_VERBOSE:BOOL=ON'    => undef,
+-	#'-DSCRATCH_EXTERNALS:BOOL=ON'	=> undef,
++	 '-DPROPER:BOOL'	 => 'OFF',
++	 '-D_VERBOSE:BOOL'	 => 'ON',
++	 #'-DSCRATCH_EXTERNALS:BOOL' => 'ON',
+ 	);
+ 
+ ###############################################################################
+@@ -176,8 +183,8 @@ our %submit_info = (
+ 	# A good sample of stuff to add in case it doesn't work is:
+ 	# --with-arch=X86_64 \
+ 	# --with-os=LINUX \
+-	# --with-kernel=2.6.18-194.3.1.el5 \        
+-	# --with-os_version=LINUX_UNKNOWN \               
++	# --with-kernel=2.6.18-194.3.1.el5 \		
++	# --with-os_version=LINUX_UNKNOWN \				  
+ 	# --with-sysname=unknown \
+ 	# <the big pile of other arguments>
+ 	# 
+@@ -194,7 +201,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -202,7 +209,7 @@ our %submit_info = (
+ 	# Microsoft Windows 6.0/2000/xp/whatever on x86_64
+ 	# This probably doesn't work--glue scripts do funky things with it.
+ 	##########################################################################
+-	'x86_winnt_6.0'	=> {
++	'x86_winnt_6.0'		=> {
+ 		'build' => {
+ 			'configure_args' => { '-G \"Visual Studio 9 2008\"' => undef },
+ 			'prereqs'	=> undef,
+@@ -212,7 +219,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> undef,
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -230,7 +237,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> undef,
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -238,17 +245,20 @@ our %submit_info = (
+ 	# Microsoft Windows 5.1/2000/xp/whatever on x86
+ 	# the official "blessed" windows build configuration
+ 	##########################################################################
+-	'x86_winnt_5.1'	=> {
++	'x86_winnt_5.1'		=> {
+ 		'build' => {
+ 			'configure_args' => { '-G \"Visual Studio 9 2008\"' => undef },
+-			'prereqs'	=> undef,
+-			'xtests'	=> undef,
++			'prereqs'	=> [
++				'cmake-2.8.3', '7-Zip-9.20', 'ActivePerl-5.10.1',
++				'VisualStudio-9.0', 'WindowsSDK-6.1',
++				],
++				'xtests'		=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> undef,
+-			'testclass'	=> [ @default_testclass ],
++			'prereqs'	=> [ ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 	
+@@ -256,81 +266,139 @@ our %submit_info = (
+ 	# Microsoft Windows 5.1/2000/xp/whatever on x86
+ 	# CMake build testing configuration
+ 	##########################################################################
+-	'x86_winnt_5.1-tst'	=> {
++	'x86_winnt_5.1-tst' => {
+ 		'build' => {
+ 			'configure_args' => { '-G \"Visual Studio 9 2008\"' => undef },
+ 			'prereqs'	=> undef,
+ 			# when it works add x86_64_winnt_5.1 to the x_tests
+-			'xtests'	=> undef,
++			'xtests'	=> [ "x86_winnt_5.1", "x86_64_winnt_5.1", "x86_winnt_6.0" ],
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> undef,
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Microsoft Windows 5.1/2000/xp/whatever on x86
+-	# prereqs testing configuration (also cmake)
++	# Platform Debian 5.0 on x86_64
+ 	##########################################################################
+-	'x86_winnt_5.1'	=> {
++	'x86_64_deb_5.0'	=> {
+ 		'build' => {
+-			'configure_args' => { '-G \"Visual Studio 9 2008\"' => undef },
+-			'prereqs'	=> [
+-				'cmake-2.8.3', '7-Zip-9.20', 'ActivePerl-5.10.1',
+-				'VisualStudio-9.0', 'WindowsSDK-6.1',
+-			],
++			'configure_args' => { @default_build_configure_args,
++								  '-DCLIPPED:BOOL' => 'OFF',
++			},
++			'prereqs'	=> [ 'libtool-1.5.26', 'cmake-2.8.3' ],
++			'xtests'	=>	[ 'x86_64_ubuntu_10.04', ],
++		},
++
++		'test' => {
++			'configure_args' => { @default_test_configure_args },
++			'prereqs'	=> [ 'java-1.4.2_05' ],
++			'testclass' => [ @default_testclass ],
++		},
++	},
++
++
++	##########################################################################
++	# Platform Debian 6.0 on x86_64
++	# As of this writing there is no x86_64_deb-6.0 (non updated) machine in 
++	# the NMI pool.	 When they include one we should switch this from using
++	# the updated machine to the non-updated machine.
++	##########################################################################
++	'x86_64_deb_6.0-updated' => {
++		'build' => {
++			'configure_args' => { @default_build_configure_args,
++								  '-DCLIPPED:BOOL' => 'OFF',
++								  '-DWITH_KRB5:BOOL' => 'OFF',
++								  '-DWITH_CREAM:BOOL' => 'OFF',
++								  '-DWITH_COREDUMPER:BOOL'	=> 'OFF',
++			},
++			'prereqs'	=> [ 'cmake-2.8.3' ],
++			'xtests'	=>	[ 'x86_64_ubuntu_10.04', ],
++		},
++
++		'test' => {
++			'configure_args' => { @default_test_configure_args },
++			'prereqs'	=> [ 'java-1.4.2_05' ],
++			'testclass' => [ @default_testclass ],
++		},
++	},
++
++	##########################################################################
++	# platform RHEL 6 on x86
++	##########################################################################
++	'x86_rhap_6.0'	=> {
++		'build' => {
++			'configure_args' => { @default_build_configure_args,
++				# turn this back on when ready
++				# '-dclipped:bool=off' => undef,
++			 },
++			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> undef,
++			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
+ 			'testclass'	=> [ @default_testclass ],
+ 		},
+ 	},
+-	
++
+ 	##########################################################################
+-	# Platform Debian 5.0 on x86_64
++	# Platform RHEL 6 on x86. Unmanaged.
+ 	##########################################################################
+-	'x86_64_deb_5.0'	=> {
++	'x86_rhap_6.0-updated'	=> 'x86_rhap_6.0',
++
++	##########################################################################
++	# Platform RHEL 6 on x86_64
++	##########################################################################
++	'x86_64_rhap_6.0'	=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef,
++				# Turn this back on when ready
++				# '-DCLIPPED:BOOL=OFF' => undef,
+ 			 },
+-			'prereqs'	=> [ 'libtool-1.5.26', 'cmake-2.8.3' ],
+-			'xtests'	=>  [ 'x86_64_ubuntu_10.04', 'x86_64_ubuntu_8.04.3' ],
++			'prereqs'	=> [ @default_prereqs ],
++			'xtests'	=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> [ 'java-1.4.2_05' ],
++			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
+ 			'testclass'	=> [ @default_testclass ],
+ 		},
+ 	},
+ 
++	##########################################################################
++	# Platform RHEL 6 on x86_64. Unmanaged.
++	##########################################################################
++	'x86_64_rhap_6.0-updated'	=> 'x86_64_rhap_6.0',
+ 
+ 	##########################################################################
+ 	# Platform RHEL 5 on x86_64
+ 	##########################################################################
+-	'x86_64_rhap_5'	=> {
++	'x86_64_rhap_5'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef,
+-			 },
++								  '-DCLIPPED:BOOL' => 'OFF',
++			},
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> [ 
+-				'x86_64_fedora_13', 'x86_64_rhap_5.2',
+-				'x86_64_fedora_12', 'x86_64_fedora_12-updated', 
+-				'x86_64_fedora_13-updated' ],
++				'x86_64_fedora_14-updated',
++				'x86_64_fedora_13', 'x86_64_fedora_13-updated',
++				'x86_64_rhap_5.2', 'x86_64_rhap_5.3', 'x86_64_rhap_5.3-updated',
++				'x86_64_sl_5.5',
++				'x86_64_opensuse_11.3-updated', 'x86_64_opensuse_11.4-updated',
++				'x86_64_rhap_6.0-updated',
++				],
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -338,10 +406,11 @@ our %submit_info = (
+ 	##########################################################################
+ 	# Platform RHEL 3 on x86_64
+ 	##########################################################################
+-	'x86_64_rhas_3'	=> {
++	'x86_64_rhas_3'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef,
++								  '-DCLIPPED:BOOL' => 'OFF',
++								  '-DWITH_LIBCGROUP:BOOL' => 'OFF',
+ 			},
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> [
+@@ -352,26 +421,26 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05', 'perl-5.8.5',
+-							'VMware-server-1.0.7' ],
+-			'testclass'	=> [ @default_testclass ],
++							 'VMware-server-1.0.7' ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform Debian 5 on x86
+ 	##########################################################################
+-	'x86_deb_5.0'	=> {
++	'x86_deb_5.0'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef
+-			 },
+-			'prereqs'	=> [ 'libtool-1.5.26', 'cmake-2.8.3' ],
+-			'xtests'	=> undef,
++								  '-DCLIPPED:BOOL' => 'OFF',
++			},
++									  'prereqs' => [ 'libtool-1.5.26', 'cmake-2.8.3' ],
++									  'xtests'	=> [ 'x86_ubuntu_10.04', ],
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> [ 'java-1.4.2_05' ],
++			'prereqs'		=> [ 'java-1.4.2_05' ],
+ 			'testclass'	=> [ @default_testclass ],
+ 		},
+ 	},
+@@ -383,13 +452,13 @@ our %submit_info = (
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs,
+-				'coreutils-5.2.1',
+-				'libtool-1.5.26',],
++							 'coreutils-5.2.1',
++							 'libtool-1.5.26',],
+ 			'xtests'	=> [
+ 				'x86_64_macos_10.5-updated',
+ 				'x86_64_macos_10.6',
+ 				'x86_64_macos_10.6-updated',
+-			],
++				],
+ 		},
+ 
+ 		'test' => {
+@@ -398,8 +467,8 @@ our %submit_info = (
+ 				@default_prereqs, 
+ 				'java-1.4.2_12', 
+ 				'coreutils-5.2.1'
+-			],
+-			'testclass'	=> [ @default_testclass ],
++				],
++				'testclass'		=> [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -407,20 +476,20 @@ our %submit_info = (
+ 	# Platform Mac OSX 10.5 on x86_64
+ 	# condor actually builds naturally for this one, we just don't release it
+ 	##########################################################################
+-	'x86_64_macos_10.5'	=> {
++	'x86_64_macos_10.5' => {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args },
+ 			'prereqs'	=> [
+ 				@default_prereqs,
+ 				'libtool-1.5.26',
+-			],
+-			'xtests'	=> undef,
++				],
++				'xtests'		=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -428,81 +497,84 @@ our %submit_info = (
+ 	# Platform Mac OSX 10.5 on x86_64 with updates
+ 	# condor actually builds naturally for this one, we just don't release it
+ 	##########################################################################
+-	'x86_64_macos_10.5-updated'	=> 'x86_64_macos_10.5',
++	'x86_64_macos_10.5-updated' => 'x86_64_macos_10.5',
+ 
+ 
+ 	##########################################################################
+ 	# Platform Mac OSX 10.6 on x86_64
+ 	##########################################################################
+-	'x86_64_macos_10.6'	=> {
++	'x86_64_macos_10.6' => {
+ 		'build' => {
+ 			'configure_args' => {  @default_build_configure_args },
+ 			'prereqs'	=> [
+ 				@default_prereqs,
+ 				'libtool-1.5.26',
+-			],
+-			'xtests'	=> undef,
++				],
++				'xtests'		=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform Mac OSX 10.6 with updates on x86_64
+ 	##########################################################################
+-	'x86_64_macos_10.6-updated'	=> 'x86_64_macos_10.6',
++	'x86_64_macos_10.6-updated' => 'x86_64_macos_10.6',
+ 
+ 
+ 	##########################################################################
+ 	# Platform RHEL 5 on x86
+ 	##########################################################################
+-	'x86_rhap_5'	=> {
++	'x86_rhap_5'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef,
+-			 },
++								  '-DCLIPPED:BOOL' => 'OFF',
++			},
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> [ 
+ 				'x86_64_rhap_5.2',
++				'x86_64_rhap_5.3',
++				'x86_64_rhap_5.3-updated',
+ 				'unmanaged-x86_rhap_5'
+-			],
++				],
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05'],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform RHEL 3 on x86
+ 	##########################################################################
+-	'x86_rhas_3'	=> {
++	'x86_rhas_3'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args,
+-				'-DCLIPPED:BOOL=OFF' => undef,
+-			 },
++								  '-DCLIPPED:BOOL' => 'OFF',
++								  '-DWITH_LIBCGROUP:BOOL' => 'OFF',
++			},
+ 			'prereqs'	=> [ 
+ 				@default_prereqs,
+ 				'perl-5.8.5', 'gzip-1.3.3', 'autoconf-2.59'
+-			],
+-			'xtests'	=> [ 
+-			 	'x86_rhas_4', 
+-			 	'x86_64_rhas_3',
+-				'x86_64_rhas_4',
+-			],
++				],
++				'xtests'		=> [ 
++					'x86_rhas_4', 
++					'x86_64_rhas_3',
++					'x86_64_rhas_4',
++				],
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05', 'perl-5.8.5',
+-							'VMware-server-1.0.7' ],
+-			'testclass'	=> [ @default_testclass ],
++							 'VMware-server-1.0.7' ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -516,15 +588,11 @@ our %submit_info = (
+ 	# builds of Condor are as clipped as possible to ensure compilation.
+ 
+ 	##########################################################################
+-	# Platform Fedora 12 on x86_64
+-	# This might work.
++	# Platform Fedora 13 on x86_64
+ 	##########################################################################
+-	'x86_64_fedora_12'	=> {
++	'x86_64_fedora_13'	=> {
+ 		'build' => {
+-			'configure_args' => { @minimal_build_configure_args,
+-				'-DWITHOUT_SOAP_TEST:BOOL=ON' => undef,
+-				'-DWITHOUT_AMAZON_TEST:BOOL=ON' => undef,
+-			 },
++			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> undef,
+ 		},
+@@ -532,38 +600,35 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Platform Fedora 12 with updates on x86_64
+-	# This might work.
++	# Platform Fedora 13 with updates on x86_64
+ 	##########################################################################
+-	'x86_64_fedora_12-updated'	=> {
++	'x86_64_fedora_13-updated'	=> {
+ 		'build' => {
+-			'configure_args' => { @minimal_build_configure_args,
+-				'-DWITHOUT_SOAP_TEST:BOOL=ON' => undef,
+-				'-DWITHOUT_AMAZON_TEST:BOOL=ON' => undef,
+-			 },
++			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> undef,
+ 		},
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08', 'perl-5.8.9' ],
+-			'testclass'	=> [ @default_testclass ],
++			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08' ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Platform Fedora 13 on x86_64
+-	# This might work.
++	# Platform Fedora 14 on x86_64
+ 	##########################################################################
+-	'x86_64_fedora_13'	=> {
++	'x86_64_fedora_14'	=> {
+ 		'build' => {
+-			'configure_args' => { @minimal_build_configure_args },
++			'configure_args' => { @minimal_build_configure_args,
++								  '-DWITH_EXPAT:BOOL' => 'ON',
++			},
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> undef,
+ 		},
+@@ -571,17 +636,18 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Platform Fedora 13 with updates on x86_64
+-	# This might work.
++	# Platform Fedora 14 with updates on x86_64
+ 	##########################################################################
+-	'x86_64_fedora_13-updated'	=> {
++	'x86_64_fedora_14-updated'	=> {
+ 		'build' => {
+-			'configure_args' => { @minimal_build_configure_args },
++			'configure_args' => { @minimal_build_configure_args,
++								  '-DWITH_EXPAT:BOOL' => 'ON',
++			},
+ 			'prereqs'	=> [ @default_prereqs ],
+ 			'xtests'	=> undef,
+ 		},
+@@ -589,24 +655,24 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform Solaris 11 on x86_64
+-	# Building openssl is problematic on this platform.  There is
++	# Building openssl is problematic on this platform.	 There is
+ 	# some confusion betwen 64-bit and 32-bit, which causes linkage
+-	# problems.  Since ssh_to_job depends on openssl's base64 functions,
++	# problems.	 Since ssh_to_job depends on openssl's base64 functions,
+ 	# that is also disabled.
+ 	##########################################################################
+ 	'x86_64_sol_5.11'	=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args,
+-				'-DWITH_OPENSSL:BOOL=OFF' => undef,
+-				'-DWITH_CURL:BOOL=OFF' => undef,
+-				'-DHAVE_SSH_TO_JOB:BOOL=OFF' => undef,
+-				'-DWITHOUT_SOAP_TEST:BOOL=ON' => undef,
++								  '-DWITH_OPENSSL:BOOL' => 'OFF',
++								  '-DWITH_CURL:BOOL' => 'OFF',
++								  '-DHAVE_SSH_TO_JOB:BOOL' => 'OFF',
++								  '-DWITHOUT_SOAP_TEST:BOOL' => 'ON',
+ 			},
+ 			'prereqs'	=> [ @default_prereqs, 'perl-5.8.9', 'binutils-2.15',
+ 							 'gzip-1.3.3', 'wget-1.9.1', 'coreutils-6.9',
+@@ -618,24 +684,24 @@ our %submit_info = (
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'perl-5.8.9', 'binutils-2.15',
+ 							 'gzip-1.3.3', 'wget-1.9.1', 'coreutils-6.9' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform Solaris 10 on x86_64
+-	# Building openssl is problematic on this platform.  There is
++	# Building openssl is problematic on this platform.	 There is
+ 	# some confusion betwen 64-bit and 32-bit, which causes linkage
+-	# problems.  Since ssh_to_job depends on openssl's base64 functions,
++	# problems.	 Since ssh_to_job depends on openssl's base64 functions,
+ 	# that is also disabled.
+ 	##########################################################################
+ 	'x86_64_sol_5.10'	=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args,
+-				'-DWITH_OPENSSL:BOOL=OFF' => undef,
+-				'-DWITH_CURL:BOOL=OFF' => undef,
+-				'-DHAVE_SSH_TO_JOB:BOOL=OFF' => undef,
+-				'-DWITHOUT_SOAP_TEST:BOOL=ON' => undef,
++								  '-DWITH_OPENSSL:BOOL' => 'OFF',
++								  '-DWITH_CURL:BOOL' => 'OFF',
++								  '-DHAVE_SSH_TO_JOB:BOOL' => 'OFF',
++								  '-DWITHOUT_SOAP_TEST:BOOL' => 'ON',
+ 			},
+ 			'prereqs'	=> [ @default_prereqs, 'perl-5.8.9', 'binutils-2.21',
+ 							 'gzip-1.3.3', 'wget-1.9.1', 'coreutils-8.9',
+@@ -647,7 +713,7 @@ our %submit_info = (
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'perl-5.8.9', 'binutils-2.21',
+ 							 'gzip-1.3.3', 'wget-1.9.1', 'coreutils-8.9' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -655,7 +721,7 @@ our %submit_info = (
+ 	# Platform RHEL 5 on x86  (umanaged!)
+ 	# This might work.
+ 	##########################################################################
+-	'unmanaged-x86_rhap_5'	=> {
++	'unmanaged-x86_rhap_5'		=> {
+ 		'build' => {
+ 			'configure_args' => { @default_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+@@ -665,7 +731,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -684,7 +750,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -703,7 +769,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -722,7 +788,7 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+@@ -741,15 +807,34 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
++	# Platform SL 5.5 on X86_64
++	# I suspect this could be a real port if we bothered.
++	##########################################################################
++	'x86_64_sl_5.5' => {
++		'build' => {
++			'configure_args' => { @minimal_build_configure_args },
++			'prereqs'	=> [ @default_prereqs ],
++			'xtests'	=> undef,
++		},
++
++		'test' => {
++			'configure_args' => { @default_test_configure_args },
++			'prereqs'	=> [ @default_prereqs ],
++			'testclass' => [ @default_testclass ],
++		},
++	},
++
++
++	##########################################################################
+ 	# Platform RHEL 4 on X86_64
+ 	# This might work.
+ 	##########################################################################
+-	'x86_64_rhas_4'	=> {
++	'x86_64_rhas_4'		=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+@@ -759,14 +844,14 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.5.0_08', 'perl-5.8.9' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform SLES 9 on x86_64
+ 	##########################################################################
+-	'x86_64_sles_9'		=> {
++	'x86_64_sles_9'				=> {
+ 		'build' => {
+ 			'configure_args' =>{ @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'wget-1.9.1' ],
+@@ -779,15 +864,15 @@ our %submit_info = (
+ 				
+ 			},
+ 			'prereqs'	=> [ @default_prereqs, 'wget-1.9.1', 'java-1.4.2_05' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Platform Ubuntu 8.04.3 on x86_64
++	# Platform Ubuntu 10.04 on x86_64
+ 	# This might work.
+ 	##########################################################################
+-	'x86_64_ubuntu_8.04.3'	=> {
++	'x86_64_ubuntu_10.04'		=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+@@ -796,16 +881,15 @@ our %submit_info = (
+ 
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+-			'prereqs'	=> [ @default_prereqs , 'java-1.4.2_05' ],
+-			'testclass'	=> [ @default_testclass ],
++			'prereqs'	=> [ @default_prereqs ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+-	# Platform Ubuntu 10.04 on x86_64
+-	# This might work.
++	# Platform Ubuntu 10.04 on x86
+ 	##########################################################################
+-	'x86_64_ubuntu_10.04'	=> {
++	'x86_ubuntu_10.04' => {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+@@ -815,15 +899,14 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform RHEL 4 on x86
+-	# This might work.
+ 	##########################################################################
+-	'x86_rhas_4'	=> {
++	'x86_rhas_4'		=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args },
+ 			'prereqs'	=> [ @default_prereqs ],
+@@ -833,24 +916,65 @@ our %submit_info = (
+ 		'test' => {
+ 			'configure_args' => { @default_test_configure_args },
+ 			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05', 'perl-5.8.5' ],
+-			'testclass'	=> [ @default_testclass ],
++			'testclass' => [ @default_testclass ],
+ 		},
+ 	},
+ 
+ 	##########################################################################
+ 	# Platform openSUSE 11.3 on x86_64 (& updated)
+ 	##########################################################################
+-	'x86_64_opensuse_11.3'		=> {
++	'x86_64_opensuse_11.3'				=> {
++		'build' => {
++			'configure_args' => { @minimal_build_configure_args,
++								  '-DWITHOUT_SOAP_TEST:BOOL' => 'ON',
++								  '-DWITHOUT_AMAZON_TEST:BOOL' => 'ON',
++								  '-DWITH_CURL:BOOL' => 'ON',
++								  '-DWITH_EXPAT:BOOL' => 'ON',
++								  '-DWITH_LIBVIRT:BOOL' => 'ON',
++								  '-DWITH_LIBXML2:BOOL' => 'ON',
++			},
++			'prereqs'	=> [ @default_prereqs ],
++			'xtests'	=> undef,
++		},
++
++		'test' => {
++			'configure_args' => {
++				@default_test_configure_args
++					
++			},
++			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
++			'testclass' => [ @default_testclass ],
++		},
++	},
++	'x86_64_opensuse_11.3-updated'		=> 'x86_64_opensuse_11.3',
++	'x86_64_opensuse_11.4'				=> 'x86_64_opensuse_11.3',
++	'x86_64_opensuse_11.4-updated'		=> 'x86_64_opensuse_11.4',
++
++
++	##########################################################################
++	# Platform FreeBSD 7.4 on x86
++	##########################################################################
++	'x86_freebsd_7.4'		=> {
+ 		'build' => {
+ 			'configure_args' => { @minimal_build_configure_args,
+ 				'-DWITHOUT_SOAP_TEST:BOOL=ON' => undef,
+ 				'-DWITHOUT_AMAZON_TEST:BOOL=ON' => undef,
+-				'-DWITH_CURL:BOOL=ON' => undef,
++				'-DENABLE_JAVA_TESTS:BOOL=OFF' => undef,
++				'-DWITH_CURL:BOOL=OFF' => undef,
+ 				'-DWITH_EXPAT:BOOL=ON' => undef,
+-				'-DWITH_LIBVIRT:BOOL=ON' => undef,
++				'-DWITH_LIBVIRT:BOOL=OFF' => undef,
+ 				'-DWITH_LIBXML2:BOOL=ON' => undef,
+ 			},
+-			'prereqs'	=> [ @default_prereqs ],
++			'prereqs'	=> [ 'tar-1.14',
++							 'patch-2.6.1',
++							 'cmake-2.8.3',
++							 'flex-2.5.4a',
++							 'make-3.80',
++							 'byacc-1.9',
++							 'bison-1.25',
++							 'wget-1.9.1',
++							 'm4-1.4.1',
++				],
+ 			'xtests'	=> undef,
+ 		},
+ 
+@@ -859,13 +983,22 @@ our %submit_info = (
+ 				@default_test_configure_args
+ 				
+ 			},
+-			'prereqs'	=> [ @default_prereqs, 'java-1.4.2_05' ],
++			'prereqs'	=> [ 'tar-1.14',
++							 'patch-2.6.1',
++							 'cmake-2.8.3',
++							 'flex-2.5.4a',
++							 'make-3.80',
++							 'byacc-1.9',
++							 'bison-1.25',
++							 'wget-1.9.1',
++							 'm4-1.4.1',
++				],
+ 			'testclass'	=> [ @default_testclass ],
+ 		},
+ 	},
+-	'x86_64_opensuse_11.3-updated'		=> 'x86_64_opensuse_11.3',
+-	'x86_64_opensuse_11.4'				=> 'x86_64_opensuse_11.3',
+-	'x86_64_opensuse_11.4-updated'		=> 'x86_64_opensuse_11.4',
++	'x86_64_freebsd_7.4'		=> 'x86_freebsd_7.4',
++	'x86_freebsd_8.2'			=> 'x86_freebsd_7.4',
++	'x86_64_freebsd_8.2'		=> 'x86_freebsd_7.4',
+ );
+ 
+ while( 1 ) {
+@@ -879,7 +1012,7 @@ while( 1 ) {
+ 		if ( ! exists $submit_info{$target} ) {
+ 			die "No matching platform '$target' for alias '$platform'";
+ 		}
+-		if ( ref($submit_info{$target}) eq "HASH" )  {
++		if ( ref($submit_info{$target}) eq "HASH" )	 {
+ 			$submit_info{$platform} = $submit_info{$target};
+ 			$fixed++;
+ 		}
+@@ -901,49 +1034,54 @@ while( 1 ) {
+ # perl script if desired.
+ ###############################################################################
+ 
+-sub typecheck
+-{
++sub typecheck {
+ 	my $result = 1; # assume the typecheck passed.
+-	my $p;
+ 
+ 	print "Running typecheck of submit_info.conf:\n";
+ 
+ 	return $result;
+ 
+ 	# An example, much more could be done...
+-	foreach $p (sort keys %submit_info) {
++	foreach my $p (sort keys %submit_info) {
+ 		# ensure configure_args is present and defined
+-		if (!exists($submit_info{$p}{'configure_args'})) {
++		if (!exists($submit_info{$p}{build}{configure_args})) {
+ 			print "ERROR: Platform $p 'configure_args' not present\n";
+ 			$result = 0;
+ 		}
+ 		# ensure 'configure_args' is defined properly.
+-		if (!defined($submit_info{$p}{'configure_args'})) {
++		if (!defined($submit_info{$p}{build}{configure_args})) {
++			print "ERROR: Platform $p 'configure_args' not defined\n";
++			$result = 0;
++		}
++
++		# ensure configure_args is present and defined
++		if (!exists($submit_info{$p}{test}{configure_args})) {
++			print "ERROR: Platform $p 'configure_args' not present\n";
++			$result = 0;
++		}
++		# ensure 'configure_args' is defined properly.
++		if (!defined($submit_info{$p}{test}{configure_args})) {
+ 			print "ERROR: Platform $p 'configure_args' not defined\n";
+ 			$result = 0;
+ 		}
+ 	}
+ 
+-	# XXX Add that the prereqs must contain unique entries.
++	# TODO: Add that the prereqs must contain unique entries.
+ 
+ 	return $result;
+ }
+ 
+ # A simple thing explaining some statistics about submit_info. Mostly useful
+ # for grant work, I'm sure. :)
+-sub statistics
+-{
+-	my $nump;
+-	my $p;
+-
++sub statistics {
+ 	print "Statistics of submit_info:\n";
+ 
+-	$nump = scalar(keys(%submit_info));
++	my $nump = scalar(keys(%submit_info));
+ 
+ 	print "\tNumber of nmi platforms described: $nump\n";
+ 
+ 	#print "\tPlatforms:\n";
+-	#foreach $p (sort keys %submit_info) {
++	#foreach my $p (sort keys %submit_info) {
+ 	#	print "\t\t$p\n";
+ 	#}
+ };
+@@ -1049,16 +1187,15 @@ sub dump_info
+ 
+ # This function converts (and resonably escapes) an argument hash into an array
+ # usually used for hashes like 'configure_args'
+-sub args_to_array
+-{
++sub args_to_array {
+ 	my ($arg_ref) = (@_);
+-	my $k;
+ 	my @result;
+ 
+-	foreach $k (sort keys %{$arg_ref}) {
++	foreach my $k (sort keys %{$arg_ref}) {
+ 		if (defined($arg_ref->{$k})) {
+-			push @result, "$k='$arg_ref->{$k}'";
+-		} else {
++			push @result, "$k='" . $arg_ref->{$k} . "'";
++		}
++		else {
+ 			push @result, "$k";
+ 		}
+ 	}
+@@ -1077,16 +1214,16 @@ sub main
+ 			}
+ 			exit( 0 );
+ 		}
+-		elsif (  ( $arg eq "-a" ) or ( $arg eq "--all" ) ) {
++		elsif (	 ( $arg eq "-a" ) or ( $arg eq "--all" ) ) {
+ 			push( @platforms, "/.*/" );
+ 		}
+-		elsif (  ( $arg eq "-h" ) or ( $arg eq "--help" ) ) {
++		elsif (	 ( $arg eq "-h" ) or ( $arg eq "--help" ) ) {
+ 			print "$usage\n";
+-			print "  --help|-h:  This help\n";
+-			print "  --list|-l:  List available platforms\n";
+-			print "  --all|-a:   Dump info on all available platforms\n";
+-			print "  <platform>: Dump info named platform\n";
+-			print "  /<regex>/:  Dump info on all platforms matching <regex>\n";
++			print "	 --help|-h:	 This help\n";
++			print "	 --list|-l:	 List available platforms\n";
++			print "	 --all|-a:	 Dump info on all available platforms\n";
++			print "	 <platform>: Dump info named platform\n";
++			print "	 /<regex>/:	 Dump info on all platforms matching <regex>\n";
+ 			exit(0);
+ 		}
+ 		elsif ( $arg =~ /_/ or $arg =~ /^\// ) {
+@@ -1104,8 +1241,8 @@ sub main
+ 		}
+ 	}
+ 	if ( ! scalar(@platforms) ) {
+-			print "$usage\n";
+-			exit( 1 );
++		print "$usage\n";
++		exit( 1 );
+ 	}
+ 	$#ARGV = -1;
+ 
+@@ -1132,3 +1269,8 @@ if (!defined($main::slaved_module)) {
+ }
+ 
+ 1;
++
++### Local Variables: ***
++### mode:perl ***
++### tab-width: 4  ***
++### End: ***
+diff --git a/nmi_tools/glue/build/build.win.bat b/nmi_tools/glue/build/build.win.bat
+index 7e4d5f0..e92e625 100644
+--- a/nmi_tools/glue/build/build.win.bat
++++ b/nmi_tools/glue/build/build.win.bat
+@@ -1,5 +1,7 @@
++ at echo off
+ @echo CD=%CD%
+ @echo HOME=%HOME%
++ at echo CONDOR_BLD_EXTERNAL_STAGE=%CONDOR_BLD_EXTERNAL_STAGE%
+ @echo LIB=%LIB%
+ @echo INCLUDE=%INCLUDE%
+ @echo PATH=%PATH%
+@@ -23,10 +25,18 @@ set PERL_PATH=c:\perl\site\bin;c:\perl\bin
+ for /D %%I in ("c:\prereq\ActivePerl*") do set ACTIVE_PERL_DIR=%%~fI
+ if NOT "~%ACTIVE_PERL_DIR%"=="~" set PERL_PATH=%ACTIVE_PERL_DIR%\site\bin;%ACTIVE_PERL_DIR%\bin;%PERL_PATH%
+ 
+-set ZIP_PATH=%ProgramFiles%\7-Zip
++if "~%_NMI_PREREQ_7_Zip_ROOT%"=="~" (
++  set ZIP_PATH=%ProgramFiles%\7-Zip
++) else (
++  set ZIP_PATH=%_NMI_PREREQ_7_Zip_ROOT%
++)
+ set WIX_PATH=%WIX%
+ set MSCONFIG_TOOLS_DIR=%BUILD_ROOT%\msconfig
+-set CMAKE_BIN_DIR=%ProgramFiles%\CMake 2.8\bin
++if "~%_NMI_PREREQ_cmake_ROOT%"=="~" (
++   set CMAKE_BIN_DIR=%ProgramFiles%\CMake 2.8\bin
++) else (
++   set CMAKE_BIN_DIR=%_NMI_PREREQ_cmake_ROOT%\bin
++)
+ 
+ set PATH=%SystemRoot%\system32;%SystemRoot%;%PERL_PATH%;%MSCONFIG_TOOLS_DIR%;%VS_DIR%\Common7\IDE;%VC_BIN%;%CMAKE_BIN_DIR%;%ZIP_PATH%;%WIX_PATH%
+ @echo PATH=%PATH%
+diff --git a/nmi_tools/glue/build/remote_pre b/nmi_tools/glue/build/remote_pre
+index 4196663..0dd064d 100755
+--- a/nmi_tools/glue/build/remote_pre
++++ b/nmi_tools/glue/build/remote_pre
+@@ -49,6 +49,8 @@ $| = 1;
+ 
+ if ($ENV{NMI_PLATFORM} =~ /winnt/) {
+     $ENV{PATH} = "C:\\Program Files\\CMake 2.8\\bin;$ENV{VS90COMNTOOLS}..\\IDE;$ENV{VS90COMNTOOLS}..\\..\\VC\\BIN;$ENV{PATH}";
++    $externals_loc   = "c:/temp/condor";
++    $ENV{CONDOR_BLD_EXTERNAL_STAGE} = "$externals_loc";
+ } else {
+ 	$ENV{PATH} ="$ENV{PATH}:/sw/bin:/sw/sbin:/usr/kerberos/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/condor/bin:/usr/local/condor/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/ccs/bin:/usr/lib/java/bin";
+ }
+diff --git a/nmi_tools/glue/build/remote_task b/nmi_tools/glue/build/remote_task
+index 12fbf01..38efe78 100755
+--- a/nmi_tools/glue/build/remote_task
++++ b/nmi_tools/glue/build/remote_task
+@@ -72,7 +72,7 @@ print "Executing task '$taskname' on host '$hostname'\n";
+ if( $taskname eq $EXTERNALS_TASK ) {
+     # Since we do not declare the externals task on Windows, we don't have
+     # to handle invoking the Windows build tools in this step.
+-    $execstr = "make externals";
++    $execstr = "make VERBOSE=1 externals";
+ }
+ elsif ($taskname eq $UNSTRIPPED_TASK) {
+     $execstr = get_cmake_args();
+diff --git a/nmi_tools/glue/test/TestGlue.pm b/nmi_tools/glue/test/TestGlue.pm
+new file mode 100644
+index 0000000..8bd3837
+--- /dev/null
++++ b/nmi_tools/glue/test/TestGlue.pm
+@@ -0,0 +1,142 @@
++#!/usr/bin/env perl
++##**************************************************************
++##
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
++## University of Wisconsin-Madison, WI.
++## 
++## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++## 
++## Unless required by applicable law or agreed to in writing, software
++## distributed under the License is distributed on an "AS IS" BASIS,
++## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++## See the License for the specific language governing permissions and
++## limitations under the License.
++##
++##**************************************************************
++
++use strict;
++use warnings;
++use Cwd;
++use File::Spec;
++
++package TestGlue;
++
++
++sub print_debug_header {
++    my $cwd = Cwd::getcwd();
++    
++    print "----------- Debug Header ----------------\n";
++    print "Current host: " . `/bin/hostname -f`;
++    print "CWD: $cwd\n";
++    print "Perl path: $^X\n";
++    print "Perl version: $]\n";
++    dir_listing(".");
++    print "---------- End Debug Header --------------\n";
++}
++
++sub setup_test_environment {
++
++    my $base_dir = Cwd::getcwd();
++
++    if( not is_windows() ) {
++        set_env("BASE_DIR", $base_dir);
++        set_env("PATH", "$base_dir/nmi_tools/glue/test:$base_dir/condor/bin:$base_dir/condor/sbin:$ENV{PATH}");
++        set_env("CONDOR_CONFIG", "$base_dir/condor_tests/TestingPersonalCondor/condor_config");
++    }
++    else {
++        # Get the right slashes for Windows.  Apparently getcwd() returns forward slashes, even
++        # on Windows.
++        $base_dir =~ s|/|\\|g;
++        set_env("BASE_DIR", $base_dir);
++
++        # Create the Windows PATH
++        my $path = "$base_dir\\nmi_tools\\glue\\test;$base_dir\\condor\\bin;";
++
++        # We installed some tools (unzip, tar) in C:\tools on our Windows NMI machines
++        $path .= "C:\\tools;";
++
++        # We need to add Perl to the path
++        #$path .= "C:\\prereq\\ActivePerl-5.10.1\\bin;";
++
++        # Windows requires the SystemRoot directory to the PATH.  This is generally C:\Windows.
++        # Also, add the system32 subdirectory in this folder
++        #my $system_paths = "$ENV{SystemRoot};" . File::Spec->catdir($ENV{SystemRoot}, "system32");
++        #$path .= "$ENV{SystemRoot};";
++        #$path .= File::Spec->catdir($ENV{SystemRoot}, "system32") . ";";
++
++        set_env("PATH", "$ENV{PATH};$path");
++
++        # Condor will want Win32-style paths for CONDOR_CONFIG
++        set_env("CONDOR_CONFIG", "$base_dir\\condor_tests\\TestingPersonalCondor\\condor_config");
++        
++        # also, throw in the WIN32 version of the base directory path for later use
++        set_env("WIN32_BASE_DIR", $base_dir);
++
++        print "----------------------------------\n";
++        print "Dumping environment:\n";
++        system("set");
++        print "----------------------------------\n\n";
++    }
++}
++
++
++
++sub setup_task_environment {
++    set_env("GCBTARGET", "nmi-s006.cs.wisc.edu");
++}
++
++
++sub set_env {
++    my ($key, $val) = @_;;
++    print "Setting environment variable:\n";
++    print "\t$key -> '$val'\n";
++    $ENV{$key} = $val;
++}
++
++
++sub dir_listing {
++    my (@path) = @_;
++
++    my $path = File::Spec->catdir(@path);
++
++    # If we have a relative path then show the CWD
++    my $cwd = "";
++    if(not File::Spec->file_name_is_absolute($path)) {
++        $cwd = "(CWD: '" . Cwd::getcwd() . "')";
++    }
++    print "Showing directory contents of path '$path' $cwd\n";
++
++    # We have to check $^O because the platform_* scripts will be executed on a Linux
++    # submit node - but the nmi platform string will have winnt
++    if( is_windows() && $^O ne "linux" ) {
++        system("dir $path");
++    }
++    else {
++        system("ls -l $path");
++    }
++}
++
++
++sub which {
++    my ($exe) = @_;
++
++    if( is_windows() ) {
++        return system('for /F %I in ("' . $exe . '") do echo %~$PATH:I');
++    }
++    else {
++        return system("which $exe");
++    }
++}
++
++sub is_windows {
++    if( $ENV{NMI_PLATFORM} =~ /winnt/ ) {
++        return 1;
++    }
++    return 0;
++}
++
++1;
+diff --git a/nmi_tools/glue/test/platform_post b/nmi_tools/glue/test/platform_post
+index ff3eca5..af8b88e 100755
+--- a/nmi_tools/glue/test/platform_post
++++ b/nmi_tools/glue/test/platform_post
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -18,34 +18,38 @@
+ ##
+ ##**************************************************************
+ 
++use strict;
++use warnings;
++use File::Spec;
++use File::Basename;
++
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
+ 
+ ##################################################################
+-#We will be removing the platform app_input.tar.gz until NMI does
++# We will be removing the platform app_input.tar.gz until NMI does
+ ##################################################################
++# The reason for this section is unknown.  Todd Miller guessed that
++# it is here to save disk space.
++
++TestGlue::dir_listing("..", "..");
+ 
+-$appinput = "../../" . $ENV{NMI_PLATFORM} . "_app_input.tar.gz";
+-print "../.. has the following:\n";
+-system("ls -l ../..");
+-print "Looking to see is $appinput is around and removing\n";
+-system("rm -f $appinput");
++my $appinput = File::Spec->catfile("..", "..", "$ENV{NMI_PLATFORM}_app_input.tar.gz");
++if(-e $appinput) {
++    print "File '$appinput' exists.  Removing it.\n";
++    unlink($appinput);
++}
++else {
++    print "File '$appinput' does not exist.\n";
++}
+ 
+ ##################################################################
+ # We do not need to hang on to the source tarball
+ ##################################################################
+ 
+-#my $vers_file = "CONDOR-VERSION";
+-#print "Finding version of Condor\n";
+-#open( VERS, "$vers_file" ) || die "Can't open $vers_file: $!\n";
+-#while( <VERS> ) {
+-#    chomp;
+-#    $vers = $_;
+-#}
+-#close( VERS );
+-#if( ! $vers ) {
+-#    die "Can't find Condor version in $vers_file!\n";
+-#}
+-print "Remove unwanted binaries ....\n";
+-$binaries_file = "condor-*.tar.gz";
+-system("rm -f $binaries_file");
++my @binaries = <condor-*.tar.gz>;
++print "Remove unwanted binaries:\n\t" . join("\n\t", @binaries) . "\n";
++unlink(@binaries);
+ 
+ exit(0);
+diff --git a/nmi_tools/glue/test/platform_pre b/nmi_tools/glue/test/platform_pre
+index 79ce555..0c66261 100755
+--- a/nmi_tools/glue/test/platform_pre
++++ b/nmi_tools/glue/test/platform_pre
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -34,111 +34,114 @@
+ # done them prior. This way we can remove things like results.tar.gz
+ # once we have extracted what we care about etc...
+ ######################################################################
++use strict;
++use warnings;
+ use Cwd;
++use File::Basename;
++use File::Spec;
+ 
+-$extractdone = "RESULTEXTRACTIONDONE";
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
++TestGlue::print_debug_header();
++
++my $extractdone = "RESULTEXTRACTIONDONE";
+ 
+ # autoflush our STDOUT
+ $| = 1;
+ 
+ my $BaseDir = getcwd();
+ 
+-print "Currently in $BaseDir which contains the following:\n";
+-system("ls -l");
+-
+ my $tarball_file = "CONDOR-TARBALL-NAME";
++
+ my $results = "results.tar.gz";
+--f $results || die "$results does not exist!\n";
++die "$results does not exist!\n" unless(-f $results);
+ 
+ ######################################################################
+ # -1) If we are dealing with a Windows build simply save the
+ #     results.tar.gz name in the marker file because it holds only
+ #     what we want. Then leave.
+ ######################################################################
+-if( ($ENV{NMI_PLATFORM} =~ /winnt/) ) {
+-    
+-    print "Unzipping results.tar.gz\n";
+-    system("tar -xzf $results");
+-    print "Moving public/* to $BaseDir\n";
++if( TestGlue::is_windows() ) {
++    # Note that even though this is Windows this code executes on a Linux submit host
++    # so it is ok to use Unix commands (tar, mv, chmod, etc)
++    print "Untarring results.tar.gz\n";
++    system("tar -xzvf $results");
++    print "\nMoving public/* to $BaseDir\n";
+     system("mv public/* $BaseDir");
+     system("chmod a+r *.tar.gz");
+ 
+     print "All steps completed successfully\n";
+-	print "Currently in $BaseDir which contains the following:\n";
+-	system("ls -l");
+-	
+-	# NOTE: windows quits here!!
+-	#
++    print "Contents of '$BaseDir':\n";
++    system("ls -l .");
++    
++    # NOTE: windows quits here!!
+     exit 0;
+ }
+ 
+-my $testbin = "public/condor_*";
+ print "Preparing input test job in $BaseDir\n";
+ 
+ ######################################################################
+ # 1) find the specific binary we care about
+ ######################################################################
+-if(!(-f $extractdone)) {
+-	print "Searching in results.tar.gz for binaries\n";
+-	open( LTAR, "tar -xvzf $results |" ) ||
+-    	die "Can't open tar -xzvf $results : $!\n";
+-	my $saved_tarball;
+-	while( <LTAR> ) {
+-    	chomp;
+-    	print "Considering: $_\n";
+-		if( /.*condor-.*-stripped.*\.tar\.(gz|Z)$/ ) {
+-    		$saved_tarball = $_;
+-    		print "Found tarball!\n";
+-		}
+-	} 
+-	close( LTAR );
+-	if( ! $saved_tarball ) {
+-    	die "Can't find any tarball in $results\n";
+-	}
+-
+-######################################################################
+-# 2) Now that we found the binary we want, untar it from the tarball,
+-#    move it to this parent directory.
+-######################################################################
+-
+-	@path_parts = split( '/', $saved_tarball );
+-	$tar_name = pop( @path_parts );
+-	print "TarName is: $tar_name\n";
++if(!-f $extractdone) {
++    my $pattern = "public/condor-*-stripped.tar.gz";
++    print "Extracting '$pattern', condor_examples, and condor_tests from results.tar.gz\n";
+ 
+-	# Now, copy it to the parent
+-	print "Moving $tar_name to $BaseDir\n";
+-	system( "mv $saved_tarball $BaseDir" );
+-	if( $? ) {
+-    	die "'mv $saved_tarball $BaseDir' failed with status $?\n";
+-	}
++    my $ret = system("tar -xvzf $results $pattern public/condor_tests public/condor_examples");
+ 
+-######################################################################
+-# 2) Now that we found the binary we want, untar the pre-built test
+-#	 programs from the tarball and move them to this parent directory.
+-######################################################################
+-
+-	# Now, copy it to the parent
+-	print "Copying $testbin to $BaseDir\n";
+-	system( "cp -r $testbin $BaseDir" );
+-	if( $? ) {
+-    	die "'cp $testbin $BaseDir' failed with status $?\n";
+-	}
+-
+-	print "Writing tarball filename to $tarball_file\n";
+-	open( TARBALL_FILE, ">$tarball_file" ) || 
+-    	die "Can't open $tarball_file: $!\n";
+-	print TARBALL_FILE "$tar_name\n";
+-	close( TARBALL_FILE );
+-}
++    if($ret) {
++    	die "Could not extract tarball or test dir from $results: $!\n";
++    }
++    
++    my $saved_tarball = glob($pattern);
++    print "Tarball extracted: '$saved_tarball'\n";
++    my $tar_name = basename($saved_tarball);
++    print "Tarball name is: $tar_name\n";
++    
++    ######################################################################
++    # 2) Now that we found the binary we want, untar it from the tarball,
++    #    move it to this parent directory.
++    ######################################################################
++    
++    print "Moving $tar_name to $BaseDir\n";
++    if(not rename($saved_tarball, "$BaseDir/$tar_name")) {
++    	die "Could not move $saved_tarball to $BaseDir: $!";
++    }
++       
++    ######################################################################
++    # 2) Now that we found the binary we want, untar the pre-built test
++    #	 programs from the tarball and move them to this parent directory.
++    ######################################################################
++       
++    # Now, copy it to the parent
++    my $test_dir = "public/condor_tests";
++    print "Moving $test_dir to $BaseDir\n";
++    if(not rename($test_dir, "$BaseDir/condor_tests")) {
++    	die "Could not move $test_dir into $BaseDir: $!\n";
++    }
++
++    my $example_dir = "public/condor_examples";
++    print "Moving $example_dir to $BaseDir\n";
++    if(not rename($example_dir, "$BaseDir/condor_examples")) {
++    	die "Could not move $example_dir into $BaseDir: $!\n";
++    }
++    
++    print "Writing tarball filename to $tarball_file.\n";
++    open(TARBALL_FILE, '>', $tarball_file ) || die "Can't open $tarball_file for writing: $!\n";
++    print TARBALL_FILE "$tar_name\n";
++    close(TARBALL_FILE);
++   }
+ 
+ # Mark all processing done and results.tar.gz processing etc is done
+-system("touch $extractdone");
++open(SENTINEL, '>', $extractdone) or die("Can't touch $extractdone: $!");
++close(SENTINEL);
+ 
+ # Finally, blow away anything still in public and the results.tar.gz
+ print "Removing all other arch-dependent data\n";
+ system( "rm -rf public $results results" );
+ if( $? ) {
+-    die "'rm -rf public $results results' failed with status $?\n";
++    die "'rm -rf public $results results' failed with status $? ($!)\n";
+ }
+ 
+ print "All steps completed successfully\n";
+diff --git a/nmi_tools/glue/test/post_all b/nmi_tools/glue/test/post_all
+index 91099f5..a6fd2bf 100755
+--- a/nmi_tools/glue/test/post_all
++++ b/nmi_tools/glue/test/post_all
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+diff --git a/nmi_tools/glue/test/pre_all b/nmi_tools/glue/test/pre_all
+index 6f87f90..6052292 100755
+--- a/nmi_tools/glue/test/pre_all
++++ b/nmi_tools/glue/test/pre_all
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -18,41 +18,5 @@
+ ##
+ ##**************************************************************
+ 
+-
+-######################################################################
+-# $Id: pre_all,v 1.4 2007-11-08 22:53:46 nleroy Exp $
+-# Submit-side NMI build system infrastructure to setup source
+-# input for test jobs before the platform-specific stuff is called.
+-# All we have to do is untar the common/results.tar.gz file so that
+-# when the NMI infrastructure copies everything into each platform-
+-# specific directory, "results.tar.gz" doesn't get clobbered.
+-# We assume we're born inside the "common" directory...
+-######################################################################
+-
+-use Getopt::Long;
+-
+-# autoflush our STDOUT
+-$| = 1;
+-
+-# Set up environment file for talking to tests on remote execute node
+-setupTestEnvFile();
+-
+-print "All steps completed successfully\n";
+-exit 0;
+-
+-sub setupTestEnvFile
+-{
+-    ######################################################################
+-    # set up environment and create env file for test tasks
+-    ######################################################################
+-
+-    print "Setting up environtment file 'setup_test_env' for other scripts\n";
+-    open( ENVSETUP, ">test_task_env" ) ||
+-    die "cannot open test_task_env for writing\n";
+-
+-    print ENVSETUP "GCBTARGET=nmi-s006.cs.wisc.edu\n";
+-    print ENVSETUP "export GCBTARGET\n";
+-    close(ENVSETUP);
+-}
+-
+-
++print "Nothing to do for pre-all currently.\n";
++exit(0);
+diff --git a/nmi_tools/glue/test/remote_declare b/nmi_tools/glue/test/remote_declare
+index bd8f720..5f23f87 100755
+--- a/nmi_tools/glue/test/remote_declare
++++ b/nmi_tools/glue/test/remote_declare
+@@ -1,7 +1,7 @@
+-#!/bin/sh
++#!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -18,22 +18,227 @@
+ ##
+ ##**************************************************************
+ 
++use strict;
++use warnings;
++use Getopt::Long;
++use vars qw/ @opt_testclasses /;
++use File::Basename;
++use File::Spec;
+ 
+-# $Id: remote_declare,v 1.3 2007-11-08 22:53:46 nleroy Exp $
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
++TestGlue::print_debug_header();
++TestGlue::setup_test_environment();
+ 
+-# Condor implementation of NMI test infrastructure interface
+-# Simple wrapper to source the environment file and spawn the
+-# corresponding perl script for a given stage of the test.
++parseOptions();
+ 
+-ENV_FILE=setup_test_env
++######################################################################
++# generate list of all tests to run
++######################################################################
+ 
+-# include the environment info from the pre-script
+-if [ ! -f $ENV_FILE ]; then
+-    echo "$ENV_FILE does not exist!"
+-    exit 1
+-fi
+-. $ENV_FILE
++my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
++my $TaskFile = File::Spec->catfile($BaseDir, "tasklist.nmi");
++my $UserdirTaskFile = File::Spec->catfile($BaseDir, "..", "tasklist.nmi");
++my $testdir = "condor_tests";
+ 
+-exec remote_declare.pl $*
++# Look for a specific file that contains overrides for the default timeouts for some tests
++my %CustomTimeouts = load_custom_timeout_file();
++my %RuncountChanges = load_custom_runcount_file();
+ 
++# file which contains the list of tests to run on Windows
++my $WinTestList = File::Spec->catfile($BaseDir, $testdir, "Windows_list");
++my $ShortWinTestList = File::Spec->catfile($BaseDir, $testdir, "Windows_shortlist");
+ 
++# Figure out what testclasses we should declare based on our
++# command-line arguments.  If none are given, we declare the testclass
++# "all", which is *all* the tests in the test suite.
++my @classlist = @opt_testclasses;
++if( ! @classlist ) {
++    push( @classlist, "all" );
++}
++
++# The rest of argv, after the -- are any additional configure arguments.
++my $configure_args = join(' ', @ARGV);
++
++print "****************************************************\n";
++print "**** Preparing to declare tests for these classes:\n";
++foreach my $class (@classlist) {
++    print "****   $class\n";
++}
++
++# Make sure we can write to the tasklist file, and have the filehandle
++# open for use throughout the rest of the script.
++open(TASKFILE, '>', $TaskFile ) || die "Can't open $TaskFile for writing: $!\n"; 
++open(USERTASKFILE, '>', $UserdirTaskFile ) || die "Can't open $UserdirTaskFile for writing: $!\n"; 
++
++
++######################################################################
++# For each testclass, generate the list of tests that match it
++######################################################################
++
++my %tasklist;
++
++if( not TestGlue::is_windows() ) {
++    foreach my $class (@classlist) {
++    	print "****************************************************\n";
++    	print "**** Finding tests for class: '$class'\n";
++    	print "****************************************************\n";
++    	my $tests = findTests( $class, "top" );
++        %tasklist = (%tasklist, %$tests);
++    }
++}
++else {
++    # eat the file Windows_list into tasklist hash
++    foreach my $class (@classlist) {
++    	print "****************************************************\n";
++    	print "**** Finding Windows tests '$class'\n";
++    	print "****************************************************\n";
++        if($class eq "quick") {
++            open(WINDOWSTESTS, '<', $WinTestList) || die "Can't open $WinTestList: $!\n";
++        }
++        elsif($class eq "short") {
++            open( WINDOWSTESTS, '<', $ShortWinTestList) || die "Can't open $ShortWinTestList: $!\n";
++        }
++        else {
++            # if things got confused just run the hourly tests
++            print "Unknown test class provided for Windows: '$class' (only quick and short are supported)\n";
++            print "We will run the short tests in this undefined case.\n";
++            open( WINDOWSTESTS, '<', $ShortWinTestList) || die "Can't open $ShortWinTestList: $!\n";
++        }
++
++        # Load the tasks, one per line.  Skip comments (lines starting with #)
++        %tasklist = map { chomp; $_ => 1} grep !/^\s*\#/, <WINDOWSTESTS>;
++        print join("\n", sort keys %tasklist) . "\n";
++        close(WINDOWSTESTS);
++    }
++}
++
++my $total_tests = scalar(keys %tasklist);
++print "-- Found $total_tests test(s) in all directories\n";
++
++print "****************************************************\n";
++print "**** Writing out tests to tasklist.nmi\n";
++print "****************************************************\n";
++foreach my $task (sort keys %tasklist) {
++    my $test_count = defined($RuncountChanges{$task}) ? $RuncountChanges{$task} : 1;
++
++    if(defined($CustomTimeouts{"$task"})) {
++        print "CustomTimeout:$task $CustomTimeouts{$task}\n";
++        foreach(1..$test_count) {
++            print TASKFILE "$task-$_ $CustomTimeouts{$task}\n";
++            print USERTASKFILE "$task-$_ $CustomTimeouts{$task}\n";
++        }
++    }
++    else {
++        foreach(1..$test_count) {
++            print TASKFILE "$task-$_\n";
++            print USERTASKFILE "$task-$_\n";
++        }
++    }
++}
++close( TASKFILE );
++close( USERTASKFILE );
++print "Wrote " . scalar(keys %tasklist) . " unique tests.\n";
++exit(0);
++
++sub findTests {
++    my( $classname, $dir_arg ) = @_;
++    my ($ext, $dir);
++
++    if( $dir_arg eq "top" ) {
++        $ext = "";
++        $dir = $testdir;
++    }
++    else {
++        $ext = ".$dir_arg";
++        $dir = "$testdir/$dir_arg";
++    }
++    print "-- Searching directory '$dir' for tests with class '$classname'\n";
++    chdir( "$BaseDir/$dir" ) || die "Can't chdir($BaseDir/$dir): $!\n";
++
++    my $list_target = "list_$classname";
++    open(LIST, '<', $list_target) || die "cannot open $list_target: $!\n";
++    my %tasklist = map { chomp; "$_$ext" => 1 } <LIST>;
++    close(LIST);
++
++    print join("\n", sort keys %tasklist) . "\n";
++
++    my $total = scalar(keys %tasklist);
++    print "-- Found $total test(s) in directory '$dir' for class '$classname'\n\n";
++    return \%tasklist;
++}
++
++sub usage {
++    print <<EOF;
++--help          This help.
++--test-class    Which test class to run, comma separated or multiple occurrence.
++EOF
++	
++    exit 1;
++}
++
++# We use -- to delineate the boundary between args to this script and args to
++# the configure in this script.
++sub parseOptions {
++    print "Script called with ARGV: " . join(' ', @ARGV) . "\n";
++
++    my $rc = GetOptions('test-class=s' => \@opt_testclasses,
++                        'help'         => \&usage,
++                        );
++
++    if( !$rc ) {
++        usage();
++    }
++
++    # allow comma separated list in addition to multiple occurrences.
++    @opt_testclasses = split(/,/, join(',', @opt_testclasses));
++
++    if (!defined(@opt_testclasses)) {
++        die "Please supply a test class!\n";
++    }
++}
++
++
++sub load_custom_timeout_file {
++    my %timeouts = ();
++    my $TimeoutFile = File::Spec->catfile($BaseDir, $testdir, "TimeoutChanges");
++    if( -f $TimeoutFile) {
++        print "Found a custom timeout file at '$TimeoutFile'.  Loading it...\n";
++        open(TIMEOUTS, '<', $TimeoutFile) || die "Failed to open $TimeoutFile for reading: $!\n";
++        while(<TIMEOUTS>) {
++            if(/^\s*([\-\w]*)\s+(\d*)\s*$/) {
++                print "\tCustom Timeout: $1:$2\n";
++                $timeouts{$1} = $2;
++            }
++        }
++        close(TIMEOUTS);
++    }
++    else {
++        print "INFO: No custom timeout file found.\n";
++    }
++
++    return %timeouts;
++}
++
++
++sub load_custom_runcount_file {
++    my %runcounts = ();
++    my $RuncountFile = File::Spec->catfile($BaseDir, $testdir, "RuncountChanges");
++    if( -f $RuncountFile) {
++        print "Found a custom runcount file at '$RuncountFile'.  Loading it...\n";
++        open(RUNCOUNT, '<', $RuncountFile) || die "Failed to open $RuncountFile for reading: $!\n";
++        while(<RUNCOUNT>) {
++            if(/^\s*([\w\-]+)\s+(\d*)\s*$/) {
++                print "\tCustom Runcount: $1:$2\n";
++                $runcounts{$1} = $2;
++            }
++        }
++        close(RUNCOUNT);
++    }
++    else {
++        print "INFO: No custom runcount file found.\n";
++    }
++
++    return %runcounts;
++}
+diff --git a/nmi_tools/glue/test/remote_declare.pl b/nmi_tools/glue/test/remote_declare.pl
+deleted file mode 100755
+index 3cc10d8..0000000
+--- a/nmi_tools/glue/test/remote_declare.pl
++++ /dev/null
+@@ -1,260 +0,0 @@
+-#!/usr/bin/env perl
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-use Getopt::Long;
+-use vars qw/ @opt_testclasses $opt_help /;
+-
+-parseOptions();
+-
+-######################################################################
+-# generate list of all tests to run
+-######################################################################
+-
+-my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
+-my $TaskFile = "$BaseDir/tasklist.nmi";
+-my $UserdirTaskFile = "$BaseDir/../tasklist.nmi";
+-my $testdir = "condor_tests";
+-
+-my %CustomTimeouts;
+-my $TimeoutFile = "$BaseDir/condor_tests/TimeoutChanges";
+-# Do we have a file with non-default timeouts for some tests?
+-if( -f "$TimeoutFile") {
+-	open(TIMEOUTS,"<$TimeoutFile") || die "Failed to open $TimeoutFile: $!\n";
+-	my $line;
+-	while(<TIMEOUTS>) {
+-		chomp($_);
+-		$line = $_;
+-		if($line =~ /^\s*([\-\w]*)\s+(\d*)\s*$/) {
+-			print "Custom Timeout: $1:$2\n";
+-			$CustomTimeouts{"$1"} = $2;
+-		}
+-	}
+-	close(TIMEOUTS);
+-}
+-
+-my %RuncountChanges;
+-my $RuncountFile = "$BaseDir/condor_tests/RuncountChanges";
+-# Do we have a file with non-default runtimes for some tests?
+-if( -f "$RuncountFile") {
+-    open(RUNCOUNT,"<$RuncountFile") || die "Failed to open $RuncountFile: $!\n";
+-    my $line;
+-    while(<RUNCOUNT>) {
+-        chomp($_);
+-        $line = $_;
+-        if($line =~ /^\s*([\w\-]+)\s+(\d*)\s*$/) {
+-            print "Custom Runcount: $1:$2\n";
+-            $RuncountChanges{"$1"} = $2;
+-        }
+-    }
+-    close(RUNCOUNT);
+-}
+-# file which contains the list of tests to run on Windows
+-my $WinTestList = "$BaseDir/condor_tests/Windows_list";
+-my $ShortWinTestList = "$BaseDir/condor_tests/Windows_shortlist";
+-
+-# Figure out what testclasses we should declare based on our
+-# command-line arguments.  If none are given, we declare the testclass
+-# "all", which is *all* the tests in the test suite.
+-my @classlist = @opt_testclasses;
+-if( ! @classlist ) {
+-    push( @classlist, "all" );
+-}
+-
+-# The rest of argv, after the -- are any additional configure arguments.
+-my $configure_args = join(' ', @ARGV);
+-
+-print "****************************************************\n";
+-print "**** Preparing to declare tests for these classes:\n";
+-foreach $class (@classlist) {
+-    print "****   $class\n";
+-}
+-
+-# Make sure we can write to the tasklist file, and have the filehandle
+-# open for use throughout the rest of the script.
+-open( TASKFILE, ">$TaskFile" ) || die "Can't open $TaskFile: $!\n"; 
+-open( USERTASKFILE, ">$UserdirTaskFile" ) || die "Can't open $UserdirTaskFile: $!\n"; 
+-
+-
+-######################################################################
+-# For each testclass, generate the list of tests that match it
+-######################################################################
+-
+-my %tasklist;
+-my $total_tests;
+-
+-if( !($ENV{NMI_PLATFORM} =~ /winnt/) ) {
+-	foreach $class (@classlist) {
+-    	print "****************************************************\n";
+-    	print "**** Finding tests for class: \"$class\"\n";
+-    	print "****************************************************\n";
+-    	$total_tests = 0;    
+-    	$total_tests += findTests( $class, "top" );
+-
+-		# this compiler specific tests for std:u is total crap.
+-		#foreach $cmplr (@compilers) {
+-		#	$total_tests += findTests( $class, $cmplr );
+-    	#}
+-	}
+-} else {
+-    # eat the file Windows_list into tasklist hash
+-	foreach $class (@classlist) {
+-    	print "****************************************************\n";
+-    	print "**** Finding Windows tests \"$class\"\n";
+-    	print "****************************************************\n";
+-		if($class eq "quick") {
+-    		open( WINDOWSTESTS, "<$WinTestList" ) || die "Can't open $WinTestList: $!\n";
+-		} elsif($class eq "short") {
+-    		open( WINDOWSTESTS, "<$ShortWinTestList" ) || die "Can't open $ShortWinTestList: $!\n";
+-		} else {
+-			# if things got confused just run the hourly tests
+-    		open( WINDOWSTESTS, "<$ShortWinTestList" ) || die "Can't open $ShortWinTestList: $!\n";
+-		}
+-    	$total_tests = 0;
+-    	$testnm = "";
+-    	while(<WINDOWSTESTS>) {
+-        	chomp();
+-        	$testnm = $_;
+-        	if( $testnm =~ /^\s*#.*/) {
+-            	# skip the comment
+-        	} else {
+-            	$total_tests += 1;
+-            	$tasklist{$testnm} = 1;
+-        	}
+-    	}
+-	}
+-}
+-
+-if( $total_tests == 1) {
+-	$word = "test";
+-} else {
+-	$word = "tests";
+-}
+-print "-- Found $total_tests $word in all " .
+-	"directories\n";
+-
+-print "****************************************************\n";
+-print "**** Writing out tests to tasklist.nmi\n";
+-print "****************************************************\n";
+-my $unique_tests = 0;
+-my $repeat_test;
+-foreach $task (sort keys %tasklist ) {
+-	$tempt = $CustomTimeouts{"$task"};
+-    $tempr = $RuncountChanges{"$task"};
+-    if( exists $RuncountChanges{"$task"} ) {
+-        $repeat_test = $tempr;
+-    } else {
+-        $repeat_test = 1;
+-    }
+-
+-    if( exists $CustomTimeouts{"$task"} ) {
+-        foreach(1..$repeat_test) {
+-            print TASKFILE $task . "-" . $_ . " " . $CustomTimeouts{"$task"} . "\n";
+-            print USERTASKFILE $task . "-" . $_ .  " " . $CustomTimeouts{"$task"} . "\n";
+-        }
+-        print "CustomTimeout:$task $tempt\n";
+-    } else {
+-        foreach(1..$repeat_test) {
+-            print TASKFILE $task . "-" . $_ . "\n";
+-            print USERTASKFILE $task . "-" . $_ . "\n";
+-        }
+-    }
+-    $unique_tests++;
+-}
+-close( TASKFILE );
+-close( USERTASKFILE );
+-print "Wrote $unique_tests unique tests\n";
+-exit(0);
+-
+-sub findTests () {
+-    my( $classname, $dir_arg ) = @_;
+-    my ($ext, $dir);
+-    my $total = 0;
+-
+-    if( $dir_arg eq "top" ) {
+-		$ext = "";
+-		$dir = $testdir;
+-    } else {
+-		$ext = ".$dir_arg";
+-		$dir = "$testdir/$dir_arg";
+-    }
+-    print "-- Searching \"$dir\" for \"$classname\"\n";
+-    chdir( "$BaseDir/$dir" ) || die "Can't chdir($BaseDir/$dir): $!\n";
+-
+-    $list_target = "list_" . $classname;
+-
+-    open( LIST, $list_target ) || die "cannot open $list_target: $!\n";
+-    while( <LIST> ) {
+-		print;
+-		chomp;
+-		$taskname = $_ . $ext;
+-		$total++;
+-		$tasklist{$taskname} = 1;
+-    }
+-    if( $total == 1 ) {
+-		$word = "test";
+-    } else {
+-		$word = "tests";
+-    }
+-    print "-- Found $total $word in \"$dir\" for \"$classname\"\n\n";
+-    return $total;
+-}
+-
+-sub usage
+-{
+-print <<EOF;
+---help          This help.
+---test-class    Which test class to run, comma separated or multiple ocurrance.
+-EOF
+-	
+-	exit 0;
+-}
+-
+-# We use -- to delineate the boundary between args to this script and args to
+-# the configure in this script.
+-sub parseOptions
+-{
+-	my $rc;
+-
+-	print "Script called with ARGV: " . join(' ', @ARGV) . "\n";
+-
+-	$rc = GetOptions(
+-		'test-class=s'		=> \@opt_testclasses,
+-		'help'				=> \$opt_help,
+-	);
+-
+-	if( !$rc ) {
+-		usage();
+-	}
+-
+-	if (defined($opt_help)) {
+-		usage();
+-	}
+-
+-	# allow comma separated list in addition to multiple occurrances.
+-	@opt_testclasses = split(/,/, join(',', @opt_testclasses));
+-
+-	if (!defined(@opt_testclasses)) {
+-		die "Please supply a test class!\n";
+-	}
+-}
+-
+-
+-
+-
+diff --git a/nmi_tools/glue/test/remote_post b/nmi_tools/glue/test/remote_post
+index 07a9979..9b1ca1a 100755
+--- a/nmi_tools/glue/test/remote_post
++++ b/nmi_tools/glue/test/remote_post
+@@ -1,7 +1,7 @@
+-#!/bin/sh
++#!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -19,19 +19,95 @@
+ ##**************************************************************
+ 
+ 
+-# $Id: remote_post,v 1.3 2007-11-08 22:53:46 nleroy Exp $
++######################################################################
++# post script for Condor testsuite runs
++######################################################################
+ 
+-# Condor implementation of NMI test infrastructure interface
+-# Simple wrapper to source the environment file and spawn the
+-# corresponding perl script for a given stage of the test.
++use strict;
++use warnings;
++use File::Basename;
+ 
+-ENV_FILE=setup_test_env
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
++TestGlue::setup_test_environment();
+ 
+-# include the environment info from the pre-script
+-if [ ! -f $ENV_FILE ]; then
+-    echo "$ENV_FILE does not exist!"
+-    exit 1
+-fi
+-. $ENV_FILE
++my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
++my $exit_status = 0;
+ 
+-exec remote_post.pl $*
++# This is debugging output for the sake of the NWO infrastructure.
++# However, it might be useful to us some day so we can see what's
++# going on in case of failures...
++if( defined $ENV{_NMI_STEP_FAILED} ) { 
++    print "The value of _NMI_STEP_FAILED is: '$ENV{_NMI_STEP_FAILED}'\n";
++}
++else {
++    print "The _NMI_STEP_FAILED variable is not set\n";
++}
++
++
++######################################################################
++# kill test suite personal condor daemons
++######################################################################
++
++
++print "Seeing if personal condor needs killing\n";
++
++my $personal_condor_dir = File::Spec->catdir($BaseDir, "condor_tests", "TestingPersonalCondor");
++my $sentinel = File::Spec->catfile($personal_condor_dir, "local", "log", ".scheduler_address");
++if( -f $sentinel ) {
++    #  Came up and had a scheduler running. good
++    $ENV{CONDOR_CONFIG} = File::Spec->catfile($personal_condor_dir, "condor_config");
++    if( defined $ENV{_NMI_STEP_FAILED} ) { 
++        print "Not calling condor_off for $ENV{CONDOR_CONFIG}\n";
++    }
++    else {
++        print "Calling condor_off for $ENV{CONDOR_CONFIG}\n";
++        my $condor_off = File::Spec->catfile($BaseDir, "condor", "sbin", "condor_off");
++        system("$condor_off -master");
++
++        # give some time for condor to shutdown
++        sleep(30);
++        print "Done calling condor_off for $ENV{CONDOR_CONFIG}\n";
++    }
++}
++else {
++    # if there's no pid_file, there must be no personal condor running
++    # which we'd have to kill.  this would be caused by an empty
++    # tasklist.  so, make sure the tasklist is empty.  if so, we can
++    # move on with success.  if there are tasks but no pid_file,
++    # that's a weird fatal error and we should propagate that.
++    if( ! -f "tasklist.nmi" || -z "tasklist.nmi" ) {
++        # our tasklist is empty, good.
++        print "tasklist.nmi is empty and there's no condor_master_pid file.\n";
++        print "Nothing to cleanup, returning SUCCESS.\n";
++    }
++    else {
++        print "ERROR: tasklist.nmi contains data but condor_master_pid does not exist!\n";
++        $exit_status = 1;
++    }
++}
++    
++
++######################################################################
++# save and tar up test results
++######################################################################
++
++if( ! -f "tasklist.nmi" || -z "tasklist.nmi" ) {
++    # our tasklist is empty, so don't do any real work
++    print "No tasks in tasklist.nmi, nothing to do\n";
++    exit $exit_status;
++}
++
++print "cding to $BaseDir \n";
++chdir("$BaseDir") || die "Can't chdir($BaseDir): $!\n";
++
++#----------------------------------------
++# final tar and exit
++#----------------------------------------
++print "Tarring up all results\n";
++chdir("$BaseDir") || die "Can't chdir($BaseDir): $!\n";
++my $test_dir = File::Spec->catdir($BaseDir, "condor_tests");
++system("tar zcf results.tar.gz --exclude *.exe $test_dir local");
++
++exit $exit_status;
+diff --git a/nmi_tools/glue/test/remote_post.pl b/nmi_tools/glue/test/remote_post.pl
+deleted file mode 100755
+index 6a91b05..0000000
+--- a/nmi_tools/glue/test/remote_post.pl
++++ /dev/null
+@@ -1,131 +0,0 @@
+-#!/usr/bin/env perl
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-
+-######################################################################
+-# post script for Condor testsuite runs
+-######################################################################
+-
+-use File::Copy;
+-
+-my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
+-my $testdir = "condor_tests";
+-my $exit_status = 0;
+-
+-# This is debugging output for the sake of the NWO infrastructure.
+-# However, it might be useful to us some day so we can see what's
+-# going on in case of failures...
+-if( defined $ENV{_NMI_STEP_FAILED} ) { 
+-    my $nmi_task_failure = "$ENV{_NMI_STEP_FAILED}";
+-    print "The value of _NMI_STEP_FAILED is: '$nmi_task_failure'\n";
+-} else {
+-    print "The _NMI_STEP_FAILED variable is not set\n";
+-}
+-
+-
+-######################################################################
+-# kill test suite personal condor daemons
+-######################################################################
+-
+-
+-print "Seeing if personal condor needs killing\n";
+-
+-if( -f "$BaseDir/condor_tests/TestingPersonalCondor/local/log/.scheduler_address" ) {
+-    #  Came up and had a scheduler running. good
+-	$ENV{"CONDOR_CONFIG"} = "$BaseDir/condor_tests/TestingPersonalCondor/condor_config";
+-	if( defined $ENV{_NMI_STEP_FAILED} ) { 
+-		print "not calling condor_off for $BaseDir/condor_tests/TestingPersonalCondor/condor_config\n";
+-	} else {
+-		print "calling condor_off for $BaseDir/condor_tests/TestingPersonalCondor/condor_config\n";
+-		system("$BaseDir/userdir/condor/sbin/condor_off -master");
+-		# give some time for condor to shutdown
+-		sleep(30);
+-		print "done calling condor_off for $BaseDir/condor_tests/TestingPersonalCondor/condor_config\n";
+-	}
+-} else {
+-    # if there's no pid_file, there must be no personal condor running
+-    # which we'd have to kill.  this would be caused by an empty
+-    # tasklist.  so, make sure the tasklist is empty.  if so, we can
+-    # move on with success.  if there are tasks but no pid_file,
+-    # that's a weird fatal error and we should propagate that.
+-    if( ! -f "tasklist.nmi" || -z "tasklist.nmi" ) {
+-        # our tasklist is empty, good.
+-        print "tasklist.nmi is empty and there's no condor_master_pid " .
+-            "file.\nNothing to cleanup, returning SUCCESS.\n";
+-    } else {
+-        print "ERROR: tasklist.nmi contains data but " .
+-            "condor_master_pid does not exist!\n";
+-        $exit_status = 1;
+-    }
+-}
+-    
+-
+-######################################################################
+-# save and tar up test results
+-######################################################################
+-
+-if( ! -f "tasklist.nmi" || -z "tasklist.nmi" ) {
+-    # our tasklist is empty, so don't do any real work
+-    print "No tasks in tasklist.nmi, nothing to do\n";
+-    exit $exit_status;
+-}
+-
+-print "cding to $BaseDir \n";
+-chdir("$BaseDir") || die "Can't chdir($BaseDir): $!\n";
+-
+-#----------------------------------------
+-# final tar and exit
+-#----------------------------------------
+-
+-$results = "results.tar.gz";
+-print "Tarring up all results\n";
+-chdir("$BaseDir") || die "Can't chdir($BaseDir): $!\n";
+-system( "tar zcf $results --exclude *.exe $BaseDir/condor_tests local" );
+-# don't care if condor is still running or sockets
+-# are being skipped. Save what we can and don't bitch
+-#if( $? >> 8 ) {
+-    #print "Can't tar zcf src/condor_tests local\n";
+-    #$exit_status = 1;
+-#}
+-
+-exit $exit_status;
+-
+-
+-######################################################################
+-# helper methods
+-######################################################################
+-
+-sub copy_file {
+-    my( $src, $dest, $required ) = @_;
+-    my $had_error = false;
+-    copy($src, $dest);
+-    if( $? >> 8 ) {
+-        if( $required ) {
+-            print "ERROR: Can't copy $src to $dest: $!\n";
+-        } else {
+-            print "Optional file $src not copied into $dest: $!\n";
+-        }
+-        $had_error = true;
+-    } else {
+-        print "Copied $src to $dest\n";
+-    }
+-    return $had_error;
+-}
+-
+diff --git a/nmi_tools/glue/test/remote_pre b/nmi_tools/glue/test/remote_pre
+index 0f58519..71076a5 100755
+--- a/nmi_tools/glue/test/remote_pre
++++ b/nmi_tools/glue/test/remote_pre
+@@ -1,7 +1,7 @@
+-#!/bin/sh
++#!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -19,19 +19,151 @@
+ ##**************************************************************
+ 
+ 
+-# $Id: remote_pre,v 1.3 2007-11-08 22:53:46 nleroy Exp $
++######################################################################
++# script to set up for Condor testsuite run
++######################################################################
+ 
+-# Condor implementation of NMI test infrastructure interface
+-# Simple wrapper to source the environment file and spawn the
+-# corresponding perl script for a given stage of the test.
++use strict;
++use warnings;
++use Cwd;
++use Env; 
++use File::Copy;
++use File::Basename;
+ 
+-ENV_FILE=setup_test_env
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
++TestGlue::setup_test_environment();
+ 
+-# include the environment info from the pre-script
+-if [ ! -f $ENV_FILE ]; then
+-    echo "$ENV_FILE does not exist!"
+-    exit 1
+-fi
+-. $ENV_FILE
++# Don't buffer output.
++$|=1;
+ 
+-exec remote_pre.pl $*
++my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
++my $logsize = "50000000"; # size for logs of personal Condor
++
++# Hard-coded filename, defined in test_platform_pre
++my $tarball_file = "CONDOR-TARBALL-NAME";
++
++if( -z "tasklist.nmi" ) {
++    # our tasklist is empty, so don't do any real work
++    print "No tasks in tasklist.nmi, nothing to do\n";
++    exit 0;
++}
++
++
++######################################################################
++# untar pre-built tarball
++######################################################################
++
++my $release_tarball;
++my $version;
++if( TestGlue::is_windows() ) {
++    # on Windows, condor is in a zip file, not a tarball
++    print "Finding release zip file\n";
++    my ($release_zipfile) = glob("condor-*.zip");
++    
++    print "Release zip file is '$release_zipfile'\n";
++    
++    if( ! $release_zipfile ) {
++        die "Could not find a condor release zip file!\n";
++    }
++    
++    if ( ! mkdir("condor") ) {
++        die "Could not make the condor folder\n";
++    }
++
++    # We are explicitly calling unzip from C:\tools so that we do not use Cygwin's
++    # version of unzip.  When Cygwin unzips a tarball it removes the execute bits 
++    # and we have to restore them.  We want to avoid this so use non-Cygwin unzip
++    print "Unzipping $release_zipfile ...\n";
++    system("C:\\tools\\unzip $release_zipfile -d condor") && die "Can't unzip $release_zipfile: $!\n";
++    print "Unzipped $release_zipfile.\n";
++    
++    (my $tmp_dir = basename($release_zipfile)) =~ s/\.zip$//;
++    print "\$tmp_dir = '$tmp_dir'\n";
++    TestGlue::dir_listing("condor");
++    my $tmp_dir_path = File::Spec->catdir("condor", $tmp_dir);
++    if( -d $tmp_dir_path ) {
++        print "$tmp_dir_path exists.  Trying to move...\n";
++        system("move $tmp_dir_path\\* condor\\");
++    }
++    TestGlue::dir_listing("condor");
++
++    $version = substr($release_zipfile, 0, -4);
++    print "VERSION string is $version from $release_zipfile\n";
++}
++else {
++    print "Finding release tarball\n";
++    open(TARBALL_FILE, '<', $tarball_file ) || die "Can't open $tarball_file: $!\n";
++    while(<TARBALL_FILE>) {
++        chomp;
++        $release_tarball = $_;
++    }
++    
++    print "Release tarball is '$release_tarball'\n";
++    
++    if( ! $release_tarball ) {
++        die "$tarball_file does not contain a filename!\n";
++    }
++    if( ! -f $release_tarball ) {
++        die "$release_tarball (from $tarball_file) does not exist!\n";
++    }
++    
++    print "Release tarball file exists:\n";
++    TestGlue::dir_listing($release_tarball);
++
++    print "Untarring $release_tarball ...\n";
++    system("tar -xzvf $release_tarball" ) && die "Can't untar $release_tarball: $!\n";
++    print "Untarred $release_tarball.\n";
++    
++    ($version) = $release_tarball =~ /^(.*)\.[^.]+\.[^.]+$/;
++    print "VERSION string is $version from $release_tarball\n";
++}
++
++######################################################################
++# setup the personal condor
++######################################################################
++
++print "Condor version: $version\n";
++
++print "SETTING UP PERSONAL CONDOR\n";
++
++# I'm not 100% certain wtf this actually does. 
++if( not TestGlue::is_windows() ) {
++    mkdir( "$BaseDir/local", 0777 ) || die "Can't mkdir $BaseDir/local: $!\n";
++    system("mv $BaseDir/$version $BaseDir/condor" );
++    
++    # Remove leftovers from extracting built binaries.
++    print "Removing $version tar file and extraction\n";
++    unlink(<$version*>);
++}
++else {
++    # windows personal condor setup
++    mkdir( "local", 0777 ) || die "Can't mkdir $BaseDir/local: $!\n";
++    mkdir( "local/spool", 0777 ) || die "Can't mkdir $BaseDir/local/spool: $!\n";
++    mkdir( "local/execute", 0777 ) || die "Can't mkdir $BaseDir/local/execute: $!\n";
++    mkdir( "local/log", 0777 ) || die "Can't mkdir $BaseDir/local/log: $!\n";
++    
++    # Remove leftovers from extracting built binaries.
++    print "Removing $version.zip file\n";
++    unlink("$version.zip");
++
++    my $Win32BaseDir = $ENV{WIN32_BASE_DIR} || die "WIN32_BASE_DIR not in environment!\n";
++    
++    TestGlue::which("condor_master.exe");
++}
++
++
++# move into the condor_tests directory first
++my $test_dir = File::Spec->catdir($BaseDir, "condor_tests");
++chdir($test_dir) || die "Can't chdir($test_dir for personal condor setup): $!\n";
++
++# -p means just set up the personal condor for the test run
++my $batch_test = File::Spec->catfile($test_dir, "batch_test.pl");
++my $command_line = "$batch_test --debug -p";
++print "About to run '$command_line'\n";
++system("perl $command_line");
++
++if( $? != 0 ) {
++    exit 2;
++}
+diff --git a/nmi_tools/glue/test/remote_pre.pl b/nmi_tools/glue/test/remote_pre.pl
+deleted file mode 100755
+index 58602ed..0000000
+--- a/nmi_tools/glue/test/remote_pre.pl
++++ /dev/null
+@@ -1,217 +0,0 @@
+-#!/usr/bin/env perl
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-
+-######################################################################
+-# script to set up for Condor testsuite run
+-######################################################################
+-
+-use Cwd;
+-use Env; 
+-use File::Copy;
+-use File::Basename;
+-
+-# Don't buffer output.
+-$|=1;
+-
+-my $BaseDir = $ENV{BASE_DIR} || die "BASE_DIR not in environment!\n";
+-my $logsize = "50000000"; # size for logs of personal Condor
+-
+-# Hard-coded filename, defined in test_platform_pre
+-my $tarball_file = "CONDOR-TARBALL-NAME";
+-
+-if( -z "tasklist.nmi" ) {
+-    # our tasklist is empty, so don't do any real work
+-    print "No tasks in tasklist.nmi, nothing to do\n";
+-    exit 0;
+-}
+-
+-
+-######################################################################
+-# untar pre-built tarball
+-######################################################################
+-
+-my $release_tarball;
+-my $version;
+-if( $ENV{NMI_PLATFORM} =~ /winnt/) {
+-
+-	# on Windows, condor is in a zip file, not a tarball
+-	print "Finding release zip file\n";
+-	my ($release_zipfile) = glob("condor-*.zip");
+-	
+-	print "Release zip file is $release_zipfile\n";
+-	
+-	if( ! $release_zipfile ) {
+-		die "Could not find a condor release zip file!\n";
+-	}
+-	
+-	if ( ! mkdir("condor") ) {
+-	   die "Could not make the condor folder\n";
+-	}
+-	
+-	print "Unzipping $release_zipfile ...\n";
+-	system("unzip $release_zipfile -d condor") && die "Can't unzip $release_zipfile !\n";
+-	print "Unzipped $release_zipfile ...\n";
+-	
+-	(my $tmp_dir = basename($release_zipfile)) =~ s/\.zip$//;
+-	print "\$tmp_dir = '$tmp_dir'\n";
+-    print "Directory listing of 'condor':\n";
+-	print `dir condor`;
+-	if(-d "condor/$tmp_dir") {
+-	    print "condor/$tmp_dir exists.  Trying to move...\n";
+-	    system("mv condor/$tmp_dir/* condor/");
+-	}
+-	print "Second directory listing of 'condor':\n";
+-	print `dir condor`;
+-
+-	print "fixing execute bits ...\n";
+-	system("chmod a+x condor/bin/*");
+-	
+-	#debug code...
+-	#system("ls");
+-	#system("ls -l condor");
+-	
+-	$version = substr($release_zipfile, 0, -4);
+-	print "VERSION string is $version from $release_zipfile\n";
+-	
+-} else {
+-	print "Finding release tarball\n";
+-	open( TARBALL_FILE, "$tarball_file" ) || 
+-		die "Can't open $tarball_file: $!\n";
+-	while( <TARBALL_FILE> ) {
+-		chomp;
+-		$release_tarball = $_;
+-	}
+-
+-	print "Release tarball is $release_tarball\n";
+-
+-	if( ! $release_tarball ) {
+-		die "$tarball_file does not contain a filename!\n";
+-	}
+-	if( ! -f $release_tarball ) {
+-		die "$release_tarball (from $tarball_file) does not exist!\n";
+-	}
+-
+-	print "Release tarball file exists\n";
+-
+-	print "Untarring $release_tarball ...\n";
+-	system("tar -xzvf $release_tarball" ) && die "Can't untar $release_tarball: $!\n";
+-	print "Untarred $release_tarball ...\n";
+-	
+-	($basename,$ext_gz) = $release_tarball =~ /^(.*)(\.[^.]*)$/;
+-	($version,$ext_tar) = $basename =~ /^(.*)(\.[^.]*)$/;
+-	print "VERSION string is $version from $release_tarball and $basename\n";
+-}
+-
+-######################################################################
+-# setup the personal condor
+-######################################################################
+-
+-print "Condor version: $version\n";
+-
+-print "SETTING UP PERSONAL CONDOR\n";
+-
+-# I'm not 100% certain wtf this actually does. 
+-if( !($ENV{NMI_PLATFORM} =~ /winnt/) ) {
+-
+-	mkdir( "$BaseDir/local", 0777 ) || die "Can't mkdir $BaseDir/local: $!\n";
+-	system("mv $BaseDir/$version $BaseDir/condor" );
+-
+-	# Remove leftovers from extracting built binaries.
+-	print "Removing $version tar file and extraction\n";
+-	system("rm -rf $version*");
+-
+-	# Add condor to the path and set a condor_config variable
+-	my $OldPath = $ENV{PATH} || die "PATH not in environment!\n";
+-	my $NewPath = "$BaseDir/condor/sbin:" . "$BaseDir/condor/bin:" . $OldPath;
+-	$ENV{PATH} = $NewPath;
+-	$ENV{CONDOR_CONFIG} = "$BaseDir/condor/condor_config";
+-	
+-} else {
+-	# windows personal condor setup
+-
+-	mkdir( "local", 0777 ) || die "Can't mkdir $BaseDir/local: $!\n";
+-	mkdir( "local/spool", 0777 ) || die "Can't mkdir $BaseDir/local/spool: $!\n";
+-	mkdir( "local/execute", 0777 ) || die "Can't mkdir $BaseDir/local/execute: $!\n";
+-	mkdir( "local/log", 0777 ) || die "Can't mkdir $BaseDir/local/log: $!\n";
+-
+-	# Remove leftovers from extracting built binaries.
+-	print "Removing $version.zip file\n";
+-	system("rm -rf $version.zip");
+-
+-	$Win32BaseDir = $ENV{WIN32_BASE_DIR} || die "WIN32_BASE_DIR not in environment!\n";
+-
+-	#print "current dir\n";
+-	#system("ls -l");
+-	#print "$BaseDir/condor_tests\n";
+-	#system("ls -l $BaseDir/condor_tests");
+-	#print "$BaseDir/condor/bin\n";
+-	#system("ls -l $BaseDir/condor/bin");
+-
+-	# Add condor to the path
+-	my $OldPath = $ENV{PATH} || die "PATH not in environment!\n";
+-	print "PATH=$OldPath\n";
+-	system ("which condor_master.exe");
+-	print "adding condor to the path\n";
+-	my $NewPath = "$BaseDir/condor/bin:" . $OldPath;
+-	$ENV{PATH} = $NewPath;
+-	print "PATH=$ENV{PATH}\n";
+-}
+-
+-
+-# -p means  just set up the personal condor for the test run
+-# move into the condor_tests directory first
+-
+-chdir( "$BaseDir/condor_tests" ) ||
+-    die "Can't chdir($BaseDir/condor_tests for personal condor setup): $!\n";
+-
+-print "About to run batch_test.pl --debug -p\n";
+-#system("env");
+-
+-system("perl $BaseDir/condor_tests/batch_test.pl --debug -p");
+-$batchteststatus = $?;
+-
+-# figure out here if the setup passed or failed.
+-if( $batchteststatus != 0 ) {
+-	exit 2;
+-}
+-
+-# sub copy_file {
+-#     my( $src, $dest ) = @_;
+-#     copy($src, $dest);
+-#     if( $? >> 8 ) {
+-#         print "Can't copy $src to $dest: $!\n";
+-#     } else {
+-#         print "Copied $src to $dest\n";
+-#     }
+-# }
+-# 
+-# sub safe_copy {
+-#     my( $src, $dest ) = @_;
+-# 	copy($src, $dest);
+-# 	if( $? >> 8 ) {
+-# 		print "Can't copy $src to $dest: $!\n";
+-# 		return 0;
+-#     } else {
+-# 		print "Copied $src to $dest\n";
+-# 		return 1;
+-#     }
+-# }
+-# 
+diff --git a/nmi_tools/glue/test/remote_pre_declare b/nmi_tools/glue/test/remote_pre_declare
+index 8629fc9..342b6b9 100755
+--- a/nmi_tools/glue/test/remote_pre_declare
++++ b/nmi_tools/glue/test/remote_pre_declare
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -18,68 +18,5 @@
+ ##
+ ##**************************************************************
+ 
+-######################################################################
+-# script to set up for Condor testsuite run
+-######################################################################
+-
+-use Cwd;
+-
+-my $BaseDir = getcwd();
+-
+-if( ($ENV{NMI_PLATFORM} =~ /winnt/) ){
+-	my $newbase = `cygpath -u $BaseDir`;
+-	chomp($newbase);
+-	$BaseDir = $newbase;
+-} 
+-
+-# autoflush our STDOUT
+-$| = 1;
+-
+-######################################################################
+-# set up environment and create env file for the rest of the scripts
+-######################################################################
+-
+-print "Setting up environtment file 'setup_test_env' for other scripts\n";
+-open( ENVSETUP, ">setup_test_env" ) || 
+-    die "cannot open setup_test_env for writing\n";
+-
+-print ENVSETUP "BASE_DIR=$BaseDir\n";
+-print ENVSETUP "export BASE_DIR\n";
+-
+-if( !($ENV{NMI_PLATFORM} =~ /winnt/) ) {
+-    print ENVSETUP "PATH=$BaseDir/nmi_tools/glue/test:$BaseDir/condor/bin:$BaseDir/condor/sbin:\$PATH\n";
+-    print ENVSETUP "CONDOR_CONFIG=$BaseDir/condor_tests/TestingPersonalCondor/condor_config\n";
+-} else {
+-    # we want UNIX-style paths for PATH (since we're using cygwin)
+-    print ENVSETUP "PATH=$BaseDir/nmi_tools/glue/test:$BaseDir/condor/bin:/bin:/usr/bin\n";
+-
+-    # Condor will want Win32-style paths for CONDOR_CONFIG
+-    my $Win32BaseDir = getcwd();
+-    print ENVSETUP "CONDOR_CONFIG=$Win32BaseDir\\condor_tests\\TestingPersonalCondor\\condor_config\n";
+-    
+-    # also, throw in the WIN32 version of the base directory path for later use
+-    print ENVSETUP "WIN32_BASE_DIR=$Win32BaseDir\n";
+-    print ENVSETUP "export WIN32_BASE_DIR\n";
+-}
+-
+-print ENVSETUP "export PATH\n";
+-print ENVSETUP "export CONDOR_CONFIG\n";
+-close(ENVSETUP);
+-
+-if( ($ENV{NMI_PLATFORM} =~ /winnt/) ){
+-	$res = system("d2u  setup_test_env");
+-	if($res != 0) {
+-		die "Failed to convert environment variable file\n";
+-	}
+-}
+-
+-close(ENVSETUP);
+-
+-if( ($ENV{NMI_PLATFORM} =~ /winnt/) ){
+-	$res = system("d2u  setup_test_env");
+-	if($res != 0) {
+-		die "Failed to convert environment variable file\n";
+-	}
+-}
+-
+-print "All steps completed successfully\n";
++print "Nothing to do for remote_pre_declare currently.\n";
++exit(0);
+diff --git a/nmi_tools/glue/test/remote_task b/nmi_tools/glue/test/remote_task
+index 1877c26..9599f0d 100755
+--- a/nmi_tools/glue/test/remote_task
++++ b/nmi_tools/glue/test/remote_task
+@@ -1,7 +1,7 @@
+-#!/bin/sh
++#!/usr/bin/env perl
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -19,28 +19,196 @@
+ ##**************************************************************
+ 
+ 
+-# $Id: remote_task,v 1.3 2007-11-08 22:53:46 nleroy Exp $
++######################################################################
++# run a test in the Condor testsuite
++# return val is the status of the test
++# 0 = built and passed
++# 1 = build failed
++# 2 = run failed
++# 3 = internal fatal error (a.k.a. die)
++######################################################################
+ 
+-# Condor implementation of NMI test infrastructure interface
+-# Simple wrapper to source the environment file and spawn the
+-# corresponding perl script for a given stage of the test.
++######################################################################
++###### WARNING!!!  The return value of this script has special  ######
++###### meaning, so you can NOT just call die().  you MUST       ######
++###### use the special c_die() method so we return 3!!!!        ######
++######################################################################
+ 
+-ENV_FILE=setup_test_env
+-TEST_FILE=test_task_env
++use strict;
++use warnings;
++use File::Copy;
++use File::Basename;
+ 
+-# include the environment info from the pre-script
+-if [ ! -f $ENV_FILE ]; then
+-    echo "$ENV_FILE does not exist!"
+-    exit 1
+-fi
+-. $ENV_FILE
++my $dir = dirname($0);
++unshift @INC, $dir;
++require "TestGlue.pm";
++TestGlue::setup_test_environment();
++TestGlue::setup_task_environment();
+ 
+-# look for passed in test environment file
+-if [ ! -f $TEST_FILE ]; then
+-    echo "No task environment file found!"
+-else
+-    echo "Found environment file for tests!"
+-    .  $TEST_FILE
+-fi
++if( ! defined $ENV{_NMI_TASKNAME} ) {
++    die "_NMI_TASKNAME not in environment, can't test anything!\n";
++}
++my $fulltestname = $ENV{_NMI_TASKNAME};
+ 
+-exec remote_task.pl $*
++print "Test environment variable GCBTARGET = '$ENV{GCBTARGET}'\n";
++
++if( $fulltestname =~ /remote_task/) {
++    die "_NMI_TASKNAME set to remote_task meaning 0 tests seen!\n";
++}
++
++if( ! $fulltestname ) {
++    # if we have no task, just return success immediately
++    print "No tasks specified, returning SUCCESS\n";
++    exit 0;
++}
++
++my $BaseDir  = $ENV{BASE_DIR} || c_die("BASE_DIR is not in environment!\n");
++my $test_dir = File::Spec->catdir($BaseDir, "condor_tests");
++
++# iterations have numbers placed at the end of the name
++# for unique db tracking in nmi for now.
++if($fulltestname =~ /([\w\-\.\+]+)-\d+/) {
++    my $matchingtest = $fulltestname . ".run";
++    if(!(-f $matchingtest)) {
++        # if we don't have a test called this, strip iterator off
++        $fulltestname = $1;
++    }
++}
++
++
++######################################################################
++# get the testname and group
++######################################################################
++
++my @testinfo = split(/\./, $fulltestname);
++my $testname = $testinfo[0];
++my $compiler = $testinfo[1];
++
++if( ! $testname ) {
++    c_die("Invalid input for testname\n");
++}
++
++#track time.....
++print scalar(localtime);
++
++print "Testname: '$testname'\n";
++if( not TestGlue::is_windows() ) {
++    if( $compiler ) {
++        print "compiler is $compiler\n";
++    }
++    else {
++        $compiler = ".";
++    }
++}
++else {
++    $compiler = ".";
++}
++
++######################################################################
++# run the test using batch_test.pl
++######################################################################
++
++# Some of the tests fail because the schedd fsync can take 30 seconds
++# or more on busy nmi filesystems, which causes the tools to timeout.
++# Up the tool timeout multipler to try to deal with this.
++$ENV{_condor_TOOL_TIMEOUT_MULTIPLIER}="4";
++
++print "RUNNING $testname\n";
++chdir($test_dir) || c_die("Can't chdir($test_dir): $!\n");
++
++# -b means build & test and ensures the first time that we have our testing
++# personal condor configured from release generic config files.
++print "About to run batch_test.pl\n";
++
++system("perl batch_test.pl --no-error -d $compiler -t $testname -b");
++my $batchteststatus = $?;
++
++# figure out here if the test passed or failed.  
++my $teststatus;
++if( $batchteststatus != 0 ) {
++    $teststatus = 2;
++}
++else {
++    $teststatus = 0;
++}
++
++######################################################################
++# print output from .run script to stdout of this task, and final exit
++######################################################################
++
++my $compiler_path = File::Spec->catpath($test_dir, $compiler);
++chdir($compiler_path) || c_die("Can't chdir($compiler_path): $!\n");
++my $run_out       = "$testname.run.out";
++my $run_out_path  = File::Spec->catfile($compiler_path, $run_out);
++my $test_out      = "$testname.out";
++my $test_out_path = File::Spec->catfile($compiler_path, $test_out);
++my $test_err      = "$testname.err";
++my $test_err_path = File::Spec->catfile($compiler_path, $test_err);
++
++if( ! -f $run_out_path ) {
++    if( $teststatus == 0 ) {
++        # if the test passed but we don't have a run.out file, we
++        # should consider that some kind of weird error
++        c_die("ERROR: test passed but $run_out does not exist!");
++    }
++    else {
++        # if the test failed, this isn't suprising.  we can print it, 
++        # but we should just treat it as if the test failed, not an
++        # internal error. 
++        print "\n\nTest failed and $run_out does not exist\n";
++    }
++}
++else {
++    # spit out the contents of the run.out file to the stdout of the task
++    if( open(RES, '<', $run_out_path) ) {
++        print "\n\n----- Start of $run_out -----\n";
++        while(<RES>) {
++            print "$_";
++        }
++        close RES;
++        print "\n----- End of $run_out -----\n";
++    }
++    else {
++        print "\n\nERROR: failed to open $run_out_path: $!\n";
++    }
++}
++
++# add test.out and test.err to run output if they exist
++
++# spit out the contents of the test.out file to the stdout of the task
++if( open(RES, '<', $test_out_path) ) {
++    print "\n\n----- Start of $test_out -----\n";
++    while(<RES>) {
++        print "$_";
++    }
++    close RES;
++    print "\n----- End of $test_out -----\n";
++}
++else {
++    print "\n\nERROR: failed to open $test_out_path: $!\n";
++}
++
++# spit err the contents of the test.err file to the stdout of the task
++if( open(RES, '<', $test_err_path) ) {
++    print "\n\n----- Start of $test_err -----\n";
++    while(<RES>) {
++        print "$_";
++    }
++    close RES;
++    print "\n----- End of $test_err -----\n";
++}
++else {
++    print "\n\nERROR: failed to open $test_err_path: $!\n";
++}
++
++exit $teststatus;
++
++######################################################################
++# helper methods
++######################################################################
++
++sub c_die {
++    my( $msg ) = @_;
++    print $msg;
++    exit 3;
++}
+diff --git a/nmi_tools/glue/test/remote_task.pl b/nmi_tools/glue/test/remote_task.pl
+deleted file mode 100755
+index b73e1e7..0000000
+--- a/nmi_tools/glue/test/remote_task.pl
++++ /dev/null
+@@ -1,209 +0,0 @@
+-#!/usr/bin/env perl
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-
+-######################################################################
+-# run a test in the Condor testsuite
+-# return val is the status of the test
+-# 0 = built and passed
+-# 1 = build failed
+-# 2 = run failed
+-# 3 = internal fatal error (a.k.a. die)
+-######################################################################
+-
+-######################################################################
+-###### WARNING!!!  The return value of this script has special  ######
+-###### meaning, so you can NOT just call die().  you MUST       ######
+-###### use the special c_die() method so we return 3!!!!        ######
+-######################################################################
+-
+-use File::Copy;
+-
+-if( ! defined $ENV{_NMI_TASKNAME} ) {
+-    die "_NMI_TASKNAME not in environment, can't test anything!\n";
+-}
+-my $fulltestname = $ENV{_NMI_TASKNAME};
+-
+-my $testenvtst =   $ENV{GCBTARGET};
+-print "Test for test environment variable GCBTARGET yields <$testenvtst>\n";
+-
+-if( $fulltestname =~ /remote_task/) {
+-	die "_NMI_TASKNAME set to remote_task meaning 0 tests seen!\n";
+-}
+-
+-if( ! $fulltestname ) {
+-    # if we have no task, just return success immediately
+-    print "No tasks specified, returning SUCCESS\n";
+-    exit 0;
+-}
+-
+-my $BaseDir = $ENV{BASE_DIR} || c_die("BASE_DIR is not in environment!\n");
+-my $testdir = "condor_tests";
+-
+-# iterations have numbers placed at the end of the name
+-# for unique db tracking in nmi for now.
+-if($fulltestname =~ /([\w\-\.\+]+)-\d+/) {
+-    my $matchingtest = $fulltestname . ".run";
+-    if(!(-f $matchingtest)) {
+-        # if we don't have a test called this, strip iterator off
+-        $fulltestname = $1;
+-    }
+-}
+-
+-
+-######################################################################
+-# get the testname and group
+-######################################################################
+-
+- at testinfo = split(/\./, $fulltestname);
+-my $testname = $testinfo[0];
+-my $compiler = $testinfo[1];
+-
+-if( ! $testname ) {
+-    c_die("Invalid input for testname\n");
+-}
+-
+-#track time.....
+-
+-system("date");
+-
+-print "testname is $testname\n";
+-if( !($ENV{NMI_PLATFORM} =~ /winnt/) ) {
+-    if( $compiler ) {
+-        print "compiler is $compiler\n";
+-        $targetdir = "$BaseDir/$testdir/$compiler";
+-    } else {
+-        $compiler = ".";
+-        $targetdir = "$BaseDir/$testdir";
+-    }
+-} else {
+-    $compiler = ".";
+-    $targetdir = "$BaseDir/$testdir";
+-}
+-
+-######################################################################
+-# run the test using batch_test.pl
+-######################################################################
+-
+-print "RUNNING $testinfo\n";
+-chdir("$BaseDir/$testdir") || c_die("Can't chdir($BaseDir/$testdir): $!\n");
+-
+-print "About to run batch_test.pl\n";
+-
+-# -b means build & test and ensures the first time that
+-# we have our testing personal condor configered from
+-# release generic config files.
+-
+-system("perl ./batch_test.pl --no-error -d $compiler -t $testname -b");
+-$batchteststatus = $?;
+-
+-# figure out here if the test passed or failed.  
+-if( $batchteststatus != 0 ) {
+-    $teststatus = 2;
+-} else {
+-    $teststatus = 0;
+-}
+-
+-######################################################################
+-# print output from .run script to stdout of this task, and final exit
+-######################################################################
+-
+-chdir( "$BaseDir/$testdir/$compiler" ) ||
+-  c_die("Can't chdir($BaseDir/$testdir/$compiler): $!\n");
+-$local_out = "$BaseDir/$testdir/TestingPersonalCondor/condor_config.local";
+-$run_out = "$testname.run.out";
+-$run_out_full = "$BaseDir/$testdir/$compiler/$run_out";
+-$test_out = "$testname.out";
+-$test_out_full = "$BaseDir/$testdir/$compiler/$test_out";
+-$test_err = "$testname.err";
+-$test_err_full = "$BaseDir/$testdir/$compiler/$test_err";
+-
+-if( ! -f $run_out_full ) {
+-    if( $teststatus == 0 ) {
+-        # if the test passed but we don't have a run.out file, we
+-        # should consider that some kind of weird error
+-        c_die("ERROR: test passed but $run_out does not exist!");
+-    } else {
+-        # if the test failed, this isn't suprising.  we can print it, 
+-        # but we should just treat it as if the test failed, not an
+-        # internal error. 
+-        print "\n\nTest failed and $run_out does not exist\n";
+-    }
+-} else {
+-    # spit out the contents of the run.out file to the stdout of the task
+-    if( open(RES, "<$run_out_full") ) {
+-        print "\n\n----- Start of $run_out -----\n";
+-        while(<RES>) {
+-            print "$_";
+-        }
+-        close RES;
+-        print "\n----- End of $run_out -----\n";
+-    } else {
+-        print "\n\nERROR: failed to open $run_out_full: $!\n";
+-    }
+-}
+-# add test.out and test.err to run output if they exist
+-
+-# spit out the contents of the test.out file to the stdout of the task
+-if( open(RES, "<$test_out_full") ) {
+-    print "\n\n----- Start of $test_out -----\n";
+-    while(<RES>) {
+-        print "$_";
+-    }
+-    close RES;
+-    print "\n----- End of $test_out -----\n";
+-} else {
+-    print "\n\nERROR: failed to open $test_out_full: $!\n";
+-}
+-
+-# spit err the contents of the test.err file to the stdout of the task
+-if( open(RES, "<$test_err_full") ) {
+-    print "\n\n----- Start of $test_err -----\n";
+-    while(<RES>) {
+-        print "$_";
+-    }
+-    close RES;
+-    print "\n----- End of $test_err -----\n";
+-} else {
+-    print "\n\nERROR: failed to open $test_err_full: $!\n";
+-}
+-# add  local config file
+-if( open(RES, "<$local_out") ) {
+-    print "\n\n----- Start of TestingPersonalCondor/condor_config.local -----\n";
+-    while(<RES>) {
+-        print "$_";
+-    }
+-    close RES;
+-    print "\n----- End of TestingPersonalCondor/condor_config.local -----\n";
+-} else {
+-    print "\n\nERROR: failed to open $test_err_full: $!\n";
+-}
+-
+-exit $teststatus;
+-
+-######################################################################
+-# helper methods
+-######################################################################
+-
+-sub c_die {
+-    my( $msg ) = @_;
+-    print $msg;
+-    exit 3;
+-}
+diff --git a/nmi_tools/www/results/Condor-testsuite-home.php b/nmi_tools/www/results/Condor-testsuite-home.php
+deleted file mode 100644
+index 91e69f2..0000000
+--- a/nmi_tools/www/results/Condor-testsuite-home.php
++++ /dev/null
+@@ -1,106 +0,0 @@
+-<html>
+-<body bgcolor="#ffffff" text="#000033" link="#666699"  alink=#000000 vlink="#333333">
+-
+-<title>Condor testsuite results</title>
+-<center><h2>Condor testsuite results </h2>
+-
+-<?php
+-  $dbName = "nmi_history";
+-  $dbUsername = "nmipublic";
+-  $dbPassword = ""; 
+-  $currentDir = "results";
+-
+-  # get args
+-  $args["gid"] = $_REQUEST["gid"];
+-  $args["runid"] = $_REQUEST["runid"];
+-  $args["description"] = $_REQUEST["description"];
+-  
+-  $runid = $args["runid"];
+-  $description = $args["description"];
+-  echo "for build tag $description";
+-  printf("<br><br>", "");
+-
+-  $query1 = "SELECT * FROM Run where description='$description' and run_type='test' ORDER BY runid";
+-  $platforms = array();
+-  $runids = array("0" => "");
+-  $basedir = "rundir";  
+- 
+-  $db = mysql_connect("mysql.batlab.org", "$dbUsername", "$dbPassword") or die ("Could not connect : " . mysql_error());
+-  mysql_select_db("$dbName") or die("Could not select database");
+-  $result1 = mysql_query($query1) or die ("Query failed : " . mysql_error());
+-
+-  while( $myrow = mysql_fetch_array($result1) ) {
+-    $gid = $myrow["gid"];
+-    $runid = $myrow["runid"];
+-    $run_type = $myrow["run_type"];
+-    $description = $myrow["description"];
+-    $result = $myrow["result"];
+-    $base = "$basedir/$gid";
+-    $temprunid = $myrow["runid"];
+-    $runids["$temprunid"] = "$base";
+-  }
+-  echo "<center><table width=400 border=1 bgcolor=ffffff>";
+-  echo "<tr bgcolor=ffffff>";
+-  echo "<td width=100>Runid</td>";  
+-  echo "<td width=200>Platform</td>";  
+-  echo "<td width=50>Results</td>";  
+-  echo "<td width=50>run dir</td>";  
+-  echo "</tr>"; 
+-
+-  foreach ($runids as $key => $val) {
+-    if ($key != "0" ) {
+-      echo "<tr>";
+-      $total = 0;
+-      $found = 0;
+-      $running = 0;
+-      $query2 = "SELECT * FROM Task where runid=$key";
+-      $result2 = mysql_query($query2) or die ("Query failed : " . mysql_error());
+-      while( $myrow = mysql_fetch_array($result2) ) {
+-        $platform = $myrow["platform"];
+-        array_push( $platforms, "$platform" );
+-        $result = $myrow["result"];
+-        
+-        $taskname = $myrow["name"]; 
+-        if ( $taskname == "remote_task") {
+-          $total = $result;
+-          $found = 1;
+-        }
+-        # find if the run is complete 
+-        if ( is_null($result) ) {
+-          $running = 1;
+-        }
+-      } 
+-      $platforms = array_unique( $platforms ); 
+-      unset($platforms['local']);
+-
+-      foreach ($platforms as $key1 ) {
+-        $currPlat = $key1;   
+-        unset($platforms['$currPlat']);
+-      }
+-      echo "<td><a href=\"http://grandcentral.cs.wisc.edu/$currentDir/Task-search.php?runid=$key\">$key</a></td>";
+-      printf("<td>%s</td>", $currPlat);
+-     
+-      if ($found == 0) { # no remote task result, the test run failed miserably 
+-        printf("<td bgcolor=red>%s</td>", "testsuite failed");
+-      } else if ( $running == 1) { # tests in progress
+-        printf("<td bgcolor=yellow>%s</td>", "running");
+-      } else if ( $total == 0) { # all tests passed
+-        printf("<td bgcolor=green>%s</td>", $total);
+-      } else { # some tests failed 
+-        printf("<td bgcolor=red>%s</td>", $total);
+-      }
+-      echo "<td><a href=\"http://grandcentral.cs.wisc.edu/$val\">run dir</a></td>";
+-      echo "</tr>";
+-    }
+-  }
+-  echo "</table>";
+-  echo "</center>";
+-
+-#mysql_free_result($result1);
+-#mysql_free_result($result2);
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+-
+diff --git a/nmi_tools/www/results/Queue-depth.php b/nmi_tools/www/results/Queue-depth.php
+index e372c0e..ac0f5c3 100644
+--- a/nmi_tools/www/results/Queue-depth.php
++++ b/nmi_tools/www/results/Queue-depth.php
+@@ -1,18 +1,25 @@
+ <?php   
+-   // Configuration
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   # get args
+-   $branch = "trunk";
+-   $user = "cndrauto";
+-   $type = "build";
++// Configuration
++define("CONDOR_USER", "cndrauto");
++
++require_once "./load_config.inc";
++load_config();
++
++# get args
++$branches = array("trunk", "NMI Ports - trunk");
++$user = "cndrauto";
++
++if($_REQUEST["type"] != "") {
++  $type = $_REQUEST["type"];
++}
++else {
++  $type = "build";
++}
+ ?>
++
+ <html>
+ <head>
+-<title>NMI - Queue depths for core platforms</title>
++<title>NMI - Build queue depths for core platforms</title>
+ <LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+ </head>
+ <body>
+@@ -24,92 +31,104 @@ mysql_select_db(DB_NAME) or die("Could not select database");
+ 
+ include "last.inc";
+ 
+-//
+-// First get a runid of a recent build.
+-//
+-$sql = "SELECT runid
++// Create the sidebar
++echo "<div id='wrap'>";
++make_sidebar();
++
++// Now create the HTML tables.
++echo "<div id='main'>\n";
++
++echo "<h2>NMI build queue depths:</h2>\n";
++echo "<p>This page contains depth information for jobs of type \"build\" only</p>\n";
++
++
++foreach ($branches as $branch) {
++  //
++  // First get a runid of a recent build.
++  //
++  $sql = "SELECT runid
+           FROM Run 
+-         WHERE component='condor' AND 
+-               project='condor' AND
+-               run_type='build' AND
+-               user = '$user' AND
+-               description LIKE '".$branch."%'".
+-       " ORDER BY runid DESC ".
+-       " LIMIT 1";
+-
+-$result = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-while ($row = mysql_fetch_array($result)) {
+-  $runid = $row["runid"];
+-  //echo "Using RunID: $runid";
+-}
+-mysql_free_result($result);
+-
+-//
+-// Then get the platform list using that runid
+-//
+-$sql = "SELECT DISTINCT(platform) AS platform
+-        FROM Run, Task
+-        WHERE Task.runid = $runid
++          WHERE component='condor' AND 
++                project='condor' AND
++                run_type='$type' AND
++                user = '$user' AND
++                description LIKE '$branch%'
++          ORDER BY runid DESC
++          LIMIT 1";
++
++  $result = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
++  while ($row = mysql_fetch_array($result)) {
++    $runid = $row["runid"];
++    //echo "Using RunID: $runid";
++  }
++  mysql_free_result($result);
++  
++  //
++  // Then get the platform list using that runid
++  //
++  $sql = "SELECT DISTINCT(platform) AS platform
++          FROM Run, Task
++          WHERE Task.runid = $runid
+           AND Task.runid = Run.runid
+           AND Run.user = '$user' 
+           AND Task.platform != 'local' ";
+ 
+-$result = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
+-$platforms = Array();
+-while ($row = mysql_fetch_array($result)) {
+-  array_push($platforms, $row["platform"]);
+-}
+-mysql_free_result($result);
+-//echo "Found platforms: " . implode(", ", $platforms);
+-?>
+-<h2>NMI queue depths:</h2>   
+-<table border="0" cellspacing="0" >
+-<tr>
+-
+-<?php
+-// show link to run directory for each platform
+-foreach ($platforms AS $platform) {
+-  // We will remove 'nmi:' from the front of the platform and also split it 
+-  // onto two separate lines because the length of the header determines the
+-  // width of the resulting table column.
+-  $display = preg_replace("/nmi:/", "", $platform);
+-  $display = preg_replace("/_/", "_ ", $display, 1);
+-
+-  $ret = get_queue_for_nmi_platform($platform, $type);
+-  $depth = $ret[0];
+-  $queue_depth = $ret[1];
+-  
+-  $color = "";
+-  if($depth == 0) {
+-    $color = "#0000FF";
+-  }
+-  elseif($depth > 0 and $depth < 3) {
+-    $color = "#00FF00";
+-  }
+-  elseif($depth >= 3 and $depth < 6) {
+-    $color = "#FFFF00";
+-  }
+-  elseif($depth >= 6) {
+-    $color = "#FF0000";
++  $result = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  $platforms = Array();
++  while ($row = mysql_fetch_array($result)) {
++    array_push($platforms, $row["platform"]);
+   }
++  mysql_free_result($result);
+ 
+-  echo "<td align=\"center\" style=\"background-color:$color\">$display $queue_depth</td>\n";
+-}
+-?>
++  echo "<h3>Branch - $branch</h3>\n";
++  echo "<table border='0' cellspacing='0'>\n";
++  echo "<tr>\n";
+ 
+-<?php
+-echo "</table>";
++  // show link to run directory for each platform
++  foreach ($platforms AS $platform) {
++    // We will remove 'nmi:' from the front of the platform and also split it 
++    // onto two separate lines because the length of the header determines the
++    // width of the resulting table column.
++    $display = preg_replace("/nmi:/", "", $platform);
++    #$display = preg_replace("/_/", "_ ", $display, 1);
++    
++    $ret = get_queue_for_nmi_platform($platform, $type);
++    $depth = $ret[0];
++    $queue_depth = $ret[1];
++    
++    $color = "";
++    if($depth == 0) {
++      $color = "#00FFFF";
++    }
++    elseif($depth > 0 and $depth < 3) {
++      $color = "#00FF00";
++    }
++    elseif($depth >= 3 and $depth < 6) {
++      $color = "#FFFF00";
++    }
++    elseif($depth >= 6) {
++      $color = "#FF0000";
++    }
++    
++    echo "<td align=\"center\" style=\"background-color:$color\">$display $queue_depth</td>\n";
++  }
+ 
++  echo "</table>\n";
++}
+ mysql_close($db);
+ ?>
+ 
+ <p>Legend:
+ <table>
+ <tr>
+-<td style="background-color:#0000FF">Depth 0</td>
++<td style="background-color:#00FFFF">Depth 0</td>
+ <td style="background-color:#00FF00">Depth 1-2</td>
+ <td style="background-color:#FFFF00">Depth 3-5</td>
+ <td style="background-color:#FF0000">Depth 6+</td>
+ 
++</div>
++<div id='footer'>&nbsp;</div>
++</div>
++
+ </body>
+ </html>
+diff --git a/nmi_tools/www/results/Run-condor-details.php b/nmi_tools/www/results/Run-condor-details.php
+index 2841097..9084fd4 100644
+--- a/nmi_tools/www/results/Run-condor-details.php
++++ b/nmi_tools/www/results/Run-condor-details.php
+@@ -1,27 +1,25 @@
+ <?php   
+-   //
+-   // Configuration
+-   //
+-   define("HISTORY_URL", "./Test-history.php?branch=%s&test=%s");
+-   define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
+-   define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s");
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   $result_types = Array( "passed", "pending", "failed" );
++//
++// Configuration
++//
++define("HISTORY_URL", "./Test-history.php?branch=%s&test=%s");
+ 
+-   require_once "./load_config.inc";
+-   load_config();
++$result_types = Array( "passed", "pending", "failed" );
+ 
+-   # get args
+-   $type = $_REQUEST["type"];
+-   $runid = (int)$_REQUEST["runid"];
+-   $user = $_REQUEST["user"];
+-   $build_id = $runid;
+-   $branch = "unknown";
+-   
+-   define('PLATFORM_PENDING', 'pending');
+-   define('PLATFORM_FAILED',  'failed');
+-   define('PLATFORM_PASSED',  'passed');
++require_once "./load_config.inc";
++load_config();
++
++# get args
++$type     = $_REQUEST["type"];
++$runid    = (int)$_REQUEST["runid"];
++$user     = $_REQUEST["user"];
++$timed    = array_key_exists("timed", $_REQUEST) ? $_REQUEST["timed"] : "";
++$build_id = $runid;
++$branch   = "unknown";
++
++define('PLATFORM_PENDING', 'pending');
++define('PLATFORM_FAILED',  'failed');
++define('PLATFORM_PASSED',  'passed');
+ ?>
+ <html>
+ <head>
+@@ -35,7 +33,7 @@
+ $db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+ mysql_select_db(DB_NAME) or die("Could not select database");
+ 
+-include "last.inc";
++include "dashboard.inc";
+ 
+ // 
+ // need to have the branch if we get a request for a test history
+@@ -75,6 +73,10 @@ mysql_free_result($result);
+ echo "<h1><a href=\"./Run-condor.php\" class=\"title\">Condor Latest Build/Test Results</a> " .
+      ":: ".ucfirst($type)."s for Build ID $runid $branch (".date("m/d/Y", $start).")</h1>\n";
+ 
++if(!$timed) {
++  echo "<p><a href='http://" . $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI'] . "&timed=1'>Show this page with test times</a>\n";
++}
++
+ //
+ // Platforms
+ //
+@@ -135,12 +137,11 @@ else {
+ $result = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
+ while ($row = mysql_fetch_array($result)) {
+   $task_name = $row["name"];
+-  //echo "<H3>$tmp</H3>";
+   
+   //
+   // Now for each task, get the status from the platforms
+   //
+-  $sql = "SELECT platform, result, runid ".
++  $sql = "SELECT platform, result, runid, TIME_TO_SEC(TIMEDIFF(Finish, Start)) as length ".
+     "  FROM Task ".
+     " WHERE Task.runid IN (".implode(",", $runids).") ".
+     "   AND Task.name = '$task_name'";
+@@ -149,6 +150,7 @@ while ($row = mysql_fetch_array($result)) {
+     $platform = $task_row["platform"];
+     $platform_runids[$platform] = $task_row["runid"];
+     $result_value = $task_row["result"];
++    $length = $task_row["length"];
+     
+     if (is_null($result_value)) {
+       $result_value = PLATFORM_PENDING;
+@@ -159,33 +161,28 @@ while ($row = mysql_fetch_array($result)) {
+       $platform_status[$platform] = PLATFORM_FAILED;
+       $task_status[$task_name] = PLATFORM_FAILED;
+     }
+-    elseif (!$platform_status[$platform]) {
++    elseif(!array_key_exists($platform, $platform_status)) {
+       $platform_status[$platform] = PLATFORM_PASSED;
+     }
+-    if (!$task_status[$task_name]) {
++
++    if(!array_key_exists($task_name, $task_status)) {
+       $task_status[$task_name] = PLATFORM_PASSED;
+     }
+-    $data[$row["name"]][$task_row["platform"]] = $result_value;
+-  } // WHILE
++    $data[$row["name"]][$task_row["platform"]] = Array($result_value, $length);
++  }
+   mysql_free_result($task_result);
+-} // WHILE
++}
+ mysql_free_result($result);
+-// need to lookup location later.....mysql_close($db);
+-   
+-?>
+ 
+-<table border="0" cellspacing="0" >
+-<tr>
+-   <td>Name</td>
+-<?php
++echo "<table border='0' cellspacing='0'>\n";
++echo "<tr>\n";
++echo "   <td>Name</td>\n";
++
++$hosts = get_hosts(Array($runid));
++
+ // show link to run directory for each platform
+ foreach ($platforms AS $platform) {
+-  // We will remove 'nmi:' from the front of the platform and also split it 
+-  // onto two separate lines because the length of the header determines the
+-  // width of the resulting table column.
+   $display = preg_replace("/nmi:/", "", $platform);
+-  $display = preg_replace("/_/", "_ ", $display, 1);
+-
+    
+   // have to lookup the file location now
+   $filepath = "";
+@@ -203,21 +200,23 @@ foreach ($platforms AS $platform) {
+     $queue_depth = $ret[1];
+   }
+ 
+-  $display = "<a href=\"$filepath/$mygid/userdir/$platform/\" title=\"View Run Directory\">$display</a>";
+-  echo "<td align=\"center\" class=\"".$platform_status[$platform]."\">$display $queue_depth</td>\n";
+-} // FOREACH 
++  $remote_host = "";
++  if(array_key_exists($display, $hosts[$runid])) {
++    $remote_host = "<br><font style='font-size:75%'>" . $hosts[$runid][$display] . "</font>";
++  }
++
++  $display = "<a href='$filepath/$mygid/userdir/$platform/' title='View Run Directory'>$display</a>";
++  echo "<td align='center' class='".$platform_status[$platform]."'>$display $remote_host $queue_depth</td>\n";
++}
++
+ ?>
+ <tr>
+    <td>Results</td>
+ <?php
+ // show link to results for each platform
+ foreach ($platforms AS $platform) {
+-  $display = $platform;
+-  $idx = strpos($display, "_");
+-  $display[$idx] = " ";
+-  $filepath = "";
+-  
+   // have to lookup the file location now
++  $filepath = "";
+   $loc_query = "SELECT * FROM Run WHERE runid='$platform_runids[$platform]'";
+   $loc_query_res = mysql_query($loc_query) or die ("Query failed : " . mysql_error());
+   while( $locrow = mysql_fetch_array($loc_query_res) ) {
+@@ -225,9 +224,10 @@ foreach ($platforms AS $platform) {
+     $mygid = $locrow["gid"];
+   }
+ 
+-  $display = "<a href=\"$filepath/$mygid/userdir/$platform/results.tar.gz\" title=\"View Run Directory\">click</a>";
+-  echo "<td align=\"center\" class=\"".$platform_status[$platform]."\">$display</td>\n";
+-} // FOREACH 
++  $display = "<a href='$filepath/$mygid/userdir/$platform/results.tar.gz' title='View Run Directory'>click</a>";
++  echo "<td align='center' class='".$platform_status[$platform]."'>$display</td>\n";
++}
++
+ foreach ($data AS $task => $arr) {
+   if ($type == 'test') {
+     $history_url = sprintf(HISTORY_URL,$branch,rawurlencode($task));
+@@ -244,17 +244,42 @@ foreach ($data AS $task => $arr) {
+       "<span title=\"$task\">".limitSize($task, 30)."</span></td>\n";
+   }
+   foreach ($platforms AS $platform) {
+-    $result = $arr[$platform];
++    if(!array_key_exists($platform, $arr)) {
++      echo "<td align='center'>&nbsp;</td>\n";
++      continue;
++    }
++
++    $result = $arr[$platform][0];
++    $length = $arr[$platform][1];
+     if ($result == PLATFORM_PENDING) {
+-      echo "<td align=\"center\" class=\"{$result}\">-</td>\n";
++      echo "<td align='center' class='$result'>-</td>\n";
+     }
+     else {
+       if ($result == '') {
+-        echo "<td align=\"center\">&nbsp;</td>\n";
++        echo "<td align='center'>&nbsp;</td>\n";
+       }
+       else {
+-        $display = "<a href=\"http://$host/results/Run-condor-taskdetails.php?platform={$platform}&task=".urlencode($task)."&type=".$type."&runid=".$platform_runids[$platform]. "\">$result</a>";
+-        echo "<td class=\"".($result == 0 ? PLATFORM_PASSED : PLATFORM_FAILED)."\" align=\"center\"><B>$display</B></td>\n";
++        $height = "";
++        if($timed) {
++          if($task != "platform_job" and $task != "remote_task") {
++            # Keep the font from getting too small or too large
++            $size = ($length < 50) ? 50 : (($length > 1000) ? 1000 : $length);
++            $height = "font-size:$size%;";
++          }
++        }
++
++        $display = "";
++        if($timed) {
++          $display .= sec_to_min($length) . " (";
++        }
++
++        $display .= "<a href=\"http://$host/results/Run-condor-taskdetails.php?platform=$platform&task=".urlencode($task)."&type=".$type."&runid=".$platform_runids[$platform]. "\">$result</a>";
++
++        if($timed) {
++          $display .= ")";
++        }
++
++        echo "<td class='".($result == 0 ? PLATFORM_PASSED : PLATFORM_FAILED)."' style='text-align:center;$height'>$display</td>\n";
+       }
+     }
+   }
+@@ -269,9 +294,17 @@ function limitSize($str, $cnt) {
+   return ($str);
+ }
+ 
++function sec_to_min($sec) {
++  $min = floor($sec / 60);
++  $sec = $sec % 60;
++  if($sec < 10) {
++    $sec = "0$sec";
++  }
++  return "$min:$sec";
++}
++
+ // done looking up locations.....mysql_close($db);
+ mysql_close($db);
+ ?>
+ </body>
+ </html>
+-
+diff --git a/nmi_tools/www/results/Run-condor-taskdetails.php b/nmi_tools/www/results/Run-condor-taskdetails.php
+index e06b299..0f4ca08 100644
+--- a/nmi_tools/www/results/Run-condor-taskdetails.php
++++ b/nmi_tools/www/results/Run-condor-taskdetails.php
+@@ -133,9 +133,11 @@ while( $myrow = mysql_fetch_array($result) ) {
+   else {
+     $stat = stat("$filepath.out");
+     $stdout_size = $stat['size'];
++    $stdout_size_display = number_format($stdout_size);
+     
+     $stat = stat("$filepath.err");
+     $stderr_size = $stat['size'];
++    $stderr_size_display = number_format($stderr_size);
+     
+     $stdout_url = "<a href=\"http://$hostname/$filepath.out\">".basename($filepath).".out</a>";
+     $stderr_url = "<a href=\"http://$hostname/$filepath.err\">".basename($filepath).".err</a>";
+@@ -160,34 +162,31 @@ while( $myrow = mysql_fetch_array($result) ) {
+   
+   $resultval = $myrow["result"];
+   $test_results_url = "<a href=\"http://nmi.cs.wisc.edu/node/552\">".$resultval."</a>";
+-  echo "<P>";
+-  echo "<TABLE>";
+-#    echo "<TR><TD>Run ID:</TD><TD><a href=\"http://$hostname/nmi/?page=results/runDetails&id=".$myrow["runid"] ."\">".$myrow["runid"]."</a></TD></TR>";
+-    #echo "<TR><TD>Run ID:</TD><TD><a href=\"http://$hostname/nmi/?page=results/runDetails&runid=".$myrow["runid"] 
+-  echo "<TR><TD>Run ID:</TD><TD><a href=\"./Task-search.php?runid=".$myrow["runid"]."&Submit=Search+by+RunID" 
+-    ."\">".$myrow["runid"]."</a></TD></TR>";
+-  echo "<TR><TD>GID:</TD><TD>".$myrow["gid"] ."</TD></TR>";
+-  echo "<TR><TD>Task ID:</TD><TD>".$myrow["task_id"] ."</TD></TR>";
+-  echo "<TR><TD>Start:</TD><TD>".$myrow["start"] ."</TD></TR>";
+-  echo "<TR><TD>Finish:</TD><TD> ".$myrow["finish"] ."</TD></TR>";
+-  echo "<TR><TD>Duration:</TD><TD> ".$myrow["duration"] ."</TD></TR>";
+-  echo "<TR><TD>Result:</TD><TD> $test_results_url </TD></TR>";
+-  echo "<TR><TD>Stdout:</TD><TD> $stdout_url - (size: $stdout_size bytes) </TD></TR>";
+-  echo "<TR><TD>Stderr:</TD><TD> $stderr_url - (size: $stderr_size bytes) </TD></TR>";
+-  echo "<TR><TD>Run Results:</TD><TD> $results_url</a></TD></TR>";
+-  echo "<TR><TD># warnings STDOUT:</td><td>$num_warnings</td></tr>";
+-  echo "<TR><TD># warnings STDERR:</td><td>$num_warnings_stderr</td></tr>";
+-  echo "</TABLE>";
+-  echo "</P>";
++  echo "<p>";
++  echo "<table>";
++#    echo "<tr><td>Run ID:</td><td><a href=\"http://$hostname/nmi/?page=results/runDetails&id=".$myrow["runid"] ."\">".$myrow["runid"]."</a></td></tr>";
++    #echo "<tr><td>Run ID:</td><td><a href=\"http://$hostname/nmi/?page=results/runDetails&runid=".$myrow["runid"] 
++  echo "<tr><td>Run ID:</td><td><a href=\"./Task-search.php?runid=".$myrow["runid"]."&Submit=Search+by+RunID" 
++    ."\">".$myrow["runid"]."</a></td></tr>";
++  echo "<tr><td>GID:</td><td>".$myrow["gid"] ."</td></tr>";
++  echo "<tr><td>Task ID:</td><td>".$myrow["task_id"] ."</td></tr>";
++  echo "<tr><td>Start:</td><td>".$myrow["start"] ."</td></tr>";
++  echo "<tr><td>Finish:</td><td> ".$myrow["finish"] ."</td></tr>";
++  echo "<tr><td>Duration:</td><td> ".$myrow["duration"] ."</td></tr>";
++  echo "<tr><td>Result:</td><td> $test_results_url </td></tr>";
++  echo "<tr><td>Stdout:</td><td> $stdout_url - (size: $stdout_size_display bytes) </td></tr>";
++  echo "<tr><td>Stderr:</td><td> $stderr_url - (size: $stderr_size_display bytes) </td></tr>";
++  echo "<tr><td>Run Results:</td><td> $results_url</a></td></tr>";
++  echo "<tr><td># warnings STDOUT:</td><td>$num_warnings</td></tr>";
++  echo "<tr><td># warnings STDERR:</td><td>$num_warnings_stderr</td></tr>";
++  echo "</table>";
++  echo "</p>";
+ 
+   if($file_found) {
+     if($stdout_size > 0) {
+       show_file_content("STDOUT", "$filepath.out");
+     }
+     
+-    if($stderr_size > 0) {
+-      show_file_content("STDERR", "$filepath.err");
+-    }
+   }
+ }
+ 
+@@ -201,33 +200,19 @@ function show_file_content($header, $file) {
+   if($_REQUEST["type"] == "build" && preg_match("/_win/", $_REQUEST["platform"])) {
+     // For windows we have a script that does some smarter parsing
+     $lines = `./parse-windows-build.pl $file`;
+-    echo "<p style=\"font-size: 80%;\">Tried to do some smart parsing for Windows:\n";
+-    echo "<p><a href=\"javascript:swap('$header')\">Click to show Windows build info</a>\n";
+-    echo "<div id=\"$header\" style=\"display:none;\">\n";
+     echo "<pre>$lines</pre>\n";
+-    echo "</div>\n";
+   }
+   else {
+-    // For linux we'll just grep for errors for now.  This can probably be improved
+-    $lines = `grep -C 5 -i error $file`;
+-    echo "<p style=\"font-size: 80%;\">Showing all instances of the word 'error' in $header:\n";
+-    if(strlen($lines) > 0) {
+-      $lines = preg_replace("/(error)/i", "<font class=\"hl\">$1</font>", $lines);
+-      echo "<p><a href=\"javascript:swap('$header')\">Click to show errors in $header</a>\n";
+-      echo "<div id=\"$header\" style=\"display:none;\">\n";
+-      echo "<pre>$lines</pre>\n";
+-      echo "</div>\n";
+-    }
+-    else {
+-      echo "<p>The string 'error' was not present in $header\n";
+-    }
++    // For linux show some lines from the bottom of the file
++    $count = 20;
++    $lines = `tail -$count $file`;
++
++    // Do some nice highlighting to make warnings/errors more obvious
++    $lines = preg_replace("/(error)/i", "<font style='background-color:red'>$1</font>", $lines);
++    echo "<p style=\"font-size: 80%;\">Last $count lines of $header:\n";
++    echo "<pre>$lines</pre>";
+   }
+ 
+-  // Always show the last 10 lines
+-  $count = 10;
+-  $lines = `tail -$count $file`;
+-  echo "<p style=\"font-size: 80%;\">Last $count lines of $header:\n";
+-  echo "<pre>$lines</pre>";
+ }
+ 
+ ?>
+diff --git a/nmi_tools/www/results/Run-condor.php b/nmi_tools/www/results/Run-condor.php
+index c911cce..7af1bd4 100644
+--- a/nmi_tools/www/results/Run-condor.php
++++ b/nmi_tools/www/results/Run-condor.php
+@@ -1,24 +1,17 @@
+ <?php
+-   //
+-   // Configuration
+-   //
+-   define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
+-   define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s&user=%s");
+-   define("CROSS_DETAIL_URL", "./Run-condor-pre-details.php?runid=%s&type=%s&user=%s");
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   //$no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-   $no_test_platforms = Array( );
++//
++// Configuration
++//
++define("NUM_SPARK_DAYS", 2);
++
++$one_offs = array_key_exists("oneoffs", $_REQUEST) ? $_REQUEST["oneoffs"] : 0;
++$SPARK_DAYS = array_key_exists("days", $_REQUEST) ? $_REQUEST["days"] : NUM_SPARK_DAYS;
++
++require_once "./load_config.inc";
++load_config();
++include "dashboard.inc";
++
++$continuous_blacklist = Array( "x86_deb_5.0", "x86_64_rhap_5.3-updated");
+ ?>
+ <html>
+ <head>
+@@ -27,21 +20,10 @@
+ </HEAD>
+ <body>
+ 
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a></h1>
+-<table border=1 width="85%">
+-   <tr>
+-      <th>Branch<br><small>Click to see branch history</small></th>
+-      <th>Runid</th>
+-      <th>Submitted</th>
+-      <th>User</th>
+-      <th>Build Results</th>
+-      <th>Test Results</th>  
+-      <th>Cross Test Results</th>  
+-      </tr>
+-
+ <?php
+-$db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-mysql_select_db(DB_NAME) or die("Could not select database");
++$db = connect_to_mysql();
++
++$user_condition = $one_offs ? "user!='" . CONDOR_USER . "'" : "user='" . CONDOR_USER . "'";
+ 
+ $query_runids="
+ SELECT 
+@@ -51,7 +33,8 @@ SELECT
+          (IF(LOCATE('trunk-',description),
+             LOCATE('trunk-',description)+4,
+             CHAR_LENGTH(description)))))) AS branch,
+-  MAX(convert_tz(start, 'GMT', 'US/Central')) as start,
++  MAX(convert_tz(start, 'GMT', 'US/Central')) AS start,
++  unix_timestamp(MAX(convert_tz(start, 'GMT', 'US/Central'))) AS start_epoch,
+   run_type, 
+   max(runid) as runid,
+   user,
+@@ -64,335 +47,473 @@ WHERE
+   project='condor' AND
+   run_type='build' AND
+   description != '' AND 
+-  DATE_SUB(CURDATE(), INTERVAL 10 DAY) <= start 
++  DATE_SUB(CURDATE(), INTERVAL 10 DAY) <= start AND
++  $user_condition
+ GROUP BY 
+   branch,
+   user,
+   run_type 
+ ORDER BY 
+-  IF(user = '".CONDOR_USER."',0,1), runid desc
++  runid desc
+ ";
+ 
+-$last_user = CONDOR_USER;
+-$result = mysql_query($query_runids) or die ("Query ".$query_runids." failed : " . mysql_error());
++$result = mysql_query($query_runids) or die ("Query $query_runids failed : " . mysql_error());
++$continuous_buf = Array();
++$cndrauto_buf = Array();
++$oneoff_buf = Array();
+ while ($row = mysql_fetch_array($result)) {
+-   $runid      = $row["runid"];
+-   $branch     = $row["branch"];
+-   $start      = $row["start"];
+-   $user       = $row["user"];
+-   $run_result = $row["result"];
+-   $pin        = $row["archive_results_until"];
+-   
+-   //
+-   // Apply a break for nightly builds
+-   //
+-   if ($last_user == CONDOR_USER && $user != CONDOR_USER) {
+-      echo "<tr>\n".
+-           "   <td colspan=\"5\"><B><i>One-off Builds</i></b></td>\n".
+-           "</tr>\n";
+-   }
+-
+-   // --------------------------------
+-   // BUILDS
+-   // --------------------------------
+-   $sql = "SELECT Task.platform, Task.result" . 
+-          "  FROM Task, Run ".
+-          " WHERE Run.runid = {$runid}  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-   $data["build"] = Array();
+-   $data["build"]["totals"] = Array();
+-   $data["build"]["platforms"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-     $data["build"]["totals"]["total"]++;
+-     if($platforms["result"] == NULL) {
+-       $data["build"]["totals"]["pending"]++;
+-       $data["build"]["platforms"][$platforms["platform"]] = "pending";
+-     }
+-     elseif($platforms["result"] == 0) {
+-       $data["build"]["totals"]["passed"]++;
+-       $data["build"]["platforms"][$platforms["platform"]] = "passed";       
+-     }
+-     elseif($platforms["result"] != 0) {
+-       $data["build"]["totals"]["failed"]++;
+-       $data["build"]["platforms"][$platforms["platform"]] = "failed";
+-     }
+-   }
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending, ".
+-          "       Task.platform" . 
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-          "       ((Run.project_version = Run.component_version)  OR (Run.component_version = 'native' ))".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-   $data["test"] = Array();
+-   $data["test"]["totals"] = Array();
+-   $data["test"]["platforms"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-     $data["test"]["totals"]["total"]++;
+-     if($platforms["failed"] > 0) {
+-       $data["test"]["totals"]["failed"]++;
+-       $data["test"]["platforms"][$platforms["platform"]] = "failed";
+-     }
+-     elseif($platforms["pending"] > 0) {
+-       $data["test"]["totals"]["pending"]++;
+-       $data["test"]["platforms"][$platforms["platform"]] = "pending";
+-     }
+-     elseif($platforms["passed"] > 0) {
+-       $data["test"]["totals"]["passed"]++;
+-       $data["test"]["platforms"][$platforms["platform"]] = "passed";
+-     }
+-   }
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // CROSS TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending, ".
+-          "       Task.platform " .
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-          "       project_version != component_version AND ".
+-          "	  component_version != 'native' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-   $data["crosstest"] = Array();
+-   $data["crosstest"]["totals"] = Array();
+-   $data["crosstest"]["platforms"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-     $data["crosstest"]["totals"]["total"]++;
+-     if($platforms["failed"] > 0) {
+-       $data["crosstest"]["totals"]["failed"]++;
+-       $data["crosstest"]["platforms"][$platforms["platform"]] = "failed";
+-     }
+-     elseif($platforms["pending"] > 0) {
+-       $data["crosstest"]["totals"]["pending"]++;
+-       $data["crosstest"]["platforms"][$platforms["platform"]] = "pending";
+-     }
+-     elseif($platforms["passed"] > 0) {
+-       $data["crosstest"]["totals"]["passed"]++;
+-       $data["crosstest"]["platforms"][$platforms["platform"]] = "passed";
+-     }
+-   }
+-   mysql_free_result($result2);
+-
+-   //
+-   // HTML Table Row
+-   //
+-   $branch_url = sprintf(BRANCH_URL, $branch, $user);
+-   
+-   //
+-   // If there's nothing at all, just skip
+-   //
+-   // We only want to do this for one-off builds, if the nightly build
+-   // completely crapped out on us, we need to show it
+-   // Andy - 11/30/2006
+-   //
+-   if ($user != CONDOR_USER && !count($data["build"]["platforms"]) && !count($data["test"]["platforms"])) continue;
+-
+-   // Is this top level run pinned or not(probably not but could be one of a kind)
+-   
+-   $findpin="SELECT 
+-                    run_type, 
+-                    runid,
+-                    user,
+-                    archived,
+-                    archive_results_until
+-             FROM 
+-                    Run 
+-             WHERE 
+-                    runid = $runid ";
+-
+-   $pincheck = mysql_query($findpin) or die ("Query {$findpin} failed : " . mysql_error());
+-   while ($pindetails = mysql_fetch_array($pincheck)) {
+-     $pin = $pindetails["archive_results_until"];
+-     $archived = $pindetails["archived"];
+-     if( !(is_null($pin))) {
+-       $pinstr = "pin ". "$pin";
+-     }
+-     else {
+-       $pinstr = "";
+-     }
+-     if( $archived == '0' ) {
+-       $archivedstr = "$runid". "<br><font size=\"-1\"> D </font>";
+-     }
+-     else {
+-       $archivedstr = "$runid";
+-     }
+-   }
+-   
+-   echo <<<EOF
+-   <tr>
+-      <td><a href="{$branch_url}">{$branch}</a><br><font size="-2">$pinstr</font></td>
+-      <td align="center">{$archivedstr}</td>
+-      <td align="center">{$start}</td>
+-      <td align="center">{$user}</td>
+-EOF;
+-
+-   foreach (Array("build", "test", "crosstest") AS $type) {
+-      $platforms = $data[$type]["platforms"];
+-      $totals = $data[$type]["totals"];
+-
+-      // Form a status table
+-      $list = Array();
+-      $list["passed"] = Array();
+-      $list["pending"] = Array();
+-      $list["failed"] = Array();
+-      foreach ($platforms as $platform) {
+-	$list[$platforms[$platform]] .= $platform;
+-      }
+-      
+-      if($totals["failed"] > 0) {
+-	$status = "FAILED";
+-	$color = "FAILED";
++  $runid      = $row["runid"];
++  $branch     = $row["branch"];
++  $user       = $row["user"];
++  $run_result = $row["result"];
++
++  if(preg_match("/Continuous/", $branch)) {
++    $skip = 0;
++    foreach ($continuous_blacklist as $blacklisted_platform) {
++      if(preg_match("/ $blacklisted_platform$/", $branch)) {
++        $skip = 1;
++        break;
+       }
+-      elseif($totals["pending"] > 0) {
+-	$status = "PENDING";
+-	$color = "PENDING";
++    }
++    if($skip == 1) {
++      continue;
++    }
++
++    $continuous_buf[$branch] = Array();
++    $continuous_buf[$branch]["user"] = $user;
++    $continuous_buf[$branch]["results"] = create_sparkline($branch, $user, $SPARK_DAYS);
++  }
++  else {
++    if($user == CONDOR_USER) {
++      $cndrauto_buf[$branch] = Array();
++      $cndrauto_buf[$branch]["user"] = $user;
++      $cndrauto_buf[$branch]["start"] = $row["start"];
++      $cndrauto_buf[$branch]["start_epoch"] = $row["start_epoch"];
++      $cndrauto_buf[$branch]["results"] = get_results(&$cndrauto_buf[$branch], $runid, $user, $row["result"]);
++    }
++    else {
++      # The branch might not be unique for one-off builds so we need to make a more unique key
++      $key = "$branch ($user)";
++      $oneoff_buf[$key] = Array();
++      $oneoff_buf[$key]["branch"]  = $branch;
++      $oneoff_buf[$key]["user"]    = $user;
++      $oneoff_buf[$key]["start"]   = $row["start"];
++      $oneoff_buf[$key]["results"] = get_results(&$oneoff_buf[$key], $runid, $user, $row["result"]);
++    }
++  }
++}
++mysql_free_result($result);
++mysql_close($db);
++
++// Create the sidebar
++echo "<div id='wrap'>";
++make_sidebar();
++
++// Now create the HTML tables.
++echo "<div id='main'>\n";
++
++//
++// 1) Continuous builds
++//
++if(!$one_offs) {  
++  echo "<h2>Continuous Builds</h2>\n";
++  
++  echo "<p style='font-size:-1'>Continuous blacklist: " . implode(", ", $continuous_blacklist) . "</p>";
++
++  echo "<form method='get' action='" . $_SERVER{PHP_SELF} . "'>\n";
++  echo "<p>Days:&nbsp;<select name='days'>\n";
++  echo "<option selected='selected'>2</option>\n";
++  echo "<option>3</option>\n";
++  echo "<option>4</option>\n";
++  echo "<option>5</option>\n";
++  echo "</select><input type='submit' value='Show'></form>\n";
++
++  $help_text = "<ul>\n";
++  $help_text .= "  <li>The last $SPARK_DAYS days of results are shown for each platform.</li>\n";
++  $help_text .= "  <li>The newest results are at the left.</li>\n";
++  $help_text .= "  <li>Thick black bars designate commits to the repository between runs.</li>\n";
++  $help_text .= "  <li>The number shown in the build line is the hour in which the test ran.</li>\n";
++  $help_text .= "  <li>If a number is shown in the test line it is the number of tests that failed.</li>\n";
++  $help_text .= "</ul>";
++  echo "<p><span class=\"link\" style=\"font-size:100%\"><a href=\"javascript: void(0)\" style=\"text-decoration:none\">Hover here to have this section explained<span style=\"width:450px;\">$help_text</span></a></span>";
++
++  echo "<table>\n";
++
++  $branches = array_keys($continuous_buf);
++  sort($branches);
++
++  $runs = Array();
++  foreach ($branches as $branch) {
++    $info = $continuous_buf[$branch];
++    foreach (array_keys($info["results"]["build"]) as $key) {
++      $runs[$key] = $info["results"]["build"][$key]["sha1"];
++    }
++  }
++  krsort($runs);
++
++  $table = Array();
++
++  foreach ($branches as $branch) {
++    $info = $continuous_buf[$branch];
++    $branch_url = sprintf(BRANCH_URL, $branch, $info["user"]);
++    $branch_display = preg_replace("/^Continuous Build - /", "", $branch);
++    $out = "<tr>\n";
++    $out .= "  <td rowspan='2'><a href='$branch_url'>$branch_display</a></td>\n";
++    $out .= "  <td class='sparkheader'>Build</td>\n";
++
++    $counter = 0;
++    $commits = Array();
++    $last_sha1 = "";
++    foreach (array_keys($runs) as $key) {
++      $counter += 1;
++      $style = "";
++      if($runs[$key] != $last_sha1 && $last_sha1 != "") {
++        $style .= "border-left-width:4px; border-left-color:black; ";
++        array_push($commits, $counter);
++        $counter = 0;
+       }
+-      elseif($totals["passed"] > 0) {
+-	$status = "PASSED";
+-	$color = "PASSED";
++      $last_sha1 = $runs[$key];
++
++      if(array_key_exists($key, $info["results"]["build"])) {
++        $run = $info["results"]["build"][$key];
++        $out .= "  <td class='" . $run["color"] . "' style='$style'>";
++        $out .= $run["html"] . "</td>\n";
+       }
+       else {
+-	$status = "No Results";
+-	$color = "NORESULTS";
++        $out .= "  <td style='$style'>&nbsp;&nbsp;&nbsp;</td>\n";
+       }
++    }
++    
++    $out .= "</tr>\n";
++    $out .="<tr>\n";
++    $out .= "  <td class='sparkheader'>Test</td>\n";
+ 
+-      ##
+-      ## Check for missing tests
+-      ## Since we know how many builds have passed and should fire off tests,
+-      ## we can do a simple check to make sure the total number of tests
+-      ## is equal to the the number of builds
+-      ## Andy - 01.09.2007
+-      ##
+-      if ($type == "test") {
+-         $no_test_cnt = 0;
+-         if (count($no_test_platforms)) {
+-            $sql = "SELECT count(DISTINCT platform) AS count ".
+-                   "  FROM Run, Task ".
+-                   " WHERE Run.runid = {$runid}  AND ".
+-                   "       Task.runid = Run.runid AND ".
+-                   "       Task.platform IN ('".implode("','", $no_test_platforms)."') ";
+-            $cnt_result = mysql_query($sql)
+-               or die ("Query {$sql} failed : " . mysql_error());
+-            $res = mysql_fetch_array($cnt_result);
+-            $no_test_cnt = $res["count"];
+-         }
+-         $totals["missing"] = $data["build"]["totals"]["passed"] - $totals["total"] - $no_test_cnt;
+-         if ($totals["missing"] > 0) $color = "FAILED";
+-         elseif ($totals["missing"] < 0) $totals["missing"] = 0;
++    $last_sha1 = "";
++    foreach (array_keys($runs) as $key) {
++      $style = "text-align:center; ";
++      if($runs[$key] != $last_sha1 && $last_sha1 != "") {
++        $style .= "border-left-width:4px; border-left-color:black; ";
+       }
++      $last_sha1 = $runs[$key];
+ 
+-      if($type == "crosstest") {
+-	$detail_url = sprintf(CROSS_DETAIL_URL, $runid, $type, $user);
++      if(array_key_exists($key, $info["results"]["test"])) {
++        $run = $info["results"]["test"][$key];
++        $out .= "  <td class='" . $run["color"] . "' style='$style'>";
++        $out .= $run["html"] . "</td>\n";
+       }
+       else {
+-	$detail_url = sprintf(DETAIL_URL, $runid, $type, $user);
++        $out .= "  <td style='$style'>&nbsp;&nbsp;&nbsp;</td>\n";
+       }
++    }
++
++    $out .= "</tr>\n";
++    array_push($table, $out);
++  }
++
++  // We want to have a little spacing between the sparklines.  If we stack them one on top of
++  // the other they look crowded.  But we want the spacing to be minimal, so we'll make it only
++  // a few pixels high.  Also, it looks really nice to have the black commit lines continue
++  // through the spacing.  It's a little bit more code to generate this "separator" row correctly.
++  $sep = "<tr><td style='height:6px'></td>";
++  $sum = 1;
++  foreach ($commits as $len) {
++    $sep .= "<td style='height:6px; border-right-width:4px; border-right-color:black;' colspan='$len'></td>";
++    $sum += $len;
++  }
++  $final_cell = sizeof($runs) + 2 - $sum;
++  $sep .= "<td style='height:6px;' colspan='$final_cell'></td>";
++  $sep .= "</tr>\n";
++
++  echo implode($sep, $table);
++  echo "</table>\n";
++}
++
++
++
++//
++// 2) cndrauto builds
++//
++if(!$one_offs) {
++  echo "<h2>Auto builds - user '" . CONDOR_USER . "'</h2>\n";
++  echo "<table border=1>\n";
++  echo "<tr><th>Branch</th><th>Runid</th><th>Submitted</th><th>Build Results</th><th>Test Results</th><th>Cross Test Results</th>\n";
++  echo "</tr>\n";
++  
++  $branches = array_keys($cndrauto_buf);
++  usort($branches, "cndrauto_sort");
++
++  foreach ($branches as $branch) {
++    $info = $cndrauto_buf[$branch];
++    $branch_url = sprintf(BRANCH_URL, $branch, $info["user"]);
++
++    // Print a "warning" if this branch has not been submitted for >1 day.  This makes it easier to spot old
++    // builds from the dashboard.
++    $warning = "";
++    $diff = time() - $info["start_epoch"];
++    if($diff > 60*60*24) {
++      $days = floor($diff / (60*60*24));
++      $warning = "<p style='font-size:75%; color:red;'>$days+ days old</p>";
++    }
++
++    $style = "";
++    if(preg_match("/^NMI/", $branch)) {
++      $style = "style='border-bottom-width:4px;'";
++    }
++    else {
++      $style = "style='border-top-width:4px;'";
++    }
++
++    echo "<tr>\n";
++    echo "  <td $style><a href='$branch_url'>$branch</a><br><font size='-2'>" . $info["pin"] . "</font></td>\n";
++    echo "  <td $style align='center'>" . $info["runid"] . "</td>\n";
++    echo "  <td $style align='center'>" . $info["start"] . $warning . "</td>\n";
++    echo $info["results"];
++    echo "</tr>\n";
++  }
++  echo "</table>\n";
++}
++  
++//
++// 3) One-off builds
++//
++if($one_offs) {
++  echo "<h2>One-off builds</h2>\n";
++  echo "<table border=1>\n";
++  echo "<tr><th>Branch</th><th>Runid</th><th>Submitted</th><th>User</th><th>Build Results</th><th>Test Results</th><th>Cross Test Results</th>\n";
++  echo "</tr>\n";
++  
++  foreach (array_keys($oneoff_buf) as $key) {
++    $info = $oneoff_buf[$key];
++    $branch_url = sprintf(BRANCH_URL, $info["branch"], $info["user"]);
++    echo "<tr>\n";
++    echo "  <td><a href='$branch_url'>" . $info["branch"] . "</a><br><font size='-2'>" . $info["pin"] . "</font></td>\n";
++    echo "  <td align='center'>" . $info["runid"] . "</td>\n";
++    echo "  <td align='center'>" . $info["start"] . "</td>\n";
++    echo "  <td align='center'>" . $info["user"] . "</td>\n";
++    echo $info["results"];
++    echo "</tr>\n";
++  }
++  echo "</table>\n";
++}
++
++echo "</div>\n";
++echo "<div id='footer'>&nbsp;</div>\n";
++echo "</div>\n";
++
++
++
++
++
++
++// We are going to build "sparklines" for the Continuous builds to make
++// it easier to visualize their performance over time
++function create_sparkline($branch, $user, $num_spark_days) {
++  // First get all the recent build runs.  We'll use the runids from the
++  // build runs to determine which tests to match to them
++  $sql = "SELECT runid,result,project_version, " . 
++         "       convert_tz(start, 'GMT', 'US/Central') as start " .
++         "FROM Run " .
++         "WHERE run_type='build' AND " .
++         "      component='condor' AND " .
++         "      project='condor' AND " .
++         "      DATE_SUB(CURDATE(), INTERVAL $num_spark_days DAY) <= start AND " .
++         "      Description = '$branch' " .
++         "      ORDER BY runid DESC";
++  $result2 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++
++  $output = Array();
++  $output["build"] = Array();
++  $output["test"]  = Array();
++
++  $builds = Array();
++  $runids = Array();
++  while ($build = mysql_fetch_array($result2)) {
++    array_push($runids, $build["runid"]);
++
++    $color = "passed";
++    if($build["result"] == NULL) {
++      $color = "pending";
++    }
++    elseif($build["result"] != 0) {
++      $color = "failed";
++    }
++    
++    $details = "  <table>";
++    $details .= "    <tr><td>Status</td><td class=\"$color\">$color</td></tr>";
++    $details .= "    <tr><td>NMI RunID</td><td>" . $build["runid"] . "</td></tr>";
++    $details .= "    <tr><td>Submitted</td><td><nobr>" . $build["start"] . "</nobr></td></tr>";
++    $details .= "    <tr><td>SHA1</td><td>" . substr($build["project_version"], 0, 15) . "</td></tr>";
++    $details .= "    <tr><td>Host</td><td>__PUT_HOST_HERE__</td></tr>";
++    $details .= "  </table>";
++    
++    $hour = preg_replace("/^.+(\d\d):\d\d:\d\d.*$/", "$1", $build["start"]);
++    
++    $detail_url = sprintf(DETAIL_URL, $build["runid"], "build", $user);
++    $popup_html = "<span class=\"link\"><a href=\"$detail_url\" style=\"text-decoration:none\">$hour<span>$details</span></a></span>";
++    
++    $tmp = Array();
++    $tmp["runid"] = $build["runid"];
++    $tmp["sha1"]  = substr($build["project_version"], 0, 15);
++    $tmp["html"]  = $popup_html; 
++    $tmp["color"] = $color;
++    $tmp["hour"]  = $hour;
++    $tmp["start"] = $build["start"];
++
++    // The key is currently formed by using a combination of the date and the SHA1.  Since we run
++    // builds every hour but the SHA1 might remain the same we need to use the date to provide
++    // uniqueness.  We use the year/month/day and the hour, but we strip off the minute and second
++    // because we want to be able to correlate runs across platforms (which will be submitted each
++    // hour but at different minutes).  Eventually when we do per-commit builds this should
++    // probably just become the SHA1 without the date.
++    $tmp["key"] = preg_replace("/:.+$/", "", $build["start"]) . $tmp["sha1"];
++
++    array_push($builds, $tmp);
++  }
++  mysql_free_result($result2);
++
++  // Figure out the hostname for each execute node
++  $hosts = get_hosts($runids);
++  $platform = preg_replace("/Continuous Build - /", "", $branch);
++  
++  for ($i=0; $i < count($builds); $i++) {
++    $key = $builds[$i]["key"];
++    $output["build"][$key] = Array();
++    $output["build"][$key]["sha1"]  = $builds[$i]["sha1"];
++    $output["build"][$key]["color"] = $builds[$i]["color"];
++
++    $tmp = preg_replace("/__PUT_HOST_HERE__/", $hosts[$builds[$i]["runid"]][$platform], $builds[$i]["html"]);
++    $output["build"][$key]["html"] = $tmp;
++  }
++  
++  // And now for the tests.  This is trickier because we have to line it up
++  // with the builds above
++  $sql = "SELECT runid,result,description," .
++         "       convert_tz(start, 'GMT', 'US/Central') as start " .
++         "FROM Run ".
++         "WHERE run_type = 'TEST' AND " .
++         "      component = 'condor' AND " .
++         "      project = 'condor' AND " .
++         "      DATE_SUB(CURDATE(), INTERVAL $num_spark_days DAY) <= start AND " .
++         "      description LIKE 'Auto-Test Suite for ($platform, %' " .
++         "ORDER BY description DESC";
++  $result2 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  
++  $runids = Array();
++  $tests = Array();
++  while ($test = mysql_fetch_array($result2)) {
++    $build_runid = preg_replace("/Auto-Test Suite for \($platform, (.+)\)/", "$1", $test["description"]);
++    $runid = $test["runid"];
++    array_push($runids, $runid);
++    $color = "passed";
++    $hour = "&nbsp;&nbsp;&nbsp;";
++    $failed_tests = "";
++    if($test["result"] == NULL) {
++      $color = "pending";
++    }
++    elseif($test["result"] != 0) {
++      $color = "failed";
++      
++      $sql = "SELECT name
++              FROM   Task
++              WHERE  runid=$runid AND Result!=0";
+       
+-      //
+-      // No results
+-      //
+-      if (!count($platforms)) {
+-         //
+-         // If this is a nightly build, we can check whether it failed and
+-         // give a failure notice. Without this, the box will just be empty
+-         // and people won't know what really happended
+-         //
+-         if (!empty($run_result) && $type == 'build') {
+-            $status = "FAILED";
+-	    echo <<<EOF
+-	      <td class="{$status}" align="center">
+-	      <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-	      <tr>
+-	      <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-	      </tr>
+-	      </table>
+-	      </td>
+-EOF;
+-         //
+-         // Just display an empty cell
+-         //
+-         }
+-	 elseif($type == "test") {
+-	    echo <<<EOF
+-	      <td class="noresults" align="center">
+-	      <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-	      <tr><td colspan="2" class="detail_url"><a href="{$detail_url}">No Completed Builds</a></td></tr>
+-	      <tr><td colspan="2">&nbsp;</td></tr>
+-	      <tr><td colspan="2">&nbsp;</td></tr>
+-	      <tr><td colspan="2">&nbsp;</td></tr>
+-	      </table>
+-	      </td>
+-EOF;
+-	 }
+-	 else {
+-            echo "<td>&nbsp;</td>\n";
+-         }
+-      //
+-      // Show Summary
+-      //
++      $result3 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++
++      $hour = 0;
++      $LIMIT = 5; // Cap the number of entries we show in the pop-up box
++      $failed_parents = "";
++      while ($task = mysql_fetch_array($result3)) {
++        if($task["name"] == "platform_job" || $task["name"] == "remote_task") {
++          $failed_parents .= "<nobr>" . $task["name"] . "</nobr><br>";
++        }
++        else {
++          $hour += 1;
++          if($hour <= $LIMIT) {
++            $failed_tests .= "<nobr>" . $task["name"] . "</nobr><br>";
++          }
++        }
+       }
+-      else {
+-                        
+-         echo <<<EOF
+-         <td class="{$color}" align="center" valign="top">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-	          <td colspan="2" class="detail_url">
+-                    <a href="{$detail_url}">$status</a>
+-	          </td>
+-               </tr>
+-EOF;
+-         //
+-         // Show the different status tallies for platforms
+-         //
+-         foreach ($result_types AS $key) {
+-            if ($key == "missing" && empty($totals[$key])) continue;
+-	    $prefix = $postfix = "";
+-            if ($key == "missing") {
+-               $prefix = "<B>";
+-               $postfix = "</B>";
+-            }
+-
+-            echo "<tr>\n".
+-               "   <td width=\"75%\">{$prefix}".ucfirst($key)."{$postfix}</td>\n".
+-               "   <td width=\"25%\">{$prefix}".(int)$totals[$key]."{$postfix}</td>\n".
+-               "</tr>\n";
+-         }
+-         echo "</table></td>\n";
+-      } // RESULTS
+-   } // FOREACH
+-   
+-   echo "</tr>";
+-   $last_user = $user;
+-} // WHILE
+-mysql_free_result ($result);
+-
+-echo "</table>";
+-echo "</center>";
+ 
+-mysql_close($db);
++      # Add a max number of failures we'll show
++      if($hour > $LIMIT) {
++        $failed_tests .= ($hour - $LIMIT) . " more...";
++      }
++      elseif($hour == 0) {
++        # We only want to display the failed parents if there were no failed tests to display.
++        $failed_tests = $failed_parents;
++      }
++    }
++    
++    $details = "<table>";
++    $details .= "<tr><td>Status</td><td class=\"$color\">$color</td></tr>";
++    $details .= "<tr><td>Start</td><td><nobr>" . $test["start"] . "</nobr></td></tr>";
++    $details .= "<tr><td>SHA1</td><td>__PUT_SHA_HERE__</td></tr>";
++    $details .= "<tr><td>Host</td><td>__PUT_HOST_HERE__</td></tr>";
++    $details .= "<tr><td>Failed tests</td><td>$failed_tests</td></td></tr>";
++    $details .= "</table>";
++    
++    $detail_url = sprintf(DETAIL_URL, $build_runid, "test", $user);
++    $popup_html = "<span class=\"link\"><a href=\"$detail_url\" style=\"text-decoration:none\">$hour<span>$details</span></a></span>";
++    
++    $tests[$build_runid] = Array();
++    $tests[$build_runid]["color"] = $color;
++    $tests[$build_runid]["html"]  = $popup_html;
++    $tests[$build_runid]["runid"] = $runid;
++  }
++  mysql_free_result($result2);
++
++  $hosts = get_hosts($runids);
++  
++  for ($i=0; $i < count($builds); $i++) {
++    $build = $builds[$i];
++    
++    $key = $builds[$i]["key"];
++    $output["test"][$key] = Array();
++
++    if(array_key_exists($build["runid"], $tests)) {
++      $test = $tests[$build["runid"]];
++      $tmp = preg_replace("/__PUT_SHA_HERE__/", $build["sha1"], $test["html"]);
++      $tmp = preg_replace("/__PUT_HOUR_HERE__/", $build["hour"], $tmp);
++      $tmp = preg_replace("/__PUT_HOST_HERE__/", $hosts[$test["runid"]][$platform], $tmp);
++      $output["test"][$key]["color"] = $test["color"];
++      $output["test"][$key]["html"]  = $tmp;
++    }
++    else {
++      $output["test"][$key]["color"] = "noresults";
++      $output["test"][$key]["html"]  = "&nbsp;";
++    }
++  }
++  
++  return $output;
++}
++
++// Define a custom sort that puts trunk ahead of other builds, and NMI immediately
++// after the matching core build.
++function cndrauto_sort($a, $b) {
++  $a_is_nmi = preg_match("/^NMI/", $a);
++  $b_is_nmi = preg_match("/^NMI/", $b);
++
++  $a = preg_replace("/^NMI Ports - /", "", $a);
++  $b = preg_replace("/^NMI Ports - /", "", $b);
++
++  if($a == $b) {
++    if($a_is_nmi and !$b_is_nmi) {
++      return 1;
++    }
++    elseif($b_is_nmi and !$a_is_nmi) {
++      return -1;
++    }
++  }
++
++  if(preg_match("/trunk/", $a)) {
++    return -1;
++  }
++  elseif(preg_match("/trunk/", $b)) {
++    return 1;
++  }
++
++  return strcasecmp($b, $a);
++}
+ 
+ ?>
+ </body>
+diff --git a/nmi_tools/www/results/Run-condor.php.almost b/nmi_tools/www/results/Run-condor.php.almost
+deleted file mode 100644
+index 8bbbafc..0000000
+--- a/nmi_tools/www/results/Run-condor.php.almost
++++ /dev/null
+@@ -1,344 +0,0 @@
+-<?php
+-   //
+-   // Configuration
+-   //
+-   define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
+-   define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s&user=%s");
+-   define("CROSS_DETAIL_URL", "./Run-condor-pre-details.php?runid=%s&type=%s&user=%s");
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   //$no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-   $no_test_platforms = Array( );
+-?>
+-<html>
+-<head>
+-<Title>NMI - Condor Latest Build/Test Results</TITLE>
+-<LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+-</HEAD>
+-<body>
+-
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a></h1>
+-<table border=1 width="85%">
+-   <tr>
+-      <th>Branch<br><small>Click to see branch history</small></th>
+-      <th>Runid</th>
+-      <th>Last build</th>
+-      <th>User</th>
+-      <th>Build Results</th>
+-      <th>Test Results</th>  
+-      <th>Cross Test Results</th>  
+-      </tr>
+-
+-<?php
+-$db = mysql_connect(DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-mysql_select_db(DB_NAME) or die("Could not select database");
+-
+-$query_runids="
+-SELECT 
+-  LEFT(description,
+-       (IF(LOCATE('branch-',description),
+-         LOCATE('branch-',description)+5,
+-         (IF(LOCATE('trunk-',description),
+-            LOCATE('trunk-',description)+4,
+-            CHAR_LENGTH(description)))))) AS branch,
+-  MAX(convert_tz(start, 'GMT', 'US/Central')) as start,
+-  run_type, 
+-  max(runid) as runid,
+-  user,
+-  archive_results_until,
+-  result
+-FROM 
+-  Run 
+-WHERE 
+-  component='condor' AND 
+-  project='condor' AND
+-  run_type='build' AND
+-  description != '' AND 
+-  DATE_SUB(CURDATE(), INTERVAL 10 DAY) <= start 
+-GROUP BY 
+-  branch,
+-  user,
+-  run_type 
+-ORDER BY 
+-  IF(user = '".CONDOR_USER."',0,1), runid desc
+-";
+-
+-$last_user = CONDOR_USER;
+-$result = mysql_query($query_runids) or die ("Query ".$query_runids." failed : " . mysql_error());
+-while ($row = mysql_fetch_array($result)) {
+-   $runid      = $row["runid"];
+-   $branch     = $row["branch"];
+-   $start      = $row["start"];
+-   $user       = $row["user"];
+-   $run_result = $row["result"];
+-	$pin 			= $row["archive_results_until"];
+-   
+-   //
+-   // Apply a break for nightly builds
+-   //
+-   if ($last_user == CONDOR_USER && $user != CONDOR_USER) {
+-      echo "<tr>\n".
+-           "   <td colspan=\"5\"><B><i>One-off Builds</i></b></td>\n".
+-           "</tr>\n";
+-   }
+-
+-   // --------------------------------
+-   // BUILDS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run ".
+-          " WHERE Run.runid = {$runid}  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["build"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["build"]["failed"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["build"]["pending"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["build"]["passed"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-          "       ((Run.project_version = Run.component_version)  OR (Run.component_version = 'native' ))".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["test"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["test"]["failed"]++;
+-         $data["test"]["total"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["test"]["pending"]++;
+-         $data["test"]["total"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["test"]["passed"]++;
+-         $data["test"]["total"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // CROSS TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-		  "       project_version != component_version AND ".
+-		  "		  component_version != 'native' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["crosstest"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["crosstest"]["failed"]++;
+-         $data["crosstest"]["total"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["crosstest"]["pending"]++;
+-         $data["crosstest"]["total"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["crosstest"]["passed"]++;
+-         $data["crosstest"]["total"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   //
+-   // HTML Table Row
+-   //
+-   $branch_url = sprintf(BRANCH_URL, $branch, $user);
+-   
+-   //
+-   // If there's nothing at all, just skip
+-   //
+-   // We only want to do this for one-off builds, if the nightly build
+-   // completely crapped out on us, we need to show it
+-   // Andy - 11/30/2006
+-   //
+-   if ($user != CONDOR_USER && !count($data["build"]) && !count($data["test"])) continue;
+-
+-	// Is this top level run pinned or not(probably not but could be one of a kind)
+-
+-	$findpin="
+-		SELECT 
+-  			run_type, 
+-  			runid,
+-  			user,
+-			archived,
+-  			archive_results_until
+-		FROM 
+-  			Run 
+-		WHERE 
+-  			runid = $runid ";
+-
+-   $pincheck = mysql_query($findpin)
+-                  or die ("Query {$findpin} failed : " . mysql_error());
+-   while ($pindetails = mysql_fetch_array($pincheck)) {
+-	  $pin = $pindetails["archive_results_until"];
+-	  $archived = $pindetails["archived"];
+-	  if( !(is_null($pin))) {
+-	  		$pinstr = "pin ". "$pin";
+-	  } else {
+-	  		$pinstr = "";
+-	  }
+-	  if( $archived == '0' ) {
+-	  		$archivedstr = "$runid". "<br><font size=\"-1\"> D </font>";
+-	  } else {
+-	  		$archivedstr = "$runid";
+-	  }
+-   } 
+-   
+-   echo <<<EOF
+-   <tr>
+-      <td><a href="{$branch_url}">{$branch}</a><br><font size="-2">$pinstr</font></td>
+-      <td align="center">{$archivedstr}</td>
+-      <td align="center">{$start}</td>
+-      <td align="center">{$user}</td>
+-EOF;
+-
+-   foreach (Array("build", "test", "crosstest") AS $type) {
+-      $cur = $data[$type];
+-      $status = ($cur["failed"] ? "FAILED" :
+-                ($cur["pending"] ? "PENDING" : "PASSED"));
+-      $color = $status;
+-
+-      ##
+-      ## Check for missing tests
+-      ## Since we know how many builds have passed and should fire off tests,
+-      ## we can do a simple check to make sure the total number of tests
+-      ## is equal to the the number of builds
+-      ## Andy - 01.09.2007
+-      ##
+-      if ($type == "test") {
+-         $no_test_cnt = 0;
+-         if (count($no_test_platforms)) {
+-            $sql = "SELECT count(DISTINCT platform) AS count ".
+-                   "  FROM Run, Task ".
+-                   " WHERE Run.runid = {$runid}  AND ".
+-                   "       Task.runid = Run.runid AND ".
+-                   "       Task.platform IN ('".implode("','", $no_test_platforms)."') ";
+-            $cnt_result = mysql_query($sql)
+-               or die ("Query {$sql} failed : " . mysql_error());
+-            $res = mysql_fetch_array($cnt_result);
+-            $no_test_cnt = $res["count"];
+-         }
+-         $cur["missing"] = $data["build"]["passed"] - $cur["total"] - $no_test_cnt;
+-         if ($cur["missing"] > 0) $color = "FAILED";
+-         elseif ($cur["missing"] < 0) $cur["missing"] = 0;
+-      }
+-
+-		if($type == "crosstest") {
+-      		$detail_url = sprintf(CROSS_DETAIL_URL, $runid, $type, $user);
+-		} else {
+-      		$detail_url = sprintf(DETAIL_URL, $runid, $type, $user);
+-	  	}
+-      
+-      //
+-      // No results
+-      //
+-      if (!count($cur)) {
+-         //
+-         // If this is a nightly build, we can check whether it failed and
+-         // give a failure notice. Without this, the box will just be empty
+-         // and people won't know what really happended
+-         //
+-         if (!empty($run_result) && $type == 'build') {
+-            $status = "FAILED";
+-                     echo <<<EOF
+-         <td class="{$status}" align="center">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-            </table>
+-         </td>
+-EOF;
+-         //
+-         // Just display an empty cell
+-         //
+-         } else {
+-            echo "<td>&nbsp;</td>\n";
+-         }
+-      //
+-      // Show Summary
+-      //
+-      } else {
+-                        
+-         echo <<<EOF
+-         <td class="{$color}" align="center" valign="top">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-EOF;
+-         //
+-         // Show the different status tallies for platforms
+-         //
+-         foreach ($result_types AS $key) {
+-            if ($key == "missing" && empty($cur[$key])) continue;
+-            if ($key == "missing") {
+-               $prefix = "<B>";
+-               $postfix = "</B>";
+-            } else {
+-               $prefix = $postfix = "";
+-            }
+-
+-            echo "<tr>\n".
+-               "   <td width=\"75%\">{$prefix}".ucfirst($key)."{$postfix}</td>\n".
+-               "   <td width=\"25%\">{$prefix}".(int)$cur[$key]."{$postfix}</td>\n".
+-               "</tr>\n";
+-         } // FOREACH
+-         echo "</table></td>\n";
+-      } // RESULTS
+-   } // FOREACH
+-   
+-   echo "</tr>";
+-   $last_user = $user;
+-} // WHILE
+-mysql_free_result ($result);
+-
+-echo "</table>";
+-echo "</center>";
+-
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/Test-branch-temp.php b/nmi_tools/www/results/Test-branch-temp.php
+deleted file mode 100644
+index 83b75ba..0000000
+--- a/nmi_tools/www/results/Test-branch-temp.php
++++ /dev/null
+@@ -1,116 +0,0 @@
+-<?php
+-   //
+-   // Configuration
+-   //
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // Grab GET/POST vars
+-   //
+-   $branch = $_REQUEST["branch"];
+-   $user   = $_REQUEST["user"];
+-   $rows   = ($_REQUEST["rows"] ? $_REQUEST["rows"] : 25);
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   $no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-?>
+-<html>
+-<head>
+-   <Title>NMI - Condor <?= $branch; ?> Build/Test Results</TITLE>
+-   <LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+-</HEAD>
+-<body>
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a> :: <?= $branch.(!empty($user) ? " ({$user})" : ""); ?></h1>
+-
+-<form method="get" action="<?= $_SERVER{PHP_SELF}; ?>">
+-<input type="hidden" name="branch" value="<?= $branch; ?>">
+-<input type="hidden" name="user" value="<?= $user; ?>">
+-<font size="+1"><b>Rows: </b></font>&nbsp;
+-<select name="rows">
+-<?php
+-   $arr = Array("10", "25", "50", "100", "200", "500");
+-   foreach ($arr AS $val) {
+-      echo "<option".
+-           ($val == $rows ? " SELECTED" : "").
+-           ">$val</option>\n";
+-   } // FOREACH
+- ?>
+- </select>
+- <input type="submit" value="Show Results">
+- </form>
+-
+-<table border=1 width="85%">
+-   <tr>
+-      <th>Branch</th>
+-      <th>Runid</th>
+-      <th>Last build</th>
+-      </tr>
+-      
+-<?php
+-
+-   $db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-   mysql_select_db(DB_NAME) or die("Could not select database");
+-
+-
+-
+-# Create the set of all the runid's we're interested in
+-# This is the MAX(runid) i.e. latest run  
+-# for each (branch, type) tuple
+-
+-$sql = "SELECT description,
+-               convert_tz(start, 'GMT', 'US/Central') as start,
+-               run_type, 
+-               runid,
+-					archived,
+-					archive_results_until,
+-               result
+-          FROM Run 
+-         WHERE component='condor' AND 
+-               project='condor' AND
+-               run_type='build' AND
+-               description LIKE '".$branch."%'".
+-       (!empty($user) ? " AND user = '$user'" : "").
+-       " ORDER BY runid DESC";
+-       //" LIMIT $rows";
+-//die($sql);
+-$results = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-while ($row = mysql_fetch_array($results)) {
+-  $runid      = $row["runid"];
+-  $desc       = $row["description"];
+-  $start      = $row["start"];
+-  $run_result = $row["result"];
+-  $pin 		  = $row["archive_results_until"];
+-	$archived = $row["archived"];
+-
+-   //
+-   // HTML Table Row
+-   //
+-   
+-   
+-   echo <<<EOF
+-   <tr>
+-      <td>{$desc}</td>
+-      <td align="center">{$runid}</td>
+-      <td align="center">{$start}</td>
+-EOF;
+-
+-   
+-   echo "</tr>";
+-} // WHILE
+-echo "</table>";
+-echo "</center>";
+-
+-mysql_free_result($results);
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/Test-branch-tmp.php b/nmi_tools/www/results/Test-branch-tmp.php
+deleted file mode 100644
+index b9693b4..0000000
+--- a/nmi_tools/www/results/Test-branch-tmp.php
++++ /dev/null
+@@ -1,116 +0,0 @@
+-<?php
+-   //
+-   // Configuration
+-   //
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // Grab GET/POST vars
+-   //
+-   $branch = $_REQUEST["branch"];
+-   $user   = $_REQUEST["user"];
+-   $rows   = ($_REQUEST["rows"] ? $_REQUEST["rows"] : 25);
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   $no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-?>
+-<html>
+-<head>
+-   <Title>NMI - Condor <?= $branch; ?> Build/Test Results</TITLE>
+-   <LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+-</HEAD>
+-<body>
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a> :: <?= $branch.(!empty($user) ? " ({$user})" : ""); ?></h1>
+-
+-<form method="get" action="<?= $_SERVER{PHP_SELF}; ?>">
+-<input type="hidden" name="branch" value="<?= $branch; ?>">
+-<input type="hidden" name="user" value="<?= $user; ?>">
+-<font size="+1"><b>Rows: </b></font>&nbsp;
+-<select name="rows">
+-<?php
+-   $arr = Array("10", "25", "50", "100", "200", "500");
+-   foreach ($arr AS $val) {
+-      echo "<option".
+-           ($val == $rows ? " SELECTED" : "").
+-           ">$val</option>\n";
+-   } // FOREACH
+- ?>
+- </select>
+- <input type="submit" value="Show Results">
+- </form>
+-
+-<table border=1 width="85%">
+-   <tr>
+-      <th>Branch</th>
+-      <th>Runid</th>
+-      <th>Last build</th>
+-      </tr>
+-      
+-<?php
+-
+-   $db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-   mysql_select_db(DB_NAME) or die("Could not select database");
+-
+-
+-
+-# Create the set of all the runid's we're interested in
+-# This is the MAX(runid) i.e. latest run  
+-# for each (branch, type) tuple
+-
+-$sql = "SELECT description,
+-               convert_tz(start, 'GMT', 'US/Central') as start,
+-               run_type, 
+-               runid,
+-					archived,
+-					archive_results_until,
+-               result
+-          FROM Run 
+-         WHERE component='condor' AND 
+-               project='condor' AND
+-               run_type='build' AND
+-               description LIKE '".$branch."%'".
+-       (!empty($user) ? " AND user = '$user'" : "").
+-       " ORDER BY runid DESC ".
+-       " LIMIT $rows";
+-//die($sql);
+-$results = mysql_query($sql) or die ("Query {$sql} failed : " . mysql_error());
+-while ($row = mysql_fetch_array($results)) {
+-  $runid      = $row["runid"];
+-  $desc       = $row["description"];
+-  $start      = $row["start"];
+-  $run_result = $row["result"];
+-  $pin 		  = $row["archive_results_until"];
+-	$archived = $row["archived"];
+-
+-   //
+-   // HTML Table Row
+-   //
+-   
+-   
+-   echo <<<EOF
+-   <tr>
+-      <td>{$desc}</td>
+-      <td align="center">{$runid}</td>
+-      <td align="center">{$start}</td>
+-EOF;
+-
+-   
+-   echo "</tr>";
+-} // WHILE
+-echo "</table>";
+-echo "</center>";
+-
+-mysql_free_result($results);
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/condor-warnings-graph.php b/nmi_tools/www/results/condor-warnings-graph.php
+deleted file mode 100644
+index d6c9adb..0000000
+--- a/nmi_tools/www/results/condor-warnings-graph.php
++++ /dev/null
+@@ -1,18 +0,0 @@
+-<?php
+-  header("Content-Type: image/png");
+-
+-  $args["branch"] = $_REQUEST["branch"];
+-  $args["warning_type"] = $_REQUEST["warning_type"]; # [total, unique]
+-  $args["platform"] = $_REQUEST["platform"]; # [platform, all, all,total, total]
+-
+-  $branch = $args["branch"];
+-  $warning_type = $args["warning_type"];
+-  $platform = $args["platform"];
+-
+-  # TODO - clean these up and provide a config  
+-  $base_dir = "/home/cndrauto/warnings";
+-  $script_location = "$base_dir/graph_warnings";
+-
+-  $cmd = "$script_location $branch $platform $warning_type -";
+-  passthru($cmd);
+-?>
+diff --git a/nmi_tools/www/results/condor-warnings.php b/nmi_tools/www/results/condor-warnings.php
+deleted file mode 100644
+index 3182770..0000000
+--- a/nmi_tools/www/results/condor-warnings.php
++++ /dev/null
+@@ -1,81 +0,0 @@
+-<html>
+-<body bgcolor="white" text="black" link="#666699"  alink=#000000 vlink="#333333">
+-<title>Condor Warnings Graph Generator</title>
+-
+-<center><h2>Condor Warnings Graph Generator</h2>
+-
+-<?php
+-  
+-  # TODO - clean these up and provide a config  
+-  $base_dir = "/home/cndrauto/warnings"; 
+-  $branch_data_file = "$base_dir/data/branches";
+-  $platforms_data_file = "$base_dir/data/platforms";
+-
+-  $platforms[] = "";
+-  $fr = fopen ($platforms_data_file, "r");
+-  if ($fr){
+-    while ($results = fgets($fr, 4096)){
+-        $platforms = split(" ", $results);
+-    }
+-  }
+-  fclose($fr);
+-
+-  $branches[] = "";
+-  $fr = fopen ($branch_data_file, "r");
+-  if ($fr){
+-    while ($results = fgets($fr, 4096)){
+-        $branches = split(" ", $results);
+-    }
+-  }
+-  fclose($fr);
+-
+-?> 
+-<br><br>
+-  <form method="get" action="condor-warnings-graph.php">
+-  <table width=600 border=0 bgcolor=white>
+-  <tr bgcolor=white width=600>
+-
+-<!-- Branch Area -->
+-  <td width=200 align=center> 
+-    <SELECT name="branch">
+-<?php
+-    foreach($branches as $branch) {
+-      echo "<OPTION VALUE=$branch> $branch </OPTION>";
+-    }
+-?>
+-    </SELECT> Branch
+-  </td>
+-
+-<!-- Platform Area -->
+-  <td width=200 align=center>
+-    <SELECT name="platform">
+-<?php
+-    foreach($platforms as $platform) {
+-      echo "<OPTION VALUE=$platform> $platform </OPTION>";
+-    }
+-    echo "<OPTION VALUE=all SELECTED > all </OPTION>";
+-    echo "<OPTION VALUE=total> total </OPTION>";
+-    echo "<OPTION VALUE=all,total> all,total </OPTION>";
+-?>
+-    </SELECT> Platform
+-  </td>
+-
+-<!-- Warning Type Area -->
+-  <td width=200 align=center>
+-    <SELECT name="warning_type">
+-<?php
+-  
+-    echo "<OPTION VALUE=total>  total </OPTION>";
+-    echo "<OPTION VALUE=unique>  unique </OPTION>";
+-?>
+-    </SELECT> Warning Type
+-  </td>
+-  </tr>
+-  </table>
+-    <br>
+-    <input type="submit" name="search" value="Submit Search"></input>
+-  </form>
+-  <hr>
+-
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/condor.css b/nmi_tools/www/results/condor.css
+index 75cebdc..c44ecff 100644
+--- a/nmi_tools/www/results/condor.css
++++ b/nmi_tools/www/results/condor.css
+@@ -12,6 +12,7 @@ a:link { color: #1C3F75; }
+ .noresults {
+    background-color: #aaaaaa;
+ }
++
+ .details {
+    font-size: 10px;
+ }
+@@ -21,15 +22,22 @@ a:link { color: #1C3F75; }
+ .title {
+    color: black;
+ }
+-TABLE {
++
++table {
+     border-collapse: collapse;
+     cellspacing: 0;
+     cellpadding: 0;
+     border: 1px solid grey;
+ }
+-TD {
++td {
+     border: 1px solid grey;
+ }
++.sparkheader {
++   font-size: 75%;
++   border-top-style: none;
++   border-bottom-style: none;
++   border-left-style: none;
++}
+ 
+ 
+ 
+@@ -62,3 +70,24 @@ span.link a:hover span {
+     text-align: left; 
+     text-decoration: none;
+ }
++
++
++// Page layout
++#wrap {
++    margin: 0 auto;
++}
++
++#nav {
++    padding: 10px;
++    width:125px;
++    float:left;
++}
++
++#main {
++    float:left;
++}
++
++#footer {
++    clear:both;
++    background: #ffffff;
++}
+diff --git a/nmi_tools/www/results/condor.php b/nmi_tools/www/results/condor.php
+deleted file mode 100644
+index f456c01..0000000
+--- a/nmi_tools/www/results/condor.php
++++ /dev/null
+@@ -1,268 +0,0 @@
+-<?php
+-   //
+-   // Configuration
+-   //
+-   define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
+-   define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s&user=%s");
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   $no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-?>
+-<html>
+-<head>
+-<Title>NMI - Condor Latest Build/Test Results</TITLE>
+-<LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+-</HEAD>
+-<body>
+-
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a></h1>
+-	<table border=1 width="85%">
+-	   <tr>
+-	      <th>Branch<br><small>Click to see branch history</small></th>
+-	      <th>Last build</th>
+-	      <th>User</th>
+-	      <th>Build Results</th>
+-	      <th>Test Results</th>  
+-	      </tr>
+-
+-	<?php
+-	$db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-	mysql_select_db(DB_NAME) or die("Could not select database");
+-
+-	$query_runids="
+-	SELECT 
+-	  LEFT(description,
+-	       (IF(LOCATE('branch-',description),
+-		 LOCATE('branch-',description)+5,
+-		 (IF(LOCATE('trunk-',description),
+-		    LOCATE('trunk-',description)+4,
+-		    CHAR_LENGTH(description)))))) AS branch,
+-	  MAX(convert_tz(start, 'GMT', 'US/Central')) as start,
+-	  run_type, 
+-	  max(runid) as runid,
+-	  user,
+-	  result
+-	FROM 
+-	  Run 
+-	WHERE 
+-	  component='condor' AND 
+-	  project='condor' AND
+-	  run_type='build' AND
+-	  description != '' AND 
+-	  DATE_SUB(CURDATE(), INTERVAL 10 DAY) <= start 
+-	GROUP BY 
+-	  branch,
+-	  user,
+-	  run_type 
+-	ORDER BY 
+-	  IF(user = '".CONDOR_USER."',0,1), runid desc
+-	";
+-
+-	$last_user = CONDOR_USER;
+-	$result = mysql_query($query_runids) or die ("Query ".$query_runids." failed : " . mysql_error());
+-	while ($row = mysql_fetch_array($result)) {
+-	   $runid      = $row["runid"];
+-	   $branch     = $row["branch"];
+-	   $start      = $row["start"];
+-	   $user       = $row["user"];
+-	   $run_result = $row["result"];
+-	   
+-	   //
+-	   // Apply a break for nightly builds
+-	   //
+-	   if ($last_user == CONDOR_USER && $user != CONDOR_USER) {
+-	      echo "<tr>\n".
+-		   "   <td colspan=\"5\"><B><i>One-off Builds</i></b></td>\n".
+-		   "</tr>\n";
+-	   }
+-
+-	   // --------------------------------
+-	   // BUILDS
+-	   // --------------------------------
+-	   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-		  "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-		  "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-		  "  FROM Task, Run ".
+-		  " WHERE Run.runid = {$runid}  AND ".
+-		  "       Task.runid = Run.runid AND ".
+-		  "       Task.platform != 'local' ".
+-		  " GROUP BY Task.platform ";
+-	   $result2 = mysql_query($sql)
+-			  or die ("Query {$sql} failed : " . mysql_error());
+-	   $data["build"] = Array();
+-	   while ($platforms = mysql_fetch_array($result2)) {
+-	      if (!empty($platforms["failed"])) {
+-		 $data["build"]["failed"]++;
+-	      } elseif (!empty($platforms["pending"])) {
+-		 $data["build"]["pending"]++;
+-	      } elseif (!empty($platforms["passed"])) {
+-		 $data["build"]["passed"]++;
+-	      }
+-	   } // WHILE
+-	   mysql_free_result($result2);
+-
+-	   // --------------------------------
+-	   // TESTS
+-	   // --------------------------------
+-	   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-		  "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-		  "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-		  "  FROM Task, Run, Method_nmi ".
+-		  " WHERE Method_nmi.input_runid = {$runid} AND ".
+-		  "       Run.runid = Method_nmi.runid AND ".
+-		  "       Task.runid = Run.runid AND ".
+-		  "       Task.platform != 'local' ".
+-		  " GROUP BY Task.platform ";
+-	   $result2 = mysql_query($sql)
+-			  or die ("Query {$sql} failed : " . mysql_error());
+-	   $data["test"] = Array();
+-	   while ($platforms = mysql_fetch_array($result2)) {
+-	      if (!empty($platforms["failed"])) {
+-		 $data["test"]["failed"]++;
+-		 $data["test"]["total"]++;
+-	      } elseif (!empty($platforms["pending"])) {
+-		 $data["test"]["pending"]++;
+-		 $data["test"]["total"]++;
+-	      } elseif (!empty($platforms["passed"])) {
+-		 $data["test"]["passed"]++;
+-		 $data["test"]["total"]++;
+-	      }
+-	   } // WHILE
+-	   mysql_free_result($result2);
+-
+-	   //
+-	   // HTML Table Row
+-	   //
+-	   $branch_url = sprintf(BRANCH_URL, $branch, $user);
+-	   
+-	   //
+-	   // If there's nothing at all, just skip
+-	   //
+-	   // We only want to do this for one-off builds, if the nightly build
+-	   // completely crapped out on us, we need to show it
+-	   // Andy - 11/30/2006
+-	   //
+-	   if ($user != CONDOR_USER && !count($data["build"]) && !count($data["test"])) continue;
+-	   
+-	   echo <<<EOF
+-	   <tr>
+-	      <td><a href="{$branch_url}">{$branch}</a></td>
+-      <td align="center">{$start}</td>
+-      <td align="center">{$user}</td>
+-EOF;
+-
+-   foreach (Array("build", "test") AS $type) {
+-      $cur = $data[$type];
+-      $status = ($cur["failed"] ? "FAILED" :
+-                ($cur["pending"] ? "PENDING" : "PASSED"));
+-      $color = $status;
+-
+-      ##
+-      ## Check for missing tests
+-      ## Since we know how many builds have passed and should fire off tests,
+-      ## we can do a simple check to make sure the total number of tests
+-      ## is equal to the the number of builds
+-      ## Andy - 01.09.2007
+-      ##
+-      if ($type == "test") {
+-         $no_test_cnt = 0;
+-         if (count($no_test_platforms)) {
+-            $sql = "SELECT count(DISTINCT platform) AS count ".
+-                   "  FROM Run, Task ".
+-                   " WHERE Run.runid = {$runid}  AND ".
+-                   "       Task.runid = Run.runid AND ".
+-                   "       Task.platform IN ('".implode("','", $no_test_platforms)."') ";
+-            $cnt_result = mysql_query($sql)
+-               or die ("Query {$sql} failed : " . mysql_error());
+-            $res = mysql_fetch_array($cnt_result);
+-            $no_test_cnt = $res["count"];
+-         }
+-         $cur["missing"] = $data["build"]["passed"] - $cur["total"] - $no_test_cnt;
+-         if ($cur["missing"] > 0) $color = "FAILED";
+-         elseif ($cur["missing"] < 0) $cur["missing"] = 0;
+-      }
+-
+-      $detail_url = sprintf(DETAIL_URL, $runid, $type, $user);
+-      
+-      //
+-      // No results
+-      //
+-      if (!count($cur)) {
+-         //
+-         // If this is a nightly build, we can check whether it failed and
+-         // give a failure notice. Without this, the box will just be empty
+-         // and people won't know what really happended
+-         //
+-         if (!empty($run_result) && $type == 'build') {
+-            $status = "FAILED";
+-                     echo <<<EOF
+-         <td class="{$status}" align="center">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-            </table>
+-         </td>
+-EOF;
+-         //
+-         // Just display an empty cell
+-         //
+-         } else {
+-            echo "<td>&nbsp;</td>\n";
+-         }
+-      //
+-      // Show Summary
+-      //
+-      } else {
+-                        
+-         echo <<<EOF
+-         <td class="{$color}" align="center" valign="top">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-EOF;
+-         //
+-         // Show the different status tallies for platforms
+-         //
+-         foreach ($result_types AS $key) {
+-            if ($key == "missing" && empty($cur[$key])) continue;
+-            if ($key == "missing") {
+-               $prefix = "<B>";
+-               $postfix = "</B>";
+-            } else {
+-               $prefix = $postfix = "";
+-            }
+-
+-            echo "<tr>\n".
+-               "   <td width=\"75%\">{$prefix}".ucfirst($key)."{$postfix}</td>\n".
+-               "   <td width=\"25%\">{$prefix}".(int)$cur[$key]."{$postfix}</td>\n".
+-               "</tr>\n";
+-         } // FOREACH
+-         echo "</table></td>\n";
+-      } // RESULTS
+-   } // FOREACH
+-   
+-   echo "</tr>";
+-   $last_user = $user;
+-} // WHILE
+-mysql_free_result ($result);
+-
+-echo "</table>";
+-echo "</center>";
+-
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/condor_test_display.php b/nmi_tools/www/results/condor_test_display.php
+deleted file mode 100644
+index c592d1f..0000000
+--- a/nmi_tools/www/results/condor_test_display.php
++++ /dev/null
+@@ -1,53 +0,0 @@
+-<html>
+-<body bgcolor="#ffffff" text="#000033" link="#666699"  alink=#000000 vlink="#333333">
+-
+-<title>Condor test results</title>
+-<center><h2>Condor test results </h2>
+-
+-<?php
+-
+-  $dbName = "nmi_history";
+-  $dbUsername = "nmipublic";
+-  $dbPassword = ""; 
+-  $currentDir = "results";
+-  $limit = 40; 
+-
+-  # find the last given number of builds,  ordered by the newest builds first 
+-  $query0 = "SELECT * FROM Run where user='cndrauto' and run_type='build' ORDER BY runid DESC LIMIT $limit"; 
+-  $db = mysql_connect("mysql.batlab.org", "$dbUsername", "$dbPassword") or die ("Could not connect : " . mysql_error());
+-  mysql_select_db("$dbName") or die("Could not select database");
+-  $result0 = mysql_query($query0) or die ("Query failed : " . mysql_error());
+-  while( $myrow = mysql_fetch_array($result0) ) {
+-    $myrunid = $myrow["runid"]; 
+-    $mydesc = $myrow["description"]; 
+-    $mydesc = trim( $mydesc ); 
+-    $tags["$myrunid"] = "$mydesc";
+-  }
+-
+-?> 
+-  <form method="get" action="Condor-testsuite-home.php">
+-    Select a tag from the dropdown list <br><br>
+-    <SELECT NAME="description">
+-<?php
+-      foreach ( $tags as $runid => $desc ) {
+-        echo "<OPTION VALUE=$desc>  $runid ($desc) </OPTION>";
+-        echo "<input type=\"hidden\" name=\"description\" value=$desc><br>";
+-      }
+-?>     
+-    </SELECT>
+-    <input type="submit" name="submit" value="Get Results"></input> 
+-  </form> 
+-  <br><br> or enter a build tag <br><br>
+-
+-  <form method="get" action="Condor-testsuite-home.php">
+-    <input type="text" name="description" size=40></input>
+-    <input type="submit" name="submit" value="Get Results"></input>
+-  </form>
+-
+-<?php
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+-
+diff --git a/nmi_tools/www/results/dashboard.inc b/nmi_tools/www/results/dashboard.inc
+new file mode 100644
+index 0000000..eaad929
+--- /dev/null
++++ b/nmi_tools/www/results/dashboard.inc
+@@ -0,0 +1,385 @@
++<?php
++
++define("AUTO_URL", "./Run-condor.php?oneoffs=0");
++define("ONEOFFS_URL", "./Run-condor.php?oneoffs=1");
++define("QUEUE_DEPTH_URL", "./Queue-depth.php");
++
++define("CONDOR_USER", "cndrauto");
++define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
++define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s&user=%s");
++define("CROSS_DETAIL_URL", "./Run-condor-pre-details.php?runid=%s&type=%s&user=%s");
++
++define("GITSHA1","http://condor-git.cs.wisc.edu/?p=condor.git;a=commit;h=%s");
++define("GITSHA1SHORT","http://condor-git.cs.wisc.edu/?p=condor.git;a=log;h=%s;hp=%s");
++
++// Connect to MySQL DB
++function connect_to_mysql() {
++  $db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
++  mysql_select_db(DB_NAME) or die("Could not select database");
++  return $db;
++}
++
++
++// Given a set of runids, return a hash of the platform/host combinations of where the jobs executed
++function get_hosts($runids) {
++  $hosts = Array();
++  $sql = "SELECT runid, platform, host
++          FROM Task
++          WHERE runid in (" . implode(",", $runids) . ") AND name='remote_task'";
++  
++  $result = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  while ($hostrow = mysql_fetch_array($result)) {
++    $runid = $hostrow["runid"];
++    $platform = preg_replace("/^nmi:/", "", $hostrow["platform"]);
++    $host = preg_replace("/\..+$/", "", $hostrow["host"]);
++
++    if(!array_key_exists($runid, $hosts)) {
++      $hosts[$runid] = Array();
++    }
++
++    $hosts[$runid][$platform] = $host;
++  }
++  mysql_free_result($result);
++
++  return $hosts;
++}
++
++function get_queue_for_nmi_platform($platform, $type) {
++  // For the purposes of this script crosstype => type
++  if($type == "crosstest") $type = "test";
++
++  $platform_without_prefix = preg_replace("/nmi:/", "", $platform);
++  $output = `/usr/local/condor/bin/condor_q -global -const 'nmi_target_platform=="$platform_without_prefix" && nmi_run_type=="$type"' -format '%-2s ' 'ifThenElse(JobStatus==0,"U",ifThenElse(JobStatus==1,"I",ifThenElse(JobStatus==2,"R",ifThenElse(JobStatus==3,"X",ifThenElse(JobStatus==4,"C",ifThenElse(JobStatus==5,"H",ifThenElse(JobStatus==6,"E",string(JobStatus))))))))' -format "%6d " ClusterId -format " %-14s " Owner -format '%-11s ' 'formatTime(QDate,"%0m/%d %H:%M")' -format '%-11s\n' 'formatTime(EnteredCurrentStatus,"%0m/%d %H:%M")'`;
++  $queue_contents = split("\n", $output);
++  $depth = sizeof($queue_contents) - 1;
++  $has_running_job = 0;
++  if($depth != 0) {
++    $output = "<table><tr><th>State</th><th>ID</th><th>Owner</th><th>Submitted</th><th>Started</th></tr>\n";
++    foreach ($queue_contents as $line) {
++      $items = preg_split("/\s+/", $line);
++      if(sizeof($items) == 7) {
++	$style = "background-color:#FFFFAA; text-decoration:none;";
++	if($items[0] == "R") {
++	  $style = "background-color:#0097C5;";
++	  $has_running_job++;
++	}
++	else {
++	  # If the job is not running we don't care about 'EnteredCurrentStatus',
++	  # a.k.a. "Start Time"
++	  $items[5] = "";
++	  $items[6] = "";
++	  if($items[0] == "H") {
++	    $style = "background-color:#A1A1A1;";
++	  }
++	}
++	$output .= "<tr style=\"$style\"><td style=\"text-align:center\">$items[0]</td><td>$items[1]</td><td>$items[2]</td><td>$items[3]&nbsp;$items[4]</td><td>$items[5]&nbsp;$items[6]</tr>\n";
++      }
++    }
++    $output .= "</table>\n";
++  }
++  else {
++    $output = "No jobs in queue";
++  }
++
++  $note = "";
++  if($has_running_job == 0 && $depth != 0) {
++    $note = "*";
++    $output = "<font style=\"color:red\">* No job is running!</font><br />$output";
++  }
++
++  $ret = Array();
++  $ret[0] = $depth;
++  $ret[1] = "<br /><span class=\"link\"><a href=\"javascript: void(0)\" style=\"text-decoration:none;\">Q Depth: $depth$note<span>$output</span></a></span>";
++  return $ret;
++}
++
++function make_sidebar() {
++  echo "<div id='nav'>\n";
++
++  echo "<p><a href='" . AUTO_URL . "'>Auto builds</a>\n";
++  echo "<p><a href='" . ONEOFFS_URL . "'>One-off builds</a>\n";
++  echo "<p><a href='" . QUEUE_DEPTH_URL . "'>NMI platform queue</a>\n";
++  echo "<p><a href='../results-old/Run-condor.php'>Old dashboard</a>\n";
++  echo "<p><a href='../results-devel/'>Development area</a>\n";
++
++  echo "</div>\n";
++}
++
++
++function get_results($info, $runid, $user, $run_result) {
++  // We need to get information about the builds, tests, and crosstests for each run
++  $html = ""; // the return information
++
++  // --------------------------------
++  // BUILDS
++  // --------------------------------
++  $sql = "SELECT platform," . 
++         "       SUM(IF(result != 0, 1, 0)) AS failed," . 
++         "       SUM(IF(result IS NULL, 1, 0)) AS pending " . 
++         "  FROM Task ".
++         " WHERE runid = $runid AND ".
++         "       platform != 'local' ".
++         " GROUP BY platform ";
++  $result2 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  $data["build"] = Array();
++  $data["build"]["totals"] = Array("total" => 0, "failed" => 0, "pending" => 0, "passed" => 0);
++  $data["build"]["platforms"] = Array();
++  while ($platforms = mysql_fetch_array($result2)) {
++    $data["build"]["totals"]["total"]++;
++    if($platforms["failed"] > 0) {
++      $data["build"]["totals"]["failed"]++;
++      $data["build"]["platforms"][$platforms["platform"]] = "failed";
++    }
++    elseif($platforms["pending"] > 0) {
++      $data["build"]["totals"]["pending"]++;
++      $data["build"]["platforms"][$platforms["platform"]] = "pending";
++    }
++    else {
++      $data["build"]["totals"]["passed"]++;
++      $data["build"]["platforms"][$platforms["platform"]] = "passed";       
++    }
++  }
++  mysql_free_result($result2);
++
++  // --------------------------------
++  // TESTS
++  // --------------------------------
++  $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
++         "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
++         "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending, ".
++         "       Task.platform" . 
++         "  FROM Task, Run, Method_nmi ".
++         " WHERE Method_nmi.input_runid = $runid AND ".
++         "       Run.runid = Method_nmi.runid AND ".
++         "       Run.user = '$user'  AND ".
++         "       Task.runid = Run.runid AND ".
++         "       Task.platform != 'local' AND ".
++         "       ((Run.project_version = Run.component_version)  OR (Run.component_version = 'native' ))".
++         " GROUP BY Task.platform ";
++  $result2 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  $data["test"] = Array();
++  $data["test"]["totals"] = Array("total" => 0, "failed" => 0, "pending" => 0, "passed" => 0);
++  $data["test"]["platforms"] = Array();
++  while ($platforms = mysql_fetch_array($result2)) {
++    $data["test"]["totals"]["total"]++;
++    if($platforms["failed"] > 0) {
++      $data["test"]["totals"]["failed"]++;
++      $data["test"]["platforms"][$platforms["platform"]] = "failed";
++    }
++    elseif($platforms["pending"] > 0) {
++      $data["test"]["totals"]["pending"]++;
++      $data["test"]["platforms"][$platforms["platform"]] = "pending";
++    }
++    elseif($platforms["passed"] > 0) {
++      $data["test"]["totals"]["passed"]++;
++      $data["test"]["platforms"][$platforms["platform"]] = "passed";
++    }
++  }
++  mysql_free_result($result2);
++
++  // --------------------------------
++  // CROSS TESTS
++  // --------------------------------
++  $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
++         "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
++         "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending, ".
++         "       Task.platform " .
++         "  FROM Task, Run, Method_nmi ".
++         " WHERE Method_nmi.input_runid = $runid AND ".
++         "       Run.runid = Method_nmi.runid AND ".
++         "       Run.user = '$user' AND ".
++         "       Task.runid = Run.runid AND ".
++         "       Task.platform != 'local' AND ".
++         "       project_version != component_version AND ".
++         "	 component_version != 'native' ".
++         " GROUP BY Task.platform ";
++  $result2 = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++  $data["crosstest"] = Array();
++  $data["crosstest"]["totals"] = Array("total" => 0, "failed" => 0, "pending" => 0, "passed" => 0);
++  $data["crosstest"]["platforms"] = Array();
++  while ($platforms = mysql_fetch_array($result2)) {
++    $data["crosstest"]["totals"]["total"]++;
++    if($platforms["failed"] > 0) {
++      $data["crosstest"]["totals"]["failed"]++;
++      $data["crosstest"]["platforms"][$platforms["platform"]] = "failed";
++    }
++    elseif($platforms["pending"] > 0) {
++      $data["crosstest"]["totals"]["pending"]++;
++      $data["crosstest"]["platforms"][$platforms["platform"]] = "pending";
++    }
++    elseif($platforms["passed"] > 0) {
++      $data["crosstest"]["totals"]["passed"]++;
++      $data["crosstest"]["platforms"][$platforms["platform"]] = "passed";
++    }
++  }
++  mysql_free_result($result2);
++     
++  //
++  // If there's nothing at all, just skip
++  //
++  // We only want to do this for one-off builds, if the nightly build
++  // completely crapped out on us, we need to show it
++  // Andy - 11/30/2006
++  //
++  if($user != CONDOR_USER) {
++    if(!count($data["build"]["platforms"]) && !count($data["test"]["platforms"])) {
++      return "";
++    }
++  }
++
++  // If this run is pinned we want to display it
++  $findpin="SELECT 
++                   run_type, 
++                   runid,
++                   user,
++                   archived,
++                   archive_results_until
++            FROM 
++                   Run 
++            WHERE 
++                   runid = $runid ";
++  
++  $pincheck = mysql_query($findpin) or die ("Query $findpin failed : " . mysql_error());
++  while ($pindetails = mysql_fetch_array($pincheck)) {
++    $pin = $pindetails["archive_results_until"];
++    $archived = $pindetails["archived"];
++    $info["pin"] = "";
++    if( !(is_null($pin))) {
++      $info["pin"] = "pin $pin";
++    }
++    $info["runid"] = "<a href='Task-search.php?runid=$runid&Submit=Search+by+RunID'>$runid</a>";
++
++    if( $archived == '0' ) {
++      $info["runid"] .= "<br><font size='-1'> D </font>";
++    }
++  }
++  
++  foreach (Array("build", "test", "crosstest") AS $type) {
++    $platforms = $data[$type]["platforms"];
++    $totals = $data[$type]["totals"];
++    
++    // Form a status table
++    /*
++    $list = Array();
++    $list["passed"] = Array();
++    $list["pending"] = Array();
++    $list["failed"] = Array();
++    foreach ($platforms as $platform) {
++      array_push($list[$platforms[$platform]], $platform);
++    }
++    */
++    
++    if($totals["failed"] > 0) {
++      $status = "FAILED";
++      $color = "FAILED";
++    }
++    elseif($totals["pending"] > 0) {
++      $status = "PENDING";
++      $color = "PENDING";
++    }
++    elseif($totals["passed"] > 0) {
++      $status = "PASSED";
++      $color = "PASSED";
++    }
++    else {
++      $status = "No Results";
++      $color = "NORESULTS";
++    }
++    
++    //
++    // Check for missing tests
++    // Since we know how many builds have passed and should fire off tests,
++    // we can do a simple check to make sure the total number of tests
++    // is equal to the the number of builds
++    // Andy - 01.09.2007
++    //
++    if ($type == "test") {
++      $no_test_cnt = 0;
++      //if (count($no_test_platforms)) {
++      //  $sql = "SELECT count(DISTINCT platform) AS count ".
++      //         "  FROM Run, Task ".
++      //         " WHERE Run.runid = $runid  AND ".
++      //         "       Task.runid = Run.runid AND ".
++      //         "       Task.platform IN ('".implode("','", $no_test_platforms)."') ";
++      //  $cnt_result = mysql_query($sql) or die ("Query $sql failed : " . mysql_error());
++      //  $res = mysql_fetch_array($cnt_result);
++      //  $no_test_cnt = $res["count"];
++      //}
++      $totals["missing"] = $data["build"]["totals"]["passed"] - $totals["total"] - $no_test_cnt;
++      if ($totals["missing"] > 0) $color = "FAILED";
++      elseif ($totals["missing"] < 0) $totals["missing"] = 0;
++    }
++    
++    if($type == "crosstest") {
++      $detail_url = sprintf(CROSS_DETAIL_URL, $runid, $type, $user);
++    }
++    else {
++      $detail_url = sprintf(DETAIL_URL, $runid, $type, $user);
++    }
++    
++    //
++    // No results
++    //
++    if (!count($platforms)) {
++      //
++      // If this is a nightly build, we can check whether it failed and
++      // give a failure notice. Without this, the box will just be empty
++      // and people won't know what really happended
++      //
++      if (!empty($run_result) && $type == 'build') {
++        $status = "FAILED";
++        $html .= "<td class='$status' align='center'>\n";
++        $html .= "  <table cellpadding='1' cellspacing='0' width='100%' class='details'>\n";
++        $html .= "    <tr><td colspan='2' class='detail_url'><a href='$detail_url'>$status</a></td></tr>\n";
++        $html .= "  </table>\n";
++        $html .= "</td>\n";
++      }
++      elseif($type == "test") {
++        $html .= "<td class='noresults' align='center'>\n";
++        $html .= "  <table cellpadding='1' cellspacing='0' width='100%' class='details'>\n";
++        $html .= "    <tr><td colspan='2' class='detail_url'><a href='$detail_url'>None</a></td></tr>\n";
++        $html .= "    <tr><td colspan='2'>&nbsp;</td></tr>\n";
++        $html .= "    <tr><td colspan='2'>&nbsp;</td></tr>\n";
++        $html .= "    <tr><td colspan='2'>&nbsp;</td></tr>\n";
++        $html .= "  </table>\n";
++        $html .= "</td>\n";
++
++      }
++      else {
++        $html .= "<td>&nbsp;</td>\n";
++      }
++      //
++      // Show Summary
++      //
++    }
++    else {
++      $html .= "<td class='$color' align='center' valign='top'>\n";
++      $html .= "  <table cellpadding='1' cellspacing='0' width='100%' class='details'>\n";
++      $html .= "    <tr><td colspan='2' class='detail_url'><a href='$detail_url'>$status</a></td></tr>";
++
++      //
++      // Show the different status tallies for platforms
++      //
++      $result_types = Array( "passed", "pending", "failed", "missing" );
++      foreach ($result_types AS $key) {
++        if ($key == "missing" && empty($totals[$key])) continue;
++
++        $name_display = ucfirst($key);
++        $num_display = $totals[$key] ? $totals[$key] : 0;
++        if ($key == "missing") {
++          $name_display = "<b>$name_display</b>";
++          $num_display = "<b>$num_display</b>";
++        }
++        
++        $html .= "<tr>\n";
++        $html .= "  <td width=\"75%\">$name_display</td>\n";
++        $html .= "  <td width=\"25%\">$num_display</td>\n";
++        $html .= "</tr>\n";
++      }
++      $html .= "</table></td>\n";
++    } // RESULTS
++  } // Foreach build/test/crosstest
++  return $html;
++}
++
++?>
+diff --git a/nmi_tools/www/results/find_last.php b/nmi_tools/www/results/find_last.php
+deleted file mode 100644
+index c4a17e9..0000000
+--- a/nmi_tools/www/results/find_last.php
++++ /dev/null
+@@ -1,24 +0,0 @@
+-<?php
+-
+-include "last.inc";
+-
+-?>
+-
+-<html>
+-<body>
+-<center>
+-<h2>UW NMI "Who broke the build?" query. </h2>
+-</center>
+-
+-<?php
+-$id = $_REQUEST['id'];
+-$db = mysql_connect('mysql.batlab.org', 'nmipublic', 'nmiReadOnly!') or die ("Could not connect : " . mysql_error());
+-mysql_select_db('nmi_history') or die("Could not select database");
+-$bonsai = getLastGoodBuild($id);
+-echo "<br><a href=\"$bonsai\">Click here to see the diffs vs the last successful build.</a><br>\n";
+-echo "<br>\n";
+-mysql_close($db);
+-?>
+-
+-</body>
+-</html>
+diff --git a/nmi_tools/www/results/index.html b/nmi_tools/www/results/index.html
+deleted file mode 100644
+index 3a5277a..0000000
+--- a/nmi_tools/www/results/index.html
++++ /dev/null
+@@ -1,21 +0,0 @@
+-<html>
+-<head></head>
+-<title>NWO Build Page</title>
+-<body bgcolor="orange" text="navy" link="#666699"  alink=#000000 vlink="#333333">
+-
+-<center>
+-<h2>NMI Build and Test System</h2>
+-</center>
+-
+-<br><br>
+-<center><a href="Run-main.php">Run Results</a></center>
+-<br><br>
+-<center><a href="http://www.cs.wisc.edu/condor/nmi">UW NMI Home</a></center>
+-<br><br>
+-<br>
+-<hr>
+-<br><br>
+-
+-</body>
+-</html>
+-
+diff --git a/nmi_tools/www/results/last.inc b/nmi_tools/www/results/last.inc
+index 469e100..ab9a55c 100644
+--- a/nmi_tools/www/results/last.inc
++++ b/nmi_tools/www/results/last.inc
+@@ -103,30 +103,42 @@ function get_queue_for_nmi_platform($platform, $type) {
+   if($type == "crosstest") $type = "test";
+ 
+   $platform_without_prefix = preg_replace("/nmi:/", "", $platform);
+-  $output = `/usr/local/condor/bin/condor_q -global -const 'nmi_target_platform=="$platform_without_prefix" && nmi_run_type=="$type"' -format '%-2s ' 'ifThenElse(JobStatus==0,"U",ifThenElse(JobStatus==1,"I",ifThenElse(JobStatus==2,"R",ifThenElse(JobStatus==3,"X",ifThenElse(JobStatus==4,"C",ifThenElse(JobStatus==5,"H",ifThenElse(JobStatus==6,"E",string(JobStatus))))))))' -format "%6d " ClusterId -format " %-14s " Owner -format '%-11s\n' 'formatTime(QDate,"%0m/%d %H:%M")'`;
++  $output = `/usr/local/condor/bin/condor_q -global -const 'nmi_target_platform=="$platform_without_prefix" && nmi_run_type=="$type"' -format '%-2s ' 'ifThenElse(JobStatus==0,"U",ifThenElse(JobStatus==1,"I",ifThenElse(JobStatus==2,"R",ifThenElse(JobStatus==3,"X",ifThenElse(JobStatus==4,"C",ifThenElse(JobStatus==5,"H",ifThenElse(JobStatus==6,"E",string(JobStatus))))))))' -format "%6d " ClusterId -format " %-14s " Owner -format '%-11s ' 'formatTime(QDate,"%0m/%d %H:%M")' -format '%-11s\n' 'formatTime(EnteredCurrentStatus,"%0m/%d %H:%M")'`;
+   $queue_contents = split("\n", $output);
+   $depth = sizeof($queue_contents) - 1;
+-  $output = "<table><tr><th>State</th><th>ID</th><th>Owner</th><th>Submitted</th></tr>\n";
+-  $has_running_job = 0;
+-  foreach ($queue_contents as $line) {
+-    $items = preg_split("/\s+/", $line);
+-    if(sizeof($items) == 5) {
+-      $style = "background-color:#FFFFAA; text-decoration:none;";
+-      if($items[0] == "R") {
+-	$style = "background-color:#0097C5;";
+-	$has_running_job++;
++  if($depth != 0) {
++    $output = "<table><tr><th>State</th><th>ID</th><th>Owner</th><th>Submitted</th><th>Started</th></tr>\n";
++    $has_running_job = 0;
++    foreach ($queue_contents as $line) {
++      $items = preg_split("/\s+/", $line);
++      if(sizeof($items) == 7) {
++	$style = "background-color:#FFFFAA; text-decoration:none;";
++	if($items[0] == "R") {
++	  $style = "background-color:#0097C5;";
++	  $has_running_job++;
++	}
++	else {
++	  # If the job is not running we don't care about 'EnteredCurrentStatus',
++	  # a.k.a. "Start Time"
++	  $items[5] = "";
++	  $items[6] = "";
++	  if($items[0] == "H") {
++	    $style = "background-color:#A1A1A1;";
++	  }
++	}
++	$output .= "<tr style=\"$style\"><td style=\"text-align:center\">$items[0]</td><td>$items[1]</td><td>$items[2]</td><td>$items[3]&nbsp;$items[4]</td><td>$items[5]&nbsp;$items[6]</tr>\n";
+       }
+-      elseif($items[0] == "H") {
+-	$style = "background-color:#A1A1A1;";
+-      }
+-      $output .= "<tr style=\"$style\"><td style=\"text-align:center\">$items[0]</td><td>$items[1]</td><td>$items[2]</td><td>$items[3]&nbsp;$items[4]</td></tr>\n";
+     }
++    $output .= "</table>\n";
++  }
++  else {
++    $output = "No jobs in queue";
+   }
+-  $output .= "</table>\n";
+ 
+   $note = "";
+-  if($has_running_job == 0) {
++  if($has_running_job == 0 && $depth != 0) {
+     $note = "*";
++    $output = "<font style=\"color:red\">* No job is running!</font><br />$output";
+   }
+ 
+   $ret = Array();
+@@ -135,5 +147,14 @@ function get_queue_for_nmi_platform($platform, $type) {
+   return $ret;
+ }
+ 
+-?>
++function make_sidebar() {
++  echo "<div id='nav'>\n";
++
++  echo "<p><a href='" . AUTO_URL . "'>Auto builds</a>\n";
++  echo "<p><a href='" . ONEOFFS_URL . "'>One-off builds</a>\n";
++  echo "<p><a href='" . QUEUE_DEPTH_URL . "'>NMI platform queue</a>\n";
+ 
++  echo "</div>\n";
++}
++
++?>
+diff --git a/nmi_tools/www/results/parse-windows-build.pl b/nmi_tools/www/results/parse-windows-build.pl
+index 1147de9..dfd795f 100755
+--- a/nmi_tools/www/results/parse-windows-build.pl
++++ b/nmi_tools/www/results/parse-windows-build.pl
+@@ -22,31 +22,42 @@ $ARGV[0] =~ s/[|<>]//g;
+ 
+ open(FILE, '<', $ARGV[0]) or die("Cannot open $ARGV[0]: $!");
+ 
++my @output;
+ my @chunk;
+ my $begin_re = qr/^------ /;
+ my $end_re   = qw/ error\(s\),/;
+ while(<FILE>) {
+-    if(/$begin_re/ .. /$end_re/) {
++    if(/\d+\s+succeeded/) {
++        # We want this to print first, so make sure it's at the beginning of @output
++        unshift @output, $_;
++    }
++    elsif(/$begin_re/ .. /$end_re/) {
+ 	push @chunk, $_;
+ 
+ 	if(/$end_re/) {
+ 	    if(/\s0\s+error\(s\),/) {
+ 		if(/,\s+0\s+warning/) {
+-		    print $_;
++                    # TJ requested that we do not print this line.  So for now, do nothing
++		    # print $_;
+ 		}
+ 		else {
+ 		    $_ =~ s/,\s+(\d+\s+warning\(s\))/, <font style="background-color:yellow">$1<\/font>/;
+-		    print $_;
++		    push @output, $_;
+ 		}
+ 	    }
+ 	    else {
+ 		pop @chunk;
+-		print @chunk;
++
++                my @tmp = map { s/(error \S+)/<font style="background-color:#ff00ff">$1<\/font>/; $_ } grep / (error|warning) (C|LNK|PRJ)\d+/, @chunk;
++                push @output, @tmp;
++
+ 		
+ 		$_ =~ s/\s(\d+\s+error\(s\))/ <font style="background-color:red">$1<\/font>/;
+-		print $_;
++		push @output, $_;
+ 	    }
+ 	    @chunk = ();
+ 	}
+     }
+ }
++
++print @output;
+diff --git a/nmi_tools/www/results/test.php b/nmi_tools/www/results/test.php
+deleted file mode 100644
+index 2b4d60c..0000000
+--- a/nmi_tools/www/results/test.php
++++ /dev/null
+@@ -1,348 +0,0 @@
+-<?php
+-   //
+-   // Configuration
+-   //
+-   define("BRANCH_URL", "./Run-condor-branch.php?branch=%s&user=%s");
+-   define("DETAIL_URL", "./Run-condor-details.php?runid=%s&type=%s&user=%s");
+-   define("CROSS_DETAIL_URL", "./Run-condor-pre-details.php?runid=%s&type=%s&user=%s");
+-   define("CONDOR_USER", "cndrauto");
+-   
+-   $result_types = Array( "passed", "pending", "failed", "missing" );
+-
+-   require_once "./load_config.inc";
+-   load_config();
+-
+-   //
+-   // These are the platforms that never have tests in the nightly builds
+-   // This is a hack for now and there's no way to differentiate between different
+-   // branchs. But you know, life is funny that way -- you never really get what you want
+-   //
+-   //$no_test_platforms = Array( "ppc_macos_10.4", "x86_macos_10.4" );
+-   $no_test_platforms = Array( );
+-?>
+-<html>
+-<head>
+-<Title>NMI - Condor Latest Build/Test Results</TITLE>
+-<LINK REL="StyleSheet" HREF="condor.css" TYPE="text/css">
+-</HEAD>
+-<body>
+-
+-<h1><a href="./Run-condor.php" class="title">Condor Latest Build/Test Results</a></h1>
+-<table border=1 width="85%">
+-   <tr>
+-      <th>Branch<br><small>Click to see branch history</small></th>
+-      <th>Runid</th>
+-      <th>Last build</th>
+-      <th>User</th>
+-      <th>Build Results</th>
+-      <th>Test Results</th>  
+-      <th>Cross Test Results</th>  
+-      </tr>
+-
+-<?php
+-$db = mysql_connect(WEB_DB_HOST, DB_READER_USER, DB_READER_PASS) or die ("Could not connect : " . mysql_error());
+-mysql_select_db(DB_NAME) or die("Could not select database");
+-
+-$query_runids="
+-SELECT 
+-  LEFT(description,
+-       (IF(LOCATE('branch-',description),
+-         LOCATE('branch-',description)+5,
+-         (IF(LOCATE('trunk-',description),
+-            LOCATE('trunk-',description)+4,
+-            CHAR_LENGTH(description)))))) AS branch,
+-  MAX(convert_tz(start, 'GMT', 'US/Central')) as start,
+-  run_type, 
+-  max(runid) as runid,
+-  user,
+-  archive_results_until,
+-  result
+-FROM 
+-  Run 
+-WHERE 
+-  component='condor' AND 
+-  project='condor' AND
+-  run_type='build' AND
+-  description != '' AND 
+-  DATE_SUB(CURDATE(), INTERVAL 10 DAY) <= start 
+-GROUP BY 
+-  branch,
+-  user,
+-  run_type 
+-ORDER BY 
+-  IF(user = '".CONDOR_USER."',0,1), runid desc
+-";
+-
+-$last_user = CONDOR_USER;
+-$result = mysql_query($query_runids) or die ("Query ".$query_runids." failed : " . mysql_error());
+-while ($row = mysql_fetch_array($result)) {
+-   $runid      = $row["runid"];
+-   $branch     = $row["branch"];
+-   $start      = $row["start"];
+-   $user       = $row["user"];
+-   $run_result = $row["result"];
+-	$pin 			= $row["archive_results_until"];
+-   
+-   //
+-   // Apply a break for nightly builds
+-   //
+-   if ($last_user == CONDOR_USER && $user != CONDOR_USER) {
+-      echo "<tr>\n".
+-           "   <td colspan=\"5\"><B><i>One-off Builds</i></b></td>\n".
+-           "</tr>\n";
+-   }
+-
+-   echo "<tr>\n";
+-   echo <<<EOF
+-      <font size="-2">$runid - $used</font>
+-EOF;
+-   // --------------------------------
+-   // BUILDS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run ".
+-          " WHERE Run.runid = {$runid}  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["build"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["build"]["failed"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["build"]["pending"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["build"]["passed"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-          "       ((Run.project_version = Run.component_version)  OR (Run.component_version = 'native' ))".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["test"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["test"]["failed"]++;
+-         $data["test"]["total"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["test"]["pending"]++;
+-         $data["test"]["total"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["test"]["passed"]++;
+-         $data["test"]["total"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   // --------------------------------
+-   // CROSS TESTS
+-   // --------------------------------
+-   $sql = "SELECT SUM(IF(Task.result = 0, 1, 0)) AS passed, ".
+-          "       SUM(IF(Task.result != 0, 1, 0)) AS failed, ".
+-          "       SUM(IF(Task.result IS NULL, 1, 0)) AS pending ".
+-          "  FROM Task, Run, Method_nmi ".
+-          " WHERE Method_nmi.input_runid = {$runid} AND ".
+-          "       Run.runid = Method_nmi.runid AND ".
+-          "       Run.user = '$user'  AND ".
+-          "       Task.runid = Run.runid AND ".
+-          "       Task.platform != 'local' AND ".
+-		  "       project_version != component_version AND ".
+-		  "		  component_version != 'native' ".
+-          " GROUP BY Task.platform ";
+-   $result2 = mysql_query($sql)
+-                  or die ("Query {$sql} failed : " . mysql_error());
+-   $data["crosstest"] = Array();
+-   while ($platforms = mysql_fetch_array($result2)) {
+-      if (!empty($platforms["failed"])) {
+-         $data["crosstest"]["failed"]++;
+-         $data["crosstest"]["total"]++;
+-      } elseif (!empty($platforms["pending"])) {
+-         $data["crosstest"]["pending"]++;
+-         $data["crosstest"]["total"]++;
+-      } elseif (!empty($platforms["passed"])) {
+-         $data["crosstest"]["passed"]++;
+-         $data["crosstest"]["total"]++;
+-      }
+-   } // WHILE
+-   mysql_free_result($result2);
+-
+-   //
+-   // HTML Table Row
+-   //
+-   $branch_url = sprintf(BRANCH_URL, $branch, $user);
+-   
+-   //
+-   // If there's nothing at all, just skip
+-   //
+-   // We only want to do this for one-off builds, if the nightly build
+-   // completely crapped out on us, we need to show it
+-   // Andy - 11/30/2006
+-   //
+-   if ($user != CONDOR_USER && !count($data["build"]) && !count($data["test"])) continue;
+-
+-	// Is this top level run pinned or not(probably not but could be one of a kind)
+-
+-	$findpin="
+-		SELECT 
+-  			run_type, 
+-  			runid,
+-  			user,
+-			archived,
+-  			archive_results_until
+-		FROM 
+-  			Run 
+-		WHERE 
+-  			runid = $runid ";
+-
+-   $pincheck = mysql_query($findpin)
+-                  or die ("Query {$findpin} failed : " . mysql_error());
+-   while ($pindetails = mysql_fetch_array($pincheck)) {
+-	  $pin = $pindetails["archive_results_until"];
+-	  $archived = $pindetails["archived"];
+-	  if( !(is_null($pin))) {
+-	  		$pinstr = "pin ". "$pin";
+-	  } else {
+-	  		$pinstr = "";
+-	  }
+-	  if( $archived == '0' ) {
+-	  		$archivedstr = "$runid". "<br><font size=\"-1\"> D </font>";
+-	  } else {
+-	  		$archivedstr = "$runid";
+-	  }
+-   } 
+-   
+-   echo <<<EOF
+-   <tr>
+-      <td><a href="{$branch_url}">{$branch}</a><br><font size="-2">$pinstr</font></td>
+-      <td align="center">{$archivedstr}</td>
+-      <td align="center">{$start}</td>
+-      <td align="center">{$user}</td>
+-EOF;
+-
+-   foreach (Array("build", "test", "crosstest") AS $type) {
+-      $cur = $data[$type];
+-      $status = ($cur["failed"] ? "FAILED" :
+-                ($cur["pending"] ? "PENDING" : "PASSED"));
+-      $color = $status;
+-
+-      ##
+-      ## Check for missing tests
+-      ## Since we know how many builds have passed and should fire off tests,
+-      ## we can do a simple check to make sure the total number of tests
+-      ## is equal to the the number of builds
+-      ## Andy - 01.09.2007
+-      ##
+-      if ($type == "test") {
+-         $no_test_cnt = 0;
+-         if (count($no_test_platforms)) {
+-            $sql = "SELECT count(DISTINCT platform) AS count ".
+-                   "  FROM Run, Task ".
+-                   " WHERE Run.runid = {$runid}  AND ".
+-                   "       Task.runid = Run.runid AND ".
+-                   "       Task.platform IN ('".implode("','", $no_test_platforms)."') ";
+-            $cnt_result = mysql_query($sql)
+-               or die ("Query {$sql} failed : " . mysql_error());
+-            $res = mysql_fetch_array($cnt_result);
+-            $no_test_cnt = $res["count"];
+-         }
+-         $cur["missing"] = $data["build"]["passed"] - $cur["total"] - $no_test_cnt;
+-         if ($cur["missing"] > 0) $color = "FAILED";
+-         elseif ($cur["missing"] < 0) $cur["missing"] = 0;
+-      }
+-
+-		if($type == "crosstest") {
+-      		$detail_url = sprintf(CROSS_DETAIL_URL, $runid, $type, $user);
+-		} else {
+-      		$detail_url = sprintf(DETAIL_URL, $runid, $type, $user);
+-	  	}
+-      
+-      //
+-      // No results
+-      //
+-      if (!count($cur)) {
+-         //
+-         // If this is a nightly build, we can check whether it failed and
+-         // give a failure notice. Without this, the box will just be empty
+-         // and people won't know what really happended
+-         //
+-         if (!empty($run_result) && $type == 'build') {
+-            $status = "FAILED";
+-                     echo <<<EOF
+-         <td class="{$status}" align="center">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-            </table>
+-         </td>
+-EOF;
+-         //
+-         // Just display an empty cell
+-         //
+-         } else {
+-            echo "<td>&nbsp;</td>\n";
+-         }
+-      //
+-      // Show Summary
+-      //
+-      } else {
+-                        
+-         echo <<<EOF
+-         <td class="{$color}" align="center" valign="top">
+-            <table cellpadding="1" cellspacing="0" width="100%" class="details">
+-               <tr>
+-                  <td colspan="2" class="detail_url"><a href="{$detail_url}">$status</a></td>
+-               </tr>
+-EOF;
+-         //
+-         // Show the different status tallies for platforms
+-         //
+-         foreach ($result_types AS $key) {
+-            if ($key == "missing" && empty($cur[$key])) continue;
+-            if ($key == "missing") {
+-               $prefix = "<B>";
+-               $postfix = "</B>";
+-            } else {
+-               $prefix = $postfix = "";
+-            }
+-
+-            echo "<tr>\n".
+-               "   <td width=\"75%\">{$prefix}".ucfirst($key)."{$postfix}</td>\n".
+-               "   <td width=\"25%\">{$prefix}".(int)$cur[$key]."{$postfix}</td>\n".
+-               "</tr>\n";
+-         } // FOREACH
+-         echo "</table></td>\n";
+-      } // RESULTS
+-   } // FOREACH
+-   
+-   echo "</tr>";
+-   $last_user = $user;
+-} // WHILE
+-mysql_free_result ($result);
+-
+-echo "</table>";
+-echo "</center>";
+-
+-mysql_close($db);
+-
+-?>
+-</body>
+-</html>
+diff --git a/src/.deprecate_classad.old/CMakeLists.txt b/src/.deprecate_classad.old/CMakeLists.txt
+deleted file mode 100644
+index 3c1adda..0000000
+--- a/src/.deprecate_classad.old/CMakeLists.txt
++++ /dev/null
+@@ -1,29 +0,0 @@
+- ###############################################################
+- # 
+- # Copyright 2011 Red Hat, Inc. 
+- # 
+- # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
+- # 
+- # Unless required by applicable law or agreed to in writing, software 
+- # distributed under the License is distributed on an "AS IS" BASIS, 
+- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- # See the License for the specific language governing permissions and 
+- # limitations under the License. 
+- # 
+- ############################################################### 
+-
+-
+-if (WANT_OLD_CLASSADS)
+-	file( GLOB ClassAdsOldRmvSrcs classad_lookup* *test*)
+-
+-	condor_glob( ClassAdsOldHdrs ClassAdsOldSrcs "${ClassAdsOldRmvSrcs}" )
+-
+-	#create the library
+-	condor_static_lib( classad.old "${ClassAdsOldHdrs};${ClassAdsOldSrcs}" )
+-else()
+-	message(STATUS "NOTE: skipping classads.old")
+-endif()
+diff --git a/src/.deprecate_classad.old/YourString.h b/src/.deprecate_classad.old/YourString.h
+deleted file mode 100644
+index ec4ece6..0000000
+--- a/src/.deprecate_classad.old/YourString.h
++++ /dev/null
+@@ -1,38 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#ifndef YOUR_STRING_H
+-#define YOUR_STRING_H
+-
+-// This is a simple wrapper class to enable char *'s
+-// that we don't manage to be put into HashTables
+-
+-// HashTable needs operator==, which we define to be
+-// case-insensitive for ClassAds
+-
+-class YourString {
+-	public:
+-		YourString() : s(0) {}
+-		YourString(const char *str) : s(str) {}
+-		bool operator==(const YourString &rhs) {
+-			return (strcasecmp(s,rhs.s) == 0);
+-		}
+-		const char *s; // Someone else owns this
+-};
+-#endif
+diff --git a/src/.deprecate_classad.old/ast.cpp b/src/.deprecate_classad.old/ast.cpp
+deleted file mode 100644
+index bddc1e3..0000000
+--- a/src/.deprecate_classad.old/ast.cpp
++++ /dev/null
+@@ -1,3441 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2010, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- *
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// ast.cpp
+-//
+-// Implementation of the AST module with an interface to the AttrList module.
+-//
+-//******************************************************************************
+-
+-#include "condor_common.h"
+-#include "condor_exprtype.h"
+-#include "condor_ast.h"
+-#include "condor_classad.h"
+-#include "condor_buildtable.h"
+-#include "condor_string.h"
+-
+-#include "Regex.h"
+-
+-// gcc doesn't seem to define FLT_MIN on OpenSolaris 2009.06
+-#if !defined(FLT_MIN) && defined(__FLT_MIN__)
+-  #define FLT_MIN	__FLT_MIN__
+-#endif
+-#if !defined(FLT_MAX) && defined(__FLT_MAX__)
+-  #define FLT_MAX	__FLT_MAX__
+-#endif
+-
+-extern char * format_time(int);
+-extern void evalFromEnvironment (const char *, EvalResult *);
+-static bool name_in_list(const char *name, StringList &references);
+-static void printComparisonOpToStr (char *, ExprTree *, ExprTree *, char *);
+-static int calculate_math_op_length(ExprTree *lArg, ExprTree *rArg, int op_length);
+-static void dprintResult(ExprTree *tree, EvalResult *result);
+-
+-bool classad_debug_function_run = 0;
+-
+-#define EatSpace(ptr)  while(*ptr != '\0') ptr++;
+-
+-int EvalExprTree( ExprTree *expr, const AttrList *source, const AttrList *target,
+-				  EvalResult *result )
+-{
+-	return expr->EvalTree( source, target, result );
+-}
+-
+-const char *ExprTreeToString( ExprTree *expr ) {
+-	static MyString value;
+-	if ( expr == NULL ) {
+-		return NULL;
+-	}
+-	expr->PrintToStr( value );
+-	return value.Value();
+-}
+-
+-// EvalResult ctor
+-EvalResult::EvalResult()
+-{
+-	type = LX_UNDEFINED;
+-	debug = false;
+-}
+-
+-// EvalResult dtor
+-EvalResult::~EvalResult()
+-{
+-	if ((type == LX_STRING || type == LX_TIME) && (s)) {
+-		delete [] s;
+-	}
+-}
+-
+-void
+-EvalResult::deepcopy(const EvalResult & rhs)
+-{
+-	type = rhs.type;
+-	debug = rhs.debug;
+-	switch ( type ) {
+-		case LX_INTEGER:
+-		case LX_BOOL:
+-			i = rhs.i;
+-			break;
+-		case LX_FLOAT:
+-			f = rhs.f;
+-			break;
+-		case LX_STRING:
+-				// need to make a deep copy of the string
+-			s = strnewp( rhs.s );
+-			break;
+-		default:
+-			break;
+-	}
+-}
+-
+-// EvalResult copy ctor
+-EvalResult::EvalResult(const EvalResult & rhs)
+-{
+-	deepcopy(rhs);
+-}
+-
+-// EvalResult assignment op
+-EvalResult & EvalResult::operator=(const EvalResult & rhs)
+-{
+-	if ( this == &rhs )	{	// object assigned to itself
+-		return *this;		// all done.
+-	}
+-
+-		// deallocate any state in this object by invoking dtor
+-	this->~EvalResult();
+-
+-		// call copy ctor to make a deep copy of data
+-	deepcopy(rhs);
+-
+-		// return reference to invoking object
+-	return *this;
+-}
+-
+-
+-void EvalResult::fPrintResult(FILE *fi)
+-{
+-    switch(type)
+-    {
+-	case LX_INTEGER :
+-
+-	     fprintf(fi, "%d", this->i);
+-	     break;
+-
+-	case LX_FLOAT :
+-
+-	     fprintf(fi, "%f", this->f);
+-	     break;
+-
+-	case LX_STRING :
+-
+-	     fprintf(fi, "%s", this->s);
+-	     break;
+-
+-	case LX_NULL :
+-
+-	     fprintf(fi, "NULL");
+-	     break;
+-
+-	case LX_UNDEFINED :
+-
+-	     fprintf(fi, "UNDEFINED");
+-	     break;
+-
+-	case LX_ERROR :
+-
+-	     fprintf(fi, "ERROR");
+-	     break;
+-
+-	default :
+-
+-	     fprintf(fi, "type unknown");
+-	     break;
+-    }
+-    fprintf(fi, "\n");
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Expression tree node constructors.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// ">" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int Integer::operator >(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value > tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value > tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-int Float::operator >(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value > tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value > tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// ">=" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int Integer::operator >=(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value >= tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value >= tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-int Float::operator >=(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value >= tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value >= tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// "<" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int Integer::operator <(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value < tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value < tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-int Float::operator <(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value < tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value < tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// "<=" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int Integer::operator <=(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value <= tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value <= tmpResult.f;
+-    }
+-    return FALSE;
+-}
+-
+-int Float::operator <=(ExprTree& tree)
+-{
+-    EvalResult	tmpResult;
+-
+-    tree.EvalTree((AttrList*)NULL, &tmpResult);
+-    if(tmpResult.type == LX_INTEGER)
+-    {
+-	return value <= tmpResult.i;
+-    }
+-    else if(tmpResult.type == LX_FLOAT)
+-    {
+-	return value <= tmpResult.f;
+-    }
+-    return FALSE;
+-  }
+-
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Two overloaded evaluation functions. One take a AttrList, one takes a
+-// AttrList list.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-//------tw 11/16/95
+-// add one more overloaded evaluation function, it takes two AttrLists,
+-// one AttrList for "MY." variable valuation and the other AttrList for "TARGET." variable
+-// evaluation.
+-//----------
+-
+-int ExprTree::EvalTree(const AttrList* l, EvalResult* r)
+-{
+-	return EvalTree(l, NULL, r);
+-}
+-
+-int ExprTree::EvalTree(const AttrList* l1, const AttrList* l2, EvalResult* r)
+-{
+-	int rval;
+-
+-	if (evalFlag) {
+-		// circular evaluation
+-		evalFlag = false;
+-		r->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	// set evalFlag, evaluate, clear evalFlag
+-	evalFlag = true;
+-	rval = _EvalTree(l1, l2, r);
+-	evalFlag = false;
+-
+-	return rval;
+-}
+-
+-int Variable::_EvalTree(const AttrList* classad, EvalResult* val)
+-{
+-    ExprTree* tmp = NULL;
+-
+-    if(!val || !classad)
+-    {
+-	return FALSE;
+-    }
+-    
+-    if(!(tmp = classad->LookupExpr(name)))
+-    {
+-		val->type = LX_UNDEFINED;
+-		dprintResult(this, val);
+-        return TRUE;
+-    }
+-
+-    int result = tmp->EvalTree(classad, val);
+-	dprintResult(this, val);
+-
+-	return result;
+-}
+-
+-int Variable::_EvalTree( const AttrList* my_classad, const AttrList* target_classad, EvalResult* val)
+-{
+-	return _EvalTreeRecursive( name, my_classad, target_classad, val, false );
+-}
+-
+-/*
+-Split a variable name into scope.target
+-If there is no scope, evaluate it simply.
+-Otherwise, identify the ClassAd corresponding to the scope, and re-evaluate.
+-*/
+-
+-int Variable::_EvalTreeRecursive( const char *adName, const AttrList* my_classad, const AttrList* target_classad, EvalResult* val, bool restrict_search)
+-{
+-	if( !val || !adName ) return FALSE;
+-
+-	MyString n(adName);
+-	MyString prefix;
+-	MyString rest;
+-
+-	int dotPos = n.FindChar('.');
+-
+-	if (dotPos == -1) {
+-		// no dots in name
+-		rest = n;
+-	} else {
+-		prefix = n.Substr(0, dotPos - 1);
+-		rest   = n.Substr(dotPos + 1, n.Length());
+-	}
+-
+-	if(prefix.Length() > 0) {
+-        // Note that we use restrict_search=true instead of simply
+-        // passing NULL for the other ClassAd. This is because we might
+-        // still need to refer to the other ClassAd. For example, evaluating
+-        // A in ClassAd 1 should give 3
+-        // ClassAd 1: A = TARGET.B; C = 3
+-        // ClassAd 2: B = TARGET.C
+-		if(!strcasecmp(prefix.Value(),"MY") ) {
+-			return _EvalTreeRecursive(rest.Value(),my_classad,target_classad,val, true);
+-		} else if(!strcasecmp(prefix.Value(),"TARGET")) {
+-			return _EvalTreeRecursive(rest.Value(),target_classad,my_classad,val, true);
+-        }
+-	} else {
+-		return this->_EvalTreeSimple(rest.Value(),my_classad,target_classad,val, restrict_search);
+-	}
+-
+-	val->type = LX_UNDEFINED;
+-	return TRUE;
+-}
+-
+-/*
+-Once it has been reduced to a simple name, resolve the variable by
+-looking it up first in MY, then TARGET, and finally, the environment.
+-*/
+-
+-int Variable::_EvalTreeSimple( const char *adName, const AttrList *my_classad, const AttrList *target_classad, EvalResult *val, bool restrict_search )
+-{
+-	ExprTree *tmp;
+-
+-	if(my_classad)
+-	{
+-		tmp = my_classad->LookupExpr(adName);
+-		if(tmp) {
+-			int result = tmp->EvalTree(my_classad, target_classad, val);
+-			dprintResult(this, val);
+-			return result;
+-		}
+-	}
+-
+-	if(!restrict_search && target_classad)
+-	{
+-		tmp = target_classad->LookupExpr(adName);
+-		if(tmp) {
+-			int result = tmp->EvalTree(target_classad, my_classad, val);
+-			dprintResult(this, val);
+-			return result;
+-		}
+-	}
+-
+-    evalFromEnvironment(adName,val);
+-	dprintResult(this, val);
+-	return TRUE;
+-}
+-
+-int Integer::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_INTEGER;
+-    if(unit == 'k')
+-    {
+-	val->i = value / 1024;
+-    }
+-    else
+-    {
+-	val->i = value;
+-    }
+-
+-    return TRUE;
+-}
+-
+-//-------tw-------------
+-int Integer::_EvalTree(const AttrList*, const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_INTEGER;
+-    if(unit == 'k')
+-    {
+-	val->i = value / 1024;
+-    }
+-    else
+-    {
+-	val->i = value;
+-    }
+-
+-    return TRUE;
+-}
+-
+-//--------------------
+-int Float::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_FLOAT;
+-    if(unit == 'k')
+-    {
+-	val->f = value / 1024;
+-    }
+-    else
+-    {
+-	val->f = value;
+-    }
+-
+-    return TRUE;
+-}
+-
+-
+-//-------tw-------------
+-int Float::_EvalTree(const AttrList*, const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_FLOAT;
+-    if(unit == 'k')
+-    {
+-	val->f = value / 1024;
+-    }
+-    else
+-    {
+-	val->f = value;
+-    }
+-
+-    return TRUE;
+-}
+-
+-//--------------------------------
+-int String::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_STRING;
+-    val->s = new char[strlen(value) + 1];
+-    strcpy(val->s, value);
+-    return TRUE;
+-}
+-
+-int ISOTime::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_TIME;
+-    val->s = new char[strlen(time) + 1];
+-    strcpy(val->s, time);
+-    return TRUE;
+-}
+-
+-//-------tw-----------------------------
+-
+-int String::_EvalTree(const AttrList*, const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_STRING;
+-    val->s = new char[strlen(value) + 1];
+-    strcpy(val->s, value);
+-    return TRUE;
+-}
+-
+-int ISOTime::_EvalTree(const AttrList*, const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_TIME;
+-    val->s = new char[strlen(time) + 1];
+-    strcpy(val->s, time);
+-    return TRUE;
+-}
+-
+-//-----------------------------------
+-int ClassadBoolean::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_INTEGER;
+-    val->i = value;
+-    return TRUE;
+-}
+-
+-
+-//-----------tw------------------------
+-
+-int ClassadBoolean::_EvalTree(const AttrList*, const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_INTEGER;
+-    val->i = value;
+-    return TRUE;
+-}
+-
+-//-----------------------------------
+-
+-
+-int Undefined::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_UNDEFINED;
+-    return TRUE;
+-}
+-
+-//------------tw-------------------
+-int Undefined::_EvalTree(const AttrList*, const AttrList*,  EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_UNDEFINED;
+-    return TRUE;
+-}
+-//--------------------------------
+-
+-int Error::_EvalTree(const AttrList*, EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_ERROR;
+-    return TRUE;
+-}
+-
+-//------------tw-------------------
+-int Error::_EvalTree(const AttrList*, const AttrList*,  EvalResult* val)
+-{
+-    if(!val)
+-    {
+-	return FALSE;
+-    }
+-    val->type = LX_ERROR;
+-    return TRUE;
+-}
+-//--------------------------------
+-
+-void ExprTree::GetReferences(const AttrList * /* base_attlrist */,
+-							 StringList & /* internal_references */,
+-							 StringList & /* external_references */) const
+-{
+-	return;
+-}
+-
+-void BinaryOpBase::GetReferences(const AttrList *base_attrlist,
+-								 StringList &internal_references,
+-								 StringList &external_references) const
+-{
+-	if (lArg != NULL) {
+-		lArg->GetReferences(base_attrlist, internal_references, external_references);
+-	}
+-	if (rArg != NULL) {
+-		rArg->GetReferences(base_attrlist, internal_references, external_references);
+-	}
+-	return;
+-}
+-
+-void AssignOpBase::GetReferences(const AttrList *base_attrlist,
+-								 StringList &internal_references,
+-								 StringList &external_references) const
+-{
+-	// We don't look at the left argument, because we know that
+-	// we won't want to add it to the internal or external references.
+-	if (rArg != NULL) {
+-		rArg->GetReferences(base_attrlist, internal_references, external_references);
+-	}
+-	return;
+-}
+-
+-void VariableBase::GetReferences(const AttrList *base_attrlist,
+-								 StringList &internal_references,
+-								 StringList &external_references) const
+-{
+-	bool is_external_reference; // otherwise, internal
+-	char *simplified_name;
+-
+-	is_external_reference = base_attrlist->IsExternalReference(name,
+-													  &simplified_name);
+-	if (is_external_reference) {
+-		if (!name_in_list(simplified_name, external_references)) {
+-			external_references.append(simplified_name);
+-		}
+-	}
+-	else {
+-		if (!name_in_list(simplified_name, internal_references)) {
+-			internal_references.append(simplified_name);
+-		}
+-	}
+-	// We added simplified_name to the list, but it was copied
+-	// when we did the append, so we need to free it now.
+-	free(simplified_name);
+-
+-	return;
+-}
+-
+-static bool name_in_list(const char *name, StringList &references)
+-{
+-	return ( references.contains_anycase(name) ? true : false );
+-}
+-
+-// Calculate how many bytes an expression will print to
+-int Variable::CalcPrintToStr(void)
+-{
+-	return strlen(name);
+-}
+-
+-int Integer::CalcPrintToStr(void)
+-{
+-	int  length;
+-	char printed_representation[256];
+-	printed_representation[0] = 0;
+-	PrintToStr(printed_representation);
+-	length = strlen(printed_representation);
+-	return length;
+-}
+-
+-int Float::CalcPrintToStr(void)
+-{
+-	int  length;
+-	char printed_representation[256];
+-	printed_representation[0] = 0;
+-	PrintToStr(printed_representation);
+-	length = strlen(printed_representation);
+-	return length;
+-}
+-
+-int String::CalcPrintToStr(void)
+-{
+-	int   length;
+-	char  *p;
+-	length = 0;
+-
+-	// Unfortunately, we have to walk the string to find the length.
+-	// This is because it contain quote marks
+-	for (p = value; p && *p != 0; p++) {
+-		if (*p == '"') {
+-			length += 2;
+-		} else {
+-			length++;
+-		}
+-	}
+-	// Then we have to add 2, for the opening and closing quote marks.
+-	return length + 2;
+-}
+-
+-int ISOTime::CalcPrintToStr(void)
+-{
+-	// Add 2, for the opening and closing quote (') marks.
+-	return strlen(time) + 2;
+-}
+-
+-int ClassadBoolean::CalcPrintToStr(void)
+-{
+-	int  length;
+-	char printed_representation[256];
+-	printed_representation[0] = 0;
+-	PrintToStr(printed_representation);
+-	length = strlen(printed_representation);
+-	return length;
+-}
+-
+-int Error::CalcPrintToStr(void)
+-{
+-	int  length;
+-	char printed_representation[256];
+-	printed_representation[0] = 0;
+-	PrintToStr(printed_representation);
+-	length = strlen(printed_representation);
+-	return length;
+-}
+-
+-int Undefined::CalcPrintToStr(void)
+-{
+-	int  length;
+-	char printed_representation[256];
+-	printed_representation[0] = 0;
+-	PrintToStr(printed_representation);
+-	length = strlen(printed_representation);
+-	return length;
+-}
+-
+-int AddOp::CalcPrintToStr(void)
+-{
+-	int  length;
+-
+-	if (lArg == NULL) {
+-		length = 1                   // Left parenthesis
+-			+ rArg->CalcPrintToStr() // Parenthesized expressions
+-			+ 1;                     // Right parenthesis
+-	}
+-	else {
+-		length = lArg->CalcPrintToStr() // Left subexpression
+-			+ 3                         // for " + "
+-			+ rArg->CalcPrintToStr();   // Right subexpression
+-		if (unit == 'k') {
+-			length += 2; // for " k"
+-		}
+-	}
+-
+-	return length;
+-}
+-
+-int SubOp::CalcPrintToStr(void)
+-{
+-	int length;
+-
+-	length = calculate_math_op_length(lArg, rArg, 3);
+-
+-	if (unit == 'k') {
+-		length += 2; // for " k"
+-	}
+-
+-	return length;
+-}
+-
+-int MultOp::CalcPrintToStr(void)
+-{
+-	int length;
+-
+-	length = calculate_math_op_length(lArg, rArg, 3);
+-
+-	if (unit == 'k') {
+-		length += 2; // for " k"
+-	}
+-
+-	return length;
+-}
+-
+-
+-int DivOp::CalcPrintToStr(void)
+-{
+-	int length;
+-
+-	length = calculate_math_op_length(lArg, rArg, 3);
+-
+-	if (unit == 'k') {
+-		length += 2; // for " k"
+-	}
+-
+-	return length;
+-}
+-
+-/// ----------------
+-int MetaEqOp::CalcPrintToStr(void)
+-{
+-	// 5 for " =?= "
+-	return calculate_math_op_length(lArg, rArg, 5);
+-}
+-
+-int MetaNeqOp::CalcPrintToStr(void)
+-{
+-	// 5 for " =!= "
+-	return calculate_math_op_length(lArg, rArg, 5);
+-}
+-
+-int EqOp::CalcPrintToStr(void)
+-{
+-	// 4 for " == "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int NeqOp::CalcPrintToStr(void)
+-{
+-	// 4 for " != "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int GtOp::CalcPrintToStr(void)
+-{
+-	// 3 for " > "
+-	return calculate_math_op_length(lArg, rArg, 3);
+-}
+-
+-int GeOp::CalcPrintToStr(void)
+-{
+-	// 4 for " >= "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int LtOp::CalcPrintToStr(void)
+-{
+-	// 3 for " < "
+-	return calculate_math_op_length(lArg, rArg, 3);
+-}
+-
+-int LeOp::CalcPrintToStr(void)
+-{
+-	// 4 for " <= "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int AndOp::CalcPrintToStr(void)
+-{
+-	// 4 for " && "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int OrOp::CalcPrintToStr(void)
+-{
+-	// 4 for " || "
+-	return calculate_math_op_length(lArg, rArg, 4);
+-}
+-
+-int AssignOp::CalcPrintToStr(void)
+-{
+-	// 3 for " = "
+-	return calculate_math_op_length(lArg, rArg, 3);
+-}
+-
+-/// -----------------
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Print an Expression to a string.                                           //
+-////////////////////////////////////////////////////////////////////////////////
+-
+-void Variable::PrintToStr(char* str)
+-{
+-  strcat(str, name);
+-}
+-
+-void Integer::PrintToStr(char* str)
+-{
+-  sprintf(str+strlen(str), "%d", value);
+-  if(unit == 'k')
+-	strcat(str, " k");
+-}
+-
+-void Float::PrintToStr(char* str)
+-{
+-  sprintf(str+strlen(str), "%f", value);
+-  if(unit == 'k')
+-	strcat(str, " k");
+-}
+-
+-void String::PrintToStr(char* str)
+-{
+-  char*		ptr1 = value;
+-  char*		ptr2 = str;
+-
+-  while(*ptr2 != '\0') ptr2++;
+-  *ptr2 = '"';
+-  ptr2++;
+-  while( ptr1 && *ptr1 != '\0')
+-  {
+-	if(*ptr1 == '"')
+-	{
+-		*ptr2 = '\\';
+-		ptr2++;
+-	}
+-	*ptr2 = *ptr1;
+-	ptr1++;
+-	ptr2++;
+-  }
+-  *ptr2 = '"';
+-  *(ptr2 + 1) = '\0';
+-}
+-
+-void ISOTime::PrintToStr(char* str)
+-{
+-  char*		ptr1 = time;
+-  char*		ptr2 = str;
+-
+-  while(*ptr2 != '\0') ptr2++;
+-  *ptr2 = '\'';
+-  ptr2++;
+-  while(*ptr1 != '\0')
+-  {
+-	*ptr2 = *ptr1;
+-	ptr1++;
+-	ptr2++;
+-  }
+-  *ptr2 = '\'';
+-  *(ptr2 + 1) = '\0';
+-}
+-
+-void ClassadBoolean::PrintToStr(char* str)
+-{
+-	if( value )
+-		strcat( str, "TRUE" );
+-	else
+-		strcat( str, "FALSE" );
+-}
+-
+-void Undefined::PrintToStr(char* str)
+-{
+-	strcat( str, "UNDEFINED" );
+-}
+-
+-void Error::PrintToStr(char* str)
+-{
+-	strcat( str, "ERROR" );
+-}
+-
+-void AddOp::PrintToStr(char* str)
+-{
+-	if( !lArg ) {
+-		// HACK!!  No lArg implies user-directed parenthesization
+-		strcat( str, "(" );
+-		((ExprTree*)rArg)->PrintToStr( str );
+-		strcat( str, ")" );
+-		return;
+-	}
+-
+-	// lArg available --- regular addition operation
+-	((ExprTree*)lArg)->PrintToStr(str);
+-    strcat(str, " + ");
+-	((ExprTree*)rArg)->PrintToStr(str);
+-    if(unit == 'k') strcat(str, " k");
+-}
+-
+-void SubOp::PrintToStr(char* str)
+-{
+-    if(lArg) {
+-		((ExprTree*)lArg)->PrintToStr(str);
+-    }
+-    strcat(str, " - ");
+-    if(rArg) {
+-		((ExprTree*)rArg)->PrintToStr(str);
+-	}
+-    if(unit == 'k') strcat(str, " k");
+-}
+-
+-
+-void MultOp::PrintToStr(char* str)
+-{
+-    if(lArg) {
+-		((ExprTree*)lArg)->PrintToStr(str);
+-    }
+-    strcat(str, " * ");
+-    if(rArg) {
+-		((ExprTree*)rArg)->PrintToStr(str);
+-    }
+-    if(unit == 'k') strcat(str, " k");
+-}
+-
+-void DivOp::PrintToStr(char* str)
+-{
+-    if(lArg) {
+-		((ExprTree*)lArg)->PrintToStr(str);
+-    }
+-    strcat(str, " / ");
+-    if(rArg) {
+-		((ExprTree*)rArg)->PrintToStr(str);
+-    }
+-    if(unit == 'k') strcat(str, " k");
+-}
+-
+-void MetaEqOp::PrintToStr(char* str)
+-{
+-    printComparisonOpToStr (str, lArg, rArg, " =?= ");
+-}
+-
+-void MetaNeqOp::PrintToStr(char* str)
+-{
+-    printComparisonOpToStr (str, lArg, rArg, " =!= ");
+-}
+-
+-void EqOp::PrintToStr(char* str)
+-{
+-    printComparisonOpToStr (str, lArg, rArg, " == ");
+-}
+-
+-void NeqOp::PrintToStr(char* str)
+-{
+-    printComparisonOpToStr (str, lArg, rArg, " != ");
+-}
+-
+-void GtOp::PrintToStr(char* str)
+-{
+-	printComparisonOpToStr (str, lArg, rArg, " > ");
+-}
+-
+-void GeOp::PrintToStr(char* str)
+-{
+-    printComparisonOpToStr (str, lArg, rArg, " >= ");
+-}
+-
+-void LtOp::PrintToStr(char* str)
+-{
+-	printComparisonOpToStr (str, lArg, rArg, " < ");
+-}
+-
+-void LeOp::PrintToStr(char* str)
+-{
+-	printComparisonOpToStr (str, lArg, rArg, " <= ");
+-}
+-
+-void AndOp::PrintToStr(char* str)
+-{
+-    if(lArg) {
+-		((ExprTree*)lArg)->PrintToStr(str);
+-	}
+-    strcat(str, " && ");
+-    if(rArg) {
+-		((ExprTree*)rArg)->PrintToStr(str);
+-	}
+-}
+-
+-void OrOp::PrintToStr(char* str)
+-{
+-	if( lArg )((ExprTree*)lArg)->PrintToStr(str);
+-    strcat(str, " || ");
+-    if(rArg) ((ExprTree*)rArg)->PrintToStr(str);
+-}
+-
+-void AssignOp::PrintToStr(char* str)
+-{
+-    if(lArg) ((ExprTree*)lArg)->PrintToStr(str);
+-    strcat(str, " = ");
+-    if(rArg) ((ExprTree*)rArg)->PrintToStr(str);
+-}
+-
+-
+-
+-static void
+-printComparisonOpToStr (char *str, ExprTree *lArg, ExprTree *rArg, char *op)
+-{
+-    if(lArg) {
+-		((ExprTree*)lArg)->PrintToStr(str);
+-    }
+-    strcat(str, op);
+-    if(rArg) {
+-		((ExprTree*)rArg)->PrintToStr(str);
+-    }
+-}
+-
+-static int
+-calculate_math_op_length(ExprTree *lArg, ExprTree *rArg, int op_length)
+-{
+-	int length;
+-
+-	length = 0;
+-	if (lArg) {
+-		length += lArg->CalcPrintToStr();
+-	}
+-	length += op_length; // Like " - "
+-	if (rArg) {
+-		length += rArg->CalcPrintToStr();
+-	}
+-	return length;
+-}
+-
+-ExprTree*
+-Variable::DeepCopy(void) const
+-{
+-	Variable *copy;
+-
+-	copy = new Variable(name);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-Integer::DeepCopy(void) const
+-{
+-	Integer *copy;
+-
+-	copy = new Integer(value);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-Float::DeepCopy(void) const
+-{
+-	Float *copy;
+-
+-	copy = new Float(value);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-ClassadBoolean::DeepCopy(void) const
+-{
+-	ClassadBoolean *copy;
+-
+-	copy = new ClassadBoolean(value);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-String::DeepCopy(void) const
+-{
+-	String *copy;
+-
+-	copy = new String(value);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-ISOTime::DeepCopy(void) const
+-{
+-	ISOTime *copy;
+-
+-	copy = new ISOTime(time);
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-Undefined::DeepCopy(void) const
+-{
+-	Undefined *copy;
+-
+-	copy = new Undefined();
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-Error::DeepCopy(void) const
+-{
+-	Error *copy;
+-
+-	copy = new Error();
+-	CopyBaseExprTree(copy);
+-
+-	return copy;
+-}
+-
+-ExprTree*
+-AddOp::DeepCopy(void) const
+-{
+-	AddOp     *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	/* We have to be careful with the AddOp, because it is overloaded to be used
+-	 * as the parenthesis grouping.
+-	 */
+-	copy_of_larg = copy_of_rarg = NULL;
+-	if (lArg != NULL) {
+-		copy_of_larg = lArg->DeepCopy();
+-	}
+-	if (rArg != NULL) {
+-		copy_of_rarg = rArg->DeepCopy();
+-	}
+-
+-	copy = new AddOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-SubOp::DeepCopy(void) const
+-{
+-	SubOp  *copy;
+-	ExprTree  *copy_of_larg = NULL;
+-	ExprTree  *copy_of_rarg;
+-
+-	if(lArg) {
+-		copy_of_larg = lArg->DeepCopy();
+-	}
+-	ASSERT(rArg);
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new SubOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-MultOp::DeepCopy(void) const
+-{
+-	MultOp    *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new MultOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-DivOp::DeepCopy(void) const
+-{
+-	DivOp     *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new DivOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-MetaEqOp::DeepCopy(void) const
+-{
+-	MetaEqOp  *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new MetaEqOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-MetaNeqOp::DeepCopy(void) const
+-{
+-	MetaNeqOp *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new MetaNeqOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-EqOp::DeepCopy(void) const
+-{
+-	EqOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new EqOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-NeqOp::DeepCopy(void) const
+-{
+-	NeqOp     *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new NeqOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-GtOp::DeepCopy(void) const
+-{
+-	GtOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new GtOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-GeOp::DeepCopy(void) const
+-{
+-	GeOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new GeOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-LtOp::DeepCopy(void) const
+-{
+-	LtOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new LtOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-LeOp::DeepCopy(void) const
+-{
+-	LeOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new LeOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-AndOp::DeepCopy(void) const
+-{
+-	AndOp     *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new AndOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-OrOp::DeepCopy(void) const
+-{
+-	OrOp      *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new OrOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-
+-ExprTree*
+-AssignOp::DeepCopy(void) const
+-{
+-	AssignOp  *copy;
+-	ExprTree  *copy_of_larg;
+-	ExprTree  *copy_of_rarg;
+-
+-	copy_of_larg = lArg->DeepCopy();
+-	copy_of_rarg = rArg->DeepCopy();
+-
+-	copy = new AssignOp(copy_of_larg, copy_of_rarg);
+-	CopyBaseExprTree(copy);
+-	return copy;
+-}
+-#ifdef HAVE_DLFCN_H
+-#include <dlfcn.h>
+-#endif
+-
+-#include "classad_shared.h"
+-
+-int Function::CalcPrintToStr(void)
+-{
+-	int      length;
+-	int      i;
+-	int      num_args;
+-	ExprTree *arg;
+-
+-	length = 0;
+-	length += strlen(name);
+-	length += 1; // for left paren
+-
+-	arguments->Rewind();
+-	i = 0;
+-	num_args = arguments->Length();
+-	while (arguments->Next(arg)) {
+-		length += arg->CalcPrintToStr();
+-		i++;
+-		if (i < num_args) {
+-			length += 2; // for "; "
+-		}
+-	}
+-	length += 1; // for right paren
+-
+-	return length;
+-}
+-
+-void Function::PrintToStr(char *s)
+-{
+-	ExprTree *arg;
+-	int i, num_args;
+-
+-	arguments->Rewind();
+-	i = 0;
+-	num_args = arguments->Length();
+-	strcat(s, name);
+-	strcat(s, "(");
+-	while (arguments->Next(arg)) {
+-		arg->PrintToStr(s);
+-		i++;
+-		if (i < num_args) {
+-			strcat(s, ", ");
+-		}
+-	}
+-	strcat(s, ")");
+-
+-	return;
+-}
+-
+-ExprTree *Function::DeepCopy(void) const
+-{
+-	Function *copy;
+-
+-	copy = new Function(name);
+-	CopyBaseExprTree(copy);
+-
+-	ListIterator< ExprTree > iter(*arguments);
+-	ExprTree *arg;
+-
+-	iter.ToBeforeFirst();
+-	while (iter.Next(arg)) {
+-		copy->AppendArgument(arg->DeepCopy());
+-	}
+-
+-	return copy;
+-}
+-
+-int Function::_EvalTree(const AttrList *attrlist, EvalResult *result)
+-{
+-	_EvalTree(attrlist, NULL, result);
+-	return 0;
+-}
+-
+-int Function::_EvalTree(const AttrList *attrlist1, const AttrList *attrlist2, EvalResult *result)
+-{
+-	int        number_of_args, i;
+-	int        successful_eval;
+-	EvalResult *evaluated_args;
+-	bool must_eval_to_strings = false;
+-	bool done = false;
+-
+-	if ( result == NULL ) {
+-		return FALSE;
+-	}
+-
+-	successful_eval = FALSE;
+-	result->type = LX_UNDEFINED;
+-
+-	if ( !strcasecmp(name, "debug") ) {
+-		result->debug = true;
+-	}
+-
+-		// treat calls to function IfThenElse() special, because we cannot
+-		// evaluate the arguments ahead of time (argument evaluation must
+-		// be lazy for IfThenElse).
+-		// also, many of the string functions need all their arguments
+-		// converted to strings - set a flag if we need to do this.
+-	if ( !strcasecmp(name,"ifthenelse") ) {
+-		successful_eval = FunctionIfThenElse(attrlist1,attrlist2,result);
+-		done = true;
+-	} else
+-	if (
+-		 !strcasecmp(name,"strcat") ||
+-		 !strcasecmp(name,"strcmp") ||
+-		 !strcasecmp(name,"stricmp") ||
+-		 !strcasecmp(name,"toUpper") ||
+-		 !strcasecmp(name,"toLower") ||
+-		 !strcasecmp(name,"size") ||
+-		 !strcasecmp(name,"eval") )
+-	{
+-		must_eval_to_strings = true;
+-	}
+-
+-	if (!done) {
+-		number_of_args = arguments->Length();
+-		evaluated_args = new EvalResult[number_of_args];
+-	
+-		ListIterator<ExprTree> iter(*arguments);
+-		ExprTree *arg;
+-
+-		i = 0;
+-		while (iter.Next(arg)) {
+-			evaluated_args[i].debug = result->debug;
+-			if ( must_eval_to_strings ) {
+-				if (!EvaluateArgumentToString(arg, attrlist1,attrlist2,
+-											  &evaluated_args[i++]))
+-				{
+-					// if all args must be converted to strings, and we
+-					// fail to convert an arg to a string, then fail.
+-					result->type = LX_ERROR;
+-					done = true;
+-					break;		// no need to look at the other args
+-				}
+-			} else {
+-				EvaluateArgument( arg, attrlist1, attrlist2, &evaluated_args[i++] );
+-			}
+-		}
+-
+-		if ( !done ) {
+-        if (!strcasecmp(name, "gettime")) {
+-			successful_eval = FunctionGetTime(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "time")) {
+-			successful_eval = FunctionTime(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "interval")) {
+-			successful_eval = FunctionInterval(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "random")) {
+-			successful_eval = FunctionRandom(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "_debug_function_")) {
+-            successful_eval = FunctionClassadDebugFunction(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "isundefined")) {
+-			successful_eval = FunctionIsUndefined(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "iserror")) {
+-			successful_eval = FunctionIsError(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "isstring")) {
+-			successful_eval = FunctionIsString(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "isinteger")) {
+-			successful_eval = FunctionIsInteger(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "isreal")) {
+-			successful_eval = FunctionIsReal(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "isboolean")) {
+-			successful_eval = FunctionIsBoolean(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "string")) {
+-			successful_eval = FunctionString(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "real")) {
+-			successful_eval = FunctionReal(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "int")) {
+-			successful_eval = FunctionInt(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "floor")) {
+-			successful_eval = FunctionFloor(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "round")) {
+-			successful_eval = FunctionRound(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "ceiling")) {
+-			successful_eval = FunctionCeiling(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "strcat")) {
+-			successful_eval = FunctionStrcat(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "substr")) {
+-			successful_eval = FunctionSubstr(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "strcmp")) {
+-			successful_eval = FunctionStrcmp(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stricmp")) {
+-			successful_eval = FunctionStricmp(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "toupper")) {
+-			successful_eval = FunctionToUpper(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "tolower")) {
+-			successful_eval = FunctionToLower(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "size")) {
+-			successful_eval = FunctionSize(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistsize")) {
+-			successful_eval = FunctionStringlistSize(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistsum")) {
+-			successful_eval = FunctionStringlistSum(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistavg")) {
+-			successful_eval = FunctionStringlistAvg(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistmin")) {
+-			successful_eval = FunctionStringlistMin(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistmax")) {
+-			successful_eval = FunctionStringlistMax(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistmember")) {
+-			successful_eval = FunctionStringlistMember(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlistimember")) {
+-			successful_eval = FunctionStringlistIMember(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "stringlist_regexpMember")) {
+-			successful_eval = FunctionStringlistRegexpMember(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "regexp")) {
+-			successful_eval = FunctionRegexp(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "regexps")) {
+-			successful_eval = FunctionRegexps(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "formattime")) {
+-			successful_eval = FunctionFormatTime(number_of_args, evaluated_args, result);
+-		} else if (!strcasecmp(name, "debug")) {
+-			*result = evaluated_args[0];
+-			successful_eval = true;
+-		} else if (!strcasecmp(name, "eval")) {
+-			successful_eval = FunctionEval(attrlist1, attrlist2, number_of_args, evaluated_args, result);
+-		}
+-#ifdef HAVE_DLOPEN
+-        else {
+-			successful_eval = FunctionSharedLibrary(number_of_args,
+-													evaluated_args, result);
+-		}
+-#else
+-        else {
+-            successful_eval = false;
+-        }
+-#endif
+-
+-		dprintResult(this, result);
+-
+-		if (result->debug) {
+-			if (strcasecmp(name, "debug") == 0) {
+-				result->debug = false;
+-			}
+-		  }
+-		}	// of if (!done)
+-
+-		delete [] evaluated_args;
+-	}
+-
+-	return successful_eval;
+-}
+-
+-void EvalResult::toString(bool force)
+-{
+-	switch(type) {
+-		case LX_STRING:
+-			break;
+-		case LX_FLOAT: {
+-			MyString buf;
+-			buf.sprintf("%lf",f);
+-			s = strnewp(buf.Value());
+-			type = LX_STRING;
+-			break;
+-		}
+-		case LX_BOOL:
+-			type = LX_STRING;
+-			if (i) {
+-				s = strnewp("TRUE");
+-			} else {
+-				s = strnewp("FALSE");
+-			}
+-			break;
+-		case LX_INTEGER: {
+-			MyString buf;
+-			buf.sprintf("%d",i);
+-			s = strnewp(buf.Value());
+-			type = LX_STRING;
+-			break;
+-		}
+-		case LX_UNDEFINED:
+-			if( force ) {
+-				s = strnewp("UNDEFINED");
+-				type = LX_STRING;
+-			}
+-			break;
+-		case LX_ERROR:
+-			if( force ) {
+-				s = strnewp("ERROR");
+-				type = LX_STRING;
+-			}
+-			break;
+-		default:
+-			ASSERT("Unknown classad result type");
+-	}
+-}
+-
+-int Function::EvaluateArgumentToString(
+-	ExprTree *arg,
+-	const AttrList *attrlist1,
+-	const AttrList *attrlist2,
+-	EvalResult *result) const        // OUT: the result of calling the function
+-{
+-	result->type = LX_ERROR;
+-
+-	EvaluateArgument( arg, attrlist1, attrlist2, result );
+-
+-	result->toString();
+-
+-	if ( result->type == LX_STRING ) {
+-		return TRUE;
+-	} else {
+-		return FALSE;
+-	}
+-}
+-
+-bool string_is_all_whitespace(char *s)
+-{
+-	bool is_all_whitespace = true;
+-
+-	while (*s != 0) {
+-		if (!isspace(*s)) {
+-			is_all_whitespace = false;
+-			break;
+-		} else {
+-			s++;
+-		}
+-	}
+-	return is_all_whitespace;
+-}
+-
+-#ifdef HAVE_DLOPEN
+-int Function::FunctionSharedLibrary(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	char *shared_library_location;
+-	int  eval_succeeded;
+-
+-	eval_succeeded = false;
+-	if ((shared_library_location = param("CLASSAD_LIB_PATH")) != NULL){
+-		void *dl_handle;
+-		ClassAdSharedFunction function;
+-	
+-		dl_handle = dlopen(shared_library_location, RTLD_LAZY);
+-		if (dl_handle) {
+-			function = (ClassAdSharedFunction) dlsym(dl_handle, name);
+-			if (function != NULL) {
+-				ClassAdSharedValue  function_result;
+-				ClassAdSharedValue  *function_args;
+-
+-				// Prepare the arguments for passing to the external library
+-				// Note that we don't just use EvalResult, because we
+-				// want to give the DZero folks a header file that is completely
+-				// independent of anything else in Condor.
+-				if (number_of_args > 0) {
+-					function_args = new ClassAdSharedValue[number_of_args];
+-					for (int arg_index = 0; arg_index < number_of_args; arg_index++) {
+-						switch (evaluated_args[arg_index].type) {
+-						case LX_INTEGER:
+-							function_args[arg_index].type = ClassAdSharedType_Integer;
+-							function_args[arg_index].integer = evaluated_args[arg_index].i;
+-							break;
+-						case LX_FLOAT:
+-							function_args[arg_index].type = ClassAdSharedType_Float;
+-							function_args[arg_index].real = evaluated_args[arg_index].f;
+-							break;
+-						case LX_STRING:
+-							function_args[arg_index].type = ClassAdSharedType_String;
+-							function_args[arg_index].text = evaluated_args[arg_index].s;
+-							break;
+-						case LX_UNDEFINED:
+-							function_args[arg_index].type = ClassAdSharedType_Undefined;
+-							break;
+-						default:
+-							function_args[arg_index].type = ClassAdSharedType_Error;
+-							break;
+-						}
+-					}
+-				} else {
+-					function_args = NULL;
+-				}
+-
+-				function(number_of_args, function_args, &function_result);
+-                delete [] function_args;
+-
+-				switch (function_result.type) {
+-				case ClassAdSharedType_Integer:
+-					result->type = LX_INTEGER;
+-					result->i = function_result.integer;
+-					break;
+-				case ClassAdSharedType_Float:
+-					result->type = LX_FLOAT;
+-					result->f = function_result.real;
+-					break;
+-				case ClassAdSharedType_String:
+-					result->type = LX_STRING;
+-					result->s = function_result.text;
+-					break;
+-				case ClassAdSharedType_Undefined:
+-					result->type = LX_UNDEFINED;
+-					break;
+-				default:
+-					result->type = LX_ERROR;
+-					break;
+-				}
+-				eval_succeeded = true;
+-			}
+-		}
+-		free(shared_library_location);
+-	}
+-	return eval_succeeded;
+-}
+-#endif
+-
+-int Function::FunctionGetTime(
+-	int /* number_of_args */,          // IN:  size of evaluated args array
+-	EvalResult * /* evaluated_args */, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	time_t current_time = time(NULL);
+-
+-	result->i = (int) current_time;
+-	result->type = LX_INTEGER;
+-	return TRUE;
+-}
+-
+-int Function::FunctionTime(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	return FunctionGetTime(number_of_args, evaluated_args, result);
+-}
+-
+-int Function::FunctionInterval(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-    if (evaluated_args[0].type != LX_INTEGER) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_STRING;
+-	result->s = strnewp(format_time(evaluated_args[0].i));
+-	return TRUE;
+-}
+-
+-extern "C" int get_random_int();
+-extern "C" float get_random_float();
+-
+-int Function::FunctionRandom(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-    bool  success = false;
+-	result->type = LX_ERROR;
+-
+-    if (number_of_args == 0) {
+-        // If we get no arguments, we return a random number between 0 and 1.0
+-        result->f = get_random_float();
+-		result->type = LX_FLOAT;
+-        success = true;
+-    } else if (number_of_args == 1) {
+-        // If we get one integer argument, we return a random number
+-        // between 0 and that number
+-        if (evaluated_args[0].type == LX_INTEGER) {
+-			result->type = LX_INTEGER;
+-            result->i = get_random_int() % evaluated_args[0].i;
+-            success = true;
+-        }
+-		if (evaluated_args[0].type == LX_FLOAT) {
+-			result->type = LX_FLOAT;
+-            result->f = get_random_float() * evaluated_args[0].f;
+-            success = true;
+-        }
+-    }
+-
+-	return success;
+-}
+-
+-int Function::FunctionIsUndefined(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( evaluated_args[0].type == LX_UNDEFINED ) {
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-int Function::FunctionIsError(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( evaluated_args[0].type == LX_ERROR ) {
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-int Function::FunctionIsString(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( evaluated_args[0].type == LX_STRING ) {
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-
+-int Function::FunctionIsInteger(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( evaluated_args[0].type == LX_INTEGER ) {
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-
+-int Function::FunctionIsReal(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( evaluated_args[0].type == LX_FLOAT ) {
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-int Function::FunctionIsBoolean(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	if ( (evaluated_args[0].type == LX_BOOL) ||
+-		 (evaluated_args[0].type == LX_INTEGER && // int val of 0 or 1 is bool
+-		     (evaluated_args[0].i == 0  || evaluated_args[0].i == 1)) )
+-	{
+-		result->i = 1;
+-	} else {
+-		result->i = 0;
+-	}
+-
+-	return true;
+-}
+-
+-
+-int Function::FunctionString(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	*result = evaluated_args[0];
+-	result->toString();
+-	if( result->type == LX_ERROR ) {
+-		return FALSE;
+-	}
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionReal(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_FLOAT;
+-	result->f = 0;
+-
+-	switch ( evaluated_args[0].type ) {
+-		case LX_FLOAT:
+-			// if input x is a Real, the result is x.
+-			result->f = evaluated_args[0].f;
+-			break;
+-		case LX_INTEGER:
+-			// if integer, upgrade to a Real.
+-			// to implement, we just cast, since this is what C++ will do.
+-			result->f = (float)(evaluated_args[0].i);
+-			break;
+-		case LX_BOOL:
+-			if ( evaluated_args[0].i )
+-				result->f = 1.0;
+-			else
+-				result->f = 0.0;
+-			break;
+-		case LX_STRING:
+-			// convert string to Real, or return error if string
+-			// does not represent a Real.
+-			if (!evaluated_args[0].s) {
+-				result->type = LX_ERROR;
+-				return false;
+-			}
+-			if (sscanf(evaluated_args[0].s,"%f",&result->f) != 1) {
+-				result->type = LX_ERROR;
+-				return false;
+-			}
+-			break;
+-		default:
+-			// likely error or undefined
+-			result->type = LX_ERROR;
+-			return false;
+-	}
+-
+-	return true;
+-}
+-
+-int Function::FunctionFloor(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = 0;
+-
+-	// If input arg x is integer, return x.  Otherwise, x is converted
+-	// to a real w/ FunctionReal(), and floor() is applied.
+-	if ( evaluated_args[0].type == LX_INTEGER ) {
+-		result->i = evaluated_args[0].i;
+-	} else {
+-		EvalResult real_result;
+-		if ( FunctionReal(number_of_args,evaluated_args,&real_result) ) {
+-			result->i = (int)floor(real_result.f);
+-		} else {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-	}
+-
+-	return TRUE;
+-}
+-
+-
+-int Function::FunctionRound(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = 0;
+-
+-	// If input arg x is integer, return x.  Otherwise, x is converted
+-	// to a real w/ FunctionReal(), and ceil() is applied.
+-	if ( evaluated_args[0].type == LX_INTEGER ) {
+-		result->i = evaluated_args[0].i;
+-	} else {
+-		EvalResult real_result;
+-		if ( FunctionReal(number_of_args,evaluated_args,&real_result) ) {
+-			result->i = (int)rint(real_result.f);
+-		} else {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-	}
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionCeiling(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = 0;
+-
+-	// If input arg x is integer, return x.  Otherwise, x is converted
+-	// to a real w/ FunctionReal(), and ceil() is applied.
+-	if ( evaluated_args[0].type == LX_INTEGER ) {
+-		result->i = evaluated_args[0].i;
+-	} else {
+-		EvalResult real_result;
+-		if ( FunctionReal(number_of_args,evaluated_args,&real_result) ) {
+-			result->i = (int)ceil(real_result.f);
+-		} else {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-	}
+-
+-	return TRUE;
+-}
+-
+-
+-int Function::FunctionStrcat(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-
+-	int i;
+-	MyString tempStr;
+-
+-	for (i=0; i< number_of_args; i++) {
+-		ASSERT(evaluated_args[i].type == LX_STRING);
+-		tempStr += evaluated_args[i].s;
+-	}
+-
+-	result->type = LX_STRING;
+-	result->s = strnewp( tempStr.Value() );
+-
+-	return TRUE;
+-}
+-
+-
+-
+-int Function::FunctionInt(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = 0;
+-
+-	switch ( evaluated_args[0].type ) {
+-		case LX_INTEGER:
+-			// if input x is an Integer, the result is x.
+-			result->i = evaluated_args[0].i;
+-			break;
+-		case LX_FLOAT:
+-			// if input x is Float, it is truncated towards zero.
+-			// to implement, we just cast, since this is what C++ will do.
+-			result->i = (int)(evaluated_args[0].f);
+-			break;
+-		case LX_BOOL:
+-			if ( evaluated_args[0].i )
+-				result->i = 1;
+-			else
+-				result->i = 0;
+-			break;
+-		case LX_STRING:
+-			// convert string to int, or return error if string
+-			// does not represent an int.
+-			if (!evaluated_args[0].s) {
+-				result->type = LX_ERROR;
+-				return false;
+-			}
+-			result->i = atoi(evaluated_args[0].s);
+-			if ( result->i == 0 ) {
+-				// this sucks.  atoi returns 0 on error, so
+-				// here we try to figure out if we have a 0
+-				// because that is what the string has, or
+-				// we have a 0 due to an error.
+-				int c;
+-				int i=0;
+-				while ( (c=evaluated_args[0].s[i++]) ) {
+-					if ( (!isspace(c)) && c!='0' &&
+-						 c!='+' && c!='-' && c!='.' )
+-					{
+-						result->type = LX_ERROR;
+-						return false;
+-					}
+-				}
+-			}
+-			break;
+-		default:
+-			// likely error or undefined
+-			result->type = LX_ERROR;
+-			return false;
+-	}
+-
+-	return true;
+-}
+-
+-
+-
+-/*
+-	IfThenElse( condition ; then ; else )
+-	If condition evaluates to TRUE, return evaluated 'then'.
+-	If condition evaluates to FALSE, return evaluated 'else'.
+-	If condition evaluates to UNDEFIEND, return UNDEFINED.
+-	If condition evaluates to ERROR, return ERROR.
+-	If condition is of type string or null, return ERROR.
+-	If three arguments are not passed in, return ERROR.
+-*/
+-int Function::FunctionIfThenElse(
+-	const AttrList *attrlist1,
+-	const AttrList *attrlist2,
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	bool condition = false;
+-	EvalResult conditionclause;
+-	ExprTree *arg = NULL;
+-
+-	int number_of_args = arguments->Length();
+-
+-	conditionclause.debug = result->debug;
+-
+-	if ( number_of_args != 3 ) {
+-		// we must have three arguments
+-		result->type = LX_ERROR;
+-		return false;
+-	}
+-
+-	ListIterator<ExprTree> iter(*arguments);
+-
+-		// pop off and evaluate the condition clause (1st argument)
+-	iter.Next(arg);		// arg now has the first argument (condition clause)
+-	EvaluateArgument( arg, attrlist1, attrlist2, &conditionclause );
+-
+-	switch ( conditionclause.type ) {
+-		case LX_BOOL:
+-		case LX_INTEGER:
+-			if ( conditionclause.i ) {
+-				condition = true;
+-			}
+-			break;
+-		case LX_FLOAT:
+-			if ( conditionclause.f ) {
+-				condition = true;
+-			}
+-			break;
+-		case LX_UNDEFINED:
+-			result->type = LX_UNDEFINED;
+-			return true;
+-		default:  // will catch types null, error, string
+-			result->type = LX_ERROR;
+-			return false;
+-	}	// end of switch
+-
+-	if ( condition ) {
+-			// Condition is true - we want to return the second argument
+-		iter.Next(arg);		// arg now has the second argument (then clause)
+-			// evaluate the second argument (then clause), store in result
+-		EvaluateArgument( arg, attrlist1, attrlist2, result );
+-	} else {
+-			// Condition is false - we want to return the third argument
+-		iter.Next(arg);		// arg now has the second argument (then clause)
+-		iter.Next(arg);		// arg now has the third argument (else clause)
+-			// evaluate the third argument (else clause), store in result
+-		EvaluateArgument( arg, attrlist1, attrlist2, result );
+-	}
+-
+-	return true;
+-}
+-
+-int Function::FunctionClassadDebugFunction(
+-	int /* number_of_args */,
+-	EvalResult * /* evaluated_args */,
+-	EvalResult *result)
+-{
+-    classad_debug_function_run = true;
+-    result->i    = 1;
+-    result->type = LX_INTEGER;
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionSubstr(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-
+-	/*
+-	substr(string s, int offset [, int length ]) returns string.
+-
+-	The result is the substring of s starting at the position indicated by
+-	offset with the length indicated by length. The first character of s is at
+-	offset 0. If offset is negative, it is replaced by length(s) - offset. If
+-	length is omitted, the substring extends to the end of s. If length is
+-	negative, an intermediate result is computed as if length were omitted, and
+-	then -length characters are deleted from the right end of the result. If
+-	the resulting substring lies partially outside the limits of s, the part
+-	that lies within s is returned. If the substring lies entirely outside s or
+-	has negative length (because of a negative length argument), the result is
+-	the null string.
+-	*/
+-	int length;
+-	int offset;
+-	char *s;
+-
+-	if ( (number_of_args < 2) || ( number_of_args >  3 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if( (evaluated_args[0].type != LX_STRING) ||
+-		(evaluated_args[1].type != LX_INTEGER)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	s = evaluated_args[0].s;
+-	offset = evaluated_args[1].i;
+-
+-	if (offset < 0) {
+-		offset = strlen(s) + offset;
+-	}
+-
+-	if ( number_of_args == 3 ) {
+-        if (evaluated_args[2].type != LX_INTEGER) {
+-				result->type = LX_ERROR;
+-				return FALSE;
+-		}
+-		length = evaluated_args[2].i;
+-	} else {
+-		length = strlen(s) - offset;
+-	}
+-
+-	if( ( offset < 0) || ( ((unsigned) offset) > strlen(s) )) {
+-		result->type = LX_STRING;
+-		result->s = strnewp("");
+-		return TRUE;
+-	}
+-
+-	if (length > (signed) strlen(s + offset)) {
+-		length = strlen(s) - offset;
+-	}
+-
+-	if (length < 0) {
+-		length = strlen(s) - offset + length;
+-	}
+-
+-	if (length <= 0) {
+-		result->type = LX_STRING;
+-		result->s = strnewp("");
+-		return TRUE;
+-	}
+-
+-	result->type = LX_STRING;
+-	result->s = strnewp(s + offset);
+-	result->s[length] = '\0';
+-	return TRUE;
+-}
+-
+-int Function::FunctionStrcmp(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	strcmp(any a, any b) returns int.
+-
+-	The operands are converted to Strings by the ``string'' function above. The
+-	result is an Integer less than, equal to, or greater than zero according to
+-	whether a is lexicographically less than, equal to, or greater than b. Note
+-	that case is significant in the comparison.
+-	*/
+-
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-
+-	if ( number_of_args != 2 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = strcmp( evaluated_args[0].s, evaluated_args[1].s);
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionStricmp(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stricmp(any a, any b) returns int.
+-
+-	The same as strcmp except that upper and lower case letters are considered
+-	equivalent.
+-	*/
+-
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-
+-	if ( number_of_args != 2 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = ::strcasecmp( evaluated_args[0].s, evaluated_args[1].s);
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionToUpper(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	toUpper(any s) returns string.
+-
+-	The operand is converted to a String by the ``string'' function above. The
+-	result is a String that is identical to s except that all lowercase letters
+-	in s are converted to uppercase.
+-	*/
+-
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_STRING;
+-	result->s = strnewp( evaluated_args[0].s);
+-	char *p = result->s;
+-	while (*p) {
+-		*p = toupper(*p);
+-		p++;
+-	}
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionToLower(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	toLower(any s) returns string.
+-
+-	The operand is converted to a String by the ``string'' function above. The
+-	result is a String that is identical to s except that all uppercase letters
+-	in s are converted to lowercase.
+-	*/
+-	
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_STRING;
+-	result->s = strnewp( evaluated_args[0].s);
+-	char *p = result->s;
+-	while (*p) {
+-		*p = tolower(*p);
+-		p++;
+-	}
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionSize(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	size(string s) returns int.
+-
+-    Returns the number of characters of the string s.
+-	*/
+-
+-	// NOTE: ALL ARGUMENTS HAVE BEEN CONVERTED INTO STRING TYPES
+-	// BEFORE THIS FUNCTION WAS INVOKED.
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	result->i = strlen( evaluated_args[0].s);
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionStringlistSize(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistSize(string l [, string d]) returns int.
+-
+-	If any of the arguments is not of type String, the result is an error.
+-	Returns the number of elements in the string list l. The characters
+-	specified in optional argument d are treated as the delimiters for the
+-	string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	char *d;
+-
+-	if (( number_of_args == 0) || ( number_of_args > 2 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if(evaluated_args[0].type != LX_STRING) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if ( number_of_args == 2) {
+-		if(evaluated_args[1].type != LX_STRING) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-		d = evaluated_args[1].s;
+-	} else {
+-		d = " ,";
+-	}
+-
+-	StringList sl(evaluated_args[0].s, d);
+-	result->type = LX_INTEGER;
+-	result->i = sl.number();
+-	return TRUE;
+-}
+-
+-static int StringListNumberIterator(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result,         // OUT: the result of calling the function
+-	void (*func)(double, double *),
+-	double *accumulator)
+-{
+-	char *d;
+-
+-	if (( number_of_args == 0) || ( number_of_args > 2 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if ( number_of_args == 2) {
+-		if (evaluated_args[1].type != LX_STRING) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-		d = evaluated_args[1].s;
+-	} else {
+-		d = " ,";
+-	}
+-
+-	if (evaluated_args[0].type != LX_STRING) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-	char *s = evaluated_args[0].s;
+-
+-	StringList sl(s, d);
+-
+-	if (sl.number() == 0) {
+-		result->type = LX_UNDEFINED;
+-		return TRUE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-
+-	sl.rewind();
+-	char *entry;
+-	while( (entry = sl.next())) {
+-		float temp;
+-		int r = sscanf(entry, "%f", &temp);
+-		if (r != 1) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-		if (strspn(entry, "+-0123456789") != strlen(entry)) {
+-			result->type = LX_FLOAT;
+-		}
+-		func(temp, accumulator);
+-	}
+-
+-	if (result->type == LX_INTEGER) {
+-			result->i = (int)*accumulator;
+-	} else {
+-			result->f = *accumulator;
+-	}
+-
+-	return TRUE;
+-}
+-
+-static void sum(double entry, double *accumulator) {
+-	*accumulator += entry;
+-}
+-
+-int Function::FunctionStringlistSum(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistSum(string l [, string d]) returns number.
+-
+-	If any of the arguments is not of type String, the result is an error. If l
+-	is composed only of numbers, the result is the sum of the values, as a Real
+-	if any value is Real, and as an Integer otherwise. If the list is empty,
+-	the result is 0. In other cases, the result is ERROR.  The characters
+-	specified in optional argument d are treated as the delimiters for the
+-	string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	double accumulator = 0.0;;
+-	int r = StringListNumberIterator(
+-		number_of_args, evaluated_args, result, sum, &accumulator);
+-
+-	// zero length array sums to zero
+-	if (result->type == LX_UNDEFINED) {
+-		result->type = LX_INTEGER;
+-		result->i = 0;
+-	}
+-	return r;
+-}
+-
+-static void avg(double entry, double *pair) {
+-	pair[0] += entry;
+-	pair[1]++;
+-}
+-
+-int Function::FunctionStringlistAvg(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistAvg(string l [, string d]) returns number.
+-
+-	If any of the arguments is not of type String, the result is an error. If l
+-	is composed only of numbers, the result is the average of the values, as a
+-	Real. If the list is empty, the result is 0. In other cases, the result is
+-	ERROR.  The characters specified in optional argument d are treated as the
+-	delimiters for the string list.  If not specified, d defaults to " ,"
+-	(space and comma characters).
+-	*/
+-
+-	// array[0] is the sum of all the entries, array[1] is the number of entries
+-	double array[2];
+-	array[0] = 0.0;
+-	array[1] = 0.0;
+-
+-	int r = StringListNumberIterator(
+-		number_of_args, evaluated_args, result, avg, array);
+-
+-	if (!r) {
+-		return FALSE;
+-	}
+-
+-	if (result->type == LX_UNDEFINED) {
+-		result->f = 0.0;
+-	} else {
+-		result->f    = array[0] / array[1];
+-	}
+-	result->type = LX_FLOAT;
+-	return TRUE;
+-}
+-
+-static void minner(double entry, double *best) {
+-	if (entry < *best) {
+-		*best = entry;
+-	}
+-}
+-
+-int Function::FunctionStringlistMin(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistMin(string l [, string d]) returns number.
+-
+-	If any of the arguments is not of type String, the result is an error. If l
+-	is composed only of numbers, the result is the minimum of the values, as a
+-	Real if any value is Real, and as an Integer otherwise. If the list is
+-	empty, the result is UNDEFINED. In other cases, the result is ERROR. The
+-	characters specified in optional argument d are treated as the delimiters
+-	for the string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	double lowest = FLT_MAX;
+-	return StringListNumberIterator(
+-		number_of_args, evaluated_args, result, minner, &lowest);
+-}
+-
+-static void maxer(double entry, double *best) {
+-	if (entry > *best) {
+-		*best = entry;
+-	}
+-}
+-
+-int Function::FunctionStringlistMax(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistMax(string l [, string d]) returns number.
+-
+-	If any of the arguments is not of type String, the result is an error. If l
+-	is composed only of numbers, the result is the maximum of the values, as a
+-	Real if any value is Real, and as an Integer otherwise. If the list is
+-	empty, the result is UNDEFINED. In other cases, the result is ERROR.  The
+-	characters specified in optional argument d are treated as the delimiters
+-	for the string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	double maxest = FLT_MIN;
+-	return StringListNumberIterator(
+-		number_of_args, evaluated_args, result, maxer, &maxest);
+-}
+-
+-static int stringlistmember(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result,         // OUT: the result of calling the function
+-	bool ignore_case)
+-{
+-	if ((number_of_args < 2) || (number_of_args > 3)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if ((evaluated_args[0].type != LX_STRING) ||
+-		(evaluated_args[1].type != LX_STRING)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	char *d = " ,";
+-	if (number_of_args == 3) {
+-		if (evaluated_args[2].type != LX_STRING) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-
+-		d = evaluated_args[2].s;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	StringList sl(evaluated_args[1].s, d);
+-	sl.rewind();
+-	char *entry;
+-	while( (entry = sl.next())) {
+-		if (ignore_case) {
+-			if (strcasecmp(entry, evaluated_args[0].s) == 0) {
+-				result->i = 1;
+-				return TRUE;
+-			}
+-		} else {
+-			if (strcmp(entry, evaluated_args[0].s) == 0) {
+-				result->i = 1;
+-				return TRUE;
+-			}
+-		}
+-	}
+-
+-	result->i = 0;
+-	return TRUE;
+-}
+-
+-int Function::FunctionStringlistMember(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistMember(string x, string l [, string d]) returns boolean.
+-
+-	If any of the arguments is not of type String, the result is an error. If
+-	any of the values in string list l are equal to x in the sense of the
+-	strcmp() function, then the result is true, otherwise it is false.  The
+-	characters specified in optional argument d are treated as the delimiters
+-	for the string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	return stringlistmember(number_of_args, evaluated_args, result, false);
+-}
+-
+-int Function::FunctionStringlistIMember(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistIMember(string x, string l [, string d]) returns boolean.
+-
+-	If any of the arguments is not of type String, the result is an error. If
+-	any of the values in string list l are equal to x in the sense of the
+-	stricmp() function, then the result is true, otherwise it is false.  The
+-	characters specified in optional argument d are treated as the delimiters
+-	for the string list.  If not specified, d defaults to " ," (space and comma
+-	characters).
+-	*/
+-
+-	return stringlistmember(number_of_args, evaluated_args, result, true);
+-}
+-
+-static int regexp_str_to_options(char *option_str) {
+-	int options = 0;
+-	while (*option_str) {
+-		switch (*option_str) {
+-			case 'i':
+-			case 'I':
+-				options |= Regex::caseless;
+-				break;
+-			case 'm':
+-			case 'M':
+-				options |= Regex::multiline;
+-				break;
+-			case 's':
+-			case 'S':
+-				options |= Regex::dotall;
+-				break;
+-			case 'x':
+-			case 'X':
+-				options |= Regex::extended;
+-				break;
+-			default:
+-				// Ignore for forward compatibility
+-				break;
+-		}
+-		option_str++;
+-	}
+-	return options;
+-}
+-
+-int Function::FunctionStringlistRegexpMember(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	stringlistRegexpMember(string pattern, string l
+-			[, string d] [, string options]) returns boolean.
+-
+-	If l is not a stringlist or any of the other arguments is not of type
+-	String, the result is an error. If any of the values in string list do
+-	not eveluate to a string it returns an error. Otherwise, if any of the
+-	values in the list matches the pattern accoring to the regexp function,
+-	the result is true. If there is no match the result is false.
+-
+-	The characters in the optional argument d are treated as the delimiters
+-	for the stringlist. If this is not enumerated the delimiter defaults to
+-	" ," (space and comma characters). The options string behaves as in
+-	regexp function below.
+-	*/
+-
+-	if (( number_of_args < 2) || ( number_of_args > 4 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	char *d = " ,";
+-
+-	if (number_of_args == 3) {
+-		if (evaluated_args[2].type != LX_STRING) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-
+-		d = evaluated_args[2].s;
+-	}
+-
+-	char *option_str = "";
+-
+-	if (number_of_args == 4) {
+-		if (evaluated_args[3].type != LX_STRING) {
+-				result->type = LX_ERROR;
+-				return FALSE;
+-		}
+-		option_str = evaluated_args[3].s;
+-	}
+-
+-	if ((evaluated_args[0].type != LX_STRING) ||
+-		(evaluated_args[1].type != LX_STRING)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	Regex r;
+-	const char *errstr = 0;
+-	int errpos = 0;
+-	bool valid;
+-	int options = regexp_str_to_options(option_str);
+-
+-	/* can the pattern be compiled */
+-	valid = r.compile(evaluated_args[0].s, &errstr, &errpos, options);
+-	if (!valid) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->type = LX_INTEGER;
+-	StringList sl(evaluated_args[1].s, d);
+-	sl.rewind();
+-	char *entry;
+-	int match = 0;
+-	while( (entry = sl.next())) {
+-			if (r.match(entry)) {
+-				match = 1;
+-			}
+-	}
+-
+-	if(match) {
+-		result->i = 1;
+-		return TRUE;
+-	}
+-
+-	result->i = 0;
+-	return TRUE;
+-}
+-
+-int Function::FunctionRegexp(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	regexp(string pattern, string target , string output[, string
+-	options ]) returns boolean.
+-
+-	If any of the arguments is not of type String or if pattern is not
+-	a valid regular expression, the result is an error. Otherwise, if
+-	pattern matches target, the result is string, otherwise error.
+-	The resultant string is the string "output", with backticks
+-	references (e.g. \1 \2) replaced by the captured regexps inside
+-	the pattern.
+-
+-	The details of the syntax and semantics of the regular expressions
+-	follows the perl-compatible regular expression format as supported
+-	by the PCRE library (see http://www.pcre.org/).  The options
+-	argument, if present, may contain the following characters to
+-	alter the exact details. Unrecognized options are silently
+-	ignored.
+-
+-    i or I
+-
+-        Ignore case.
+-
+-    m or M
+-
+-        Multi-line: A carat (^) matches not only the start of the
+-        subject string, but also after each newline. Similarly, dollar
+-        ($) matches before a newline.
+-
+-    s or S
+-
+-        Single-line: Dot (.) matches any character, including newline.
+-
+-    x or X
+-
+-        Extended: Whitespace and comments (from # to the next newline)
+-        in the pattern are ignored.
+-	*/
+-
+-	if (( number_of_args < 2) || ( number_of_args > 3 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	char *option_str = "";
+-
+-	if (number_of_args == 3) {
+-		if (evaluated_args[2].type != LX_STRING) {
+-				result->type = LX_ERROR;
+-				return FALSE;
+-		}
+-		option_str = evaluated_args[2].s;
+-	}
+-
+-	if ((evaluated_args[0].type != LX_STRING) || (evaluated_args[1].type != LX_STRING)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	Regex r;
+-	const char *errstr = 0;
+-	int errpos = 0;
+-	bool valid;
+-	int options = regexp_str_to_options(option_str);
+-
+-	valid = r.compile(evaluated_args[0].s, &errstr, &errpos, options);
+-	if (!valid) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	result->i = r.match(evaluated_args[1].s);
+-	result->type = LX_INTEGER;
+-
+-	return TRUE;
+-}
+-
+-int Function::FunctionRegexps(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	regexps(string pattern, string target, string substitute [, string
+-	options ]) returns string.
+-
+-	Like regexp except that it returns the string substitute as modified by
+-	matches from regexp.
+-
+-	If any of the arguments is not of type String or if pattern is not a valid
+-	regular expression, the result is an error. Otherwise, if pattern matches
+-	target, the result is true, otherwise it is false.
+-
+-	The details of the syntax and semantics of the regular expressions follows
+-	the perl-compatible regular expression format as supported by the PCRE
+-	library (see http://www.pcre.org/).   The options argument, if present, may
+-	contain the following characters to alter the exact details. Unrecognized
+-	options are silently ignored.
+-
+-    i or I
+-
+-        Ignore case.
+-
+-    m or M
+-
+-        Multi-line: A carat (^) matches not only the start of the
+-        subject string, but also after each newline. Similarly, dollar
+-        ($) matches before a newline.
+-
+-    s or S
+-
+-        Single-line: Dot (.) matches any character, including newline.
+-
+-    x or X
+-
+-        Extended: Whitespace and comments (from # to the next newline)
+-        in the pattern are ignored.
+-	*/
+-
+-	if (( number_of_args < 3) || ( number_of_args > 4 )) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	char *option_str = "";
+-
+-	if (number_of_args == 4) {
+-		if (evaluated_args[3].type != LX_STRING) {
+-				result->type = LX_ERROR;
+-				return FALSE;
+-		}
+-		option_str = evaluated_args[3].s;
+-	}
+-
+-	if ((evaluated_args[0].type != LX_STRING) ||
+-		(evaluated_args[1].type != LX_STRING) ||
+-		(evaluated_args[2].type != LX_STRING)) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	Regex r;
+-	const char *errstr = 0;
+-	int errpos = 0;
+-	bool valid;
+-	int options = regexp_str_to_options(option_str);
+-
+-
+-	valid = r.compile(evaluated_args[0].s, &errstr, &errpos, options);
+-	if (!valid) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	ExtArray<MyString> a;
+-	MyString output;
+-	char *input = evaluated_args[2].s;
+-
+-	if (!r.match(evaluated_args[1].s, &a)) {
+-		result->type = LX_STRING;
+-		result->s = strnewp("");
+-		return TRUE;
+-	}
+-
+-	result->type = LX_STRING;
+-	while (*input) {
+-		if (*input == '\\') {
+-			if (isdigit(input[1])) {
+-				int offset = input[1] - '0';
+-				input++;
+-				output += a[offset];
+-			} else {
+-				output += '\\';
+-			}
+-		} else {
+-			output += *input;
+-		}
+-		input++;
+-	}
+-	result->s    = strnewp(output.Value());
+-	return TRUE;
+-}
+-
+-int Function::FunctionFormatTime(
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-
+-	/*
+-	formatTime([int t], [string s]) returns string.
+-
+-    This function creates a formatted string that is a representation of time t.
+-
+-	The argument t is interpreted as an epoch time (seconds since 1/1/1970 GMT).
+-    The argument s is interpreted similarly to the format argument of
+-	the ANSI C strftime function. It consists of arbitary text plus placeholders
+-	for elements of the time. These placeholders are percent signs (%) followed
+-	by a single letter. To have a percent sign in your output, you must use a
+-	double percent sign (%%).
+-	If t is not specified, it defaults to the current time as reported by the OS.
+-	If s is not specified, it defaults to "%c".
+-	*/
+-
+-	time_t epoch_time;		// parameter one
+-	char *format_string;	// parameter two	
+-
+-	if ( number_of_args >  2 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-		// grab optional paramter 1, the time
+-	if ( number_of_args > 0 ) {
+-			// caller provided a time
+-		if( (evaluated_args[0].type != LX_INTEGER) ||
+-			(evaluated_args[0].i < 0) )
+-		{
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-		epoch_time = evaluated_args[0].i;
+-	} else {
+-			// no time specified, default to current time	
+-		time(&epoch_time);	// yuck.
+-	}
+-
+-		// grab optional paramter 2, the format string
+-	if( number_of_args == 2 ) {
+-			// caller provided a format string
+-		if ( evaluated_args[1].type != LX_STRING ) {
+-			result->type = LX_ERROR;
+-			return FALSE;
+-		}
+-		format_string = evaluated_args[1].s;
+-	} else {
+-			// no format string specified, default to %c
+-		format_string = "%c";
+-	}
+-
+-	struct tm * time_components = localtime(&epoch_time); // not thread safe
+-
+-		// the crux of this function is just a  call to strftime().
+-	int ret = 0;
+-	char output[1024]; // yuck!!
+-	if ( time_components ) {
+-		ret = strftime(output,sizeof(output),format_string,time_components);
+-	}
+-
+-	result->type = LX_STRING;
+-
+-		// if strftime wrote something, use that as the result.
+-	if ( ret > 0 ) {
+-		result->s = strnewp(output);
+-	} else {
+-		result->s = strnewp("");
+-	}
+-
+-	return TRUE;
+-}
+-
+-
+-int Function::FunctionEval(
+-	AttrList const *attrlist1,
+-	AttrList const *attrlist2,
+-	int number_of_args,         // IN:  size of evaluated args array
+-	EvalResult *evaluated_args, // IN:  the arguments to the function
+-	EvalResult *result)         // OUT: the result of calling the function
+-{
+-	/*
+-	  eval(string s) returns the result of the string s evaluated
+-	  as a ClassAd expression.
+-	*/
+-
+-	if ( number_of_args != 1 ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	if( (evaluated_args[0].type != LX_STRING) ||
+-		(evaluated_args[0].i < 0) )
+-	{
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	char const *expr_str = evaluated_args[0].s;
+-	ExprTree *expr_tree;
+-	ParseClassAdRvalExpr(expr_str,expr_tree);
+-	if( !expr_tree ) {
+-		result->type = LX_ERROR;
+-		return FALSE;
+-	}
+-
+-	int rc = expr_tree->EvalTree(attrlist1,attrlist2,result);
+-
+-	delete expr_tree;
+-	return rc;
+-}
+-
+-
+-void dprintResult(ExprTree *tree, EvalResult *result) {
+-	if (result->debug) {
+-		char *s = NULL;
+-		tree->PrintToNewStr(&s);
+-
+-		switch ( result->type ) {
+-		case LX_INTEGER :
+-			dprintf(D_ALWAYS, "Classad debug: %s --> %d\n", s, result->i);
+-			break;
+-
+-		case LX_FLOAT :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> %f\n", s, result->f);
+-			break;
+-
+-		case LX_STRING :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> %s\n", s, result->s);
+-			break;
+-
+-		case LX_NULL :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> NULL\n", s);
+-			break;
+-
+-		case LX_UNDEFINED :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> UNDEFINED\n", s);
+-			break;
+-
+-		case LX_ERROR :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> ERROR\n", s);
+-			break;
+-
+-		default :
+-
+-			dprintf(D_ALWAYS, "Classad debug: %s --> ???\n", s);
+-			break;
+-		}
+-		free(s);
+-	}
+-}
+diff --git a/src/.deprecate_classad.old/astbase.cpp b/src/.deprecate_classad.old/astbase.cpp
+deleted file mode 100644
+index 4d748f1..0000000
+--- a/src/.deprecate_classad.old/astbase.cpp
++++ /dev/null
+@@ -1,1225 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//****************************************************************************//
+-// astbase.C 				                                      //
+-//  	 				                                      //
+-// Implementation of the base Abstract Syntax Tree (AST) module.              //
+-//                                                                            //
+-//****************************************************************************//
+-
+-#include "condor_common.h"
+-#include "condor_exprtype.h"
+-#include "condor_astbase.h"
+-#include "condor_debug.h"
+-#include "MyString.h"
+-#include "string_list.h"
+-
+-#define AdvancePtr(ptr)  while(*ptr != '\0') ptr++;
+-
+-#include "stringSpace.h"
+-StringSpace *ExprTree::string_space = NULL;
+-int ExprTree::string_space_references = 0;
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Tree node constructors.                                                    //
+-////////////////////////////////////////////////////////////////////////////////
+-
+-VariableBase::VariableBase(char* varName)
+-{
+-	this->stringSpaceIndex = string_space->getCanonical((const char *&)varName);
+-	// I apologize for casting away the const-ness of the char * here
+-	// I'm trying to make minimal changes in the code to add string space,
+-	// and it is safe. 
+-	this->name = (char *) (*string_space)[stringSpaceIndex];
+-    this->type = LX_VARIABLE;
+-}
+-
+-IntegerBase::IntegerBase(int v)
+-{
+-    this->value = v;
+-    this->type  = LX_INTEGER;
+-}
+-
+-FloatBase::FloatBase(float v)
+-{
+-    this->value = v;
+-    this->type  = LX_FLOAT;
+-}
+-
+-BooleanBase::BooleanBase(int v)
+-{
+-    this->value = v;
+-    this->type  = LX_BOOL;
+-}
+-
+-StringBase::StringBase(char* str)
+-{
+-	stringSpaceIndex = string_space->getCanonical((const char *&)str);
+-	// I apologize for casting away the const-ness of the char * here
+-	// I'm trying to make minimal changes in the code to add string space,
+-	// and it is safe. 
+-	value = (char *) (*string_space)[stringSpaceIndex];
+-    this->type  = LX_STRING;
+-}
+-
+-ISOTimeBase::ISOTimeBase(char* str)
+-{
+-	stringSpaceIndex = string_space->getCanonical((const char *&)str);
+-	// I apologize for casting away the const-ness of the char * here
+-	// I'm trying to make minimal changes in the code to add string space,
+-	// and it is safe. 
+-	time = (char *) (*string_space)[stringSpaceIndex];
+-    this->type  = LX_TIME;
+-}
+-
+-UndefinedBase::UndefinedBase()
+-{
+-    this->type  = LX_UNDEFINED;
+-}
+-
+-ErrorBase::ErrorBase()
+-{
+-    this->type  = LX_ERROR;
+-}
+-
+-AddOpBase::AddOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_ADD;
+-}
+-
+-SubOpBase::SubOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_SUB;
+-}
+-
+-MultOpBase::MultOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_MULT;
+-}
+-
+-DivOpBase::DivOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_DIV;
+-}
+-
+-MetaEqOpBase::MetaEqOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_META_EQ;
+-}
+-
+-MetaNeqOpBase::MetaNeqOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_META_NEQ;
+-}
+-
+-EqOpBase::EqOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_EQ;
+-}
+-
+-NeqOpBase::NeqOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_NEQ;
+-}
+-
+-GtOpBase::GtOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_GT;
+-}
+-
+-GeOpBase::GeOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_GE;
+-}
+-
+-LtOpBase::LtOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_LT;
+-}
+-
+-LeOpBase::LeOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_LE;
+-}
+-
+-AndOpBase::AndOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_AND;
+-}
+-
+-OrOpBase::OrOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_OR;
+-}
+-
+-AssignOpBase::AssignOpBase(ExprTree* l, ExprTree* r)
+-{
+-    this->lArg = l;
+-    this->rArg = r;
+-    this->type  = LX_ASSIGN;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Destructors
+-////////////////////////////////////////////////////////////////////////////////
+-VariableBase::~VariableBase()
+-{
+-	string_space->disposeByIndex(stringSpaceIndex);
+-}
+-
+-StringBase::~StringBase()
+-{
+-	string_space->disposeByIndex(stringSpaceIndex);
+-}
+-
+-ISOTimeBase::~ISOTimeBase()
+-{
+-	string_space->disposeByIndex(stringSpaceIndex);
+-}
+-
+-BinaryOpBase::~BinaryOpBase()
+-{
+-	if (lArg != NULL) {
+-		delete lArg;
+-	}
+-	if (rArg != NULL) {
+-		delete rArg;
+-	}
+-	return;
+-}
+-
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Comparison operator                                                        //
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int ExprTree::operator ==(ExprTree& tree)
+-{
+-    if(tree.type != this->type)
+-    {
+-	return FALSE;
+-    }
+-    return TRUE;
+-}
+-
+-int VariableBase::operator==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_VARIABLE)
+-    {
+-        return !strcmp(this->name, ((VariableBase&)tree).name);
+-    }
+-    return FALSE;
+-}
+-
+-int IntegerBase::operator ==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-        return this->value == ((IntegerBase&)tree).value;
+-    }
+-    return FALSE;
+-}
+-
+-int FloatBase::operator ==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_FLOAT)
+-    {
+-        return this->value == ((FloatBase&)tree).value;
+-    }
+-    return FALSE;
+-}
+-
+-int StringBase::operator ==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_STRING)
+-    {
+-        return !strcmp(this->value, ((StringBase&)tree).value);
+-    }
+-    return FALSE;
+-}
+-
+-int ISOTimeBase::operator ==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_TIME)
+-    {
+-        return !strcmp(this->time, ((ISOTimeBase&)tree).time);
+-    }
+-    return FALSE;
+-}
+-
+-int BooleanBase::operator ==(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_BOOL)
+-    {
+-        return this->value == ((BooleanBase&)tree).value;
+-    }
+-    return FALSE;
+-}
+-
+-int BinaryOpBase::operator ==(ExprTree& tree)
+-{
+-	// HACK!!  No lArg implies user-directed parenthesization
+-	if ( this->lArg == NULL || ((BinaryOpBase&)tree).LArg() == NULL ) {
+-		return (this->lArg == ((BinaryOpBase&)tree).LArg()) &&
+-			   (*this->rArg == *((BinaryOpBase&)tree).RArg());
+-	} else if (tree.MyType() == this->MyType()) {
+-		return (*this->lArg == *((BinaryOpBase&)tree).LArg()) &&
+-			   (*this->rArg == *((BinaryOpBase&)tree).RArg());
+-	}
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// ">" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int ExprTree::operator >(ExprTree&)
+-{
+-    return FALSE;
+-}
+-
+-int IntegerBase::operator >(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value > ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value > ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-int FloatBase::operator >(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value > ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value > ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// ">=" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int ExprTree::operator >=(ExprTree&)
+-{
+-    return FALSE;
+-}
+-
+-int IntegerBase::operator >=(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value >= ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value >= ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-int FloatBase::operator >=(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value >= ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value >= ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// "<" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int ExprTree::operator <(ExprTree&)
+-{
+-    return FALSE;
+-}
+-
+-int IntegerBase::operator <(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value < ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value < ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-int FloatBase::operator <(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value < ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value < ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// "<=" operator.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int ExprTree::operator <=(ExprTree&)
+-{
+-    return FALSE;
+-}
+-
+-int IntegerBase::operator <=(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value <= ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value <= ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-int FloatBase::operator <=(ExprTree& tree)
+-{
+-    if(tree.MyType() == LX_INTEGER)
+-    {
+-	return value <= ((IntegerBase*)&tree)->Value();
+-    }
+-    else if(tree.MyType() == LX_FLOAT)
+-    {
+-	return value <= ((FloatBase*)&tree)->Value();
+-    }
+-    return FALSE;
+-}
+-
+-// This is used by the various CopyDeep()s to get the variables from the base
+-// ExprTree class.
+-void ExprTree::CopyBaseExprTree(ExprTree * const recipient) const
+-{
+-	recipient->unit         = unit;
+-	recipient->type         = type;
+-	recipient->evalFlag     = evalFlag;
+-	recipient->invisible    = invisible;
+-	return;
+-}
+-
+-void ExprTree::PrintToNewStr(char **str)
+-{
+-	int   length;
+-	char  *new_str;
+-
+-	// Before we allocate new space for this string, we determine how
+-	// much space is needed.
+-	length = CalcPrintToStr();
+-	new_str = (char *) malloc(length + 1); // +1 for termination
+-	*new_str = 0; // necessary, because PrintToStr begins at end of string
+-
+-	// Now that we have a correctly sized string, fill it up.
+-	PrintToStr(new_str);
+-
+-	// Sanity check--I've tested this quite thoroughly, so it shouldn't
+-	// except. It's a good idea to run test_classads though, should you 
+-	// ever change the code. Catch errors before shipping. 
+-	if (strlen(new_str) != (size_t) length) {
+-		EXCEPT("Bad length calculation in class ads. Expected %d, "
+-			   "got %d (\"%s\"",
+-			   length, strlen(new_str), new_str);
+-	}
+-	*str = new_str;
+-
+-	return;
+-}
+-
+-void ExprTree::PrintToStr(MyString & str) {
+-	char * tmp = 0;
+-	PrintToNewStr(&tmp);
+-	str = tmp;
+-	free(tmp);
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Display an expression tree.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-void ExprTree::Display()
+-{
+-    dprintf (D_NOHEADER | D_ALWAYS, "Unknown type");
+-}
+-
+-void VariableBase::Display()
+-{
+-    dprintf (D_NOHEADER | D_ALWAYS, "%s", name);
+-}
+-
+-void IntegerBase::Display()
+-{
+-    dprintf(D_NOHEADER | D_ALWAYS, "%d", value);
+-    if(unit == 'k')
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void FloatBase::Display()
+-{
+-    dprintf(D_NOHEADER | D_ALWAYS, "%f", value);
+-    if(unit == 'k')
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void StringBase::Display()
+-{
+-    dprintf (D_NOHEADER | D_ALWAYS, "\"%s\"", value);
+-}
+-
+-void ISOTimeBase::Display()
+-{
+-    dprintf (D_NOHEADER | D_ALWAYS, "\"%s\"", time);
+-}
+-
+-void BooleanBase::Display()
+-{
+-    dprintf(D_NOHEADER | D_ALWAYS, (char *)(value ? "TRUE" : "FALSE") );
+-}
+-
+-
+-void UndefinedBase::Display()
+-{
+-	dprintf(D_NOHEADER | D_ALWAYS, "UNDEFINED");
+-}
+-
+-void ErrorBase::Display()
+-{
+-	dprintf(D_NOHEADER | D_ALWAYS, "ERROR");
+-}
+-
+-void AddOpBase::Display()
+-{
+-	if( !lArg ) {
+-		dprintf( D_NOHEADER | D_ALWAYS, "(" );
+-		rArg->Display( );
+-		dprintf( D_NOHEADER | D_ALWAYS, ")" );
+-	}
+-		
+-	lArg->Display();
+-
+-    dprintf(D_NOHEADER | D_ALWAYS, " + ");
+-    if(rArg)
+-    {
+-	rArg->Display();
+-    }
+-    if(unit == 'k')
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void SubOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	lArg->Display();
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " - ");
+-    if(rArg && (rArg->MyType() == LX_ADD || rArg->MyType() == LX_SUB))
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	rArg->Display();
+-	dprintf(D_NOHEADER | D_ALWAYS, ")");
+-    } else
+-    {
+-	rArg->Display();
+-    }
+-    if(unit == 'k')
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void MultOpBase::Display()
+-{
+-    if(lArg && (lArg->MyType() == LX_ADD || lArg->MyType() == LX_SUB))
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	lArg->Display();
+-	dprintf(D_NOHEADER | D_ALWAYS, ")");
+-    } else
+-    {
+-	lArg->Display();
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " * ");
+-    if(rArg && (rArg->MyType() == LX_ADD || rArg->MyType() == LX_SUB))
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	rArg->Display();
+-	dprintf(D_NOHEADER | D_ALWAYS, ")");
+-    } else
+-    {
+-	rArg->Display();
+-    }
+-    if(unit == 'k')
+-    {
+-	dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void DivOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	   {
+-	     case LX_ADD :
+-	     case LX_SUB :
+-	     case LX_DIV : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			   lArg->Display();
+-			   dprintf(D_NOHEADER | D_ALWAYS, ")");
+-			   break;
+-	     default     : lArg->Display();
+-	   }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " / ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	   {
+-	     case LX_ADD :
+-	     case LX_SUB :
+-	     case LX_MULT:
+-	     case LX_DIV : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			   rArg->Display();
+-			   dprintf(D_NOHEADER | D_ALWAYS, ")");
+-			   break;
+-	     default     : rArg->Display();
+-	   }
+-    }
+-    if(unit == 'k')
+-    {
+-        dprintf(D_NOHEADER | D_ALWAYS, " k");
+-    }
+-}
+-
+-void MetaEqOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " =?= ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-void MetaNeqOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " =!= ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-void EqOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " == ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-void NeqOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " != ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-
+-void GtOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " > ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-
+-void GeOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " >= ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-
+-void LtOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " < ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-
+-void LeOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			lArg->Display();
+-  			dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      lArg->Display();
+-        }
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " <= ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	  case LX_EQ	:
+-	  case LX_NEQ :
+-	  case LX_GT  :
+-	  case LX_GE  :
+-	  case LX_LT  :
+-	  case LX_LE  : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-			rArg->Display();
+-  		        dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		        break;
+-	  default:      rArg->Display();
+-	}   
+-    }
+-}
+-
+-void AndOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	    case LX_ADD :
+-	    case LX_SUB :
+-	    case LX_MULT :
+-	    case LX_DIV :
+-	    case LX_EQ :
+-	    case LX_NEQ :
+-	    case LX_GT :
+-	    case LX_GE :
+-	    case LX_LT :
+-	    case LX_LE :
+-	    case LX_OR : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	                 lArg->Display();
+-	                 dprintf(D_NOHEADER | D_ALWAYS, ")");
+-			 break;
+-	    default :    lArg->Display();
+-			 break;
+-	}
+-    }
+-    
+-    dprintf(D_NOHEADER | D_ALWAYS, " && ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	    case LX_ADD :
+-	    case LX_SUB :
+-	    case LX_MULT :
+-	    case LX_DIV :
+-	    case LX_EQ :
+-	    case LX_NEQ :
+-	    case LX_GT :
+-	    case LX_GE :
+-	    case LX_LT :
+-	    case LX_LE :
+-	    case LX_OR : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	                 rArg->Display();
+-	                 dprintf(D_NOHEADER | D_ALWAYS, ")");
+-			 break;
+-	    default :    rArg->Display();
+-			 break;
+-	}
+-    }
+-}
+-
+-void OrOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	switch(lArg->MyType())
+-	{
+-	    case LX_ADD :
+-	    case LX_SUB :
+-	    case LX_MULT :
+-	    case LX_DIV :
+-	    case LX_EQ :
+-	    case LX_NEQ :
+-	    case LX_GT :
+-	    case LX_GE :
+-	    case LX_LT :
+-	    case LX_LE :
+-	    case LX_AND : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	                  lArg->Display();
+-	                  dprintf(D_NOHEADER | D_ALWAYS, ")");
+-			  break;
+-	    default :     lArg->Display();
+-			  break;
+-	}
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " || ");
+-    if(rArg)
+-    {
+-	switch(rArg->MyType())
+-	{
+-	    case LX_ADD :
+-	    case LX_SUB :
+-	    case LX_MULT :
+-	    case LX_DIV :
+-	    case LX_EQ :
+-	    case LX_NEQ :
+-	    case LX_GT :
+-	    case LX_GE :
+-	    case LX_LT :
+-	    case LX_LE :
+-	    case LX_AND : dprintf(D_NOHEADER | D_ALWAYS, "(");
+-	                  rArg->Display();
+-	                  dprintf(D_NOHEADER | D_ALWAYS, ")");
+-		  	  break;
+-	    default :     rArg->Display();
+-			  break;
+-	}
+-    }
+-}
+-
+-void AssignOpBase::Display()
+-{
+-    if(lArg)
+-    {
+-	lArg->Display();
+-    }
+-    dprintf(D_NOHEADER | D_ALWAYS, " = ");
+-    if(rArg)
+-    {
+-	rArg->Display();
+-    }
+-}
+-
+-int IntegerBase::Value()
+-{
+-	return value;
+-}
+-
+-float FloatBase::Value()
+-{
+-	return value;
+-}
+-
+-const char * StringBase::Value()
+-{
+-	return value;
+-}
+-
+-const char * ISOTimeBase::Value()
+-{
+-	return time;
+-}
+-
+-int BooleanBase::Value()
+-{
+-	return value;
+-}
+-
+-FunctionBase::FunctionBase(char *tName)
+-{
+-	this->stringSpaceIndex = string_space->getCanonical((const char *&)tName);
+-	// I apologize for casting away the const-ness of the char * here
+-	// I'm trying to make minimal changes in the code to add string space,
+-	// and it is safe. 
+-	this->name = (char *) (*string_space)[stringSpaceIndex];
+-    this->type = LX_FUNCTION;
+-	arguments = new List<ExprTree>();
+-	return;
+-}
+-
+-FunctionBase::~FunctionBase()
+-{
+-	ExprTree *arg = NULL;
+-
+-	arguments->Rewind();
+-	while(arguments->Next(arg)) {
+-		if(arg) {
+-			delete arg;
+-			arg = NULL;
+-		}
+-	}
+-	delete arguments;
+-
+-	string_space->disposeByIndex(stringSpaceIndex);
+-
+-	return;
+-}
+-
+-int
+-FunctionBase::operator==(ExprTree& tree)
+-{
+-	return 0;
+-}
+-
+-void FunctionBase::GetReferences(const AttrList *base_attrlist,
+-								 StringList &internal_references,
+-								 StringList &external_references) const
+-{
+-
+-	ExprTree *arg;
+-
+-    // These two lines make me shudder. 
+-    // This function is const, but calling Rewind() and Next() 
+-    // on the arguments list makes it non-const. In practice, 
+-    // though, it's really const: we always rewind before we 
+-    // look at the arguments. The problem is that the iterator
+-    // is part of the List class itself. In order to maintain
+-    // const-ness of this function, I'm going to take the easy
+-    // way out and magically turn it mutable, by hiding the 
+-    // fact that it should be const. 
+-    FunctionBase *mutable_this = (FunctionBase *) this;
+-	mutable_this->arguments->Rewind();
+-
+-	while (mutable_this->arguments->Next(arg)) {
+-        arg->GetReferences(base_attrlist, 
+-                           internal_references, external_references);
+-	}
+-
+-	return;
+-}
+-
+-void
+-FunctionBase::AppendArgument(ExprTree *argument)
+-{
+-	arguments->Append(argument);
+-	return;
+-}
+-
+-void
+-FunctionBase::EvaluateArgument(
+-	ExprTree *arg,
+-	const AttrList *attrlist1, 
+-	const AttrList *attrlist2,
+-	EvalResult *result) const
+-{
+-	if ( arg ) {
+-		if (attrlist2 == NULL) {
+-			// This will let us refer to attributes in a ClassAd, like "MY"
+-			arg->EvalTree(attrlist1, result);
+-		} else {
+-			// This will let us refer to attributes in two ClassAds: like 
+-			// "My" and "Target"
+-			arg->EvalTree(attrlist1, attrlist2, result);
+-		}
+-	}
+-	return;
+-}
+-
+-// I added a contructor for this base class to initialize
+-// unit to something.  later we check to see if unit is "k"
+-// and without the contructor, we're doing that from unitialized
+-// memory which (belive it!) on HPUX happened to be 'k', and
+-// really bad things happened!  Yes, this bug was a pain 
+-// in the #*&@! to find!  -Todd, 7/97
+-// and now init sumFlag as well... not sure if it should be
+-// FALSE or TRUE! but it needs to be initialized -Todd, 9/10
+-// and now init evalFlag as well (to detect circular eval'n) -Rajesh
+-// We no longer initialze sumFlag, because it has been removed. 
+-// It's not used, that's why you couldn't figure out how to initialize
+-// it, Todd.-Alain 26-Sep-2001
+-ExprTree::ExprTree() : unit('\0'), evalFlag(FALSE)
+-{
+-	if (string_space_references == 0) {
+-		string_space = new StringSpace;
+-	}
+-	string_space_references++;
+-	invisible = false;
+-	type = LX_UNDEFINED;
+-	return;
+-}
+-
+-ExprTree::~ExprTree()
+-{
+-	string_space_references--;
+-	if (string_space_references == 0) {
+-		delete string_space;
+-		string_space = NULL;
+-	}
+-	return;
+-}
+-
+diff --git a/src/.deprecate_classad.old/attrlist.cpp b/src/.deprecate_classad.old/attrlist.cpp
+deleted file mode 100644
+index b6e9a6e..0000000
+--- a/src/.deprecate_classad.old/attrlist.cpp
++++ /dev/null
+@@ -1,2608 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-// AttrList.C
+-//
+-// Implementation of AttrList classes and AttrListList classes.
+-//
+-
+-#include "condor_common.h"
+-#include "condor_debug.h"
+-#include "condor_ast.h"
+-#include "parser_internal.h"
+-#include "condor_attrlist.h"
+-#include "condor_attributes.h"
+-#include "iso_dates.h"
+-#include "condor_xml_classads.h"
+-#include "condor_string.h" // for strnewp()
+-#include "my_hostname.h"
+-#include "HashTable.h"
+-#include "YourString.h"
+-
+-extern void evalFromEnvironment (const char *, EvalResult *);
+-
+-
+-// Chris Torek's world famous hashing function
+-// Modified to be case-insensitive
+-static unsigned int torekHash(const YourString &s) {
+-	unsigned int hash = 0;
+-
+-	const char *p = s.s;
+-	while (*p) {
+-		hash = (hash<<5)+hash + (unsigned char)tolower(*p);
+-		p++;
+-	}
+-
+-	return hash;
+-}
+-
+-static const int hash_size = 79; // prime research
+-
+-static const char *SECRET_MARKER = "ZKM"; // "it's a Zecret Klassad, Mon!"
+-static bool publish_server_time = false;
+-void AttrList_setPublishServerTime( bool publish )
+-{
+-	publish_server_time = publish;
+-}
+-
+-
+-///////////////////////////////////////////////////////////////////////////////
+-// AttrListElem constructor.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrListElem::AttrListElem(ExprTree* expr)
+-{
+-    tree = expr;
+-    dirty = false;
+-    name = ((Variable*)expr->LArg())->Name();
+-    next = NULL;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrListElem copy constructor. 
+-////////////////////////////////////////////////////////////////////////////////
+-AttrListElem::AttrListElem(AttrListElem& oldNode)
+-{
+-	// This old lame Copy business doesn't really make a copy
+-    // oldNode.tree->Copy();
+-    // this->tree = oldNode.tree;
+-	// So we do the new DeepCopy():
+-	this->tree = oldNode.tree->DeepCopy();
+-    this->dirty = false;
+-    this->name = ((Variable*)tree->LArg())->Name();
+-    next = NULL;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrListAbstract constructor. It is called by its derived classes.
+-// AttrListAbstract is a purely virtual class, there is no need for a user to
+-// declare a AttrListAbstract instance.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrListAbstract::AttrListAbstract(int atype)
+-{
+-    this->type = atype;
+-    this->inList = NULL;
+-    this->next = NULL;
+-    this->prev = NULL;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrListRep constructor.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrListRep::AttrListRep(AttrList* aList, AttrListList* attrListList)
+-: AttrListAbstract(ATTRLISTREP)
+-{
+-    this->attrList = aList;
+-    this->inList = attrListList;
+-    this->nextRep = (AttrListRep *)aList->next;
+-    attrList->inList = NULL;
+-    attrList->next = this;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrList class constructor when there is no AttrListList associated with it.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrList::AttrList() : AttrListAbstract(ATTRLISTENTITY)
+-{
+-    exprList = NULL;
+-	hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	chainedAd = NULL;
+-	inside_insert = false;
+-    tail = NULL;
+-    ptrExpr = NULL;
+-    ptrName = NULL;
+-    ptrExprInChain = false;
+-    ptrNameInChain = false;
+-    associatedList = NULL;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrList class constructor. The parameter indicates that this AttrList has
+-// an AttrListList associated with it.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrList::AttrList(AttrListList* assocList) :
+-		  AttrListAbstract(ATTRLISTENTITY)
+-{
+-    exprList = NULL;
+-	hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	chainedAd = NULL;
+-	inside_insert = false;
+-    tail = NULL;
+-    ptrExpr = NULL;
+-    ptrName = NULL;
+-    ptrExprInChain = false;
+-    ptrNameInChain = false;
+-    this->associatedList = assocList;
+-    if(associatedList)
+-    {
+-        if(!associatedList->associatedAttrLists)
+-        {
+-      	    assocList->associatedAttrLists = new AttrListList;
+-        }
+-        assocList->associatedAttrLists->Insert(this);
+-    }
+-}
+-
+-//
+-// Constructor of AttrList class, read from a file.
+-// The string "delimitor" passed in or EOF delimits the end of a AttrList input.
+-// The newline character delimits an expression. White spaces before a new
+-// expression are ignored.
+-// 1 is passed on to the calling procedure if EOF is reached. Otherwise, 0
+-// is passed on.
+-//
+-AttrList::
+-AttrList(FILE *file, char *delimitor, int &isEOF, int &error, int &empty) 
+-	: AttrListAbstract(ATTRLISTENTITY)
+-{
+-    ExprTree 	*tree;
+-	int			delimLen = strlen( delimitor );
+-	int 		index;
+-    MyString    line_buffer;
+-
+-    exprList 		= NULL;
+-	hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	inside_insert = false;
+-	chainedAd = NULL;
+-    associatedList 	= NULL;
+-    tail 			= NULL;
+-    ptrExpr 		= NULL;
+-    ptrName 		= NULL;
+-    ptrExprInChain = false;
+-    ptrNameInChain = false;
+-	empty			= TRUE;
+-
+-	while( 1 ) {
+-			// get a line from the file
+-		if ( line_buffer.readLine( file, false ) == false ) {
+-			error = ( isEOF = feof( file ) ) ? 0 : errno;
+-			return;
+-		}
+-
+-			// did we hit the delimitor?
+-		if ( strncmp( line_buffer.Value(), delimitor, delimLen ) == 0 ) {
+-				// yes ... stop
+-			isEOF = feof( file );
+-			error = 0;
+-			return;
+-		}
+-
+-			// Skip any leading white-space
+-		index = 0;
+-		while ( index < line_buffer.Length() &&
+-				( line_buffer[index] == ' ' || line_buffer[index] == '\t' ) ) {
+-			index++;
+-		}
+-
+-			// if the rest of the string is empty, try reading again
+-			// if it starts with a pound character ("#"), treat as a comment
+-		if( index == line_buffer.Length() || line_buffer[index] == '\n' ||
+-			line_buffer[index] == '#' ) {
+-			continue;
+-		}
+-
+-			// parse the expression in the string
+-		if( Parse( line_buffer.Value(), tree ) || Insert( tree ) == FALSE ) {
+-				// print out where we barfed to the log file
+-			dprintf(D_ALWAYS,"failed to create classad; bad expr = %s\n",
+-				line_buffer.Value());
+-				// read until delimitor or EOF; whichever comes first
+-			line_buffer = "";
+-			while ( strncmp( line_buffer.Value(), delimitor, delimLen ) &&
+-					!feof( file ) ) {
+-				line_buffer.readLine( file, false );
+-			}
+-			isEOF = feof( file );
+-			error = -1;
+-			return;
+-		} else {
+-			empty = FALSE;
+-		}
+-	}
+-	ClearAllDirtyFlags();
+-	return;
+-}
+-
+-#if 0 // don't use CONTEXTs anymore
+-////////////////////////////////////////////////////////////////////////////////
+-// Create a AttrList from a CONTEXT.
+-////////////////////////////////////////////////////////////////////////////////
+-
+-int IsOperator(ELEM *elem)
+-{
+-  switch(elem->type) {
+-    case GETS  :
+-    case LT    :
+-    case LE    :
+-    case GT    :
+-    case GE    :
+-    case EQ    :
+-    case NE    :
+-    case AND   :
+-    case OR    :
+-    case PLUS  :
+-    case MINUS :
+-    case MUL   :
+-    case DIV   : return TRUE;
+-    default    : return FALSE;
+-  }
+-}
+-
+-ELEM* Pop(STACK* stack)
+-{
+-	stack->top--;
+-	return stack->data[stack->top];
+-}
+-
+-void Push(STACK* stack, ELEM *elem)
+-{
+-  stack->data[stack->top] = elem;
+-  stack->top++;
+-}
+-
+-char *Print_elem(ELEM *elem, char *str)
+-{
+-  char *tmpChar;
+-
+-  switch(elem->type) {
+-    case GETS  : sprintf(str, " = ");
+-		 break;
+-    case LT    : sprintf(str, " < ");
+-		 break;
+-    case LE    : sprintf(str, " <= ");
+-		 break;
+-    case GT    : sprintf(str, " > ");
+-		 break;
+-    case GE    : sprintf(str, " >= ");
+-		 break;
+-    case EQ    : sprintf(str, " == ");
+-		 break;
+-    case NE    : sprintf(str, " != ");
+-		 break;
+-    case AND   : sprintf(str, " && ");
+-		 break;
+-    case OR    : sprintf(str, " || ");
+-		 break;
+-    case PLUS  : sprintf(str, " + ");
+-		 break;
+-    case MINUS : sprintf(str, " - ");
+-		 break;
+-    case MUL   : sprintf(str, " * ");
+-		 break;
+-    case DIV   : sprintf(str, " / ");
+-		 break;
+-    case NAME  : sprintf(str, "%s", elem->val.string_val);
+-		 break;
+-    case STRING: 
+-				 if(!elem->val.string_val)
+-				 {
+-					 sprintf(str, "(Null)");
+-				 }
+-				 else
+-				 {
+-					 sprintf(str, "\"%s\"", elem->val.string_val);
+-				 } 
+-				 break;
+-    case FLOAT : sprintf(str, "%f", elem->val.float_val);
+-		 break;
+-    case INT   : sprintf(str, "%d", elem->val.integer_val);
+-		 break;
+-    case BOOL  : sprintf(str, elem->val.integer_val? "TRUE" : "FALSE");
+-		 break;
+-    case NOT   : sprintf(str, "!");
+-		 break;
+-    case EXPRSTRING  : sprintf(str, "%s", elem->val.string_val);
+-		 break;
+-  }
+-
+-  for(tmpChar = str; *tmpChar != '\0'; tmpChar++);
+-  return tmpChar;
+-}
+-
+-AttrList::AttrList(CONTEXT* context) : AttrListAbstract(ATTRLISTENTITY)
+-{
+-	STACK		stack;
+-	ELEM*		elem, *lElem, *rElem;
+-	char*		tmpExpr;
+-	char*		tmpChar;
+-	int			i, j;
+-	ExprTree*	tmpTree;
+-
+-	stack.top = 0;
+-	associatedList = NULL;
+-	tail = NULL;
+-	ptrExpr = NULL;
+-	ptrName = NULL;
+-    ptrExprInChain = false;
+-    ptrNameInChain = false;
+-	exprList = NULL;
+-	hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	chainedAd = NULL;
+-	inside_insert = false;
+-
+-	for(i = 0; i < context->len; i++)
+-	{
+-    	for(j = 0; j < (context->data)[i]->len; j++)
+-		{
+-      		if(((context->data)[i]->data)[j]->type == ENDMARKER)
+-			{
+-				elem = Pop(&stack);
+-				if(Parse(elem->val.string_val, tmpTree) != 0)
+-				{
+-					dprintf(D_EXPR, "Can't parse %s\n", elem->val.string_val);
+-				}
+-				else
+-				{
+-					Insert(tmpTree);
+-				}
+-				delete []elem->val.string_val;
+-				delete elem;
+-      		}
+-			else if(((context->data)[i]->data)[j]->type == NOT)
+-			{
+-				tmpExpr = new char[1000];
+-				strcpy(tmpExpr, "");
+-				rElem = Pop(&stack);
+-				strcat(tmpExpr, "(!");
+-				tmpChar = tmpExpr + 2;
+-				Print_elem(rElem, tmpChar);
+-				strcat(tmpExpr, ")");
+-				elem = new ELEM;
+-				elem->val.string_val = tmpExpr;
+-				elem->type = EXPRSTRING;
+-				Push(&stack, elem);
+-				if(rElem->type == EXPRSTRING)
+-				{
+-					delete rElem->val.string_val;
+-					delete rElem;
+-        		}
+-		    }
+-			else if(IsOperator(((context->data)[i]->data)[j]))
+-			{
+-				tmpExpr = new char[1000];
+-				strcpy(tmpExpr, "");
+-				rElem = Pop(&stack);
+-				lElem = Pop(&stack);
+-				if(((context->data)[i]->data)[j]->type != GETS)
+-				{
+-			    	strcat(tmpExpr, "(");
+-					tmpChar = tmpExpr + 1;
+-				}
+-				else
+-					tmpChar = tmpExpr;
+-				tmpChar = Print_elem(lElem, tmpChar);
+-				tmpChar = Print_elem(((context->data[i]->data)[j]), tmpChar);
+-				Print_elem(rElem, tmpChar);
+-				if(((context->data)[i]->data)[j]->type != GETS)
+-					strcat(tmpExpr, ")");
+-				elem = new ELEM;
+-				elem->val.string_val = tmpExpr;
+-				elem->type = EXPRSTRING;
+-				Push(&stack, elem);
+-				if(rElem->type == EXPRSTRING)
+-				{
+-					delete rElem->val.string_val;
+-					delete rElem;
+-       			}
+-				if(lElem->type == EXPRSTRING)
+-				{
+-					delete lElem->val.string_val;
+-					delete lElem;
+-				}
+-			} else
+-				Push(&stack, ((context->data)[i]->data)[j]);
+-		}
+-	}
+-}
+-#endif
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrList class copy constructor.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrList::AttrList(AttrList &old) : AttrListAbstract(ATTRLISTENTITY)
+-{
+-    AttrListElem* tmpOld;	// working variable
+-    AttrListElem* tmpThis;	// working variable
+-
+-	this->hash = new HashTable<YourString, AttrListElem *>(hash_size,torekHash);
+-    if(old.exprList) {
+-		// copy all the AttrList elements. 
+-		// As of 14-Sep-2001, we now copy the trees, not just the pointers
+-		// to the trees. This happens in the copy constructor for AttrListElem
+-		this->exprList = new AttrListElem(*old.exprList);
+-		hash->insert(((Variable *)this->exprList->tree->LArg())->Name(),
+-				this->exprList);
+-		tmpThis = this->exprList;
+-        for(tmpOld = old.exprList->next; tmpOld; tmpOld = tmpOld->next) {
+-			tmpThis->next = new AttrListElem(*tmpOld);
+-			hash->insert(((Variable *)tmpThis->next->tree->LArg())->Name(),
+-				tmpThis->next);
+-			tmpThis = tmpThis->next;
+-        }
+-		tmpThis->next = NULL;
+-        this->tail = tmpThis;
+-    }
+-    else {
+-        this->exprList = NULL;
+-        this->tail = NULL;
+-    }
+-
+-	this->chainedAd = old.chainedAd;
+-	this->inside_insert = false;
+-    this->ptrExpr = NULL;
+-    this->ptrName = NULL;
+-    this->ptrExprInChain = false;
+-    this->ptrNameInChain = false;
+-    this->associatedList = old.associatedList;
+-    if(this->associatedList) {
+-		this->associatedList->associatedAttrLists->Insert(this);
+-    }
+-	return;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// AttrList class destructor.
+-////////////////////////////////////////////////////////////////////////////////
+-AttrList::~AttrList()
+-{
+-		// Delete all of the attributes in this list
+-	Clear();
+-	
+-		// Free memory associated with the hash table
+-	if ( hash ) {
+-		delete hash;
+-		hash = NULL;
+-	}
+-
+-		// If we're part of an AttrListList (a.k.a. ClassAdList),
+-		// delete ourselves out of there, too.
+-    if(associatedList)
+-    {
+-		associatedList->associatedAttrLists->Delete(this);
+-    }
+-}
+-
+-AttrList& AttrList::operator=(const AttrList& other)
+-{
+-	if (this != &other) {
+-		// First delete our old stuff.
+-		Clear();
+-
+-		if ( !this->hash ) {
+-			// should not happen, but just in case...
+-			this->hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-		}
+-
+-		if(associatedList) {
+-			associatedList->associatedAttrLists->Delete(this);
+-		}
+-
+-		// Then copy over the new stuff 
+-		AttrListElem* tmpOther;	// working variable
+-		AttrListElem* tmpThis;	// working variable
+-		
+-		if(other.exprList) {
+-			this->exprList = new AttrListElem(*other.exprList);
+-			tmpThis = this->exprList;
+-			hash->insert(((Variable *)tmpThis->tree->LArg())->Name(),
+-				tmpThis);
+-			for(tmpOther = other.exprList->next; tmpOther; tmpOther = tmpOther->next) {
+-				tmpThis->next = new AttrListElem(*tmpOther);
+-				tmpThis = tmpThis->next;
+-				hash->insert(((Variable *)tmpThis->tree->LArg())->Name(),
+-					tmpThis);
+-			}
+-			tmpThis->next = NULL;
+-			this->tail = tmpThis;
+-		}
+-		else {
+-			this->exprList = NULL;
+-			this->tail = NULL;
+-		}
+-
+-		this->chainedAd = other.chainedAd;
+-		this->inside_insert = false;
+-		this->ptrExpr = NULL;
+-		this->ptrName = NULL;
+-    	this->ptrExprInChain = false;
+-    	this->ptrNameInChain = false;
+-		this->associatedList = other.associatedList;
+-		if (this->associatedList) {
+-			this->associatedList->associatedAttrLists->Insert(this);
+-		}
+-		
+-	}
+-	return *this;
+-}
+-
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Insert an expression tree into a AttrList. If the expression is not an
+-// assignment expression, FALSE is returned. Otherwise, it is inserted at the
+-// end of the expression list. 
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::Insert(const char* str, bool check_for_dups)
+-{
+-	ExprTree*	tree = NULL;
+-	int result = FALSE;
+-
+-	if(Parse(str, tree) != 0 || !tree)
+-	{
+-		if( tree ) {
+-			delete tree;
+-		}
+-		return FALSE;
+-	}
+-	result = Insert(tree, check_for_dups);
+-	if ( result == FALSE ) {
+-		delete tree;
+-	}
+-	return result;
+-}
+-
+-int AttrList::Insert(const char *str, ExprTree *expr, bool check_for_dups)
+-{
+-	ExprTree *lhs;
+-	ExprTree *assign;
+-	if ( str == NULL || expr == NULL || expr->MyType() == LX_ASSIGN ||
+-		 !IsValidAttrName( str ) ) {
+-		return FALSE;
+-	}
+-	if ( ParseClassAdRvalExpr( str, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	assign = new AssignOp( lhs, expr );
+-	ASSERT( Insert( assign, check_for_dups ) );
+-	return TRUE;
+-}
+-
+-int AttrList::Insert(ExprTree* expr, bool check_for_dups)
+-{
+-    if(expr == NULL || expr->MyType() != LX_ASSIGN ||
+-	   expr->LArg()->MyType() != LX_VARIABLE)
+-    {
+-		return FALSE;
+-    }
+-
+-	inside_insert = true;
+-
+-	if(check_for_dups && Lookup(expr->LArg()))
+-	{
+-		Delete(((Variable*)expr->LArg())->Name());
+-	}
+-
+-    AttrListElem* newNode = new AttrListElem(expr);
+-
+-	newNode->SetDirty(true);
+-
+-    if(!tail)
+-    {
+-		exprList = newNode;
+-    }
+-    else
+-    {
+-		tail->next = newNode;
+-    }
+-    tail = newNode;
+-
+-	inside_insert = false;
+-
+-	hash->insert(((Variable *)newNode->tree->LArg())->Name(),
+-				newNode);
+-    return TRUE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Delete an expression with the name "name" from this AttrList. Return TRUE if
+-// successful; FALSE if the expression can not be found.
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::Delete(const char* name)
+-{
+-    AttrListElem*	previous = exprList;
+-    AttrListElem*	cur = exprList;
+-	int found = FALSE;
+-
+-	hash->remove(name);
+-    while(cur)
+-    {
+-		if(!strcasecmp(name, cur->name))
+-		// expression to be deleted is found
+-		{
+-			// delete the expression
+-			if(cur == exprList)
+-			// the expression to be deleted is at the head of the list
+-			{
+-				exprList = exprList->next;
+-				if(tail == cur)
+-				{
+-					tail = NULL;
+-				}
+-			}
+-			else
+-			{
+-				previous->next = cur->next;
+-				if(tail == cur)
+-				{
+-					tail = previous;
+-				}
+-			}
+-
+-			if(ptrExpr == cur)
+-			{
+-				ptrExpr = cur->next;
+-			}
+-
+-			if(ptrName == cur)
+-			{
+-				ptrName = cur->next;
+-			}
+-
+-			delete cur;
+-			found = TRUE;
+-			break;
+-		}
+-		else
+-		// expression to be deleted not found, continue search
+-		{
+-			previous = cur;
+-			cur = cur->next;
+-		}
+-    }	// end of while loop to search the expression to be deleted
+-
+-	// see this attr exists in our chained
+-	// ad; if so, must insert the attr into this ad as UNDEFINED.
+-	if ( chainedAd && !inside_insert) {
+-		for (cur = chainedAd->exprList; cur; cur = cur->next ) {
+-			if(!strcasecmp(name, cur->name))
+-			// expression to be deleted is found
+-			{
+-				AssignExpr(name, 0);	// 0 means "UNDEFINED"
+-				found = TRUE;
+-				break;
+-			}
+-		}
+-	}
+-
+-
+-    return found; 
+-}
+-
+-void AttrList::SetDirtyFlag(const char *name, bool dirty)
+-{
+-	AttrListElem *element;
+-
+-	element = LookupElem(name);
+-	if (element != NULL) {
+-		element->SetDirty(dirty);
+-	}
+-	return;
+-}
+-
+-void AttrList::GetDirtyFlag(const char *name, bool *exists, bool *dirty)
+-{
+-	AttrListElem *element;
+-	bool  _exists, _dirty;
+-
+-	element = LookupElem(name);
+-	if (element == NULL) {
+-		_exists = false;
+-		_dirty = false;
+-	} else {
+-		_exists = true;
+-		_dirty = element->IsDirty();
+-	}
+-
+-	if (exists) {
+-		*exists = _exists;
+-	}
+-	if (dirty) {
+-		*dirty = _dirty;
+-	}
+-	return;
+-}
+-
+-///////////////////////////////////////////////////////////////////////////////
+-// Reset the dirty flags for each expression tree in the AttrList.
+-///////////////////////////////////////////////////////////////////////////////
+-
+-void AttrList::ClearAllDirtyFlags()
+-{
+-    AttrListElem *current;
+-
+-    current = exprList;
+-    while (current != NULL) {
+-		current->SetDirty(false);
+-		current = current->next;
+-    }
+-	return;
+-}
+-
+-void
+-AttrList::ChainCollapse()
+-{
+-	ExprTree *tmp;
+-
+-	if (!chainedAd) {
+-		// no chained attributes, we're done
+-		return;
+-	}
+-
+-	AttrListElem* chained = chainedAd->exprList;
+-	
+-	chainedAd = NULL;	// do not delete chainedAd here!
+-
+-	while (chained && (tmp=chained->tree)) {
+-			// Move the value from our chained ad into our ad ONLY
+-			// if it does not already exist --- so we do a Lookup()
+-			// first, and only Insert() if the Lookup fails.
+-			// This is because we want attributes in our ad to have
+-			// precedent over the chained (cluster) ad when we collapse.
+-		if ( !Lookup(tmp->LArg()) ) {
+-			
+-            tmp = tmp->DeepCopy();
+-			ASSERT(tmp);
+-			
+-            Insert(tmp,false);	// no need for Insert() to check for dups
+-		}
+-		chained = chained->next;
+-	}
+-}
+-
+-
+-ExprTree* AttrList::NextExpr()
+-{
+-	// After iterating through all the exprs in this ad,
+-	// get all the exprs in our chained ad as well.
+-    if (!this->ptrExpr && chainedAd && !ptrExprInChain ) {
+-		ptrExprInChain = true;
+-		ptrExpr = chainedAd->exprList;
+-	}
+-    if(!this->ptrExpr)
+-    {
+-		return NULL;
+-    }
+-    else
+-    {
+-		ExprTree* tmp = ptrExpr->tree;
+-		ptrExpr = ptrExpr->next;
+-		return tmp;
+-    }
+-}
+-
+-bool AttrList::NextExpr( const char *&name, ExprTree *&value ) {
+-	ExprTree *assign = NextExpr();
+-	if ( assign ) {
+-		name = ((Variable *)assign->LArg())->Name();
+-		value = assign->RArg();
+-		return true;
+-	} else {
+-		return false;
+-	}
+-}
+-
+-ExprTree* AttrList::NextDirtyExpr()
+-{
+-	ExprTree *expr;
+-
+-	// Note: no need to check chained attrs here, since in normal
+-	// practice they will never be dirty.
+-
+-	expr = NULL;
+-	// Loop until we find a dirty attribute
+-	while (ptrExpr != NULL && !ptrExpr->IsDirty()) {
+-		ptrExpr = ptrExpr->next;
+-	}
+-	// If we found a dirty attribute, pull out its expression tree
+-	// and set us up for the next call to NextDirtyExpr()
+-	if (ptrExpr != NULL) {
+-		expr    = ptrExpr->tree;
+-		ptrExpr = ptrExpr->next;
+-	}
+-	return expr;
+-}
+-
+-bool AttrList::NextDirtyExpr( const char *&name, ExprTree *&value ) {
+-	ExprTree *assign = NextDirtyExpr();
+-	if ( assign ) {
+-		name = ((Variable *)assign->LArg())->Name();
+-		value = assign->RArg();
+-		return true;
+-	} else {
+-		return false;
+-	}
+-}
+-
+-char* AttrList::NextName()
+-{
+-	const char *name;
+-
+-    if( (name=this->NextNameOriginal()) == NULL )
+-    {
+-	return NULL;
+-    }
+-    else
+-    {
+-	char* tmp = new char[strlen(name) + 1];
+-	strcpy(tmp, name);
+-	return tmp;
+-    }
+-}
+-
+-const char* AttrList::NextNameOriginal()
+-{
+-	char *name;
+-
+-	// After iterating through all the names in this ad,
+-	// get all the names in our chained ad as well.
+-    if (!this->ptrName && chainedAd && !ptrNameInChain ) {
+-		ptrNameInChain = true;
+-		ptrName = chainedAd->exprList;
+-	}
+-    if (!this->ptrName) {
+-		name = NULL;
+-    }
+-    else {
+-		name = ptrName->name;
+-		ptrName = ptrName->next;
+-    }
+-	return name;
+-}
+-
+-char *AttrList::NextDirtyName()
+-{
+-	char *name;
+-
+-	// Note: no need to check chained attrs here, since in normal
+-	// practice they will never be dirty.
+-
+-	name = NULL;
+-
+-	// Loop until we find a dirty attribute
+-	while (ptrName != NULL && !ptrName->IsDirty()) {
+-		ptrName = ptrName->next;
+-	}
+-	// If we found a dirty attribute, pull out its name
+-	// and set us up for the next call to NextDirtyName()
+-	if (ptrName != NULL) {
+-		name    = strnewp(ptrName->name);
+-		ptrName = ptrName->next;
+-	}
+-	return name;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Return the named expression without copying it. Return NULL if the named
+-// expression is not found.
+-////////////////////////////////////////////////////////////////////////////////
+-ExprTree* AttrList::Lookup(char* name) const
+-{
+-	return Lookup ((const char *) name);
+-}
+-
+-ExprTree* AttrList::LookupExpr(const char* name) const
+-{
+-	ExprTree *expr = Lookup(name);
+-	if ( expr ) {
+-		return expr->RArg();
+-	} else {
+-		return NULL;
+-	}
+-}
+-
+-ExprTree* AttrList::Lookup(const char* name) const
+-{
+-    AttrListElem*	tmpNode = NULL;
+-
+-	ASSERT(hash);
+-
+-	hash->lookup(name, tmpNode);
+-	if (tmpNode) {
+-		return tmpNode->tree;
+-	}
+-
+-	if (chainedAd && !inside_insert) {
+-		chainedAd->hash->lookup(name, tmpNode);
+-		if (tmpNode) {
+-			return tmpNode->tree;
+-		}
+-	}
+-
+-    return NULL;
+-}
+-
+-AttrListElem *AttrList::LookupElem(const char *name) const
+-{
+-	AttrListElem  *theElem = NULL;
+-
+-	hash->lookup(name, theElem);
+-
+-	if (theElem) {
+-		return theElem;
+-	}
+-
+-	if (chainedAd && !inside_insert) {
+-		chainedAd->hash->lookup(name, theElem);
+-	}
+-
+-    return theElem;
+-}
+-
+-ExprTree* AttrList::Lookup(const ExprTree* attr) const
+-{
+-	return Lookup (((const Variable*)attr)->Name());
+-}
+-
+-int AttrList::LookupString (const char *name, char *value) const
+-{
+-	ExprTree *tree, *rhs;
+-	const char *strVal;
+-
+-	tree = Lookup (name);
+-	if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_STRING) &&
+-		(strVal = ((String *) rhs)->Value()) && strVal)
+-	{
+-		strcpy (value, strVal);
+-		return 1;
+-	}
+-
+-	return 0;
+-}
+-
+-int AttrList::LookupString (const char *name, char *value, int max_len) const
+-{
+-	ExprTree *tree, *rhs;
+-	const char *strVal;
+-
+-	tree = Lookup (name);
+-	if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_STRING) &&
+-		(strVal = ((String *) rhs)->Value()) && strVal)
+-	{
+-		strncpy (value, strVal, max_len);
+-		return 1;
+-	}
+-
+-	return 0;
+-}
+-
+-int AttrList::LookupString (const char *name, char **value) const
+-{
+-	ExprTree *tree, *rhs;
+-	const char *strVal;
+-
+-	tree = Lookup (name);
+-	if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_STRING) &&
+-		(strVal = ((String *) rhs)->Value()) && strVal)
+-	{
+-		// Unlike the other lame version of this function call, we
+-		// ensure that we have sufficient space to actually do this. 
+-		*value = (char *) malloc(strlen(strVal) + 1);
+-		if (*value != NULL) {
+-			strcpy(*value, strVal);
+-			return 1;
+-		}
+-		else {
+-			// We shouldn't ever fail, but what if something gets corrupted
+-			// and we try to allocate 3billion bytes of storage?
+-			return 0;
+-		}
+-	}
+-
+-	return 0;
+-}
+-
+-/* This is just a thin wrapper to the mallocing version to simplify
+-usage.  Having client code need to remember to free memory sucks.
+-Indeed, it's telling that lots of client code just does LookupString on 
+-a fixed length buffer, hoping that it will be big enough.
+-*/
+-int AttrList::LookupString (const char *name, MyString & value) const
+-{
+-	char * results = 0;
+-	int success = LookupString(name, &results);
+-	if( success ) value = results;
+-	free(results);
+-	return success;
+-}
+-
+-int AttrList::LookupTime (const char *name, char **value) const
+-{
+-	ExprTree *tree, *rhs;
+-	const char *strVal;
+-
+-	tree = Lookup (name);
+-	if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_TIME) &&
+-		(strVal = ((String *) rhs)->Value()) && strVal)
+-	{
+-		*value = (char *) malloc(strlen(strVal) + 1);
+-		if (*value != NULL) {
+-			strcpy(*value, strVal);
+-			return 1;
+-		}
+-		else {
+-			// We shouldn't ever fail, but what if something gets corrupted
+-			// and we try to allocate 3billion bytes of storage?
+-			return 0;
+-		}
+-	}
+-
+-	return 0;
+-}
+-
+-int AttrList::LookupTime(const char *name, struct tm *time, bool *is_utc) const
+-{
+-	ExprTree *tree, *rhs;
+-	const char *strVal;
+-	int      succeeded;
+-
+-	succeeded = 0;
+-	if (name != NULL && time != NULL && is_utc != NULL) {
+-		tree = Lookup (name);
+-		if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_TIME) &&
+-			(strVal = ((String *) rhs)->Value()) && strVal) {
+-			iso8601_to_time(strVal, time, is_utc);
+-			succeeded = 1;
+-		}
+-	}
+-
+-	return succeeded;
+-}
+-
+-int AttrList::LookupInteger (const char *name, int &value) const
+-{
+-    ExprTree *tree, *rhs;
+-
+-    tree = Lookup (name);
+-    if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_INTEGER))
+-	{
+-        value = ((Integer *) rhs)->Value();
+-        return 1;
+-    }
+-    if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_BOOL))
+-	{
+-        value = ((ClassadBoolean *) rhs)->Value();
+-        return 1;
+-    }
+-
+-    return 0;
+-}
+-
+-int AttrList::LookupFloat (const char *name, float &value) const
+-{
+-    ExprTree *tree, *rhs;   
+-
+-    tree = Lookup (name);   
+-    if( tree && (rhs=tree->RArg()) ) {
+-		if( rhs->MyType() == LX_FLOAT ) {
+-			value = ((Float *) rhs)->Value();
+-			return 1;   
+-		} 
+-		if( rhs->MyType() == LX_INTEGER ) {
+-			value = (float)(((Integer *) rhs)->Value());
+-			return 1;   
+-		} 
+-	}		
+-	return 0;   
+-}
+-
+-int AttrList::LookupBool (const char *name, int &value) const
+-{   
+-    ExprTree *tree, *rhs;       
+-
+-    tree = Lookup (name);       
+-    if (tree && (rhs=tree->RArg()) && (rhs->MyType() == LX_BOOL))    
+-    {   
+-        value = ((ClassadBoolean *) rhs)->Value();   
+-        return 1;       
+-    }       
+-
+-    return 0;       
+-}   
+-
+-
+-bool AttrList::LookupBool (const char *name, bool &value) const
+-{   
+-	int val;
+-	if( LookupBool(name, val) ) {
+-		value = (bool)val;
+-		return true;
+-	}
+-	return false;
+-}   
+-
+-
+-int AttrList::EvalString (const char *name, const AttrList *target, char *value) const
+-{
+-	ExprTree *tree;
+-	EvalResult val;
+-
+-	tree = Lookup(name);
+-	if(!tree) {
+-		if (target) {
+-			tree = target->Lookup(name);
+-		} else {
+-			evalFromEnvironment (name, &val);
+-			if (val.type == LX_STRING && val.s)
+-			{
+-				strcpy (value, val.s);
+-				return 1;
+-			}
+-			return 0;
+-		}
+-	}
+-	
+-	if(tree && tree->EvalTree(this,target,&val) && val.type==LX_STRING && val.s)
+-	{
+-		strcpy (value, val.s);
+-		return 1;
+-	}
+-
+-	return 0;
+-}
+-
+-// Unlike the other lame version of this function call, we ensure that
+-// we allocate the value, to ensure that we have sufficient space.
+-int AttrList::EvalString (const char *name, const AttrList *target, char **value) const
+-{
+-	ExprTree *tree;
+-	EvalResult val;
+-
+-	tree = Lookup(name);
+-	if(!tree) {
+-		if (target) {
+-			tree = target->Lookup(name);
+-		} else {
+-			evalFromEnvironment (name, &val);
+-			if (val.type == LX_STRING && val.s)
+-			{
+-                *value = (char *) malloc(strlen(val.s) + 1);
+-                if (*value != NULL) {
+-                    strcpy(*value, val.s);
+-                    return 1;
+-                } else {
+-                    return 0;
+-                }
+-			}
+-			return 0;
+-		}
+-	}
+-	
+-	if(tree && tree->EvalTree(this,target,&val) && val.type==LX_STRING && val.s)
+-	{
+-		*value = (char *) malloc(strlen(val.s) + 1);
+-		if (*value != NULL) {
+-			strcpy(*value, val.s);
+-			return 1;
+-		} else {
+-			return 0;
+-		}
+-	}
+-
+-	return 0;
+-}
+-
+-int AttrList::EvalString (const char *name, const AttrList *target, MyString & value) const
+-{
+-	char * pvalue = NULL;
+-	int ret = EvalString(name, target, &pvalue);
+-	if(ret == 0) { return ret; }
+-	value = pvalue;
+-	free(pvalue);
+-	return ret;
+-}
+-
+-int AttrList::EvalInteger (const char *name, const AttrList *target, int &value) const
+-{
+-    ExprTree *tree;
+-    EvalResult val;   
+-
+-	tree = Lookup(name);
+-	if(!tree) {
+-		if (target) {
+-			tree = target->Lookup(name);
+-		} else {
+-			evalFromEnvironment (name, &val);
+-			if (val.type == LX_INTEGER)
+-			{
+-				value = val.i;
+-				return 1;
+-			}
+-			return 0;
+-		}
+-	}
+-	
+-    if (tree && tree->EvalTree (this, target, &val) && val.type == LX_INTEGER)
+-    {
+-		value = val.i;
+-        return 1;
+-    }
+-
+-    return 0;
+-}
+-
+-int AttrList::EvalFloat (const char *name, const AttrList *target, float &value) const
+-{
+-    ExprTree *tree;
+-    EvalResult val;   
+-
+-    tree = Lookup(name);   
+-
+-    if(!tree) {
+-        if (target) {
+-            tree = target->Lookup(name);
+-        } else {
+-			evalFromEnvironment (name, &val);
+-			if( val.type == LX_FLOAT ) {
+-				value = val.f;
+-				return 1;
+-			}
+-			if( val.type == LX_INTEGER ) {
+-				value = (float)val.i;
+-				return 1;
+-			}
+-            return 0;
+-        }
+-    }
+-
+-    if( tree && tree->EvalTree (this, target, &val) ) {
+-		if( val.type == LX_FLOAT ) {
+-			value = val.f;
+-			return 1;
+-		}
+-		if( val.type == LX_INTEGER ) {
+-			value = (float)val.i;
+-			return 1;
+-		}
+-    }
+-    return 0;
+-}
+-
+-int AttrList::EvalBool (const char *name, const AttrList *target, int &value) const
+-{
+-    ExprTree *tree;
+-    EvalResult val;   
+-
+-    tree = Lookup(name);   
+-    if(!tree) {
+-        if (target) {
+-            tree = target->Lookup(name);
+-        } else {
+-			evalFromEnvironment (name, &val);
+-			if (val.type == LX_INTEGER)
+-			{
+-				value = (val.i ? 1 : 0);
+-				return 1;
+-			}
+-			return 0;
+-        }
+-    }
+-
+-    if (tree && tree->EvalTree (this, target, &val))
+-    {
+- 		switch (val.type)
+-		{
+-			case LX_INTEGER: value = (val.i ? 1 : 0); break;
+-			case LX_FLOAT: value = (val.f ? 1 : 0); break;
+-
+-			default:
+-				return 0;
+-		}
+-        return 1;
+-    }
+-
+-    return 0;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Test to see if the AttrList belongs to a AttrList list. Returns TRUE if it
+-// does, FALSE if not.
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::IsInList(AttrListList* AttrListList)
+-{
+-    AttrListRep* tmp;
+-
+-    if(!this->inList && !this->next)
+-    {
+-		// not in any list
+-		return FALSE;
+-    }
+-    else if(this->inList)
+-    {
+-	// in one list
+-	if(this->inList == AttrListList)
+-	{
+-	    return TRUE;
+-	}
+-	else
+-	{
+-	    return FALSE;
+-	}
+-    }
+-    else
+-    {
+-	// in more than one list
+-	tmp = (AttrListRep *)this->next;
+-	while(tmp && tmp->inList != AttrListList)
+-	{
+-	    tmp = tmp->nextRep;
+-	}
+-	if(!tmp)
+-	{
+-	    return FALSE;
+-	}
+-	else
+-	{
+-	    return TRUE;
+-	}
+-    }
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Print an expression with a certain name into a file. Returns FALSE if the
+-// pointer to the file or the name is NULL, or the named expression can not be
+-// found in this AttrList; TRUE otherwise.
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::fPrintExpr(FILE* f, char* name)
+-{
+-    if(!f || !name)
+-    {
+-	return FALSE;
+-    }
+-
+-    ExprTree*	tmpExpr = Lookup(name);
+-    char	tmpStr[10000] = "";
+-
+-    if(!tmpExpr)
+-    // the named expression is not found
+-    {
+-	return FALSE;
+-    }
+-
+-    tmpExpr->PrintToStr(tmpStr);
+-    fprintf(f, "%s\n", tmpStr);
+-    return TRUE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Print an expression with a certain name into a buffer. Returns FALSE if the
+-// named expression can not be found in this AttrList; TRUE if otherwise.
+-// The caller should pass the size of the buffer in buffersize.
+-// If buffer is NULL, then space will be allocated with malloc(), and it needs
+-// to be free-ed with free() by the user.
+-////////////////////////////////////////////////////////////////////////////////
+-char *
+-AttrList::sPrintExpr(char *buffer, unsigned int buffersize, const char* name)
+-{
+-    if(!name)
+-    {
+-	return NULL;
+-    }
+-
+-    ExprTree*	tmpExpr = Lookup(name);
+-    MyString	tmpStr;
+-
+-    if(!tmpExpr)
+-    // the named expression is not found
+-    {
+-	return NULL;
+-    }
+-
+-    tmpExpr->PrintToStr(tmpStr);
+-	if (buffer) {
+-		strncpy(buffer,tmpStr.Value(),buffersize);
+-		buffer[buffersize-1] = '\0';
+-			// Behavior is undefined if buffer is not big enough.
+-			// Currently, we return TRUE.
+-	} else {
+-		if ( (buffer=strdup(tmpStr.Value())) == NULL ) {
+-			EXCEPT("Out of memory");
+-		}
+-	}
+-    
+-	return buffer;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// print the whole AttrList into a file. The expressions are in infix notation.
+-// Returns FALSE if the file pointer is NULL; TRUE otherwise.
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::fPrint(FILE* f,StringList *attr_white_list)
+-{
+-    AttrListElem*	tmpElem;
+-    char			*tmpLine;
+-
+-    if(!f)
+-    {
+-		return FALSE;
+-    }
+-
+-	// if this is a chained ad, print out chained attrs first. this is so
+-	// if this ad is scanned in from a file, the chained attrs will get
+-	// updated with attrs from this ad in case of duplicates.
+-	if ( chainedAd ) {
+-		for(tmpElem = chainedAd->exprList; tmpElem; tmpElem = tmpElem->next)
+-		{
+-			tmpLine = NULL;
+-			if( tmpElem->tree->invisible ) {
+-				continue;
+-			}
+-			if( attr_white_list && !attr_white_list->contains_anycase(((VariableBase *)tmpElem->tree->LArg())->Name()) ) {
+-				continue; // not in white-list
+-			}
+-			tmpElem->tree->PrintToNewStr(&tmpLine);
+-			if (tmpLine != NULL) {
+-				fprintf(f, "%s\n", tmpLine);
+-				free(tmpLine);
+-			}
+-		}
+-	}
+-
+-    for(tmpElem = exprList; tmpElem; tmpElem = tmpElem->next)
+-    {
+-		tmpLine = NULL;
+-		if( tmpElem->tree->invisible ) {
+-			continue;
+-		}
+-		if( attr_white_list && !attr_white_list->contains_anycase(((VariableBase *)tmpElem->tree->LArg())->Name()) ) {
+-			continue; // not in white-list
+-		}
+-        tmpElem->tree->PrintToNewStr(&tmpLine);
+-		if (tmpLine != NULL) {
+-			fprintf(f, "%s\n", tmpLine);
+-			free(tmpLine);
+-		}
+-    }
+-    return TRUE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// print the whole AttrList into a file. The expressions are in infix notation.
+-// Returns FALSE if the file pointer is NULL; TRUE otherwise.
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrList::sPrint(MyString &output)
+-{
+-    AttrListElem*	tmpElem;
+-    char			*tmpLine;
+-
+-	// if this is a chained ad, print out chained attrs first. this is so
+-	// if this ad is scanned in from a file, the chained attrs will get
+-	// updated with attrs from this ad in case of duplicates.
+-	if ( chainedAd ) {
+-		for(tmpElem = chainedAd->exprList; tmpElem; tmpElem = tmpElem->next)
+-		{
+-			tmpLine = NULL;
+-			if( tmpElem->tree->invisible ) {
+-				continue;
+-			}
+-			tmpElem->tree->PrintToNewStr(&tmpLine);
+-			if (tmpLine != NULL) {
+-				output += tmpLine;
+-				output += '\n';
+-				free(tmpLine);
+-			}
+-		}
+-	}
+-
+-    for(tmpElem = exprList; tmpElem; tmpElem = tmpElem->next)
+-    {
+-		tmpLine = NULL;
+-		if( tmpElem->tree->invisible ) {
+-			continue;
+-		}
+-        tmpElem->tree->PrintToNewStr(&tmpLine);
+-		if (tmpLine != NULL) {
+-			output += tmpLine;
+-			output += '\n';
+-			free(tmpLine);
+-		}
+-    }
+-    return TRUE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// print the whole AttrList to the given debug level. The expressions
+-// are in infix notation.  
+-////////////////////////////////////////////////////////////////////////////////
+-void
+-AttrList::dPrint( int level )
+-{
+-    AttrListElem*	tmpElem;
+-    char			*tmpLine;
+-	int				flag = D_NOHEADER | level;
+-
+-	if( !(DebugFlags & level) ) {
+-		return;
+-	}
+-
+-	// don't log private stuff into the (probably publicly visible) log file
+-	SetPrivateAttributesInvisible(true);
+-
+-	// if this is a chained ad, print out chained attrs first. this is so
+-	// if this ad is scanned in from a file, the chained attrs will get
+-	// updated with attrs from this ad in case of duplicates.
+-	if ( chainedAd ) {
+-		for(tmpElem = chainedAd->exprList; tmpElem; tmpElem = tmpElem->next)
+-		{
+-			tmpLine = NULL;
+-			if( tmpElem->tree->invisible ) {
+-				continue;
+-			}
+-			tmpElem->tree->PrintToNewStr(&tmpLine);
+-			if (tmpLine != NULL) {
+-				dprintf( flag, "%s\n", tmpLine);
+-				free(tmpLine);
+-			}
+-		}
+-	}
+-
+-    for(tmpElem = exprList; tmpElem; tmpElem = tmpElem->next)
+-    {
+-		tmpLine = NULL;
+-		if( tmpElem->tree->invisible ) {
+-			continue;
+-		}
+-        tmpElem->tree->PrintToNewStr(&tmpLine);
+-		if (tmpLine != NULL) {
+-			dprintf( flag, "%s\n", tmpLine);
+-			free(tmpLine);
+-		}
+-    }
+-
+-	SetPrivateAttributesInvisible(false);
+-}
+-
+-
+-AttrListList::AttrListList()
+-{
+-    head = NULL;
+-    tail = NULL;
+-    ptr = NULL;
+-    associatedAttrLists = NULL;
+-    length = 0;
+-}
+-
+-AttrListList::AttrListList(AttrListList& oldList)
+-{
+-    AttrList*	tmpAttrList;
+-
+-    head = NULL;
+-    tail = NULL;
+-    ptr = NULL;
+-    associatedAttrLists = NULL;
+-    length = 0;
+-
+-    if(oldList.head)
+-    // the AttrList list to be copied is not empty
+-    {
+-	oldList.Open();
+-	while((tmpAttrList = oldList.Next()))
+-	{
+-	    switch(tmpAttrList->Type())
+-	    {
+-			case ATTRLISTENTITY :
+-
+-				Insert(new AttrList(*tmpAttrList));
+-				break;
+-	    }
+-	}
+-	oldList.Close();
+-    }
+-}
+-
+-AttrListList::~AttrListList()
+-{
+-    this->Open();
+-    AttrList *tmpAttrList = Next();
+-
+-    while(tmpAttrList)
+-    {
+-		Delete(tmpAttrList);
+-		tmpAttrList = Next();
+-    }
+-    this->Close();
+-}
+-
+-void AttrListList::Open()
+-{
+-  ptr = head;
+-}
+-
+-void AttrListList::Close()
+-{
+-  ptr = NULL;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Returns the pointer to the AttrList in the list pointed to by "ptr".
+-////////////////////////////////////////////////////////////////////////////////
+-AttrList *AttrListList::Next()
+-{
+-    if(!ptr)
+-        return NULL;
+-
+-    AttrList *tmpAttrList;
+-
+-    if(ptr->Type() == ATTRLISTENTITY)
+-    {
+-	// current AttrList is in one AttrList list
+-	tmpAttrList = (AttrList *)ptr;
+-        ptr = ptr->next;
+-	return tmpAttrList;
+-    }
+-    else
+-    {
+-	// current AttrList is in more than one AttrList list
+-	tmpAttrList = (AttrList *)((AttrListRep *)ptr)->attrList;
+-        ptr = ptr->next;
+-	return tmpAttrList;
+-    }
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Insert a AttrList or a replication of the AttrList if the AttrList already
+-// belongs to some other lists at the end of a AttrList list and update the
+-// aggregate AttrList in that AttrList list.
+-////////////////////////////////////////////////////////////////////////////////
+-void AttrListList::Insert(AttrList* AttrList)
+-{
+-    AttrListRep *rep;
+-
+-    if(AttrList->IsInList(this))
+-    // AttrList is already in this AttrList list
+-    {
+-		return;
+-    }
+-    if(AttrList->inList)
+-    // AttrList is in one AttrList list
+-    {
+-		// AttrList to AttrListRep
+-		AttrListAbstract *saveNext = AttrList->next;
+-		AttrListList *tmpList = AttrList->inList;
+-		AttrList->next = NULL;
+-		rep = new AttrListRep(AttrList, AttrList->inList);
+-		rep->next = saveNext;
+-		if(tmpList->head == (AttrListAbstract *)AttrList)
+-		{
+-			// AttrList is the first element in the list
+-			tmpList->head = rep;
+-		}
+-		else
+-		{
+-			AttrList->prev->next = rep;
+-		}
+-		if(tmpList->tail == (AttrListAbstract *)AttrList)
+-		{
+-			// AttrList is the last element in the list
+-			tmpList->tail = rep;
+-		}
+-		else
+-		{
+-			rep->next->prev = rep;
+-		}
+-		if(tmpList->ptr == AttrList)
+-		{
+-			tmpList->ptr = rep;
+-		}
+-		AttrList->prev = NULL;
+-		AttrList->inList = NULL;
+-
+-		// allocate new AttrListRep for this AttrList list
+-		rep = new AttrListRep(AttrList, this);
+-    }
+-    else if(AttrList->next)
+-    {
+-		// AttrList is in more than one AttrList lists
+-		rep = new AttrListRep(AttrList, this);
+-    }
+-    else
+-    {
+-		// AttrList is not in any AttrList list
+-		rep = (AttrListRep *)AttrList;
+-		AttrList->inList = this;
+-    }
+-    rep->prev = this->tail;
+-    rep->next = NULL;
+-    this->tail = rep;
+-    if(rep->prev != NULL)
+-    {
+-		rep->prev->next = rep;
+-    }
+-    else
+-    {
+-		this->head = rep;
+-    }
+-
+-    this->length++;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Assume parameter AttrList is not NULL and it's a real AttrList, not a        //
+-// AttrListRep. This function doesn't do anything if AttrList is not in the     //
+-// AttrList list.                              				      //
+-////////////////////////////////////////////////////////////////////////////////
+-int AttrListList::Delete(AttrList* attrList)
+-{
+-
+-		// optimization: if attrList is in this list directly
+-		// (i.e. not as an AttrListRep), then avoid searching
+-		// through the list
+-	if( attrList->inList == this ) {
+-		if( attrList == ptr ) {
+-			ptr = ptr->next;
+-		}
+-
+-		if( attrList == head && attrList == tail ) {
+-			head = tail = NULL;
+-		}
+-		else if( attrList == head ) {
+-			head = head->next;
+-			if( head ) {
+-				head->prev = NULL;
+-			}
+-		}
+-		else if( attrList == tail ) {
+-			tail = attrList->prev;
+-			if( tail ) {
+-				tail->next = NULL;
+-			}
+-		}
+-		else {
+-			attrList->prev->next = attrList->next;
+-			attrList->next->prev = attrList->prev;
+-		}
+-
+-		delete attrList;
+-		this->length--;
+-		return TRUE;
+-	}
+-
+-
+-    AttrListAbstract*	cur;
+-    AttrListRep*		tmpRep;
+-    
+-    for(cur = head; cur; cur = cur->next)
+-    {
+-		if(cur->Type() == ATTRLISTREP)
+-		{
+-			if(((AttrListRep *)cur)->attrList == attrList)
+-			{
+-				// this is the AttrList to be deleted
+-				if(cur == ptr) ptr = ptr->next;
+-				
+-				if ( cur != head && cur != tail ) 
+-				{
+-					cur->prev->next = cur->next;
+-					cur->next->prev = cur->prev;
+-				} else {
+-					if(cur == head)
+-					{
+-						// AttrList to be deleted is at the head of the list
+-						head = head->next;
+-						if(head)
+-						{
+-							head->prev = NULL;
+-						}
+-					}
+-
+-					if(cur == tail)
+-					{
+-						// AttrList to be deleted is at the tail of the list
+-						tail = cur->prev;
+-						if(tail)
+-						{
+-							tail->next = NULL;
+-						}
+-					}
+-				}
+-
+-				// delete the rep from the rep list
+-				tmpRep = (AttrListRep *)((AttrListRep *)cur)->attrList->next;
+-				if(tmpRep == cur)
+-				{
+-					((AttrListRep *)cur)->attrList->next = ((AttrListRep *)cur)->nextRep;
+-					if ( ((AttrListRep *)cur)->nextRep == NULL ) {
+-						// here we know this attrlist now no longer exists in any
+-						// other attrlistlist.  so, since the user has now removed
+-						// it from all lists, actually delete the ad itself.
+-						// -Todd Tannenbaum, 9/19/2001 <tannenba at cs.wisc.edu>
+-						AttrList*	adToRemove = ((AttrListRep *)cur)->attrList;
+-						if ( adToRemove ) delete adToRemove;
+-					}
+-
+-				}
+-				else
+-				{
+-					while(tmpRep->nextRep != cur)
+-					{
+-						tmpRep = tmpRep->nextRep;
+-					}
+-					tmpRep->nextRep = ((AttrListRep *)cur)->nextRep;
+-				}
+-
+-				delete cur;
+-    			this->length--;
+-				break;
+-			}
+-		} // end of if a rep is used
+-    } // end of the loop through the AttrListList
+-    return TRUE;
+-}
+-
+-ExprTree* AttrListList::Lookup(const char* name, AttrList*& attrList)
+-{
+-    AttrList*	tmpAttrList;
+-    ExprTree*	tmpExpr;
+-
+-    Open();
+-    for(tmpAttrList = Next(); tmpAttrList; tmpAttrList = Next())
+-    {
+-        if((tmpExpr = tmpAttrList->Lookup(name)))
+-        {
+-            Close();
+-            attrList = tmpAttrList;
+-            return tmpExpr;
+-        }
+-    }
+-    Close();
+-    return NULL;
+-}
+-
+-ExprTree* AttrListList::Lookup(const char* name)
+-{
+-    AttrList*	tmpAttrList;
+-    ExprTree*	tmpExpr;
+-
+-    Open();
+-    for(tmpAttrList = Next(); tmpAttrList; tmpAttrList = Next())
+-    {
+-        if((tmpExpr = tmpAttrList->Lookup(name)))
+-        {
+-            Close();
+-            return tmpExpr;
+-        }
+-    }
+-    Close();
+-    return NULL;
+-}
+-
+-
+-void AttrListList::fPrintAttrListList(FILE* f, bool use_xml, StringList *attr_white_list)
+-{
+-    AttrList            *tmpAttrList;
+-	ClassAdXMLUnparser  unparser;
+-	MyString            xml;
+-				
+-	if (use_xml) {
+-		unparser.SetUseCompactSpacing(false);
+-		unparser.AddXMLFileHeader(xml);
+-		printf("%s\n", xml.Value());
+-		xml = "";
+-	}
+-
+-    Open();
+-    for(tmpAttrList = Next(); tmpAttrList; tmpAttrList = Next()) {
+-		switch(tmpAttrList->Type()) {
+-		case ATTRLISTENTITY :
+-			if (use_xml) {
+-				unparser.Unparse((ClassAd *) tmpAttrList, xml, attr_white_list);
+-				printf("%s\n", xml.Value());
+-				xml = "";
+-			} else {
+-				tmpAttrList->fPrint(f,attr_white_list);
+-			}
+-			break;
+-		}
+-        fprintf(f, "\n");
+-    }
+-	if (use_xml) {
+-		unparser.AddXMLFileFooter(xml);
+-		printf("%s\n", xml.Value());
+-		xml = "";
+-	}
+-    Close();
+-}
+-
+-// shipping functions for AttrList -- added by Lei Cao
+-int AttrList::putAttrList(Stream& s)
+-{
+-    AttrListElem*   elem;
+-    int             numExprs = 0;
+-	bool			send_server_time = false;
+-
+-    //get the number of expressions
+-    for(elem = exprList; elem; elem = elem->next) {
+-		if( elem->tree->invisible ) {
+-			continue;
+-		}
+-        numExprs++;
+-	}
+-
+-	if ( chainedAd ) {
+-		// now count up all the chained ad attrs
+-		for(elem = chainedAd->exprList; elem; elem = elem->next) {
+-			if( elem->tree->invisible ) {
+-				continue;
+-			}
+-			numExprs++;
+-		}
+-	}
+-
+-	if ( publish_server_time ) {
+-		// add one for the ATTR_SERVER_TIME expr
+-		numExprs++;
+-		send_server_time = true;
+-	}
+-
+-    s.encode();
+-
+-    if(!s.code(numExprs))
+-        return 0;
+-
+-	char *line;
+-	int pass;
+-	for( pass=0; pass<2; pass++ ) {
+-		if( pass==0 ) {
+-				// copy chained attrs first, so if there are
+-				// duplicates, the get() method will overide the attrs
+-				// from the chained ad with attrs from this ad.
+-			if( !chainedAd ) {
+-				continue;
+-			}
+-			elem = chainedAd->exprList;
+-		}
+-		else {
+-			elem = exprList;
+-		}
+-
+-		for(; elem; elem = elem->next) {
+-			if( elem->tree->invisible ) {
+-				continue;
+-			}
+-			line = NULL;
+-			elem->tree->PrintToNewStr(&line);
+-			ConvertDefaultIPToSocketIP(elem->name,&line,s);
+-
+-			if( ! s.prepare_crypto_for_secret_is_noop() &&
+-				ClassAdAttributeIsPrivate(elem->name) )
+-			{
+-				s.put(SECRET_MARKER); // tell other side we are sending secret
+-				s.put_secret(line);   // send the secret
+-			}
+-			else if(!s.code(line)) {
+-				free(line);
+-				return 0;
+-			}
+-			free(line);
+-		}
+-	}
+-
+-	if ( send_server_time ) {
+-		// insert in the current time from the server's (schedd)
+-		// point of view.  this is used so condor_q can compute some
+-		// time values based upon other attribute values without 
+-		// worrying about the clocks being different on the condor_schedd
+-		// machine -vs- the condor_q machine.
+-		line = (char *) malloc(strlen(ATTR_SERVER_TIME)
+-							   + 3   // for " = "
+-							   + 12  // for integer
+-							   + 1); // for null termination
+-		sprintf( line, "%s = %ld", ATTR_SERVER_TIME, (long)time(NULL) );
+-		if(!s.code(line)) {
+-			free(line);
+-			return 0;
+-		}
+-		free(line);
+-	}
+-
+-    return 1;
+-}
+-
+-
+-void
+-AttrList::Clear( void )
+-{
+-		// First, unchain ourselves, if we're a chained classad
+-	Unchain();
+-
+-		// Clear out hashtable of attributes. Note we cannot
+-		// delete the hash table here - we can do that safely
+-		// only in ~AttrList() [the dtor] since many other
+-		// methods assume it is never NULL.
+-	if ( hash ) {
+-		hash->clear();
+-	}
+-
+-		// Now, delete all the attributes in our list
+-    AttrListElem* tmp;
+-    for(tmp = exprList; tmp; tmp = exprList) {
+-        exprList = exprList->next;
+-        delete tmp;
+-    }
+-	exprList = NULL;
+-
+-	tail = NULL;
+-}
+-
+-
+-void AttrList::GetReferences(const char *attribute, 
+-							 StringList &internal_references, 
+-							 StringList &external_references) const
+-{
+-	ExprTree  *tree;
+-
+-	tree = Lookup(attribute);
+-	if (tree != NULL) {
+-		tree->GetReferences(this, internal_references, external_references);
+-	}
+-
+-	return;
+-}
+-
+-bool AttrList::GetExprReferences(const char *expr, 
+-							 StringList &internal_references, 
+-							 StringList &external_references) const
+-{
+-	ExprTree  *tree = NULL;
+-
+-		// A common case is that the expression is a simple attribute
+-		// reference.  For efficiency, handle that case specially.
+-	tree = Lookup(expr);
+-	if (tree != NULL) {
+-			// Unlike AttrList::GetReferences(), the attribute name
+-			// passed to this function is added to the list of
+-			// internal references.
+-		internal_references.append( expr );
+-		tree->GetReferences(this, internal_references, external_references);
+-	}
+-	else {
+-		if( ParseClassAdRvalExpr( expr, tree ) != 0 || tree == NULL ) {
+-			return false;
+-		}
+-		tree->GetReferences(this, internal_references, external_references);
+-		delete tree;
+-	}
+-	return true;
+-}
+-
+-bool AttrList::IsExternalReference(const char *name, char **simplified_name) const
+-{
+-	// There are two ways to know if this is an internal or external
+-	// reference.  
+-	// 1. If it is prefixed with MY or has no prefix but refers to an 
+-	//    internal variable definition, it's internal. 
+-	// 2. If it is prefixed with TARGET or another non-MY prefix, or if
+-	//    it has no prefix, but there is no other variable it could refer to.
+-	const char  *prefix = name;
+-	const char  *rest = name;
+-	char *seperator;
+-	bool  is_external;
+-
+-	if (name == NULL) {
+-		is_external = false;
+-	}
+-
+-	seperator = (char*)strchr(name,'.');
+-
+-	// We have a prefix, so we examine it. 
+-	if (seperator) {
+-		*seperator = '\0';
+-		rest = seperator + 1;
+-		if (!strcasecmp(prefix, "TARGET")) {
+-			is_external = TRUE;
+-		}
+-		else {
+-			is_external = FALSE;
+-		}
+-	} else {
+-		// No prefix means that we have to see if the name occurs within
+-		// the attrlist or not. We lookup not only the name.
+-		if (Lookup(name)) {
+-			is_external = FALSE;
+-		}
+-		else {
+-			is_external = TRUE;
+-		}
+-	}
+-
+-	if (simplified_name != NULL) {
+-		if (rest) {
+-			*simplified_name = strdup(rest);
+-		} else {
+-			*simplified_name = NULL;
+-		}
+-	} 
+-
+-	if ( seperator ) {
+-		*seperator = '.';
+-	}
+-
+-	return is_external;
+-}
+-
+-int
+-AttrList::initAttrListFromStream(Stream& s)
+-{
+-	char const *line;
+-    int numExprs;
+-	int succeeded;
+-	
+-	succeeded = 1;
+-
+-	// First, clear our ad so we start with a fresh ClassAd
+-	Clear();
+-	if ( !hash ) {
+-		// is hash ever NULL? don't think so, but just in case.
+-		this->hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	}
+-
+-	// Now, read our new set of attributes off the given stream 
+-    s.decode();
+-
+-    if(!s.code(numExprs)) {
+-		dprintf(D_FULLDEBUG,"Failed to read ClassAd size.\n");
+-        return 0;
+-	}
+-
+-	char *secret_line = NULL;
+-    
+-    for(int i = 0; i < numExprs; i++) {
+-
+-		line = NULL;
+-        if(!s.get_string_ptr(line) || (line == NULL)) {
+-			dprintf(D_FULLDEBUG,"Failed to read ClassAd expression.\n");
+-            succeeded = 0;
+-			break;
+-        }
+-
+-		if( strcmp(line,SECRET_MARKER)==0 ) {
+-			free(secret_line);
+-			secret_line = NULL;
+-			if( !s.get_secret(secret_line) ) {
+-				dprintf(D_FULLDEBUG,"Failed to read encrypted ClassAd expression.\n");
+-				succeeded = 0;
+-				break;
+-			}
+-			line = secret_line;
+-		}
+-
+-		if (!Insert(line)) {
+-				// this debug message for tracking down initFromStream() bug
+-			dprintf(D_FULLDEBUG,"Failed to parse ClassAd expression: '%s'\n",
+-					line);
+-			succeeded = 0;
+-			break;
+-		}
+-    }
+-	free(secret_line);
+-
+-    return succeeded;
+-}
+-
+-bool
+-AttrList::initFromString(char const *str,MyString *err_msg)
+-{
+-	bool succeeded = true;
+-
+-	// First, clear our ad so we start with a fresh ClassAd
+-	Clear();
+-	if ( !hash ) {
+-		// is hash ever NULL? don't think so, but just in case.
+-		this->hash = new HashTable<YourString, AttrListElem *>(hash_size, torekHash);
+-	}
+-
+-	char *exprbuf = new char[strlen(str)+1];
+-	ASSERT( exprbuf );
+-
+-	while( *str ) {
+-		while( isspace(*str) ) {
+-			str++;
+-		}
+-
+-		size_t len = strcspn(str,"\n");
+-		strncpy(exprbuf,str,len);
+-		exprbuf[len] = '\0';
+-
+-		if( str[len] == '\n' ) {
+-			len++;
+-		}
+-		str += len;
+-
+-		if (!Insert(exprbuf)) {
+-			if( err_msg ) {
+-				err_msg->sprintf("Failed to parse ClassAd expression: %s",
+-								 exprbuf);
+-			}
+-			else {
+-				dprintf(D_ALWAYS,"Failed to parse ClassAd expression : %s\n",
+-						exprbuf);
+-			}
+-			succeeded = false;
+-			break;
+-		}
+-	}
+-
+-	delete [] exprbuf;
+-	return succeeded;
+-}
+-
+-
+-void AttrList::ChainToAd(AttrList *ad)
+-{
+-	if (!ad) {
+-		return;
+-	}
+-
+-	chainedAd = ad;
+-}
+-
+-
+-void
+-AttrList::Unchain( void )
+-{
+-	chainedAd = NULL;
+-}
+-
+-AttrList *AttrList::GetChainedParentAd()
+-{
+-	return chainedAd;
+-}
+-
+-/* This is used for %s = %s style constructs */
+-int AttrList::
+-AssignExpr(char const *variable,char const *value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	if ( !value ) {
+-		rhs = new Undefined();
+-	} else {
+-		if ( ParseClassAdRvalExpr( value, rhs ) != 0 || rhs == NULL ) {
+-			delete lhs;
+-			delete rhs;
+-			return FALSE;
+-		}
+-	}
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-
+-char const *
+-AttrList::EscapeStringValue(char const *val,MyString &buf) {
+-	if( !val || !strchr(val,'"') ) {
+-		return val;
+-	}
+-	buf = val;
+-	buf.replaceString("\"","\\\"");
+-	return buf.Value();
+-}
+-
+-/* This is used for %s = "%s" style constructs */
+-int AttrList::
+-Assign(char const *variable, MyString const &value)
+-{
+-	return Assign(variable,value.Value());
+-}
+-
+-/* This is used for %s = "%s" style constructs */
+-int AttrList::
+-Assign(char const *variable,char const *value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	if ( !value ) {
+-		rhs = new Undefined();
+-	} else {
+-		/* I apologize for this casting away of const. It's required by
+-		 * String's use of StringSpace. Nothing will modify the string,
+-		 * so this is safe to do, though it's ugly.
+-		 */
+-		rhs = new String( (char *)value );
+-	}
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-
+-int AttrList::
+-Assign(char const *variable,int value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	rhs = new Integer( value );
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-
+-int AttrList::
+-Assign(char const *variable,unsigned int value)
+-{
+-	MyString buf;
+-	if (!IsValidAttrName(variable)) {
+-		return FALSE;
+-	}
+-
+-	buf.sprintf("%s = %u",variable,value);
+-	return Insert(buf.Value());
+-}
+-
+-int AttrList::
+-Assign(char const *variable,long value)
+-{
+-	MyString buf;
+-	if (!IsValidAttrName(variable)) {
+-		return FALSE;
+-	}
+-
+-	buf.sprintf("%s = %ld",variable,value);
+-	return Insert(buf.Value());
+-}
+-
+-int AttrList::
+-Assign(char const *variable,unsigned long value)
+-{
+-	MyString buf;
+-	if (!IsValidAttrName(variable)) {
+-		return FALSE;
+-	}
+-
+-	buf.sprintf("%s = %lu",variable,value);
+-	return Insert(buf.Value());
+-}
+-
+-int AttrList::
+-Assign(char const *variable,float value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	rhs = new Float( value );
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-int AttrList::
+-Assign(char const *variable,double value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	rhs = new Float( value );
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-int AttrList::
+-Assign(char const *variable,bool value)
+-{
+-	ExprTree *tree = NULL;
+-	ExprTree *lhs = NULL;
+-	ExprTree *rhs = NULL;
+-
+-	if ( ParseClassAdRvalExpr( variable, lhs ) != 0 || lhs == NULL ) {
+-		delete lhs;
+-		return FALSE;
+-	}
+-	rhs = new ClassadBoolean( value ? 1 : 0 );
+-	tree = new AssignOp( lhs, rhs );
+-	if ( Insert( tree ) == FALSE ) {
+-		delete tree;
+-		return FALSE;
+-	}
+-	return TRUE;
+-}
+-
+-bool AttrList::SetInvisible(char const *name,bool invisible)
+-{
+-	ExprTree *tree = Lookup(name);
+-	if( tree ) {
+-		bool old_state = tree->invisible;
+-		tree->invisible = invisible;
+-		tree->RArg()->invisible = invisible;
+-		return old_state;
+-	}
+-	return invisible;
+-}
+-
+-bool AttrList::GetInvisible(char const *name)
+-{
+-	ExprTree *tree = Lookup(name);
+-	if( tree ) {
+-		return tree->invisible;
+-	}
+-	return false;
+-}
+-
+-bool AttrList::ClassAdAttributeIsPrivate( char const *name )
+-{
+-		// keep this in sync with SetPrivateAttributesInvisible()
+-	if( strcasecmp(name,ATTR_CLAIM_ID) == 0 ) {
+-			// This attribute contains the secret capability cookie
+-		return true;
+-	}
+-	if( strcasecmp(name,ATTR_CAPABILITY) == 0 ) {
+-			// This attribute contains the secret capability cookie
+-		return true;
+-	}
+-	if( strcasecmp(name,ATTR_CLAIM_IDS) == 0 ) {
+-			// This attribute contains secret capability cookies
+-		return true;
+-	}
+-	if( strcasecmp(name,ATTR_TRANSFER_KEY) == 0 ) {
+-			// This attribute contains the secret file transfer cookie
+-		return true;
+-	}
+-	return false;
+-}
+-
+-void AttrList::SetPrivateAttributesInvisible(bool make_invisible)
+-{
+-		// keep this in sync with ClassAdAttributeIsPrivate()
+-	SetInvisible(ATTR_CLAIM_ID,make_invisible);
+-	SetInvisible(ATTR_CLAIM_IDS,make_invisible);
+-	SetInvisible(ATTR_CAPABILITY,make_invisible);
+-	SetInvisible(ATTR_TRANSFER_KEY,make_invisible);
+-}
+-
+-//	Decides if a string is a valid attribute name, the LHS
+-//  of an expression.  As per the manual, valid names:
+-//
+-//  Attribute names are sequences of alphabetic characters, digits and 
+-//  underscores, and may not begin with a digit
+-
+-/* static */ bool
+-AttrList::IsValidAttrName(const char *name) {
+-		// NULL pointer certainly false
+-	if (!name) {
+-		return false;
+-	}
+-
+-		// Must start with alpha or _
+-	if (!isalpha(*name) && *name != '_') {
+-		return false;
+-	}
+-
+-	name++;
+-
+-		// subsequent letters must be alphanum or _
+-	while (*name) {
+-		if (!isalnum(*name) && *name != '_') {
+-			return false;
+-		}
+-		name++;
+-	}
+-
+-	return true;
+-}
+-
+-// Determine if a value is valid to be written to the log. The value
+-// is a RHS of an expression. According to LogSetAttribute::WriteBody,
+-// the only invalid character is a '\n'.
+-bool
+-AttrList::IsValidAttrValue(const char *value) {
+-		// NULL value is not invalid, may translate to UNDEFINED.
+-	if (!value) {
+-		return true;
+-	}
+-
+-		// According to LogSetAttribute::WriteBody, the only invalid
+-		// character for a value is '\n'.
+-	while (*value) {
+-		if (((*value) == '\n') ||
+-			((*value) == '\r')) {
+-			return false;
+-		}
+-		value++;
+-	}
+-
+-	return true;
+-}
+-
+-void
+-AttrList::CopyAttribute(char const *target_attr, AttrList *source_ad )
+-{
+-	CopyAttribute(target_attr,target_attr,source_ad);
+-}
+-
+-void
+-AttrList::CopyAttribute(char const *target_attr, char const *source_attr, AttrList *source_ad )
+-{
+-	ASSERT( target_attr );
+-	ASSERT( source_attr );
+-	if( !source_ad ) {
+-		source_ad = this;
+-	}
+-
+-	ExprTree *e = source_ad->Lookup(source_attr);
+-	if (e && e->MyType() == LX_ASSIGN && e->RArg()) {
+-		ExprTree *lhs = new Variable((char *)target_attr);
+-		ExprTree *rhs = e->RArg()->DeepCopy();
+-		ASSERT( lhs && rhs );
+-		ExprTree *assign = new AssignOp(lhs,rhs);
+-		ASSERT( assign );
+-
+-		this->Insert(assign);
+-	} else {
+-		this->Delete(target_attr);
+-	}
+-}
+diff --git a/src/.deprecate_classad.old/buildtable.cpp b/src/.deprecate_classad.old/buildtable.cpp
+deleted file mode 100644
+index 3deac54..0000000
+--- a/src/.deprecate_classad.old/buildtable.cpp
++++ /dev/null
+@@ -1,73 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-/*
+- * Abstract data type for StatTable, which is a data structure which holds 
+- * statistical information about a pool of machines.
+- */
+-#include "condor_common.h"
+-#include "condor_exprtype.h"
+-#include "condor_ast.h"
+-#include "condor_buildtable.h"
+-
+-#define NextSpace(str) while(*str != ' ') str++;
+-
+-int VarTypeTable::FindType(char *var)
+-{
+-  VTableEntry *tmpEntry;
+-
+-  for(tmpEntry = table; tmpEntry; tmpEntry = tmpEntry->next)
+-    if(!strcmp(var, tmpEntry->MyName()))
+-      return tmpEntry->MyType();
+-  
+-  return VTAB_FIXED; 
+-}
+-
+-void VarTypeTable::AddEntry(char *var, int type)
+-{
+-  VTableEntry *newEntry = new VTableEntry(var, type);
+-
+-  newEntry->next = table;
+-  table = newEntry;
+-}
+-
+-void VarTypeTable::PrintTable(FILE *fd)
+-{
+-  VTableEntry *tmpEntry = table;
+-  char *tmp;
+-
+-  for( ; tmpEntry; tmpEntry = tmpEntry->next) {
+-    if(tmpEntry->MyType() == RANGE)
+-      fprintf(fd, "%s RANGE\n", tmpEntry->MyName());
+-    else
+-      fprintf(fd, "%s FIXED\n", tmpEntry->MyName());
+-  }
+-}
+-
+-void BuildVarTypeTable(FILE *f, VarTypeTable *table)
+-{
+-  char name[10000];
+-  char type[10000];
+-
+-  while(fscanf(f, "%s%s", name, type) != EOF)
+-    if(!strcmp(type, "RANGE") || !strcmp(type, "range"))
+-      table->AddEntry(name, RANGE);
+-    else
+-      table->AddEntry(name, VTAB_FIXED);
+-}
+diff --git a/src/.deprecate_classad.old/classad.cpp b/src/.deprecate_classad.old/classad.cpp
+deleted file mode 100644
+index d7c6065..0000000
+--- a/src/.deprecate_classad.old/classad.cpp
++++ /dev/null
+@@ -1,784 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-// AttrList.C
+-//
+-// Implementation of AttrList classes and AttrListList classes.
+-//
+-
+-#include "condor_common.h"
+-
+-# include "condor_debug.h"
+-# include "condor_ast.h"
+-# include "condor_registration.h"
+-# include "condor_attrlist.h"
+-# include "condor_attributes.h"
+-# include "condor_classad.h"
+-# include "condor_adtypes.h"
+-# include "MyString.h"
+-# include "stream.h"
+-# include "condor_xml_classads.h"
+-
+-static Registration regi;                   // this is the registration for 
+-                                            // the AttrList type names. It 
+-                                            // should be defined in the calling
+-                                            // procedure.
+-
+-static	SortFunctionType SortSmallerThan;
+-static	void* SortInfo;
+-static  const char *empty_string = "";
+-
+-// useful when debugging (std* are macros)
+-FILE *__stdin__  = stdin;
+-FILE *__stdout__ = stdout;
+-FILE *__stderr__ = stderr;
+-
+-
+-//
+-// AdType Constructor.
+-//
+-AdType::AdType(const char *tempName)
+-{
+-    if(tempName == NULL)
+-    {                                       // if empty.
+-        name = new char[strlen("") + 1];
+-	if(!name)
+-        {
+-	    	EXCEPT("Out of memory!");
+-        }
+-	strcpy(name, "");
+-	number = -1;
+-    }
+-    else
+-    {
+-        name = new char[strlen(tempName) + 1];
+-	if(!name)
+-        {
+-            EXCEPT("Warning : you ran out of memory -- quitting !");
+-        }
+-	strcpy(name, tempName);
+-	number = regi.RegisterType(tempName);
+-    }   
+-}
+-
+-//
+-// AdType Destructor. 
+-//
+-AdType::~AdType()
+-{
+-    if(name)
+-    {
+-        delete []name;
+-    }
+-}
+-
+-//
+-// ClassAd constructors
+-//
+-ClassAd::ClassAd() : AttrList()
+-{
+-	myType = NULL;
+-	targetType = NULL;
+-}
+-
+-ClassAd::
+-ClassAd(FILE* f, char* d, int& i, int &err, int &empty) 
+-  : AttrList(f, d, i, err, empty)
+-{
+-	myType = NULL;
+-	targetType = NULL;
+-
+-	updateBoundVariables();
+-}
+-
+-void
+-ClassAd::updateBoundVariables() {
+-    ExprTree *tree;
+-    EvalResult *val;
+-
+-    val = new EvalResult;
+-    if(val == NULL)
+-    {
+-        EXCEPT("Warning : you ran out of space -- quitting !");
+-    }
+-
+-	// Make a parse tree that contains the variable MyType
+-    ParseClassAdRvalExpr("MyType", tree);
+-	// Evaluate this variable within the classad, to see if it
+-	// is defined.
+-    tree->EvalTree(this, val);
+-
+-	if( myType ) {
+-		delete myType;
+-		myType = NULL;
+-	}
+-
+-	// If it's not defined, we set the type to be blank
+-    if(!val || val->type!=LX_STRING)
+-    {
+-        myType = new AdType();               // undefined type.
+-        if(myType == NULL)
+-        {
+-            EXCEPT("Warning : you ran out of space");
+-		}
+-    }
+-	// otherwise it was defined, so we'll set the type to be what the
+-	// creator of the classad wants. Note that later on, we'll delete
+-	// the type from the attribute list. ('Delete("MyType")')
+-    else
+-    {
+-		myType = new AdType(val->s);
+-		if(myType == NULL)
+-		{
+-				EXCEPT("Warning : you ran out of space");
+-		}
+-    }
+-	delete tree;
+-	// I just added the next two lines: we were leaking memory 
+-	// because EvalResult may contain a string result that isn't
+-	// properly deleted if we don't call the destructor. Therefore,
+-	// I delete and recreate the EvalResult. --alain 23-Sep-2001
+-	delete val;
+-	val = new EvalResult;
+-
+-	// Make a parse tree that contains the variable TargetType
+-    ParseClassAdRvalExpr("TargetType", tree);
+-	// Evaluate this variable within the classad, to see if it
+-	// is defined.
+-    tree->EvalTree(this, val);
+-
+-	if( targetType ) {
+-		delete targetType;
+-		targetType = NULL;
+-	}
+-
+-	// If it's not defined, we set the type to be blank
+-    if(!val || val->type!=LX_STRING)
+-    {
+-        targetType = new AdType();           // undefined type.
+-		if(targetType == NULL)
+-		{
+-			EXCEPT("Warning : you ran out of space");
+-		}
+-    }
+-	// otherwise it was defined, so we'll set the type to be what the
+-	// creator of the classad wants. Note that later on, we'll delete
+-	// the type from the attribute list. ('Delete("TargetType")')
+-    else
+-    {
+-		targetType = new AdType(val->s);
+-		if(targetType == NULL)
+-		{
+-			EXCEPT("Warning : you ran out of space");
+-		}
+-    }
+-    delete tree;
+-
+-    if(val)
+-    {
+-        delete val;
+-    }
+-
+-		// We no longer remove MyType and TargetType from the
+-		// attrlist, so they can be used in places such as
+-		// COLLECTOR_REQUIREMENTS.  Just beware that these values
+-		// should only be updated via the ClassAd::SetXXX() functions.
+-	SetInvisible("MyType");
+-	SetInvisible("TargetType");
+-}
+-
+-ClassAd::ClassAd(const ClassAd& old) : AttrList((AttrList&) old)
+-{
+-	myType = NULL;
+-	targetType = NULL;
+-
+-    if(old.myType)
+-    {
+-        this->myType = new AdType(old.myType->name);
+-		if(this->myType == NULL)
+-		{
+-			EXCEPT("Warning : you ran out of meomory");
+-		}
+-    }
+-    if(old.targetType)
+-    {
+-        this->targetType = new AdType(old.targetType->name);
+-		if(this->targetType == NULL)
+-		{
+-			EXCEPT("Warning : you ran out of meomory");
+-		}
+-	}
+-}
+-
+-ClassAd::~ClassAd()
+-{
+-    if(associatedList)
+-    {
+-		associatedList->associatedAttrLists->Delete(this);
+-    }
+-    if(myType)
+-    {
+-        delete myType;
+-    }
+-    if(targetType)
+-    {
+-        delete targetType;
+-    }
+-}
+-
+-ClassAd& ClassAd::operator=(const ClassAd& other)
+-{
+-	if (this != &other) {
+-		// First, let the base class do its magic.
+-		AttrList::operator=(other);
+-
+-		// Clean up memory that we're going to be copying over.
+-		if (myType != NULL) {
+-			delete myType;
+-			myType = NULL;
+-		}
+-		if (targetType != NULL) {
+-			delete targetType;
+-			targetType = NULL;
+-		}
+-
+-		if (other.myType) {
+-			myType = new AdType(other.myType->name);
+-			if (myType == NULL) {
+-				EXCEPT("Warning : you ran out of meomory");
+-			}
+-		}
+-		if(other.targetType) {
+-			targetType = new AdType(other.targetType->name);
+-			if (targetType == NULL) {
+-				EXCEPT("Warning : you ran out of meomory");
+-			}
+-		}
+-	}
+-	return *this;
+-}
+-
+-//
+-// This member function of class AttrList sets myType name.
+-//
+-void ClassAd::SetMyTypeName(const char *tempName)
+-{
+-	if(!tempName)
+-	{
+-		if(myType)
+-		{
+-			delete myType;
+-		}
+-		myType = NULL;
+-		return;
+-	}
+-    if(myType)
+-    {
+-        delete myType;
+-    }
+-    myType = new AdType(tempName);
+-    if(!myType)
+-    {
+-        EXCEPT("Warning : you ran out of memory -- quitting !");
+-    }
+-		// Also set the corresponding attribute in the attrlist.
+-	Assign("MyType",tempName);
+-	SetInvisible("MyType");
+-}
+-
+-//
+-// This member function of class AttrList returns myType name.
+-//
+-const char *ClassAd::GetMyTypeName() const
+-{
+-    if(!myType)
+-    {
+-		return empty_string;
+-    }
+-    else
+-    {
+-        return myType->name;
+-    }
+-}
+-
+-//
+-// This member function of class AttrList sets targetType name.
+-//
+-void ClassAd::SetTargetTypeName(const char *tempName)
+-{
+-	if(!tempName)
+-	{
+-		if(targetType)
+-		{
+-			delete targetType;
+-		}
+-		targetType = NULL;
+-		return;
+-	}
+-    if(targetType)
+-    {
+-        delete targetType;
+-    }
+-    targetType = new AdType(tempName);
+-    if(!targetType)
+-    {
+-        EXCEPT("Warning : you ran out of memory -- quitting !");
+-    }
+-		// Store the value in the attrlist too.
+-	Assign("TargetType",tempName);
+-	SetInvisible("TargetType");
+-}
+-
+-//
+-// This member function of class AttrList returns targetType name.
+-//
+-const char *ClassAd::GetTargetTypeName() const
+-{
+-    if(!targetType)
+-    {
+-        return empty_string;
+-    }
+-    else
+-    {
+-        return targetType->name;
+-    }
+-}
+-
+-//
+-// This member function of class AttrList returns myType number.
+-//
+-int ClassAd::GetMyTypeNumber() const 
+-{
+-    if(!myType)
+-    {
+-        return -1;                            // undefined type.
+-    }
+-    else
+-    {
+-        return myType->number;
+-    }
+-}
+-
+-//
+-// This member function of class AttrList returns targetType number.
+-//
+-int ClassAd::GetTargetTypeNumber() const
+-{
+-    if(!targetType)
+-    {
+-        return -1;                            // undefined type.
+-    }
+-    else
+-    {
+-        return targetType->number;
+-    }
+-}
+-
+-
+-int ClassAd::fPrintAsXML(FILE* f)
+-{
+-	if(!f)
+-	{
+-		return FALSE;
+-	}
+-
+-	MyString out;
+-	sPrintAsXML(out);
+-	fprintf(f, "%s", out.Value());
+-	return TRUE;
+-}
+-
+-	
+-////////////////////////////////////////////////////////////////////////////////
+-// print the whole ClassAd into a file. The expressions are in infix notation.
+-// Returns FALSE if the file pointer is NULL; TRUE otherwise.
+-////////////////////////////////////////////////////////////////////////////////
+-int ClassAd::fPrint(FILE* f)
+-{
+-	if(!f)
+-	{
+-		return FALSE;
+-	}
+-
+-    fprintf(f, "MyType = ");
+-    fprintf(f, "%c", '"');
+-	if(GetMyTypeName())
+-	{
+-		fprintf(f, "%s", GetMyTypeName());
+-	}
+-    fprintf(f, "%c\n", '"');
+-    fprintf(f, "TargetType = ");
+-    fprintf(f, "%c", '"');
+-	if(GetMyTypeName())
+-	{
+-		fprintf(f, "%s", GetTargetTypeName());
+-	}
+-    fprintf(f, "%c\n", '"');    
+-	
+-	return AttrList::fPrint(f);
+-}
+-
+-int ClassAd::sPrintAsXML(MyString &output,StringList *attr_white_list)
+-{
+-	ClassAdXMLUnparser  unparser;
+-	MyString            xml;
+-	unparser.SetUseCompactSpacing(false);
+-	unparser.Unparse(this, xml, attr_white_list);
+-	output += xml;
+-	return TRUE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Append a ClassAd to a string.
+-////////////////////////////////////////////////////////////////////////////////
+-int ClassAd::sPrint(MyString &output)
+-{
+-	output += "MyType = \"";
+-	if(GetMyTypeName())
+-	{
+-		output += GetMyTypeName();
+-	}
+-	output += "\"\nTargetType = \"";
+-	if(GetMyTypeName())
+-	{
+-		output += GetTargetTypeName();
+-	}
+-	output += "\"\n";
+-	
+-	return AttrList::sPrint(output);
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// print the whole ClassAd to the given debug level. The expressions
+-// are in infix notation.  
+-////////////////////////////////////////////////////////////////////////////////
+-void
+-ClassAd::dPrint(int level)
+-{
+-	const char* foo;
+-	int flag = D_NOHEADER | level;
+-	foo = GetMyTypeName();
+-	if( foo ) {
+-		dprintf( flag, "MyType = \"%s\"\n", foo );
+-	} else {
+-		dprintf( flag, "MyType = \"\"\n" );
+-	}
+-
+-	foo = GetTargetTypeName();
+-	if( foo ) {
+-		dprintf( flag, "TargetType = \"%s\"\n", foo );
+-	} else {
+-		dprintf( flag, "TargetType = \"\"\n" );
+-	}
+-
+-	AttrList::dPrint( level );
+-}
+-
+-
+-// shipping functions for ClassAd -- added by Lei Cao
+-
+-int ClassAd::put(Stream& s)
+-{
+-
+-	// first send over all the attributes
+-	if ( !AttrList::putAttrList(s) ) {
+-		return 0;
+-	}
+-
+-	// send the types; if a type does not exist, send "(unknown type)" instead
+-	{
+-		char *adType = "(unknown type)";
+-    	if(myType && myType->name)
+-		{
+-			if (!s.code(myType->name))
+-				return 0;
+-		}
+-		else
+-		if (!s.code (adType))
+-			return 0;
+-
+-		if(targetType && targetType->name)
+-		{
+-    		if(!s.code(targetType->name))
+-        		return 0;
+-		}
+-		else
+-		if (!s.code(adType))
+-			return 0;
+-	}
+-
+-
+-    return 1;
+-}
+-
+-
+-void
+-ClassAd::Clear( void )
+-{
+-		// First, clear out everything in our AttrList
+-	AttrList::Clear();
+-
+-		// Now, clear out our Type fields, since those are specific to
+-		// ClassAd and aren't handled by AttrList::Clear().
+-    if( myType ) {
+-        delete myType;
+-		myType = NULL;
+-    }
+-    if( targetType ) {
+-        delete targetType;
+-		targetType = NULL;
+-    }
+-}
+-
+-bool
+-ClassAd::initFromString(char const *str,MyString *err_msg)
+-{
+-	if( !AttrList::initFromString(str,err_msg) ) {
+-		return false;
+-	}
+-
+-	updateBoundVariables();
+-    return true; // is this correct?
+-}
+-
+-
+-int
+-ClassAd::initFromStream(Stream& s)
+-{
+-	char *name  = NULL;
+-
+-		// First, initialize ourselves from the stream.  This will
+-		// delete any existing attributes in the list...
+-	if ( !AttrList::initAttrListFromStream(s) ) {
+-		return 0;
+-	}
+-
+-		// Now, if there's also type info on the wire, read that,
+-		// too. 
+-    if(!s.code(name)) {
+-		dprintf(D_FULLDEBUG,"Failed to read ClassAd type.\n");
+-        return 0;
+-    }
+-    SetMyTypeName(name);
+-	if ( name != NULL ) {
+-		free(name);
+-		name = NULL;
+-	}
+-
+-    if(!s.code(name)) {
+-		dprintf(D_FULLDEBUG,"Failed to read ClassAd target type.\n");
+-        return 0;
+-    }
+-    SetTargetTypeName(name);
+-	if ( name != NULL ) {
+-		free(name);
+-		name = NULL;
+-	}
+-
+-    return 1; 
+-}
+-
+-
+-ClassAd* ClassAdList::Lookup(const char* name)
+-{
+-	AttrList*	list;
+-
+-	((AttrListList*)this)->Lookup(name, list);
+-	return (ClassAd*)list;
+-}
+-
+-void ClassAdList::
+-Sort(int(*SmallerThan)(AttrList*, AttrList*, void*), void* info)
+-{
+-/*
+-	dprintf(D_ALWAYS,"head=%08x , tail=%08x\n",head,tail);
+-	int count=1;
+-	for (AttrListAbstract* xx=head; xx; xx=xx->next, count++ ) {
+-	  dprintf(D_ALWAYS, "%02d: prev=%08x , cur=%08x , next=%08x\n",count,xx->prev,xx,xx->next);
+-    }
+-*/
+-
+-	Sort(SmallerThan, info, head);
+-
+-/*
+-	dprintf(D_ALWAYS,"head=%08x , tail=%08x\n",head,tail);
+-	count=1;
+-	for (AttrListAbstract* xx=head; xx; xx=xx->next, count++ ) {
+-	  dprintf(D_ALWAYS, "%02d: prev=%08x , cur=%08x , next=%08x\n",count,xx->prev,xx,xx->next);
+-    }
+-*/
+-
+-}
+-
+-int ClassAdList::
+-SortCompare(const void* v1, const void* v2)
+-{
+-	AttrListAbstract** a1 = (AttrListAbstract**)v1;
+-	AttrListAbstract** b1 = (AttrListAbstract**)v2;
+-	AttrListAbstract *abstract_ad1 = *a1;
+-	AttrListAbstract *abstract_ad2 = *b1;
+-	AttrList* a;
+-	AttrList* b;
+-
+-	// Convert AttrListAbstracts to AttrList
+-	if ( abstract_ad1->Type() == ATTRLISTENTITY ) {
+-		// this represents an AttrList in one AttrListList
+-		a = (AttrList *)abstract_ad1;
+-	} else {
+-		// this represents an AttrList in multiple AttrListLists
+-		// thus, it is an AttrListRep not an AttrList
+-		a = (AttrList *)((AttrListRep *)abstract_ad1)->GetOrigAttrList();
+-	}
+-
+-	if ( abstract_ad2->Type() == ATTRLISTENTITY ) {
+-		// this represents an AttrList in one AttrListList
+-		b = (AttrList *)abstract_ad2;
+-	} else {
+-		// this represents an AttrList in multiple AttrListLists
+-		// thus, it is an AttrListRep not an AttrList
+-		b = (AttrList *)((AttrListRep *)abstract_ad2)->GetOrigAttrList();
+-	}
+-	// The user supplied SortSmallerThan() func returns a 1
+-	// if a is smaller than b, and that is _all_ we know about
+-	// SortSmallerThan().  Some tools implement a SortSmallerThan()
+-	// that returns a -1 on error, some just return a 0 on error,
+-	// it is chaos.  Just chaos I tell you.  _SO_ we only check for
+-	// a "1" if it is smaller than, and do not assume anything else.
+-	// qsort() wants a -1 for smaller.
+-	if ( SortSmallerThan(a,b,SortInfo) == 1 ) {
+-			// here we know that a is less than b
+-		return -1;
+-	} else {
+-			// So, now we know that a is not smaller than b, but
+-			// we still need to figure out if a is equal to b or not.
+-			// Do this by calling the user supplied compare function
+-			// again and ask if b is smaller than a.
+-		if ( SortSmallerThan(b,a,SortInfo) == 1 ) {
+-				// now we know that a is greater than b
+-			return 1;
+-		} else {
+-				// here we know a is not smaller than b, and b is not
+-				// smaller than a.  so they must be equal.
+-			return 0;
+-		}
+-	}
+-}
+-
+-void ClassAdList::
+-Sort( SortFunctionType UserSmallerThan, void* UserInfo, 
+-		AttrListAbstract*& listHead)
+-{
+-	AttrListAbstract* ad;
+-	int i;
+-	int len = MyLength();
+-
+-	if ( len < 2 ) {
+-		// the list is either empty or has only one element,
+-		// thus it is already sorted.
+-		return;
+-	}
+-
+-	// what we have is a linked list we want to sort quickly.
+-	// so we stash pointers to all the elements into an array and qsort.
+-	// then we fixup all the head/tail/next/prev pointers.
+-
+-	// so first create our array
+-	AttrListAbstract** array = new AttrListAbstract*[len];
+-	ad = listHead;
+-	i = 0;
+-	while (ad) {
+-		array[i++] = ad;
+-		ad = ad->next;
+-	}
+-	ASSERT(i == len);
+-
+-	// now sort it.  Note: since we must use static members, Sort() is
+-	// _NOT_ thread safe!!!
+-	SortSmallerThan = UserSmallerThan;	
+-	SortInfo = UserInfo;
+-	qsort(array,len,sizeof(AttrListAbstract*),SortCompare);
+-
+-	// and finally fixup the order of the double linked list
+-	listHead = ad = array[0];
+-	ad->prev = NULL;
+-	for (i=1;i<len;i++) {
+-		ad->next = array[i];
+-		array[i]->prev = ad;
+-		ad = array[i];
+-	}
+-	tail = ad;
+-	tail->next = NULL;
+-
+-	// and delete our array
+-	delete [] array;
+-}
+-
+-ClassAd* ClassAd::FindNext()
+-{
+-	return (ClassAd*)next;
+-}
+-
+-//
+-// This function tests whether two ClassAds match mutually.
+-//
+-
+-// Parsing a classad from a string is slow.  Really slow.  We match
+-// ads frequently, so cache the "MY.Requirements" tree so we only
+-// need to parse it once.
+-
+-ExprTree *reqsTree = 0;
+-
+-bool IsAMatch(ClassAd *ad1, ClassAd *ad2)
+-{
+-	return IsAHalfMatch(ad1, ad2) && IsAHalfMatch(ad2, ad1);
+-}
+-
+-bool IsAHalfMatch(ClassAd *my, ClassAd *target)
+-{
+-	EvalResult *val;	
+-	
+-	if( (target->GetMyTypeNumber()!=my->GetTargetTypeNumber()) &&
+-	    strcasecmp(my->GetTargetTypeName(),ANY_ADTYPE) )
+-	{
+-		return false;
+-	}
+-
+-	if ((val = new EvalResult) == NULL)
+-	{
+-		EXCEPT("Out of memory -- quitting");
+-	}
+-
+-	if (reqsTree == 0) ParseClassAdRvalExpr ("MY.Requirements", reqsTree);
+-	reqsTree -> EvalTree (my, target, val);
+-	if (!val || val->type != LX_INTEGER)
+-	{
+-		delete val;
+-		return false;
+-	}
+-	else
+-	if (!val->i)
+-	{
+-		delete val;
+-		return false;
+-	}
+-
+-	delete val;
+-	return true;
+-}
+-
+diff --git a/src/.deprecate_classad.old/classad_condor_config b/src/.deprecate_classad.old/classad_condor_config
+deleted file mode 100644
+index f74ab0e..0000000
+--- a/src/.deprecate_classad.old/classad_condor_config
++++ /dev/null
+@@ -1,8 +0,0 @@
+-# If you want to test ClassAd functions, you'll need this
+-# condor config file, and you'll need CONDOR_CONFIG to point at it.
+-# You'll also want to edit it. LOG seems to be required. The other
+-# two should point at this directory. Make sure to do 'make shared' to
+-# get the shared library
+-LOG = blah
+-CLASSAD_LIB_PATH = /scratch/roy/v67/src/condor_classad/libshared.so
+-CLASSAD_SCRIPT_DIRECTORY = /scratch/roy/v67/src/condor_classad
+diff --git a/src/.deprecate_classad.old/classad_list.cpp b/src/.deprecate_classad.old/classad_list.cpp
+deleted file mode 100644
+index f3dad80..0000000
+--- a/src/.deprecate_classad.old/classad_list.cpp
++++ /dev/null
+@@ -1,75 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-
+-#include "condor_common.h"
+-#include "condor_debug.h"
+-#include "condor_classad.h"
+-
+-static bool _evalBool(ClassAd *ad, ExprTree *tree)
+-{
+-	EvalResult result;
+-	char * constraint = NULL;
+-
+-	// Evaluate constraint with ad in the target scope so that constraints
+-	// have the same semantics as the collector queries.  --RR
+-	if (!tree->EvalTree(NULL, ad, &result)) {
+-		tree->PrintToNewStr(&constraint);
+-		if (constraint) {
+-			dprintf(D_ALWAYS, "can't evaluate constraint: %s\n", constraint);
+-			free(constraint);
+-			constraint = NULL;
+-		}
+-		return false;
+-	}
+-	if (result.type == LX_INTEGER) {
+-		return (bool)result.i;  // Nominal exit point
+-	}
+-
+-	tree->PrintToNewStr(&constraint);
+-	if (constraint) {
+-		dprintf(D_ALWAYS, "constraint (%s) does not evaluate to bool\n",
+-				constraint);
+-		free(constraint);
+-		constraint = NULL;
+-	}
+-	return false;
+-}
+-
+-// Count ads in list that meet constraint.
+-int ClassAdList::
+-Count( ExprTree *constraint )
+-{
+-    ClassAd *ad = NULL;
+-    int matchCount  = 0;
+-
+-    // Check for null constraint.
+-    if ( constraint == NULL ) {
+-        return 0;
+-    }
+-
+-    Rewind();
+-    while( (ad = Next() ) ) {
+-        if ( _evalBool( ad, constraint) ) {
+-            matchCount++;
+-        }
+-    }
+-    return matchCount;
+-}
+-
+diff --git a/src/.deprecate_classad.old/classad_shared.h b/src/.deprecate_classad.old/classad_shared.h
+deleted file mode 100644
+index 95be8b5..0000000
+--- a/src/.deprecate_classad.old/classad_shared.h
++++ /dev/null
+@@ -1,47 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-extern "C" 
+-{
+-
+-	enum ClassAdSharedValueType
+-	{
+-		ClassAdSharedType_Integer,
+-		ClassAdSharedType_Float,
+-		ClassAdSharedType_String,
+-		ClassAdSharedType_Undefined,
+-		ClassAdSharedType_Error
+-	};
+-	
+-	struct ClassAdSharedValue
+-	{
+-		ClassAdSharedValueType  type;
+-		union
+-		{
+-			int    integer;
+-			float  real;
+-			char   *text; // Callee should allocate memory for this using new
+-		};
+-	};
+-	
+-	typedef void(*ClassAdSharedFunction)(const int number_of_arguments,
+-										 const ClassAdSharedValue *arguments,
+-										 ClassAdSharedValue *result);
+-
+-}
+diff --git a/src/.deprecate_classad.old/classad_util.cpp b/src/.deprecate_classad.old/classad_util.cpp
+deleted file mode 100644
+index d748abf..0000000
+--- a/src/.deprecate_classad.old/classad_util.cpp
++++ /dev/null
+@@ -1,131 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "condor_debug.h"
+-#include "condor_classad.h"
+-#include "condor_classad_util.h"
+-#include "condor_adtypes.h"
+-#include "MyString.h"
+-
+-bool EvalBool(AttrList* ad, ExprTree *tree)
+-{
+-  EvalResult result;
+-
+-  // Evaluate constraint with ad in the target scope so that constraints
+-  // have the same semantics as the collector queries.  --RR
+-  if (!tree->EvalTree(NULL, ad, &result)) {        
+-    return false;
+-  }
+-        
+-  if (result.type == LX_INTEGER) {
+-    return (bool)result.i;
+-  }
+-         
+-  return false;
+-}
+-
+-bool EvalBool(ClassAd *ad, const char *constraint)
+-{
+-	static ExprTree *tree = NULL;
+-	static char * saved_constraint = NULL;
+-	EvalResult result;
+-	bool constraint_changed = true;
+-
+-	if ( saved_constraint ) {
+-		if ( strcmp(saved_constraint,constraint) == 0 ) {
+-			constraint_changed = false;
+-		}
+-	}
+-
+-	if ( constraint_changed ) {
+-		// constraint has changed, or saved_constraint is NULL
+-		if ( saved_constraint ) {
+-			free(saved_constraint);
+-			saved_constraint = NULL;
+-		}
+-		if ( tree ) {
+-			delete tree;
+-			tree = NULL;
+-		}
+-		if (ParseClassAdRvalExpr(constraint, tree) != 0) {
+-			dprintf(D_ALWAYS,
+-				"can't parse constraint: %s\n", constraint);
+-			return false;
+-		}
+-		saved_constraint = strdup(constraint);
+-	}
+-
+-	// Evaluate constraint with ad in the target scope so that constraints
+-	// have the same semantics as the collector queries.  --RR
+-	if (!tree->EvalTree(NULL, ad, &result)) {
+-		dprintf(D_ALWAYS, "can't evaluate constraint: %s\n", constraint);
+-		return false;
+-	}
+-	if (result.type == LX_INTEGER) {
+-		return (bool)result.i;
+-	}
+-	dprintf(D_ALWAYS, "constraint (%s) does not evaluate to bool\n",
+-		constraint);
+-	return false;
+-}
+-
+-bool
+-ClassAdsAreSame( ClassAd* ad1, ClassAd* ad2, StringList* ignored_attrs,
+-				 bool verbose )
+-{
+-	ExprTree *ad1_expr, *ad2_expr;
+-	const char* attr_name;
+-	ad2->ResetExpr();
+-	bool found_diff = false;
+-	while( ad2->NextExpr(attr_name, ad2_expr) && ! found_diff ) {
+-		if( ignored_attrs && ignored_attrs->contains_anycase(attr_name) ) {
+-			if( verbose ) {
+-				dprintf( D_FULLDEBUG, "ClassAdsAreSame(): skipping \"%s\"\n",
+-						 attr_name );
+-			}
+-			continue;
+-		}
+-		ad1_expr = ad1->LookupExpr( attr_name );
+-		if( ! ad1_expr ) {
+-				// no value for this in ad1, the ad2 value is
+-				// certainly different
+-			if( verbose ) {
+-				dprintf( D_FULLDEBUG, "ClassAdsAreSame(): "
+-						 "ad2 contains %s and ad1 does not\n", attr_name );
+-			}
+-			found_diff = true;
+-			break;
+-		}
+-		if( *ad1_expr == *ad2_expr ) {
+-			if( verbose ) {
+-				dprintf( D_FULLDEBUG, "ClassAdsAreSame(): value of %s in "
+-						 "ad1 matches value in ad2\n", attr_name );
+-			}
+-		} else {
+-			if( verbose ) {
+-				dprintf( D_FULLDEBUG, "ClassAdsAreSame(): value of %s in "
+-						 "ad1 is different than in ad2\n", attr_name );
+-			}
+-			found_diff = true;
+-			break;
+-		}
+-	}
+-	return ! found_diff;
+-}
+diff --git a/src/.deprecate_classad.old/environment.cpp b/src/.deprecate_classad.old/environment.cpp
+deleted file mode 100644
+index e5f5818..0000000
+--- a/src/.deprecate_classad.old/environment.cpp
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "condor_ast.h"
+-
+-void
+-evalFromEnvironment (const char *name, EvalResult *val)
+-{
+-	// Use strcasecmp comparison since ClassAd attribute
+-	// names are supposed to be case-insensitive.
+-	if (strcasecmp (name, "CurrentTime") == 0)
+-	{
+-		time_t	now = time (NULL);
+-		if (now == (time_t) -1)
+-		{
+-			val->type = LX_ERROR;
+-			return;
+-		}
+-		val->type = LX_INTEGER;
+-		val->i = (int) now;
+-		return;
+-	}
+-
+-	val->type = LX_UNDEFINED;
+-	return;
+-}	
+diff --git a/src/.deprecate_classad.old/evaluateOperators.cpp b/src/.deprecate_classad.old/evaluateOperators.cpp
+deleted file mode 100644
+index 9d3d043..0000000
+--- a/src/.deprecate_classad.old/evaluateOperators.cpp
++++ /dev/null
+@@ -1,169 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "condor_classad.h"
+-#include "operators.h"
+-
+-static void EvalResultToValue( EvalResult &, Value & );
+-static OpKind LexemeTypeToOpKind( LexemeType );
+-static void ValueToEvalResult( Value&, EvalResult& );
+-
+-int BinaryOpBase::
+-_EvalTree( const AttrList *myScope, EvalResult *result )
+-{
+-	return( this->EvalTree( myScope, NULL, result ) );
+-}
+-
+-
+-int BinaryOpBase::
+-_EvalTree( const AttrList *myScope, const AttrList *targetScope, EvalResult *result )
+-{
+-	EvalResult 	lArgResult, rArgResult;
+-	Value		lValue, rValue, resultValue;
+-	OpKind		op;
+-
+-	// translate from the lexer's name for the operation to a reasonable operation name
+-	op = LexemeTypeToOpKind( MyType() );
+-
+-	lArgResult.debug = rArgResult.debug = result->debug;
+-
+-	// evaluate the left side
+-	if( lArg ) lArg->EvalTree( myScope, targetScope, &lArgResult );
+-    EvalResultToValue( lArgResult, lValue );
+-    
+-    if (!operateShortCircuit(op, lValue, resultValue)) {
+-
+-        // Evaluating just the left side was insufficient, so
+-        // we now evaluate the right-hand side. 
+-        if( rArg ) rArg->EvalTree( myScope, targetScope, &rArgResult );
+-        EvalResultToValue( rArgResult, rValue );
+-
+-        // convert overloaded subtraction operator to unary minus
+-        if( op == SUBTRACTION_OP && lArg == NULL ) {
+-            operate( UNARY_MINUS_OP, rValue, resultValue );
+-        } else
+-        // convert overloaded addition operator to parenthesis operator
+-        if( op == ADDITION_OP && lArg == NULL ) {
+-            resultValue = rValue;
+-        } else
+-        if( op == TERNARY_OP ) {
+-            // operator was assignment operator
+-            resultValue = rValue;
+-        } else {
+-            // use evaluation function
+-            operate( op, lValue, rValue, resultValue );
+-        }
+-    }
+-
+-    // translate from new types/values to old types/values
+-    ValueToEvalResult( resultValue, (*result) );
+-
+-	// this version of evaluation never fails
+-	return TRUE;
+-}
+-
+-
+-static void 
+-EvalResultToValue( EvalResult &er, Value &v )
+-{
+-	switch( er.type )
+-	{
+-		case LX_INTEGER:
+-			v.setIntegerValue( er.i );
+-			break;
+-
+-		case LX_FLOAT:
+-			v.setRealValue( er.f );
+-			break;
+-
+-		case LX_STRING:
+-			v.setStringValue( er.s );
+-			break;
+-
+-		case LX_UNDEFINED:
+-			v.setUndefinedValue();
+-			break;
+-
+-		case LX_ERROR:
+-		default:
+-			v.setErrorValue();
+-			break;
+-	}
+-}
+-
+-
+-static OpKind
+-LexemeTypeToOpKind( LexemeType lx )
+-{
+-	switch( lx )
+-	{
+-		// Ugly hack.  Since new classads do not have an "assignment operator",
+-		// we use the TERNARY_OP to signal this condition.  --RR
+-		case LX_ASSIGN:	return TERNARY_OP;
+-
+-		case LX_AND:	return LOGICAL_AND_OP;
+-		case LX_OR:		return LOGICAL_OR_OP;
+-		case LX_EQ:		return EQUAL_OP;
+-		case LX_NEQ:	return NOT_EQUAL_OP;
+-		case LX_LT:		return LESS_THAN_OP;
+-		case LX_LE:		return LESS_OR_EQUAL_OP;
+-		case LX_GT:		return GREATER_THAN_OP;
+-		case LX_GE:		return GREATER_OR_EQUAL_OP;
+-		case LX_ADD:	return ADDITION_OP;
+-		case LX_SUB:	return SUBTRACTION_OP;
+-		case LX_MULT:	return MULTIPLICATION_OP;
+-		case LX_DIV:	return DIVISION_OP;
+-		case LX_META_EQ:return META_EQUAL_OP;
+-		case LX_META_NEQ:return META_NOT_EQUAL_OP;
+-
+-		default:		return __NO_OP__;
+-	}
+-
+-	return __NO_OP__;
+-}
+-
+-
+-static void
+-ValueToEvalResult( Value &v, EvalResult &er )
+-{
+-	int 	i;
+-	double	d;
+-	char	*c;
+-
+-	if( v.isUndefinedValue() ) {
+-		er.type = LX_UNDEFINED;
+-	} else
+-	if( v.isErrorValue() ) {
+-		er.type = LX_ERROR;
+-	} else
+-	if( v.isIntegerValue(i) ) {
+-		er.type = LX_INTEGER;
+-		er.i = i;
+-	} else
+-	if( v.isRealValue(d) ) {
+-		er.type = LX_FLOAT;
+-		er.f = (float) d;
+-	} else
+-	if( v.isStringValue(c) ) {
+-		er.type = LX_STRING;
+-		er.s = new char[strlen(c)+1];
+-		strcpy( er.s, c );
+-	}
+-}
+diff --git a/src/.deprecate_classad.old/inputformat b/src/.deprecate_classad.old/inputformat
+deleted file mode 100644
+index 4e89d63..0000000
+--- a/src/.deprecate_classad.old/inputformat
++++ /dev/null
+@@ -1,38 +0,0 @@
+-The current covention is as follows :
+-
+-  (1) Input format
+-     
+-     (a) If read from a file, a user-specified string (if any) or EOF delimits 
+-a classad instance input; The newline character delimits an expression; White
+-spaces before a new expression are ignored.
+-	 delimitor string should be on a seperate line.
+-	 1 is passed on to the calling procedure if EOF is reached. Otherwise, 
+-0 is passed on.
+-
+-     (b) If read from a string, a user-specified character or the end 
+-of string delimits a expression; end of string delimits a classad input;
+-
+-     In both cases, empty expressions are simply ignored, no parse error.
+-
+-  (2) In the "Requirment" field, every variable has a prefix "MY." or
+-"TARGET.".
+-
+-  (3) There should be "MyType" and "TargetType" in the input. If a type is 
+-missing, the name field of it will assign "" and the number field will be 
+-assigned -1.
+-
+-  (4) Requirement appears in the file.
+-
+-  (5) With a registration class implemented, each type has an associated unique
+-integer value. As mentioned above, for an undefined type, this number is -1. 
+-But this is an internal thing. A user only doesn't need to be aware of this 
+-registration class whether he is using the type number or not. 
+-
+-
+-
+-
+-
+-
+-
+-
+-
+diff --git a/src/.deprecate_classad.old/operators.cpp b/src/.deprecate_classad.old/operators.cpp
+deleted file mode 100644
+index b830e15..0000000
+--- a/src/.deprecate_classad.old/operators.cpp
++++ /dev/null
+@@ -1,833 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "condor_debug.h"
+-#include "operators.h"
+-
+-static void _doOperation	(OpKind,Value&,Value&,Value&,bool,bool,bool,Value&);
+-static void doComparison	(OpKind, Value&, Value&, Value&);
+-static void doArithmetic	(OpKind, Value&, Value&, Value&);
+-static bool doLogicalShortCircuit (OpKind op, Value &v1, Value &result);
+-static void doLogical	 	(OpKind, Value&, Value&, Value&);
+-static void doBitwise	 	(OpKind, Value&, Value&, Value&);
+-static void doRealArithmetic(OpKind, Value&, Value&, Value&);
+-static void compareStrings	(OpKind, Value&, Value&, Value&, bool case_sensitive);
+-static void compareReals	(OpKind, Value&, Value&, Value&);
+-static void compareIntegers (OpKind, Value&, Value&, Value&);
+-static ValueType coerceToNumber(Value&, Value&);
+-
+-
+-const char *opString[] = 
+-{
+-	"",		// no-op
+-
+-	"<",	// comparisons
+-	"<=",
+-	"!=",
+-	"==",
+-	"=?=",
+-	"=!=",
+-	">=",
+-	">",
+-
+-	"+",	// arithmetic
+-	"-",
+-	"+",
+-	"-",
+-	"*",
+-	"/",
+-	"%",
+-
+-	"!",	// logical
+-	"||",
+-	"&&",
+-
+-	"~",	// bitwise
+-	"|",
+-	"^",
+-	"&",
+-	"<<",
+-	">>>",
+-	">>",
+-
+-	"()",	//misc --- no "single token" representation
+-	"?:"
+-};
+-
+-
+-void 
+-operate (OpKind op, Value &op1, Value &result)
+-{
+-	Value dummy;
+-
+-	_doOperation (op, op1, dummy, dummy, true, false, false, result);
+-}
+-
+-void 
+-operate (OpKind op, Value &op1, Value &op2, Value &result)
+-{
+-	Value dummy;
+-
+-	_doOperation (op, op1, op2, dummy, true, true, false, result);
+-}
+-
+-bool 
+-operateShortCircuit (OpKind op, Value &op1, Value &result)
+-{
+-    bool did_short_circuit;
+-    if (op == LOGICAL_OR_OP || op == LOGICAL_AND_OP) 
+-    {
+-        did_short_circuit = doLogicalShortCircuit(op, op1, result);
+-    }
+-    else
+-    {
+-        did_short_circuit = false;
+-    }
+-    return did_short_circuit;
+-}
+-
+-
+-static void 
+-_doOperation (OpKind op, Value &val1, Value &val2, Value &val3, bool valid1, 
+-			bool valid2, bool valid3, Value &result)
+-{
+-	ValueType	vt1,  vt2,  vt3;
+-
+-	// get the types of the values
+-	vt1 = val1.getType ();
+-	vt2 = val2.getType ();
+-	vt3 = val3.getType ();
+-
+-	// take care of the easy cases
+-	if (op == __NO_OP__ 	|| op == PARENTHESES_OP)
+-	{
+-		result = val1;
+-		return;
+-	}
+-	else
+-	if (op == UNARY_PLUS_OP)
+-	{
+-		if (vt1 != INTEGER_VALUE && vt1 != REAL_VALUE)
+-			result.setErrorValue();
+-		else
+-			result = val1;
+-		return;
+-	}
+-
+-	// test for cases when evaluation is strict w.r.t. "error" and "undefined"
+-	if (op != META_EQUAL_OP && op != META_NOT_EQUAL_OP 	&&
+-		op != LOGICAL_OR_OP && op != LOGICAL_AND_OP		&&
+-		op != TERNARY_OP)
+-	{
+-		// check for error values
+-		if (valid1 && vt1==ERROR_VALUE || 
+-			valid2 && vt2==ERROR_VALUE || 
+-			valid3 && vt3==ERROR_VALUE)
+-		{
+-			result.setErrorValue ();
+-			return;
+-		}
+-
+-		// check for undefined values
+-		if (valid1 && vt1==UNDEFINED_VALUE	||
+-			valid2 && vt2==UNDEFINED_VALUE 	||
+-			valid3 && vt3==UNDEFINED_VALUE)
+-		{
+-			result.setUndefinedValue();
+-			return;
+-		}
+-	}
+-
+-	// comparison operations (binary)
+-	if (op >= __COMPARISON_START__ && op <= __COMPARISON_END__)
+-	{
+-		doComparison (op, val1, val2, result);
+-		return;
+-	}
+-
+-	// arithmetic operations (binary, one unary)
+-	if (op >= __ARITHMETIC_START__ && op <= __ARITHMETIC_END__)
+-	{
+-		doArithmetic (op, val1, val2, result);
+-		return;
+-	}
+-
+-	// logical operators (binary, one unary)
+-	if (op >= __LOGIC_START__ && op <= __LOGIC_END__)
+-	{
+-		doLogical (op, val1, val2, result);
+-		return;
+-	}
+-
+-	// bitwise operators (binary, one unary)
+-	if (op >= __BITWISE_START__ && op <= __BITWISE_END__)
+-	{
+-		doBitwise (op, val1, val2, result);
+-		return;
+-	}
+-	
+-	// misc. -- ternary op
+-	if (op == TERNARY_OP)
+-	{
+-		int   i; 
+-		double r;
+-
+-		// if the selector expression is error, propagate it
+-		if (vt1==ERROR_VALUE)
+-		{
+-			result.setErrorValue();	
+-			return;
+-		}
+-
+-		// if the selector is a string or UNDEFINED, the value of the
+-		// expression is undefined
+-		if (vt1==STRING_VALUE || vt1==UNDEFINED_VALUE) 
+-		{
+-			result.setUndefinedValue();
+-			return;
+-		}
+-
+-		// val1 is either a real or an integer
+-		if ((val1.isIntegerValue(i)&&(i!=0)) || (val1.isRealValue(r)&&(r!=0)))
+-				result = val2;
+-		else
+-				result = val3;
+-
+-		return;
+-	}
+-
+-	// should not reach here
+-	EXCEPT ("Should not get here");
+-}
+-
+-
+-static void 
+-doComparison (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	ValueType vt1, vt2, coerceResult;
+-	bool case_sensitive = false;
+-
+-	// do numerical type promotions --- other types/values are unchanged
+-	coerceResult = coerceToNumber (v1, v2);
+-	vt1 = v1.getType();
+-	vt2 = v2.getType();
+-
+-	// perform comparison for =?= ; true iff same types and same values
+-	if (op == META_EQUAL_OP)
+-	{
+-		if (vt1 != vt2)
+-		{
+-			result.setIntegerValue (0);
+-			return;
+-		}
+-		
+-		// undefined or error
+-		if (vt1 == UNDEFINED_VALUE || vt1 == ERROR_VALUE)
+-		{
+-			result.setIntegerValue (1);
+-			return;
+-		}
+-
+-		// if not the above cases, =?= is just like ==, but
+-		// case-sensitive for strings
+-		op = EQUAL_OP;
+-		case_sensitive = true;
+-	}
+-	// perform comparison for =!= ; negation of =?=
+-	if (op == META_NOT_EQUAL_OP)
+-	{
+-		if (vt1 != vt2)
+-		{
+-			result.setIntegerValue (1);
+-			return;
+-		}
+-
+-		// undefined or error
+-		if (vt1 == UNDEFINED_VALUE || vt1 == ERROR_VALUE ||
+-			vt2 == UNDEFINED_VALUE || vt2 == ERROR_VALUE)
+-		{
+-			result.setIntegerValue (0);
+-			return;
+-		}
+-
+-		// if not the above cases, =!= is just like !=, but
+-		// case-sensitive for strings
+-		op = NOT_EQUAL_OP;
+-		case_sensitive = true;
+-	}
+-
+-	switch (coerceResult)
+-	{
+-		// at least one of v1, v2 is a string
+-		case STRING_VALUE:
+-			// check if both are strings
+-			if (vt1 != STRING_VALUE || vt2 != STRING_VALUE)
+-			{
+-				// comparison between strings and non-exceptional non-string 
+-				// values is an error
+-				result.setErrorValue();
+-				return;
+-			}
+-			compareStrings (op, v1, v2, result, case_sensitive);
+-			return;
+-
+-		case INTEGER_VALUE:
+-			compareIntegers (op, v1, v2, result);
+-			return;
+-
+-		case REAL_VALUE:
+-			compareReals (op, v1, v2, result);
+-            return;
+-	
+-		default:
+-			// should not get here
+-			EXCEPT ("Should not get here");
+-			return;
+-	}
+-}
+-
+-
+-static void 
+-doArithmetic (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	int		i1, i2;
+-	double 	r1;
+-	char	*s;
+-
+-	// ensure the operands are not strings
+-	if (v1.isStringValue (s) || v2.isStringValue (s))
+-	{
+-		result.setErrorValue ();
+-		return;
+-	}
+-
+-	// take care of the one unary arithmetic operator
+-	if (op == UNARY_MINUS_OP)
+-	{
+-		if (v1.isIntegerValue (i1))
+-		{
+-			result.setIntegerValue (-i1);
+-			return;
+-		}
+-		else	
+-		if (v1.isRealValue (r1))
+-		{
+-			result.setRealValue (-r1);
+-			return;
+-		}
+-
+-		// v1 is either UNDEFINED or ERROR ... the result is the same as v1
+-		result = v1;
+-		return;
+-	}
+-
+-	// ensure none of the operands are strings
+-	switch (coerceToNumber (v1, v2))
+-	{
+-		case INTEGER_VALUE:
+-			v1.isIntegerValue (i1);
+-			v2.isIntegerValue (i2);
+-			switch (op)
+-			{
+-				case ADDITION_OP:		result.setIntegerValue(i1+i2);	return;
+-				case SUBTRACTION_OP:	result.setIntegerValue(i1-i2);	return;
+-				case MULTIPLICATION_OP:	result.setIntegerValue(i1*i2);	return;
+-				case DIVISION_OP:		
+-					if (i2 != 0)
+-						result.setIntegerValue(i1/i2);
+-					else
+-						result.setErrorValue ();
+-					return;
+-				case MODULUS_OP:
+-					if (i2 != 0)
+-						result.setIntegerValue(i1%i2);
+-					else
+-						result.setErrorValue ();
+-					return;
+-							
+-				default:
+-					// should not reach here
+-					EXCEPT ("Should not get here");
+-					return;
+-			}
+-
+-		case REAL_VALUE:
+-			doRealArithmetic (op, v1, v2, result);
+-			return;	
+-
+-		default:
+-			// should not get here
+-			EXCEPT ("Should not get here");
+-	}
+-
+-	return;
+-}
+-
+-static bool
+-doLogicalShortCircuit (OpKind op, Value &v1, Value &result)
+-{
+-    int       i1;
+-    double    r1;
+-    ValueType vt1 = v1.getType();
+-    bool      did_short_circuit;
+-
+-    did_short_circuit = false;
+-    v1.isIntegerValue (i1);
+-    v1.isRealValue (r1);
+-
+-    if (op == LOGICAL_OR_OP)
+-    {
+-        // no logic on strings --- a string is equivalent to the ERROR
+-        // value. But due to the logic in doLogical, we can't short-circuit
+-        // on it, because "somestring" || 3 would evaluate to 1. Stupid
+-        // old ClassAds.
+-        if (vt1 == STRING_VALUE) 
+-        {
+-            did_short_circuit = false;
+-        }
+-        else
+-        if ((vt1 == INTEGER_VALUE && i1 != 0) || (vt1 == REAL_VALUE && r1 != 0)) 
+-        {
+-            result.setIntegerValue(1);
+-            did_short_circuit = true;
+-        }
+-        // We don't short-circuit on error because according to the
+-        // stupid semantics of old ClassAds, error || 3 is 1. (See
+-        // doLogical.) Ditto for undefined, but that's actually good.
+-        else
+-        {
+-            did_short_circuit = false;
+-        }
+-    }
+-    else
+-    if (op == LOGICAL_AND_OP)
+-    {
+-        // no logic on strings --- a string is equivalent to the ERROR
+-        // value. 
+-        if (vt1 == STRING_VALUE) 
+-        {
+-            result.setErrorValue();
+-            did_short_circuit = true;
+-        }
+-        else
+-        if ((vt1 == INTEGER_VALUE && i1 == 0) || (vt1==REAL_VALUE && r1 == 0))
+-        {
+-            result.setIntegerValue(0);
+-            did_short_circuit = true;
+-        }
+-        else
+-        if (vt1 == ERROR_VALUE) 
+-        {
+-            result.setErrorValue();
+-            did_short_circuit = true;
+-        }
+-        else
+-        if (vt1 == UNDEFINED_VALUE)
+-        {
+-            result.setUndefinedValue();
+-            did_short_circuit = true;
+-        }
+-        else
+-        {
+-            did_short_circuit = false;
+-        }
+-    }
+-
+-    // done
+-    return did_short_circuit;
+-}
+-
+-static void 
+-doLogical (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	int		i1, i2;
+-	double	r1, r2;
+-	ValueType vt1 = v1.getType();
+-	ValueType vt2 = v2.getType();
+-
+-	// stash i1, i2; r1 and r2 --- some of them will be invalid
+-	v1.isIntegerValue (i1);
+-	v1.isRealValue (r1);
+-	v2.isIntegerValue (i2);
+-	v2.isRealValue (r2);
+-
+-	// no logic on strings --- a string is equivalent to the ERROR value
+-	if (vt1==STRING_VALUE) vt1 = ERROR_VALUE;
+- 	if (vt2==STRING_VALUE) vt2 = ERROR_VALUE;
+-
+-	// handle unary operator
+-	if (op == LOGICAL_NOT_OP)
+-	{
+-		if (vt1 == INTEGER_VALUE)
+-			result.setIntegerValue(!i1);
+-		else
+-		if (vt1 == REAL_VALUE)
+-			result.setIntegerValue((int)(!r1));
+-		else
+-		{
+-			// either undefined or error
+-			result = v1;
+-		}
+-
+-		return;
+-	}
+-
+-	// logic with UNDEFINED and ERROR
+-	if (op == LOGICAL_OR_OP)
+-	{
+-		// short circuiting case ...
+-		if ((vt1==INTEGER_VALUE && i1) || (vt1==REAL_VALUE && r1))
+-			result.setIntegerValue(1);
+-		else
+-		// v1 is not true --- check v2
+-		if ((vt2==INTEGER_VALUE && i2) || (vt2==REAL_VALUE && r2))
+-			result.setIntegerValue(1);
+-		else
+-		// v1 is not true and v2 is not true; if either of them is ERROR,
+-		// the result of the computation is ERROR
+-		if (vt1==ERROR_VALUE || vt2==ERROR_VALUE) 
+-			result.setErrorValue();
+-		else
+-		// if either of them is UNDEFINED, the result is UNDEFINED
+-		if (vt1==UNDEFINED_VALUE || vt2==UNDEFINED_VALUE)
+-			result.setUndefinedValue();
+-		else
+-			// must be false
+-			result.setIntegerValue(0);
+-	}
+-	else
+-	if (op == LOGICAL_AND_OP)
+-	{
+-        // short circuiting case ...
+-        if ((vt1==INTEGER_VALUE && !i1) || (vt1==REAL_VALUE && !r1))
+-            result.setIntegerValue(0);
+-		else
+-        // v1 is not false --- check v2
+-        if ((vt2==INTEGER_VALUE && !i2) || (vt2==REAL_VALUE && !r2))
+-            result.setIntegerValue(0);
+-		else
+-        // v1 is not false and v2 is not false; if either of them is ERROR,
+-        // the result of the computation is ERROR
+-        if (vt1==ERROR_VALUE || vt2==ERROR_VALUE) result.setErrorValue();
+-		else
+-        // if either of them is UNDEFINED, the result is UNDEFINED
+-        if (vt1==UNDEFINED_VALUE || vt2==UNDEFINED_VALUE)
+-            result.setUndefinedValue();
+-		else
+-        	// must be true
+-        	result.setIntegerValue(1);
+-	}
+-
+-	// done
+-	return;
+-}
+-
+-
+-
+-static void 
+-doBitwise (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	int	i1, i2;
+-	int signMask = ~INT_MAX;			// 1 at the position of the sign bit
+-	int val;
+-
+-	// bitwise operations are defined only on integers
+-	if (op == BITWISE_NOT_OP)
+-	{
+-		if (!v1.isIntegerValue(i1))
+-		{
+-			// make sure that ERROR is propagated
+-			if (v1.isErrorValue()) 
+-				result.setErrorValue();
+-			else
+-				result.setUndefinedValue();
+-			return;
+-		}
+-	}
+-	else
+-	if (!v1.isIntegerValue(i1) || !v2.isIntegerValue(i2))
+-	{
+-		// make sure that errors are propagated
+-		if (v1.isErrorValue() || v2.isErrorValue())
+-		{
+-			result.setErrorValue();
+-			return;
+-		}
+-		
+-		result.setUndefinedValue();
+-		return;
+-	}
+-
+-	switch (op)
+-	{
+-		case BITWISE_NOT_OP:	result.setIntegerValue(~i1);	return;
+-		case BITWISE_OR_OP:		result.setIntegerValue(i1|i2);	return;
+-		case BITWISE_AND_OP:	result.setIntegerValue(i1&i2);	return;
+-		case BITWISE_XOR_OP:	result.setIntegerValue(i1^i2);	return;
+-		case LEFT_SHIFT_OP:		result.setIntegerValue(i1<<i2);	return;
+-
+-		case LOGICAL_RIGHT_SHIFT_OP:
+-			if (i1 >= 0)
+-			{
+-				// sign bit is not on;  >> will work fine
+-				result.setIntegerValue (i1 >> i2);
+-				return;
+-			}
+-			else
+-			{
+-				// sign bit is on
+-				val = i1 >> 1;	    // shift right 1; the sign bit *may* be on
+-				val &= (~signMask);	// clear the sign bit for sure
+-				val >>= (i2 - 1);	// shift remaining number of positions
+-				result.setIntegerValue (val);
+-				return;
+-			}
+-			// will not reach here
+-			return;
+-
+-		case ARITH_RIGHT_SHIFT_OP:
+-			if (i1 >= 0)
+-			{
+-				// sign bit is off;  >> will work fine
+-				result.setIntegerValue (i1 >> i2);
+-				return;
+-			}
+-			else
+-			{
+-				// sign bit is on; >> *may* not set the sign
+-				val = i1;
+-				for (int i = 0; i < i2; i++)
+-					val = (val >> 1) | signMask;	// make sure that it does
+-				result.setIntegerValue (val);
+-				return;
+-			}
+-			// will not reach here
+-			return;
+-
+-		default:
+-			// should not get here
+-			EXCEPT ("Should not get here");
+-	}
+-}
+-
+-
+-static volatile bool ClassAdExprFPE = false;
+-#ifndef WIN32
+-void ClassAd_SIGFPE_handler (int) { ClassAdExprFPE = true; }
+-#endif
+-
+-static void
+-doRealArithmetic (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	double r1, r2;	
+-	double comp;
+-
+-	// we want to prevent FPE and set the ERROR value on the result; on Unix
+-	// trap sigfpe and set the ClassAdExprFPE flag to true; on NT check the 
+-	// result against HUGE_VAL.  check errno for EDOM and ERANGE for kicks.
+-
+-	v1.isRealValue (r1);
+-	v2.isRealValue (r2);
+-
+-#ifndef WIN32
+-    struct sigaction sa1, sa2;
+-    sa1.sa_handler = ClassAd_SIGFPE_handler;
+-    sigemptyset (&(sa1.sa_mask));
+-    sa1.sa_flags = 0;
+-    if (sigaction (SIGFPE, &sa1, &sa2))
+-    {
+-        dprintf (D_ALWAYS, 
+-			"Warning! ClassAd: Failed sigaction for SIGFPE (errno=%d)\n",
+-			errno);
+-    }
+-#endif
+-
+-	ClassAdExprFPE = false;
+-	errno = 0;
+-	switch (op)
+-	{
+-		case ADDITION_OP:       comp = r1+r2;  break;
+-		case SUBTRACTION_OP:    comp = r1-r2;  break;
+-		case MULTIPLICATION_OP: comp = r1*r2;  break;
+-		case DIVISION_OP:		comp = r1/r2;  break;
+-		case MODULUS_OP:		errno = EDOM;  break;
+-
+-		default:
+-			// should not reach here
+-			EXCEPT ("Should not get here");
+-			return;
+-	}
+-
+-	// check if anything bad happened
+-	if (ClassAdExprFPE==true || errno==EDOM || errno==ERANGE) {
+-	  result.setErrorValue ();
+-#ifdef WIN32
+-	} else if (comp==HUGE_VAL) {
+-	  result.setErrorValue ();
+-#endif
+-	} else {
+-	  result.setRealValue (comp);
+-	}
+-
+-	// restore the state
+-#ifndef WIN32 
+-    if (sigaction (SIGFPE, &sa2, &sa1))
+-    {
+-        dprintf (D_ALWAYS, 
+-			"Warning! ClassAd: Failed sigaction for SIGFPE (errno=%d)\n",
+-			errno);
+-    }
+-#endif
+-}
+-
+-
+-static void 
+-compareStrings (OpKind op, Value &v1, Value &v2, Value &result, bool case_sensitive)
+-{
+-	char *s1, *s2;
+-	int  cmp;
+-	
+-	v1.isStringValue (s1);
+-	v2.isStringValue (s2);
+-
+-	result.setIntegerValue (0);
+-	if (case_sensitive) {
+-		cmp = strcmp(s1, s2);
+-	} else {
+-		cmp = strcasecmp(s1, s2);
+-	}
+-	if (cmp < 0)
+-	{
+-		// s1 < s2
+-		if (op == LESS_THAN_OP 		|| 
+-			op == LESS_OR_EQUAL_OP 	|| 
+-			op == NOT_EQUAL_OP)
+-		{
+-			result.setIntegerValue (1);
+-		}
+-	}
+-	else
+-	if (cmp == 0)
+-	{
+-		// s1 == s2
+-		if (op == LESS_OR_EQUAL_OP 	|| 
+-			op == EQUAL_OP			||
+-			op == GREATER_OR_EQUAL_OP)
+-		{
+-			result.setIntegerValue (1);
+-		}
+-	}
+-	else
+-	{
+-		// s1 > s2
+-		if (op == GREATER_THAN_OP	||
+-			op == GREATER_OR_EQUAL_OP	||
+-			op == NOT_EQUAL_OP)
+-		{
+-			result.setIntegerValue (1);
+-		}
+-	}
+-}
+-
+-
+-static void
+-compareIntegers (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	int i1, i2, compResult;
+-
+-	v1.isIntegerValue (i1); 
+-	v2.isIntegerValue (i2);
+-
+-	switch (op)
+-	{
+-		case LESS_THAN_OP: 			compResult = (i1 < i2); 	break;
+-		case LESS_OR_EQUAL_OP: 		compResult = (i1 <= i2); 	break;
+-		case EQUAL_OP: 				compResult = (i1 == i2); 	break;
+-		case NOT_EQUAL_OP: 			compResult = (i1 != i2); 	break;
+-		case GREATER_THAN_OP: 		compResult = (i1 > i2); 	break;
+-		case GREATER_OR_EQUAL_OP: 	compResult = (i1 >= i2); 	break;
+-		default:
+-			// should not get here
+-			EXCEPT ("Should not get here");
+-			return;
+-	}
+-
+-	result.setIntegerValue (compResult);
+-}
+-
+-
+-static void 
+-compareReals (OpKind op, Value &v1, Value &v2, Value &result)
+-{
+-	double r1, r2;
+-	int	compResult;
+-
+-	v1.isRealValue (r1);
+-	v2.isRealValue (r2);
+-
+-	switch (op)
+-	{
+-		case LESS_THAN_OP:          compResult = (r1 < r2);     break;
+-		case LESS_OR_EQUAL_OP:      compResult = (r1 <= r2);    break;
+-		case EQUAL_OP:              compResult = (r1 == r2);    break;
+-		case NOT_EQUAL_OP:          compResult = (r1 != r2);    break;
+-		case GREATER_THAN_OP:       compResult = (r1 > r2);     break;
+-		case GREATER_OR_EQUAL_OP:   compResult = (r1 >= r2);    break;
+-		default:
+-			// should not get here
+-			EXCEPT ("Should not get here");
+-			return;
+-	}
+-
+-	result.setIntegerValue (compResult);
+-}
+-
+-
+-// This function performs type promotions so that both v1 and v2 are of the
+-// same numerical type: (v1 and v2 are not ERROR or UNDEFINED)
+-//  + if either of v1 or v2 are strings return STRING_VALUE
+-//  + if both v1 and v2 are numbers and of the same type, return type
+-//  + if v1 is an int and v2 is a real, convert v1 to real; return REAL_VALUE
+-//  + if v1 is a real and v2 is an int, convert v2 to real; return REAL_VALUE
+-static ValueType 
+-coerceToNumber (Value &v1, Value &v2)
+-{
+-	char 	*s;
+-	int	 	i;
+-	double 	r;
+-
+-	// either of v1, v2 not numerical?
+-	if (v1.isStringValue (s)  || v2.isStringValue (s))  return STRING_VALUE;
+-	if (v1.isUndefinedValue() || v2.isUndefinedValue()) return UNDEFINED_VALUE;
+-	if (v1.isErrorValue ()    || v2.isErrorValue ())    return ERROR_VALUE;
+-
+-	// both v1 and v2 of same numerical type
+-	if (v1.isIntegerValue(i) && v2.isIntegerValue(i)) return INTEGER_VALUE;
+-	if (v1.isRealValue(r) && v2.isRealValue(r)) return REAL_VALUE;
+-
+-	// type promotions required
+-	if (v1.isIntegerValue(i) && v2.isRealValue(r))
+-		v1.setRealValue ((double)i);
+-	else
+-	if (v1.isRealValue(r) && v2.isIntegerValue(i))
+-		v2.setRealValue ((double)i);
+-
+-	return REAL_VALUE;
+-}
+diff --git a/src/.deprecate_classad.old/operators.h b/src/.deprecate_classad.old/operators.h
+deleted file mode 100644
+index 3a7cec0..0000000
+--- a/src/.deprecate_classad.old/operators.h
++++ /dev/null
+@@ -1,86 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#ifndef __OPERATORS_H__
+-#define __OPERATORS_H__
+-
+-#include "value.h"
+-
+-// kinds of operators
+-enum OpKind 
+-{
+-	__NO_OP__,				// convenience
+-
+-	__FIRST_OP__,
+-
+-    __COMPARISON_START__	= __FIRST_OP__,
+-    LESS_THAN_OP 			= __COMPARISON_START__,
+-    LESS_OR_EQUAL_OP,		// (comparison)
+-    NOT_EQUAL_OP,			// (comparison)
+-    EQUAL_OP,				// (comparison)
+-	META_EQUAL_OP,			// (comparison)
+-	META_NOT_EQUAL_OP,		// (comparison)
+-    GREATER_OR_EQUAL_OP,	// (comparison)
+-    GREATER_THAN_OP,		// (comparison)
+-	__COMPARISON_END__ 		= GREATER_THAN_OP,
+-
+-    __ARITHMETIC_START__,     
+-	UNARY_PLUS_OP 			= __ARITHMETIC_START__,
+-	UNARY_MINUS_OP,			// (arithmetic)
+-    ADDITION_OP,			// (arithmetic)
+-    SUBTRACTION_OP,			// (arithmetic)
+-    MULTIPLICATION_OP,		// (arithmetic)
+-    DIVISION_OP,			// (arithmetic)
+-    MODULUS_OP,				// (arithmetic)
+-	__ARITHMETIC_END__ 		= MODULUS_OP,
+-	
+-	__LOGIC_START__,
+-	LOGICAL_NOT_OP 			= __LOGIC_START__,
+-    LOGICAL_OR_OP,			// (logical)
+-    LOGICAL_AND_OP,			// (logical)
+-    __LOGIC_END__ 			= LOGICAL_AND_OP,
+-
+-	__BITWISE_START__,
+-	BITWISE_NOT_OP 			= __BITWISE_START__,
+-	BITWISE_OR_OP,			// (bitwise)
+-	BITWISE_XOR_OP,			// (bitwise)
+-	BITWISE_AND_OP,			// (bitwise)
+-	LEFT_SHIFT_OP,			// (bitwise)
+-	LOGICAL_RIGHT_SHIFT_OP,	// (bitwise) -- unsigned shift
+-	ARITH_RIGHT_SHIFT_OP,	// (bitwise) -- signed shift
+-	__BITWISE_END__ 		= ARITH_RIGHT_SHIFT_OP,	
+-
+-	__MISC_START__,
+-	PARENTHESES_OP 			= __MISC_START__,
+-	TERNARY_OP,				// (misc)
+-	__MISC_END__ 			= TERNARY_OP,
+-
+-	__LAST_OP__				= __MISC_END__
+-};
+-
+-
+-// table of string representations of operators; indexed by OpKind
+-extern const char *opString[];
+-
+-// public access to operation function
+-void operate (OpKind, Value &, Value &);
+-bool operateShortCircuit (OpKind, Value &, Value &);
+-void operate (OpKind, Value &, Value &, Value &);
+-
+-#endif//__OPERATORS_H__
+diff --git a/src/.deprecate_classad.old/parser.cpp b/src/.deprecate_classad.old/parser.cpp
+deleted file mode 100644
+index 3d24ff2..0000000
+--- a/src/.deprecate_classad.old/parser.cpp
++++ /dev/null
+@@ -1,759 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// parser.c
+-//
+-// Converts a string expression into an expression tree. The following function
+-// is implemented:
+-//
+-//     int Parse(const char*, ExprTree*&)
+-//
+-//******************************************************************************
+-#include "condor_common.h"
+-#include "condor_exprtype.h"
+-#include "condor_ast.h"
+-#include "condor_scanner.h"
+-#include "condor_string.h"
+-
+-Token &nextToken()
+-{
+-	static Token next_token;
+-	return next_token;
+-}
+-
+-static	int		alreadyRead;
+-
+-int ParseExpr(const char *& s, ExprTree*&, int&);
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// ReadToken() reads in a token to the global variable for parse_... functions
+-// to use. Once a token is read by this function, it can not be looked at again.
+-////////////////////////////////////////////////////////////////////////////////
+-Token* 
+-ReadToken(const char *& s)
+-{
+-    if(alreadyRead == TRUE) 
+-    {
+-		nextToken().reset();
+-        Scanner(s, nextToken());
+-    }
+-    alreadyRead = TRUE;
+-    return(&nextToken());
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// LookToken 'look at' a token without 'read' it, so that the next token that's
+-// read in is the same token. A token can be looked at for many times.
+-////////////////////////////////////////////////////////////////////////////////
+-Token* 
+-LookToken(const char *& s)
+-{
+-    if(alreadyRead == TRUE)
+-    {
+-		nextToken().reset();
+-        Scanner(s, nextToken());
+-    }
+-    alreadyRead = FALSE;
+-    return(&nextToken());
+-}
+-
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Match() reads in a token, see if its type matches the argument t. If it does,
+-// then return TRUE; Otherwise return FALSE.
+-////////////////////////////////////////////////////////////////////////////////
+-int 
+-Match(LexemeType t, const char *& s, int& count)
+-{
+-    Token*	token;
+-
+-    token = ReadToken(s);
+-    count = count + token->length;
+-    if(t == token->type)
+-    {
+-		nextToken().reset();
+-        return TRUE;
+-    }
+-	nextToken().reset();
+-    return FALSE;
+-}
+-
+-///////////////////////////////////////////////////////////////////////////////
+-// intermediate parse functions.
+-///////////////////////////////////////////////////////////////////////////////
+-
+-int
+-ParseFunction(char *functionName, const char *& s, ExprTree*& newTree, int& count)
+-{
+-	int       parse_succeeded;
+-	Token     *t;
+-	Function  *function;
+-	newTree = new Function(functionName);
+-
+-	function = (Function *) newTree;
+-
+-	t = ReadToken(s); // That's the right paren
+-	count += t->length;
+-
+-	parse_succeeded = FALSE;
+-
+-	t = LookToken(s);
+-	if (t->type == LX_RPAREN) {
+-		ReadToken(s);
+-	} else {
+-		while (1) {
+-			ExprTree *argument;
+-			if (ParseExpr(s, argument, count)) {
+-				function->AppendArgument(argument);
+-				
+-				Token *next_token;
+-				
+-				next_token = LookToken(s);
+-				if (next_token->type == LX_RPAREN) {
+-					ReadToken(s);
+-					count += next_token->length;
+-					parse_succeeded = TRUE;
+-					break;
+-				} else if (next_token->type==LX_COMMA || 
+-						   next_token->type==LX_SEMICOLON) 
+-				{
+-					ReadToken(s);
+-					count += next_token->length;
+-					continue;
+-				} else {
+-					parse_succeeded = FALSE;
+-					break;
+-				}
+-			} else {
+-				parse_succeeded = FALSE;
+-				break;
+-			}
+-		}
+-	}
+-
+-	return parse_succeeded;
+-}
+-
+-int 
+-ParseFactor(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t     = LookToken(s); // next token
+-	ExprTree	*expr = NULL;
+- 
+-    switch(t->type)
+-    {
+-        case LX_VARIABLE :
+-
+-            t = ReadToken(s);
+-
+-            newTree = new Variable(t->strVal);
+-    		count = count + t->length;
+-
+-			{
+-				Token *next_token;
+-
+-				next_token = LookToken(s);
+-				if (next_token->type == LX_LPAREN) {
+-					// Oops, we didn't really want a variable
+-					char *function_name;
+-					function_name = strnewp(((Variable *)newTree)->Name());
+-					delete newTree;
+-					newTree = NULL;
+-					ParseFunction(function_name, s, newTree, count);
+-					delete [] function_name;
+-					break;
+-				}
+-			}
+-            break;
+-
+-		case LX_UNDEFINED:
+-	
+-			t = ReadToken(s);
+-			newTree = new Undefined();
+-			count = count + t->length;
+-			break;
+-
+-		case LX_ERROR:
+-	
+-			t = ReadToken(s);
+-			newTree = new Error();
+-			count = count + t->length;
+-			break;
+-
+-        case LX_INTEGER :
+-
+-            t = ReadToken(s);
+-            newTree = new Integer(t->intVal);
+-    		count = count + t->length;
+-            break;
+-
+-        case LX_FLOAT :
+-
+-            t = ReadToken(s);
+-            newTree = new Float(t->floatVal);
+-    		count = count + t->length;
+-            break;
+-
+-        case LX_STRING :
+-
+-            t = ReadToken(s);
+-            newTree = new String(t->strVal);
+-    		count = count + t->length;
+-            break;
+-
+-	    case LX_TIME:
+-			t = ReadToken(s);
+-            newTree = new ISOTime(t->strVal);
+-    		count = count + t->length;
+-			break;
+-
+-        case LX_BOOL :
+-
+-            t = ReadToken(s);
+-            newTree = new ClassadBoolean(t->intVal);
+-    		count = count + t->length;
+-            break;
+-
+-        case LX_LPAREN :
+-
+-            Match(LX_LPAREN, s, count);
+-            if(ParseExpr(s, newTree, count)) {
+-                if(!Match(LX_RPAREN, s, count)) {
+-					return FALSE;
+-				} else {
+-					// parsed parenthesised expr correctly
+-					ExprTree *ptree = newTree;
+-					newTree = new AddOp( NULL, ptree );
+-				}
+-			} else {
+-				return FALSE;
+-			}
+-			return TRUE;
+-
+-        case LX_SUB :	// unary minus
+-
+-            Match(LX_SUB, s, count);
+-			if(ParseExpr(s, expr, count))
+-			{
+-				if( expr->MyType() == LX_INTEGER ) {
+-					newTree = new Integer( - ((IntegerBase*)expr)->Value() );
+-					delete expr;
+-					return TRUE;
+-				} else if( expr->MyType() == LX_FLOAT ) {
+-					newTree = new Float( - ((FloatBase*)expr)->Value() );
+-					delete expr;
+-					return TRUE;
+-				}
+-				newTree = new SubOp(NULL, expr);
+-				return TRUE;
+-			}
+-			else
+-			{
+-				return FALSE;
+-			}	
+-            break;
+-
+-        default :
+-
+-			// I don't know if this is correct, but this is way it was.
+-			//  --Rajesh
+-			newTree = new Error;
+-			return FALSE;
+-    }
+-
+-    return TRUE;
+-}
+-  
+-int 
+-ParseX4(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*			t       = LookToken(s);	// next token
+-    ExprTree*		subTree = NULL;
+-    ExprTree*		rArg    = NULL;
+-
+-    switch(t->type)
+-    {
+-        case LX_MULT:
+-
+-            Match(LX_MULT, s, count);
+-            if(ParseFactor(s, rArg, count))
+-			{
+-                subTree = new MultOp(lArg, rArg);
+-			}
+-			else
+-			{
+-                newTree = new MultOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_DIV :
+-
+-            Match(LX_DIV, s, count);
+-            if(ParseFactor(s, rArg, count))
+-			{
+-                subTree = new DivOp(lArg, rArg);
+-			}
+-			else
+-			{
+-                newTree = new DivOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        default :
+-
+-			newTree = lArg;
+-            return TRUE;
+-    }
+-
+-    return ParseX4(subTree, s, newTree, count);
+-}
+-
+-int 
+-ParseMultOp(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    ExprTree*	lArg = NULL;
+-
+-    if(ParseFactor(s, lArg, count))
+-    {
+-		return ParseX4(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-int 
+-ParseX3(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*			t       = LookToken(s);
+-    ExprTree*		subTree = NULL;
+-    ExprTree*		rArg    = NULL;
+-
+-    switch(t->type)
+-    {
+-        case LX_ADD :
+-
+-            Match(LX_ADD, s, count);
+-            if(ParseMultOp(s, rArg, count))
+-			{
+-                subTree = new AddOp(lArg, rArg);
+-			}
+-			else
+-			{
+-                newTree = new AddOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_SUB :
+-
+-            Match(LX_SUB, s, count);
+-            if(ParseMultOp(s, rArg, count))
+-			{
+-                subTree = new SubOp(lArg, rArg);
+-			}
+-			else
+-			{
+-                newTree = new SubOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-       default :
+-
+-			newTree = lArg;
+-            return TRUE;
+-    }
+-
+-    return ParseX3(subTree, s, newTree, count);
+-}
+-
+-int 
+-ParseAddOp(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t;
+-    ExprTree*	lArg = NULL;
+-    char*		tmp;
+-
+-    if(ParseMultOp(s, lArg, count))
+-    {
+-        return ParseX3(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-    
+-	/* Jim Pruyne added this code in 1996, but it never
+-		executed due to the return above.  Let's just
+-		be honest and comment it all out.
+-    t = LookToken(s);
+-    if(t->type == LX_VARIABLE)
+-    {
+-		tmp = t->strVal;
+-		if(!strcmp(tmp, "K") || !strcmp(tmp, "k"))
+-		{
+-			ReadToken(s);
+-			newTree->unit = 'k';
+-		}
+-		if(!strcmp(tmp, "M") || !strcmp(tmp, "m"))
+-		{
+-			ReadToken(s);
+-		}
+-    }
+-
+-    return TRUE;
+-	*/
+-}
+-
+-int 
+-ParseX2p5(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t       = LookToken(s);
+-    ExprTree*	subTree = NULL;
+-    ExprTree*	rArg    = NULL;
+-
+-    switch(t->type) {
+-        case LX_LT:
+-            Match(LX_LT, s, count);
+-            if(ParseAddOp(s, rArg, count)) {
+-				subTree = new LtOp(lArg, rArg);
+-			} else {
+-				newTree = new LtOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_LE :
+-            Match(LX_LE, s, count);
+-            if(ParseAddOp(s, rArg, count)) {
+-                subTree = new LeOp(lArg, rArg);
+-			} else {
+-                newTree = new LeOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_GT:
+-            Match(LX_GT, s, count);
+-            if(ParseAddOp(s, rArg, count)) {
+-                subTree = new GtOp(lArg, rArg);
+-			} else {
+-                newTree = new GtOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_GE :
+-            Match(LX_GE, s, count);
+-            if(ParseAddOp(s, rArg, count)) {
+-                subTree = new GeOp(lArg, rArg);
+-			} else {
+-                newTree = new GeOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        default :
+-			newTree = lArg;
+-            return TRUE;
+-    }
+-
+-    return ParseX2p5(subTree, s, newTree, count);
+-}
+-
+-
+-int 
+-ParseEqualityOp(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    ExprTree*	lArg = NULL;
+-
+-    if(ParseAddOp(s, lArg, count)) {
+-        return ParseX2p5(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-
+-int 
+-ParseX2(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t       = LookToken(s);
+-    ExprTree*	subTree = NULL;
+-    ExprTree*	rArg    = NULL;
+-
+-    switch(t->type) {
+-        case LX_META_EQ :
+-            Match(LX_META_EQ, s, count);
+-            if(ParseEqualityOp(s, rArg, count)) {
+-                subTree = new MetaEqOp(lArg, rArg);
+-			} else {
+-                newTree = new MetaEqOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_META_NEQ :
+-            Match(LX_META_NEQ, s, count);
+-            if(ParseEqualityOp(s, rArg, count)) {
+-                subTree = new MetaNeqOp(lArg, rArg);
+-			} else {
+-                newTree = new MetaNeqOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_EQ :
+-            Match(LX_EQ, s, count);
+-            if(ParseEqualityOp(s, rArg, count)) {
+-                subTree = new EqOp(lArg, rArg);
+-			} else {
+-                newTree = new EqOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        case LX_NEQ :
+-            Match(LX_NEQ, s, count);
+-            if(ParseEqualityOp(s, rArg, count)) {
+-                subTree = new NeqOp(lArg, rArg);
+-			} else {
+-                newTree = new NeqOp(lArg, rArg);
+-				return FALSE;
+-			}
+-            break;
+-
+-        default :
+-			newTree = lArg;
+-            return TRUE;
+-    }
+-
+-    return ParseX2(subTree, s, newTree, count);
+-}
+-
+-
+-int 
+-ParseSimpleExpr(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    ExprTree*	lArg = NULL;
+-
+-    if(ParseEqualityOp(s, lArg, count)) {
+-        return ParseX2(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-
+-int 
+-ParseX1p5(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t       = LookToken(s);
+-    ExprTree*	subTree = NULL;
+-    ExprTree*	rArg    = NULL;
+-
+-    if( t->type == LX_AND ) {
+-        Match(LX_AND, s, count);
+-        if(ParseSimpleExpr(s, rArg, count)) {
+-            subTree = new AndOp(lArg, rArg);
+-		} else {
+-            newTree = new AndOp(lArg, rArg);
+-			return FALSE;
+-		}
+-	} else {
+-		newTree = lArg;
+-        return TRUE;
+-    }
+-
+-    return ParseX1p5(subTree, s, newTree, count);
+-}
+-
+-
+-int 
+-ParseAndExpr(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    ExprTree*	lArg = NULL;
+-
+-    if(ParseSimpleExpr(s, lArg, count)) {
+-        return ParseX1p5(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-
+-int 
+-ParseX1(ExprTree* lArg, const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*		t       = LookToken(s);
+-    ExprTree*	subTree = NULL;
+-    ExprTree*	rArg    = NULL;
+-
+-    if( t->type == LX_OR ) {
+-        Match(LX_OR, s, count);
+-        if(ParseAndExpr(s, rArg, count)) {
+-            subTree = new OrOp(lArg, rArg);
+-		} else {
+-            newTree = new OrOp(lArg, rArg);
+-			return FALSE;
+-		}
+-	} else {
+-		newTree = lArg;
+-        return TRUE;
+-    }
+-
+-    return ParseX1(subTree, s, newTree, count);
+-}
+-
+-int 
+-ParseExpr(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    ExprTree*	lArg = NULL;
+-
+-    if(ParseAndExpr(s, lArg, count)) {
+-        return ParseX1(lArg, s, newTree, count);
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-int 
+-ParseClassAdRvalExpr(const char* s, ExprTree*& tree, int *pos)
+-{
+-	int    count;
+-	int rc = 0;
+-
+-	tree = NULL;
+-
+-	count = 0;
+-    alreadyRead = TRUE;
+-    if(ParseExpr(s, tree, count) && LookToken(s)->type == LX_EOF)
+-    {
+-		count = 0;
+-    } else if (tree != NULL) {
+-		delete tree;
+-		tree = NULL;
+-		rc = 1;
+-	}
+-	nextToken().reset();
+-	if ( pos ) {
+-		*pos = count;
+-	}
+-    return rc;
+-}
+-
+-int 
+-ParseAssignExpr(const char *& s, ExprTree*& newTree, int& count)
+-{
+-    Token*	t;
+-    ExprTree* 	lArg = NULL;
+-    ExprTree* 	rArg = NULL;
+-
+-    if(ParseExpr(s, lArg, count) && lArg->MyType() == LX_VARIABLE)
+-    {
+-		t = LookToken(s);
+-		if(t->type == LX_ASSIGN)
+-		{
+-			Match(LX_ASSIGN, s, count);
+-			if(ParseExpr(s, rArg, count))
+-			{
+-				newTree = new AssignOp(lArg, rArg);
+-				t = LookToken(s);
+-				if(t->type == LX_EOF)
+-				{
+-					return TRUE;
+-				}
+-				return FALSE;
+-			}
+-			else
+-			{
+-				newTree = new AssignOp(lArg, rArg);
+-				return FALSE;
+-			}
+-		}
+-    }
+-    newTree = lArg;
+-    return FALSE;
+-}
+-
+-int 
+-Parse(const char* s, ExprTree*& tree, int *pos)
+-{
+-	int    count;
+-    int rc = 0;
+-
+-	tree = NULL;
+-
+-	count = 0;
+-    alreadyRead = TRUE;
+-    if(ParseAssignExpr(s, tree, count))
+-    {
+-		count = 0;
+-    } else if (tree != NULL) {
+-		delete tree;
+-		tree = NULL;
+-		rc = 1;
+-	}
+-	nextToken().reset();
+-	if ( pos ) {
+-		*pos = count;
+-	}
+-    return rc;
+-}
+-
+-int Parse(const char* s, MyString& name, ExprTree*& tree, int *pos)
+-{
+-	int count = 0;
+-    int rc = 1;
+-
+-	tree = NULL;
+-
+-	count = 0;
+-    alreadyRead = TRUE;
+-
+-    Token*	t;
+-    ExprTree* 	lArg = NULL;
+-    ExprTree* 	rArg = NULL;
+-
+-    if(ParseExpr(s, lArg, count) && lArg->MyType() == LX_VARIABLE) {
+-		t = LookToken(s);
+-		if(t->type == LX_ASSIGN) {
+-			Match(LX_ASSIGN, s, count);
+-			if(ParseExpr(s, rArg, count)) {
+-				t = LookToken(s);
+-				if(t->type == LX_EOF) {
+-					name = ((Variable *)lArg)->Name();
+-					tree = rArg;
+-					rArg = NULL;
+-					rc = 0;
+-					count = 0;
+-				}
+-			}
+-		}
+-    }
+-	delete lArg;
+-	delete rArg;
+-
+-	nextToken().reset();
+-	if ( pos ) {
+-		*pos = count;
+-	}
+-    return rc;
+-}
+diff --git a/src/.deprecate_classad.old/parser_internal.h b/src/.deprecate_classad.old/parser_internal.h
+deleted file mode 100644
+index 7556875..0000000
+--- a/src/.deprecate_classad.old/parser_internal.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// parser.h
+-//
+-// Parse() converts a string expression into an expression tree. If an error
+-// is encountered, the partially parsed tree is preserved and the number of
+-// characters parsed is returned; Otherwise 0 is returned.
+-//
+-//******************************************************************************
+-
+-#ifndef _PARSER_INTERNAL_H
+-#define _PARSER_INTERVAL_H
+-
+-#include "condor_ast.h"
+-
+-// This is an internal-only parsing function.
+-
+-// Parse an assignment expression, i.e. variable = expression
+-// On success, 0 is returned and tree is set to the resulting ExprTree.
+-// On failure, non-0 is returned, tree is set to NULL, and if pos is
+-// non-NULL, the location it points to is set to the position at which
+-// the error occurred.
+-int Parse(const char*s, ExprTree*&tree, int *pos = NULL);
+-
+-#endif
+diff --git a/src/.deprecate_classad.old/registration.cpp b/src/.deprecate_classad.old/registration.cpp
+deleted file mode 100644
+index 0eff014..0000000
+--- a/src/.deprecate_classad.old/registration.cpp
++++ /dev/null
+@@ -1,124 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//
+-// registration.C : 
+-//
+-//   implementation file for the Registration class.
+-//
+-//   Written by Wei Chen & Taxiao Wang, Fall 1995
+-//
+-
+-#include "condor_common.h"
+-#include "condor_registration.h"
+-#include "condor_debug.h"
+-
+-//
+-// Constructor of the Registration class.
+-//
+-Registration::Registration(int size)
+-{
+-    regiTableSize = size;
+-    regiNumber = 0;
+-    regiTable = new char*[size];
+-    if(regiTable == NULL)
+-    {
+-        EXCEPT("Warning : you ran out of memory -- quitting !");
+-    }
+-    for(int i=0; i < size; i++)
+-    {
+-        regiTable[i] = NULL;
+-    }
+-}
+-
+-//
+-// Destructor of Registration class.
+-//
+-Registration::~Registration()
+-{
+-    for(int i=0; i<regiNumber; i++)
+-    {
+-        delete []regiTable[i];
+-    }
+-    delete []regiTable;
+-}
+-
+-//
+-// This number fucntion of Registration class registers a (new) type of a
+-// ClassAd instance. If the type is already registered, its associated type
+-// number, which is the index number of that type in the registration table,
+-// is returned. Otherwise, it's registered and an associated type number is
+-// assigned and returned. 
+-//
+-// The type is case-insensitive.
+-//
+-int Registration::RegisterType(const char *type)
+-{
+-    for(int i=0; i<regiNumber; i++)
+-    {
+-        if(!strcasecmp(regiTable[i], type))
+-        {
+-            return i;                      // type previously registered.
+-        }
+-    }
+-                                           // this is a new type.
+-    if(regiNumber >= regiTableSize)
+-    {                                      // table is full, reallocation
+-		int i;
+-        int tempSize = 2 * regiTableSize;  // necessary. 
+-		char **tmp = NULL;
+-
+-		/* This code mimics a realloc, but for new'ed memory */
+-
+-		/* make a new array of the desired size */
+-		tmp = new char*[tempSize];
+-        if(tmp == NULL) {
+-            EXCEPT("Registration::RegisterType(): out of memory!");
+-        }
+-
+-		/* copy the known bits over */
+-        for(i=0; i<regiTableSize; i++) {
+-			tmp[i] = regiTable[i];
+-		}
+-
+-		/* initialize the rest to NULL */
+-        for(i=regiTableSize; i<tempSize; i++) {
+-			tmp[i] = NULL;
+-		}
+-
+-		/* delete the old array and move the pointer */
+-		regiTableSize = tempSize;
+-		delete [] regiTable;
+-		regiTable = tmp;
+-    }
+-  
+-    regiTable[regiNumber] = new char[strlen(type)+1];
+-    if(regiTable[regiNumber] == NULL)
+-    {
+-		EXCEPT("Registration::RegisterType(): out of memory!");
+-    }
+-    strcpy(regiTable[regiNumber], type);
+-    regiNumber++;
+-    return (regiNumber-1);                 // new type number.
+-}
+-
+-
+-
+-
+-
+diff --git a/src/.deprecate_classad.old/scanner.cpp b/src/.deprecate_classad.old/scanner.cpp
+deleted file mode 100644
+index c70594c..0000000
+--- a/src/.deprecate_classad.old/scanner.cpp
++++ /dev/null
+@@ -1,841 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// scanner.C
+-//
+-// scanner() is used by parser to return the elements of an expression one at
+-// a time.
+-// 
+-//******************************************************************************
+-
+-#include "condor_common.h"
+-#include "condor_exprtype.h"
+-#include "condor_scanner.h" 
+-
+-#ifdef USE_NEW_SCANNER
+-struct keywords
+-{
+-	char        *keyword;       // the text of the keyword we'll be matching against
+-	int         keyword_length; // the strlen of keyword
+-	LexemeType  type;           // the token type we should produce when scanning the keyword
+-	int         int_value;      // what we should use as the integer value.
+-};
+-
+-#define NUMBER_OF_KEYWORDS (sizeof(keywords) / sizeof(struct keywords))
+-const struct keywords keywords[] = 
+-{
+-	{"ERROR",     5, LX_ERROR,     0},
+-	{"UNDEFINED", 9, LX_UNDEFINED, 0},
+-	{"TRUE",      4, LX_BOOL,      1},
+-	{"T",         1, LX_BOOL,      1},
+-	{"FALSE",     5, LX_BOOL,      0},
+-	{"F",         1, LX_BOOL,      0}
+-};
+-
+-/* This funky hash table is used to reduce overhead in scan_keyword()
+-   when the input identifier can't possibly be a keyword.
+-*/
+-class _KeywordHash {
+-public:
+-	_KeywordHash() {
+-		int k;
+-			// mark all characters 1
+-		memset(keyword_hash,1,sizeof(keyword_hash));
+-			// mark all first characters of keywords 0 (both upper and lower)
+-		for(k=NUMBER_OF_KEYWORDS; k--; ) {
+-			char ch = keywords[k].keyword[0];
+-			keyword_hash[(unsigned char)tolower(ch)] = 0;
+-			keyword_hash[(unsigned char)toupper(ch)] = 0;
+-		}
+-	}
+-	inline bool notAKeyword(const char *str) {
+-		return keyword_hash[*(unsigned char *)str];
+-	}
+-private:
+-	char keyword_hash[256];
+-} KeywordHash;
+-
+-static bool scan_keyword(const char *&input, Token &token);
+-static void scan_variable(const char *&input, Token &token);
+-static void scan_number(const char *&input, Token &token);
+-static void scan_string(const char *&input, Token &token);
+-static void scan_time(const char *&input, Token  &token);
+-static void scan_operator(const char *&input, Token &token);
+-#endif
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Implementation of class Token
+-////////////////////////////////////////////////////////////////////////////////
+-
+-Token::Token()
+-{
+-#ifdef USE_NEW_SCANNER
+-	strVal = (char *) malloc(1025);
+-	strValLength = 1024;
+-#endif
+-	reset();
+-}
+-
+-Token::~Token()
+-{
+-#ifdef USE_NEW_SCANNER
+-	if (strVal != NULL) {
+-		free(strVal);
+-	}
+-	strValLength = 0;
+-#endif
+-}
+-
+-void
+-Token::reset()
+-{
+-	length = 0;
+-	type = NOT_KEYWORD;
+-	floatVal = 0.0;
+-	intVal = 0;
+-
+-	strVal[0] = '\0';
+-	isString = FALSE;
+-}
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// This function reads input from a string, returns a token;
+-////////////////////////////////////////////////////////////////////////////////
+-
+-#ifdef USE_NEW_SCANNER 
+-
+-void Scanner(const char *& input, Token& token)
+-{ 
+-    // skip white space
+-    token.length = 0;
+-    while (isspace(*input)) {
+-        input++;
+-		token.length++;
+-    }
+-
+-    if (isalpha(*input) || *input == '_' || *input == '.' ) {
+-		if (!scan_keyword(input, token)) {
+-			scan_variable(input, token);
+-			token.isString = TRUE; // scan_variable is not a friend, can't set this
+-		}
+-	} else if (isdigit(*input)) {
+-		scan_number(input, token);
+-	} else if (*input == '"') {
+-		scan_string(input, token);
+-		token.isString = TRUE; // scan_string is not a friend, can't set this
+-	} else if (*input == '\'') { 
+-		scan_time(input, token);
+-		token.isString = TRUE;
+-	} else {
+-		scan_operator(input, token);
+-	}
+-	return;
+-}
+-
+-static bool scan_keyword(
+-    const char   *&input,
+-	Token  &token)
+-{
+-	int  keyword_index;
+-	bool is_keyword;
+-
+-	if( KeywordHash.notAKeyword(input) ) {
+-		return false;
+-	}
+-		// might still not be a keyword, but at least there is a chance...
+-
+-	is_keyword = false;
+-	
+-	for(keyword_index = 0; keyword_index < (int) NUMBER_OF_KEYWORDS; keyword_index++) {
+-		const struct keywords *keyword;
+-		
+-		keyword = &(keywords[keyword_index]);
+-		if (!strncasecmp(input, keyword->keyword, keyword->keyword_length)
+-			&& !isalpha(*(input + keyword->keyword_length))
+-			&& !isdigit(*(input + keyword->keyword_length))
+-			&& *(input + keyword->keyword_length) != '_') {
+-
+-			input        += keyword->keyword_length;
+-			token.length += keyword->keyword_length;
+-			token.type    = keyword->type;
+-			token.intVal  = keyword->int_value;
+-			
+-			is_keyword = true;
+-			break;
+-		}
+-	}
+-	return is_keyword;
+-}
+-
+-static void scan_variable(
+-    const char   *&input,
+-    Token  &token)
+-{
+-	int  variable_length;
+-	const char *s;
+-
+-	variable_length = 0;
+-	s = input;
+-	
+-	// First, we count how many characters the variable is. 
+-	while (isalnum(*s) || *s == '_' || *s == '.') {
+-		variable_length++;
+-		s++;
+-	}
+-
+-	// Then we make sure we have space to store it.
+-	if (variable_length > token.strValLength) {
+-		free(token.strVal);
+-		token.strVal = (char *) malloc(variable_length + 1);
+-		token.strValLength = variable_length;
+-	}
+-
+-	// Finally, we copy the variable. 
+-	strncpy(token.strVal, input, variable_length);
+-	token.strVal[variable_length] = 0;
+-
+-	input          += variable_length;
+-	token.length   += variable_length;
+-	token.type      = LX_VARIABLE;
+-
+-	//token.isString  = TRUE;
+-	return;
+-}
+-
+-static void scan_number(
+-    const char   *&input,
+-	Token  &token)
+-{
+-	const char *digit_text;
+-
+-	digit_text = input;
+-
+-	// Count how long the number is
+-	while(isdigit(*digit_text)) {
+-		digit_text++;
+-		token.length++;
+-	}
+-
+-	// Check if it's a floating point value
+-	if(*digit_text == '.') {
+-		token.length++;
+-		
+-		// It is a float, so count the fractional digits as well.
+-		for(digit_text++; isdigit(*digit_text); digit_text++) {
+-			token.length++;
+-		}
+-
+-		// Convert the float
+-		token.floatVal = (float) strtod(input, (char **)&input);
+-		token.type = LX_FLOAT; 
+-	} else {
+-		// It's just a plain integer
+-		token.intVal = strtol(input, (char **)&input, 10);
+-		token.type = LX_INTEGER; 
+-	}
+-	return;
+-}
+-
+-static void scan_string(
+-    const char   *&input,
+-	Token  &token)
+-{
+-
+-	int   string_length;
+-	const char *s;
+-
+-	// skip the initial quote mark 
+-	input++;
+-	token.length++;
+-
+-	s = input;
+-	string_length = 0;
+-
+-	// First count the length of the string. 
+-	while (*s != '"' && *s != '\0') {
+-		// These quoting rules are basically wrong.
+-		// However, they are required for backwards compatibility.
+-		// A quote may be escaped with a backslash.
+-		// Backslash does not escape any other character.
+-		// Exception: \" at the end of a string or a line is a backslash, not a quote.
+-		if(*s == '\\' && *(s+1) == '"' && *(s+2) != '\0' && *(s+2) != '\n' && *(s+2) != '\r' ) {
+-			s++;
+-			if(!*s) break;
+-		}
+-		s++;
+-		string_length++;
+-	}
+-
+-	// Check if the string is not properly terminated with a quote mark. 
+-	if (*s == '\0') {
+-		token.type = LX_ERROR;
+-		token.length = 0;			 
+-	} else {
+-		// Make sure we have space to store the string.
+-		if (string_length > token.strValLength) {
+-			free(token.strVal);
+-			token.strVal = (char *) malloc(string_length + 1);
+-			token.strValLength = string_length;
+-		}
+-
+-		// Copy the string. Because of escaped quotes, we have to 
+-		// copy the string without the benefit of strncpy
+-		char *dest;
+-		dest = token.strVal;
+-        while(*input != '"' && *input != '\0')
+-		{
+-			// See explanation above.
+-	                if(*input == '\\' && *(input+1) == '"' && *(input+2) != '\0' && *(input+2) != '\n' && *(input+2) != '\r' ) {
+-				input++;
+-				token.length++; 
+-			} 
+-			*dest = *input;
+-			input++;
+-            dest++;
+-			token.length++;
+-        }
+-
+-		token.strVal[string_length] = 0;
+-
+-		// Update our tracking.
+-		input++;        // for the final quote
+-		token.length++; // for the final quote
+-		token.type = LX_STRING;
+-	}
+-	return;
+-}
+-
+-// We can time, which is just a string.
+-static void scan_time(
+-    const char   *&input,
+-	Token  &token)
+-{
+-	int   string_length;
+-	const char *s;
+-
+-	// skip the initial quote mark 
+-	input++;
+-	token.length++;
+-
+-	s = input;
+-	string_length = 0;
+-
+-	// First count the length of the string. 
+-	while (*s != '\'' && *s != '\0') {
+-		s++;
+-		string_length++;
+-	}
+-
+-	// Check if the string is not properly terminated with a quote mark. 
+-	if (*s == '\0') {
+-		token.type = LX_ERROR;
+-		token.length = 0;			 
+-	} else {
+-		// Make sure we have space to store the string.
+-		if (string_length > token.strValLength) {
+-			free(token.strVal);
+-			token.strVal = (char *) malloc(string_length + 1);
+-			token.strValLength = string_length;
+-		}
+-
+-		// Copy the string.
+-		char *dest;
+-		dest = token.strVal;
+-        while(*input != '\'' && *input != '\0')
+-		{
+-			*dest = *input;
+-			input++;
+-            dest++;
+-			token.length++;
+-        }
+-
+-		token.strVal[string_length] = 0;
+-
+-		// Update our tracking.
+-		input++;        // for the final quote
+-		token.length++; // for the final quote
+-		token.type = LX_TIME;
+-	}
+-	return;
+-}
+-
+-static void scan_operator(
+-    const char   *&input,
+-    Token  &token)
+-{
+-	switch(*input) {
+-	case '(': 
+-		token.type = LX_LPAREN;
+-		input = input + 1;
+-		token.length++;
+-		break; 
+-		
+-	case ')': 
+-		token.type = LX_RPAREN;
+-		input = input + 1;
+-		token.length++;
+-		break; 
+-
+-	case '+': 
+-		token.type = LX_ADD;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-
+-	case '-': 
+-		token.type = LX_SUB;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-
+-	case '*': 
+-		token.type = LX_MULT;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-		
+-	case '/': 
+-		token.type = LX_DIV;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-		
+-	case '<': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '=') {
+-			input = input + 1;
+-			token.length++;
+-			token.type = LX_LE;
+-		} else {
+-			token.type = LX_LT; 
+-		}
+-		break; 
+-		
+-	case '>': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '=') {
+-			input = input + 1;
+-			token.length++;
+-			token.type = LX_GE; 
+-		} else {
+-			token.type = LX_GT; 
+-		}
+-		break; 
+-		
+-	case '&': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '&') {
+-			token.type = LX_AND;
+-			input = input + 1;
+-			token.length++;
+-		} else {
+-			token.type = LX_ERROR;
+-		}
+-		break;
+-
+-	case '|': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '|') {
+-			token.type = LX_OR;
+-			input = input + 1;
+-		} else {
+-			token.type = LX_ERROR;
+-		}
+-		break;
+-
+-	case '\0':
+-	case '\n': 
+-		token.type = LX_EOF;
+-		break;
+-
+-	case '!': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '=') {
+-			token.type = LX_NEQ;
+-			input = input + 1;
+-			token.length++;
+-		} else {
+-			token.type = LX_ERROR;
+-		}
+-		break;
+-		
+-	case '=': 
+-		input = input + 1;
+-		token.length++;
+-		if(*input == '=') {
+-			token.type = LX_EQ;
+-			input = input + 1;
+-			token.length++;
+-		} else if (*input == '?' && *(input+1) == '=') {
+-			token.type = LX_META_EQ;
+-			input = input + 2;
+-			token.length += 2;
+-		} else if (*input == '!' && *(input+1) == '=') {
+-			token.type = LX_META_NEQ;
+-			input = input + 2;
+-			token.length += 2;
+-		} else {
+-			token.type = LX_ASSIGN;
+-		}
+-		break;
+-
+-	case '$': 
+-		token.type = LX_MACRO;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-
+-	case ',':
+-		token.type = LX_COMMA;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-
+-	case ';':
+-		token.type = LX_SEMICOLON;
+-		input = input + 1;
+-		token.length++;
+-		break;
+-			
+-	default:
+-		token.type = LX_ERROR;
+-		break;
+-	}
+-	return;
+-}
+-
+-#else /* USE_NEW_SCANNER is not defined */
+-void Scanner(const char *& s, Token& t)
+-{ 
+-    char	str[MAXVARNAME];
+-    char	*tmp;		// working variables
+-
+-    // skip white space
+-    t.length = 0;
+-    while(isspace(*s))
+-    {
+-        s = s + 1;
+-		t.length++;
+-    }
+-
+-	tmp = str;
+-
+-    if(isalpha(*s) || *s == '_' || *s=='.' ) 
+-	{
+-		// first check for keywords
+-
+-		switch (*s) {
+-
+-		case 'e':
+-		case 'E':
+-			if(!strncasecmp(s, "ERROR", 5) && !isalpha(*(s+5)) && *(s+5) != '_')
+-			{
+-				s = s + 5;
+-				t.length = t.length + 5;
+-				t.type = LX_ERROR;
+-				return;
+-			}
+-			break;
+-
+-		case 'u':
+-		case 'U':
+-			if(!strncasecmp(s, "UNDEFINED", 9) && !isalpha(*(s+9)) && *(s+9) != '_')
+-			{
+-				s = s + 9;
+-				t.length = t.length + 9;
+-				t.type = LX_UNDEFINED;
+-				return;
+-			}
+-			break;
+-
+-		case 'T':
+-		case 't':
+-			if(!strncasecmp(s, "TRUE", 4) && !isalpha(*(s+4)) && *(s+4) != '_')
+-			// TRUE
+-			{
+-				s = s + 4;
+-				t.length = t.length + 4;
+-				t.intVal = 1;
+-				t.type = LX_BOOL;
+-				return;
+-			}
+-			if(!strncasecmp(s, "T", 1) && !isalpha(*(s+1)) && *(s+1) != '_')
+-			// also TRUE
+-			{
+-				s = s + 1;
+-				t.length = t.length + 1;
+-				t.intVal = 1;
+-				t.type = LX_BOOL;
+-				return;
+-			}
+-			break;
+-
+-		case 'f':
+-		case 'F':
+-			if(!strncasecmp(s, "FALSE", 5) && !isalpha(*(s+5)) && *(s+5) != '_')
+-			// FALSE
+-			{
+-				s = s + 5;
+-				t.length = t.length + 5;
+-				t.intVal = 0;
+-				t.type = LX_BOOL;
+-				return;
+-			}
+-			if(!strncasecmp(s, "F", 1) && !isalpha(*(s+1)) && *(s+1) != '_')
+-			// also FALSE
+-			{
+-				s = s + 1;
+-				t.length = t.length + 1;
+-				t.intVal = 0;
+-				t.type = LX_BOOL;
+-				return;
+-			}
+-			break;
+-		}	// end of switch on first letter
+-
+-		// read in the rest of the variable.
+-        while(isalnum(*s) || *s == '_' || *s == '.' )
+-		{ 
+-			*tmp = *s;
+-			s++;
+-            tmp++;
+-			t.length++;
+-        }
+-        *tmp = '\0';
+-		strcpy(t.strVal, str);
+-        t.type = LX_VARIABLE;
+-		t.isString = TRUE;
+-		return;
+-    }
+-    
+-	if(isdigit(*s))
+-    // token is an integer or a floating point number
+-    {
+-		// count the length of the number
+-        tmp = s;
+-        while(isdigit(*tmp))
+-		{
+-			tmp++;
+-			t.length++;
+-		}
+-        if(*tmp == '.')
+-        // token is a floating point number
+-        {
+-			t.length++;
+-			for(tmp++; isdigit(*tmp); tmp++) t.length++;
+-            t.floatVal = (float)strtod(s, &s);
+-            t.type = LX_FLOAT; 
+-        }
+-		else
+-		// token is an integer number
+-		{
+-            t.intVal = strtol(s, &s, 10);
+-            t.type = LX_INTEGER; 
+-        }
+-		return;
+-    }
+-
+-    if(*s == '"')
+-    // token is a string
+-    {
+-        s++;
+-		char tmp2[ATTRLIST_MAX_EXPRESSION];		
+-		tmp = tmp2;
+-		t.length++;
+-        while(*s != '"' && *s != '\0')
+-		{
+-			// note: short-circuit evaluation will prevent SEGV if we're 
+-			// at the end of the string in below conditional.
+-			// make certain s+2 != \0 so that on NT we can have strings
+-			// that are pathnames that end with a '\'.
+-			if(*s == '\\' && *(s+1) == '"' && *(s+2) != '\0')
+-			{
+-				s++;
+-				t.length++; 
+-			} 
+-			*tmp = *s;
+-			s++;
+-            tmp++;
+-			t.length++;
+-        }
+-        if(*s == '\0')
+-		{
+-			 t.type = LX_ERROR;
+-			 t.length = 0;			 
+-			 return;
+-		}
+-        s++;
+-		t.length++;
+-        *tmp = '\0';
+-		strcpy(t.strVal, tmp2);
+-        t.type = LX_STRING; 
+-		t.isString = TRUE;
+-		return;
+-    }
+-
+-    // token is an operator or a unit
+-	switch(*s)
+-	{
+-		case '(': t.type = LX_LPAREN;
+-			   s = s + 1;
+-			   t.length++;
+-			   break; 
+-
+-		case ')': t.type = LX_RPAREN;
+-			   s = s + 1;
+-			   t.length++;
+-			   break; 
+-
+-		case '+': t.type = LX_ADD;
+-			   s = s + 1;
+-			   t.length++;
+-			   break;
+-
+-		case '-': t.type = LX_SUB;
+-			   s = s + 1;
+-			   t.length++;
+-			   break;
+-
+-		case '*': t.type = LX_MULT;
+-			   s = s + 1;
+-			   t.length++;
+-			   break;
+-
+-		case '/': t.type = LX_DIV;
+-			   s = s + 1;
+-			   t.length++;
+-			   break;
+-
+-		case '<': s = s + 1;
+-			   t.length++;
+-			   if(*s == '=')
+-			   {
+-				   s = s + 1;
+-				   t.length++;
+-				   t.type = LX_LE;
+-			   }
+-			   else
+-			   {
+-				   t.type = LX_LT; 
+-			   }
+-			   break; 
+-
+-		case '>': s = s + 1;
+-			   t.length++;
+-			   if(*s == '=')
+-			   {
+-				   s = s + 1;
+-				   t.length++;
+-				   t.type = LX_GE; 
+-			   }
+-			   else 
+-			   {
+-				   t.type = LX_GT; 
+-			   }
+-			   break; 
+-
+-		case '&': s = s + 1;
+-			   t.length++;
+-			   if(*s == '&')
+-			   {
+-				   t.type = LX_AND;
+-				   s = s + 1;
+-				   t.length++;
+-			   }
+-			   else
+-			   {
+-				   t.type = LX_ERROR;
+-			   }
+-			   break;
+-
+-		case '|': s = s + 1;
+-			   t.length++;
+-			   if(*s == '|')
+-			   {
+-					t.type = LX_OR;
+-					s = s + 1;
+-			   }
+-			   else
+-			   {
+-				   t.type = LX_ERROR;
+-			   }
+-			   break;
+-
+-		case '\0':
+-		case '\n': t.type = LX_EOF;
+-				break;
+-
+-		case '!': s = s + 1;
+-			   t.length++;
+-			   if(*s == '=')
+-			   {
+-				   t.type = LX_NEQ;
+-				   s = s + 1;
+-				   t.length++;
+-			   }
+-			   else
+-			   {
+-				   t.type = LX_ERROR;
+-			   }
+-			   break;
+-
+-		case '=': s = s + 1;
+-			   t.length++;
+-			   if(*s == '=')
+-			   {
+-				   t.type = LX_EQ;
+-				   s = s + 1;
+-				   t.length++;
+-			   }
+-			   else
+-			   if (*s == '?' && *(s+1) == '=')
+-			   {
+-					t.type = LX_META_EQ;
+-					s = s + 2;
+-					t.length += 2;
+-			   }
+-			   else
+-			   if (*s == '!' && *(s+1) == '=')
+-			   {
+-					t.type = LX_META_NEQ;
+-					s = s + 2;
+-					t.length += 2;
+-			   }
+-			   else
+-			   {
+-				   t.type = LX_ASSIGN;
+-			   }
+-			   break;
+-
+-		case '$': t.type = LX_MACRO;
+-			   s = s + 1;
+-			   t.length++;
+-			   break;
+-
+-		default:	t.type = LX_ERROR;
+-					break;
+-	} 
+-}
+-#endif /* USE_EXTENSIBLE_ARRAY is not defined */
+diff --git a/src/.deprecate_classad.old/scriptfloat b/src/.deprecate_classad.old/scriptfloat
+deleted file mode 100755
+index db1f562..0000000
+--- a/src/.deprecate_classad.old/scriptfloat
++++ /dev/null
+@@ -1,21 +0,0 @@
+-#!/bin/sh
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-echo 1.2
+diff --git a/src/.deprecate_classad.old/scriptinteger b/src/.deprecate_classad.old/scriptinteger
+deleted file mode 100755
+index 56d75d7..0000000
+--- a/src/.deprecate_classad.old/scriptinteger
++++ /dev/null
+@@ -1,21 +0,0 @@
+-#!/bin/sh
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-echo 10
+diff --git a/src/.deprecate_classad.old/scriptstring b/src/.deprecate_classad.old/scriptstring
+deleted file mode 100755
+index 1a60f48..0000000
+--- a/src/.deprecate_classad.old/scriptstring
++++ /dev/null
+@@ -1,21 +0,0 @@
+-#!/bin/sh
+-##**************************************************************
+-##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+-## University of Wisconsin-Madison, WI.
+-## 
+-## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+-## 
+-## Unless required by applicable law or agreed to in writing, software
+-## distributed under the License is distributed on an "AS IS" BASIS,
+-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-## See the License for the specific language governing permissions and
+-## limitations under the License.
+-##
+-##**************************************************************
+-
+-echo One day we will have new ClassAds.
+diff --git a/src/.deprecate_classad.old/shared.cpp b/src/.deprecate_classad.old/shared.cpp
+deleted file mode 100644
+index 6b3eb18..0000000
+--- a/src/.deprecate_classad.old/shared.cpp
++++ /dev/null
+@@ -1,86 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#include "classad_shared.h"
+-
+-extern "C" 
+-{
+-
+-	void sharedstring(const int number_of_arguments,
+-					  const ClassAdSharedValue *arguments,
+-					  ClassAdSharedValue *result)
+-	{
+-		char *value = new char[128];
+-
+-		strcpy(value, "Alain is a doofus");
+-
+-		result->type = ClassAdSharedType_String;
+-		result->text = value;
+-
+-		return;
+-	}
+-
+-	void sharedfloat(const int number_of_arguments,
+-					 const ClassAdSharedValue *arguments,
+-					 ClassAdSharedValue *result)
+-	{
+-		if (number_of_arguments != 1
+-			|| arguments == NULL
+-			|| result == NULL
+-	        || (arguments[0].type != ClassAdSharedType_Integer
+-				&& arguments[0].type != ClassAdSharedType_Float)) {
+-			result->type = ClassAdSharedType_Error;
+-		} else {
+-			if (arguments[0].type == ClassAdSharedType_Integer) {
+-				result->real = (float) (arguments[0].integer * arguments[0].integer);
+-			} else {
+-				result->real = (float) (arguments[0].real    * arguments[0].real);
+-			}
+-			result->type = ClassAdSharedType_Float;
+-
+-		}
+-		return;
+-	}
+-
+-	void sharedinteger(const int number_of_arguments,
+-					   const ClassAdSharedValue *arguments,
+-					   ClassAdSharedValue *result)
+-	{
+-		if (number_of_arguments != 1
+-			|| arguments == NULL
+-			|| result == NULL
+-	        || (arguments[0].type != ClassAdSharedType_Integer
+-				&& arguments[0].type != ClassAdSharedType_Float)) {
+-			result->type = ClassAdSharedType_Error;
+-		} else {
+-			if (arguments[0].type == ClassAdSharedType_Integer) {
+-				result->integer = (int) (arguments[0].integer * arguments[0].integer);
+-			} else {
+-				result->integer = (int) (arguments[0].real    * arguments[0].real);
+-			}
+-			result->type = ClassAdSharedType_Integer;
+-		}
+-		return;
+-	}
+-
+-}
+diff --git a/src/.deprecate_classad.old/test.cpp b/src/.deprecate_classad.old/test.cpp
+deleted file mode 100644
+index 846a9fc..0000000
+--- a/src/.deprecate_classad.old/test.cpp
++++ /dev/null
+@@ -1,51 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "condor_classad.h"
+-#include "condor_config.h"
+-
+-ClassAd a;
+-ClassAd b;
+-
+-extern "C" int SetSyscalls() { return 0; }
+-
+-int main (void)
+-{
+-	EvalResult 	r;
+-	ExprTree   	*t;
+-	char		buffer[1024];
+-	char		buf[2048];
+-
+-	config();
+-	while( strcmp( gets( buffer ) , "done" ) != 0 ) {
+-		buf[0] = '\0';
+-		if (ParseClassAdRvalExpr (buffer, t)) {
+-			cerr << "Parse error" << endl;
+-			exit( 1 );
+-		}
+-		t->PrintToStr( buf );
+-		puts( buf );
+-		t->EvalTree((ClassAd*)NULL,(ClassAd*)NULL,&r);
+-		r.fPrintResult(stdout);
+-		printf("\n");
+-	}
+-		
+-	return 0;
+-}
+diff --git a/src/.deprecate_classad.old/test_classads.cpp b/src/.deprecate_classad.old/test_classads.cpp
+deleted file mode 100644
+index 41d5d3f..0000000
+--- a/src/.deprecate_classad.old/test_classads.cpp
++++ /dev/null
+@@ -1,4722 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-
+-#include "condor_common.h"
+-#include "condor_classad.h"
+-#include "condor_xml_classads.h"
+-#include "stringSpace.h"
+-#include "condor_scanner.h" 
+-#include "iso_dates.h"
+-#define HAVE_DLOPEN 1
+-#ifdef HAVE_DLOPEN // Used to be CLASSAD_FUNCTIONS
+-#include "condor_config.h"
+-#endif
+-
+-/*----------------------------------------------------------
+- *
+- *                        Global Variables
+- *
+- *----------------------------------------------------------*/
+-
+-#define LARGE_NUMBER_OF_CLASSADS 10000
+-
+-extern StringSpace classad_string_space; // for debugging only!
+-
+-#define NUMBER_OF_CLASSAD_STRINGS (sizeof(classad_strings)/sizeof(char *))
+-char *classad_strings[] = 
+-{
+-#ifdef HAVE_DLOPEN
+-	"A = 1\n B=2\n C = 3\n D='2001-04-05T12:14:15'\n G=GetTime(1)\n H=foo(1)",
+-#else
+-	"A = 1\n B=2\n C = 3\n D='2001-04-05T12:14:15'\n E=TRUE",
+-#endif
+-	"A = 0.7\n B=2\n C = 3\n D = \"alain\"\n MyType=\"foo\"\n TargetType=\"blah\"",
+-
+-	"Rank = (Memory >= 50)",
+-
+-    "Env = \"CPUTYPE=i86pc;GROUP=unknown;LM_LICENSE_FILE=/p/multifacet/"
+-            "projects/simics/dist10/v9-sol7-gcc/sys/flexlm/license.dat;"
+-            "SIMICS_HOME=.;SIMICS_EXTRA_LIB=./modules;PYTHONPATH=./modules;"
+-            "MACHTYPE=i386;SHELL=/bin/tcsh;PATH=/s/std/bin:/usr/afsws/bin:"
+-        	"/usr/ccs/bin:/usr/ucb:/bin:/usr/bin:/usr/X11R6/bin:/unsup/condor/bin:.\"",
+-
+-    "MyType=\"Job\"\n TargetType=\"Machine\"\n Owner = \"alain\"\n Requirements = (TARGET.Memory > 50)",
+-    "MyType=\"Machine\"\n TargetType=\"Job\"\n Memory = 100\n  Requirements = (TARGET.owner == \"alain\")",
+-    "MyType=\"Machine\"\n TargetType=\"Job\"\n Memory = 40\n Requirements = (TARGET.owner == \"alain\")",
+-    "MyType=\"Machine\"\n TargetType=\"Job\"\n Memory = 100\n Requirements = (TARGET.owner != \"alain\")",
+-
+-	// A classad to test PrintToNewStr()--we need to ensure everything
+-	// we can print is properly accounted for. 
+-	"Requirements = (a > 3) && (b >= 1.3) && (c < MY.rank) && ((d <= TARGET.RANK) "
+-    "|| (g == \"alain\") || (g != \"roy\") || (h =?= 5) || (i =!= 6)) "
+-    "&& ((a + b) < (c-d)) && ((e * f) > (g / h)) && x == false && y == true "
+-    "&& z == f && j == t",
+-
+-	/* Some classads to test GetReferences() 
+-	 * The first one is simple, but we can also check that things aren't listed twice. */
+-	"Memory = 60\n Disk = 40\n OS = Linux\n X = 4\n Requirements = ((ImageSize > Memory) "
+-	"&& (AvailableDisk > Disk) && (AvailableDisk > Memory) && (ImageSize > Disk)) "
+-    "&& foo(X; XX)",
+-	/* The second one is to test MY and TARGET. */
+-	"Memory = 60\n Disk = 40\n OS = Linux\n Requirements = ((TARGET.ImageSize > MY.Memory) "
+-	"&& (AvailableDisk > Disk) && (TARGET.AvailableDisk > MY.Memory) && (TARGET.ImageSize > MY.Disk)) "
+-    "&& foo(TARGET.X; TARGET.XX)",
+-
+-	/* Test case sensitivity */
+-	"DoesMatch = \"Bone Machine\" == \"bone machine\" && \"a\" =?= \"a\" && \"a\" =!= \"A\"\n"
+-	"DoesntMatch = \"a\" =?= \"A\"",
+-
+-    /* Test XML preservation of spaces */
+-    "A = \"\"\n B=\" \""
+-};
+-
+-/*----------------------------------------------------------
+- *
+- *                     Private Datatypes
+- *
+- *----------------------------------------------------------*/
+-struct parameters
+-{
+-	bool verbose;
+-	bool test_scanner;
+-	bool test_copy_constructor;
+-	bool test_assignment;
+-	bool test_classads;
+-	bool test_references;
+-	bool test_xml;
+-	bool test_dirty;
+-	bool test_functions;
+-    bool test_random;
+-};
+-
+-class TestResults
+-{
+-public:
+-	TestResults()
+-	{
+-		number_of_tests        = 0;
+-		number_of_tests_passed = 0;
+-		number_of_tests_failed = 0;
+-		return;
+-	};
+-
+-	~TestResults()
+-	{
+-		return;
+-	}
+-
+-	void AddResult(bool passed)
+-	{
+-		number_of_tests++;
+-		if (passed) {
+-			number_of_tests_passed++;
+-		} else {
+-			number_of_tests_failed++;
+-		}
+-		return;
+-	}
+-
+-	int GetNumberFailed(void)
+-	{
+-		return(number_of_tests_failed);
+-	}
+-
+-	void PrintResults(void)
+-	{
+-		printf("%d of %d tests passed.\n", number_of_tests_passed, number_of_tests);
+-		return;
+-	}
+-
+-private:
+-	int number_of_tests;
+-	int number_of_tests_passed;
+-	int number_of_tests_failed;
+-};
+-
+-/*----------------------------------------------------------
+- *
+- *                     Private Functions
+- *
+- *----------------------------------------------------------*/
+-static void parse_command_line(int argc, char **argv, 
+-    struct parameters *parameters);
+-void test_scanner(TestResults *results);
+-void test_token_text(const Token *token, char *text, int line_number, 
+-    TestResults *test_results);
+-void test_token_type(const Token *token, int token_type, int line_number,
+-    TestResults *test_results);
+-void test_token_integer(const Token *token, int integer, 
+-    int line_number, TestResults *test_results);
+-void test_integer_value(ClassAd *classad, const char *attribute_name, 
+-    int expected_value,int line_number, TestResults *results);
+-void test_eval_bool(ClassAd *classad, const char  *attribute_name,
+-	int expected_value, int line_number, TestResults *results);
+-void test_eval_error(ClassAd *classad, const char  *attribute_name,
+-	int line_number, TestResults *results);
+-void test_token_float(const Token *token, float number,
+-    int line_number, TestResults *test_results);
+-void test_string_value(ClassAd *classad, const char *attribute_name,
+-    const char *expected_value, int line_number,
+-    TestResults *results);
+-void test_time_string_value(ClassAd *classad, const char *attribute_name,
+-    const char *expected_value, int line_number,
+-    TestResults *results);
+-void test_time_value(ClassAd *classad, const char *attribute_name,
+-    const struct tm  &expected_time, int line_number,
+-    TestResults *results);
+-void test_mytype(ClassAd *classad, const char *expected_value, 
+-	int line_number, TestResults *results);
+-void test_targettype(ClassAd *classad, const char *expected_value, 
+-    int line_number, TestResults *results);
+-void test_ads_match(ClassAd *classad_1, ClassAd *classad_2,
+-    int line_number, TestResults  *results);
+-void test_ads_dont_match(ClassAd *classad_1, ClassAd *classad_2,
+-    int line_number, TestResults *results);
+-void test_printed_version(ClassAd *classad, const char *attribute_name, 
+-    char *expected_string, int line_number, TestResults *results);
+-void test_in_references(char *name,	StringList &references,
+-    int line_number, TestResults *results);
+-void test_not_in_references(char *name,	StringList &references,
+-    int line_number, TestResults *results);
+-void test_dirty_attribute(
+-    TestResults *results);
+-#ifdef HAVE_DLOPEN
+-static void test_functions( TestResults  *results);
+-static void test_function_int( TestResults  *results);
+-static void test_function_real( TestResults  *results);
+-static void test_function_ifthenelse( TestResults  *results);
+-static void test_function_stringlists( TestResults  *results);
+-static void test_function_stringlists_regexpmember( TestResults  *results);
+-static void test_function_string( TestResults  *results);
+-static void test_function_strcat( TestResults  *results);
+-static void test_function_floor( TestResults  *results);
+-static void test_function_ceiling( TestResults  *results);
+-static void test_function_round( TestResults  *results);
+-static void test_function_random( TestResults  *results);
+-static void test_function_isstring( TestResults  *results);
+-static void test_function_isundefined( TestResults  *results);
+-static void test_function_iserror( TestResults  *results);
+-static void test_function_isinteger( TestResults  *results);
+-static void test_function_isreal( TestResults  *results);
+-static void test_function_isboolean( TestResults  *results);
+-static void test_function_substr( TestResults  *results);
+-static void test_function_formattime( TestResults  *results);
+-static void test_function_strcmp( TestResults  *results);
+-static void test_function_attrnm( TestResults  *results);
+-static void test_function_regexp( TestResults  *results);
+-static void test_function_XXX( TestResults  *results);/*sample*/
+-static bool test_floats_close( float one, float two, float diff = .0001);
+-#endif
+-void print_truncated_string(const char *s, int max_characters);
+-static void make_big_string(int length, char **string,
+-    char **quoted_string);
+-void test_random(TestResults *results);
+-void test_equality(TestResults *results);
+-void test_operators(TestResults *results);
+-void test_scoping(TestResults *results);
+-void test_debug_function_run(bool expect_run, int line_number, TestResults *results);
+-
+-int 
+-main(
+-	 int  argc,
+-	 char **argv)
+-{
+-	ClassAd              **classads;
+-	struct parameters    parameters;
+-	TestResults          test_results;
+-	int                  classad_index = 0; 
+-	parse_command_line(argc, argv, &parameters);
+-
+-	if (parameters.verbose) {
+-		printf("sizeof(ClassAd) = %d\n", sizeof(ClassAd));
+-		printf("sizeof(AttrListElem) = %d\n", sizeof(AttrListElem));
+-		printf("sizeof(ExprTree) = %d\n", sizeof(ExprTree));
+-		printf("We have %d classads.\n", NUMBER_OF_CLASSAD_STRINGS);
+-	}
+-
+-	if (parameters.test_scanner) {
+-		printf("Testing classad scanner...\n");
+-		test_scanner(&test_results);
+-	}
+-
+-	classads = new ClassAd *[NUMBER_OF_CLASSAD_STRINGS];
+-
+-	printf("\nCreating ClassAds...\n");
+-	if (parameters.test_copy_constructor) {
+-		printf("(Will test copy constructor at the same time.)\n");
+-	}
+-	else if (parameters.test_assignment) {
+-		printf("(Will test assignment at the same time.)\n");
+-	}
+-	for (  classad_index = 0; 
+-		   classad_index < (int) NUMBER_OF_CLASSAD_STRINGS;
+-		   classad_index++) {
+-		ClassAd *original, *duplicate;
+-
+-		printf("%s\n", classad_strings[classad_index]);
+-
+-		original = new ClassAd;
+-		original->initFromString(classad_strings[classad_index], NULL);
+-		classads[classad_index] = original;
+-
+-		if (parameters.test_copy_constructor) {
+-			duplicate = new ClassAd(*original);
+-			delete original;
+-			classads[classad_index] = duplicate;
+-		}
+-		else if (parameters.test_assignment) {
+-			duplicate = new ClassAd;
+-			duplicate->initFromString("A = 1\n MyType=\"x\"\n TargetType=\"y\"",
+-									  NULL);
+-			*duplicate = *original;
+-			delete original;
+-			classads[classad_index] = duplicate;
+-		}
+-
+-		if (parameters.verbose) {
+-			printf("ClassAd %d:\n", classad_index);
+-			classads[classad_index]->fPrint(stdout);
+-			printf("\n");
+-		}
+-	}
+-
+-	if (parameters.test_xml) {
+-		printf("Testing XML...\n");
+-		for (  int classad_index = 0; 
+-			   classad_index < (int) NUMBER_OF_CLASSAD_STRINGS;
+-			   classad_index++) {
+-			ClassAdXMLUnparser unparser;
+-			ClassAdXMLParser   parser;
+-			ClassAd            *after_classad;
+-			MyString xml, before_classad_string, after_classad_string;
+-			
+-			// 1) Print each ClassAd to a string.
+-			// 2) Convert it to XML and back and 
+-			// 3) see if the string is the same. 
+-			classads[classad_index]->sPrint(before_classad_string);
+-
+-			unparser.SetUseCompactSpacing(false);
+-			unparser.Unparse(classads[classad_index], xml);
+-			if (parameters.verbose) {
+-				printf("Classad %d in XML:\n%s", classad_index, xml.Value());
+-			}
+-			after_classad = parser.ParseClassAd(xml.Value());
+-
+-			after_classad->sPrint(after_classad_string);
+-			if (strcmp(before_classad_string.Value(), after_classad_string.Value()) != 0) {
+-				printf("Failed: XML Parse and UnParse for classad %d\n", classad_index);
+-				printf("---- Original ClassAd:\n%s\n", before_classad_string.Value());
+-				printf("---- After ClassAd:\n%s\n", after_classad_string.Value());
+-				printf("---- Intermediate XML:\n%s\n", xml.Value());
+-				test_results.AddResult(false);
+-			} else {
+-				printf("Passed: XML Parse and Unparse for classad %d\n\n", classad_index);
+-				test_results.AddResult(true);
+-			}
+-			delete after_classad;
+-		}
+-	}
+-
+-	if (parameters.test_classads) {
+-
+-		printf("\nTesting ClassAds...\n");
+-		
+-		test_integer_value(classads[0], "A", 1, __LINE__, &test_results);
+-		test_integer_value(classads[0], "B", 2, __LINE__, &test_results);
+-		test_integer_value(classads[0], "C", 3, __LINE__, &test_results);
+-		test_mytype(classads[0], "", __LINE__, &test_results);
+-		test_targettype(classads[0], "", __LINE__, &test_results);
+-		test_time_string_value(classads[0], "D", "2001-04-05T12:14:15",
+-							   __LINE__, &test_results);
+-		{
+-			struct tm  time;
+-			time.tm_year = 101; // year 2001
+-			time.tm_mon  = 03;  // that's april, not march. 
+-			time.tm_mday = 05;
+-			time.tm_hour = 12;
+-			time.tm_min  = 14;
+-			time.tm_sec  = 15;
+-			test_time_value(classads[0], "D", time, __LINE__, &test_results);
+-		}
+-
+-		test_string_value(classads[1], "D", "alain", __LINE__, &test_results);
+-		test_mytype(classads[1], "foo", __LINE__, &test_results);
+-		test_targettype(classads[1], "blah", __LINE__, &test_results);
+-		
+-		test_ads_match(classads[4], classads[5], __LINE__, &test_results);
+-		test_ads_match(classads[5], classads[4], __LINE__, &test_results);
+-		test_ads_dont_match(classads[4], classads[6], __LINE__, &test_results);
+-		test_ads_dont_match(classads[6], classads[4], __LINE__, &test_results);
+-		test_ads_dont_match(classads[4], classads[7], __LINE__, &test_results);
+-		test_ads_dont_match(classads[7], classads[4], __LINE__, &test_results);
+-		
+-		// Here we test that we can scan large inputs and everything works.
+-		char *variable, *string, *expression;
+-		
+-		make_big_string(15000, &variable, NULL);
+-		make_big_string(25000, &string, NULL);
+-		expression = (char *) malloc(50000);
+-		sprintf(expression, "%s = \"%s\"", variable, string);
+-		
+-		classads[0]->Insert(expression);
+-		
+-		test_string_value(classads[0], variable, string, __LINE__, &test_results);
+-
+-		test_printed_version(classads[2], "Rank",         classad_strings[2], 
+-							 __LINE__, &test_results);
+-		test_printed_version(classads[3], "Env",          classad_strings[3],
+-							 __LINE__, &test_results);
+-		test_printed_version(classads[8], "Requirements", 
+-			"Requirements = (a > 3) && (b >= 1.300000) && (c < MY.rank) && ((d <= TARGET.RANK) "
+-		    "|| (g == \"alain\") || (g != \"roy\") || (h =?= 5) || (i =!= 6)) "
+-            "&& ((a + b) < (c - d)) && ((e * FALSE) > (g / h)) && x == FALSE && y == TRUE "
+-            "&& z == FALSE && j == TRUE",
+-			 __LINE__, &test_results);
+-
+-		ClassAd *big_classad = new ClassAd;
+-		big_classad->initFromString(expression, NULL);
+-		test_printed_version(big_classad, variable, expression, __LINE__, &test_results);
+-		delete big_classad;
+-		free(variable);
+-		free(expression);
+-		free(string);
+-
+-		/* Test case insensitivity */
+-		test_eval_bool(classads[11], "DoesMatch",   1, __LINE__, &test_results);
+-		test_eval_bool(classads[11], "DoesntMatch", 0, __LINE__, &test_results);
+-
+-        /* Test that reading from a FILE works */
+-        FILE *classad_file;
+-        ClassAd *classad_from_file;
+-        classad_file = safe_fopen_wrapper("classad_file", "w");
+-        classads[1]->fPrint(classad_file);
+-        fprintf(classad_file, "***\n");
+-        fclose(classad_file);
+-
+-        int iseof, error, empty;
+-        classad_file = safe_fopen_wrapper("classad_file", "r");
+-        classad_from_file = new ClassAd(classad_file, "***", iseof, error, empty);
+-        fclose(classad_file);
+-		test_integer_value(classad_from_file, "B", 2, __LINE__, &test_results);
+-		test_integer_value(classad_from_file, "C", 3, __LINE__, &test_results);
+-		test_string_value(classad_from_file, "D", "alain", __LINE__, &test_results);
+-        delete classad_from_file;
+-	}
+-
+-	if (parameters.test_references) {
+-		printf("\nTesting References...\n");
+-		StringList  *internal_references; 
+-		StringList  *external_references; 
+-
+-		internal_references = new StringList;
+-		external_references = new StringList;
+-
+-		classads[9]->GetReferences("Requirements", *internal_references,
+-								   *external_references);
+-		test_in_references("Memory", *internal_references, __LINE__, &test_results);
+-		test_in_references("Disk", *internal_references, __LINE__, &test_results);
+-		test_in_references("ImageSize", *external_references, __LINE__, &test_results);
+-		test_in_references("AvailableDisk", *external_references, __LINE__, &test_results);
+-        test_in_references("XX", *external_references, __LINE__, &test_results);
+-		
+-		test_not_in_references("Memory", *external_references, __LINE__, &test_results);
+-		test_not_in_references("Disk", *external_references, __LINE__, &test_results);
+-		test_not_in_references("ImageSize", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("AvailableDisk", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("Linux", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("Linux", *external_references, __LINE__, &test_results);
+-        test_not_in_references("X", *external_references, __LINE__, &test_results);
+-		delete internal_references;
+-		delete external_references;
+-
+-		internal_references = new StringList;
+-		external_references = new StringList;
+-
+-		classads[10]->GetReferences("Requirements", *internal_references,
+-								   *external_references);
+-		test_in_references("Memory", *internal_references, __LINE__, &test_results);
+-		test_in_references("Disk", *internal_references, __LINE__, &test_results);
+-		test_in_references("ImageSize", *external_references, __LINE__, &test_results);
+-		test_in_references("AvailableDisk", *external_references, __LINE__, &test_results);
+-		test_in_references("X", *external_references, __LINE__, &test_results);
+-		test_in_references("XX", *external_references, __LINE__, &test_results);
+-		
+-		test_not_in_references("Memory", *external_references, __LINE__, &test_results);
+-		test_not_in_references("Disk", *external_references, __LINE__, &test_results);
+-		test_not_in_references("ImageSize", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("AvailableDisk", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("Linux", *internal_references, __LINE__, &test_results);
+-		test_not_in_references("Linux", *external_references, __LINE__, &test_results);
+-
+-		delete internal_references;
+-		delete external_references;
+-	}
+-
+-	if (parameters.test_dirty) {
+-		test_dirty_attribute(&test_results);
+-	}
+-
+-#ifdef HAVE_DLOPEN
+-	if (parameters.test_functions) {
+-		test_functions(&test_results);
+-	}
+-//#else
+-
+-    if (parameters.test_random) {
+-        test_random(&test_results);
+-    }
+-
+-    test_operators(&test_results);
+-    test_scoping(&test_results);
+-    test_equality(&test_results);
+-
+-	//ClassAd *many_ads[LARGE_NUMBER_OF_CLASSADS];
+-	/*
+-	for (int i = 0; i < LARGE_NUMBER_OF_CLASSADS; i++) {
+-		many_ads[i] = new ClassAd(classad_strings[2], ',');
+-		//print_memory_usage();
+-	}
+-	system("ps -v");
+-	*/
+-
+-	test_results.PrintResults();
+-	//classad_string_space.dump();
+-
+-#endif
+-	// Clean up when we're done.
+-	for (  classad_index = 0; 
+-		   classad_index < (int) NUMBER_OF_CLASSAD_STRINGS;
+-		   classad_index++) {
+-		delete classads[classad_index];
+-	}
+-	delete [] classads;
+-
+-	return(test_results.GetNumberFailed());
+-}
+-
+-/***************************************************************
+- *
+- * Function: parse_command_line
+- * Purpose:  Read the command line arguments and fill in 
+- *           the parameters structure to reflect them. 
+- *
+- ***************************************************************/
+-static void
+-parse_command_line(
+-	 int                argc,
+-	 char               **argv,
+-	 struct parameters  *parameters)
+-{
+-	int   argument_index;
+-	bool  dump_usage;
+-
+-	dump_usage = false;
+-
+-	parameters->verbose               = false;
+-	parameters->test_scanner          = false;
+-	parameters->test_copy_constructor = false;
+-	parameters->test_assignment       = false;
+-	parameters->test_classads         = false;
+-	parameters->test_references       = false;
+-	parameters->test_xml              = false;
+-	parameters->test_dirty            = false;
+-	parameters->test_functions        = false;
+-    parameters->test_random           = false;
+-	argument_index = 1;
+-
+-	while (argument_index < argc) {
+-		if (!strcmp(argv[argument_index], "-v")
+-			|| !strcmp(argv[argument_index], "-verbose")) {
+-			parameters->verbose = !parameters->verbose;
+-		} else if (!strcmp(argv[argument_index], "-h")
+-			|| !strcmp(argv[argument_index], "-help")
+-			|| !strcmp(argv[argument_index], "-?")) {
+-			dump_usage = true;
+-		} else if (!strcmp(argv[argument_index], "-a")
+-		    || !strcmp(argv[argument_index], "-all")) {
+-			parameters->test_scanner          = true;
+-			if (!parameters->test_assignment) {
+-				parameters->test_copy_constructor = true;
+-			}
+-			parameters->test_classads         = true;
+-			parameters->test_references       = true;
+-			parameters->test_xml              = true;
+-			parameters->test_dirty            = true;
+-			parameters->test_functions        = true;
+-            parameters->test_random           = true;
+-		} else if (!strcmp(argv[argument_index], "-s")
+-		    || !strcmp(argv[argument_index], "-scanner")) {
+-			parameters->test_scanner          = true;
+-		} else if (!strcmp(argv[argument_index], "-c")
+-		    || !strcmp(argv[argument_index], "-classads")) {
+-			parameters->test_classads          = true;
+-		} else if (!strcmp(argv[argument_index], "-r")
+-		    || !strcmp(argv[argument_index], "-references")) {
+-			parameters->test_references        = true;
+-		} else if (!strcmp(argv[argument_index], "-C")
+-		    || !strcmp(argv[argument_index], "-copy")) {
+-			parameters->test_copy_constructor  = true;
+-			parameters->test_assignment        = false;
+-		} else if (!strcmp(argv[argument_index], "-A")
+-		    || !strcmp(argv[argument_index], "-assignment")) {
+-			parameters->test_assignment       = true;
+-			parameters->test_copy_constructor = false;
+-		} else if (!strcmp(argv[argument_index], "-x")
+-		    || !strcmp(argv[argument_index], "-xml")) {
+-			parameters->test_xml              = true;
+-		} else if (!strcmp(argv[argument_index], "-d")
+-		    || !strcmp(argv[argument_index], "-dirty")) {
+-			parameters->test_dirty            = true;
+-		} else if (!strcmp(argv[argument_index], "-f")
+-		    || !strcmp(argv[argument_index], "-functions")) {
+-			parameters->test_functions        = true;
+-		} else if (!strcmp(argv[argument_index], "-random")) {
+-			parameters->test_random           = true;
+-		} else {
+-			fprintf(stderr, "Unknown argument: %s\n", 
+-					argv[argument_index]);
+-			dump_usage = true;
+-
+-		}
+-		argument_index++;
+-	}
+-
+-	parameters->test_functions        = true;
+-
+-	if (dump_usage) {
+-		fprintf(stderr, "Usage: test_classads [-v | -verbose] "
+-				        "[-h | -help| -?]\n");
+-		fprintf(stderr, "       [-v | -verbose]   Print oodles of info.\n");
+-		fprintf(stderr, "       [-h | -help | -?] Print this message.\n");
+-		exit(1);
+-	}
+-
+-	if (   parameters->test_scanner == false
+-		&& parameters->test_copy_constructor == false
+-		&& parameters->test_assignment       == false
+-		&& parameters->test_classads         == false
+-		&& parameters->test_references       == false
+-		&& parameters->test_dirty            == false) {
+-		parameters->test_scanner          = true;
+-		parameters->test_copy_constructor = true;
+-		parameters->test_classads         = true;
+-		parameters->test_references       = true;
+-		parameters->test_dirty            = true;
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_scanner
+- * Purpose:  Test the classad scanner: that's the bit that
+- *           walks through the input character by character and
+- *           tokenizes it: it's a lexer.
+- *
+- ***************************************************************/
+-void 
+-test_scanner(
+-    TestResults *results) // OUT: Modified to reflect result of test
+-{
+-	Token token;
+-	char  *input = "Rank = ((Owner == \"Alain\") || (Memory < 500)) 5.4 '2001-10-10'";
+-	const char  *current;
+-
+-	current = input;
+-
+-	Scanner(current, token);
+-
+-	// Rank
+-	test_token_type(&token, LX_VARIABLE, __LINE__, results);
+-	test_token_text(&token, "Rank", __LINE__, results);
+-	Scanner(current, token);
+-
+-	// =
+-	test_token_type(&token, LX_ASSIGN, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// ((
+-	test_token_type(&token, LX_LPAREN, __LINE__, results);
+-	Scanner(current, token);
+-	test_token_type(&token, LX_LPAREN, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// Owner
+-	test_token_type(&token, LX_VARIABLE, __LINE__, results);
+-	test_token_text(&token, "Owner", __LINE__, results);
+-	Scanner(current, token);
+-
+-	// ==
+-	test_token_type(&token, LX_EQ, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// "Alain"
+-	test_token_type(&token, LX_STRING, __LINE__, results);
+-	test_token_text(&token, "Alain", __LINE__, results);
+-	Scanner(current, token);
+-
+-	// )
+-	test_token_type(&token, LX_RPAREN, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// ||
+-	test_token_type(&token, LX_OR, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// (
+-	test_token_type(&token, LX_LPAREN, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// Memory
+-	test_token_type(&token, LX_VARIABLE, __LINE__, results);
+-	test_token_text(&token, "Memory", __LINE__, results);
+-	Scanner(current, token);
+-
+-	// LT
+-	test_token_type(&token, LX_LT, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// 500 
+-	test_token_type(&token, LX_INTEGER, __LINE__, results);
+-	test_token_integer(&token, 500, __LINE__, results);
+-	Scanner(current, token);
+-
+-	// ))
+-	test_token_type(&token, LX_RPAREN, __LINE__, results);
+-	Scanner(current, token);
+-	test_token_type(&token, LX_RPAREN, __LINE__, results);
+-	Scanner(current, token);
+-
+-	test_token_type(&token, LX_FLOAT, __LINE__, results);
+-	test_token_float(&token, 5.4, __LINE__, results);
+-	Scanner(current, token);
+-
+-	test_token_type(&token, LX_TIME, __LINE__, results);
+-	test_token_text(&token, "2001-10-10", __LINE__, results);
+-	Scanner(current, token);
+-
+-	// end
+-	test_token_type(&token, LX_EOF, __LINE__, results);
+-
+-	// Test some big strings.
+-	char *big_string, *quoted_big_string; 
+-	const char *scanner_text;
+-	
+-	make_big_string(30000, &big_string, &quoted_big_string);
+-	scanner_text = quoted_big_string;
+-	Scanner(scanner_text, token);
+-	test_token_type(&token, LX_STRING, __LINE__, results);
+-	test_token_text(&token, big_string, __LINE__, results);
+-
+-	scanner_text = big_string;
+-	Scanner(scanner_text, token);
+-	test_token_type(&token, LX_VARIABLE, __LINE__, results);
+-	test_token_text(&token, big_string, __LINE__, results);
+-
+-	free(big_string);
+-	free(quoted_big_string);
+-
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_token_type
+- * Purpose:  Used by test_scanner(). Given a token, make sure
+- *           it's the type we expect.
+- *
+- ***************************************************************/
+-void
+-test_token_type(
+-	const Token *token,        // IN: The token we're examining
+-    int         token_type,    // IN: The token type we expect
+-    int         line_number,   // IN: The line number to print
+-	TestResults *test_results) // OUT: Modified to reflect result of test
+-{
+-	if (token->type == token_type) {
+-		printf("Passed: token_type == %d in line %d\n",
+-			   token_type, line_number);
+-		test_results->AddResult(true);
+-	} else {
+-		printf("Failed: token_type == %d, not %d in line %d\n", 
+-			   token->type, token_type, line_number);
+-		test_results->AddResult(false);
+-	}
+-	return; 
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_token_text
+- * Purpose:  Used by test_scanner(). Given a token, make sure it
+- *           has the text we expect. 
+- *
+- ***************************************************************/
+-void
+-test_token_text(
+-	const Token *token,        // IN: The token we're examining
+-	char        *text,         // IN: The text we expect
+-    int         line_number,   // IN: The line number to print
+-	TestResults *test_results) // OUT: Modified to reflect result of test
+-{
+-	if (!strcmp(token->strVal, text)) {
+-		printf("Passed: token_text == \"");
+-		print_truncated_string(text, 40);
+-		printf("\" in line %d\n", line_number);
+-		test_results->AddResult(true);
+-	} else {
+-		printf("Failed: token_text == \"");
+-		print_truncated_string(token->strVal, 30);
+-		printf("\" not \"");
+-		print_truncated_string(text, 30);
+-		printf("\" in line %d\n", line_number);
+-		test_results->AddResult(false);
+-	}
+-	return; 
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_token_integer
+- * Purpose:  Given a token, make sure its integer value is as
+- *           we expect. Used by test_scanner().
+- *
+- ***************************************************************/
+-void
+-test_token_integer(
+-    const Token *token,        // IN: The token we're examining
+-    int         integer,       // IN: The integer we're expecting.
+-    int         line_number,   // IN: The line number to print
+-	TestResults *test_results) // OUT: Modified to reflect result of test
+-{
+-	if (token->intVal == integer) {
+-		printf("Passed: token value == %d in line %d\n",
+-			   integer, line_number);
+-		test_results->AddResult(true);
+-	} else {
+-		printf("Failed: token value == %d, not %d in line %d\n", 
+-			   token->intVal, integer, line_number);
+-		test_results->AddResult(false);
+-	}
+-	return; 
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_token_float
+- * Purpose:  Given a token, make sure its floating-point value
+- *           is as we expect. Used by test_scanner().
+- *
+- ***************************************************************/
+-void
+-test_token_float(
+-	const Token *token,         // IN: The token we're examining
+-	float       number,         // IN: The float we're expecting
+-    int         line_number,    // IN: The line number to print
+-	TestResults *test_results)  // OUT: Modified to reflect result of test
+-{
+-	if (token->floatVal == number) {
+-		printf("Passed: token value == %g in line %d\n",
+-			   number, line_number);
+-		test_results->AddResult(true);
+-	} else {
+-		printf("Failed: token value == %g, not %g in line %d\n", 
+-			   token->floatVal, number, line_number);
+-		test_results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_integer_value
+- * Purpose:  Given a classad and an attribute within the classad,
+- *           test that the attribute has the integer value we
+- *           expect.
+- *
+- ***************************************************************/
+-void 
+-test_integer_value(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *attribute_name, // IN: The attribute we're examining
+-	int         expected_value,  // IN: The integer we're expecting
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	int actual_value;
+- 	int found_integer;
+-
+-	found_integer = classad->LookupInteger(attribute_name, actual_value);
+-	if (expected_value == actual_value) {
+-		printf("Passed: %s is %d in line %d\n",
+-			   attribute_name, expected_value, line_number);
+-		results->AddResult(true);
+-	} else if (!found_integer) {
+-		printf("Failed: Attribute \"%s\" is not found.\n", attribute_name);
+-		results->AddResult(false);
+-	} else {
+-		printf("Failed: %s is %d not %d in line %d\n",
+-			   attribute_name, actual_value, expected_value, line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_eval_bool
+- * Purpose:  Given a classad and an attribute within the classad,
+- *           test that the attribute evaluates to the boolean we
+- *           expect
+- *
+- ***************************************************************/
+-void 
+-test_eval_bool(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *attribute_name, // IN: The attribute we're examining
+-	int         expected_value,  // IN: The integer we're expecting
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	int actual_value;
+- 	int found_bool;
+-
+-	found_bool = classad->EvalBool(attribute_name, NULL, actual_value);
+-	if (expected_value == actual_value) {
+-		printf("Passed: %s is %d in line %d\n",
+-			   attribute_name, expected_value, line_number);
+-		results->AddResult(true);
+-	} else if (!found_bool) {
+-		printf("Failed: Attribute \"%s\" is not found.\n", attribute_name);
+-		results->AddResult(false);
+-	} else {
+-		printf("Failed: %s is %d not %d in line %d\n",
+-			   attribute_name, actual_value, expected_value, line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_eval_error
+- * Purpose:  Given a classad and an attribute within the classad,
+- *           test that the attribute evaluates an error
+- *
+- ***************************************************************/
+-void 
+-test_eval_error(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *attribute_name, // IN: The attribute we're examining
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+- 	int is_error;
+-	ExprTree *tree;
+-	EvalResult val;
+-
+-	tree = classad->LookupExpr(attribute_name);
+-	if(!tree) {
+-        is_error = false;
+-    } else if (tree->EvalTree(classad, NULL, &val) && val.type == LX_ERROR) {
+-        is_error = true;
+-    } else {
+-        is_error = false;
+-    }
+-	if (is_error) {
+-		printf("Passed: Found expected error in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: Did not find error in line %d\n", line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_string_value
+- * Purpose:  Given a classad, test that an attribute within the
+- *           classad has the string value we expect.
+- *
+- ***************************************************************/
+-void 
+-test_string_value(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *attribute_name, // IN: The attribute we're examining
+-	const char  *expected_value, // IN: The string we're expecting
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	int         found_string;
+-	char        *actual_value=NULL;
+-
+-	found_string = classad->LookupString(attribute_name, &actual_value);
+-	if (found_string && !strcmp(expected_value, actual_value)) {
+-		printf("Passed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" is \"");
+-		print_truncated_string(expected_value, 40);
+-		printf(" \" in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else if (!found_string) {
+-		printf("Failed: Attribute \"%s\" is not found.\n", attribute_name);
+-		results->AddResult(false);
+-	} else {
+-		printf("Failed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" is: ");
+-		print_truncated_string(actual_value, 30);
+-		printf("\" not \"");
+-		print_truncated_string(expected_value, 30);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(false);
+-	}
+-    if (actual_value != NULL){
+-        free(actual_value);
+-    }
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_time_string_value
+- * Purpose:  Given a classad, test that an attribute within the
+- *           classad has the time string we expect.
+- *
+- ***************************************************************/
+-void 
+-test_time_string_value(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *attribute_name, // IN: The attribute we're examining
+-	const char  *expected_value, // IN: The string we're expecting
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	int         found_string;
+-	char        *actual_value;
+-
+-	found_string = classad->LookupTime(attribute_name, &actual_value);
+-	if (found_string && !strcmp(expected_value, actual_value)) {
+-		printf("Passed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" is \"");
+-		print_truncated_string(expected_value, 40);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else if (!found_string) {
+-		printf("Failed: Attribute \"%s\" is not found.\n", attribute_name);
+-		results->AddResult(false);
+-	} else {
+-		printf("Failed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" is: ");
+-		print_truncated_string(actual_value, 30);
+-		printf("\" not \"");
+-		print_truncated_string(expected_value, 30);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(false);
+-	}
+-	free(actual_value);
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_time_value
+- * Purpose:  Given a classad, test that an attribute within the
+- *           classad has the time we expect.
+- *
+- ***************************************************************/
+-void 
+-test_time_value(
+-    ClassAd          *classad,        // IN: The ClassAd we're examining
+-	const char       *attribute_name, // IN: The attribute we're examining
+-	const struct tm  &expected_time,  // IN: The string we're expecting
+-	int              line_number,     // IN: The line number to print
+-    TestResults      *results)        // OUT: Modified to reflect result of test
+-{
+-	int         found_time;
+-	struct tm   actual_time;
+-	bool        is_utc;
+-
+-	found_time = classad->LookupTime(attribute_name, &actual_time, &is_utc);
+-	if (found_time 
+-		&& actual_time.tm_year == expected_time.tm_year
+-		&& actual_time.tm_mon  == expected_time.tm_mon
+-		&& actual_time.tm_mday == expected_time.tm_mday
+-		&& actual_time.tm_hour == expected_time.tm_hour
+-		&& actual_time.tm_min  == expected_time.tm_min
+-		&& actual_time.tm_sec  == expected_time.tm_sec) {
+-		printf("Passed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" has correct time in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else if (!found_time) {
+-		printf("Failed: Attribute \"%s\" is not found.\n", attribute_name);
+-		results->AddResult(false);
+-	} else {
+-		char *t1, *t2;
+-		bool is_utc;
+-		t1 = time_to_iso8601(actual_time, ISO8601_ExtendedFormat, 
+-						ISO8601_DateAndTime, &is_utc);
+-		t2 = time_to_iso8601(expected_time, ISO8601_ExtendedFormat, 
+-						ISO8601_DateAndTime, &is_utc);
+-		printf("Failed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" is: ");
+-		print_truncated_string(t1, 30);
+-		printf("\" not \"");
+-		print_truncated_string(t2, 30);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(false);
+-		free(t1);
+-		free(t2);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_mytype
+- * Purpose:  Given a classad, make sure that the type (mytype)
+- *           is what we expect it to be. 
+- *
+- ***************************************************************/
+-void 
+-test_mytype(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *expected_value, // IN: The type we're expecting.
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	static const char *actual_value;
+-
+-	actual_value = classad->GetMyTypeName();
+-	if (!strcmp(expected_value, actual_value)) {
+-		printf("Passed: MyType is \"");
+-		print_truncated_string(expected_value, 40);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: MyType is \"");
+-		print_truncated_string(actual_value, 30);
+-		printf("\" not \"");
+-		print_truncated_string(expected_value, 30);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_targettype
+- * Purpose:  Given a classad, test that the target type is what
+- *           we expect it to be.
+- *
+- ***************************************************************/
+-void 
+-test_targettype(
+-    ClassAd     *classad,        // IN: The ClassAd we're examining
+-	const char  *expected_value, // IN: The targettype we're expecting
+-	int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-	static const char *actual_value;
+-
+-	actual_value = classad->GetTargetTypeName();
+-	if (!strcmp(expected_value, actual_value)) {
+-		printf("Passed: TargetType is \"");
+-		print_truncated_string(expected_value, 40);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: TargetType is \"");
+-		print_truncated_string(actual_value, 30);
+-		printf("\" not \"");
+-		print_truncated_string(expected_value, 30);
+-		printf("\" in line %d\n", line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_ads_match
+- * Purpose:  Verify that two class ads match, as we expect.
+- *
+- ***************************************************************/
+-void
+-test_ads_match(
+-	ClassAd      *classad_1,   // IN: One of the class ads
+-	ClassAd      *classad_2,   // IN: The other the class ads
+-    int          line_number,  // IN: The line number to print
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	if (IsAMatch(classad_1, classad_2)) {
+-		printf("Passed: classads match in line %d.\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: classads don't match in line %d.\n", line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_ads_dont_match
+- * Purpose:  Given two class ads, ensure that they don't match.
+- *
+- ***************************************************************/
+-void
+-test_ads_dont_match(
+-	ClassAd      *classad_1,   // IN: One of the class ads
+-	ClassAd      *classad_2,   // IN: The other the class ads
+-    int          line_number,  // IN: The line number to print
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	if (!IsAMatch(classad_1, classad_2)) {
+-		printf("Passed: classads don't match in line %d.\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: classads match in line %d.\n", line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-void 
+-test_printed_version(
+-    ClassAd     *classad,         // IN: The ClassAd we're examining
+-	const char  *attribute_name,  // IN: The attribute we're examining
+-	char        *expected_string, // IN: The string we're expecting
+-	int         line_number,      // IN: The line number to print
+-    TestResults *results)         // OUT: Modified to reflect result of test
+-{
+-	MyString printed_version;
+-	ExprTree  *tree;
+-
+-	tree = classad->LookupExpr(attribute_name);
+-	printed_version.sprintf( "%s = %s", attribute_name, ExprTreeToString( tree ) );
+-
+-	if (!strcmp(expected_string, printed_version.Value())) {
+-		printf("Passed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" prints correctly in line %d.\n", line_number);
+-		results->AddResult(true);
+-	} else {
+-		printf("Failed: ");
+-		print_truncated_string(attribute_name, 40);
+-		printf(" does not print correctly in line %d.\n", line_number);
+-		printf("Printed as: %s\n", printed_version.Value());
+-		printf("Expected  : %s\n", expected_string);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_not_references
+- * Purpose:  Test if the name (reference) is found in the
+- *           list of refrences.
+- *
+- ***************************************************************/
+-void
+-test_in_references(
+-	char         *name,        // IN: What to look for 
+-	StringList   &references,   // IN: References to examine
+-    int          line_number,  // IN: The line number to print
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char *reference;
+-	bool is_in_references = false;
+-
+-	references.rewind(); 
+-	while ((reference = references.next()) != NULL) {
+-		if (!strcmp(reference, name)) {
+-			is_in_references = true;
+-			break;
+-		}
+-	}
+-	if (is_in_references) {
+-		printf("Passed: %s is in references in line %d.\n", 
+-			   name, line_number);
+-		results->AddResult(true);
+-	}
+-	else {
+-		printf("Failed: %s is not in references in line %d.\n", 
+-			   name, line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-    
+-/***************************************************************
+- *
+- * Function: test_not_in_references
+- * Purpose:  Test if the name (reference) is not found in the
+- *           list of refrences.
+- *
+- ***************************************************************/
+-void
+-test_not_in_references(
+-	char         *name,        // IN: What to look for 
+-	StringList   &references,   // IN: References to examine
+-    int          line_number,  // IN: The line number to print
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char *reference;
+-	bool is_in_references = false;
+-
+-	references.rewind(); 
+-	while ((reference = references.next()) != NULL) {
+-		if (!strcmp(reference, name)) {
+-			is_in_references = true;
+-			break;
+-		}
+-	}
+-	if (!is_in_references) {
+-		printf("Passed: %s is not in references in line %d.\n", 
+-			   name, line_number);
+-		results->AddResult(true);
+-	}
+-	else {
+-		printf("Failed: %s is in references in line %d.\n", 
+-			   name, line_number);
+-		results->AddResult(false);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_dirty_attribute
+- * Purpose:  Test if dirty attributes (attributes modified after
+- *           the creation of the ClassAd) are properly maintained.
+- *
+- ***************************************************************/
+-void 
+-test_dirty_attribute(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	ClassAd  *classad;
+-	char     *name;
+-
+-	classad = new ClassAd;
+-	classad->initFromString("A = 1\nB = 2", NULL);
+-	classad->ClearAllDirtyFlags();
+-
+-	// First of all, we should have zero dirty attributes. 
+-	classad->ResetName(); 
+-	name = classad->NextDirtyName();
+-	if (name) {
+-		delete [] name;
+-		printf("Failed: new ClassAd has dirty attributes in line %d\n",
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Passed: new ClassAd is clean in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	// Add an attribute
+-	classad->Insert("C = 3");
+-
+-	// Now we should have exactly one dirty attribute, C.
+-	classad->ResetName();
+-	name = classad->NextDirtyName();
+-	if (!name) {
+-		printf("Failed: C isn't dirty in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (strcmp(name, "C")) {
+-		printf("Failed: %s is dirty, not C in line %d\n", name, __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: C is dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-		delete [] name;
+-	}
+-	name = classad->NextDirtyName();
+-	if (name) {
+-		printf("Failed: more than one dirty attribute in line %d\n", __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: not more than one dirty attribute in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	// Add an attribute
+-	classad->Insert("D = 4");
+-
+-	// Now we should have two dirty attributes, C & D
+-	classad->ResetName();
+-	name = classad->NextDirtyName();
+-	if (!name) {
+-		printf("Failed: C isn't dirty in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (strcmp(name, "C")) {
+-		printf("Failed: %s is dirty, not C in line %d\n", name, __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: C is dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-		delete [] name;
+-	}
+-	name = classad->NextDirtyName();
+-	if (!name) {
+-		printf("Failed: D isn't dirty in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (strcmp(name, "D")) {
+-		printf("Failed: %s is dirty, not D in line %d\n", name, __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: D is dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-		delete [] name;
+-	}
+-	name = classad->NextDirtyName();
+-	if (name) {
+-		printf("Failed: more than two dirty attributes in line %d\n", __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: not more than two dirty attributes in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	// Clear the dirty flags, and there should be no dirty attributes
+-	classad->ClearAllDirtyFlags();
+-	classad->ResetName(); 
+-	name = classad->NextDirtyName();
+-	if (name) {
+-		delete [] name;
+-		printf("Failed: ClassAd has dirty attributes in line %d\n",
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Passed: new ClassAd is clean in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	// Now make A dirty, and B dirty then clean, and we should have 
+-	// just A dirty. 
+-	classad->SetDirtyFlag("A", true);
+-	classad->SetDirtyFlag("B", true);
+-	classad->SetDirtyFlag("B", false);
+-
+-	classad->ResetName();
+-	name = classad->NextDirtyName();
+-	if (!name) {
+-		printf("Failed: A isn't dirty in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (strcmp(name, "A")) {
+-		printf("Failed: %s is dirty, not A in line %d\n", name, __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: A is dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-		delete [] name;
+-	}
+-	name = classad->NextDirtyName();
+-	if (name) {
+-		printf("Failed: more than one dirty attribute in line %d\n", __LINE__);
+-		results->AddResult(false);
+-		delete [] name;
+-	} else {
+-		printf("Passed: not more than one dirty attribute in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	// We should also be able to test it with GetDirtyFlag()
+-	bool exists, dirty;
+-	classad->GetDirtyFlag("A", &exists, &dirty);
+-	if (!exists) {
+-		printf("Failed: A doesn't exist in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (!dirty) {
+-		printf("Failed: A isn't dirty  in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Passed: A is dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	classad->GetDirtyFlag("B", &exists, &dirty);
+-	if (!exists) {
+-		printf("Failed: B doesn't exist in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else if (dirty) {
+-		printf("Failed: B is dirty  in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Passed: B is not dirty in line %d\n", __LINE__);
+-		results->AddResult(true);
+-	}
+-
+-	classad->GetDirtyFlag("Unknown", &exists, NULL);
+-	if (exists) {
+-		printf("Failed: 'Unknown' should not exist in line %d\n", __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Passed: 'Unknown' doesn't exist in line %d\n", __LINE__);
+-	}
+-
+-
+-	delete classad;
+-
+-	return;
+-}
+-
+-#ifdef HAVE_DLOPEN
+-static void test_functions(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-    float	real;
+-
+-	char classad_string[] = 
+-							/* batch 1 testing of functions */
+-							"D0=GetTime()\n"
+-							"D1=Time()\n"
+-
+-							"D2=Interval(60)\n"
+-							"D3=Interval(3600)\n"
+-							"D4=Interval(86400)\n"
+-
+-		                    "E=sharedstring()\n"
+-                            "G=sharedinteger(2)\n"
+-	                        "H=sharedfloat(3.14)\n"
+-
+-							"L=toupper(\"AbCdEfg\")\n"
+-							"M=toLower(\"ABCdeFg\")\n"
+-
+-							"N0=size(\"ABC\")\n"
+-							"N1=size(\"\")\n"
+-							"N2=size(foo)\n"
+-							"E0=isError(N2)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for functions in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for functions in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("D0", NULL, integer)) {
+-			printf("Passed: Evaluating gettime function gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating gettime function in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("D1", NULL, integer)) {
+-			printf("Passed: Evaluating time function gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating time function in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("D2", NULL, big_string)&&
+-			(strcmp("  0+00:01:00",big_string) == 0)) {
+-			printf("Passed: Evaluating interval(60) function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating interval(60) wanted  0+00:01:00 got <<%s>>in line %d\n",
+-				   big_string,__LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("D3", NULL, big_string)&&
+-			(strcmp("  0+01:00:00",big_string) == 0)) {
+-			printf("Passed: Evaluating interval(3600) function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating interval(3600) in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("D4", NULL, big_string)&&
+-			(strcmp("  1+00:00:00",big_string) == 0)) {
+-			printf("Passed: Evaluating interval(86400) function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating interval(86400) in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		/*
+-		** turn off shared values till testing concerns are met
+-		**
+-		if (classad->EvalString("E", NULL, big_string)) {
+-			printf("Passed: Evaluating sharedstring function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating foo sharedstring in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("G", NULL, integer)) {
+-			printf("Passed: Evaluating sharedinteger gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating sharedinteger in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("H", NULL, real)) {
+-			printf("Passed: Evaluating sharedfloat gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating sharedfloat in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-		*/
+-
+-		if (classad->EvalString("L", NULL, big_string) && 
+-				(strcmp(big_string, "ABCDEFG") == 0)) {
+-			printf("Passed: Evaluating toupper gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating toupper gave %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("M", NULL, big_string) && 
+-				(strcmp(big_string, "abcdefg") == 0)) {
+-			printf("Passed: Evaluating tolower gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating tolower gave %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("N0", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating size gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating size gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("N1", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating size gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating size gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-		
+-		if (classad->EvalBool("E0", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating size(foo) ): %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating size(foo) ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		test_function_isstring(results);
+-		test_function_isundefined(results);
+-		test_function_iserror(results);
+-		test_function_isinteger(results);
+-		test_function_isreal(results);
+-		test_function_isboolean(results);
+-
+-		test_function_int(results);
+-		test_function_real(results);
+-		test_function_string(results);
+-		test_function_stringlists(results);
+-
+-		test_function_floor(results);
+-		test_function_ceiling(results);
+-		test_function_round(results);
+-		test_function_random(results);
+-
+-		test_function_ifthenelse(results);
+-
+-		test_function_strcat(results);
+-		test_function_substr(results);
+-		test_function_formattime(results);
+-		test_function_strcmp(results);
+-		test_function_attrnm(results);
+-		test_function_regexp(results);
+-		test_function_stringlists_regexpmember(results);
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_int(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=int(-3)\n"
+-							"BC1=int(3.4)\n"
+-							"BC2=int(-3.4)\n"
+-							"BC3=int(\"-3.4\")\n"
+-							"BC4=int(true)\n"
+-							"BC5=int(t)\n"
+-							"BC6=int(false)\n"
+-							"BC7=int(f)\n"
+-							"BC8=int(\"this is not a number\")\n"
+-							"BC9=isError(BC8)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function int() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function int()>> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC9", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(BC9) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(BC9) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC8", NULL, integer) && (integer == 0)) {
+-			printf("Failed: Evaluating int(weirdstring)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		} else {
+-			printf("Passed: Evaluating int(weirdstring) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		}
+-
+-		if (classad->EvalInteger("BC7", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating int(f)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(f) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC6", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating int(false)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(false) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating int(t)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(t) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating int(true)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(true) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC3", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating int('-3.4')  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int('-3.4') gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC2", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating int(-3.4)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(-3.4) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC1", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating int(3.4)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(3.4) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC0", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating int(-3)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating int(-3) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_ifthenelse(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BB=2\n"
+-							"BC=10\n"
+-							//BD is undefined.....
+-							"BB2=ifThenElse(BB > 5, \"big\",\"small\")\n"
+-							"BB3=ifThenElse(BC > 5, \"big\",\"small\")\n"
+-							"BB4=ifThenElse(BD > 5, \"big\",\"small\")\n"
+-							"BB5=isUndefined(BB4)\n"
+-							"BB6=ifThenElse(4 / \"hello\", \"big\",\"small\")\n"
+-							"BB7=ifThenElse(\"big\",\"small\")\n"
+-							"E0=isError(BB6)\n"
+-							"E1=isError(BB7)\n"
+-							"BB8=ifThenElse(BB > 5, 4 / 0,\"small\")\n"
+-							"BB9=ifThenElse(BC > 5, \"big\", 4 / 0)\n"
+-							"BB10=ifThenElse(0.0, \"then\", \"else\")\n"
+-							"BB11=ifThenElse(1.0, \"then\", \"else\")\n"
+-							"BB12=ifThenElse(3.7, \"then\", \"else\")\n"
+-							"BB13=ifThenElse(\"\", \"then\", \"else\")\n"
+-							"E2=isError(BB13)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function ifthenelse() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function ifthenelse() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalString("BB2", NULL, big_string) &&
+-				(strcmp(big_string, "small") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <if false>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <if false> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB3", NULL, big_string) &&
+-				(strcmp(big_string, "big") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <if true>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <if true> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BB5", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating ifThenElse isUndefined(BB5) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse isUndefined(BB5) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E0", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating ifThenElse conditional error (BB6) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse conditional error (BB6) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E1", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating ifThenElse missing arg(BB7) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse missing arg(BB7) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB8", NULL, big_string) &&
+-				(strcmp(big_string, "small") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <if false do not evaluate true arg>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <if false do not evaluate true arg> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB9", NULL, big_string) &&
+-				(strcmp(big_string, "big") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <if true do not evaluate false arg>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <if true do not evaluate false arg> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB10", NULL, big_string) &&
+-				(strcmp(big_string, "else") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <0.0 evaluates to false yielding else result>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <0.0 evaluates to false yielding else result> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB11", NULL, big_string) &&
+-				(strcmp(big_string, "then") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <1.0 evaluates to true yielding then result>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <1.0 evaluates to true yielding then result> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BB12", NULL, big_string) &&
+-				(strcmp(big_string, "then") == 0)) {
+-			printf("Passed: Evaluating ifThenElse <3.7 evaluates to true yielding then result>: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse <3.7 evaluates to true yielding then result> %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E2", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating ifThenElse expression a string : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ifThenElse expression a string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_stringlists(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-    float	real;
+-
+-	char classad_string[] = 
+-							"O0=stringlistsize(\"A ,0 ,C\")\n"
+-							"O1=stringlistsize(\"\")\n"
+-							"O2=stringlistsize(\"A;B;C;D;E\",\";\")\n"
+-							"O3=isError(stringlistsize(\"A;B;C;D;E\",true))\n"
+-							"O4=isError(stringlistsize(true,\"A;B;C;D;E\"))\n"
+-							"O5=stringlistsize(\"A B C,D\")\n"
+-							"O6=stringlistsize(\"A B C,,,,,D\")\n"
+-							"O7=stringlistsize(\"A B C ; D\",\";\")\n"
+-							"O8=stringlistsize(\"A B C;D\",\" ; \")\n"
+-							"O9=stringlistsize(\"A  +B;C$D\",\"$;+\")\n"
+-
+-							"P0=stringlistsum(\"1,2,3\")\n"
+-							"P1=stringlistsum(\"\")\n"
+-							"P2=stringlistsum(\"1;2;3\",\";\")\n"
+-							"P3=isError(stringlistsum(\"1;2;3\",true))\n"
+-							"P4=isError(stringlistsum(true,\"1;2;3\"))\n"
+-							"P5=isError(stringlistsum(\"this, list, bad\"))\n"
+-							"P6=stringlistsum(\"1,2.0,3\")\n"
+-
+-							"Q0=stringlistmin(\"-1,2,-3\")\n"
+-							"Q1=isUndefined(stringlistmin(\"\"))\n"
+-							"Q2=stringlistmin(\"1;2;3\",\";\")\n"
+-							"Q3=isError(stringlistmin(\"1;2;3\",true))\n"
+-							"Q4=isError(stringlistmin(true,\"1;2;3\"))\n"
+-							"Q5=isError(stringlistmin(\"this, list, bad\"))\n"
+-							"Q6=isError(stringlistmin(\"1;A;3\",\";\"))\n"
+-							"Q7=stringlistmin(\"1,-2.0,3\")\n"
+-
+-							"R0=stringlistmax(\"1 , 4.5, -5\")\n"
+-							"R1=isUndefined(stringlistmax(\"\"))\n"
+-							"R2=stringlistmax(\"1;2;3\",\";\")\n"
+-							"R3=isError(stringlistmax(\"1;2;3\",true))\n"
+-							"R4=isError(stringlistmax(true,\"1;2;3\"))\n"
+-							"R5=isError(stringlistmax(\"this, list, bad\"))\n"
+-							"R6=isError(stringlistmax(\"1;A;3\",\";\"))\n"
+-							"R7=stringlistmax(\"1,-2.0,3.0\")\n"
+-
+-							"S0=stringlistavg(\"10, 20, 30, 40\")\n"
+-							"S1=stringlistavg(\"\")\n"
+-							"S2=stringlistavg(\"1;2;3\",\";\")\n"
+-							"S3=isError(stringlistavg(\"1;2;3\",true))\n"
+-							"S4=isError(stringlistavg(true,\"1;2;3\"))\n"
+-							"S5=isError(stringlistavg(\"this, list, bad\"))\n"
+-							"S6=isError(stringlistavg(\"1;A;3\",\";\"))\n"
+-							"S7=stringlistavg(\"1,-2.0,3.0\")\n"
+-
+-							"U0=stringlistmember(\"green\", \"red, blue, green\")\n"
+-							"U1=stringlistmember(\"green\",\"\")\n"
+-							"U2=stringlistmember(\"green\", \"red; blue; green\",\";\")\n"
+-							"U3=isError(stringlistmember(\"green\",\"1;2;3\",true))\n"
+-							"U4=isError(stringlistmember(\"green\",true,\";\"))\n"
+-							"U5=isError(stringlistmember(true,\"green\",\";\"))\n"
+-							"U6=isError(stringlistmember(\"this, list, bad\"))\n"
+-							"U7=isError(stringlistmember(\"1;A;3\",\";\"))\n"
+-							"U8=stringlistmember(\"-2.9\",\"1,-2.0,3.0\")\n"
+-
+-							"U=stringlistmember(\"green\", \"red, blue, green\")\n"
+-							"V=stringlistimember(\"ReD\", \"RED, BLUE, GREEN\")\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function stringlists() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function stringlists() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("O0", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O1", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O2", NULL, integer) && (integer == 5)) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("O3", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistsize expected error arg 2 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 2 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("O4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistsize expected error arg 1 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O5", NULL, integer) ) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O6", NULL, integer) ) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O7", NULL, integer) ) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O8", NULL, integer) ) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("O9", NULL, integer) ) {
+-			printf("Passed: Evaluating stringlistsize gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsize Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-		if (classad->EvalInteger("P0", NULL, integer) && (integer == 6)) {
+-			printf("Passed: Evaluating stringlistsum gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("P1", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating stringlistsum gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("P2", NULL, integer) && (integer == 6)) {
+-			printf("Passed: Evaluating stringlistsum gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("P3", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistsum expected error arg 2 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum Got error arg 2 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("P4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistsum expected error arg 1 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("P5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistsum expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("P6", NULL, real) && (real == 6.0)) {
+-			printf("Passed: Evaluating stringlistsum gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistsum gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("Q0", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating stringlistmin gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("Q1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin expected UNDEFINED for empty list: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin expected UNDEFINED for empty list %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("Q2", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("Q3", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin expected error arg 2 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin Got error arg 2 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("Q4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin expected error arg 1 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("Q5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("Q6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmin expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmin Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("Q7", NULL, real) && (real == -2.0)) {
+-			printf("Passed: Evaluating stringlistmin gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("R0", NULL, real) && (real == 4.5)) {
+-			printf("Passed: Evaluating stringlistmax gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("R1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmax expected UNDEFINED for empty list: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax expected UNDEFINED for empty list %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("R2", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating stringlistmax gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("R3", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmax expected error arg 2 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax Got error arg 2 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("R4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmax expected error arg 1 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("R5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmax expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("R6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmax expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("R7", NULL, real) && (real == 3.0)) {
+-			printf("Passed: Evaluating stringlistmax gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmax gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("S0", NULL, real) && (real == 25.0)) {
+-			printf("Passed: Evaluating stringlistavg gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("S1", NULL, real) && (real == 0.0)) {
+-			printf("Passed: Evaluating stringlistavg gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("S2", NULL, real) && (real == 2.0)) {
+-			printf("Passed: Evaluating stringlistavg gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("S3", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistavg expected error arg 2 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg Got error arg 2 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("S4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistavg expected error arg 1 not string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg Got error arg 1 not string %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("S5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistavg expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("S6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistavg expected error list not all numbers: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg Got error list not all numbers %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("S7", NULL, real) && (real > 0.6)) {
+-			printf("Passed: Evaluating stringlistavg gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistavg gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("U", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistmember gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistmember gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("V", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlistimember gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlistimember gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_real(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-    float	real;
+-
+-	char classad_string[] = 
+-							"BC0=real(-3)\n"
+-							"BC1=real(3.4)\n"
+-							"BC2=real(-3.4)\n"
+-							"BC3=real(\"-3.4\")\n"
+-							"BC4=real(true)\n"
+-							"BC5=real(t)\n"
+-							"BC6=real(false)\n"
+-							"BC7=real(f)\n"
+-							"BC8=real(\"this is not a number\")\n"
+-							"BC9=isError(BC8)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function real() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function real() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC9", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(BC9) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(BC9) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC8", NULL, real) && 
+-			test_floats_close(real, 0.0)) {
+-			printf("Failed: Evaluating real(weirdstring)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		} else {
+-			printf("Passed: Evaluating real(weirdstring) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		}
+-
+-		if (classad->EvalFloat("BC7", NULL, real) && 
+-			test_floats_close(real, 0.0)) {
+-			printf("Passed: Evaluating real(f)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(f) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC6", NULL, real) && 
+-			test_floats_close(real, 0.0)) {
+-			printf("Passed: Evaluating real(false)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(false) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC5", NULL, real) && 
+-			test_floats_close(real, 1.0)) {
+-			printf("Passed: Evaluating real(t)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(t) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC4", NULL, real) && 
+-			test_floats_close(real, 1.0)) {
+-			printf("Passed: Evaluating real(true)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(true) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC3", NULL, real) && 
+-			test_floats_close(real, -3.4 )) {
+-			printf("Passed: Evaluating real('-3.4')  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real('-3.4') gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC2", NULL, real) && 
+-			test_floats_close(real, -3.4)) {
+-			printf("Passed: Evaluating real(-3.4)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(-3.4) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC1", NULL, real) && 
+-			test_floats_close(real, 3.400000)) {
+-			printf("Passed: Evaluating real(3.4)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(3.4) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC0", NULL, real) && 
+-			test_floats_close(real, -3.0)) {
+-			printf("Passed: Evaluating real(-3)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating real(-3) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_string(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=string(\"-3\")\n"
+-							"BC1=string(123)\n"
+-							"E0=isError(BC1)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function string() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function string() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalString("BC0", NULL, big_string)) {
+-			printf("Passed: Evaluating string function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating for string in line %d\n",
+-				   __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BC1", NULL, big_string)) {
+-			printf("Passed: Evaluating integer passed in to string: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: missed bad string passed in : %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_strcat(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-
+-	char classad_string[] = 
+-							"BC0=strcat(\"-3\",\"3\")\n"
+-							"BC1=strcat(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function strcat() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function strcat() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalString("BC0", NULL, big_string) && (strcmp("-33",big_string) == 0)) {
+-			printf("Passed: Evaluating string function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating for strcat<<%s>> in line %d\n",
+-				   big_string,__LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("BC1", NULL, big_string) && (strcmp("abcdefg",big_string) == 0)) {
+-			printf("Passed: Evaluating string function gives: '%s' in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating for strcat<<%s>> in line %d\n",
+-				   big_string,__LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_floor(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=floor(\"-3\")\n"
+-							"BC1=floor(\"-3.4\")\n"
+-							"BC2=floor(\"3\")\n"
+-							"BC3=floor(5)\n"
+-							"BC4=floor(5.2)\n"
+-							// error test ??????
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function floor() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function floor() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("BC0", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating floor gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating floor gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC1", NULL, integer) && (integer == -4)) {
+-			printf("Passed: Evaluating floor gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating floor gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC2", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating floor gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating floor gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC3", NULL, integer) && (integer == 5)) {
+-			printf("Passed: Evaluating floor gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating floor gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC4", NULL, integer) && (integer == 5)) {
+-			printf("Passed: Evaluating floor gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating floor gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_ceiling(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=ceiling(\"-3\")\n"
+-							"BC1=ceiling(\"-3.4\")\n"
+-							"BC2=ceiling(\"3\")\n"
+-							"BC3=ceiling(5)\n"
+-							"BC4=ceiling(5.2)\n"
+-							// error test ??????
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function ceiling() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function ceiling() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("BC0", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating ceiling gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ceiling gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC1", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating ceiling gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ceiling gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC2", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating ceiling gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ceiling gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC3", NULL, integer) && (integer == 5)) {
+-			printf("Passed: Evaluating ceiling gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ceiling gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC4", NULL, integer) && (integer == 6)) {
+-			printf("Passed: Evaluating ceiling gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating ceiling gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_round(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=round(\"-3\")\n"
+-							"BC1=round(\"-3.5\")\n"
+-							"BC2=round(\"3\")\n"
+-							"BC3=round(5.5)\n"
+-							"BC4=round(5.2)\n"
+-							// error test ??????
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function round() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function round() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("BC4", NULL, integer) && (integer == 5)) {
+-			printf("Passed: Evaluating round gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating round gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC3", NULL, integer) && (integer == 6)) {
+-			printf("Passed: Evaluating round gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating round gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC2", NULL, integer) && (integer == 3)) {
+-			printf("Passed: Evaluating round gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating round gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC1", NULL, integer) && (integer == -4)) {
+-			printf("Passed: Evaluating round gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating round gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC0", NULL, integer) && (integer == -3)) {
+-			printf("Passed: Evaluating round gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating round gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_random(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-    float	real;
+-
+-	char classad_string[] = 
+-							"BC1=random(5)\n"
+-							"BC2=random()\n"
+-							"BC3=random(3.5)\n"
+-							"BC4=random(\"-3.5\")\n"
+-							"BC5=random(\"-3.5\")\n"
+-							"BC6=random(\"-3.5\")\n"
+-							"BC7=random(\"3\")\n"
+-							"BC8=random(5.5)\n"
+-							"BC9=random(5.2)\n"
+-							// error testn test_function_iserror 
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function random() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function random() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalFloat("BC3", NULL, real) 
+-			&& (real > 0) && (real < 3.5)) {
+-			printf("Passed: Evaluating random(3.5)  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating random(3.5) gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalFloat("BC2", NULL, real) 
+-			&& (real > 0) && (real < 1)) {
+-			printf("Passed: Evaluating random()  gives: %f in line %d\n", 
+-				   real, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating random() gave %f in line %d\n",
+-				   real, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("BC1", NULL, integer) 
+-			&& (integer >= 0) && (integer < 5)) {
+-			printf("Passed: Evaluating random(5)  gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating random(5) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_isstring(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC3=isString(\"abc\")\n"
+-							"BC0=isString(strcat(\"-3\",\"3\"))\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function isString() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function isString() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC3", NULL, integer)) {
+-			printf("Passed: Evaluating isString \"abc\": %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isString \"abc\" : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC0", NULL, integer)) {
+-			printf("Passed: Evaluating isString strcat(\"-3\",\"3\"): %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isString strcat(\"-3\",\"3\"): %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_isundefined(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BB=2\n"
+-							"BC=10\n"
+-							//"BD=undefined:"
+-							"BB0=isUndefined(BD)\n"
+-							"BB1=isUndefined(BC)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function isundefined() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function isundefined() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BB0", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isUndefined(BB0) returned true(1) when it should : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isUndefined(BB0) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BB1", NULL, integer) &&
+-				(integer == 0)) {
+-			printf("Passed: Evaluating isUndefined(BB1) return false(0) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isUndefined(BB1) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_iserror(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC0=isError(random(\"-3\"))\n"
+-							"BC1=isError(int(\"this is not an int\"))\n"
+-							"BC2=isError(real(\"this is not a float\"))\n"
+-							"BC3=isError(floor(\"this is not a float\"))\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function iserror() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function iserror() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC0", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(random(BC0)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(random(BC0)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC1", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(int(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(int(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC2", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(real(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(real(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC3", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating isError(floor(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isError(floor(non nummeric string)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_isinteger(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC1=isInteger(-3.4 )\n"
+-							"BC2=isInteger(-3)\n"
+-							"BC3=isInteger(\"-3\")\n"
+-							"BC4=isInteger( 3.4 )\n"
+-							"BC5=isInteger( int(3.4) )\n"
+-							"BC6=isInteger(int(\"-3\"))\n"
+-							"BC7=isInteger(3)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function isinteger() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function isinteger() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC1", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isInteger( -3.4 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger( -3.4 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC2", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isInteger( -3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger( -3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC3", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isInteger(\"-3\" ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger(\"-3\") : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC4", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isInteger(3.4) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger(3.4) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isInteger( int(3.4) ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger( int(3.4) ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isInteger( int(\"-3\") ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger(int(\"-3\")) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC7", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isInteger( 3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isInteger( 3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_isreal(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC1=isReal(-3.4 )\n"
+-							"BC2=isReal(-3)\n"
+-							"BC3=isReal(\"-3\")\n"
+-							"BC4=isReal( 3.4 )\n"
+-							"BC5=isReal( real(3) )\n"
+-							"BC6=isReal(real(\"-3\"))\n"
+-							"BC7=isReal(3)\n"
+-							"BC8=isReal(3,1)\n"
+-							"BC9=isError(BC8)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function isreal() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function isreal() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isReal( -3.4 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal( -3.4 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC2", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isReal( -3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal( -3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC3", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isReal(\"-3\" ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal(\"-3\") : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC4", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isReal(3.4) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal(3.4) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC5", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isReal( real(3) ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal( real(3) ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isReal( real(\"-3\") ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal(real(\"-3\")) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC7", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating isReal( 3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal( 3 ) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("BC9", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isReal( x,y) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isReal( x,y) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_isboolean(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"BC1=isBoolean(isReal(-3.4 ))\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function isboolean() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function isboolean() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("BC1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating isBoolean(isReal( 3.4)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating isBolean(isReal( 3.4)) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-
+-static void test_function_formattime(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	char	i0[1024];
+-	int 	integer;
+-
+-	char classad_string[] = 
+-							"I0=formattime()\n"
+-							"I1=formattime(CurrentTime)\n"
+-							"I2=formattime(CurrentTime,\"%c\")\n"
+-							"I3=formattime(1174737600,\"%m/%d/%y\")\n"
+-							"I4=formattime(-231)\n"
+-							"I5=formattime(1174694400,1174694400)\n"
+-							"E0=isError(I4)\n"
+-							"E1=isError(I5)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function formattime() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function formattime() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalString("I0", NULL, i0)) {
+-			printf("Passed: Evaluating formattime() gives: %s in line %d\n", 
+-				   i0, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating formattime() gives: %s in line %d\n",
+-				   i0, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		int retry_count = 0;
+-		first_retry:
+-		if (classad->EvalString("I1", NULL, big_string) && 
+-				(strcmp(big_string, i0) == 0)) {
+-			printf("Passed: Evaluating formattime(CurrentTime) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			retry_count++;
+-			if (retry_count < 10) {	
+-					classad->EvalString("I0", NULL, i0);
+-					goto first_retry;
+-			}
+-			printf("Failed: Evaluating formattime(CurrentTime) gives: %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		retry_count = 0;
+-		second_retry:
+-		if (classad->EvalString("I2", NULL, big_string) && 
+-				(strcmp(big_string, i0) == 0)) {
+-			printf("Passed: Evaluating formattime(CurrentTime,\"%%c\") gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			retry_count++;
+-			if (retry_count < 10) {	
+-					classad->EvalString("I0", NULL, i0);
+-					goto second_retry;
+-			}
+-			printf("Failed: Evaluating formattime(CurrentTime,\"%%c\") gives: %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("I3", NULL, big_string) && 
+-				(strcmp(big_string, "03/24/07") == 0)) {
+-			printf("Passed: Evaluating formattime(1174737600,\"%%m/%%d/%%y\") gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating formattime(1174737600,\"%%m/%%d/%%y\") gives: %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-
+-
+-		if (classad->EvalBool("E0", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Caught error from a negative time : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: did not catch error from a negative time : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Bad string caught : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Bad string missed : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-
+-static void test_function_substr(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int 	integer;
+-
+-	char classad_string[] = 
+-							"I0=substr(\"abcdefg\", 3)\n"
+-							"I1=substr(\"abcdefg\", 3, 2)\n"
+-							"I2=substr(\"abcdefg\", -2, 1)\n"
+-							"I3=substr(\"abcdefg\", 3, -1)\n"
+-							"I4=substr(\"abcdefg\", 3, -9)\n"
+-							"I5=substr(\"abcdefg\", 3.3, -9)\n"
+-							"I6=substr(foo, 3, -9)\n"
+-							"E0=isError(I5)\n"
+-							"E1=isError(I6)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function substr() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function substr() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalString("I0", NULL, big_string) && 
+-				(strcmp(big_string, "defg") == 0)) {
+-			printf("Passed: Evaluating substr(\"abcdefg\", 3) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating substr substr(\"abcdefg\", 3) %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("I1", NULL, big_string) && 
+-				(strcmp(big_string, "de") == 0)) {
+-			printf("Passed: Evaluating substr(\"abcdefg\", 3, 2) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating substr substr(\"abcdefg\", 3, 2) %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("I2", NULL, big_string) && 
+-				(strcmp(big_string, "f") == 0)) {
+-			printf("Passed: Evaluating substr(\"abcdefg\", -2, 1) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating substr substr(\"abcdefg\", -2, 1) %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("I3", NULL, big_string) && 
+-				(strcmp(big_string, "def") == 0)) {
+-			printf("Passed: Evaluating substr(\"abcdefg\", 3, -1) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating substr substr(\"abcdefg\", 3, -1) %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("I4", NULL, big_string) && 
+-				(strcmp(big_string, "") == 0)) {
+-			printf("Passed: Evaluating substr(\"abcdefg\", 3, -9) gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating substr substr(\"abcdefg\", 3, -9) %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E0", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Caught error from a float for the offset) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: did not catch error from a float for the offset) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E1", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Bad string caught) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Bad string missed) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_strcmp(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	int		integer;
+-
+-	char classad_string[] = 
+-							"J0=strcmp(\"ABCDEFgxx\"; \"ABCDEFg\")\n"
+-							"J1=strcmp(\"BBBBBBBxx\"; \"CCCCCCC\")\n"
+-							"J2=strcmp(\"AbAbAbAb\"; \"AbAbAbAb\")\n"
+-							"J3=strcmp(1+1; \"2\")\n"
+-							"J4=strcmp(\"2\"; 1+1)\n"
+-							"K0=stricmp(\"ABCDEFg\"; \"abcdefg\")\n"
+-							"K1=stricmp(\"ffgghh\"; \"aabbcc\")\n"
+-							"K2=stricmp(\"aBabcd\"; \"ffgghh\")\n"
+-							"K3=stricmp(1+1; \"2\")\n"
+-							"K4=stricmp(\"2\"; 1+1)\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function strcmp() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function strcmp() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalInteger("J0", NULL, integer) && (integer > 0)) {
+-			printf("Passed: Evaluating strcmp(\"ABCDEFgxx\"; \"ABCDEFg\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating strcmp(\"ABCDEFgxx\"; \"ABCDEFg\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("J1", NULL, integer) && (integer < 0)) {
+-			printf("Passed: Evaluating strcmp(\"BBBBBBBxx\"; \"CCCCCCC\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating strcmp(\"BBBBBBBxx\"; \"CCCCCCC\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("J2", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating strcmp(\"AbAbAbAb\"; \"AbAbAbAb\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating strcmp(\"AbAbAbAb\"; \"AbAbAbAb\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("K0", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating stricmp(\"ABCDEFg\"; \"abcdefg\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stricmp(\"ABCDEFg\"; \"abcdefg\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("K1", NULL, integer) && (integer > 0)) {
+-			printf("Passed: Evaluating stricmp(\"ffgghh\"; \"aabbcc\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stricmp(\"ffgghh\"; \"aabbcc\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("K2", NULL, integer) && (integer < 0)) {
+-			printf("Passed: Evaluating stricmp(\"aBabcd\"; \"ffgghh\") gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stricmp(\"aBabcd\"; \"ffgghh\") gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("K3", NULL, integer) && (integer == 0)) {
+-			printf("Passed: stricmp Converted int first arg to string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: stricmp did not convert int first arg to expected string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("K4", NULL, integer) && (integer == 0)) {
+-			printf("Passed: stricmp Converted int second arg to string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: stricmp did not convert int second arg to expected string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("J3", NULL, integer) && (integer == 0)) {
+-			printf("Passed: strcmp Converted int first arg to string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: strcmp did not convert int first arg to expected string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalInteger("J4", NULL, integer) && (integer == 0)) {
+-			printf("Passed: strcmp Converted int second arg to string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: strcmp did not convert int second arg to expected string) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_attrnm(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-    float	real;
+-	bool	found_bool;
+-
+-	char classad_string[] = 
+-							"T012=t\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function attrnm() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function attrnm() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_regexp(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-    float	real;
+-	bool	found_bool;
+-
+-	char classad_string[] = 
+-							"W0=regexp(\"[Mm]atcH.i\", \"thisisamatchlist\", \"i\")\n"
+-							"W1=regexp(20, \"thisisamatchlist\", \"i\")\n"
+-							"E1=isError(W1)\n" 
+-							"W2=regexp(\"[Mm]atcH.i\", 20, \"i\")\n"
+-							"E2=isError(W2)\n" 
+-							"W3=regexp(\"[Mm]atcH.i\", \"thisisamatchlist\", 20)\n"
+-							"E3=isError(W3)\n" 
+-							"W4=regexp(\"[Mm]atcH.i\", \"thisisalist\", \"i\")\n"
+-							"W5=regexp(\"[Mm]atcH.i\", \"thisisamatchlist\")\n"
+-							"W6=regexp(\"([Mm]+[Nn]+)\", \"aaaaaaaaaabbbmmmmmNNNNNN\", \"i\")\n"
+-
+-							"X0=regexps(\"([Mm]at)c(h).i\", \"thisisamatchlist\", \"one is \\1 two is \\2\")\n"
+-							"X1=regexps(\"([Mm]at)c(h).i\", \"thisisamatchlist\", \"one is \\1 two is \\2\",\"i\")\n"
+-							"X2=regexps(20 , \"thisisamatchlist\", \"one is \\1 two is \\2\",\"i\")\n"
+-							"E4=isError(X2)\n" 
+-							"X3=regexps(\"([Mm]at)c(h).i\", 20 , \"one is \\1 two is \\2\",\"i\")\n"
+-							"E5=isError(X3)\n" 
+-							"X4=regexps(\"([Mm]at)c(h).i\", \"thisisamatchlist\", 20 ,\"i\")\n"
+-							"E6=isError(X4)\n" 
+-							"X5=regexps(\"([Mm]at)c(h).i\", \"thisisamatchlist\", \"one is \\1 two is \\2\",20)\n"
+-							"E7=isError(X5)\n" 
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function regexp() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function regexp() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("W0", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating regexp match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E1", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexp pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E2", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexp target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E3", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexp optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W4", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating regexp not a match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp not a match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W5", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating regexp not a match(case sensitive) gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp not a match(case sensitive) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating regexp match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexp match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("X0", NULL, big_string) ||
+-				strcmp(big_string, "one is mat two is h")) {
+-			printf("Passed: Evaluating regexps gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps gave %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalString("X1", NULL, big_string) ||
+-				strcmp(big_string, "one is mat two is h")) {
+-			printf("Passed: Evaluating regexps gives: %s in line %d\n", 
+-				   big_string, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps gave %s in line %d\n",
+-				   big_string, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E4", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexps pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E5", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexps target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E6", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexps return arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps return arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E7", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating regexps optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating regexps optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_stringlists_regexpmember(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-    float	real;
+-	bool	found_bool;
+-
+-	char classad_string[] = 
+-							"U0=stringlist_regexpMember(\"green\", \"red, blue, green\")\n"
+-							"U1=stringlist_regexpMember(\"green\", \"red; blue; green\",\"; \")\n"
+-							"U2=stringlist_regexpMember(\"([e]+)\", \"red, blue, green\")\n"
+-							"U3=stringlist_regexpMember(\"([p]+)\", \"red, blue, green\")\n"
+-							"W0=stringlist_regexpMember(\"[Mm]atcH.i\", \"thisisamatchlist\", \" ,\", \"i\")\n"
+-							"W1=stringlist_regexpMember(20, \"thisisamatchlist\", \"i\")\n"
+-							"E1=isError(W1)\n" 
+-							"W2=stringlist_regexpMember(\"[Mm]atcH.i\", 20, \"i\")\n"
+-							"E2=isError(W2)\n" 
+-							"W3=stringlist_regexpMember(\"[Mm]atcH.i\", \"thisisamatchlist\", 20)\n"
+-							"E3=isError(W3)\n" 
+-							"W7=stringlist_regexpMember(\"[Mm]atcH.i\", \"thisisamatchlist\", \" ,\", 20)\n"
+-							"E4=isError(W7)\n" 
+-							"W4=stringlist_regexpMember(\"[Mm]atcH.i\", \"thisisalist\", \" ,\", \"i\")\n"
+-							"W5=stringlist_regexpMember(\"[Mm]atcH.i\", \"thisisamatchlist\")\n"
+-							"W6=stringlist_regexpMember(\"([Mm]+[Nn]+)\", \"aaaaaaaaaabbbmmmmmNNNNNN\", \" ,\", \"i\")\n"
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function stringlists_regexpmember() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function stringlists_regexpmember() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-
+-		if (classad->EvalBool("U0", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember matching green : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember failed matching green: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("U1", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember matching green(delimiter change) : %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember failed matching green(delimiter change): %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("U2", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember matching multiple hits in stringlist: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember failed matching multiple hits in stringlist: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("U3", NULL, integer) &&
+-				(integer == 0)) {
+-			printf("Passed: Evaluating stringlist_regexpMember multiple stringlist misses: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember multiple stringlist misses: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W0", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E1", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember pattern arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E2", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember target arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E3", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember optional delimiter not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember optional delimiter not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("E4", NULL, integer) &&
+-				(integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember optional option arg not a string: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W4", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating stringlist_regexpMember not a match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember not a match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W5", NULL, integer) && (integer == 0)) {
+-			printf("Passed: Evaluating stringlist_regexpMember not a match(case sensitive) gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember not a match(case sensitive) gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-		if (classad->EvalBool("W6", NULL, integer) && (integer == 1)) {
+-			printf("Passed: Evaluating stringlist_regexpMember match gives: %d in line %d\n", 
+-				   integer, __LINE__);
+-			results->AddResult(true);
+-		} else {
+-			printf("Failed: Evaluating stringlist_regexpMember match gave %d in line %d\n",
+-				   integer, __LINE__);
+-			results->AddResult(false);
+-		}
+-
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static void test_function_XXX(
+-	TestResults  *results)     // OUT: Modified to reflect result of test
+-{
+-	char	big_string[1024];
+-	int		integer;
+-    float	real;
+-	bool	found_bool;
+-
+-	char classad_string[] = 
+-							"";
+-
+-	ClassAd  *classad;
+-
+-	config(0);
+-
+-	classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-	if (classad == NULL) {
+-		printf("Can't parse ClassAd for function XXX() in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(false);
+-	} else {
+-		printf("Parsed ClassAd for << function XXX() >> in line %d\n", 
+-			   __LINE__);
+-		results->AddResult(true);
+-        delete classad;
+-	}
+-	return;
+-}
+-
+-static bool test_floats_close( float one, float two, float diff)
+-{
+-	float ftmp = abs(one) - abs(two);
+-	if(abs(ftmp) <= diff) {
+-		return(true);
+-	} else {
+-		return(true);
+-	}
+-}
+-#endif
+-
+-/***************************************************************
+- *
+- * Function: print_truncated_string
+- * Purpose:  Make sure that a string prints out with no more than
+- *           the given number of characters. If the string is 
+- *           too long, we put an ellipsis at the end. 
+- *
+- ***************************************************************/
+-void 
+-print_truncated_string(
+-    const char *s,        // IN: The string to print
+-	int max_characters)   // IN: The maximum number of characters to print
+-{
+-	int length;
+-
+-	if (max_characters < 1) {
+-		max_characters = 1;
+-	}
+-
+-	length = strlen(s);
+-	if (length > max_characters) {
+-		if (max_characters > 3) {
+-			printf("%.*s...", max_characters - 3, s);
+-		}
+-		else {
+-			printf("%.*s", max_characters, s); 
+-		}
+-	}
+-	else {
+-		printf("%s", s);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: make_big_string
+- * Purpose:  create a string of a given length, and fill it with 
+- *           random stuff. If quoted_string is not NULL, we make it
+- *           a copy of the big string, except with quotes around it.
+- *
+- ***************************************************************/
+-static void 
+-make_big_string(
+-    int length,           // IN: The desired length
+-	char **string,        // OUT: the big random string
+-	char **quoted_string) // OUT: the string in quotes
+-{
+-	*string = (char *) malloc(length + 1);
+-
+-	for (int i = 0; i < length; i++) {
+-		(*string)[i] = (rand() % 26) + 97; 
+-	}
+-	(*string)[length] = 0;
+-
+-	if (quoted_string != NULL) {
+-		*quoted_string = (char *) malloc(length + 3);
+-		sprintf(*quoted_string, "\"%s\"", *string);
+-	}
+-	return;
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_random
+- * Purpose:  Test the random() function in ClassAds. Our testing
+- *           is a bit wonky: since we are getting random numbers,
+- *           we can't be sure our tests will work, but chances
+- *           are good. :)
+- *
+- ***************************************************************/
+-void test_random(
+-    TestResults *results)
+-{
+-    char *classad_string = "R1 = random()\nR2 = random(10)";
+-    int  base_r1, r1;
+-    int  r2;
+-    bool have_different_numbers;
+-    bool numbers_in_range;
+-	int	i;
+-
+-    ClassAd *classad;
+-
+-    classad = new ClassAd;
+-	classad->initFromString(classad_string, NULL);
+-
+-    // First we check that random gives us different numbers
+-    have_different_numbers = false;
+-    classad->EvalInteger("R1", NULL, base_r1);
+-    for ( i = 0; i < 10; i++) {
+-        classad->EvalInteger("R1", NULL, r1);
+-        if (r1 != base_r1) {
+-            have_different_numbers = true;
+-            break;
+-        }
+-    }
+-
+-    // Then we check that random gives numbers in the correct range
+-    numbers_in_range = true;
+-    for ( i = 0; i < 10; i++) {
+-        classad->EvalInteger("R2", NULL, r2);
+-        if (r2 < 0 || r2 >= 10) {
+-            numbers_in_range = false;
+-            break;
+-        }
+-    }
+-
+-    if (have_different_numbers) {
+-        printf("Passed: Random generates a variety of numbers in line %d\n", 
+-               __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: Random does not generate a variety of numbers in line %d\n", 
+-               __LINE__);
+-        results->AddResult(false);
+-    }
+-
+-    if (numbers_in_range) {
+-        printf("Passed: Random generates numbers in correct range in %d\n", 
+-               __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Passed: Random does not generate numbers in correct range in %d\n", 
+-               __LINE__);
+-        results->AddResult(false);
+-    }
+-    delete classad;
+-    return;
+-}
+-
+-void test_equality(TestResults *results)
+-{
+-    ExprTree *e1, *e2, *e3;
+-	MyString n1, n2, n3;
+-    const char *s1 = "Foo = 3";
+-    const char *s3 = "Bar = 5";
+-
+-    Parse(s1, n1, e1);
+-    Parse(s1, n2, e2);
+-    Parse(s3, n3, e3);
+-
+-    if ((*e1) == (*e2) && n1 == n2) {
+-        printf("Passed: operator== detects equality in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: operator== does not detect equality in line %d\n", __LINE__);
+-        results->AddResult(false);
+-    }
+-
+-    if ((*e1) == (*e3) || n1 == n3) {
+-        printf("Failed: operator== does not detect inequality in line %d\n", __LINE__);
+-        results->AddResult(false);
+-    } else {
+-        printf("Passed: operator== detects inequality in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    }
+-    return;
+-}
+-
+-// I wrote this function to ensure that short-circuiting
+-// in ClassAds works correctly, and to ensure that when
+-// I added short-circuiting, I didn't break normal evaluation
+-void test_operators(TestResults *results)
+-{
+-    extern bool classad_debug_function_run;
+-    char *classad_string = 
+-        // Test short-circuiting with logical OR
+-        "A = TRUE || _debug_function_()\n "
+-        "B = 1 || _debug_function_()\n "
+-        "C = 1.2 || _debug_function_()\n "
+-        // Test no short-circuiting with logical OR
+-        "D = \"foo\" || _debug_function_()\n "
+-        "E = FALSE || _debug_function_()\n "
+-        "G = 0 || _debug_function_()\n "
+-        "H = 0.0 || _debug_function_()\n "
+-        // Test short-circuiting with logical AND
+-        "I = FALSE && _debug_function_()\n "
+-        "J = 0 && _debug_function_()\n "
+-        "K = 0.0 && _debug_function_()\n "
+-        "L = \"foo\" && _debug_function_()\n "
+-        // Test no short-circuiting with logical AND
+-        "M = TRUE && _debug_function_()\n "
+-        "N = 1 && _debug_function_()\n "
+-        "O = 1.2 && _debug_function_() ";
+-    ClassAd *c = new ClassAd;
+-	c->initFromString(classad_string, NULL);
+-
+-    // Test short-circuiting with logical OR
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "A", 1, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "B", 1, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "C", 1, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    // Test no short-circuiting with logical OR
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "D", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "E", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "G", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "H", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    // Test short-circuiting with logical AND
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "I", 0, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "J", 0, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "K", 0, __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_error(c, "L", __LINE__, results);
+-    test_debug_function_run(false, __LINE__, results);
+-
+-    // Test no short-circuiting with logical AND
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "M", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "N", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-    classad_debug_function_run = false;
+-    test_eval_bool(c, "O", 1, __LINE__, results);
+-    test_debug_function_run(true, __LINE__, results);
+-
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_scoping 
+- * Purpose:  Make sure that when someone specified MY. or TARGET.,
+- *           it only looks there. From 6.3.something through 
+- *           6.7.17, MY and TARGET provided a search order, not
+- *           a scope. 
+- *
+- ***************************************************************/
+-void 
+-test_scoping(TestResults *results)
+-{
+-    char *ad1_string = "A = MY.X\n B = TARGET.X\n C=MY.Y\n D = TARGET.Y\n E = Y\n G=MY.Z\n H=TARGET.Z\n J=TARGET.K\n L=5\n X = 1\n Z=4";
+-    char *ad2_string = "X = 2\n Y = 3\n K=TARGET.L";
+-    int value;
+-    ClassAd *ad1  =  new ClassAd;
+-	ad1->initFromString(ad1_string, NULL);
+-    ClassAd *ad2  =  new ClassAd;
+-	ad2->initFromString(ad2_string, NULL);
+-
+-    if (ad1->EvalInteger("A", ad2, value) && value == 1) {
+-         printf("Passed: eval of A is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of A is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (ad1->EvalInteger("B", ad2, value) && value == 2) {
+-         printf("Passed: eval of B is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of B is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (!ad1->EvalInteger("C", ad2, value)) {
+-         printf("Passed: eval of C is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of C is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (ad1->EvalInteger("D", ad2, value) && value == 3) {
+-         printf("Passed: eval of D is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of D is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (ad1->EvalInteger("E", ad2, value) && value == 3) {
+-         printf("Passed: eval of E is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of E is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (ad1->EvalInteger("G", ad2, value) && value == 4) {
+-         printf("Passed: eval of G is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of G is bad in line %d\n", __LINE__);
+-    }
+-
+-    if (!ad1->EvalInteger("H", ad2, value)) {
+-         printf("Passed: eval of H is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of H is bad in line %d\n", __LINE__);
+-    }
+-    
+-    if (ad1->EvalInteger("J", ad2, value) && value == 5) {
+-         printf("Passed: eval of J is good in line %d\n", __LINE__);
+-        results->AddResult(true);
+-    } else {
+-        printf("Failed: eval of J is bad in line %d\n", __LINE__);
+-    }
+-}
+-
+-/***************************************************************
+- *
+- * Function: test_eval_error
+- * Purpose:  Given a classad and an attribute within the classad,
+- *           test that the attribute evaluates an error
+- *
+- ***************************************************************/
+-void 
+-test_debug_function_run(
+-    bool        expect_run,      // IN: Do we expect that it ran?
+-    int         line_number,     // IN: The line number to print
+-    TestResults *results)        // OUT: Modified to reflect result of test
+-{
+-    extern bool classad_debug_function_run;
+-    if (expect_run) {
+-        if (classad_debug_function_run) {
+-            printf("Passed: ClassAd debug function ran as expected in line %d\n", 
+-                   line_number);
+-            results->AddResult(true);
+-        } else {
+-            printf("Failed: ClassAd debug function did not run, but was expected to in line %d\n", 
+-                   line_number);
+-            results->AddResult(false);
+-        }
+-    } else {
+-        if (!classad_debug_function_run) {
+-            printf("Passed: ClassAd debug function did not run, and was not expected to in line %d.\n", 
+-                   line_number);
+-            results->AddResult(true);
+-        } else {
+-            printf("Failed: ClassAd debug function run when it was not expected to in line %d.\n", 
+-                   line_number);
+-            results->AddResult(false);
+-        }
+-    }
+-
+-	return;
+-}
+diff --git a/src/.deprecate_classad.old/value.cpp b/src/.deprecate_classad.old/value.cpp
+deleted file mode 100644
+index 1fdeec8..0000000
+--- a/src/.deprecate_classad.old/value.cpp
++++ /dev/null
+@@ -1,132 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#include "condor_common.h"
+-#include "value.h"
+-
+-
+-Value::
+-Value()
+-{
+-	valueType = UNDEFINED_VALUE;
+-	integerValue = 0;
+-	realValue = 0.0;
+-	strValue = NULL;
+-}
+-
+-
+-Value::
+-~Value()
+-{
+-}
+-
+-
+-const Value& Value::
+-operator=( const Value& val )
+-{
+-	valueType = val.valueType;
+-	integerValue = val.integerValue;
+-	realValue = val.realValue;
+-	strValue = val.strValue;
+-	return( *this );
+-}
+-
+-
+-void Value::
+-clear()
+-{
+-	valueType = UNDEFINED_VALUE;
+-}
+-
+-
+-bool Value::
+-isNumber (int &i)
+-{
+-	switch (valueType)
+-	{
+-		case INTEGER_VALUE:
+-			i = integerValue;
+-			return true;
+-
+-		case REAL_VALUE:
+-			i = (int) realValue;	// truncation	
+-			return true;
+-
+-		default:
+-			return false;
+-	}
+-}
+-
+-
+-bool Value::
+-isNumber (double &r)
+-{
+-	switch (valueType)
+-	{
+-		case INTEGER_VALUE:
+-			r = (double) integerValue;
+-			return true;
+-
+-		case REAL_VALUE:
+-			r = realValue;	
+-			return true;
+-
+-		default:
+-			return false;
+-	}
+-}
+-
+-
+-void Value::
+-setRealValue (double r)
+-{
+-    clear();
+-    valueType=REAL_VALUE;
+-    realValue = r;
+-}
+-
+-void Value::
+-setIntegerValue (int i)
+-{
+-    clear();
+-    valueType=INTEGER_VALUE;
+-    integerValue = i;
+-}
+-
+-void Value::
+-setUndefinedValue (void)
+-{
+-    clear();
+-    valueType=UNDEFINED_VALUE;
+-}
+-
+-void Value::
+-setErrorValue (void)
+-{
+-    clear();
+-    valueType=ERROR_VALUE;
+-}
+-
+-void Value::
+-setStringValue(char *s)
+-{
+-    clear();
+-    valueType = STRING_VALUE;
+-    strValue = s;
+-}
+diff --git a/src/.deprecate_classad.old/value.h b/src/.deprecate_classad.old/value.h
+deleted file mode 100644
+index f01a1b5..0000000
+--- a/src/.deprecate_classad.old/value.h
++++ /dev/null
+@@ -1,111 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#ifndef __VALUES_H__
+-#define __VALUES_H__
+-
+-#include "condor_common.h"
+-
+-// the various types of values
+-enum ValueType 
+-{
+-	UNDEFINED_VALUE,
+-	ERROR_VALUE,
+-	INTEGER_VALUE,
+-	REAL_VALUE,
+-	STRING_VALUE,
+-};
+-
+-class Value;
+-
+-// the Value object
+-class Value 
+-{
+-	public:
+-		// ctor/dtor
+-	    Value();
+-		~Value();
+-
+-		// modifiers
+-		void clear(void);
+-		void setRealValue 	(double r);
+-		void setIntegerValue (int i);
+-		void setUndefinedValue(void);
+-		void setErrorValue 	(void);
+-		void setStringValue	(char *s);
+-
+-		// accessors
+-		inline bool isIntegerValue 	(int &i);
+-		inline bool isRealValue		(double &r);
+-		inline bool isStringValue	(char *&s);
+-		inline bool isUndefinedValue(void) ;
+-		inline bool isErrorValue	(void);
+-		inline ValueType getType () { return valueType; }
+-
+-		bool isNumber (int    &);
+-		bool isNumber  (double &);
+-
+-		// operators
+-		const Value &operator= (const Value &);
+-
+-	private:
+-		ValueType 	valueType;		// the type of the value
+-		int			integerValue;	// the value itself
+-		double 		realValue;
+-		char		*strValue;
+-};
+-
+-
+-
+-// implementations of the inlined functions
+-inline bool Value::
+-isIntegerValue (int &i)
+-{
+-    i = integerValue;
+-    return (valueType == INTEGER_VALUE);
+-}  
+-
+-inline bool Value::
+-isRealValue (double &r)
+-{
+-    r = realValue;
+-    return (valueType == REAL_VALUE);
+-}  
+-
+-
+-inline bool Value::
+-isStringValue(char *&s)
+-{
+-    s = strValue;
+-    return (valueType == STRING_VALUE);
+-}
+-
+-inline bool Value::
+-isUndefinedValue (void) 
+-{ 
+-	return (valueType == UNDEFINED_VALUE);
+-}
+-
+-inline bool Value::
+-isErrorValue(void)       
+-{ 
+-	return (valueType == ERROR_VALUE); 
+-}
+-
+-#endif//__VALUES_H__
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f212773..44a8535 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -33,15 +33,10 @@ if (BUILD_TESTS AND NOT WINDOWS)
+ endif()
+ 
+ if (WANT_FULL_DEPLOYMENT)
+-	install ( FILES condor_includes/condor_ast.h
+-			  condor_includes/condor_astbase.h
+-			  condor_includes/condor_attrlist.h
+-			  condor_includes/condor_classad.h
++	install ( FILES condor_includes/condor_classad.h
+ 			  condor_includes/condor_constants.h
+-			  condor_includes/condor_exprtype.h
+ 			  condor_includes/condor_header_features.h
+-			  condor_includes/condor_parser.h
+ 			  condor_includes/file_lock.h
+ 			  condor_utils/iso_dates.h
+ 			DESTINATION ${C_INCLUDE})
+-endif(WANT_FULL_DEPLOYMENT)
+\ No newline at end of file
++endif(WANT_FULL_DEPLOYMENT)
+diff --git a/src/ccb/ccb_listener.cpp b/src/ccb/ccb_listener.cpp
+index 72e7d18..101cd78 100644
+--- a/src/ccb/ccb_listener.cpp
++++ b/src/ccb/ccb_listener.cpp
+@@ -145,6 +145,10 @@ CCBListener::SendMsgToCCB(ClassAd &msg,bool blocking)
+ 		}
+ 		else if( !m_waiting_for_connect ) {
+ 			m_sock = ccb.makeConnectedSocket(Stream::reli_sock, CCB_TIMEOUT, 0, NULL, true /*nonblocking*/ );
++			if( !m_sock ) {
++				Disconnected();
++				return false;
++			}
+ 			m_waiting_for_connect = true;
+ 			incRefCount(); // do not let ourselves be deleted until called back
+ 			ccb.startCommand_nonblocking( cmd, m_sock, CCB_TIMEOUT, NULL, CCBListener::CCBConnectCallback, this, NULL, false, USE_TMP_SEC_SESSION );
+diff --git a/src/classad/CHANGELOG b/src/classad/CHANGELOG
+index e577a9e..f36b747 100644
+--- a/src/classad/CHANGELOG
++++ b/src/classad/CHANGELOG
+@@ -1,4 +1,4 @@
+-Changes for version 1.0.10 (Released ????-??-??)
++Changes for version 1.0.10 (Released 2011-04-08)
+ * Fix infinite loop and bad iterator comparison in FunctionCall::SameAs().
+ * Fix memory leak in FunctionCall::eval().
+ * Fix ClassAd::GetInternalReferences() and ClassAd::GetExternalReferences()
+diff --git a/src/classad/CMakeLists.txt b/src/classad/CMakeLists.txt
+index 293ecf4..2b2061e 100644
+--- a/src/classad/CMakeLists.txt
++++ b/src/classad/CMakeLists.txt
+@@ -15,51 +15,107 @@
+  # limitations under the License. 
+  # 
+  ############################################################### 
++include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ 
+-add_definitions(-DCLASSAD_DISTRIBUTION -DWANT_CLASSAD_NAMESPACE=1 -DDISABLE_DLOPEN_CHECK )
++#####################################################################
++## set var using master config
++add_definitions(-DCLASSAD_DISTRIBUTION -DWANT_CLASSAD_NAMESPACE=1 )
+ 
+ # disable PCRE build unless dep added to externals.
+ if(PCRE_FOUND)
++	include_directories(${PCRE_INCLUDE})
+ 	add_definitions(-DUSE_PCRE -DHAVE_PCRE_H)
+ else()
+ 	add_definitions(-DUSE_POSIX_REGEX) 
+ endif(PCRE_FOUND)
+ 
+-# in order to update configure
++if (HAVE_DLOPEN)
++	add_definitions(-DHAVE_DLOPEN)
++endif()
++
++if (HAVE_DLFCN_H)
++	add_definitions(-DHAVE_DLFCN_H)
++endif()
++
++if (HAVE_LIBDL)
++	set (DL_FOUND -ldl)
++endif (HAVE_LIBDL)
++
++##
++#####################################################################
++
++#####################################################################
++# treat like an external for others to use
++condor_pre_external( CLASSADS classads-1.0.10 "lib;include" "alwaysbuild")
++#####################################################################
++
+ if (NOT WINDOWS)
+ 
+-  # because of the external dependencies on classads we need to be careful to make it look like a normal install
+-  file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/classad DESTINATION ${EXTERNAL_STAGE}/include )
++  condor_selective_glob("attrrefs.*;classad.*;collection.*;collectionBase.*;debug.*;exprList.*;exprTree.*;fnCall.*;indexfile.*;lexer.*;lexerSource.*;literals.*;matchClassad.*;operators.*;query.*;sink.*;source.*;transaction.*;util.*;value.*;view.*;xmlLexer.*;xmlSink.*;xmlSource.*;cclassad.*;common.*" ClassadSrcs)
++  add_library( classads STATIC ${ClassadSrcs} )    # the one which all of condor depends upon
+ 
+-  if (WANT_FULL_DEPLOYMENT)
+-	install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/classad DESTINATION ${C_INCLUDE} )
++  if (LINUX)  
++  	add_library( classad SHARED ${ClassadSrcs} )   # for distribution at this point may swap to depend at a future date.
++	set_target_properties( classad PROPERTIES VERSION 1.1.0 SOVERSION 1 )
++	install( TARGETS classad DESTINATION ${C_LIB} )
+   endif()
+ 
+-  condor_selective_glob("attrrefs.*;classad.*;collection.*;collectionBase.*;debug.*;exprList.*;exprTree.*;fnCall.*;indexfile.*;lexer.*;lexerSource.*;literals.*;matchClassad.*;operators.*;query.*;sink.*;source.*;transaction.*;util.*;value.*;view.*;xmlLexer.*;xmlSink.*;xmlSource.*;cclassad.*;common.*" ClassadSrcs)
++  ###### change here if you want to link condor to the shared version
++  set (CLASSADS_FOUND classads)
+ 
+-  add_library( classads STATIC ${ClassadSrcs} )
+-  set_target_properties( classads
+-	PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${EXTERNAL_STAGE}/lib 
+-	LIBRARY_OUTPUT_DIRECTORY ${EXTERNAL_STAGE}/lib
+-	RUNTIME_OUTPUT_DIRECTORY ${EXTERNAL_STAGE}/lib
+-	OUTPUT_NAME classad_ns)
++  ###### Test executables
++  condor_exe_test( classad_unit_tester "classad_unit_tester.cpp" "${CLASSADS_FOUND};${PCRE_FOUND};${DL_FOUND}")
++  condor_exe( classad_functional_tester "classad_functional_tester.cpp" ${C_BIN} "${CLASSADS_FOUND};${PCRE_FOUND};${DL_FOUND}" OFF)
++  condor_exe( classad_version "classad_version.cpp" ${C_BIN} "${CLASSADS_FOUND};${PCRE_FOUND};${DL_FOUND}" OFF)
++  
++  ###### Install elements with our distribution
++  install( TARGETS classads DESTINATION ${C_LIB} )
++  install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/classad DESTINATION ${C_INCLUDE} )
+ 
+-else()
+-	
+-	# I should probably just add all and subtract tests.
++else()	
++	# windows specific configuration.
+ 	condor_selective_glob("attrrefs.cpp;common.cpp;collection*;fnCall.cpp;expr*;indexfile*;lexer*;literals.cpp;matchClassad.cpp;classad.cpp;debug.cpp;operators.cpp;util.cpp;value.cpp;query.cpp;sink.cpp;source.cpp;transaction.cpp;view.cpp;xml*" ClassadSrcs)
+ 	add_library( classads STATIC ${ClassadSrcs} )
+-	set_property( TARGET classads PROPERTY FOLDER "libraries" )
++	set (CLASSADS_FOUND classads)
+ 
+ endif()
+ 
+-set( CLASSADS_FOUND classads )
++condor_post_external( ${CLASSADS_FOUND} include OFF )
+ 
++# standard output message used to slog users.  
++message (STATUS "configured (CLASSADS_FOUND= ${CLASSADS_FOUND})")
++
++# finally add dependencies if there are any
+ if (NOT PROPER)
+-  add_dependencies( classads pcre )
++  
++  if(PCRE_REF)
++	add_dependencies( ${CLASSADS_FOUND} ${PCRE_REF} )
++  endif()
++
++  if (NOT WINDOWS)
++	############################################################################## 
++	# the only reason this exists is b/c our externals depend on it
++	# (blahp & creame)
++	file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/classad DESTINATION ${CLASSADS_INSTALL_LOC}/include )
++	set_target_properties( classads
++		PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CLASSADS_INSTALL_LOC}/lib 
++		LIBRARY_OUTPUT_DIRECTORY ${CLASSADS_INSTALL_LOC}/lib
++		RUNTIME_OUTPUT_DIRECTORY ${CLASSADS_INSTALL_LOC}/lib
++		OUTPUT_NAME classad)
++
++        add_custom_command (OUTPUT ${CLASSADS_INSTALL_LOC}/lib/libpcre.a
++                    COMMAND cp
++                    ARGS -f ${PCRE_FOUND} ${CLASSADS_INSTALL_LOC}/lib)
++
++        add_custom_target( pcre_coinstall ALL DEPENDS ${CLASSADS_INSTALL_LOC}/lib/libpcre.a )
++
++	if (PCRE_REF)
++		add_dependencies( pcre_coinstall ${PCRE_REF} )
++	endif()
++
++        add_dependencies( ${CLASSADS_FOUND} pcre_coinstall )
++
++  endif()
++
+ endif(NOT PROPER)
+ 
+-message (STATUS "external configured (CLASSADS_FOUND=${CLASSADS_FOUND})")
+-set( CLASSADS_FOUND ${CLASSADS_FOUND} PARENT_SCOPE )
+-set( HAVE_EXT_CLASSADS ON PARENT_SCOPE )
+-append_var (CONDOR_EXTERNALS classads)
+diff --git a/src/classad/Doxyfile b/src/classad/Doxyfile
+index 7d61a84..df632c4 100644
+--- a/src/classad/Doxyfile
++++ b/src/classad/Doxyfile
+@@ -31,7 +31,7 @@ PROJECT_NAME           = ClassAds
+ # This could be handy for archiving the generated documentation or
+ # if some version control system is used.
+ 
+-PROJECT_NUMBER         = 1.0.9
++PROJECT_NUMBER         = 1.0.10
+ 
+ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+ # base path where the generated documentation will be put.
+diff --git a/src/classad/Makefile.am.m4 b/src/classad/Makefile.am.m4
+index 03121c8..b85cb17 100644
+--- a/src/classad/Makefile.am.m4
++++ b/src/classad/Makefile.am.m4
+@@ -152,8 +152,8 @@ libclassad_la_SOURCES = \
+ 	sink.cpp source.cpp transaction.cpp util.cpp value.cpp view.cpp xmlLexer.cpp	\
+ 	xmlSink.cpp xmlSource.cpp cclassad.cpp $(_libclassad_la_SOURCES)
+ 
+-libclassad_la_LDFLAGS = -version-info 1:0:1
+-libclassad_ns_la_LDFLAGS = -version-info 1:0:1
++libclassad_la_LDFLAGS = -version-info 1:2:0
++libclassad_ns_la_LDFLAGS = -version-info 1:2:0
+ 
+ MF_IF_NAMESPACE([libclassad_ns_la_SOURCES = $(libclassad_la_SOURCES)
+    libclassad_ns_la_CXXFLAGS = $(NAMESPACE)])
+diff --git a/src/classad/README b/src/classad/README
+index bce8cd7..0e81df6 100644
+--- a/src/classad/README
++++ b/src/classad/README
+@@ -1,4 +1,4 @@
+-This is version 1.0.9 of the Condor Classad library, released on 2010-08-23.
++This is version 1.0.10 of the Condor Classad library, released on 2011-04-08.
+ 
+ ===== What is it? =====
+ 
+diff --git a/src/classad/README.packaging b/src/classad/README.packaging
+index 7e107a7..9dd1c91 100644
+--- a/src/classad/README.packaging
++++ b/src/classad/README.packaging
+@@ -15,11 +15,15 @@ Update the shared library version number in src/classad/Makefile.am.m4.
+ Look for these two lines:
+     libclassad_la_LDFLAGS = -version-info 1:0:0
+     libclassad_ns_la_LDFLAGS = -version-info 1:0:0
+-If the ABI has changed, you should increment the first number and set the 
+-second and third ones to zero. If the ABI hasn't changed, then increment 
+-the second or third number. See 
++
++If the ABI has changed (such that programs linked against an older 
++version won't work with the new version), you should increment the first 
++number and set the second and third ones to zero. If the ABI has only been 
++expanded (new symbols added), increment the first and third numbers, and 
++set the second one to zero. If the ABI hasn't changed, then increment the 
++second number. See 
+ http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN135  
+-for examples of things that will change the ABI.
++for examples of things that will change the ABI incompatibly.
+ This ABI compliance checker program may be useful: 
+ http://ispras.linuxfoundation.org/index.php/ABI_compliance_checker
+ 
+diff --git a/src/classad/TAGS b/src/classad/TAGS
+index 659cb34..a0db662 100644
+--- a/src/classad/TAGS
++++ b/src/classad/TAGS
+@@ -14,3 +14,4 @@ classads_1_0_6
+ classads_1_0_7
+ classads_1_0_8
+ classads_1_0_9
++classads_1_0_10
+diff --git a/src/classad/classad.cpp b/src/classad/classad.cpp
+index dfb0435..f78ecc7 100644
+--- a/src/classad/classad.cpp
++++ b/src/classad/classad.cpp
+@@ -44,13 +44,13 @@ void ClassAdLibraryVersion(int &major, int &minor, int &patch)
+ {
+     major = 1;
+     minor = 0;
+-    patch = 9;
++    patch = 10;
+     return;
+ }
+ 
+ void ClassAdLibraryVersion(string &version_string)
+ {
+-    version_string = "1.0.9";
++    version_string = "1.0.10";
+     return;
+ }
+ 
+@@ -968,7 +968,15 @@ _GetExternalReferences( const ExprTree *expr, ClassAd *ad,
+                         refs.insert( fullName );
+                         return true;
+                     } else {
+-                        return( _GetExternalReferences( tree, ad, state, refs, fullNames ));
++                        if( state.depth_remaining <= 0 ) {
++                            return false;
++                        }
++                        state.depth_remaining--;
++
++                        bool ret = _GetExternalReferences( tree, ad, state, refs, fullNames );
++
++                        state.depth_remaining++;
++                        return ret;
+                     }
+                 }
+                     // otherwise, if the tree didn't evaluate to a classad,
+@@ -992,7 +1000,15 @@ _GetExternalReferences( const ExprTree *expr, ClassAd *ad,
+ 
+                 case EVAL_OK: {
+                         // attr is internal; find external refs in result
+-					bool rval=_GetExternalReferences(result,ad,state,refs,fullNames);
++                    if( state.depth_remaining <= 0 ) {
++                        state.curAd = curAd;
++                        return false;
++                    }
++                    state.depth_remaining--;
++
++                    bool rval=_GetExternalReferences(result,ad,state,refs,fullNames);
++
++                    state.depth_remaining++;
+ 					state.curAd = curAd;
+ 					return( rval );
+ 				}
+@@ -1043,7 +1059,15 @@ _GetExternalReferences( const ExprTree *expr, ClassAd *ad,
+ 
+             ((const ClassAd*)expr)->GetComponents( attrs );
+             for( itr = attrs.begin( ); itr != attrs.end( ); itr++ ) {
+-                if( !_GetExternalReferences( itr->second, ad, state, refs, fullNames )) {
++                if( state.depth_remaining <= 0 ) {
++                    return false;
++                }
++                state.depth_remaining--;
++
++                bool ret = _GetExternalReferences( itr->second, ad, state, refs, fullNames );
++
++                state.depth_remaining++;
++                if( !ret ) {
+ 					return( false );
+ 				}
+             }
+@@ -1058,7 +1082,15 @@ _GetExternalReferences( const ExprTree *expr, ClassAd *ad,
+ 
+             ((const ExprList*)expr)->GetComponents( exprs );
+             for( itr = exprs.begin( ); itr != exprs.end( ); itr++ ) {
+-                if( !_GetExternalReferences( *itr, ad, state, refs, fullNames ) ) {
++                if( state.depth_remaining <= 0 ) {
++                    return false;
++                }
++                state.depth_remaining--;
++
++                bool ret = _GetExternalReferences( *itr, ad, state, refs, fullNames );
++
++                state.depth_remaining++;
++                if( !ret ) {
+ 					return( false );
+ 				}
+             }
+@@ -1342,7 +1374,15 @@ _GetInternalReferences( const ExprTree *expr, ClassAd *ad,
+                 case EVAL_OK:   {
+                     //whoo, it's internal.
+                     refs.insert(attr);
++                    if( state.depth_remaining <= 0 ) {
++                        state.curAd = curAd;
++                        return false;
++                    }
++                    state.depth_remaining--;
++
+                     bool rval =_GetInternalReferences(result, ad, state, refs, fullNames);
++
++                    state.depth_remaining++;
+                     //TODO: Does this actually matter?
+                     state.curAd = curAd;
+                     return rval;
+@@ -1405,7 +1445,15 @@ _GetInternalReferences( const ExprTree *expr, ClassAd *ad,
+ 
+             ((const ClassAd*)expr)->GetComponents(attrs);
+             for(itr = attrs.begin(); itr != attrs.end(); itr++){
+-                if( !_GetInternalReferences(itr->second, ad, state, refs, fullNames)) {
++                if( state.depth_remaining <= 0 ) {
++                    return false;
++                }
++                state.depth_remaining--;
++
++                bool ret = _GetInternalReferences(itr->second, ad, state, refs, fullNames);
++
++                state.depth_remaining++;
++                if( !ret ) {
+                     return false;
+                 }
+             }
+@@ -1420,7 +1468,15 @@ _GetInternalReferences( const ExprTree *expr, ClassAd *ad,
+ 
+             ((const ExprList*)expr)->GetComponents(exprs);
+             for(itr = exprs.begin(); itr != exprs.end(); itr++){
+-                if( !_GetInternalReferences(*itr, ad, state, refs, fullNames) ) {
++                if( state.depth_remaining <= 0 ) {
++                    return false;
++                }
++                state.depth_remaining--;
++
++                bool ret = _GetInternalReferences(*itr, ad, state, refs, fullNames);
++
++                state.depth_remaining++;
++                if( !ret ) {
+                     return false;
+                 }
+             }
+diff --git a/src/classad/classad/common.h b/src/classad/classad/common.h
+index f62a65c..660558b 100644
+--- a/src/classad/classad/common.h
++++ b/src/classad/classad/common.h
+@@ -48,6 +48,10 @@
+ #define _STLP_NEW_PLATFORM_SDK
+ #define _STLP_NO_OWN_IOSTREAMS 1
+ 
++// Disable warnings about calling posix functions like open()
++// instead of _open()
++#define _CRT_NONSTDC_NO_WARNINGS
++
+ // Disable warnings about possible loss of data, since "we know what
+ // we are doing" and fixing them correctly would require too much 
+ // time from one of us. (Maybe this should be a student exercise.)
+@@ -71,6 +75,7 @@
+ 
+ 
+ #ifdef WIN32
++
+ 	// special definitions we need for Windows
+ #ifndef DLL_IMPORT_MAGIC
+ #define DLL_IMPORT_MAGIC __declspec(dllimport)
+@@ -79,9 +84,6 @@
+ #include <float.h>
+ #include <io.h>
+ #define fsync _commit
+-#ifndef open
+-#define open _open
+-#endif
+ #define strcasecmp _stricmp
+ #ifndef rint
+ #define rint(num) floor(num + .5)
+@@ -89,9 +91,7 @@
+ #define isnan _isnan
+ 	// isinf() defined in util.h
+ 
+-#ifdef WIN32
+ #include <hash_map>
+-#endif
+ 
+ #define snprintf _snprintf
+ 
+@@ -102,6 +102,7 @@
+ #pragma warning( disable : 4800 )  
+ 	// Disable warnings about truncated debug identifiers
+ #pragma warning( disable : 4786 )
++
+ #endif // WIN32
+ 
+ 
+diff --git a/src/classad/classad_functional_tester.cpp b/src/classad/classad_functional_tester.cpp
+index 12305cf..84d7cb6 100644
+--- a/src/classad/classad_functional_tester.cpp
++++ b/src/classad/classad_functional_tester.cpp
+@@ -21,7 +21,6 @@
+ #include "classad/classad_distribution.h"
+ #include "classad/lexerSource.h"
+ #include "classad/xmlSink.h"
+-#undef open // we don't want the open method of basic_ofstream to end up being called _open...
+ #include <fstream>
+ #include <iostream>
+ #include <ctype.h>
+diff --git a/src/classad/do_packaging b/src/classad/do_packaging
+index 197ec6b..531c7dd 100755
+--- a/src/classad/do_packaging
++++ b/src/classad/do_packaging
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-DIST_VERSION=1.0.9
++DIST_VERSION=1.0.10
+ DISTRIBUTION_DIR=classads-${DIST_VERSION}
+ 
+ EXCLUDE_LIST="do_packaging CMakeLists.txt README.packaging TAGS TODO man_cache_test.cpp test_classads.cpp"
+diff --git a/src/classad/fnCall.cpp b/src/classad/fnCall.cpp
+index 9de6be5..a87b933 100644
+--- a/src/classad/fnCall.cpp
++++ b/src/classad/fnCall.cpp
+@@ -61,6 +61,8 @@ static void relTimeToClassAd(
+     double rsecs, ClassAd * &splitClassAd);
+ static void make_formatted_time(
+     const struct tm &time_components, string &format, Value &result);
++static bool
++stringListsIntersect(const char*,const ArgumentList &argList,EvalState &state,Value &result);
+ 
+ // start up with an argument list of size 4
+ FunctionCall::
+@@ -163,6 +165,11 @@ FunctionCall( )
+ 		functionTable["interval" ] = (void*)interval;
+ 		functionTable["eval"] = (void*)eval;
+ 
++			// string list functions:
++			// Note that many other string list functions are defined
++			// externally in the Condor classad compatibility layer.
++		functionTable["stringListsIntersect" ] = (void*)stringListsIntersect;
++
+ 		initialized = true;
+ 	}
+ }
+@@ -2856,4 +2863,130 @@ make_formatted_time(const struct tm &time_components, string &format,
+     return;
+ }
+ 
++static void
++split_string_list(char const *str,char const *delim,vector< string > &list)
++{
++	if( !delim || !delim[0] ) {
++		delim = " ,";
++	}
++	if( !str ) {
++		return;
++	}
++	string item;
++	while( *str ) {
++		size_t len = strcspn(str,delim);
++		if( len > 0 ) {
++			item.assign(str,len);
++			list.push_back(item);
++			str += len;
++		}
++		if( *str ) {
++			str++;
++		}
++	}
++}
++
++static void
++split_string_set(char const *str,char const *delim,set< string > &string_set)
++{
++	if( !delim || !delim[0] ) {
++		delim = " ,";
++	}
++	if( !str ) {
++		return;
++	}
++	set<string>::value_type item;
++	while( *str ) {
++		size_t len = strcspn(str,delim);
++		if( len > 0 ) {
++			item.assign(str,len);
++			string_set.insert(item);
++			str += len;
++		}
++		if( *str ) {
++			str++;
++		}
++	}
++}
++
++static bool
++stringListsIntersect(const char*,const ArgumentList &argList,EvalState &state,Value &result)
++{
++	Value arg0, arg1, arg2;
++	bool have_delimiter;
++	string str0,str1,delimiter_string;
++
++    // need two or three arguments: pattern, list, optional settings
++	if( argList.size() != 2 && argList.size() != 3) {
++		result.SetErrorValue( );
++		return true;
++	}
++    if (argList.size() == 2) {
++        have_delimiter = false;
++    } else {
++        have_delimiter = true;
++    }
++
++		// Evaluate args
++	if( !argList[0]->Evaluate( state, arg0 ) || 
++		!argList[1]->Evaluate( state, arg1 ) ) {
++		result.SetErrorValue( );
++		return true;
++	}
++    if( have_delimiter && !argList[2]->Evaluate( state, arg2 ) ) {
++		result.SetErrorValue( );
++		return true;
++    }
++
++		// if either arg is error, the result is error
++	if( arg0.IsErrorValue( ) || arg1.IsErrorValue( ) ) {
++		result.SetErrorValue( );
++		return true;
++	}
++    if( have_delimiter && arg2.IsErrorValue( ) ) {
++        result.SetErrorValue( );
++        return true;
++    }
++
++		// if either arg is undefined, the result is undefined
++	if( arg0.IsUndefinedValue( ) || arg1.IsUndefinedValue( ) ) {
++		result.SetUndefinedValue( );
++		return true;
++	}
++    if( have_delimiter && arg2.IsUndefinedValue( ) ) {
++		result.SetUndefinedValue( );
++		return true;
++    } else if ( have_delimiter && !arg2.IsStringValue( delimiter_string ) ) {
++        result.SetErrorValue( );
++        return true;
++    }
++
++		// if the arguments are not of the correct types, the result
++		// is an error
++	if( !arg0.IsStringValue( str0 ) || !arg1.IsStringValue( str1 ) ) {
++		result.SetErrorValue( );
++		return true;
++	}
++    result.SetBooleanValue(false);
++
++	vector< string > list0;
++	set< string > set1;
++
++	split_string_list(str0.c_str(),delimiter_string.c_str(),list0);
++	split_string_set(str1.c_str(),delimiter_string.c_str(),set1);
++
++	vector< string >::iterator it;
++	for(it = list0.begin();
++		it != list0.end();
++		it++)
++	{
++		if( set1.count(*it) ) {
++			result.SetBooleanValue(true);
++			break;
++		}
++	}
++
++	return true;
++}
++
+ END_NAMESPACE // classad
+diff --git a/src/classad/functional_tests.txt b/src/classad/functional_tests.txt
+index 38c0bb5..e587c24 100644
+--- a/src/classad/functional_tests.txt
++++ b/src/classad/functional_tests.txt
+@@ -343,3 +343,13 @@ echo Testing characters with negative ascii values
+ # the following used to not even parse on some systems
+ same "–", "–"
+ 
++echo Testing stringListsIntersect()
++same true, stringListsIntersect("one,two","two,three")
++same false, stringListsIntersect("one,two","three,four")
++same false, stringListsIntersect("one,two","three,four",";")
++same true, stringListsIntersect("one,two","one")
++same true, stringListsIntersect("one, two","two, three")
++same true, stringListsIntersect("one,two","two,three",",")
++same true, stringListsIntersect("one;two","two;three",";")
++same undefined, stringListsIntersect("one,two",undefined)
++same undefined, stringListsIntersect(undefined,"one,two" )
+diff --git a/src/classad/lexerSource.cpp b/src/classad/lexerSource.cpp
+index bb08f9e..1cbc450 100644
+--- a/src/classad/lexerSource.cpp
++++ b/src/classad/lexerSource.cpp
+@@ -112,7 +112,7 @@ InputStreamLexerSource::ReadCharacter(void)
+ 	char real_character;
+ 	int  character;
+ 
+-	if (_stream != NULL && !_stream->eof()) {
++	if (_stream != NULL && _stream->good()) {
+ 		_stream->get(real_character);
+ 		character = (unsigned char)real_character;
+ 	} else {
+diff --git a/src/classad/util.cpp b/src/classad/util.cpp
+index 2e06049..7f1f981 100644
+--- a/src/classad/util.cpp
++++ b/src/classad/util.cpp
+@@ -200,7 +200,7 @@ void convert_escapes(string &text, bool &validStr)
+ 						sscanf(octal, "%o", &number);
+ 						new_char = number;
+ 					} else {
+-						new_char = text[source];
++						number = new_char = text[source];
+ 					}
+ 					if(number == 0) { // "\\0" is an invalid substring within a string literal
+ 					  validStr = false;
+diff --git a/src/classad_analysis/analysis.cpp b/src/classad_analysis/analysis.cpp
+index 0b1f78a..dd57268 100644
+--- a/src/classad_analysis/analysis.cpp
++++ b/src/classad_analysis/analysis.cpp
+@@ -26,7 +26,7 @@
+ #include "list.h"
+ #include "simplelist.h"
+ #include "extArray.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ 
+ #include <iostream>
+ #include <sstream>
+diff --git a/src/classad_analysis/boolExpr.cpp b/src/classad_analysis/boolExpr.cpp
+index e08ecb4..fc4332b 100644
+--- a/src/classad_analysis/boolExpr.cpp
++++ b/src/classad_analysis/boolExpr.cpp
+@@ -67,7 +67,9 @@ ExprToMultiProfile( classad::ExprTree *expr, MultiProfile *&mp )
+ 
+ 		kind = currentTree->GetKind( );
+ 			
+-		if( kind == classad::ExprTree::ATTRREF_NODE ) {
++		if( kind == classad::ExprTree::ATTRREF_NODE ||
++			kind == classad::ExprTree::FN_CALL_NODE )
++		{
+ 			atLeftMostProfile = true;
+ 			continue;
+ 		}
+@@ -172,7 +174,9 @@ ExprToProfile( classad::ExprTree *expr, Profile *&p )
+ 
+ 		kind = currentTree->GetKind( );
+ 
+-		if( kind == classad::ExprTree::ATTRREF_NODE ) {
++		if( kind == classad::ExprTree::ATTRREF_NODE ||
++			kind == classad::ExprTree::FN_CALL_NODE )
++		{
+ 			atLeftMostCondition = true;
+ 			continue;
+ 		}
+@@ -269,6 +273,14 @@ ExprToCondition( classad::ExprTree *expr, Condition *&c )
+ 		return true;
+ 	}
+ 
++	if( kind == classad::ExprTree::FN_CALL_NODE ) {
++		if( !c->InitComplex( expr->Copy( ) ) ) {
++  				cerr << "error: problem with Condition::InitComplex" << endl;
++  				return false;
++		}
++		return true;
++	}
++
+ 	if( kind != classad::ExprTree::OP_NODE ) {
+ 		cerr << "error: no operator/attribute found" << endl;
+ 			// error: no operator/attribute  found;
+diff --git a/src/condor_birdwatcher/CMakeLists.txt b/src/condor_birdwatcher/CMakeLists.txt
+index 1c3a59e..362622a 100644
+--- a/src/condor_birdwatcher/CMakeLists.txt
++++ b/src/condor_birdwatcher/CMakeLists.txt
+@@ -20,7 +20,7 @@ if (WINDOWS AND NOT WIN_EXEC_NODE_ONLY)
+ 
+ 	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
+ 	
+-	file( GLOB BWSrcs *.cpp *.h *.rc  res/*)
++	file( GLOB BWSrcs *.cpp *.h *.rc *.rc2 res/*)
+ 	
+ 	condor_exe( condor_birdwatcher "${BWSrcs}" ${C_SBIN} "" OFF)
+ 
+diff --git a/src/condor_birdwatcher/birdwatcher.rc b/src/condor_birdwatcher/birdwatcher.rc
+index b7d55ba..f559363 100755
+--- a/src/condor_birdwatcher/birdwatcher.rc
++++ b/src/condor_birdwatcher/birdwatcher.rc
+@@ -7,14 +7,16 @@
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+-#include "winres.h"
++#include "windows.h"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // English (U.S.) resources
+-
++#ifndef IDC_STATIC
++#define IDC_STATIC      (-1)
++#endif
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+ #ifdef _WIN32
+ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+@@ -34,12 +36,6 @@ END
+ 
+ 2 TEXTINCLUDE 
+ BEGIN
+-    "#include ""winres.h""\r\n"
+-    "\0"
+-END
+-
+-3 TEXTINCLUDE 
+-BEGIN
+     "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+     "#define _AFX_NO_OLE_RESOURCES\r\n"
+     "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+diff --git a/src/condor_c-gahp/cgahp_common.cpp b/src/condor_c-gahp/cgahp_common.cpp
+index b9f9c46..a13430f 100644
+--- a/src/condor_c-gahp/cgahp_common.cpp
++++ b/src/condor_c-gahp/cgahp_common.cpp
+@@ -36,6 +36,8 @@ parse_gahp_command (const char* raw, Gahp_Args* args) {
+ 	int len=strlen(raw);
+ 
+ 	char * buff = (char*)malloc(len+1);
++    ASSERT(buff);
++
+ 	int buff_len = 0;
+ 
+ 	for (int i = 0; i<len; i++) {
+diff --git a/src/condor_ckpt/CMakeLists.txt b/src/condor_ckpt/CMakeLists.txt
+index 9aab726..2b2ef62 100644
+--- a/src/condor_ckpt/CMakeLists.txt
++++ b/src/condor_ckpt/CMakeLists.txt
+@@ -37,18 +37,19 @@ if( STD_UNIVERSE )
+ 	###########################################################################
+ 	add_definitions( ${STD_U_C_FLAGS} -DFILE_TABLE -DIN_CKPT_LIB)
+ 	include_directories(${CONDOR_SOURCE_DIR}/src/condor_ckpt)
+-	condor_selective_glob("*file*;signals*;image*;machdep.LINUX.cpp;tmp_*;syscall_*;fake_*;condor_error*;eprintf*;shared_*;malloc-user*;gto*;maps*" CommonCkptSrcs )
+-
+-	# from what I can tell this doesn't even work.
+-	#if (DOES_COMPRESS_CKPT)
+-	#	add_definitions(-DCOMPRESS_CKPT -DMORECORE=condor_morecore -DHAVE_MMAP=0 -Dmalloc_getpagesize=8192)
+-	#	condor_selective_glob("malloc-condor.cpp;malloc.cpp" CompressSrcs)
+-	#endif(DOES_COMPRESS_CKPT)
++	condor_selective_glob("*file*;signals*;machdep.LINUX.cpp;tmp_*;syscall_*;fake_*;condor_error*;eprintf*;shared_*;malloc-user*;gto*;maps*" CommonCkptSrcs )
+ 
+ 	# we create a local lib, but it's never actually used
+ 	# instead condorsyscall will rip out the target refs.
+ 	#condor_static_lib( ckpt "${CommonCkptSrcs};${CompressSrcs}")
+-	add_library(ckpt STATIC EXCLUDE_FROM_ALL ${CommonCkptSrcs};${CompressSrcs})
++	add_library(ckpt STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/image.cpp;${CommonCkptSrcs})
+ 	add_dependencies( ckpt syscall_numbers )
+ 
++	if (DOES_COMPRESS_CKPT)
++
++		add_library(zckpt STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/zimage.cpp;${CMAKE_CURRENT_SOURCE_DIR}/malloc-condor.c;${CommonCkptSrcs})
++
++		add_dependencies( zckpt syscall_numbers )
++	endif(DOES_COMPRESS_CKPT)
++
+ endif(STD_UNIVERSE)
+diff --git a/src/condor_ckpt/condor_file_agent.cpp b/src/condor_ckpt/condor_file_agent.cpp
+index a808002..5241aa5 100644
+--- a/src/condor_ckpt/condor_file_agent.cpp
++++ b/src/condor_ckpt/condor_file_agent.cpp
+@@ -50,7 +50,7 @@ int CondorFileAgent::open( const char *url_in, int flags, int mode )
+ 	int local_flags;
+ 	char *junk = (char *)malloc(strlen(url_in)+1);
+ 	char *sub_url = (char *)malloc(strlen(url_in)+1);
+-	char local_filename[_POSIX_PATH_MAX];
++	char local_filename[L_tmpnam];
+ 
+ 	memset(local_filename, 0, sizeof(local_filename));
+ 
+diff --git a/src/condor_ckpt/file_state.h b/src/condor_ckpt/file_state.h
+index d54a4de..02a2dcc 100644
+--- a/src/condor_ckpt/file_state.h
++++ b/src/condor_ckpt/file_state.h
+@@ -27,10 +27,12 @@
+ #include "condor_file.h"
+ #include "syscall_numbers.h"
+ #include "condor_syscall_mode.h"
++#include <sys/poll.h>
+ 
+ class CondorFileInfo;
+ class CondorFilePointer;
+ 
++
+ /**
+ This class multiplexes number of UNIX file system calls.
+ The fd's used to index this table are "virtual file descriptors",
+diff --git a/src/condor_ckpt/image.cpp b/src/condor_ckpt/image.cpp
+index c7cc873..c052193 100644
+--- a/src/condor_ckpt/image.cpp
++++ b/src/condor_ckpt/image.cpp
+@@ -32,6 +32,19 @@
+ #include "subsystem_info.h"
+ #include "gtodc.h"
+ 
++#if defined(COMPRESS_CKPT)
++/* This structure represents an alternate heap, controlled by a specially
++	created malloc, and used by zlib for the checkpoint compression feature.
++*/
++struct alternate_memory_heap {
++	void *begin;
++	void *corestart;
++	void **coreend;
++	void **segend;
++	int pagesize;
++};
++#endif
++
+ extern int _condor_in_file_stream;
+ 
+ const int KILO = 1024;
+@@ -49,6 +62,8 @@ extern "C" void _condor_restore_sigstates();
+ #if defined(COMPRESS_CKPT)
+ #include "zlib.h"
+ extern "C" {
++	void display_alternate_memory_heap(int dlevel);
++	int condor_malloc_getpagesize(void); // in malloc-condor.c
+ 	int condor_malloc_init_size();
+ 	void condor_malloc_init(void *start);
+ 	char *condor_malloc(size_t);
+@@ -85,6 +100,7 @@ extern "C" void _install_signal_handler( int sig, SIG_HANDLER handler );
+ extern "C" int open_ckpt_file( const char *name, int flags, size_t n_bytes );
+ extern "C" int get_ckpt_mode( int sig );
+ extern "C" int get_ckpt_speed( );
++static void sleep_syscall(int seconds);
+ 
+ Image MyImage;
+ static jmp_buf Env;
+@@ -98,6 +114,13 @@ unsigned int _condor_numrestarts = 0;
+ int condor_compress_ckpt = 1; // compression off(0) or on(1)
+ int condor_slow_ckpt = 0;
+ 
++#if defined(COMPRESS_CKPT)
++// There is only ONE alternate heap. This global variable gets saved and
++// restored across checkpoints. This means that the mmap'ed heap during
++// checkpoint will be known to be put into the right place upon restore.
++static struct alternate_memory_heap amh = { NULL, NULL, NULL, NULL, -1 };
++#endif
++
+ /* these are the remote system calls we use in this file */
+ extern "C" int REMOTE_CONDOR_send_rusage(struct rusage *use_p);
+ 
+@@ -148,71 +171,225 @@ void *condor_map_seg(void *base, size_t size)
+ 	return base;
+ }
+ 
++void display_alternate_memory_heap(int dlevel)
++{
++	dprintf(dlevel,
++		"Alternate Memory Heap: {begin=%p, corestart=%p, coreend=%p, segend=%p, *coreend=%p, *segend=%p, pagesize=%d}\n",
++		amh.begin, amh.corestart, amh.coreend, amh.segend, 
++		amh.coreend!=NULL?*amh.coreend:NULL,
++		amh.segend!=NULL?*amh.segend:NULL,
++		amh.pagesize);
++}
++
+ // TODO: deallocate segments on negative incr
+ void *condor_morecore(int incr)
+ {
+-	// begin points to the start of our heap segment
+-	// corestart points to the start of the allocated portion of the segment
+-	// *coreend points to the end of the allocated portion of the segment
+-	// *segend points to the end of our allocated segment
+-	// coreend and segend are stored at the start of the segment because
++	// amh.begin points to the start of our heap segment
++	// amh.corestart points to the start of the allocated portion of the segment
++	// *amh.coreend points to the end of the allocated portion of the segment
++	// *amh.segend points to the end of our allocated segment
++	// amh.coreend and segend are stored at the start of the segment because
+ 	//   we don't want them to be overwritten on a restart
+-	static void *begin = NULL, *corestart = NULL,
+-		**coreend = NULL, **segend = NULL;
+-	static int pagesize = -1;
+ 
+-	if (pagesize == -1) {
+-		pagesize = getpagesize();
++	if (amh.pagesize == -1) {
++		// This is the page size of the alternate heap allocator, NOT the
++		// regular allocator used by the application. The two allocators
++		// can sometimes have different sizes and we don't want to confuse
++		// the two.
++		amh.pagesize = condor_malloc_getpagesize();
+ 	}
+-	
+-	if (begin == NULL) {
+-		begin = MyImage.FindAltHeap();
++
++	if (amh.begin == NULL) {
++		amh.begin = MyImage.FindAltHeap();
+ 		int malloc_static_data = condor_malloc_init_size();
+ 		int segincr =
+ 			(((incr+malloc_static_data+
+-			   (2*sizeof(void *)))/pagesize)+1)*pagesize;
+-		begin = condor_map_seg(begin, segincr);
+-		corestart = (void *) (
+-			(int)begin+(int)(2*sizeof(void *))+(int)malloc_static_data ); 
+-		condor_malloc_init((void *)((int)begin+(int)(2*sizeof(void *))));
+-		coreend = (void **)begin;
+-		segend = (void **)((int)begin+(int)sizeof(void *));
+-		*segend = (void *)((int)begin+(int)segincr);
+-		*coreend = (void *)((int)corestart+(int)incr);
+-		return corestart;
++			   (2*sizeof(void *)))/amh.pagesize)+1)*amh.pagesize;
++		amh.begin = condor_map_seg(amh.begin, segincr);
++		amh.corestart = (void *) (
++			(int)amh.begin+(int)(2*sizeof(void *))+(int)malloc_static_data ); 
++		condor_malloc_init((void *)((int)amh.begin+(int)(2*sizeof(void *))));
++		amh.coreend = (void **)amh.begin;
++		amh.segend = (void **)((int)amh.begin+(int)sizeof(void *));
++		*amh.segend = (void *)((int)amh.begin+(int)segincr);
++		*amh.coreend = (void *)((int)amh.corestart+(int)incr);
++		return amh.corestart;
+ 	} else if (incr == 0) {
+-		return *coreend;
++		return *amh.coreend;
+ 	} else {
+-		void *old_break = *coreend;
+-		*coreend = (void *)((int)*coreend + (int)incr);
+-		if (*coreend > *segend) {
+-			int segincr = (int)((((int)*coreend-(int)*segend)/(int)pagesize)+1)*(int)pagesize;
+-			if ((int)*coreend+(int)segincr-(int)begin > ALT_HEAP_SIZE) {
++		void *old_break = *amh.coreend;
++		*amh.coreend = (void *)((int)*amh.coreend + (int)incr);
++		if (*amh.coreend > *amh.segend) {
++			int segincr = (int)((((int)*amh.coreend-(int)*amh.segend)/(int)amh.pagesize)+1)*(int)amh.pagesize;
++			if ((int)*amh.coreend+(int)segincr-(int)amh.begin > ALT_HEAP_SIZE) {
+ 				dprintf(D_ALWAYS,
+ 						"fatal error: exceeded ALT_HEAP_SIZE of %d bytes!\n",
+ 						ALT_HEAP_SIZE);
+ 				Suicide();
+ 			}
+-			if (condor_map_seg(*segend, segincr) != *segend) {
++			if (condor_map_seg(*amh.segend, segincr) != *amh.segend) {
+ 				dprintf(D_ALWAYS, "failed to allocate contiguous segments in "
+ 						"condor_morecore!\n");
+ 				Suicide();
+ 			}
+-			*segend = (void *)((int)*segend + (int)segincr);
++			*amh.segend = (void *)((int)*amh.segend + (int)segincr);
+ 		}
+ 		return old_break;
+ 	}
+ }
+ 
+ void *
+-zalloc(voidpf opaque, uInt items, uInt size)
++zalloc(voidpf /* opaque */, uInt items, uInt size)
+ {
+-	return condor_malloc(items*size);
++	uInt total_size = 0;
++	void *chunk = NULL;
++	void *chunk_start = NULL;
++	void *chunk_end = NULL;
++
++	// Get the requested memory from the alternate heap. This may initialize
++	// the alternate heap based upon condor_morecore(). 
++	total_size = items * size;
++	chunk = condor_malloc(total_size);
++
++	// some useful pointers for later checks and messages.
++	chunk_start = chunk;
++	chunk_end = (char*)chunk + total_size;
++
++	// Check to make sure alternate heap was and still is initialized.
++	if (amh.begin == NULL ||
++		amh.corestart == NULL ||
++		amh.coreend == NULL ||
++		*amh.coreend == NULL ||
++		amh.segend == NULL ||
++		*amh.segend == NULL ||
++		amh.pagesize != condor_malloc_getpagesize())
++	{
++		dprintf(D_ALWAYS, 
++			"ERROR: The alternate heap has not been initialized properly. "
++			"Please check to see that MORECORE had been defined properly "
++			"when compiling malloc-condor.c. Committing Suicide()!\n");
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// Check to see that the memory we got back from the allocator is
++	// _completely contained_ in the alternate heap. We do this because if
++	// somehow condor_malloc() actually called sbrk() instead of
++	// condor_morecore(), we'd silently corrupt the checkpoint image and
++	// subsequent checkpoint. We take great care to examine how it fails 
++	// since that can lead to insight into what is going wrong.
++
++	// Check if chunk starts before the alt heap and ends after the alt heap
++	if (chunk_start < amh.corestart && chunk_end >= *amh.coreend) 
++	{
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator allocated chunk "
++			"[start=%p, end=%p, size=%d bytes] "
++			"which _completely_ overlaps the alternate heap boundaries "
++			"of [%p, %p]. "
++			"Check to see if MORECORE is defined properly when "
++			"compiling malloc-condor.c! Commiting Suicide()!\n",
++			chunk_start, chunk_end, total_size,
++			amh.corestart, amh.coreend!=NULL?*amh.coreend:NULL);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// Check if the entire chunk is below the alternate heap.
++	if (chunk_end < amh.corestart) {
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator allocated chunk "
++			"[start=%p, end=%p, size=%d bytes] "
++			"which is below the valid alternate heap boundaries of [%p, %p]. "
++			"Check to see if MORECORE is defined properly when "
++			"compiling malloc-condor.c! Commiting Suicide()!\n",
++			chunk_start, chunk_end, total_size,
++			amh.corestart, amh.coreend!=NULL?*amh.coreend:NULL);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// Check if the entire chunk is above the alternate heap.
++	if (chunk_start > *amh.coreend) {
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator allocated chunk "
++			"[start=%p, end=%p, size=%d bytes] "
++			"which is above the valid alternate heap boundaries of [%p, %p]. "
++			"Check to see if MORECORE is defined properly when "
++			"compiling malloc-condor.c! Commiting Suicide()!\n",
++			chunk_start, chunk_end, total_size,
++			amh.corestart, amh.coreend!=NULL?*amh.coreend:NULL);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// Check if the chunk overlaps the lower boundary of the alt heap.
++	if (chunk_start < amh.corestart && chunk_end >= amh.corestart)
++	{
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator allocated chunk "
++			"[start=%p, end=%p, size=%d bytes] "
++			"which overlaps the start alternate heap boundaries of [%p, %p]. "
++			"Check to see if MORECORE is defined properly when "
++			"compiling malloc-condor.c! Commiting Suicide()!\n",
++			chunk_start, chunk_end, total_size,
++			amh.corestart, amh.coreend!=NULL?*amh.coreend:NULL);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// Check if the chunk overlaps the upper boundary of the alt heap.
++	if (chunk_start >= amh.corestart && 
++		chunk_start < *amh.coreend &&
++		chunk_end >= *amh.coreend)
++	{
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator allocated chunk "
++			"[start=%p, end=%p, size=%d bytes] "
++			"which overlaps the end alternate heap boundaries of [%p, %p]. "
++			"compiling malloc-condor.c! Commiting Suicide()!\n",
++			chunk_start, chunk_end, total_size,
++			amh.corestart, amh.coreend!=NULL?*amh.coreend:NULL);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	// If we passed the validation gauntlet, we're good to go!
++	return chunk;
+ }
+ 
+ void
+-zfree(voidpf opaque, voidpf address)
++zfree(voidpf /* opaque */ , voidpf address)
+ {
++	// Check to see that the pointer we are about to free actually exists IN
++	// the alternate heap. We do this because if somehow we pass pointers from
++	// the real malloc heap to here, we could silently corrupt or segfault in
++	// either heap.
++
++	if (address < amh.corestart) {
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator asked to free a pointer %p from "
++			"below the alternate heap! Check to see if MORECORE is defined "
++			"properly when compiling malloc-condor.c! Also check that a real "
++			"heap pointer isn't being passed to the alternate heap free "
++			"function! Commiting Suicide()!\n",
++			address);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
++	if (address >= *amh.coreend) {
++		dprintf(D_ALWAYS, 
++			"ERROR: Alternate heap allocator asked to free a pointer %p from "
++			"above the alternate heap! Check to see if MORECORE is defined "
++			"properly when compiling malloc-condor.c! Also check that a real "
++			"heap pointer isn't being passed to the alternate heap free "
++			"function! Commiting Suicide()!\n",
++			address);
++		display_alternate_memory_heap(D_ALWAYS);
++		Suicide();
++	}
++
+ 	condor_free(address);
+ }
+ #endif
+@@ -932,7 +1109,7 @@ Image::Write( const char *ckpt_file )
+ {
+ 	int	file_d;
+ 	int	scm;
+-	char	tmp_name[ _POSIX_PATH_MAX ];
++	char	tmp_name[ PATH_MAX ];
+ 
+ 	if( ckpt_file == 0 ) {
+ 		ckpt_file = file_name;
+@@ -1871,6 +2048,33 @@ void ckpt_and_exit__()
+ 
+ }   /* end of extern "C" */
+ 
++/* this bypasses our need for libc */
++void sleep_syscall(int seconds)
++{
++
++#if defined(SYS_sleep)
++	SYSCALL(SYS_sleep, seconds);
++#elif defined(SYS__newselect)
++	struct timeval t;
++	t.tv_sec = seconds;
++	t.tv_usec = 0;
++	SYSCALL(SYS__newselect, 0, NULL, NULL, NULL, &t);
++#elif defined(SYS_select)
++	struct timeval t;
++	t.tv_sec = seconds;
++	t.tv_usec = 0;
++	SYSCALL(SYS_select, 0, NULL, NULL, NULL, &t);
++#elif defined(SYS_nanosleep)
++	struct timespec t;
++	t.tv_sec = seconds;
++	t.tv_nsec = 0;
++	SYSCALL(SYS_nanosleep, &t, NULL);
++#else
++#error "Please port me!  I need a sleep system call."
++#endif
++
++}
++
+ /*
+   Arrange to terminate abnormally with the given signal.  Note: the
+   expectation is that the signal is one whose default action terminates
+@@ -1918,26 +2122,7 @@ terminate_with_sig( int sig )
+ 	// our debug message doesn't arrive at the shadow, we won't know why
+ 	// the job died.  Note that we don't necessarily have access to any
+ 	// libc functions here, so we must use SYSCALL(SYS_something, ...).
+-#if defined(SYS_sleep)
+-	SYSCALL(SYS_sleep, 1);
+-#elif defined(SYS__newselect)
+-	struct timeval t;
+-	t.tv_sec = 1;
+-	t.tv_usec = 0;
+-	SYSCALL(SYS__newselect, 0, NULL, NULL, NULL, &t);
+-#elif defined(SYS_select)
+-	struct timeval t;
+-	t.tv_sec = 1;
+-	t.tv_usec = 0;
+-	SYSCALL(SYS_select, 0, NULL, NULL, NULL, &t);
+-#elif defined(SYS_nanosleep)
+-	struct timespec t;
+-	t.tv_sec = 1;
+-	t.tv_nsec = 0;
+-	SYSCALL(SYS_nanosleep, &t, NULL);
+-#else
+-#error "Please port me!  I need a sleep system call."
+-#endif
++	sleep_syscall(1);
+ 
+ 	if( SYSCALL(SYS_kill, my_pid, sig) < 0 ) {
+ 		EXCEPT( "kill" );
+diff --git a/src/condor_ckpt/malloc-condor.c b/src/condor_ckpt/malloc-condor.c
+index 946617c..973eac2 100644
+--- a/src/condor_ckpt/malloc-condor.c
++++ b/src/condor_ckpt/malloc-condor.c
+@@ -17,15 +17,47 @@
+  *
+  ***************************************************************/
+ 
++/* This file sets up some definitions in order to create a private malloc
++	implementation suitable for use by the checkpointing library to make a
++	private heap.  This is *not* the malloc called by ordinary user code.
++	Its use is primarily by zlib when it compressed/uncompresses checkpoints.
++	The privacy is enforced at the symbol namespace level via the
++	MALLOC_SYMBOL #define that is part of the malloc.c interface.
++*/
++
++
++/* First we check to make sure we're being compiled properly.
++	Traditionally, you can use the values:
++	-DMORECORE=condor_morecore
++	-DHAVE_MMAP=0
++	-Dmalloc_getpagesize=8192
++
++	The first states to use the function condor_morecore() instead of sbrk().
++	The second states that MORECORE should *always* be called instead of mmap().
++	The third dictates how big the pages are wrt to the allocator.
++*/
++#if !defined(MORECORE) || !defined(HAVE_MMAP) || !defined(malloc_getpagesize)
++#error You should be defining MORECORE, HAVE_MMAP, and malloc_getpagesize on the compilation line for this file!
++#endif
+ 
+-/*
+-This file sets up some definitions in order
+-to create a private malloc implementation suitable
+-for use by the checkpointing library to make 
+-a private heap.  This is *not* the malloc called
+-by ordinary user code.
++/* give a prototype of the morecore function for the allocator */
++extern void* MORECORE(int);
++
++/* We use this function to figure out whatever the pagesize was that we told
++	the allocator to use. This allows up to later compute the correct size
++	of our alternate heap. The prototype is in image.cpp.
+ */
++int condor_malloc_getpagesize(void)
++{
++	return malloc_getpagesize;
++}
+ 
++/* Change all usual malloc calls to be prefixed with condor_. The ckpt
++	library uses this new interface when performing compressed checkpoints.
++*/
+ #define MALLOC_SYMBOL(x) condor_##x
+ 
+ #include "malloc.c"
++
++
++
+diff --git a/src/condor_ckpt/zimage.cpp b/src/condor_ckpt/zimage.cpp
+new file mode 100644
+index 0000000..5dede3c
+--- /dev/null
++++ b/src/condor_ckpt/zimage.cpp
+@@ -0,0 +1,22 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#define COMPRESS_CKPT
++
++#include "image.cpp"
+diff --git a/src/condor_ckpt_server/xfer_summary.cpp b/src/condor_ckpt_server/xfer_summary.cpp
+index 23ef813..1877b9b 100644
+--- a/src/condor_ckpt_server/xfer_summary.cpp
++++ b/src/condor_ckpt_server/xfer_summary.cpp
+@@ -33,11 +33,6 @@
+ #include "condor_getcwd.h"
+ 
+ 
+-extern "C" {
+-	char* getwd( char* );
+-}
+-
+-
+ 
+ XferSummary::XferSummary() 
+ {
+diff --git a/src/condor_collector.V6/collector.cpp b/src/condor_collector.V6/collector.cpp
+index 3c70b99..d78255a 100644
+--- a/src/condor_collector.V6/collector.cpp
++++ b/src/condor_collector.V6/collector.cpp
+@@ -19,8 +19,6 @@
+ 
+ #include "condor_common.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+-#include "condor_parser.h"
+ #include "condor_status.h"
+ #include "condor_debug.h"
+ #include "condor_config.h"
+@@ -57,6 +55,9 @@
+ 
+ #include "ccb_server.h"
+ 
++using std::vector;
++using std::string;
++
+ //----------------------------------------------------------------
+ 
+ extern "C" char* CondorVersion( void );
+@@ -67,9 +68,8 @@ CollectorEngine CollectorDaemon::collector( &collectorStats );
+ int CollectorDaemon::ClientTimeout;
+ int CollectorDaemon::QueryTimeout;
+ char* CollectorDaemon::CollectorName;
+-Daemon* CollectorDaemon::View_Collector;
+-Sock* CollectorDaemon::view_sock;
+ Timeslice CollectorDaemon::view_sock_timeslice;
++vector<CollectorDaemon::vc_entry> CollectorDaemon::vc_list;
+ 
+ ClassAd* CollectorDaemon::__query__;
+ int CollectorDaemon::__numAds__;
+@@ -130,9 +130,7 @@ void CollectorDaemon::Init()
+ 	// read in various parameters from condor_config
+ 	CollectorName=NULL;
+ 	ad=NULL;
+-	View_Collector=NULL;
+ 	viewCollectorTypes = NULL;
+-	view_sock=NULL;
+ 	UpdateTimerId=-1;
+ 	updateCollectors = NULL;
+ 	updateRemoteCollector = NULL;
+@@ -652,11 +650,9 @@ int CollectorDaemon::receive_invalidation(Service* /*s*/,
+ 		forward_classad_to_view_collector(command,
+ 										  ATTR_TARGET_TYPE,
+ 										  &cad);
+-	} else
+-	if(View_Collector && ((command == INVALIDATE_STARTD_ADS) ||
+-		(command == INVALIDATE_SUBMITTOR_ADS)) ) {
+-		send_classad_to_sock(command, View_Collector, &cad);
+-	}	
++	} else if ((command == INVALIDATE_STARTD_ADS) || (command == INVALIDATE_SUBMITTOR_ADS)) {
++		send_classad_to_sock(command, &cad);
++    }
+ 
+ 	if( sock->type() == Stream::reli_sock ) {
+ 			// stash this socket for future updates...
+@@ -721,11 +717,9 @@ int CollectorDaemon::receive_update(Service* /*s*/, int command, Stream* sock)
+ 		forward_classad_to_view_collector(command,
+ 										  ATTR_MY_TYPE,
+ 										  cad);
+-	} else
+-	if(View_Collector && ((command == UPDATE_STARTD_AD) ||
+-			(command == UPDATE_SUBMITTOR_AD)) ) {
+-		send_classad_to_sock(command, View_Collector, cad);
+-	}	
++	} else if ((command == UPDATE_STARTD_AD) || (command == UPDATE_SUBMITTOR_AD)) {
++        send_classad_to_sock(command, cad);
++	}
+ 
+ 	if( sock->type() == Stream::reli_sock ) {
+ 			// stash this socket for future updates...
+@@ -854,9 +848,8 @@ int CollectorDaemon::receive_update_expect_ack( Service* /*s*/,
+ 		forward_classad_to_view_collector(command,
+ 										  ATTR_MY_TYPE,
+ 										  cad);
+-	} else
+-    if( View_Collector && UPDATE_STARTD_AD_WITH_ACK == command ) {
+-		send_classad_to_sock ( command, View_Collector, cad );
++	} else if (UPDATE_STARTD_AD_WITH_ACK == command) {
++		send_classad_to_sock(command, cad);
+ 	}
+ 
+ 	// let daemon core clean up the socket
+@@ -1249,47 +1242,52 @@ void CollectorDaemon::Config()
+ 
+     // if we're not the View Collector, let's set something up to forward
+     // all of our ads to the view collector.
+-    if(View_Collector) {
+-        delete View_Collector;
++    for (vector<vc_entry>::iterator e(vc_list.begin());  e != vc_list.end();  ++e) {
++        delete e->collector;
++        delete e->sock;
+     }
+-
+-    if(view_sock) {
+-        delete view_sock;
+-    }	
++    vc_list.clear();
+ 
+     tmp = param("CONDOR_VIEW_HOST");
+-    if(tmp) {
+-       View_Collector = new DCCollector( tmp );
+-       Sinful view_addr( View_Collector->addr() );
+-	   Sinful my_addr( daemonCore->publicNetworkIpAddr() );
+-
+-       if( my_addr.addressPointsToMe( view_addr ) )
+-       {
+-       	     // Do not forward to myself.
+-          dprintf(D_ALWAYS, "Not forwarding to View Server %s, because that's me!\n", tmp);
+-          delete View_Collector;
+-          View_Collector = NULL;
+-       }
+-       else {
+-          dprintf(D_ALWAYS, "Will forward ads on to View Server %s\n", tmp);
+-       }
+-       free(tmp);
+-       if(View_Collector) {
+-		   if( View_Collector->hasUDPCommandPort() ) {
+-			   view_sock = new SafeSock();
+-		   }
+-		   else {
+-			   view_sock = new ReliSock();
+-		   }
+-			   // protect against frequent time-consuming reconnect attempts
+-		   view_sock_timeslice.setTimeslice(0.05);
+-		   view_sock_timeslice.setMaxInterval(1200);
+-       }
++    if (tmp) {
++        StringList cvh(tmp);
++        free(tmp);
++        cvh.rewind();
++        while (char* vhost = cvh.next()) {
++            Daemon* vhd = new DCCollector(vhost);
++            Sinful view_addr( vhd->addr() );
++            Sinful my_addr( daemonCore->publicNetworkIpAddr() );
++
++            if (my_addr.addressPointsToMe(view_addr)) {
++                dprintf(D_ALWAYS, "Not forwarding to View Server %s - self referential\n", vhost);
++                delete vhd;
++                continue;
++            }
++            dprintf(D_ALWAYS, "Will forward ads on to View Server %s\n", vhost);
++
++            Sock* vhsock = NULL;
++            if (vhd->hasUDPCommandPort()) {
++                vhsock = new SafeSock();
++            } else {
++                vhsock = new ReliSock();
++            }
++
++            vc_list.push_back(vc_entry());
++            vc_list.back().name = vhost;
++            vc_list.back().collector = vhd;
++            vc_list.back().sock = vhsock;
++        }
++    }
++
++    if (!vc_list.empty()) {
++        // protect against frequent time-consuming reconnect attempts
++        view_sock_timeslice.setTimeslice(0.05);
++        view_sock_timeslice.setMaxInterval(1200);
+     }
+ 
+ 	if (viewCollectorTypes) delete viewCollectorTypes;
+ 	viewCollectorTypes = NULL;
+-	if (View_Collector) {
++	if (!vc_list.empty()) {
+ 		tmp = param("CONDOR_VIEW_CLASSAD_TYPES");
+ 		if (tmp) {
+ 			viewCollectorTypes = new StringList(tmp);
+@@ -1480,10 +1478,10 @@ CollectorDaemon::forward_classad_to_view_collector(int cmd,
+ 										   const char *filterAttr,
+ 										   ClassAd *ad)
+ {
+-	if (!View_Collector) return;
++	if (vc_list.empty()) return;
+ 
+ 	if (!filterAttr) {
+-		send_classad_to_sock(cmd, View_Collector, ad);
++		send_classad_to_sock(cmd, ad);
+ 		return;
+ 	}
+ 
+@@ -1496,102 +1494,93 @@ CollectorDaemon::forward_classad_to_view_collector(int cmd,
+ 	if (viewCollectorTypes->contains_anycase(type.c_str())) {
+ 		dprintf(D_ALWAYS, "Forwarding ad: type=%s command=%s\n",
+ 				type.c_str(), getCommandString(cmd));
+-		send_classad_to_sock(cmd, View_Collector, ad);
++		send_classad_to_sock(cmd, ad);
+ 	}
+ }
+ 
+-void
+-CollectorDaemon::send_classad_to_sock(int cmd, Daemon * d, ClassAd* theAd)
+-{
+-    // view_sock is static
+-    if(!view_sock) {
+-	dprintf(D_ALWAYS, "Trying to forward ad on, but no connection to View "
+-		"Collector!\n");
+-        return;
+-    }
+-    if(!theAd) {
+-	dprintf(D_ALWAYS, "Trying to forward ad on, but ad is NULL!!!\n");
+-        return;
+-    }
+-	bool raw_command = false;
+-	if( !view_sock->is_connected() ) {
+-			// We must have gotten disconnected.  (Or this is the 1st time.)
+-
+-			// In case we keep getting disconnected or fail to connect,
+-			// and each connection attempt takes a long time, restrict
+-			// what fraction of our time we spend trying to reconnect.
+-
+-		char const *desc = d->idStr() ? d->idStr() : "(null)";
+-		if( view_sock_timeslice.isTimeToRun() ) {
+-			dprintf(D_ALWAYS,"Connecting to CONDOR_VIEW_HOST %s\n", desc );
+-
+-			view_sock_timeslice.setStartTimeNow();
+-			d->connectSock(view_sock,20);
+-			view_sock_timeslice.setFinishTimeNow();
+-
+-			if( !view_sock->is_connected() ) {
+-				dprintf(D_ALWAYS,"Failed to connect to CONDOR_VIEW_HOST %s "
+-						" so not forwarding ad.\n",
+-						desc );
+-				return;
+-			}
+-		}
+-		else {
+-			dprintf(D_FULLDEBUG,"Skipping forwarding of ad to CONDOR_VIEW_HOST %s, because reconnect is delayed for %us.\n", desc, view_sock_timeslice.getTimeToNextRun());
+-			return;
+-		}
+ 
+-	}
+-	else if( view_sock->type() == Stream::reli_sock ) {
+-			// we already did the security handshake the last time
+-			// we sent a command on this socket, so just send a
+-			// raw command this time to avoid reauthenticating
+-		raw_command = true;
+-	}
++void CollectorDaemon::send_classad_to_sock(int cmd, ClassAd* theAd) {
++    if (vc_list.empty()) return;
+ 
+-    if (! d->startCommand(cmd, view_sock, 20, NULL, NULL, raw_command)) {
+-        dprintf( D_ALWAYS, "Can't send command %d to View Collector\n", cmd);
+-        view_sock->end_of_message();
+-		view_sock->close();
++    if (!theAd) {
++        dprintf(D_ALWAYS, "Trying to forward ad on, but ad is NULL\n");
+         return;
+     }
+ 
+-    if( theAd ) {
+-        if( ! theAd->put( *view_sock ) ) {
+-            dprintf( D_ALWAYS, "Can't forward classad to View Collector\n");
++    for (vector<vc_entry>::iterator e(vc_list.begin());  e != vc_list.end();  ++e) {
++        Daemon* view_coll = e->collector;
++        Sock* view_sock = e->sock;
++        const char* view_name = e->name.c_str();
++
++        bool raw_command = false;
++        if (!view_sock->is_connected()) {
++            // We must have gotten disconnected.  (Or this is the 1st time.)
++            // In case we keep getting disconnected or fail to connect,
++            // and each connection attempt takes a long time, restrict
++            // what fraction of our time we spend trying to reconnect.
++            if (view_sock_timeslice.isTimeToRun()) {
++                dprintf(D_ALWAYS,"Connecting to CONDOR_VIEW_HOST %s\n", view_name);
++
++                view_sock_timeslice.setStartTimeNow();
++                view_coll->connectSock(view_sock,20);
++                view_sock_timeslice.setFinishTimeNow();
++
++                if (!view_sock->is_connected()) {
++                    dprintf(D_ALWAYS,"Failed to connect to CONDOR_VIEW_HOST %s so not forwarding ad.\n", view_name);
++                    continue;
++                }
++            } else {
++                dprintf(D_FULLDEBUG,"Skipping forwarding of ad to CONDOR_VIEW_HOST %s, because reconnect is delayed for %us.\n", view_name, view_sock_timeslice.getTimeToNextRun());
++                continue;
++            }
++        } else if (view_sock->type() == Stream::reli_sock) {
++            // we already did the security handshake the last time
++            // we sent a command on this socket, so just send a
++            // raw command this time to avoid reauthenticating
++            raw_command = true;
++        }
++
++        if (! view_coll->startCommand(cmd, view_sock, 20, NULL, NULL, raw_command)) {
++            dprintf( D_ALWAYS, "Can't send command %d to View Collector %s\n", cmd, view_name);
+             view_sock->end_of_message();
+-			view_sock->close();
+-            return;
++            view_sock->close();
++            continue;
+         }
+-    }
+ 
+-	if( cmd == UPDATE_STARTD_AD ) {
+-			// Forward the startd private ad as well.  This allows the
+-			// target collector to act as an aggregator for multiple collectors
+-			// that balance the load of authenticating connections from
+-			// the rest of the pool.
+-
+-		AdNameHashKey		hk;
+-		ClassAd *pvt_ad;
+-
+-		ASSERT( makeStartdAdHashKey (hk, theAd, NULL) );
+-		pvt_ad = collector.lookup(STARTD_PVT_AD,hk);
+-		if( pvt_ad ) {
+-			if( ! pvt_ad->put( *view_sock ) ) {
+-				dprintf( D_ALWAYS, "Can't forward startd private classad to View Collector\n");
+-				view_sock->end_of_message();
+-				view_sock->close();
+-				return;
+-			}
+-		}
+-	}
++        if (theAd) {
++            if (!theAd->put(*view_sock)) {
++                dprintf( D_ALWAYS, "Can't forward classad to View Collector %s\n", view_name);
++                view_sock->end_of_message();
++                view_sock->close();
++                continue;
++            }
++        }
+ 
+-    if( ! view_sock->end_of_message() ) {
+-        dprintf( D_ALWAYS, "Can't send end_of_message to View Collector\n");
+-		view_sock->close();
+-        return;
++        if (cmd == UPDATE_STARTD_AD) {
++            // Forward the startd private ad as well.  This allows the
++            // target collector to act as an aggregator for multiple collectors
++            // that balance the load of authenticating connections from
++            // the rest of the pool.
++            AdNameHashKey hk;
++            ClassAd *pvt_ad;
++            ASSERT( makeStartdAdHashKey (hk, theAd, NULL) );
++            pvt_ad = collector.lookup(STARTD_PVT_AD,hk);
++            if (pvt_ad) {
++                if (!pvt_ad->put(*view_sock)) {
++                    dprintf( D_ALWAYS, "Can't forward startd private classad to View Collector %s\n", view_name);
++                    view_sock->end_of_message();
++                    view_sock->close();
++                    continue;
++                }
++            }
++        }
++
++        if (!view_sock->end_of_message()) {
++            dprintf(D_ALWAYS, "Can't send end_of_message to View Collector %s\n", view_name);
++            view_sock->close();
++            continue;
++        }
+     }
+-    return;
+ }
+ 
+ //  Collector stats on universes
+diff --git a/src/condor_collector.V6/collector.h b/src/condor_collector.V6/collector.h
+index 3c56d68..9aad465 100644
+--- a/src/condor_collector.V6/collector.h
++++ b/src/condor_collector.V6/collector.h
+@@ -20,6 +20,8 @@
+ #ifndef _COLLECTOR_DAEMON_H_
+ #define _COLLECTOR_DAEMON_H_
+ 
++#include <vector>
++
+ #include "condor_classad.h"
+ #include "condor_commands.h"
+ #include "totals.h"
+@@ -121,18 +123,23 @@ public:
+ 	static void sendCollectorAd();
+ 
+ 	static void forward_classad_to_view_collector(int cmd, const char *filterAttr, ClassAd *ad);
+-	static void send_classad_to_sock( int cmd, Daemon * d, ClassAd* theAd);	
++	static void send_classad_to_sock(int cmd, ClassAd* theAd);	
+ 
+ 	// A get method to support SOAP
+ 	static CollectorEngine & getCollector( void ) { return collector; };
+ 
+-protected:
++    // data pertaining to each view collector entry
++    struct vc_entry {
++        std::string name;
++        Daemon* collector;
++        Sock* sock;
++    };
+ 
++protected:
+ 	static CollectorStats collectorStats;
+ 	static CollectorEngine collector;
+-	static Daemon* View_Collector;
+-	static Sock* view_sock;
+ 	static Timeslice view_sock_timeslice;
++    static std::vector<vc_entry> vc_list;
+ 
+ 	static int ClientTimeout;
+ 	static int QueryTimeout;
+diff --git a/src/condor_collector.V6/collector_engine.cpp b/src/condor_collector.V6/collector_engine.cpp
+index 02e288c..896b379 100644
+--- a/src/condor_collector.V6/collector_engine.cpp
++++ b/src/condor_collector.V6/collector_engine.cpp
+@@ -24,7 +24,6 @@ extern "C" void event_mgr (void);
+ //-------------------------------------------------------------
+ 
+ #include "condor_classad.h"
+-#include "condor_parser.h"
+ #include "condor_debug.h"
+ #include "condor_config.h"
+ #include "condor_network.h"
+diff --git a/src/condor_contrib/aviary/CMakeLists.txt b/src/condor_contrib/aviary/CMakeLists.txt
+new file mode 100644
+index 0000000..71baf72
+--- /dev/null
++++ b/src/condor_contrib/aviary/CMakeLists.txt
+@@ -0,0 +1,28 @@
++ ###############################################################
++ # 
++ # Copyright (C) 2009-2011, Red Hat, Inc.
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ############################################################### 
++
++if (LINUX)
++	option(WITH_AVIARY "Support for aviary SOAP plugins" ON)
++endif()
++
++if ( WITH_AVIARY AND HAVE_EXT_WSO2 )
++ 
++ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/include ${WSO2_INCLUDES})
++ add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/src )
++
++endif()
+\ No newline at end of file
+diff --git a/src/condor_contrib/aviary/README b/src/condor_contrib/aviary/README
+new file mode 100644
+index 0000000..400943b
+--- /dev/null
++++ b/src/condor_contrib/aviary/README
+@@ -0,0 +1,2 @@
++Aviary - Simplified RPC Interface for Condor
++--------------------------------------------
+diff --git a/src/condor_contrib/aviary/author.txt b/src/condor_contrib/aviary/author.txt
+new file mode 100644
+index 0000000..7b62f15
+--- /dev/null
++++ b/src/condor_contrib/aviary/author.txt
+@@ -0,0 +1,3 @@
++author: Peter MacKinnon
++organization: Red Hat Inc.
++e-mail: pmackinn at redhat.com
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ArchType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ArchType.cpp
+new file mode 100644
+index 0000000..fd8176c
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ArchType.cpp
+@@ -0,0 +1,354 @@
++
++
++        /**
++         * ArchType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_ArchType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the ArchType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::ArchType::ArchType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_ArchType;
++                
++            isValidArchType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "ArchType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::ArchType::ArchType(std::string arg_ArchType)
++        {
++             
++                   qname = NULL;
++             
++                 property_ArchType;
++             
++            isValidArchType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "ArchType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_ArchType = arg_ArchType;
++            
++        }
++        AviaryCommon::ArchType::~ArchType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            ArchType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setArchType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::ArchType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element ArchType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::ArchType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::ArchType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::ArchType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_ArchType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_ArchType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::ArchType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ArchType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::ArchType::getProperty1()
++            {
++                return getArchType();
++            }
++
++            /**
++             * getter for ArchType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ArchType::getArchType()
++             {
++                return property_ArchType;
++             }
++
++            /**
++             * setter for ArchType
++             */
++            bool WSF_CALL
++            AviaryCommon::ArchType::setArchType(
++                    const std::string  arg_ArchType)
++             {
++                
++
++                if(isValidArchType &&
++                        arg_ArchType == property_ArchType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_ArchType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ArchType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetArchType();
++
++                
++                        property_ArchType = std::string(arg_ArchType.c_str());
++                        isValidArchType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for ArchType.
++             */
++             ADBArchTypeEnum WSF_CALL
++             AviaryCommon::ArchType::getArchTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_ArchType.c_str(), "INTEL") == 0)
++                    return ArchType_INTEL;
++             
++                 if (axutil_strcmp(property_ArchType.c_str(), "X86_64") == 0)
++                    return ArchType_X86_64;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBArchTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for ArchType.
++             */
++             bool WSF_CALL
++            AviaryCommon::ArchType::setArchTypeEnum(const ADBArchTypeEnum  arg_ArchType)
++             {
++                
++
++                
++                resetArchType();
++
++                   
++                   switch (arg_ArchType)
++                   {
++                     
++                       case ArchType_INTEL :
++                            property_ArchType = ("INTEL");
++                          break;
++                     
++                       case ArchType_X86_64 :
++                            property_ArchType = ("X86_64");
++                          break;
++                     
++                     
++                       default:
++                          isValidArchType = false;
++                          property_ArchType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting ArchType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_ArchType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidArchType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for ArchType
++            */
++           bool WSF_CALL
++           AviaryCommon::ArchType::resetArchType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidArchType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ArchType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ArchType::isArchTypeNil()
++           {
++               return !isValidArchType;
++           }
++
++           /**
++            * Set ArchType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ArchType::setArchTypeNil()
++           {
++               return resetArchType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attribute.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attribute.cpp
+new file mode 100644
+index 0000000..17298ef
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attribute.cpp
+@@ -0,0 +1,1022 @@
++
++
++        /**
++         * Attribute.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_Attribute.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = Attribute
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::Attribute::Attribute()
++        {
++
++        
++                    property_Name;
++                
++            isValidName  = false;
++        
++                property_Type  = NULL;
++              
++            isValidType  = false;
++        
++                    property_Value;
++                
++            isValidValue  = false;
++        
++        }
++
++       AviaryCommon::Attribute::Attribute(std::string arg_Name,AviaryCommon::AttributeType* arg_Type,std::string arg_Value)
++        {
++             
++                 property_Name;
++             
++            isValidName  = true;
++            
++               property_Type  = NULL;
++             
++            isValidType  = true;
++            
++                 property_Value;
++             
++            isValidValue  = true;
++            
++                    property_Name = arg_Name;
++            
++                    property_Type = arg_Type;
++            
++                    property_Value = arg_Value;
++            
++        }
++        AviaryCommon::Attribute::~Attribute()
++        {
++            if (property_Type) delete property_Type;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::Attribute::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building name element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setName(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setName("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element name missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building type element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "type", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::AttributeType* element = new AviaryCommon::AttributeType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element type");
++                                      }
++                                      else
++                                      {
++                                          status = setType(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for type ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element type missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building value element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "value", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setValue(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element value");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setValue("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for value ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element value missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::Attribute::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::Attribute::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::Attribute::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t *text_value_1;
++                    axis2_char_t *text_value_1_temp;
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidName)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property name");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_1 = (axis2_char_t*)property_Name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_1_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_1, true);
++                           if (text_value_1_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1_temp, axutil_strlen(text_value_1_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_1_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidType)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property type");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("type"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("type")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing type element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%stype",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%stype>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Type->serialize(current_node, parent_element,
++                                                                                 property_Type->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidValue)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property value");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("value"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("value")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing value element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_3 = (axis2_char_t*)property_Value.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
++                           if (text_value_3_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for name by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::Attribute::getProperty1()
++            {
++                return getName();
++            }
++
++            /**
++             * getter for name.
++             */
++            std::string WSF_CALL
++            AviaryCommon::Attribute::getName()
++             {
++                return property_Name;
++             }
++
++            /**
++             * setter for name
++             */
++            bool WSF_CALL
++            AviaryCommon::Attribute::setName(
++                    const std::string  arg_Name)
++             {
++                
++
++                if(isValidName &&
++                        arg_Name == property_Name)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Name.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"name is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetName();
++
++                
++                        property_Name = std::string(arg_Name.c_str());
++                        isValidName = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for name
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::resetName()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidName = false; 
++               return true;
++           }
++
++           /**
++            * Check whether name is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::isNameNil()
++           {
++               return !isValidName;
++           }
++
++           /**
++            * Set name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::setNameNil()
++           {
++               return resetName();
++           }
++
++           
++
++            /**
++             * Getter for type by  Property Number 2
++             */
++            AviaryCommon::AttributeType* WSF_CALL
++            AviaryCommon::Attribute::getProperty2()
++            {
++                return getType();
++            }
++
++            /**
++             * getter for type.
++             */
++            AviaryCommon::AttributeType* WSF_CALL
++            AviaryCommon::Attribute::getType()
++             {
++                return property_Type;
++             }
++
++            /**
++             * setter for type
++             */
++            bool WSF_CALL
++            AviaryCommon::Attribute::setType(
++                    AviaryCommon::AttributeType*  arg_Type)
++             {
++                
++
++                if(isValidType &&
++                        arg_Type == property_Type)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Type)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"type is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetType();
++
++                
++                    if(NULL == arg_Type)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Type = arg_Type;
++                        isValidType = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for type
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::resetType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Type != NULL)
++                {
++                   
++                   
++                         delete  property_Type;
++                     
++
++                   }
++
++                
++                
++                
++               isValidType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether type is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::isTypeNil()
++           {
++               return !isValidType;
++           }
++
++           /**
++            * Set type to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::setTypeNil()
++           {
++               return resetType();
++           }
++
++           
++
++            /**
++             * Getter for value by  Property Number 3
++             */
++            std::string WSF_CALL
++            AviaryCommon::Attribute::getProperty3()
++            {
++                return getValue();
++            }
++
++            /**
++             * getter for value.
++             */
++            std::string WSF_CALL
++            AviaryCommon::Attribute::getValue()
++             {
++                return property_Value;
++             }
++
++            /**
++             * setter for value
++             */
++            bool WSF_CALL
++            AviaryCommon::Attribute::setValue(
++                    const std::string  arg_Value)
++             {
++                
++
++                if(isValidValue &&
++                        arg_Value == property_Value)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Value.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"value is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetValue();
++
++                
++                        property_Value = std::string(arg_Value.c_str());
++                        isValidValue = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for value
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::resetValue()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidValue = false; 
++               return true;
++           }
++
++           /**
++            * Check whether value is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::isValueNil()
++           {
++               return !isValidValue;
++           }
++
++           /**
++            * Set value to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Attribute::setValueNil()
++           {
++               return resetValue();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_AttributeType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_AttributeType.cpp
+new file mode 100644
+index 0000000..c0b36d0
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_AttributeType.cpp
+@@ -0,0 +1,389 @@
++
++
++        /**
++         * AttributeType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_AttributeType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the AttributeType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::AttributeType::AttributeType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_AttributeType;
++                
++            isValidAttributeType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "AttributeType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::AttributeType::AttributeType(std::string arg_AttributeType)
++        {
++             
++                   qname = NULL;
++             
++                 property_AttributeType;
++             
++            isValidAttributeType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "AttributeType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_AttributeType = arg_AttributeType;
++            
++        }
++        AviaryCommon::AttributeType::~AttributeType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            AttributeType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setAttributeType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::AttributeType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element AttributeType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::AttributeType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::AttributeType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::AttributeType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_AttributeType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_AttributeType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::AttributeType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for AttributeType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::AttributeType::getProperty1()
++            {
++                return getAttributeType();
++            }
++
++            /**
++             * getter for AttributeType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::AttributeType::getAttributeType()
++             {
++                return property_AttributeType;
++             }
++
++            /**
++             * setter for AttributeType
++             */
++            bool WSF_CALL
++            AviaryCommon::AttributeType::setAttributeType(
++                    const std::string  arg_AttributeType)
++             {
++                
++
++                if(isValidAttributeType &&
++                        arg_AttributeType == property_AttributeType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_AttributeType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"AttributeType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetAttributeType();
++
++                
++                        property_AttributeType = std::string(arg_AttributeType.c_str());
++                        isValidAttributeType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for AttributeType.
++             */
++             ADBAttributeTypeEnum WSF_CALL
++             AviaryCommon::AttributeType::getAttributeTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_AttributeType.c_str(), "INTEGER") == 0)
++                    return AttributeType_INTEGER;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "FLOAT") == 0)
++                    return AttributeType_FLOAT;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "STRING") == 0)
++                    return AttributeType_STRING;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "EXPRESSION") == 0)
++                    return AttributeType_EXPRESSION;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "BOOLEAN") == 0)
++                    return AttributeType_BOOLEAN;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "UNDEFINED") == 0)
++                    return AttributeType_UNDEFINED;
++             
++                 if (axutil_strcmp(property_AttributeType.c_str(), "ERROR") == 0)
++                    return AttributeType_ERROR;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBAttributeTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for AttributeType.
++             */
++             bool WSF_CALL
++            AviaryCommon::AttributeType::setAttributeTypeEnum(const ADBAttributeTypeEnum  arg_AttributeType)
++             {
++                
++
++                
++                resetAttributeType();
++
++                   
++                   switch (arg_AttributeType)
++                   {
++                     
++                       case AttributeType_INTEGER :
++                            property_AttributeType = ("INTEGER");
++                          break;
++                     
++                       case AttributeType_FLOAT :
++                            property_AttributeType = ("FLOAT");
++                          break;
++                     
++                       case AttributeType_STRING :
++                            property_AttributeType = ("STRING");
++                          break;
++                     
++                       case AttributeType_EXPRESSION :
++                            property_AttributeType = ("EXPRESSION");
++                          break;
++                     
++                       case AttributeType_BOOLEAN :
++                            property_AttributeType = ("BOOLEAN");
++                          break;
++                     
++                       case AttributeType_UNDEFINED :
++                            property_AttributeType = ("UNDEFINED");
++                          break;
++                     
++                       case AttributeType_ERROR :
++                            property_AttributeType = ("ERROR");
++                          break;
++                     
++                     
++                       default:
++                          isValidAttributeType = false;
++                          property_AttributeType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting AttributeType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_AttributeType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidAttributeType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for AttributeType
++            */
++           bool WSF_CALL
++           AviaryCommon::AttributeType::resetAttributeType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidAttributeType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether AttributeType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::AttributeType::isAttributeTypeNil()
++           {
++               return !isValidAttributeType;
++           }
++
++           /**
++            * Set AttributeType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::AttributeType::setAttributeTypeNil()
++           {
++               return resetAttributeType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attributes.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attributes.cpp
+new file mode 100644
+index 0000000..35ab792
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Attributes.cpp
+@@ -0,0 +1,738 @@
++
++
++        /**
++         * Attributes.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_Attributes.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = Attributes
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::Attributes::Attributes()
++        {
++
++        
++                property_Attrs  = NULL;
++              
++            isValidAttrs  = false;
++        
++        }
++
++       AviaryCommon::Attributes::Attributes(std::vector<AviaryCommon::Attribute*>* arg_Attrs)
++        {
++             
++               property_Attrs  = NULL;
++             
++            isValidAttrs  = true;
++            
++                    property_Attrs = arg_Attrs;
++            
++        }
++        AviaryCommon::Attributes::~Attributes()
++        {
++            if (property_Attrs) {
++                while(!property_Attrs->empty()) delete property_Attrs->back(), property_Attrs->pop_back();
++                delete property_Attrs;
++            }
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::Attributes::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++                       { 
++                    /*
++                     * building Attrs array
++                     */
++                       std::vector<AviaryCommon::Attribute*>* arr_list =new std::vector<AviaryCommon::Attribute*>();
++                   
++
++                     
++                     /*
++                      * building attrs element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "attrs", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("attrs", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::Attribute* element = new AviaryCommon::Attribute();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element attrs ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for attrs ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"attrs (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setAttrs(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::Attributes::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::Attributes::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::Attributes::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidAttrs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("attrs"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("attrs")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Attrs array
++                      */
++                     if (property_Attrs != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sattrs",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sattrs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Attrs->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::Attribute* element = (*property_Attrs)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing attrs element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for attrs by  Property Number 1
++             */
++            std::vector<AviaryCommon::Attribute*>* WSF_CALL
++            AviaryCommon::Attributes::getProperty1()
++            {
++                return getAttrs();
++            }
++
++            /**
++             * getter for attrs.
++             */
++            std::vector<AviaryCommon::Attribute*>* WSF_CALL
++            AviaryCommon::Attributes::getAttrs()
++             {
++                return property_Attrs;
++             }
++
++            /**
++             * setter for attrs
++             */
++            bool WSF_CALL
++            AviaryCommon::Attributes::setAttrs(
++                    std::vector<AviaryCommon::Attribute*>*  arg_Attrs)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidAttrs &&
++                        arg_Attrs == property_Attrs)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Attrs->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"attrs has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Attrs)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetAttrs();
++
++                
++                    if(NULL == arg_Attrs)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Attrs = arg_Attrs;
++                        if(non_nil_exists)
++                        {
++                            isValidAttrs = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of attrs.
++             */
++            AviaryCommon::Attribute* WSF_CALL
++            AviaryCommon::Attributes::getAttrsAt(int i)
++            {
++                AviaryCommon::Attribute* ret_val;
++                if(property_Attrs == NULL)
++                {
++                    return (AviaryCommon::Attribute*)0;
++                }
++                ret_val =   (*property_Attrs)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of attrs.
++             */
++           bool WSF_CALL
++            AviaryCommon::Attributes::setAttrsAt(int i,
++                    AviaryCommon::Attribute* arg_Attrs)
++            {
++                 AviaryCommon::Attribute* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidAttrs &&
++                    property_Attrs &&
++                  
++                    arg_Attrs == (*property_Attrs)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Attrs == NULL)
++                {
++                    property_Attrs = new std::vector<AviaryCommon::Attribute*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Attrs)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidAttrs = true;
++                        (*property_Attrs)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Attrs)[i] = arg_Attrs;
++                  
++
++               isValidAttrs = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to attrs.
++             */
++            bool WSF_CALL
++            AviaryCommon::Attributes::addAttrs(
++                    AviaryCommon::Attribute* arg_Attrs)
++             {
++
++                
++                    if( NULL == arg_Attrs
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Attrs == NULL)
++                {
++                    property_Attrs = new std::vector<AviaryCommon::Attribute*>();
++                }
++              
++               property_Attrs->push_back(arg_Attrs);
++              
++                isValidAttrs = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the attrs array.
++             */
++            int WSF_CALL
++            AviaryCommon::Attributes::sizeofAttrs()
++            {
++
++                if(property_Attrs == NULL)
++                {
++                    return 0;
++                }
++                return property_Attrs->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryCommon::Attributes::removeAttrsAt(int i)
++            {
++                return setAttrsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for attrs
++            */
++           bool WSF_CALL
++           AviaryCommon::Attributes::resetAttrs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Attrs != NULL)
++                {
++                  std::vector<AviaryCommon::Attribute*>::iterator it =  property_Attrs->begin();
++                  for( ; it <  property_Attrs->end() ; ++it)
++                  {
++                     AviaryCommon::Attribute* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Attrs)
++                 delete property_Attrs;
++                
++               isValidAttrs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether attrs is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Attributes::isAttrsNil()
++           {
++               return !isValidAttrs;
++           }
++
++           /**
++            * Set attrs to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Attributes::setAttrsNil()
++           {
++               return resetAttrs();
++           }
++
++           
++           /**
++            * Check whether attrs is nill at i
++            */
++           bool WSF_CALL
++           AviaryCommon::Attributes::isAttrsNilAt(int i)
++           {
++               return (isValidAttrs == false ||
++                       NULL == property_Attrs ||
++                     NULL == (*property_Attrs)[i]);
++            }
++
++           /**
++            * Set attrs to nil at i
++            */
++           bool WSF_CALL
++           AviaryCommon::Attributes::setAttrsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Attrs == NULL ||
++                            isValidAttrs == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Attrs->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Attrs)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of attrs is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Attrs == NULL)
++                {
++                    isValidAttrs = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::Attribute* element = (*property_Attrs)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidAttrs = false;
++                        (*property_Attrs)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Attrs)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraint.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraint.cpp
+new file mode 100644
+index 0000000..890ec68
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraint.cpp
+@@ -0,0 +1,717 @@
++
++
++        /**
++         * JobConstraint.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobConstraint.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobConstraint
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobConstraint::JobConstraint()
++        {
++
++        
++                property_Type  = NULL;
++              
++            isValidType  = false;
++        
++                    property_Value;
++                
++            isValidValue  = false;
++        
++        }
++
++       AviaryCommon::JobConstraint::JobConstraint(AviaryCommon::JobConstraintType* arg_Type,std::string arg_Value)
++        {
++             
++               property_Type  = NULL;
++             
++            isValidType  = true;
++            
++                 property_Value;
++             
++            isValidValue  = true;
++            
++                    property_Type = arg_Type;
++            
++                    property_Value = arg_Value;
++            
++        }
++        AviaryCommon::JobConstraint::~JobConstraint()
++        {
++            if (property_Type) delete property_Type;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobConstraint::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building type element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "type", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobConstraintType* element = new AviaryCommon::JobConstraintType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element type");
++                                      }
++                                      else
++                                      {
++                                          status = setType(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for type ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element type missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building value element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "value", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setValue(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element value");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setValue("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for value ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element value missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobConstraint::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobConstraint::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobConstraint::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidType)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property type");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("type"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("type")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing type element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%stype",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%stype>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Type->serialize(current_node, parent_element,
++                                                                                 property_Type->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidValue)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property value");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("value"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("value")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing value element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Value.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for type by  Property Number 1
++             */
++            AviaryCommon::JobConstraintType* WSF_CALL
++            AviaryCommon::JobConstraint::getProperty1()
++            {
++                return getType();
++            }
++
++            /**
++             * getter for type.
++             */
++            AviaryCommon::JobConstraintType* WSF_CALL
++            AviaryCommon::JobConstraint::getType()
++             {
++                return property_Type;
++             }
++
++            /**
++             * setter for type
++             */
++            bool WSF_CALL
++            AviaryCommon::JobConstraint::setType(
++                    AviaryCommon::JobConstraintType*  arg_Type)
++             {
++                
++
++                if(isValidType &&
++                        arg_Type == property_Type)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Type)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"type is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetType();
++
++                
++                    if(NULL == arg_Type)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Type = arg_Type;
++                        isValidType = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for type
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::resetType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Type != NULL)
++                {
++                   
++                   
++                         delete  property_Type;
++                     
++
++                   }
++
++                
++                
++                
++               isValidType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether type is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::isTypeNil()
++           {
++               return !isValidType;
++           }
++
++           /**
++            * Set type to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::setTypeNil()
++           {
++               return resetType();
++           }
++
++           
++
++            /**
++             * Getter for value by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobConstraint::getProperty2()
++            {
++                return getValue();
++            }
++
++            /**
++             * getter for value.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobConstraint::getValue()
++             {
++                return property_Value;
++             }
++
++            /**
++             * setter for value
++             */
++            bool WSF_CALL
++            AviaryCommon::JobConstraint::setValue(
++                    const std::string  arg_Value)
++             {
++                
++
++                if(isValidValue &&
++                        arg_Value == property_Value)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Value.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"value is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetValue();
++
++                
++                        property_Value = std::string(arg_Value.c_str());
++                        isValidValue = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for value
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::resetValue()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidValue = false; 
++               return true;
++           }
++
++           /**
++            * Check whether value is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::isValueNil()
++           {
++               return !isValidValue;
++           }
++
++           /**
++            * Set value to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraint::setValueNil()
++           {
++               return resetValue();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraintType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraintType.cpp
+new file mode 100644
+index 0000000..35584e7
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobConstraintType.cpp
+@@ -0,0 +1,361 @@
++
++
++        /**
++         * JobConstraintType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobConstraintType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the JobConstraintType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::JobConstraintType::JobConstraintType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_JobConstraintType;
++                
++            isValidJobConstraintType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "JobConstraintType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::JobConstraintType::JobConstraintType(std::string arg_JobConstraintType)
++        {
++             
++                   qname = NULL;
++             
++                 property_JobConstraintType;
++             
++            isValidJobConstraintType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "JobConstraintType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_JobConstraintType = arg_JobConstraintType;
++            
++        }
++        AviaryCommon::JobConstraintType::~JobConstraintType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            JobConstraintType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setJobConstraintType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobConstraintType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element JobConstraintType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobConstraintType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobConstraintType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::JobConstraintType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_JobConstraintType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_JobConstraintType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobConstraintType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for JobConstraintType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobConstraintType::getProperty1()
++            {
++                return getJobConstraintType();
++            }
++
++            /**
++             * getter for JobConstraintType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobConstraintType::getJobConstraintType()
++             {
++                return property_JobConstraintType;
++             }
++
++            /**
++             * setter for JobConstraintType
++             */
++            bool WSF_CALL
++            AviaryCommon::JobConstraintType::setJobConstraintType(
++                    const std::string  arg_JobConstraintType)
++             {
++                
++
++                if(isValidJobConstraintType &&
++                        arg_JobConstraintType == property_JobConstraintType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_JobConstraintType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"JobConstraintType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetJobConstraintType();
++
++                
++                        property_JobConstraintType = std::string(arg_JobConstraintType.c_str());
++                        isValidJobConstraintType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for JobConstraintType.
++             */
++             ADBJobConstraintTypeEnum WSF_CALL
++             AviaryCommon::JobConstraintType::getJobConstraintTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_JobConstraintType.c_str(), "CMD") == 0)
++                    return JobConstraintType_CMD;
++             
++                 if (axutil_strcmp(property_JobConstraintType.c_str(), "ARGS") == 0)
++                    return JobConstraintType_ARGS;
++             
++                 if (axutil_strcmp(property_JobConstraintType.c_str(), "OWNER") == 0)
++                    return JobConstraintType_OWNER;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBJobConstraintTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for JobConstraintType.
++             */
++             bool WSF_CALL
++            AviaryCommon::JobConstraintType::setJobConstraintTypeEnum(const ADBJobConstraintTypeEnum  arg_JobConstraintType)
++             {
++                
++
++                
++                resetJobConstraintType();
++
++                   
++                   switch (arg_JobConstraintType)
++                   {
++                     
++                       case JobConstraintType_CMD :
++                            property_JobConstraintType = ("CMD");
++                          break;
++                     
++                       case JobConstraintType_ARGS :
++                            property_JobConstraintType = ("ARGS");
++                          break;
++                     
++                       case JobConstraintType_OWNER :
++                            property_JobConstraintType = ("OWNER");
++                          break;
++                     
++                     
++                       default:
++                          isValidJobConstraintType = false;
++                          property_JobConstraintType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting JobConstraintType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_JobConstraintType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidJobConstraintType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for JobConstraintType
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraintType::resetJobConstraintType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidJobConstraintType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether JobConstraintType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraintType::isJobConstraintTypeNil()
++           {
++               return !isValidJobConstraintType;
++           }
++
++           /**
++            * Set JobConstraintType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobConstraintType::setJobConstraintTypeNil()
++           {
++               return resetJobConstraintType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobData.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobData.cpp
+new file mode 100644
+index 0000000..89912cd
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobData.cpp
+@@ -0,0 +1,680 @@
++
++
++        /**
++         * JobData.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobData.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobData
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobData::JobData()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Type  = NULL;
++              
++            isValidType  = false;
++        
++        }
++
++       AviaryCommon::JobData::JobData(AviaryCommon::JobID* arg_Id,AviaryCommon::JobDataType* arg_Type)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Type  = NULL;
++             
++            isValidType  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Type = arg_Type;
++            
++        }
++        AviaryCommon::JobData::~JobData()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Type) delete property_Type;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobData::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building type element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "type", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobDataType* element = new AviaryCommon::JobDataType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element type");
++                                      }
++                                      else
++                                      {
++                                          status = setType(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for type ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element type missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobData::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobData::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobData::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidType)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property type");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("type"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("type")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing type element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%stype",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%stype>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Type->serialize(current_node, parent_element,
++                                                                                 property_Type->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobData::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobData::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryCommon::JobData::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for type by  Property Number 2
++             */
++            AviaryCommon::JobDataType* WSF_CALL
++            AviaryCommon::JobData::getProperty2()
++            {
++                return getType();
++            }
++
++            /**
++             * getter for type.
++             */
++            AviaryCommon::JobDataType* WSF_CALL
++            AviaryCommon::JobData::getType()
++             {
++                return property_Type;
++             }
++
++            /**
++             * setter for type
++             */
++            bool WSF_CALL
++            AviaryCommon::JobData::setType(
++                    AviaryCommon::JobDataType*  arg_Type)
++             {
++                
++
++                if(isValidType &&
++                        arg_Type == property_Type)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Type)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"type is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetType();
++
++                
++                    if(NULL == arg_Type)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Type = arg_Type;
++                        isValidType = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for type
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::resetType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Type != NULL)
++                {
++                   
++                   
++                         delete  property_Type;
++                     
++
++                   }
++
++                
++                
++                
++               isValidType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether type is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::isTypeNil()
++           {
++               return !isValidType;
++           }
++
++           /**
++            * Set type to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobData::setTypeNil()
++           {
++               return resetType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDataType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDataType.cpp
+new file mode 100644
+index 0000000..ef63f82
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDataType.cpp
+@@ -0,0 +1,361 @@
++
++
++        /**
++         * JobDataType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobDataType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the JobDataType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::JobDataType::JobDataType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_JobDataType;
++                
++            isValidJobDataType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "JobDataType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::JobDataType::JobDataType(std::string arg_JobDataType)
++        {
++             
++                   qname = NULL;
++             
++                 property_JobDataType;
++             
++            isValidJobDataType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "JobDataType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_JobDataType = arg_JobDataType;
++            
++        }
++        AviaryCommon::JobDataType::~JobDataType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            JobDataType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setJobDataType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobDataType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element JobDataType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobDataType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobDataType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::JobDataType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_JobDataType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_JobDataType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobDataType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for JobDataType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobDataType::getProperty1()
++            {
++                return getJobDataType();
++            }
++
++            /**
++             * getter for JobDataType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobDataType::getJobDataType()
++             {
++                return property_JobDataType;
++             }
++
++            /**
++             * setter for JobDataType
++             */
++            bool WSF_CALL
++            AviaryCommon::JobDataType::setJobDataType(
++                    const std::string  arg_JobDataType)
++             {
++                
++
++                if(isValidJobDataType &&
++                        arg_JobDataType == property_JobDataType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_JobDataType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"JobDataType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetJobDataType();
++
++                
++                        property_JobDataType = std::string(arg_JobDataType.c_str());
++                        isValidJobDataType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for JobDataType.
++             */
++             ADBJobDataTypeEnum WSF_CALL
++             AviaryCommon::JobDataType::getJobDataTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_JobDataType.c_str(), "ERR") == 0)
++                    return JobDataType_ERR;
++             
++                 if (axutil_strcmp(property_JobDataType.c_str(), "LOG") == 0)
++                    return JobDataType_LOG;
++             
++                 if (axutil_strcmp(property_JobDataType.c_str(), "OUT") == 0)
++                    return JobDataType_OUT;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBJobDataTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for JobDataType.
++             */
++             bool WSF_CALL
++            AviaryCommon::JobDataType::setJobDataTypeEnum(const ADBJobDataTypeEnum  arg_JobDataType)
++             {
++                
++
++                
++                resetJobDataType();
++
++                   
++                   switch (arg_JobDataType)
++                   {
++                     
++                       case JobDataType_ERR :
++                            property_JobDataType = ("ERR");
++                          break;
++                     
++                       case JobDataType_LOG :
++                            property_JobDataType = ("LOG");
++                          break;
++                     
++                       case JobDataType_OUT :
++                            property_JobDataType = ("OUT");
++                          break;
++                     
++                     
++                       default:
++                          isValidJobDataType = false;
++                          property_JobDataType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting JobDataType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_JobDataType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidJobDataType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for JobDataType
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDataType::resetJobDataType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidJobDataType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether JobDataType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDataType::isJobDataTypeNil()
++           {
++               return !isValidJobDataType;
++           }
++
++           /**
++            * Set JobDataType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDataType::setJobDataTypeNil()
++           {
++               return resetJobDataType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDetails.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDetails.cpp
+new file mode 100644
+index 0000000..c1ca804
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobDetails.cpp
+@@ -0,0 +1,929 @@
++
++
++        /**
++         * JobDetails.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobDetails.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobDetails
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobDetails::JobDetails()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++                property_Details  = NULL;
++              
++            isValidDetails  = false;
++        
++        }
++
++       AviaryCommon::JobDetails::JobDetails(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,AviaryCommon::Attributes* arg_Details)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++               property_Details  = NULL;
++             
++            isValidDetails  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Status = arg_Status;
++            
++                    property_Details = arg_Details;
++            
++        }
++        AviaryCommon::JobDetails::~JobDetails()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Status) delete property_Status;
++            if (property_Details) delete property_Details;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobDetails::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building details element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "details", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("details", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("details", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Attributes* element = new AviaryCommon::Attributes();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element details");
++                                      }
++                                      else
++                                      {
++                                          status = setDetails(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for details ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobDetails::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobDetails::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobDetails::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidDetails)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("details"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("details")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing details element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sdetails",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sdetails>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Details->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Details->serialize(current_node, parent_element,
++                                                                                 property_Details->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Details->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobDetails::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobDetails::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryCommon::JobDetails::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobDetails::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobDetails::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryCommon::JobDetails::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
++            /**
++             * Getter for details by  Property Number 3
++             */
++            AviaryCommon::Attributes* WSF_CALL
++            AviaryCommon::JobDetails::getProperty3()
++            {
++                return getDetails();
++            }
++
++            /**
++             * getter for details.
++             */
++            AviaryCommon::Attributes* WSF_CALL
++            AviaryCommon::JobDetails::getDetails()
++             {
++                return property_Details;
++             }
++
++            /**
++             * setter for details
++             */
++            bool WSF_CALL
++            AviaryCommon::JobDetails::setDetails(
++                    AviaryCommon::Attributes*  arg_Details)
++             {
++                
++
++                if(isValidDetails &&
++                        arg_Details == property_Details)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetDetails();
++
++                
++                    if(NULL == arg_Details)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Details = arg_Details;
++                        isValidDetails = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for details
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::resetDetails()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Details != NULL)
++                {
++                   
++                   
++                         delete  property_Details;
++                     
++
++                   }
++
++                
++                
++                
++               isValidDetails = false; 
++               return true;
++           }
++
++           /**
++            * Check whether details is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::isDetailsNil()
++           {
++               return !isValidDetails;
++           }
++
++           /**
++            * Set details to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobDetails::setDetailsNil()
++           {
++               return resetDetails();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobID.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobID.cpp
+new file mode 100644
+index 0000000..ae21485
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobID.cpp
+@@ -0,0 +1,1270 @@
++
++
++        /**
++         * JobID.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobID.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobID
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobID::JobID()
++        {
++
++        
++                    property_Job;
++                
++            isValidJob  = false;
++        
++                    property_Pool;
++                
++            isValidPool  = false;
++        
++                    property_Scheduler;
++                
++            isValidScheduler  = false;
++        
++                property_Submission  = NULL;
++              
++            isValidSubmission  = false;
++        
++        }
++
++       AviaryCommon::JobID::JobID(std::string arg_Job,std::string arg_Pool,std::string arg_Scheduler,AviaryCommon::SubmissionID* arg_Submission)
++        {
++             
++                 property_Job;
++             
++            isValidJob  = true;
++            
++                 property_Pool;
++             
++            isValidPool  = true;
++            
++                 property_Scheduler;
++             
++            isValidScheduler  = true;
++            
++               property_Submission  = NULL;
++             
++            isValidSubmission  = true;
++            
++                    property_Job = arg_Job;
++            
++                    property_Pool = arg_Pool;
++            
++                    property_Scheduler = arg_Scheduler;
++            
++                    property_Submission = arg_Submission;
++            
++        }
++        AviaryCommon::JobID::~JobID()
++        {
++            if (property_Submission) delete property_Submission;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobID::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building job element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "job", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setJob(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element job");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setJob("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for job ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element job missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building pool element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "pool", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setPool(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element pool");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setPool("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for pool ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building scheduler element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "scheduler", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("scheduler", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("scheduler", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setScheduler(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element scheduler");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setScheduler("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for scheduler ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building submission element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "submission", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element submission");
++                                      }
++                                      else
++                                      {
++                                          status = setSubmission(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for submission ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobID::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobID::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobID::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t *text_value_1;
++                    axis2_char_t *text_value_1_temp;
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++                    axis2_char_t text_value_4[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJob)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property job");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("job"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("job")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing job element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sjob>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sjob>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_1 = (axis2_char_t*)property_Job.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_1_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_1, true);
++                           if (text_value_1_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1_temp, axutil_strlen(text_value_1_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_1_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidPool)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("pool"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("pool")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing pool element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%spool>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%spool>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Pool.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidScheduler)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("scheduler"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("scheduler")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing scheduler element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sscheduler>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sscheduler>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_3 = (axis2_char_t*)property_Scheduler.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
++                           if (text_value_3_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidSubmission)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("submission"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("submission")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing submission element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%ssubmission",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%ssubmission>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Submission->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Submission->serialize(current_node, parent_element,
++                                                                                 property_Submission->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Submission->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for job by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getProperty1()
++            {
++                return getJob();
++            }
++
++            /**
++             * getter for job.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getJob()
++             {
++                return property_Job;
++             }
++
++            /**
++             * setter for job
++             */
++            bool WSF_CALL
++            AviaryCommon::JobID::setJob(
++                    const std::string  arg_Job)
++             {
++                
++
++                if(isValidJob &&
++                        arg_Job == property_Job)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Job.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"job is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetJob();
++
++                
++                        property_Job = std::string(arg_Job.c_str());
++                        isValidJob = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for job
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::resetJob()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidJob = false; 
++               return true;
++           }
++
++           /**
++            * Check whether job is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::isJobNil()
++           {
++               return !isValidJob;
++           }
++
++           /**
++            * Set job to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::setJobNil()
++           {
++               return resetJob();
++           }
++
++           
++
++            /**
++             * Getter for pool by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getProperty2()
++            {
++                return getPool();
++            }
++
++            /**
++             * getter for pool.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getPool()
++             {
++                return property_Pool;
++             }
++
++            /**
++             * setter for pool
++             */
++            bool WSF_CALL
++            AviaryCommon::JobID::setPool(
++                    const std::string  arg_Pool)
++             {
++                
++
++                if(isValidPool &&
++                        arg_Pool == property_Pool)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetPool();
++
++                
++                        property_Pool = std::string(arg_Pool.c_str());
++                        isValidPool = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for pool
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::resetPool()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPool = false; 
++               return true;
++           }
++
++           /**
++            * Check whether pool is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::isPoolNil()
++           {
++               return !isValidPool;
++           }
++
++           /**
++            * Set pool to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::setPoolNil()
++           {
++               return resetPool();
++           }
++
++           
++
++            /**
++             * Getter for scheduler by  Property Number 3
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getProperty3()
++            {
++                return getScheduler();
++            }
++
++            /**
++             * getter for scheduler.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobID::getScheduler()
++             {
++                return property_Scheduler;
++             }
++
++            /**
++             * setter for scheduler
++             */
++            bool WSF_CALL
++            AviaryCommon::JobID::setScheduler(
++                    const std::string  arg_Scheduler)
++             {
++                
++
++                if(isValidScheduler &&
++                        arg_Scheduler == property_Scheduler)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetScheduler();
++
++                
++                        property_Scheduler = std::string(arg_Scheduler.c_str());
++                        isValidScheduler = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for scheduler
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::resetScheduler()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidScheduler = false; 
++               return true;
++           }
++
++           /**
++            * Check whether scheduler is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::isSchedulerNil()
++           {
++               return !isValidScheduler;
++           }
++
++           /**
++            * Set scheduler to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::setSchedulerNil()
++           {
++               return resetScheduler();
++           }
++
++           
++
++            /**
++             * Getter for submission by  Property Number 4
++             */
++            AviaryCommon::SubmissionID* WSF_CALL
++            AviaryCommon::JobID::getProperty4()
++            {
++                return getSubmission();
++            }
++
++            /**
++             * getter for submission.
++             */
++            AviaryCommon::SubmissionID* WSF_CALL
++            AviaryCommon::JobID::getSubmission()
++             {
++                return property_Submission;
++             }
++
++            /**
++             * setter for submission
++             */
++            bool WSF_CALL
++            AviaryCommon::JobID::setSubmission(
++                    AviaryCommon::SubmissionID*  arg_Submission)
++             {
++                
++
++                if(isValidSubmission &&
++                        arg_Submission == property_Submission)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetSubmission();
++
++                
++                    if(NULL == arg_Submission)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Submission = arg_Submission;
++                        isValidSubmission = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for submission
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::resetSubmission()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Submission != NULL)
++                {
++                   
++                   
++                         delete  property_Submission;
++                     
++
++                   }
++
++                
++                
++                
++               isValidSubmission = false; 
++               return true;
++           }
++
++           /**
++            * Check whether submission is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::isSubmissionNil()
++           {
++               return !isValidSubmission;
++           }
++
++           /**
++            * Set submission to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobID::setSubmissionNil()
++           {
++               return resetSubmission();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatus.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatus.cpp
+new file mode 100644
+index 0000000..df7def8
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatus.cpp
+@@ -0,0 +1,929 @@
++
++
++        /**
++         * JobStatus.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobStatus.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobStatus
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobStatus::JobStatus()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++                property_Job_status  = NULL;
++              
++            isValidJob_status  = false;
++        
++        }
++
++       AviaryCommon::JobStatus::JobStatus(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,AviaryCommon::JobStatusType* arg_Job_status)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++               property_Job_status  = NULL;
++             
++            isValidJob_status  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Status = arg_Status;
++            
++                    property_Job_status = arg_Job_status;
++            
++        }
++        AviaryCommon::JobStatus::~JobStatus()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Status) delete property_Status;
++            if (property_Job_status) delete property_Job_status;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobStatus::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building job_status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "job_status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job_status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job_status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobStatusType* element = new AviaryCommon::JobStatusType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element job_status");
++                                      }
++                                      else
++                                      {
++                                          status = setJob_status(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for job_status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobStatus::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobStatus::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobStatus::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJob_status)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("job_status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("job_status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing job_status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sjob_status",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sjob_status>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Job_status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Job_status->serialize(current_node, parent_element,
++                                                                                 property_Job_status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Job_status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobStatus::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobStatus::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryCommon::JobStatus::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobStatus::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobStatus::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryCommon::JobStatus::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
++            /**
++             * Getter for job_status by  Property Number 3
++             */
++            AviaryCommon::JobStatusType* WSF_CALL
++            AviaryCommon::JobStatus::getProperty3()
++            {
++                return getJob_status();
++            }
++
++            /**
++             * getter for job_status.
++             */
++            AviaryCommon::JobStatusType* WSF_CALL
++            AviaryCommon::JobStatus::getJob_status()
++             {
++                return property_Job_status;
++             }
++
++            /**
++             * setter for job_status
++             */
++            bool WSF_CALL
++            AviaryCommon::JobStatus::setJob_status(
++                    AviaryCommon::JobStatusType*  arg_Job_status)
++             {
++                
++
++                if(isValidJob_status &&
++                        arg_Job_status == property_Job_status)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetJob_status();
++
++                
++                    if(NULL == arg_Job_status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Job_status = arg_Job_status;
++                        isValidJob_status = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for job_status
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::resetJob_status()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Job_status != NULL)
++                {
++                   
++                   
++                         delete  property_Job_status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidJob_status = false; 
++               return true;
++           }
++
++           /**
++            * Check whether job_status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::isJob_statusNil()
++           {
++               return !isValidJob_status;
++           }
++
++           /**
++            * Set job_status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatus::setJob_statusNil()
++           {
++               return resetJob_status();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatusType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatusType.cpp
+new file mode 100644
+index 0000000..99e0832
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobStatusType.cpp
+@@ -0,0 +1,375 @@
++
++
++        /**
++         * JobStatusType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobStatusType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the JobStatusType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::JobStatusType::JobStatusType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_JobStatusType;
++                
++            isValidJobStatusType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "JobStatusType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::JobStatusType::JobStatusType(std::string arg_JobStatusType)
++        {
++             
++                   qname = NULL;
++             
++                 property_JobStatusType;
++             
++            isValidJobStatusType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "JobStatusType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_JobStatusType = arg_JobStatusType;
++            
++        }
++        AviaryCommon::JobStatusType::~JobStatusType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            JobStatusType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setJobStatusType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobStatusType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element JobStatusType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobStatusType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobStatusType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::JobStatusType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_JobStatusType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_JobStatusType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobStatusType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for JobStatusType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobStatusType::getProperty1()
++            {
++                return getJobStatusType();
++            }
++
++            /**
++             * getter for JobStatusType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobStatusType::getJobStatusType()
++             {
++                return property_JobStatusType;
++             }
++
++            /**
++             * setter for JobStatusType
++             */
++            bool WSF_CALL
++            AviaryCommon::JobStatusType::setJobStatusType(
++                    const std::string  arg_JobStatusType)
++             {
++                
++
++                if(isValidJobStatusType &&
++                        arg_JobStatusType == property_JobStatusType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_JobStatusType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"JobStatusType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetJobStatusType();
++
++                
++                        property_JobStatusType = std::string(arg_JobStatusType.c_str());
++                        isValidJobStatusType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for JobStatusType.
++             */
++             ADBJobStatusTypeEnum WSF_CALL
++             AviaryCommon::JobStatusType::getJobStatusTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_JobStatusType.c_str(), "IDLE") == 0)
++                    return JobStatusType_IDLE;
++             
++                 if (axutil_strcmp(property_JobStatusType.c_str(), "RUNNING") == 0)
++                    return JobStatusType_RUNNING;
++             
++                 if (axutil_strcmp(property_JobStatusType.c_str(), "REMOVED") == 0)
++                    return JobStatusType_REMOVED;
++             
++                 if (axutil_strcmp(property_JobStatusType.c_str(), "COMPLETED") == 0)
++                    return JobStatusType_COMPLETED;
++             
++                 if (axutil_strcmp(property_JobStatusType.c_str(), "HELD") == 0)
++                    return JobStatusType_HELD;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBJobStatusTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for JobStatusType.
++             */
++             bool WSF_CALL
++            AviaryCommon::JobStatusType::setJobStatusTypeEnum(const ADBJobStatusTypeEnum  arg_JobStatusType)
++             {
++                
++
++                
++                resetJobStatusType();
++
++                   
++                   switch (arg_JobStatusType)
++                   {
++                     
++                       case JobStatusType_IDLE :
++                            property_JobStatusType = ("IDLE");
++                          break;
++                     
++                       case JobStatusType_RUNNING :
++                            property_JobStatusType = ("RUNNING");
++                          break;
++                     
++                       case JobStatusType_REMOVED :
++                            property_JobStatusType = ("REMOVED");
++                          break;
++                     
++                       case JobStatusType_COMPLETED :
++                            property_JobStatusType = ("COMPLETED");
++                          break;
++                     
++                       case JobStatusType_HELD :
++                            property_JobStatusType = ("HELD");
++                          break;
++                     
++                     
++                       default:
++                          isValidJobStatusType = false;
++                          property_JobStatusType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting JobStatusType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_JobStatusType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidJobStatusType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for JobStatusType
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatusType::resetJobStatusType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidJobStatusType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether JobStatusType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatusType::isJobStatusTypeNil()
++           {
++               return !isValidJobStatusType;
++           }
++
++           /**
++            * Set JobStatusType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobStatusType::setJobStatusTypeNil()
++           {
++               return resetJobStatusType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobSummary.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobSummary.cpp
+new file mode 100644
+index 0000000..75ac107
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_JobSummary.cpp
+@@ -0,0 +1,3247 @@
++
++
++        /**
++         * JobSummary.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_JobSummary.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = JobSummary
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::JobSummary::JobSummary()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++                property_Queued  = NULL;
++              
++            isValidQueued  = false;
++        
++                property_Last_update  = NULL;
++              
++            isValidLast_update  = false;
++        
++                property_Job_status  = NULL;
++              
++            isValidJob_status  = false;
++        
++                    property_Cmd;
++                
++            isValidCmd  = false;
++        
++                    property_Args1;
++                
++            isValidArgs1  = false;
++        
++                    property_Args2;
++                
++            isValidArgs2  = false;
++        
++                    property_Held;
++                
++            isValidHeld  = false;
++        
++                    property_Released;
++                
++            isValidReleased  = false;
++        
++                    property_Removed;
++                
++            isValidRemoved  = false;
++        
++        }
++
++       AviaryCommon::JobSummary::JobSummary(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,axutil_date_time_t* arg_Queued,axutil_date_time_t* arg_Last_update,AviaryCommon::JobStatusType* arg_Job_status,std::string arg_Cmd,std::string arg_Args1,std::string arg_Args2,std::string arg_Held,std::string arg_Released,std::string arg_Removed)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++               property_Queued  = NULL;
++             
++            isValidQueued  = true;
++            
++               property_Last_update  = NULL;
++             
++            isValidLast_update  = true;
++            
++               property_Job_status  = NULL;
++             
++            isValidJob_status  = true;
++            
++                 property_Cmd;
++             
++            isValidCmd  = true;
++            
++                 property_Args1;
++             
++            isValidArgs1  = true;
++            
++                 property_Args2;
++             
++            isValidArgs2  = true;
++            
++                 property_Held;
++             
++            isValidHeld  = true;
++            
++                 property_Released;
++             
++            isValidReleased  = true;
++            
++                 property_Removed;
++             
++            isValidRemoved  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Status = arg_Status;
++            
++                    property_Queued = arg_Queued;
++            
++                    property_Last_update = arg_Last_update;
++            
++                    property_Job_status = arg_Job_status;
++            
++                    property_Cmd = arg_Cmd;
++            
++                    property_Args1 = arg_Args1;
++            
++                    property_Args2 = arg_Args2;
++            
++                    property_Held = arg_Held;
++            
++                    property_Released = arg_Released;
++            
++                    property_Removed = arg_Removed;
++            
++        }
++        AviaryCommon::JobSummary::~JobSummary()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Status) delete property_Status;
++            if (property_Job_status) delete property_Job_status;
++            axutil_date_time_free(property_Queued,Environment::getEnv());
++            axutil_date_time_free(property_Last_update,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::JobSummary::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building queued element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "queued", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("queued", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("queued", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                          axutil_date_time_t* element = axutil_date_time_create(Environment::getEnv());
++                                          status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, Environment::getEnv(),
++                                                                          text_value);
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++                                              if(element != NULL)
++                                              {
++                                                  axutil_date_time_free(element, Environment::getEnv());
++                                              }
++					                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI ,"failed in building element queued ");
++                                          }
++                                          else
++                                          {
++                                            status = setQueued(element);
++                                          }
++                                      }
++                                      
++                                      else
++                                      {
++				                            WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "NULL value is set to a non nillable element queued");
++                                            status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for queued ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element queued missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building last_update element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "last_update", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("last_update", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("last_update", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                          axutil_date_time_t* element = axutil_date_time_create(Environment::getEnv());
++                                          status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, Environment::getEnv(),
++                                                                          text_value);
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++                                              if(element != NULL)
++                                              {
++                                                  axutil_date_time_free(element, Environment::getEnv());
++                                              }
++					                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI ,"failed in building element last_update ");
++                                          }
++                                          else
++                                          {
++                                            status = setLast_update(element);
++                                          }
++                                      }
++                                      
++                                      else
++                                      {
++				                            WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "NULL value is set to a non nillable element last_update");
++                                            status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for last_update ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element last_update missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building job_status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "job_status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job_status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job_status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobStatusType* element = new AviaryCommon::JobStatusType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element job_status");
++                                      }
++                                      else
++                                      {
++                                          status = setJob_status(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for job_status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element job_status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building cmd element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "cmd", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("cmd", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("cmd", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setCmd(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element cmd");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setCmd("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for cmd ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element cmd missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building args1 element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "args1", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args1", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args1", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setArgs1(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args1");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setArgs1("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args1 ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building args2 element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "args2", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args2", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args2", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setArgs2(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args2");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setArgs2("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args2 ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building held element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "held", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("held", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("held", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setHeld(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element held");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setHeld("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for held ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building released element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "released", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("released", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("released", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setReleased(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element released");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setReleased("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for released ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building removed element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "removed", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("removed", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("removed", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setRemoved(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element removed");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setRemoved("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for removed ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::JobSummary::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::JobSummary::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::JobSummary::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++                    axis2_char_t *text_value_4;
++                    axis2_char_t *text_value_4_temp;
++                    
++                    axis2_char_t text_value_5[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_6;
++                    axis2_char_t *text_value_6_temp;
++                    
++                    axis2_char_t *text_value_7;
++                    axis2_char_t *text_value_7_temp;
++                    
++                    axis2_char_t *text_value_8;
++                    axis2_char_t *text_value_8_temp;
++                    
++                    axis2_char_t *text_value_9;
++                    axis2_char_t *text_value_9_temp;
++                    
++                    axis2_char_t *text_value_10;
++                    axis2_char_t *text_value_10_temp;
++                    
++                    axis2_char_t *text_value_11;
++                    axis2_char_t *text_value_11_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidQueued)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property queued");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("queued"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("queued")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing queued element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%squeued>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%squeued>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                          text_value_3 = axutil_date_time_serialize_date_time(property_Queued, Environment::getEnv());
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,text_value_3);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidLast_update)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property last_update");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("last_update"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("last_update")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing last_update element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%slast_update>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%slast_update>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                          text_value_4 = axutil_date_time_serialize_date_time(property_Last_update, Environment::getEnv());
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,text_value_4);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJob_status)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property job_status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("job_status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("job_status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing job_status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sjob_status",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sjob_status>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Job_status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Job_status->serialize(current_node, parent_element,
++                                                                                 property_Job_status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Job_status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidCmd)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property cmd");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("cmd"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("cmd")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing cmd element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scmd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scmd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_6 = (axis2_char_t*)property_Cmd.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_6_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_6, true);
++                           if (text_value_6_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_6_temp, axutil_strlen(text_value_6_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_6_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_6, axutil_strlen(text_value_6));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidArgs1)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("args1"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("args1")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing args1 element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sargs1>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sargs1>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_7 = (axis2_char_t*)property_Args1.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_7_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_7, true);
++                           if (text_value_7_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_7_temp, axutil_strlen(text_value_7_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_7_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_7, axutil_strlen(text_value_7));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidArgs2)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("args2"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("args2")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing args2 element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sargs2>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sargs2>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_8 = (axis2_char_t*)property_Args2.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_8_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_8, true);
++                           if (text_value_8_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_8_temp, axutil_strlen(text_value_8_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_8_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_8, axutil_strlen(text_value_8));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidHeld)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("held"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("held")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing held element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sheld>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sheld>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_9 = (axis2_char_t*)property_Held.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_9_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_9, true);
++                           if (text_value_9_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_9_temp, axutil_strlen(text_value_9_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_9_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_9, axutil_strlen(text_value_9));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidReleased)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("released"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("released")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing released element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sreleased>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sreleased>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_10 = (axis2_char_t*)property_Released.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_10_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_10, true);
++                           if (text_value_10_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_10_temp, axutil_strlen(text_value_10_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_10_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_10, axutil_strlen(text_value_10));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidRemoved)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("removed"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("removed")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing removed element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sremoved>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sremoved>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_11 = (axis2_char_t*)property_Removed.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_11_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_11, true);
++                           if (text_value_11_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_11_temp, axutil_strlen(text_value_11_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_11_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_11, axutil_strlen(text_value_11));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobSummary::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryCommon::JobSummary::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobSummary::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::JobSummary::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
++            /**
++             * Getter for queued by  Property Number 3
++             */
++            axutil_date_time_t* WSF_CALL
++            AviaryCommon::JobSummary::getProperty3()
++            {
++                return getQueued();
++            }
++
++            /**
++             * getter for queued.
++             */
++            axutil_date_time_t* WSF_CALL
++            AviaryCommon::JobSummary::getQueued()
++             {
++                return property_Queued;
++             }
++
++            /**
++             * setter for queued
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setQueued(
++                    axutil_date_time_t*  arg_Queued)
++             {
++                
++
++                if(isValidQueued &&
++                        arg_Queued == property_Queued)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Queued)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"queued is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetQueued();
++
++                
++                    if(NULL == arg_Queued)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Queued = arg_Queued;
++                        isValidQueued = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for queued
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetQueued()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Queued != NULL)
++                {
++                   
++                   
++                      axutil_date_time_free(property_Queued, Environment::getEnv());
++                         property_Queued = NULL;
++                     
++
++                   }
++
++                
++                
++                
++               isValidQueued = false; 
++               return true;
++           }
++
++           /**
++            * Check whether queued is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isQueuedNil()
++           {
++               return !isValidQueued;
++           }
++
++           /**
++            * Set queued to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setQueuedNil()
++           {
++               return resetQueued();
++           }
++
++           
++
++            /**
++             * Getter for last_update by  Property Number 4
++             */
++            axutil_date_time_t* WSF_CALL
++            AviaryCommon::JobSummary::getProperty4()
++            {
++                return getLast_update();
++            }
++
++            /**
++             * getter for last_update.
++             */
++            axutil_date_time_t* WSF_CALL
++            AviaryCommon::JobSummary::getLast_update()
++             {
++                return property_Last_update;
++             }
++
++            /**
++             * setter for last_update
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setLast_update(
++                    axutil_date_time_t*  arg_Last_update)
++             {
++                
++
++                if(isValidLast_update &&
++                        arg_Last_update == property_Last_update)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Last_update)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"last_update is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetLast_update();
++
++                
++                    if(NULL == arg_Last_update)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Last_update = arg_Last_update;
++                        isValidLast_update = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for last_update
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetLast_update()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Last_update != NULL)
++                {
++                   
++                   
++                      axutil_date_time_free(property_Last_update, Environment::getEnv());
++                         property_Last_update = NULL;
++                     
++
++                   }
++
++                
++                
++                
++               isValidLast_update = false; 
++               return true;
++           }
++
++           /**
++            * Check whether last_update is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isLast_updateNil()
++           {
++               return !isValidLast_update;
++           }
++
++           /**
++            * Set last_update to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setLast_updateNil()
++           {
++               return resetLast_update();
++           }
++
++           
++
++            /**
++             * Getter for job_status by  Property Number 5
++             */
++            AviaryCommon::JobStatusType* WSF_CALL
++            AviaryCommon::JobSummary::getProperty5()
++            {
++                return getJob_status();
++            }
++
++            /**
++             * getter for job_status.
++             */
++            AviaryCommon::JobStatusType* WSF_CALL
++            AviaryCommon::JobSummary::getJob_status()
++             {
++                return property_Job_status;
++             }
++
++            /**
++             * setter for job_status
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setJob_status(
++                    AviaryCommon::JobStatusType*  arg_Job_status)
++             {
++                
++
++                if(isValidJob_status &&
++                        arg_Job_status == property_Job_status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Job_status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"job_status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetJob_status();
++
++                
++                    if(NULL == arg_Job_status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Job_status = arg_Job_status;
++                        isValidJob_status = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for job_status
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetJob_status()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Job_status != NULL)
++                {
++                   
++                   
++                         delete  property_Job_status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidJob_status = false; 
++               return true;
++           }
++
++           /**
++            * Check whether job_status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isJob_statusNil()
++           {
++               return !isValidJob_status;
++           }
++
++           /**
++            * Set job_status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setJob_statusNil()
++           {
++               return resetJob_status();
++           }
++
++           
++
++            /**
++             * Getter for cmd by  Property Number 6
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty6()
++            {
++                return getCmd();
++            }
++
++            /**
++             * getter for cmd.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getCmd()
++             {
++                return property_Cmd;
++             }
++
++            /**
++             * setter for cmd
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setCmd(
++                    const std::string  arg_Cmd)
++             {
++                
++
++                if(isValidCmd &&
++                        arg_Cmd == property_Cmd)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Cmd.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"cmd is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetCmd();
++
++                
++                        property_Cmd = std::string(arg_Cmd.c_str());
++                        isValidCmd = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for cmd
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetCmd()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidCmd = false; 
++               return true;
++           }
++
++           /**
++            * Check whether cmd is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isCmdNil()
++           {
++               return !isValidCmd;
++           }
++
++           /**
++            * Set cmd to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setCmdNil()
++           {
++               return resetCmd();
++           }
++
++           
++
++            /**
++             * Getter for args1 by  Property Number 7
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty7()
++            {
++                return getArgs1();
++            }
++
++            /**
++             * getter for args1.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getArgs1()
++             {
++                return property_Args1;
++             }
++
++            /**
++             * setter for args1
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setArgs1(
++                    const std::string  arg_Args1)
++             {
++                
++
++                if(isValidArgs1 &&
++                        arg_Args1 == property_Args1)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetArgs1();
++
++                
++                        property_Args1 = std::string(arg_Args1.c_str());
++                        isValidArgs1 = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for args1
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetArgs1()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidArgs1 = false; 
++               return true;
++           }
++
++           /**
++            * Check whether args1 is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isArgs1Nil()
++           {
++               return !isValidArgs1;
++           }
++
++           /**
++            * Set args1 to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setArgs1Nil()
++           {
++               return resetArgs1();
++           }
++
++           
++
++            /**
++             * Getter for args2 by  Property Number 8
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty8()
++            {
++                return getArgs2();
++            }
++
++            /**
++             * getter for args2.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getArgs2()
++             {
++                return property_Args2;
++             }
++
++            /**
++             * setter for args2
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setArgs2(
++                    const std::string  arg_Args2)
++             {
++                
++
++                if(isValidArgs2 &&
++                        arg_Args2 == property_Args2)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetArgs2();
++
++                
++                        property_Args2 = std::string(arg_Args2.c_str());
++                        isValidArgs2 = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for args2
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetArgs2()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidArgs2 = false; 
++               return true;
++           }
++
++           /**
++            * Check whether args2 is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isArgs2Nil()
++           {
++               return !isValidArgs2;
++           }
++
++           /**
++            * Set args2 to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setArgs2Nil()
++           {
++               return resetArgs2();
++           }
++
++           
++
++            /**
++             * Getter for held by  Property Number 9
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty9()
++            {
++                return getHeld();
++            }
++
++            /**
++             * getter for held.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getHeld()
++             {
++                return property_Held;
++             }
++
++            /**
++             * setter for held
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setHeld(
++                    const std::string  arg_Held)
++             {
++                
++
++                if(isValidHeld &&
++                        arg_Held == property_Held)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetHeld();
++
++                
++                        property_Held = std::string(arg_Held.c_str());
++                        isValidHeld = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for held
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetHeld()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidHeld = false; 
++               return true;
++           }
++
++           /**
++            * Check whether held is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isHeldNil()
++           {
++               return !isValidHeld;
++           }
++
++           /**
++            * Set held to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setHeldNil()
++           {
++               return resetHeld();
++           }
++
++           
++
++            /**
++             * Getter for released by  Property Number 10
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty10()
++            {
++                return getReleased();
++            }
++
++            /**
++             * getter for released.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getReleased()
++             {
++                return property_Released;
++             }
++
++            /**
++             * setter for released
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setReleased(
++                    const std::string  arg_Released)
++             {
++                
++
++                if(isValidReleased &&
++                        arg_Released == property_Released)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetReleased();
++
++                
++                        property_Released = std::string(arg_Released.c_str());
++                        isValidReleased = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for released
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetReleased()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidReleased = false; 
++               return true;
++           }
++
++           /**
++            * Check whether released is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isReleasedNil()
++           {
++               return !isValidReleased;
++           }
++
++           /**
++            * Set released to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setReleasedNil()
++           {
++               return resetReleased();
++           }
++
++           
++
++            /**
++             * Getter for removed by  Property Number 11
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getProperty11()
++            {
++                return getRemoved();
++            }
++
++            /**
++             * getter for removed.
++             */
++            std::string WSF_CALL
++            AviaryCommon::JobSummary::getRemoved()
++             {
++                return property_Removed;
++             }
++
++            /**
++             * setter for removed
++             */
++            bool WSF_CALL
++            AviaryCommon::JobSummary::setRemoved(
++                    const std::string  arg_Removed)
++             {
++                
++
++                if(isValidRemoved &&
++                        arg_Removed == property_Removed)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetRemoved();
++
++                
++                        property_Removed = std::string(arg_Removed.c_str());
++                        isValidRemoved = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for removed
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::resetRemoved()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidRemoved = false; 
++               return true;
++           }
++
++           /**
++            * Check whether removed is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::isRemovedNil()
++           {
++               return !isValidRemoved;
++           }
++
++           /**
++            * Set removed to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::JobSummary::setRemovedNil()
++           {
++               return resetRemoved();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_OSType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_OSType.cpp
+new file mode 100644
+index 0000000..8be66d4
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_OSType.cpp
+@@ -0,0 +1,354 @@
++
++
++        /**
++         * OSType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_OSType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the OSType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::OSType::OSType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_OSType;
++                
++            isValidOSType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "OSType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::OSType::OSType(std::string arg_OSType)
++        {
++             
++                   qname = NULL;
++             
++                 property_OSType;
++             
++            isValidOSType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "OSType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_OSType = arg_OSType;
++            
++        }
++        AviaryCommon::OSType::~OSType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            OSType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setOSType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::OSType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element OSType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::OSType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::OSType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::OSType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_OSType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_OSType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::OSType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for OSType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::OSType::getProperty1()
++            {
++                return getOSType();
++            }
++
++            /**
++             * getter for OSType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::OSType::getOSType()
++             {
++                return property_OSType;
++             }
++
++            /**
++             * setter for OSType
++             */
++            bool WSF_CALL
++            AviaryCommon::OSType::setOSType(
++                    const std::string  arg_OSType)
++             {
++                
++
++                if(isValidOSType &&
++                        arg_OSType == property_OSType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_OSType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"OSType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetOSType();
++
++                
++                        property_OSType = std::string(arg_OSType.c_str());
++                        isValidOSType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for OSType.
++             */
++             ADBOSTypeEnum WSF_CALL
++             AviaryCommon::OSType::getOSTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_OSType.c_str(), "LINUX") == 0)
++                    return OSType_LINUX;
++             
++                 if (axutil_strcmp(property_OSType.c_str(), "WINDOWS") == 0)
++                    return OSType_WINDOWS;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBOSTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for OSType.
++             */
++             bool WSF_CALL
++            AviaryCommon::OSType::setOSTypeEnum(const ADBOSTypeEnum  arg_OSType)
++             {
++                
++
++                
++                resetOSType();
++
++                   
++                   switch (arg_OSType)
++                   {
++                     
++                       case OSType_LINUX :
++                            property_OSType = ("LINUX");
++                          break;
++                     
++                       case OSType_WINDOWS :
++                            property_OSType = ("WINDOWS");
++                          break;
++                     
++                     
++                       default:
++                          isValidOSType = false;
++                          property_OSType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting OSType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_OSType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidOSType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for OSType
++            */
++           bool WSF_CALL
++           AviaryCommon::OSType::resetOSType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidOSType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether OSType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::OSType::isOSTypeNil()
++           {
++               return !isValidOSType;
++           }
++
++           /**
++            * Set OSType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::OSType::setOSTypeNil()
++           {
++               return resetOSType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraint.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraint.cpp
+new file mode 100644
+index 0000000..c98aa05
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraint.cpp
+@@ -0,0 +1,717 @@
++
++
++        /**
++         * ResourceConstraint.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_ResourceConstraint.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = ResourceConstraint
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::ResourceConstraint::ResourceConstraint()
++        {
++
++        
++                property_Type  = NULL;
++              
++            isValidType  = false;
++        
++                    property_Value;
++                
++            isValidValue  = false;
++        
++        }
++
++       AviaryCommon::ResourceConstraint::ResourceConstraint(AviaryCommon::ResourceConstraintType* arg_Type,std::string arg_Value)
++        {
++             
++               property_Type  = NULL;
++             
++            isValidType  = true;
++            
++                 property_Value;
++             
++            isValidValue  = true;
++            
++                    property_Type = arg_Type;
++            
++                    property_Value = arg_Value;
++            
++        }
++        AviaryCommon::ResourceConstraint::~ResourceConstraint()
++        {
++            if (property_Type) delete property_Type;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::ResourceConstraint::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building type element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "type", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("type", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::ResourceConstraintType* element = new AviaryCommon::ResourceConstraintType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element type");
++                                      }
++                                      else
++                                      {
++                                          status = setType(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for type ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element type missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building value element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "value", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("value", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setValue(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element value");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setValue("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for value ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element value missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::ResourceConstraint::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::ResourceConstraint::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::ResourceConstraint::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidType)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property type");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("type"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("type")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing type element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%stype",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%stype>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Type->serialize(current_node, parent_element,
++                                                                                 property_Type->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidValue)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property value");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("value"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("value")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing value element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%svalue>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Value.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for type by  Property Number 1
++             */
++            AviaryCommon::ResourceConstraintType* WSF_CALL
++            AviaryCommon::ResourceConstraint::getProperty1()
++            {
++                return getType();
++            }
++
++            /**
++             * getter for type.
++             */
++            AviaryCommon::ResourceConstraintType* WSF_CALL
++            AviaryCommon::ResourceConstraint::getType()
++             {
++                return property_Type;
++             }
++
++            /**
++             * setter for type
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceConstraint::setType(
++                    AviaryCommon::ResourceConstraintType*  arg_Type)
++             {
++                
++
++                if(isValidType &&
++                        arg_Type == property_Type)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Type)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"type is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetType();
++
++                
++                    if(NULL == arg_Type)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Type = arg_Type;
++                        isValidType = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for type
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::resetType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Type != NULL)
++                {
++                   
++                   
++                         delete  property_Type;
++                     
++
++                   }
++
++                
++                
++                
++               isValidType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether type is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::isTypeNil()
++           {
++               return !isValidType;
++           }
++
++           /**
++            * Set type to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::setTypeNil()
++           {
++               return resetType();
++           }
++
++           
++
++            /**
++             * Getter for value by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceConstraint::getProperty2()
++            {
++                return getValue();
++            }
++
++            /**
++             * getter for value.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceConstraint::getValue()
++             {
++                return property_Value;
++             }
++
++            /**
++             * setter for value
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceConstraint::setValue(
++                    const std::string  arg_Value)
++             {
++                
++
++                if(isValidValue &&
++                        arg_Value == property_Value)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Value.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"value is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetValue();
++
++                
++                        property_Value = std::string(arg_Value.c_str());
++                        isValidValue = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for value
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::resetValue()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidValue = false; 
++               return true;
++           }
++
++           /**
++            * Check whether value is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::isValueNil()
++           {
++               return !isValidValue;
++           }
++
++           /**
++            * Set value to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraint::setValueNil()
++           {
++               return resetValue();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraintType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraintType.cpp
+new file mode 100644
+index 0000000..d26600b
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceConstraintType.cpp
+@@ -0,0 +1,375 @@
++
++
++        /**
++         * ResourceConstraintType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_ResourceConstraintType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the ResourceConstraintType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::ResourceConstraintType::ResourceConstraintType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_ResourceConstraintType;
++                
++            isValidResourceConstraintType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "ResourceConstraintType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::ResourceConstraintType::ResourceConstraintType(std::string arg_ResourceConstraintType)
++        {
++             
++                   qname = NULL;
++             
++                 property_ResourceConstraintType;
++             
++            isValidResourceConstraintType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "ResourceConstraintType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_ResourceConstraintType = arg_ResourceConstraintType;
++            
++        }
++        AviaryCommon::ResourceConstraintType::~ResourceConstraintType()
++        {
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            ResourceConstraintType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setResourceConstraintType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::ResourceConstraintType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element ResourceConstraintType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::ResourceConstraintType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::ResourceConstraintType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::ResourceConstraintType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_ResourceConstraintType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_ResourceConstraintType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::ResourceConstraintType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ResourceConstraintType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceConstraintType::getProperty1()
++            {
++                return getResourceConstraintType();
++            }
++
++            /**
++             * getter for ResourceConstraintType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceConstraintType::getResourceConstraintType()
++             {
++                return property_ResourceConstraintType;
++             }
++
++            /**
++             * setter for ResourceConstraintType
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceConstraintType::setResourceConstraintType(
++                    const std::string  arg_ResourceConstraintType)
++             {
++                
++
++                if(isValidResourceConstraintType &&
++                        arg_ResourceConstraintType == property_ResourceConstraintType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_ResourceConstraintType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ResourceConstraintType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetResourceConstraintType();
++
++                
++                        property_ResourceConstraintType = std::string(arg_ResourceConstraintType.c_str());
++                        isValidResourceConstraintType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for ResourceConstraintType.
++             */
++             ADBResourceConstraintTypeEnum WSF_CALL
++             AviaryCommon::ResourceConstraintType::getResourceConstraintTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_ResourceConstraintType.c_str(), "OS") == 0)
++                    return ResourceConstraintType_OS;
++             
++                 if (axutil_strcmp(property_ResourceConstraintType.c_str(), "ARCH") == 0)
++                    return ResourceConstraintType_ARCH;
++             
++                 if (axutil_strcmp(property_ResourceConstraintType.c_str(), "MEMORY") == 0)
++                    return ResourceConstraintType_MEMORY;
++             
++                 if (axutil_strcmp(property_ResourceConstraintType.c_str(), "DISK") == 0)
++                    return ResourceConstraintType_DISK;
++             
++                 if (axutil_strcmp(property_ResourceConstraintType.c_str(), "FILESYSTEM") == 0)
++                    return ResourceConstraintType_FILESYSTEM;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBResourceConstraintTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for ResourceConstraintType.
++             */
++             bool WSF_CALL
++            AviaryCommon::ResourceConstraintType::setResourceConstraintTypeEnum(const ADBResourceConstraintTypeEnum  arg_ResourceConstraintType)
++             {
++                
++
++                
++                resetResourceConstraintType();
++
++                   
++                   switch (arg_ResourceConstraintType)
++                   {
++                     
++                       case ResourceConstraintType_OS :
++                            property_ResourceConstraintType = ("OS");
++                          break;
++                     
++                       case ResourceConstraintType_ARCH :
++                            property_ResourceConstraintType = ("ARCH");
++                          break;
++                     
++                       case ResourceConstraintType_MEMORY :
++                            property_ResourceConstraintType = ("MEMORY");
++                          break;
++                     
++                       case ResourceConstraintType_DISK :
++                            property_ResourceConstraintType = ("DISK");
++                          break;
++                     
++                       case ResourceConstraintType_FILESYSTEM :
++                            property_ResourceConstraintType = ("FILESYSTEM");
++                          break;
++                     
++                     
++                       default:
++                          isValidResourceConstraintType = false;
++                          property_ResourceConstraintType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting ResourceConstraintType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_ResourceConstraintType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidResourceConstraintType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for ResourceConstraintType
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraintType::resetResourceConstraintType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidResourceConstraintType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ResourceConstraintType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraintType::isResourceConstraintTypeNil()
++           {
++               return !isValidResourceConstraintType;
++           }
++
++           /**
++            * Set ResourceConstraintType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceConstraintType::setResourceConstraintTypeNil()
++           {
++               return resetResourceConstraintType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceID.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceID.cpp
+new file mode 100644
+index 0000000..580a5f3
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceID.cpp
+@@ -0,0 +1,1308 @@
++
++
++        /**
++         * ResourceID.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_ResourceID.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = ResourceID
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::ResourceID::ResourceID()
++        {
++
++        
++                property_Subsystem_type  = NULL;
++              
++            isValidSubsystem_type  = false;
++        
++                    property_Pool;
++                
++            isValidPool  = false;
++        
++                    property_Name;
++                
++            isValidName  = false;
++        
++                    property_Custom_name;
++                
++            isValidCustom_name  = false;
++        
++        }
++
++       AviaryCommon::ResourceID::ResourceID(AviaryCommon::ResourceType* arg_Subsystem_type,std::string arg_Pool,std::string arg_Name,std::string arg_Custom_name)
++        {
++             
++               property_Subsystem_type  = NULL;
++             
++            isValidSubsystem_type  = true;
++            
++                 property_Pool;
++             
++            isValidPool  = true;
++            
++                 property_Name;
++             
++            isValidName  = true;
++            
++                 property_Custom_name;
++             
++            isValidCustom_name  = true;
++            
++                    property_Subsystem_type = arg_Subsystem_type;
++            
++                    property_Pool = arg_Pool;
++            
++                    property_Name = arg_Name;
++            
++                    property_Custom_name = arg_Custom_name;
++            
++        }
++        AviaryCommon::ResourceID::~ResourceID()
++        {
++            if (property_Subsystem_type) delete property_Subsystem_type;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::ResourceID::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building subsystem_type element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "subsystem_type", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("subsystem_type", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("subsystem_type", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::ResourceType* element = new AviaryCommon::ResourceType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element subsystem_type");
++                                      }
++                                      else
++                                      {
++                                          status = setSubsystem_type(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for subsystem_type ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element subsystem_type missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building pool element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "pool", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setPool(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element pool");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setPool("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for pool ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element pool missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building name element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setName(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setName("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element name missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building custom_name element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "custom_name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("custom_name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("custom_name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setCustom_name(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element custom_name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setCustom_name("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for custom_name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::ResourceID::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::ResourceID::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::ResourceID::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++                    axis2_char_t *text_value_4;
++                    axis2_char_t *text_value_4_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidSubsystem_type)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property subsystem_type");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("subsystem_type"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("subsystem_type")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing subsystem_type element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%ssubsystem_type",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%ssubsystem_type>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Subsystem_type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Subsystem_type->serialize(current_node, parent_element,
++                                                                                 property_Subsystem_type->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Subsystem_type->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidPool)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property pool");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("pool"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("pool")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing pool element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%spool>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%spool>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Pool.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidName)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property name");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_3 = (axis2_char_t*)property_Name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
++                           if (text_value_3_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidCustom_name)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("custom_name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("custom_name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing custom_name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scustom_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scustom_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_4 = (axis2_char_t*)property_Custom_name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_4_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_4, true);
++                           if (text_value_4_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_4_temp, axutil_strlen(text_value_4_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_4_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for subsystem_type by  Property Number 1
++             */
++            AviaryCommon::ResourceType* WSF_CALL
++            AviaryCommon::ResourceID::getProperty1()
++            {
++                return getSubsystem_type();
++            }
++
++            /**
++             * getter for subsystem_type.
++             */
++            AviaryCommon::ResourceType* WSF_CALL
++            AviaryCommon::ResourceID::getSubsystem_type()
++             {
++                return property_Subsystem_type;
++             }
++
++            /**
++             * setter for subsystem_type
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceID::setSubsystem_type(
++                    AviaryCommon::ResourceType*  arg_Subsystem_type)
++             {
++                
++
++                if(isValidSubsystem_type &&
++                        arg_Subsystem_type == property_Subsystem_type)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Subsystem_type)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"subsystem_type is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetSubsystem_type();
++
++                
++                    if(NULL == arg_Subsystem_type)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Subsystem_type = arg_Subsystem_type;
++                        isValidSubsystem_type = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for subsystem_type
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::resetSubsystem_type()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Subsystem_type != NULL)
++                {
++                   
++                   
++                         delete  property_Subsystem_type;
++                     
++
++                   }
++
++                
++                
++                
++               isValidSubsystem_type = false; 
++               return true;
++           }
++
++           /**
++            * Check whether subsystem_type is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::isSubsystem_typeNil()
++           {
++               return !isValidSubsystem_type;
++           }
++
++           /**
++            * Set subsystem_type to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::setSubsystem_typeNil()
++           {
++               return resetSubsystem_type();
++           }
++
++           
++
++            /**
++             * Getter for pool by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getProperty2()
++            {
++                return getPool();
++            }
++
++            /**
++             * getter for pool.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getPool()
++             {
++                return property_Pool;
++             }
++
++            /**
++             * setter for pool
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceID::setPool(
++                    const std::string  arg_Pool)
++             {
++                
++
++                if(isValidPool &&
++                        arg_Pool == property_Pool)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Pool.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"pool is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetPool();
++
++                
++                        property_Pool = std::string(arg_Pool.c_str());
++                        isValidPool = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for pool
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::resetPool()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPool = false; 
++               return true;
++           }
++
++           /**
++            * Check whether pool is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::isPoolNil()
++           {
++               return !isValidPool;
++           }
++
++           /**
++            * Set pool to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::setPoolNil()
++           {
++               return resetPool();
++           }
++
++           
++
++            /**
++             * Getter for name by  Property Number 3
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getProperty3()
++            {
++                return getName();
++            }
++
++            /**
++             * getter for name.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getName()
++             {
++                return property_Name;
++             }
++
++            /**
++             * setter for name
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceID::setName(
++                    const std::string  arg_Name)
++             {
++                
++
++                if(isValidName &&
++                        arg_Name == property_Name)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Name.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"name is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetName();
++
++                
++                        property_Name = std::string(arg_Name.c_str());
++                        isValidName = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for name
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::resetName()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidName = false; 
++               return true;
++           }
++
++           /**
++            * Check whether name is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::isNameNil()
++           {
++               return !isValidName;
++           }
++
++           /**
++            * Set name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::setNameNil()
++           {
++               return resetName();
++           }
++
++           
++
++            /**
++             * Getter for custom_name by  Property Number 4
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getProperty4()
++            {
++                return getCustom_name();
++            }
++
++            /**
++             * getter for custom_name.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceID::getCustom_name()
++             {
++                return property_Custom_name;
++             }
++
++            /**
++             * setter for custom_name
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceID::setCustom_name(
++                    const std::string  arg_Custom_name)
++             {
++                
++
++                if(isValidCustom_name &&
++                        arg_Custom_name == property_Custom_name)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetCustom_name();
++
++                
++                        property_Custom_name = std::string(arg_Custom_name.c_str());
++                        isValidCustom_name = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for custom_name
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::resetCustom_name()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidCustom_name = false; 
++               return true;
++           }
++
++           /**
++            * Check whether custom_name is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::isCustom_nameNil()
++           {
++               return !isValidCustom_name;
++           }
++
++           /**
++            * Set custom_name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceID::setCustom_nameNil()
++           {
++               return resetCustom_name();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceType.cpp
+new file mode 100644
+index 0000000..70a7f21
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_ResourceType.cpp
+@@ -0,0 +1,403 @@
++
++
++        /**
++         * ResourceType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_ResourceType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the ResourceType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::ResourceType::ResourceType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_ResourceType;
++                
++            isValidResourceType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "ResourceType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::ResourceType::ResourceType(std::string arg_ResourceType)
++        {
++             
++                   qname = NULL;
++             
++                 property_ResourceType;
++             
++            isValidResourceType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "ResourceType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_ResourceType = arg_ResourceType;
++            
++        }
++        AviaryCommon::ResourceType::~ResourceType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            ResourceType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setResourceType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::ResourceType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element ResourceType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::ResourceType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::ResourceType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::ResourceType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_ResourceType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_ResourceType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::ResourceType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ResourceType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceType::getProperty1()
++            {
++                return getResourceType();
++            }
++
++            /**
++             * getter for ResourceType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::ResourceType::getResourceType()
++             {
++                return property_ResourceType;
++             }
++
++            /**
++             * setter for ResourceType
++             */
++            bool WSF_CALL
++            AviaryCommon::ResourceType::setResourceType(
++                    const std::string  arg_ResourceType)
++             {
++                
++
++                if(isValidResourceType &&
++                        arg_ResourceType == property_ResourceType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_ResourceType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ResourceType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetResourceType();
++
++                
++                        property_ResourceType = std::string(arg_ResourceType.c_str());
++                        isValidResourceType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for ResourceType.
++             */
++             ADBResourceTypeEnum WSF_CALL
++             AviaryCommon::ResourceType::getResourceTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_ResourceType.c_str(), "COLLECTOR") == 0)
++                    return ResourceType_COLLECTOR;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "EXECUTOR") == 0)
++                    return ResourceType_EXECUTOR;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "EVENT_SERVER") == 0)
++                    return ResourceType_EVENT_SERVER;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "JOB_SERVER") == 0)
++                    return ResourceType_JOB_SERVER;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "LOW_LATENCY") == 0)
++                    return ResourceType_LOW_LATENCY;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "MASTER") == 0)
++                    return ResourceType_MASTER;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "NEGOTIATOR") == 0)
++                    return ResourceType_NEGOTIATOR;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "SCHEDULER") == 0)
++                    return ResourceType_SCHEDULER;
++             
++                 if (axutil_strcmp(property_ResourceType.c_str(), "CUSTOM") == 0)
++                    return ResourceType_CUSTOM;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBResourceTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for ResourceType.
++             */
++             bool WSF_CALL
++            AviaryCommon::ResourceType::setResourceTypeEnum(const ADBResourceTypeEnum  arg_ResourceType)
++             {
++                
++
++                
++                resetResourceType();
++
++                   
++                   switch (arg_ResourceType)
++                   {
++                     
++                       case ResourceType_COLLECTOR :
++                            property_ResourceType = ("COLLECTOR");
++                          break;
++                     
++                       case ResourceType_EXECUTOR :
++                            property_ResourceType = ("EXECUTOR");
++                          break;
++                     
++                       case ResourceType_EVENT_SERVER :
++                            property_ResourceType = ("EVENT_SERVER");
++                          break;
++                     
++                       case ResourceType_JOB_SERVER :
++                            property_ResourceType = ("JOB_SERVER");
++                          break;
++                     
++                       case ResourceType_LOW_LATENCY :
++                            property_ResourceType = ("LOW_LATENCY");
++                          break;
++                     
++                       case ResourceType_MASTER :
++                            property_ResourceType = ("MASTER");
++                          break;
++                     
++                       case ResourceType_NEGOTIATOR :
++                            property_ResourceType = ("NEGOTIATOR");
++                          break;
++                     
++                       case ResourceType_SCHEDULER :
++                            property_ResourceType = ("SCHEDULER");
++                          break;
++                     
++                       case ResourceType_CUSTOM :
++                            property_ResourceType = ("CUSTOM");
++                          break;
++                     
++                     
++                       default:
++                          isValidResourceType = false;
++                          property_ResourceType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting ResourceType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_ResourceType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidResourceType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for ResourceType
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceType::resetResourceType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidResourceType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ResourceType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceType::isResourceTypeNil()
++           {
++               return !isValidResourceType;
++           }
++
++           /**
++            * Set ResourceType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::ResourceType::setResourceTypeNil()
++           {
++               return resetResourceType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Status.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Status.cpp
+new file mode 100644
+index 0000000..623267a
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_Status.cpp
+@@ -0,0 +1,698 @@
++
++
++        /**
++         * Status.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_Status.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = Status
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::Status::Status()
++        {
++
++        
++                property_Code  = NULL;
++              
++            isValidCode  = false;
++        
++                    property_Text;
++                
++            isValidText  = false;
++        
++        }
++
++       AviaryCommon::Status::Status(AviaryCommon::StatusCodeType* arg_Code,std::string arg_Text)
++        {
++             
++               property_Code  = NULL;
++             
++            isValidCode  = true;
++            
++                 property_Text;
++             
++            isValidText  = true;
++            
++                    property_Code = arg_Code;
++            
++                    property_Text = arg_Text;
++            
++        }
++        AviaryCommon::Status::~Status()
++        {
++            if (property_Code) delete property_Code;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::Status::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building code element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "code", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("code", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("code", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::StatusCodeType* element = new AviaryCommon::StatusCodeType();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element code");
++                                      }
++                                      else
++                                      {
++                                          status = setCode(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for code ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element code missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building text element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "text", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("text", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("text", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setText(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element text");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setText("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for text ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::Status::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::Status::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::Status::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidCode)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property code");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("code"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("code")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing code element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scode",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scode>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Code->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Code->serialize(current_node, parent_element,
++                                                                                 property_Code->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Code->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidText)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("text"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("text")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing text element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%stext>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%stext>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Text.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for code by  Property Number 1
++             */
++            AviaryCommon::StatusCodeType* WSF_CALL
++            AviaryCommon::Status::getProperty1()
++            {
++                return getCode();
++            }
++
++            /**
++             * getter for code.
++             */
++            AviaryCommon::StatusCodeType* WSF_CALL
++            AviaryCommon::Status::getCode()
++             {
++                return property_Code;
++             }
++
++            /**
++             * setter for code
++             */
++            bool WSF_CALL
++            AviaryCommon::Status::setCode(
++                    AviaryCommon::StatusCodeType*  arg_Code)
++             {
++                
++
++                if(isValidCode &&
++                        arg_Code == property_Code)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Code)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"code is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetCode();
++
++                
++                    if(NULL == arg_Code)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Code = arg_Code;
++                        isValidCode = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for code
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::resetCode()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Code != NULL)
++                {
++                   
++                   
++                         delete  property_Code;
++                     
++
++                   }
++
++                
++                
++                
++               isValidCode = false; 
++               return true;
++           }
++
++           /**
++            * Check whether code is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::isCodeNil()
++           {
++               return !isValidCode;
++           }
++
++           /**
++            * Set code to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::setCodeNil()
++           {
++               return resetCode();
++           }
++
++           
++
++            /**
++             * Getter for text by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::Status::getProperty2()
++            {
++                return getText();
++            }
++
++            /**
++             * getter for text.
++             */
++            std::string WSF_CALL
++            AviaryCommon::Status::getText()
++             {
++                return property_Text;
++             }
++
++            /**
++             * setter for text
++             */
++            bool WSF_CALL
++            AviaryCommon::Status::setText(
++                    const std::string  arg_Text)
++             {
++                
++
++                if(isValidText &&
++                        arg_Text == property_Text)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetText();
++
++                
++                        property_Text = std::string(arg_Text.c_str());
++                        isValidText = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for text
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::resetText()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidText = false; 
++               return true;
++           }
++
++           /**
++            * Check whether text is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::isTextNil()
++           {
++               return !isValidText;
++           }
++
++           /**
++            * Set text to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::Status::setTextNil()
++           {
++               return resetText();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_StatusCodeType.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_StatusCodeType.cpp
+new file mode 100644
+index 0000000..aa1e1a6
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_StatusCodeType.cpp
+@@ -0,0 +1,382 @@
++
++
++        /**
++         * StatusCodeType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_StatusCodeType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++               /*
++                * Implementation of the StatusCodeType|http://common.aviary.grid.redhat.com Element
++                */
++           AviaryCommon::StatusCodeType::StatusCodeType()
++        {
++
++        
++            qname = NULL;
++        
++                    property_StatusCodeType;
++                
++            isValidStatusCodeType  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "StatusCodeType",
++                        "http://common.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryCommon::StatusCodeType::StatusCodeType(std::string arg_StatusCodeType)
++        {
++             
++                   qname = NULL;
++             
++                 property_StatusCodeType;
++             
++            isValidStatusCodeType  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "StatusCodeType",
++                       "http://common.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_StatusCodeType = arg_StatusCodeType;
++            
++        }
++        AviaryCommon::StatusCodeType::~StatusCodeType()
++        {
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++            bool WSF_CALL
++            StatusCodeType::deserializeFromString(
++                                            const axis2_char_t *node_value,
++                                            axiom_node_t *parent)
++            {
++              bool status = true;
++            
++                        setStatusCodeType(node_value);
++                    
++              return status;
++            }
++        
++
++        bool WSF_CALL
++        AviaryCommon::StatusCodeType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            
++        status = AXIS2_FAILURE;
++        if(parent)
++        {
++            axis2_char_t *attrib_text = NULL;
++            attrib_text = axiom_element_get_attribute_value_by_name((axiom_element_t*)axiom_node_get_data_element(parent, Environment::getEnv()), Environment::getEnv(), "nil");
++            if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
++            {
++              
++               /* but the wsdl says that, this is non nillable */
++                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element StatusCodeType");
++                status = AXIS2_FAILURE;
++               
++            }
++            else
++            {
++                axiom_node_t *text_node = NULL;
++                text_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                axiom_text_t *text_element = NULL;
++                if (text_node &&
++                        axiom_node_get_node_type(text_node, Environment::getEnv()) == AXIOM_TEXT)
++                    text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, Environment::getEnv());
++                text_value = "";
++                if(text_element && axiom_text_get_value(text_element, Environment::getEnv()))
++                {
++                    text_value = (axis2_char_t*)axiom_text_get_value(text_element, Environment::getEnv());
++                }
++                status = deserializeFromString(text_value, parent);
++                }
++            }
++            
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::StatusCodeType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::StatusCodeType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++            char* WSF_CALL
++            AviaryCommon::StatusCodeType::serializeToString(axutil_hash_t *namespaces)
++            {
++                axis2_char_t *text_value = NULL;
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                
++                         text_value = (axis2_char_t*)axutil_xml_quote_string(Environment::getEnv(), (axis2_char_t*)property_StatusCodeType.c_str(), false);
++                         if (!text_value)
++                         {
++                             text_value = (axis2_char_t*)axutil_strdup(Environment::getEnv(), property_StatusCodeType.c_str());
++                         }
++                      
++                return text_value;
++            }
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::StatusCodeType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++            axiom_data_source_t *data_source = NULL;
++            axutil_stream_t *stream = NULL;
++            axis2_char_t *text_value;
++             
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++               if(!parent_tag_closed && !tag_closed)
++               {
++                  text_value = ">"; 
++                  axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++               }
++               
++               text_value = serializeToString(namespaces);
++               if(text_value)
++               {
++                    axutil_stream_write(stream, Environment::getEnv(), text_value, axutil_strlen(text_value));
++                    AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++               }
++            
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for StatusCodeType by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::StatusCodeType::getProperty1()
++            {
++                return getStatusCodeType();
++            }
++
++            /**
++             * getter for StatusCodeType.
++             */
++            std::string WSF_CALL
++            AviaryCommon::StatusCodeType::getStatusCodeType()
++             {
++                return property_StatusCodeType;
++             }
++
++            /**
++             * setter for StatusCodeType
++             */
++            bool WSF_CALL
++            AviaryCommon::StatusCodeType::setStatusCodeType(
++                    const std::string  arg_StatusCodeType)
++             {
++                
++
++                if(isValidStatusCodeType &&
++                        arg_StatusCodeType == property_StatusCodeType)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_StatusCodeType.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"StatusCodeType is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatusCodeType();
++
++                
++                        property_StatusCodeType = std::string(arg_StatusCodeType.c_str());
++                        isValidStatusCodeType = true;
++                    
++                return true;
++             }
++
++            
++             /**
++             * specialized enum getter for StatusCodeType.
++             */
++             ADBStatusCodeTypeEnum WSF_CALL
++             AviaryCommon::StatusCodeType::getStatusCodeTypeEnum()
++             {
++
++                
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "OK") == 0)
++                    return StatusCodeType_OK;
++             
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "FAIL") == 0)
++                    return StatusCodeType_FAIL;
++             
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "NO_MATCH") == 0)
++                    return StatusCodeType_NO_MATCH;
++             
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "INVALID_OFFSET") == 0)
++                    return StatusCodeType_INVALID_OFFSET;
++             
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "UNIMPLEMENTED") == 0)
++                    return StatusCodeType_UNIMPLEMENTED;
++             
++                 if (axutil_strcmp(property_StatusCodeType.c_str(), "UNAVAILABLE") == 0)
++                    return StatusCodeType_UNAVAILABLE;
++             
++             
++                 /* Error: none of the strings matched; invalid enum value */
++                 return (ADBStatusCodeTypeEnum)-1;
++             }
++             
++             
++             /**
++             * specialized enum setter for StatusCodeType.
++             */
++             bool WSF_CALL
++            AviaryCommon::StatusCodeType::setStatusCodeTypeEnum(const ADBStatusCodeTypeEnum  arg_StatusCodeType)
++             {
++                
++
++                
++                resetStatusCodeType();
++
++                   
++                   switch (arg_StatusCodeType)
++                   {
++                     
++                       case StatusCodeType_OK :
++                            property_StatusCodeType = ("OK");
++                          break;
++                     
++                       case StatusCodeType_FAIL :
++                            property_StatusCodeType = ("FAIL");
++                          break;
++                     
++                       case StatusCodeType_NO_MATCH :
++                            property_StatusCodeType = ("NO_MATCH");
++                          break;
++                     
++                       case StatusCodeType_INVALID_OFFSET :
++                            property_StatusCodeType = ("INVALID_OFFSET");
++                          break;
++                     
++                       case StatusCodeType_UNIMPLEMENTED :
++                            property_StatusCodeType = ("UNIMPLEMENTED");
++                          break;
++                     
++                       case StatusCodeType_UNAVAILABLE :
++                            property_StatusCodeType = ("UNAVAILABLE");
++                          break;
++                     
++                     
++                       default:
++                          isValidStatusCodeType = false;
++                          property_StatusCodeType = "";
++                          WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Error setting StatusCodeType: undefined enum value");
++                          return false;
++                   }
++                
++                   if(property_StatusCodeType.empty())
++                   {
++                       return AXIS2_FAILURE;
++                   }
++                     isValidStatusCodeType = true;
++                        
++                
++                return true;
++             }
++             
++
++           /**
++            * resetter for StatusCodeType
++            */
++           bool WSF_CALL
++           AviaryCommon::StatusCodeType::resetStatusCodeType()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidStatusCodeType = false; 
++               return true;
++           }
++
++           /**
++            * Check whether StatusCodeType is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::StatusCodeType::isStatusCodeTypeNil()
++           {
++               return !isValidStatusCodeType;
++           }
++
++           /**
++            * Set StatusCodeType to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::StatusCodeType::setStatusCodeTypeNil()
++           {
++               return resetStatusCodeType();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionID.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionID.cpp
+new file mode 100644
+index 0000000..0d23b22
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionID.cpp
+@@ -0,0 +1,717 @@
++
++
++        /**
++         * SubmissionID.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_SubmissionID.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = SubmissionID
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::SubmissionID::SubmissionID()
++        {
++
++        
++                    property_Name;
++                
++            isValidName  = false;
++        
++                    property_Owner;
++                
++            isValidOwner  = false;
++        
++        }
++
++       AviaryCommon::SubmissionID::SubmissionID(std::string arg_Name,std::string arg_Owner)
++        {
++             
++                 property_Name;
++             
++            isValidName  = true;
++            
++                 property_Owner;
++             
++            isValidOwner  = true;
++            
++                    property_Name = arg_Name;
++            
++                    property_Owner = arg_Owner;
++            
++        }
++        AviaryCommon::SubmissionID::~SubmissionID()
++        {
++
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::SubmissionID::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building name element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setName(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setName("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building owner element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "owner", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("owner", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("owner", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setOwner(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element owner");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setOwner("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for owner ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::SubmissionID::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::SubmissionID::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::SubmissionID::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t *text_value_1;
++                    axis2_char_t *text_value_1_temp;
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidName)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sname>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_1 = (axis2_char_t*)property_Name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_1_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_1, true);
++                           if (text_value_1_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1_temp, axutil_strlen(text_value_1_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_1_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidOwner)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("owner"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("owner")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing owner element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sowner>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sowner>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Owner.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for name by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryCommon::SubmissionID::getProperty1()
++            {
++                return getName();
++            }
++
++            /**
++             * getter for name.
++             */
++            std::string WSF_CALL
++            AviaryCommon::SubmissionID::getName()
++             {
++                return property_Name;
++             }
++
++            /**
++             * setter for name
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionID::setName(
++                    const std::string  arg_Name)
++             {
++                
++
++                if(isValidName &&
++                        arg_Name == property_Name)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetName();
++
++                
++                        property_Name = std::string(arg_Name.c_str());
++                        isValidName = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for name
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::resetName()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidName = false; 
++               return true;
++           }
++
++           /**
++            * Check whether name is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::isNameNil()
++           {
++               return !isValidName;
++           }
++
++           /**
++            * Set name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::setNameNil()
++           {
++               return resetName();
++           }
++
++           
++
++            /**
++             * Getter for owner by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryCommon::SubmissionID::getProperty2()
++            {
++                return getOwner();
++            }
++
++            /**
++             * getter for owner.
++             */
++            std::string WSF_CALL
++            AviaryCommon::SubmissionID::getOwner()
++             {
++                return property_Owner;
++             }
++
++            /**
++             * setter for owner
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionID::setOwner(
++                    const std::string  arg_Owner)
++             {
++                
++
++                if(isValidOwner &&
++                        arg_Owner == property_Owner)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetOwner();
++
++                
++                        property_Owner = std::string(arg_Owner.c_str());
++                        isValidOwner = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for owner
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::resetOwner()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidOwner = false; 
++               return true;
++           }
++
++           /**
++            * Check whether owner is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::isOwnerNil()
++           {
++               return !isValidOwner;
++           }
++
++           /**
++            * Set owner to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionID::setOwnerNil()
++           {
++               return resetOwner();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionSummary.cpp b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionSummary.cpp
+new file mode 100644
+index 0000000..903178f
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/common/src/AviaryCommon_SubmissionSummary.cpp
+@@ -0,0 +1,2420 @@
++
++
++        /**
++         * SubmissionSummary.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryCommon_SubmissionSummary.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryCommon;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = SubmissionSummary
++                 * Namespace URI = http://common.aviary.grid.redhat.com
++                 * Namespace Prefix = ns1
++                 */
++           AviaryCommon::SubmissionSummary::SubmissionSummary()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++            isValidCompleted  = false;
++        
++            isValidHeld  = false;
++        
++            isValidIdle  = false;
++        
++            isValidRemoved  = false;
++        
++            isValidRunning  = false;
++        
++                property_Jobs  = NULL;
++              
++            isValidJobs  = false;
++        
++        }
++
++       AviaryCommon::SubmissionSummary::SubmissionSummary(AviaryCommon::SubmissionID* arg_Id,AviaryCommon::Status* arg_Status,int arg_Completed,int arg_Held,int arg_Idle,int arg_Removed,int arg_Running,std::vector<AviaryCommon::JobSummary*>* arg_Jobs)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++            isValidCompleted  = true;
++            
++            isValidHeld  = true;
++            
++            isValidIdle  = true;
++            
++            isValidRemoved  = true;
++            
++            isValidRunning  = true;
++            
++               property_Jobs  = NULL;
++             
++            isValidJobs  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Status = arg_Status;
++            
++                    property_Completed = arg_Completed;
++            
++                    property_Held = arg_Held;
++            
++                    property_Idle = arg_Idle;
++            
++                    property_Removed = arg_Removed;
++            
++                    property_Running = arg_Running;
++            
++                    property_Jobs = arg_Jobs;
++            
++        }
++        AviaryCommon::SubmissionSummary::~SubmissionSummary()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Status) delete property_Status;
++            if (property_Jobs) {
++                while(!property_Jobs->empty()) delete property_Jobs->back(), property_Jobs->pop_back();
++                delete property_Jobs;
++            }
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryCommon::SubmissionSummary::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building completed element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "completed", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("completed", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("completed", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setCompleted(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element completed");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for completed ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element completed missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building held element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "held", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("held", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("held", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setHeld(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element held");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for held ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element held missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building idle element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "idle", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("idle", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("idle", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setIdle(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element idle");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for idle ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element idle missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building removed element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "removed", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("removed", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("removed", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setRemoved(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element removed");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for removed ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element removed missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building running element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "running", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("running", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("running", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setRunning(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element running");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for running ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element running missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                       { 
++                    /*
++                     * building Jobs array
++                     */
++                       std::vector<AviaryCommon::JobSummary*>* arr_list =new std::vector<AviaryCommon::JobSummary*>();
++                   
++
++                     
++                     /*
++                      * building jobs element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "jobs", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, Environment::getEnv()):current_node); !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("jobs", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobSummary* element = new AviaryCommon::JobSummary();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element jobs ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for jobs ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setJobs(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryCommon::SubmissionSummary::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryCommon::SubmissionSummary::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryCommon::SubmissionSummary::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_4[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_5[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_6[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_7[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_8[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidCompleted)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property completed");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("completed"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("completed")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing completed element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scompleted>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scompleted>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_3, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Completed);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidHeld)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property held");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("held"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("held")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing held element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sheld>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sheld>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_4, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Held);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIdle)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property idle");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("idle"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("idle")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing idle element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sidle>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sidle>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_5, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Idle);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_5, axutil_strlen(text_value_5));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidRemoved)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property removed");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("removed"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("removed")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing removed element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sremoved>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sremoved>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_6, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Removed);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_6, axutil_strlen(text_value_6));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidRunning)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property running");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("running"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("running")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing running element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%srunning>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%srunning>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_7, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Running);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_7, axutil_strlen(text_value_7));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJobs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("jobs"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("jobs")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Jobs array
++                      */
++                     if (property_Jobs != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sjobs",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sjobs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Jobs->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobSummary* element = (*property_Jobs)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing jobs element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::SubmissionID* WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::SubmissionID* WSF_CALL
++            AviaryCommon::SubmissionSummary::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setId(
++                    AviaryCommon::SubmissionID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryCommon::SubmissionSummary::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
++            /**
++             * Getter for completed by  Property Number 3
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty3()
++            {
++                return getCompleted();
++            }
++
++            /**
++             * getter for completed.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getCompleted()
++             {
++                return property_Completed;
++             }
++
++            /**
++             * setter for completed
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setCompleted(
++                    const int  arg_Completed)
++             {
++                
++
++                if(isValidCompleted &&
++                        arg_Completed == property_Completed)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetCompleted();
++
++                
++                        property_Completed = arg_Completed;
++                        isValidCompleted = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for completed
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetCompleted()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidCompleted = false; 
++               return true;
++           }
++
++           /**
++            * Check whether completed is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isCompletedNil()
++           {
++               return !isValidCompleted;
++           }
++
++           /**
++            * Set completed to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setCompletedNil()
++           {
++               return resetCompleted();
++           }
++
++           
++
++            /**
++             * Getter for held by  Property Number 4
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty4()
++            {
++                return getHeld();
++            }
++
++            /**
++             * getter for held.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getHeld()
++             {
++                return property_Held;
++             }
++
++            /**
++             * setter for held
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setHeld(
++                    const int  arg_Held)
++             {
++                
++
++                if(isValidHeld &&
++                        arg_Held == property_Held)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetHeld();
++
++                
++                        property_Held = arg_Held;
++                        isValidHeld = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for held
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetHeld()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidHeld = false; 
++               return true;
++           }
++
++           /**
++            * Check whether held is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isHeldNil()
++           {
++               return !isValidHeld;
++           }
++
++           /**
++            * Set held to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setHeldNil()
++           {
++               return resetHeld();
++           }
++
++           
++
++            /**
++             * Getter for idle by  Property Number 5
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty5()
++            {
++                return getIdle();
++            }
++
++            /**
++             * getter for idle.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getIdle()
++             {
++                return property_Idle;
++             }
++
++            /**
++             * setter for idle
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setIdle(
++                    const int  arg_Idle)
++             {
++                
++
++                if(isValidIdle &&
++                        arg_Idle == property_Idle)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetIdle();
++
++                
++                        property_Idle = arg_Idle;
++                        isValidIdle = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for idle
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetIdle()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidIdle = false; 
++               return true;
++           }
++
++           /**
++            * Check whether idle is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isIdleNil()
++           {
++               return !isValidIdle;
++           }
++
++           /**
++            * Set idle to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setIdleNil()
++           {
++               return resetIdle();
++           }
++
++           
++
++            /**
++             * Getter for removed by  Property Number 6
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty6()
++            {
++                return getRemoved();
++            }
++
++            /**
++             * getter for removed.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getRemoved()
++             {
++                return property_Removed;
++             }
++
++            /**
++             * setter for removed
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setRemoved(
++                    const int  arg_Removed)
++             {
++                
++
++                if(isValidRemoved &&
++                        arg_Removed == property_Removed)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetRemoved();
++
++                
++                        property_Removed = arg_Removed;
++                        isValidRemoved = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for removed
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetRemoved()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidRemoved = false; 
++               return true;
++           }
++
++           /**
++            * Check whether removed is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isRemovedNil()
++           {
++               return !isValidRemoved;
++           }
++
++           /**
++            * Set removed to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setRemovedNil()
++           {
++               return resetRemoved();
++           }
++
++           
++
++            /**
++             * Getter for running by  Property Number 7
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty7()
++            {
++                return getRunning();
++            }
++
++            /**
++             * getter for running.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::getRunning()
++             {
++                return property_Running;
++             }
++
++            /**
++             * setter for running
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setRunning(
++                    const int  arg_Running)
++             {
++                
++
++                if(isValidRunning &&
++                        arg_Running == property_Running)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetRunning();
++
++                
++                        property_Running = arg_Running;
++                        isValidRunning = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for running
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetRunning()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidRunning = false; 
++               return true;
++           }
++
++           /**
++            * Check whether running is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isRunningNil()
++           {
++               return !isValidRunning;
++           }
++
++           /**
++            * Set running to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setRunningNil()
++           {
++               return resetRunning();
++           }
++
++           
++
++            /**
++             * Getter for jobs by  Property Number 8
++             */
++            std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++            AviaryCommon::SubmissionSummary::getProperty8()
++            {
++                return getJobs();
++            }
++
++            /**
++             * getter for jobs.
++             */
++            std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++            AviaryCommon::SubmissionSummary::getJobs()
++             {
++                return property_Jobs;
++             }
++
++            /**
++             * setter for jobs
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setJobs(
++                    std::vector<AviaryCommon::JobSummary*>*  arg_Jobs)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidJobs &&
++                        arg_Jobs == property_Jobs)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Jobs->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Jobs)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetJobs();
++
++                
++                    if(NULL == arg_Jobs)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Jobs = arg_Jobs;
++                        if(non_nil_exists)
++                        {
++                            isValidJobs = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of jobs.
++             */
++            AviaryCommon::JobSummary* WSF_CALL
++            AviaryCommon::SubmissionSummary::getJobsAt(int i)
++            {
++                AviaryCommon::JobSummary* ret_val;
++                if(property_Jobs == NULL)
++                {
++                    return (AviaryCommon::JobSummary*)0;
++                }
++                ret_val =   (*property_Jobs)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of jobs.
++             */
++           bool WSF_CALL
++            AviaryCommon::SubmissionSummary::setJobsAt(int i,
++                    AviaryCommon::JobSummary* arg_Jobs)
++            {
++                 AviaryCommon::JobSummary* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidJobs &&
++                    property_Jobs &&
++                  
++                    arg_Jobs == (*property_Jobs)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobSummary*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Jobs)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = true;
++                        (*property_Jobs)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Jobs)[i] = arg_Jobs;
++                  
++
++               isValidJobs = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to jobs.
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::addJobs(
++                    AviaryCommon::JobSummary* arg_Jobs)
++             {
++
++                
++                    if( NULL == arg_Jobs
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobSummary*>();
++                }
++              
++               property_Jobs->push_back(arg_Jobs);
++              
++                isValidJobs = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the jobs array.
++             */
++            int WSF_CALL
++            AviaryCommon::SubmissionSummary::sizeofJobs()
++            {
++
++                if(property_Jobs == NULL)
++                {
++                    return 0;
++                }
++                return property_Jobs->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryCommon::SubmissionSummary::removeJobsAt(int i)
++            {
++                return setJobsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for jobs
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::resetJobs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Jobs != NULL)
++                {
++                  std::vector<AviaryCommon::JobSummary*>::iterator it =  property_Jobs->begin();
++                  for( ; it <  property_Jobs->end() ; ++it)
++                  {
++                     AviaryCommon::JobSummary* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Jobs)
++                 delete property_Jobs;
++                
++               isValidJobs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether jobs is nill
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isJobsNil()
++           {
++               return !isValidJobs;
++           }
++
++           /**
++            * Set jobs to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setJobsNil()
++           {
++               return resetJobs();
++           }
++
++           
++           /**
++            * Check whether jobs is nill at i
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::isJobsNilAt(int i)
++           {
++               return (isValidJobs == false ||
++                       NULL == property_Jobs ||
++                     NULL == (*property_Jobs)[i]);
++            }
++
++           /**
++            * Set jobs to nil at i
++            */
++           bool WSF_CALL
++           AviaryCommon::SubmissionSummary::setJobsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Jobs == NULL ||
++                            isValidJobs == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Jobs->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Jobs)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of jobs is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Jobs == NULL)
++                {
++                    isValidJobs = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobSummary* element = (*property_Jobs)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = false;
++                        (*property_Jobs)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Jobs)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJob.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJob.cpp
+new file mode 100644
+index 0000000..520716c
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJob.cpp
+@@ -0,0 +1,717 @@
++
++
++        /**
++         * ControlJob.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_ControlJob.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = ControlJob
++                 * Namespace URI = http://job.aviary.grid.redhat.com
++                 * Namespace Prefix = ns2
++                 */
++           AviaryJob::ControlJob::ControlJob()
++        {
++
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                    property_Reason;
++                
++            isValidReason  = false;
++        
++        }
++
++       AviaryJob::ControlJob::ControlJob(AviaryCommon::JobID* arg_Id,std::string arg_Reason)
++        {
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++                 property_Reason;
++             
++            isValidReason  = true;
++            
++                    property_Id = arg_Id;
++            
++                    property_Reason = arg_Reason;
++            
++        }
++        AviaryJob::ControlJob::~ControlJob()
++        {
++            if (property_Id) delete property_Id;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::ControlJob::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building reason element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "reason", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("reason", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("reason", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setReason(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element reason");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setReason("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for reason ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element reason missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::ControlJob::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::ControlJob::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::ControlJob::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidReason)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property reason");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("reason"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("reason")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing reason element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sreason>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sreason>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Reason.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::ControlJob::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::ControlJob::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryJob::ControlJob::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for reason by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryJob::ControlJob::getProperty2()
++            {
++                return getReason();
++            }
++
++            /**
++             * getter for reason.
++             */
++            std::string WSF_CALL
++            AviaryJob::ControlJob::getReason()
++             {
++                return property_Reason;
++             }
++
++            /**
++             * setter for reason
++             */
++            bool WSF_CALL
++            AviaryJob::ControlJob::setReason(
++                    const std::string  arg_Reason)
++             {
++                
++
++                if(isValidReason &&
++                        arg_Reason == property_Reason)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Reason.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"reason is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetReason();
++
++                
++                        property_Reason = std::string(arg_Reason.c_str());
++                        isValidReason = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for reason
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::resetReason()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidReason = false; 
++               return true;
++           }
++
++           /**
++            * Check whether reason is nill
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::isReasonNil()
++           {
++               return !isValidReason;
++           }
++
++           /**
++            * Set reason to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJob::setReasonNil()
++           {
++               return resetReason();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJobResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJobResponse.cpp
+new file mode 100644
+index 0000000..cd6696c
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ControlJobResponse.cpp
+@@ -0,0 +1,412 @@
++
++
++        /**
++         * ControlJobResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_ControlJobResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = ControlJobResponse
++                 * Namespace URI = http://job.aviary.grid.redhat.com
++                 * Namespace Prefix = ns2
++                 */
++           AviaryJob::ControlJobResponse::ControlJobResponse()
++        {
++
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++        }
++
++       AviaryJob::ControlJobResponse::ControlJobResponse(AviaryCommon::Status* arg_Status)
++        {
++             
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++                    property_Status = arg_Status;
++            
++        }
++        AviaryJob::ControlJobResponse::~ControlJobResponse()
++        {
++            if (property_Status) delete property_Status;
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::ControlJobResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::ControlJobResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::ControlJobResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::ControlJobResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for status by  Property Number 1
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryJob::ControlJobResponse::getProperty1()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryJob::ControlJobResponse::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryJob::ControlJobResponse::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJobResponse::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJobResponse::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::ControlJobResponse::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJob.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJob.cpp
+new file mode 100644
+index 0000000..2d323cf
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJob.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * HoldJob.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_HoldJob.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the HoldJob|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::HoldJob::HoldJob()
++        {
++
++        
++            qname = NULL;
++        
++                property_HoldJob  = NULL;
++              
++            isValidHoldJob  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "HoldJob",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::HoldJob::HoldJob(AviaryJob::ControlJob* arg_HoldJob)
++        {
++             
++                   qname = NULL;
++             
++               property_HoldJob  = NULL;
++             
++            isValidHoldJob  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "HoldJob",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_HoldJob = arg_HoldJob;
++            
++        }
++        AviaryJob::HoldJob::~HoldJob()
++        {
++            if (property_HoldJob) delete property_HoldJob;
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::HoldJob::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for HoldJob : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building HoldJob element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "HoldJob", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJob* element = new AviaryJob::ControlJob();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element HoldJob");
++                                      }
++                                      else
++                                      {
++                                          status = setHoldJob(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for HoldJob ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element HoldJob missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::HoldJob::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::HoldJob::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::HoldJob::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "HoldJob", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidHoldJob)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property HoldJob");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("HoldJob"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("HoldJob")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing HoldJob element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sHoldJob",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sHoldJob>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_HoldJob->serialize(current_node, parent_element,
++                                                                                 property_HoldJob->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for HoldJob by  Property Number 1
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::HoldJob::getProperty1()
++            {
++                return getHoldJob();
++            }
++
++            /**
++             * getter for HoldJob.
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::HoldJob::getHoldJob()
++             {
++                return property_HoldJob;
++             }
++
++            /**
++             * setter for HoldJob
++             */
++            bool WSF_CALL
++            AviaryJob::HoldJob::setHoldJob(
++                    AviaryJob::ControlJob*  arg_HoldJob)
++             {
++                
++
++                if(isValidHoldJob &&
++                        arg_HoldJob == property_HoldJob)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_HoldJob)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"HoldJob is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetHoldJob();
++
++                
++                    if(NULL == arg_HoldJob)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_HoldJob = arg_HoldJob;
++                        isValidHoldJob = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for HoldJob
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJob::resetHoldJob()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_HoldJob != NULL)
++                {
++                   
++                   
++                         delete  property_HoldJob;
++                     
++
++                   }
++
++                
++                
++                
++               isValidHoldJob = false; 
++               return true;
++           }
++
++           /**
++            * Check whether HoldJob is nill
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJob::isHoldJobNil()
++           {
++               return !isValidHoldJob;
++           }
++
++           /**
++            * Set HoldJob to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJob::setHoldJobNil()
++           {
++               return resetHoldJob();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJobResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJobResponse.cpp
+new file mode 100644
+index 0000000..5fde78b
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_HoldJobResponse.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * HoldJobResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_HoldJobResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the HoldJobResponse|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::HoldJobResponse::HoldJobResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_HoldJobResponse  = NULL;
++              
++            isValidHoldJobResponse  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "HoldJobResponse",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::HoldJobResponse::HoldJobResponse(AviaryJob::ControlJobResponse* arg_HoldJobResponse)
++        {
++             
++                   qname = NULL;
++             
++               property_HoldJobResponse  = NULL;
++             
++            isValidHoldJobResponse  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "HoldJobResponse",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_HoldJobResponse = arg_HoldJobResponse;
++            
++        }
++        AviaryJob::HoldJobResponse::~HoldJobResponse()
++        {
++            if (property_HoldJobResponse) delete property_HoldJobResponse;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::HoldJobResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for HoldJobResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building HoldJobResponse element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "HoldJobResponse", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJobResponse* element = new AviaryJob::ControlJobResponse();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element HoldJobResponse");
++                                      }
++                                      else
++                                      {
++                                          status = setHoldJobResponse(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for HoldJobResponse ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element HoldJobResponse missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::HoldJobResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::HoldJobResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::HoldJobResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "HoldJobResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidHoldJobResponse)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property HoldJobResponse");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("HoldJobResponse"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("HoldJobResponse")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing HoldJobResponse element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sHoldJobResponse",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sHoldJobResponse>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_HoldJobResponse->serialize(current_node, parent_element,
++                                                                                 property_HoldJobResponse->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for HoldJobResponse by  Property Number 1
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::HoldJobResponse::getProperty1()
++            {
++                return getHoldJobResponse();
++            }
++
++            /**
++             * getter for HoldJobResponse.
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::HoldJobResponse::getHoldJobResponse()
++             {
++                return property_HoldJobResponse;
++             }
++
++            /**
++             * setter for HoldJobResponse
++             */
++            bool WSF_CALL
++            AviaryJob::HoldJobResponse::setHoldJobResponse(
++                    AviaryJob::ControlJobResponse*  arg_HoldJobResponse)
++             {
++                
++
++                if(isValidHoldJobResponse &&
++                        arg_HoldJobResponse == property_HoldJobResponse)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_HoldJobResponse)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"HoldJobResponse is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetHoldJobResponse();
++
++                
++                    if(NULL == arg_HoldJobResponse)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_HoldJobResponse = arg_HoldJobResponse;
++                        isValidHoldJobResponse = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for HoldJobResponse
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJobResponse::resetHoldJobResponse()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_HoldJobResponse != NULL)
++                {
++                   
++                   
++                         delete  property_HoldJobResponse;
++                     
++
++                   }
++
++                
++                
++                
++               isValidHoldJobResponse = false; 
++               return true;
++           }
++
++           /**
++            * Check whether HoldJobResponse is nill
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJobResponse::isHoldJobResponseNil()
++           {
++               return !isValidHoldJobResponse;
++           }
++
++           /**
++            * Set HoldJobResponse to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::HoldJobResponse::setHoldJobResponseNil()
++           {
++               return resetHoldJobResponse();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJob.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJob.cpp
+new file mode 100644
+index 0000000..5ebab53
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJob.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * ReleaseJob.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_ReleaseJob.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the ReleaseJob|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::ReleaseJob::ReleaseJob()
++        {
++
++        
++            qname = NULL;
++        
++                property_ReleaseJob  = NULL;
++              
++            isValidReleaseJob  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "ReleaseJob",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::ReleaseJob::ReleaseJob(AviaryJob::ControlJob* arg_ReleaseJob)
++        {
++             
++                   qname = NULL;
++             
++               property_ReleaseJob  = NULL;
++             
++            isValidReleaseJob  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "ReleaseJob",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_ReleaseJob = arg_ReleaseJob;
++            
++        }
++        AviaryJob::ReleaseJob::~ReleaseJob()
++        {
++            if (property_ReleaseJob) delete property_ReleaseJob;
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::ReleaseJob::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for ReleaseJob : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building ReleaseJob element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "ReleaseJob", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJob* element = new AviaryJob::ControlJob();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element ReleaseJob");
++                                      }
++                                      else
++                                      {
++                                          status = setReleaseJob(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for ReleaseJob ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element ReleaseJob missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::ReleaseJob::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::ReleaseJob::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::ReleaseJob::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "ReleaseJob", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidReleaseJob)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property ReleaseJob");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ReleaseJob"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ReleaseJob")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing ReleaseJob element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sReleaseJob",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sReleaseJob>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_ReleaseJob->serialize(current_node, parent_element,
++                                                                                 property_ReleaseJob->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ReleaseJob by  Property Number 1
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::ReleaseJob::getProperty1()
++            {
++                return getReleaseJob();
++            }
++
++            /**
++             * getter for ReleaseJob.
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::ReleaseJob::getReleaseJob()
++             {
++                return property_ReleaseJob;
++             }
++
++            /**
++             * setter for ReleaseJob
++             */
++            bool WSF_CALL
++            AviaryJob::ReleaseJob::setReleaseJob(
++                    AviaryJob::ControlJob*  arg_ReleaseJob)
++             {
++                
++
++                if(isValidReleaseJob &&
++                        arg_ReleaseJob == property_ReleaseJob)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_ReleaseJob)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ReleaseJob is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetReleaseJob();
++
++                
++                    if(NULL == arg_ReleaseJob)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_ReleaseJob = arg_ReleaseJob;
++                        isValidReleaseJob = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for ReleaseJob
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJob::resetReleaseJob()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_ReleaseJob != NULL)
++                {
++                   
++                   
++                         delete  property_ReleaseJob;
++                     
++
++                   }
++
++                
++                
++                
++               isValidReleaseJob = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ReleaseJob is nill
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJob::isReleaseJobNil()
++           {
++               return !isValidReleaseJob;
++           }
++
++           /**
++            * Set ReleaseJob to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJob::setReleaseJobNil()
++           {
++               return resetReleaseJob();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJobResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJobResponse.cpp
+new file mode 100644
+index 0000000..a7c3cb7
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_ReleaseJobResponse.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * ReleaseJobResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_ReleaseJobResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the ReleaseJobResponse|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::ReleaseJobResponse::ReleaseJobResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_ReleaseJobResponse  = NULL;
++              
++            isValidReleaseJobResponse  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "ReleaseJobResponse",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::ReleaseJobResponse::ReleaseJobResponse(AviaryJob::ControlJobResponse* arg_ReleaseJobResponse)
++        {
++             
++                   qname = NULL;
++             
++               property_ReleaseJobResponse  = NULL;
++             
++            isValidReleaseJobResponse  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "ReleaseJobResponse",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_ReleaseJobResponse = arg_ReleaseJobResponse;
++            
++        }
++        AviaryJob::ReleaseJobResponse::~ReleaseJobResponse()
++        {
++            if (property_ReleaseJobResponse) delete property_ReleaseJobResponse;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::ReleaseJobResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for ReleaseJobResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building ReleaseJobResponse element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "ReleaseJobResponse", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJobResponse* element = new AviaryJob::ControlJobResponse();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element ReleaseJobResponse");
++                                      }
++                                      else
++                                      {
++                                          status = setReleaseJobResponse(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for ReleaseJobResponse ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element ReleaseJobResponse missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::ReleaseJobResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::ReleaseJobResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::ReleaseJobResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "ReleaseJobResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidReleaseJobResponse)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property ReleaseJobResponse");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ReleaseJobResponse"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ReleaseJobResponse")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing ReleaseJobResponse element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sReleaseJobResponse",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sReleaseJobResponse>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_ReleaseJobResponse->serialize(current_node, parent_element,
++                                                                                 property_ReleaseJobResponse->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ReleaseJobResponse by  Property Number 1
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::ReleaseJobResponse::getProperty1()
++            {
++                return getReleaseJobResponse();
++            }
++
++            /**
++             * getter for ReleaseJobResponse.
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::ReleaseJobResponse::getReleaseJobResponse()
++             {
++                return property_ReleaseJobResponse;
++             }
++
++            /**
++             * setter for ReleaseJobResponse
++             */
++            bool WSF_CALL
++            AviaryJob::ReleaseJobResponse::setReleaseJobResponse(
++                    AviaryJob::ControlJobResponse*  arg_ReleaseJobResponse)
++             {
++                
++
++                if(isValidReleaseJobResponse &&
++                        arg_ReleaseJobResponse == property_ReleaseJobResponse)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_ReleaseJobResponse)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ReleaseJobResponse is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetReleaseJobResponse();
++
++                
++                    if(NULL == arg_ReleaseJobResponse)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_ReleaseJobResponse = arg_ReleaseJobResponse;
++                        isValidReleaseJobResponse = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for ReleaseJobResponse
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJobResponse::resetReleaseJobResponse()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_ReleaseJobResponse != NULL)
++                {
++                   
++                   
++                         delete  property_ReleaseJobResponse;
++                     
++
++                   }
++
++                
++                
++                
++               isValidReleaseJobResponse = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ReleaseJobResponse is nill
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJobResponse::isReleaseJobResponseNil()
++           {
++               return !isValidReleaseJobResponse;
++           }
++
++           /**
++            * Set ReleaseJobResponse to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::ReleaseJobResponse::setReleaseJobResponseNil()
++           {
++               return resetReleaseJobResponse();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJob.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJob.cpp
+new file mode 100644
+index 0000000..b2a81b2
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJob.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * RemoveJob.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_RemoveJob.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the RemoveJob|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::RemoveJob::RemoveJob()
++        {
++
++        
++            qname = NULL;
++        
++                property_RemoveJob  = NULL;
++              
++            isValidRemoveJob  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "RemoveJob",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::RemoveJob::RemoveJob(AviaryJob::ControlJob* arg_RemoveJob)
++        {
++             
++                   qname = NULL;
++             
++               property_RemoveJob  = NULL;
++             
++            isValidRemoveJob  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "RemoveJob",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_RemoveJob = arg_RemoveJob;
++            
++        }
++        AviaryJob::RemoveJob::~RemoveJob()
++        {
++            if (property_RemoveJob) delete property_RemoveJob;
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::RemoveJob::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for RemoveJob : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building RemoveJob element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "RemoveJob", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJob* element = new AviaryJob::ControlJob();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element RemoveJob");
++                                      }
++                                      else
++                                      {
++                                          status = setRemoveJob(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for RemoveJob ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element RemoveJob missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::RemoveJob::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::RemoveJob::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::RemoveJob::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "RemoveJob", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidRemoveJob)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property RemoveJob");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("RemoveJob"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("RemoveJob")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing RemoveJob element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sRemoveJob",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sRemoveJob>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_RemoveJob->serialize(current_node, parent_element,
++                                                                                 property_RemoveJob->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for RemoveJob by  Property Number 1
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::RemoveJob::getProperty1()
++            {
++                return getRemoveJob();
++            }
++
++            /**
++             * getter for RemoveJob.
++             */
++            AviaryJob::ControlJob* WSF_CALL
++            AviaryJob::RemoveJob::getRemoveJob()
++             {
++                return property_RemoveJob;
++             }
++
++            /**
++             * setter for RemoveJob
++             */
++            bool WSF_CALL
++            AviaryJob::RemoveJob::setRemoveJob(
++                    AviaryJob::ControlJob*  arg_RemoveJob)
++             {
++                
++
++                if(isValidRemoveJob &&
++                        arg_RemoveJob == property_RemoveJob)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_RemoveJob)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"RemoveJob is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetRemoveJob();
++
++                
++                    if(NULL == arg_RemoveJob)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_RemoveJob = arg_RemoveJob;
++                        isValidRemoveJob = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for RemoveJob
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJob::resetRemoveJob()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_RemoveJob != NULL)
++                {
++                   
++                   
++                         delete  property_RemoveJob;
++                     
++
++                   }
++
++                
++                
++                
++               isValidRemoveJob = false; 
++               return true;
++           }
++
++           /**
++            * Check whether RemoveJob is nill
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJob::isRemoveJobNil()
++           {
++               return !isValidRemoveJob;
++           }
++
++           /**
++            * Set RemoveJob to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJob::setRemoveJobNil()
++           {
++               return resetRemoveJob();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJobResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJobResponse.cpp
+new file mode 100644
+index 0000000..b454209
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_RemoveJobResponse.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * RemoveJobResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_RemoveJobResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the RemoveJobResponse|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::RemoveJobResponse::RemoveJobResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_RemoveJobResponse  = NULL;
++              
++            isValidRemoveJobResponse  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "RemoveJobResponse",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::RemoveJobResponse::RemoveJobResponse(AviaryJob::ControlJobResponse* arg_RemoveJobResponse)
++        {
++             
++                   qname = NULL;
++             
++               property_RemoveJobResponse  = NULL;
++             
++            isValidRemoveJobResponse  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "RemoveJobResponse",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_RemoveJobResponse = arg_RemoveJobResponse;
++            
++        }
++        AviaryJob::RemoveJobResponse::~RemoveJobResponse()
++        {
++            if (property_RemoveJobResponse) delete property_RemoveJobResponse;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::RemoveJobResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for RemoveJobResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building RemoveJobResponse element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "RemoveJobResponse", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJobResponse* element = new AviaryJob::ControlJobResponse();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element RemoveJobResponse");
++                                      }
++                                      else
++                                      {
++                                          status = setRemoveJobResponse(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for RemoveJobResponse ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element RemoveJobResponse missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::RemoveJobResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::RemoveJobResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::RemoveJobResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "RemoveJobResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidRemoveJobResponse)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property RemoveJobResponse");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("RemoveJobResponse"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("RemoveJobResponse")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing RemoveJobResponse element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sRemoveJobResponse",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sRemoveJobResponse>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_RemoveJobResponse->serialize(current_node, parent_element,
++                                                                                 property_RemoveJobResponse->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for RemoveJobResponse by  Property Number 1
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::RemoveJobResponse::getProperty1()
++            {
++                return getRemoveJobResponse();
++            }
++
++            /**
++             * getter for RemoveJobResponse.
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::RemoveJobResponse::getRemoveJobResponse()
++             {
++                return property_RemoveJobResponse;
++             }
++
++            /**
++             * setter for RemoveJobResponse
++             */
++            bool WSF_CALL
++            AviaryJob::RemoveJobResponse::setRemoveJobResponse(
++                    AviaryJob::ControlJobResponse*  arg_RemoveJobResponse)
++             {
++                
++
++                if(isValidRemoveJobResponse &&
++                        arg_RemoveJobResponse == property_RemoveJobResponse)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_RemoveJobResponse)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"RemoveJobResponse is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetRemoveJobResponse();
++
++                
++                    if(NULL == arg_RemoveJobResponse)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_RemoveJobResponse = arg_RemoveJobResponse;
++                        isValidRemoveJobResponse = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for RemoveJobResponse
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJobResponse::resetRemoveJobResponse()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_RemoveJobResponse != NULL)
++                {
++                   
++                   
++                         delete  property_RemoveJobResponse;
++                     
++
++                   }
++
++                
++                
++                
++               isValidRemoveJobResponse = false; 
++               return true;
++           }
++
++           /**
++            * Check whether RemoveJobResponse is nill
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJobResponse::isRemoveJobResponseNil()
++           {
++               return !isValidRemoveJobResponse;
++           }
++
++           /**
++            * Set RemoveJobResponse to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::RemoveJobResponse::setRemoveJobResponseNil()
++           {
++               return resetRemoveJobResponse();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttribute.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttribute.cpp
+new file mode 100644
+index 0000000..67f2550
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttribute.cpp
+@@ -0,0 +1,722 @@
++
++
++        /**
++         * SetJobAttribute.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_SetJobAttribute.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the SetJobAttribute|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::SetJobAttribute::SetJobAttribute()
++        {
++
++        
++            qname = NULL;
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Attribute  = NULL;
++              
++            isValidAttribute  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "SetJobAttribute",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::SetJobAttribute::SetJobAttribute(AviaryCommon::JobID* arg_Id,AviaryCommon::Attribute* arg_Attribute)
++        {
++             
++                   qname = NULL;
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Attribute  = NULL;
++             
++            isValidAttribute  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "SetJobAttribute",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Id = arg_Id;
++            
++                    property_Attribute = arg_Attribute;
++            
++        }
++        AviaryJob::SetJobAttribute::~SetJobAttribute()
++        {
++            if (property_Id) delete property_Id;
++            if (property_Attribute) delete property_Attribute;
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::SetJobAttribute::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for SetJobAttribute : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element id missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building attribute element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "attribute", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("attribute", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("attribute", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Attribute* element = new AviaryCommon::Attribute();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element attribute");
++                                      }
++                                      else
++                                      {
++                                          status = setAttribute(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for attribute ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element attribute missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::SetJobAttribute::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::SetJobAttribute::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::SetJobAttribute::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "SetJobAttribute", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property id");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidAttribute)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property attribute");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("attribute"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("attribute")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing attribute element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sattribute",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sattribute>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Attribute->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Attribute->serialize(current_node, parent_element,
++                                                                                 property_Attribute->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Attribute->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::SetJobAttribute::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::SetJobAttribute::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryJob::SetJobAttribute::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Id)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"id is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for attribute by  Property Number 2
++             */
++            AviaryCommon::Attribute* WSF_CALL
++            AviaryJob::SetJobAttribute::getProperty2()
++            {
++                return getAttribute();
++            }
++
++            /**
++             * getter for attribute.
++             */
++            AviaryCommon::Attribute* WSF_CALL
++            AviaryJob::SetJobAttribute::getAttribute()
++             {
++                return property_Attribute;
++             }
++
++            /**
++             * setter for attribute
++             */
++            bool WSF_CALL
++            AviaryJob::SetJobAttribute::setAttribute(
++                    AviaryCommon::Attribute*  arg_Attribute)
++             {
++                
++
++                if(isValidAttribute &&
++                        arg_Attribute == property_Attribute)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Attribute)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"attribute is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetAttribute();
++
++                
++                    if(NULL == arg_Attribute)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Attribute = arg_Attribute;
++                        isValidAttribute = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for attribute
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::resetAttribute()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Attribute != NULL)
++                {
++                   
++                   
++                         delete  property_Attribute;
++                     
++
++                   }
++
++                
++                
++                
++               isValidAttribute = false; 
++               return true;
++           }
++
++           /**
++            * Check whether attribute is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::isAttributeNil()
++           {
++               return !isValidAttribute;
++           }
++
++           /**
++            * Set attribute to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttribute::setAttributeNil()
++           {
++               return resetAttribute();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttributeResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttributeResponse.cpp
+new file mode 100644
+index 0000000..e6b8a64
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SetJobAttributeResponse.cpp
+@@ -0,0 +1,452 @@
++
++
++        /**
++         * SetJobAttributeResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_SetJobAttributeResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the SetJobAttributeResponse|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::SetJobAttributeResponse::SetJobAttributeResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_SetJobAttributeResponse  = NULL;
++              
++            isValidSetJobAttributeResponse  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "SetJobAttributeResponse",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::SetJobAttributeResponse::SetJobAttributeResponse(AviaryJob::ControlJobResponse* arg_SetJobAttributeResponse)
++        {
++             
++                   qname = NULL;
++             
++               property_SetJobAttributeResponse  = NULL;
++             
++            isValidSetJobAttributeResponse  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "SetJobAttributeResponse",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_SetJobAttributeResponse = arg_SetJobAttributeResponse;
++            
++        }
++        AviaryJob::SetJobAttributeResponse::~SetJobAttributeResponse()
++        {
++            if (property_SetJobAttributeResponse) delete property_SetJobAttributeResponse;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::SetJobAttributeResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = parent;
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for SetJobAttributeResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building SetJobAttributeResponse element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "SetJobAttributeResponse", "http://job.aviary.grid.redhat.com", NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryJob::ControlJobResponse* element = new AviaryJob::ControlJobResponse();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element SetJobAttributeResponse");
++                                      }
++                                      else
++                                      {
++                                          status = setSetJobAttributeResponse(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for SetJobAttributeResponse ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element SetJobAttributeResponse missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::SetJobAttributeResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::SetJobAttributeResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::SetJobAttributeResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "SetJobAttributeResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING)))
++                       {
++                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
++                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, p_prefix);
++                           
++                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
++                                            "http://job.aviary.grid.redhat.com", p_prefix));
++                       }
++                      
++
++                   if (!isValidSetJobAttributeResponse)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property SetJobAttributeResponse");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("SetJobAttributeResponse"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("SetJobAttributeResponse")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing SetJobAttributeResponse element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sSetJobAttributeResponse",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sSetJobAttributeResponse>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    property_SetJobAttributeResponse->serialize(current_node, parent_element,
++                                                                                 property_SetJobAttributeResponse->isParticle() || true, namespaces, next_ns_index);
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for SetJobAttributeResponse by  Property Number 1
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::SetJobAttributeResponse::getProperty1()
++            {
++                return getSetJobAttributeResponse();
++            }
++
++            /**
++             * getter for SetJobAttributeResponse.
++             */
++            AviaryJob::ControlJobResponse* WSF_CALL
++            AviaryJob::SetJobAttributeResponse::getSetJobAttributeResponse()
++             {
++                return property_SetJobAttributeResponse;
++             }
++
++            /**
++             * setter for SetJobAttributeResponse
++             */
++            bool WSF_CALL
++            AviaryJob::SetJobAttributeResponse::setSetJobAttributeResponse(
++                    AviaryJob::ControlJobResponse*  arg_SetJobAttributeResponse)
++             {
++                
++
++                if(isValidSetJobAttributeResponse &&
++                        arg_SetJobAttributeResponse == property_SetJobAttributeResponse)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_SetJobAttributeResponse)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"SetJobAttributeResponse is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetSetJobAttributeResponse();
++
++                
++                    if(NULL == arg_SetJobAttributeResponse)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_SetJobAttributeResponse = arg_SetJobAttributeResponse;
++                        isValidSetJobAttributeResponse = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for SetJobAttributeResponse
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttributeResponse::resetSetJobAttributeResponse()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_SetJobAttributeResponse != NULL)
++                {
++                   
++                   
++                         delete  property_SetJobAttributeResponse;
++                     
++
++                   }
++
++                
++                
++                
++               isValidSetJobAttributeResponse = false; 
++               return true;
++           }
++
++           /**
++            * Check whether SetJobAttributeResponse is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttributeResponse::isSetJobAttributeResponseNil()
++           {
++               return !isValidSetJobAttributeResponse;
++           }
++
++           /**
++            * Set SetJobAttributeResponse to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SetJobAttributeResponse::setSetJobAttributeResponseNil()
++           {
++               return resetSetJobAttributeResponse();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJob.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJob.cpp
+new file mode 100644
+index 0000000..fad98ac
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJob.cpp
+@@ -0,0 +1,3038 @@
++
++
++        /**
++         * SubmitJob.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_SubmitJob.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the SubmitJob|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::SubmitJob::SubmitJob()
++        {
++
++        
++            qname = NULL;
++        
++                    property_Cmd;
++                
++            isValidCmd  = false;
++        
++                    property_Args;
++                
++            isValidArgs  = false;
++        
++                    property_Owner;
++                
++            isValidOwner  = false;
++        
++                    property_Iwd;
++                
++            isValidIwd  = false;
++        
++                    property_Submission_name;
++                
++            isValidSubmission_name  = false;
++        
++                property_Requirements  = NULL;
++              
++            isValidRequirements  = false;
++        
++                property_Extra  = NULL;
++              
++            isValidExtra  = false;
++        
++            isValidAllowOverrides  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "SubmitJob",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::SubmitJob::SubmitJob(std::string arg_Cmd,std::string arg_Args,std::string arg_Owner,std::string arg_Iwd,std::string arg_Submission_name,std::vector<AviaryCommon::ResourceConstraint*>* arg_Requirements,std::vector<AviaryCommon::Attribute*>* arg_Extra,bool arg_AllowOverrides)
++        {
++             
++                   qname = NULL;
++             
++                 property_Cmd;
++             
++            isValidCmd  = true;
++            
++                 property_Args;
++             
++            isValidArgs  = true;
++            
++                 property_Owner;
++             
++            isValidOwner  = true;
++            
++                 property_Iwd;
++             
++            isValidIwd  = true;
++            
++                 property_Submission_name;
++             
++            isValidSubmission_name  = true;
++            
++               property_Requirements  = NULL;
++             
++            isValidRequirements  = true;
++            
++               property_Extra  = NULL;
++             
++            isValidExtra  = true;
++            
++            isValidAllowOverrides  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "SubmitJob",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Cmd = arg_Cmd;
++            
++                    property_Args = arg_Args;
++            
++                    property_Owner = arg_Owner;
++            
++                    property_Iwd = arg_Iwd;
++            
++                    property_Submission_name = arg_Submission_name;
++            
++                    property_Requirements = arg_Requirements;
++            
++                    property_Extra = arg_Extra;
++            
++                    property_AllowOverrides = arg_AllowOverrides;
++            
++        }
++        AviaryJob::SubmitJob::~SubmitJob()
++        {
++            if (property_Requirements) {
++                while(!property_Requirements->empty()) delete property_Requirements->back(), property_Requirements->pop_back();
++                delete property_Requirements;
++            }
++            if (property_Extra) {
++                while(!property_Extra->empty()) delete property_Extra->back(), property_Extra->pop_back();
++                delete property_Extra;
++            }
++            axutil_qname_free (qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::SubmitJob::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for SubmitJob : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++
++                     
++                     /*
++                      * building cmd element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "cmd", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("cmd", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("cmd", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setCmd(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element cmd");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setCmd("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for cmd ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element cmd missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building args element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "args", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("args", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setArgs(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setArgs("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building owner element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "owner", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("owner", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("owner", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setOwner(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element owner");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setOwner("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for owner ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element owner missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building iwd element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "iwd", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("iwd", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("iwd", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setIwd(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element iwd");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setIwd("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for iwd ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element iwd missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building submission_name element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "submission_name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission_name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission_name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setSubmission_name(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element submission_name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setSubmission_name("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for submission_name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                       { 
++                    /*
++                     * building Requirements array
++                     */
++                       std::vector<AviaryCommon::ResourceConstraint*>* arr_list =new std::vector<AviaryCommon::ResourceConstraint*>();
++                   
++
++                     
++                     /*
++                      * building requirements element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "requirements", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, Environment::getEnv()):current_node); !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("requirements", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::ResourceConstraint* element = new AviaryCommon::ResourceConstraint();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element requirements ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for requirements ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"requirements (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setRequirements(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                       { 
++                    /*
++                     * building Extra array
++                     */
++                       std::vector<AviaryCommon::Attribute*>* arr_list =new std::vector<AviaryCommon::Attribute*>();
++                   
++
++                     
++                     /*
++                      * building extra element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "extra", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, Environment::getEnv()):current_node); !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("extra", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::Attribute* element = new AviaryCommon::Attribute();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element extra ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for extra ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"extra (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setExtra(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "allowOverrides"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "allowOverrides", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "allowOverrides");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setAllowOverrides(true);
++                           }
++                           else
++                           {
++                               setAllowOverrides(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::SubmitJob::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::SubmitJob::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::SubmitJob::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t *text_value_1;
++                    axis2_char_t *text_value_1_temp;
++                    
++                    axis2_char_t *text_value_2;
++                    axis2_char_t *text_value_2_temp;
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++                    axis2_char_t *text_value_4;
++                    axis2_char_t *text_value_4_temp;
++                    
++                    axis2_char_t *text_value_5;
++                    axis2_char_t *text_value_5_temp;
++                    
++                    axis2_char_t text_value_6[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_7[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_8[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "SubmitJob", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidAllowOverrides)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_AllowOverrides)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("allowOverrides")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "allowOverrides",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidCmd)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property cmd");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("cmd"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("cmd")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing cmd element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scmd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scmd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_1 = (axis2_char_t*)property_Cmd.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_1_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_1, true);
++                           if (text_value_1_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1_temp, axutil_strlen(text_value_1_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_1_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidArgs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("args"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("args")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing args element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sargs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sargs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_2 = (axis2_char_t*)property_Args.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
++                           if (text_value_2_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidOwner)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property owner");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("owner"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("owner")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing owner element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sowner>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sowner>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_3 = (axis2_char_t*)property_Owner.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
++                           if (text_value_3_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIwd)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property iwd");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("iwd"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("iwd")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing iwd element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%siwd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%siwd>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_4 = (axis2_char_t*)property_Iwd.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_4_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_4, true);
++                           if (text_value_4_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_4_temp, axutil_strlen(text_value_4_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_4_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidSubmission_name)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("submission_name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("submission_name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing submission_name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%ssubmission_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%ssubmission_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_5 = (axis2_char_t*)property_Submission_name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_5_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_5, true);
++                           if (text_value_5_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_5_temp, axutil_strlen(text_value_5_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_5_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_5, axutil_strlen(text_value_5));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidRequirements)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("requirements"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("requirements")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Requirements array
++                      */
++                     if (property_Requirements != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%srequirements",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%srequirements>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Requirements->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::ResourceConstraint* element = (*property_Requirements)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing requirements element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidExtra)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("extra"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("extra")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Extra array
++                      */
++                     if (property_Extra != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sextra",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sextra>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Extra->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::Attribute* element = (*property_Extra)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing extra element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidAllowOverrides)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_AllowOverrides)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "allowOverrides", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for cmd by  Property Number 1
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getProperty1()
++            {
++                return getCmd();
++            }
++
++            /**
++             * getter for cmd.
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getCmd()
++             {
++                return property_Cmd;
++             }
++
++            /**
++             * setter for cmd
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setCmd(
++                    const std::string  arg_Cmd)
++             {
++                
++
++                if(isValidCmd &&
++                        arg_Cmd == property_Cmd)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Cmd.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"cmd is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetCmd();
++
++                
++                        property_Cmd = std::string(arg_Cmd.c_str());
++                        isValidCmd = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for cmd
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetCmd()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidCmd = false; 
++               return true;
++           }
++
++           /**
++            * Check whether cmd is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isCmdNil()
++           {
++               return !isValidCmd;
++           }
++
++           /**
++            * Set cmd to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setCmdNil()
++           {
++               return resetCmd();
++           }
++
++           
++
++            /**
++             * Getter for args by  Property Number 2
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getProperty2()
++            {
++                return getArgs();
++            }
++
++            /**
++             * getter for args.
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getArgs()
++             {
++                return property_Args;
++             }
++
++            /**
++             * setter for args
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setArgs(
++                    const std::string  arg_Args)
++             {
++                
++
++                if(isValidArgs &&
++                        arg_Args == property_Args)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetArgs();
++
++                
++                        property_Args = std::string(arg_Args.c_str());
++                        isValidArgs = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for args
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetArgs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidArgs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether args is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isArgsNil()
++           {
++               return !isValidArgs;
++           }
++
++           /**
++            * Set args to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setArgsNil()
++           {
++               return resetArgs();
++           }
++
++           
++
++            /**
++             * Getter for owner by  Property Number 3
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getProperty3()
++            {
++                return getOwner();
++            }
++
++            /**
++             * getter for owner.
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getOwner()
++             {
++                return property_Owner;
++             }
++
++            /**
++             * setter for owner
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setOwner(
++                    const std::string  arg_Owner)
++             {
++                
++
++                if(isValidOwner &&
++                        arg_Owner == property_Owner)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Owner.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"owner is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetOwner();
++
++                
++                        property_Owner = std::string(arg_Owner.c_str());
++                        isValidOwner = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for owner
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetOwner()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidOwner = false; 
++               return true;
++           }
++
++           /**
++            * Check whether owner is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isOwnerNil()
++           {
++               return !isValidOwner;
++           }
++
++           /**
++            * Set owner to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setOwnerNil()
++           {
++               return resetOwner();
++           }
++
++           
++
++            /**
++             * Getter for iwd by  Property Number 4
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getProperty4()
++            {
++                return getIwd();
++            }
++
++            /**
++             * getter for iwd.
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getIwd()
++             {
++                return property_Iwd;
++             }
++
++            /**
++             * setter for iwd
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setIwd(
++                    const std::string  arg_Iwd)
++             {
++                
++
++                if(isValidIwd &&
++                        arg_Iwd == property_Iwd)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(arg_Iwd.empty())
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"iwd is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetIwd();
++
++                
++                        property_Iwd = std::string(arg_Iwd.c_str());
++                        isValidIwd = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for iwd
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetIwd()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidIwd = false; 
++               return true;
++           }
++
++           /**
++            * Check whether iwd is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isIwdNil()
++           {
++               return !isValidIwd;
++           }
++
++           /**
++            * Set iwd to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setIwdNil()
++           {
++               return resetIwd();
++           }
++
++           
++
++            /**
++             * Getter for submission_name by  Property Number 5
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getProperty5()
++            {
++                return getSubmission_name();
++            }
++
++            /**
++             * getter for submission_name.
++             */
++            std::string WSF_CALL
++            AviaryJob::SubmitJob::getSubmission_name()
++             {
++                return property_Submission_name;
++             }
++
++            /**
++             * setter for submission_name
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setSubmission_name(
++                    const std::string  arg_Submission_name)
++             {
++                
++
++                if(isValidSubmission_name &&
++                        arg_Submission_name == property_Submission_name)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetSubmission_name();
++
++                
++                        property_Submission_name = std::string(arg_Submission_name.c_str());
++                        isValidSubmission_name = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for submission_name
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetSubmission_name()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidSubmission_name = false; 
++               return true;
++           }
++
++           /**
++            * Check whether submission_name is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isSubmission_nameNil()
++           {
++               return !isValidSubmission_name;
++           }
++
++           /**
++            * Set submission_name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setSubmission_nameNil()
++           {
++               return resetSubmission_name();
++           }
++
++           
++
++            /**
++             * Getter for requirements by  Property Number 6
++             */
++            std::vector<AviaryCommon::ResourceConstraint*>* WSF_CALL
++            AviaryJob::SubmitJob::getProperty6()
++            {
++                return getRequirements();
++            }
++
++            /**
++             * getter for requirements.
++             */
++            std::vector<AviaryCommon::ResourceConstraint*>* WSF_CALL
++            AviaryJob::SubmitJob::getRequirements()
++             {
++                return property_Requirements;
++             }
++
++            /**
++             * setter for requirements
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setRequirements(
++                    std::vector<AviaryCommon::ResourceConstraint*>*  arg_Requirements)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidRequirements &&
++                        arg_Requirements == property_Requirements)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Requirements->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"requirements has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Requirements)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetRequirements();
++
++                
++                    if(NULL == arg_Requirements)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Requirements = arg_Requirements;
++                        if(non_nil_exists)
++                        {
++                            isValidRequirements = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of requirements.
++             */
++            AviaryCommon::ResourceConstraint* WSF_CALL
++            AviaryJob::SubmitJob::getRequirementsAt(int i)
++            {
++                AviaryCommon::ResourceConstraint* ret_val;
++                if(property_Requirements == NULL)
++                {
++                    return (AviaryCommon::ResourceConstraint*)0;
++                }
++                ret_val =   (*property_Requirements)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of requirements.
++             */
++           bool WSF_CALL
++            AviaryJob::SubmitJob::setRequirementsAt(int i,
++                    AviaryCommon::ResourceConstraint* arg_Requirements)
++            {
++                 AviaryCommon::ResourceConstraint* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidRequirements &&
++                    property_Requirements &&
++                  
++                    arg_Requirements == (*property_Requirements)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Requirements == NULL)
++                {
++                    property_Requirements = new std::vector<AviaryCommon::ResourceConstraint*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Requirements)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidRequirements = true;
++                        (*property_Requirements)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Requirements)[i] = arg_Requirements;
++                  
++
++               isValidRequirements = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to requirements.
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::addRequirements(
++                    AviaryCommon::ResourceConstraint* arg_Requirements)
++             {
++
++                
++                    if( NULL == arg_Requirements
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Requirements == NULL)
++                {
++                    property_Requirements = new std::vector<AviaryCommon::ResourceConstraint*>();
++                }
++              
++               property_Requirements->push_back(arg_Requirements);
++              
++                isValidRequirements = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the requirements array.
++             */
++            int WSF_CALL
++            AviaryJob::SubmitJob::sizeofRequirements()
++            {
++
++                if(property_Requirements == NULL)
++                {
++                    return 0;
++                }
++                return property_Requirements->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::removeRequirementsAt(int i)
++            {
++                return setRequirementsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for requirements
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetRequirements()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Requirements != NULL)
++                {
++                  std::vector<AviaryCommon::ResourceConstraint*>::iterator it =  property_Requirements->begin();
++                  for( ; it <  property_Requirements->end() ; ++it)
++                  {
++                     AviaryCommon::ResourceConstraint* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Requirements)
++                 delete property_Requirements;
++                
++               isValidRequirements = false; 
++               return true;
++           }
++
++           /**
++            * Check whether requirements is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isRequirementsNil()
++           {
++               return !isValidRequirements;
++           }
++
++           /**
++            * Set requirements to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setRequirementsNil()
++           {
++               return resetRequirements();
++           }
++
++           
++           /**
++            * Check whether requirements is nill at i
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isRequirementsNilAt(int i)
++           {
++               return (isValidRequirements == false ||
++                       NULL == property_Requirements ||
++                     NULL == (*property_Requirements)[i]);
++            }
++
++           /**
++            * Set requirements to nil at i
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setRequirementsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Requirements == NULL ||
++                            isValidRequirements == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Requirements->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Requirements)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of requirements is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Requirements == NULL)
++                {
++                    isValidRequirements = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::ResourceConstraint* element = (*property_Requirements)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidRequirements = false;
++                        (*property_Requirements)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Requirements)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for extra by  Property Number 7
++             */
++            std::vector<AviaryCommon::Attribute*>* WSF_CALL
++            AviaryJob::SubmitJob::getProperty7()
++            {
++                return getExtra();
++            }
++
++            /**
++             * getter for extra.
++             */
++            std::vector<AviaryCommon::Attribute*>* WSF_CALL
++            AviaryJob::SubmitJob::getExtra()
++             {
++                return property_Extra;
++             }
++
++            /**
++             * setter for extra
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setExtra(
++                    std::vector<AviaryCommon::Attribute*>*  arg_Extra)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidExtra &&
++                        arg_Extra == property_Extra)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Extra->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"extra has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Extra)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetExtra();
++
++                
++                    if(NULL == arg_Extra)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Extra = arg_Extra;
++                        if(non_nil_exists)
++                        {
++                            isValidExtra = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of extra.
++             */
++            AviaryCommon::Attribute* WSF_CALL
++            AviaryJob::SubmitJob::getExtraAt(int i)
++            {
++                AviaryCommon::Attribute* ret_val;
++                if(property_Extra == NULL)
++                {
++                    return (AviaryCommon::Attribute*)0;
++                }
++                ret_val =   (*property_Extra)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of extra.
++             */
++           bool WSF_CALL
++            AviaryJob::SubmitJob::setExtraAt(int i,
++                    AviaryCommon::Attribute* arg_Extra)
++            {
++                 AviaryCommon::Attribute* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidExtra &&
++                    property_Extra &&
++                  
++                    arg_Extra == (*property_Extra)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Extra == NULL)
++                {
++                    property_Extra = new std::vector<AviaryCommon::Attribute*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Extra)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidExtra = true;
++                        (*property_Extra)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Extra)[i] = arg_Extra;
++                  
++
++               isValidExtra = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to extra.
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::addExtra(
++                    AviaryCommon::Attribute* arg_Extra)
++             {
++
++                
++                    if( NULL == arg_Extra
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Extra == NULL)
++                {
++                    property_Extra = new std::vector<AviaryCommon::Attribute*>();
++                }
++              
++               property_Extra->push_back(arg_Extra);
++              
++                isValidExtra = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the extra array.
++             */
++            int WSF_CALL
++            AviaryJob::SubmitJob::sizeofExtra()
++            {
++
++                if(property_Extra == NULL)
++                {
++                    return 0;
++                }
++                return property_Extra->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::removeExtraAt(int i)
++            {
++                return setExtraNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for extra
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetExtra()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Extra != NULL)
++                {
++                  std::vector<AviaryCommon::Attribute*>::iterator it =  property_Extra->begin();
++                  for( ; it <  property_Extra->end() ; ++it)
++                  {
++                     AviaryCommon::Attribute* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Extra)
++                 delete property_Extra;
++                
++               isValidExtra = false; 
++               return true;
++           }
++
++           /**
++            * Check whether extra is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isExtraNil()
++           {
++               return !isValidExtra;
++           }
++
++           /**
++            * Set extra to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setExtraNil()
++           {
++               return resetExtra();
++           }
++
++           
++           /**
++            * Check whether extra is nill at i
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isExtraNilAt(int i)
++           {
++               return (isValidExtra == false ||
++                       NULL == property_Extra ||
++                     NULL == (*property_Extra)[i]);
++            }
++
++           /**
++            * Set extra to nil at i
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setExtraNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Extra == NULL ||
++                            isValidExtra == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Extra->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Extra)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of extra is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Extra == NULL)
++                {
++                    isValidExtra = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::Attribute* element = (*property_Extra)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidExtra = false;
++                        (*property_Extra)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Extra)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for allowOverrides by  Property Number 8
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::getProperty8()
++            {
++                return getAllowOverrides();
++            }
++
++            /**
++             * getter for allowOverrides.
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::getAllowOverrides()
++             {
++                return property_AllowOverrides;
++             }
++
++            /**
++             * setter for allowOverrides
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJob::setAllowOverrides(
++                    bool  arg_AllowOverrides)
++             {
++                
++
++                if(isValidAllowOverrides &&
++                        arg_AllowOverrides == property_AllowOverrides)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetAllowOverrides();
++
++                
++                        property_AllowOverrides = arg_AllowOverrides;
++                        isValidAllowOverrides = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for allowOverrides
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::resetAllowOverrides()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidAllowOverrides = false; 
++               return true;
++           }
++
++           /**
++            * Check whether allowOverrides is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::isAllowOverridesNil()
++           {
++               return !isValidAllowOverrides;
++           }
++
++           /**
++            * Set allowOverrides to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJob::setAllowOverridesNil()
++           {
++               return resetAllowOverrides();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJobResponse.cpp b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJobResponse.cpp
+new file mode 100644
+index 0000000..9f03b7f
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/job/src/AviaryJob_SubmitJobResponse.cpp
+@@ -0,0 +1,703 @@
++
++
++        /**
++         * SubmitJobResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryJob_SubmitJobResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryJob;
++        
++               /*
++                * Implementation of the SubmitJobResponse|http://job.aviary.grid.redhat.com Element
++                */
++           AviaryJob::SubmitJobResponse::SubmitJobResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Id  = NULL;
++              
++            isValidId  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "SubmitJobResponse",
++                        "http://job.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryJob::SubmitJobResponse::SubmitJobResponse(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status)
++        {
++             
++                   qname = NULL;
++             
++               property_Id  = NULL;
++             
++            isValidId  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "SubmitJobResponse",
++                       "http://job.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Id = arg_Id;
++            
++                    property_Status = arg_Status;
++            
++        }
++        AviaryJob::SubmitJobResponse::~SubmitJobResponse()
++        {
++            delete property_Id;
++            delete property_Status;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryJob::SubmitJobResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for SubmitJobResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building id element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "id", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("id", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobID* element = new AviaryCommon::JobID();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element id");
++                                      }
++                                      else
++                                      {
++                                          status = setId(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for id ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryJob::SubmitJobResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryJob::SubmitJobResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryJob::SubmitJobResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://job.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://job.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "SubmitJobResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidId)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("id"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("id")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing id element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sid",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sid>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Id->serialize(current_node, parent_element,
++                                                                                 property_Id->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Id->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for id by  Property Number 1
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::SubmitJobResponse::getProperty1()
++            {
++                return getId();
++            }
++
++            /**
++             * getter for id.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryJob::SubmitJobResponse::getId()
++             {
++                return property_Id;
++             }
++
++            /**
++             * setter for id
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJobResponse::setId(
++                    AviaryCommon::JobID*  arg_Id)
++             {
++                
++
++                if(isValidId &&
++                        arg_Id == property_Id)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetId();
++
++                
++                    if(NULL == arg_Id)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Id = arg_Id;
++                        isValidId = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for id
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::resetId()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Id != NULL)
++                {
++                   
++                   
++                         delete  property_Id;
++                     
++
++                   }
++
++                
++                
++                
++               isValidId = false; 
++               return true;
++           }
++
++           /**
++            * Check whether id is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::isIdNil()
++           {
++               return !isValidId;
++           }
++
++           /**
++            * Set id to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::setIdNil()
++           {
++               return resetId();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryJob::SubmitJobResponse::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryJob::SubmitJobResponse::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryJob::SubmitJobResponse::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryJob::SubmitJobResponse::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobData.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobData.cpp
+new file mode 100644
+index 0000000..1b73427
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobData.cpp
+@@ -0,0 +1,911 @@
++
++
++        /**
++         * GetJobData.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobData.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobData|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobData::GetJobData()
++        {
++
++        
++            qname = NULL;
++        
++                property_Data  = NULL;
++              
++            isValidData  = false;
++        
++            isValidMax_bytes  = false;
++        
++            isValidFrom_end  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobData",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobData::GetJobData(AviaryCommon::JobData* arg_Data,int arg_Max_bytes,bool arg_From_end)
++        {
++             
++                   qname = NULL;
++             
++               property_Data  = NULL;
++             
++            isValidData  = true;
++            
++            isValidMax_bytes  = true;
++            
++            isValidFrom_end  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobData",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Data = arg_Data;
++            
++                    property_Max_bytes = arg_Max_bytes;
++            
++                    property_From_end = arg_From_end;
++            
++        }
++        AviaryQuery::GetJobData::~GetJobData()
++        {
++            if (property_Data) delete property_Data;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobData::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobData : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building data element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "data", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("data", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("data", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobData* element = new AviaryCommon::JobData();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element data");
++                                      }
++                                      else
++                                      {
++                                          status = setData(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for data ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element data missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building max_bytes element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "max_bytes", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("max_bytes", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("max_bytes", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setMax_bytes(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element max_bytes");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for max_bytes ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element max_bytes missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building from_end element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "from_end", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("from_end", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("from_end", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            if (!axutil_strcasecmp(text_value , "true"))
++                                            {
++                                                status = setFrom_end(true);
++                                            }
++                                            else
++                                            {
++                                                status = setFrom_end(false);
++                                            }
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element from_end");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for from_end ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobData::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobData::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobData::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobData", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidData)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property data");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("data"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("data")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing data element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sdata",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sdata>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Data->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Data->serialize(current_node, parent_element,
++                                                                                 property_Data->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Data->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidMax_bytes)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property max_bytes");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("max_bytes"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("max_bytes")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing max_bytes element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%smax_bytes>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%smax_bytes>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_2, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_Max_bytes);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidFrom_end)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("from_end"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("from_end")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing from_end element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sfrom_end>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sfrom_end>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           strcpy(text_value_3, (property_From_end)?"true":"false");
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for data by  Property Number 1
++             */
++            AviaryCommon::JobData* WSF_CALL
++            AviaryQuery::GetJobData::getProperty1()
++            {
++                return getData();
++            }
++
++            /**
++             * getter for data.
++             */
++            AviaryCommon::JobData* WSF_CALL
++            AviaryQuery::GetJobData::getData()
++             {
++                return property_Data;
++             }
++
++            /**
++             * setter for data
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobData::setData(
++                    AviaryCommon::JobData*  arg_Data)
++             {
++                
++
++                if(isValidData &&
++                        arg_Data == property_Data)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Data)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"data is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetData();
++
++                
++                    if(NULL == arg_Data)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Data = arg_Data;
++                        isValidData = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for data
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::resetData()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Data != NULL)
++                {
++                   
++                   
++                         delete  property_Data;
++                     
++
++                   }
++
++                
++                
++                
++               isValidData = false; 
++               return true;
++           }
++
++           /**
++            * Check whether data is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::isDataNil()
++           {
++               return !isValidData;
++           }
++
++           /**
++            * Set data to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::setDataNil()
++           {
++               return resetData();
++           }
++
++           
++
++            /**
++             * Getter for max_bytes by  Property Number 2
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobData::getProperty2()
++            {
++                return getMax_bytes();
++            }
++
++            /**
++             * getter for max_bytes.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobData::getMax_bytes()
++             {
++                return property_Max_bytes;
++             }
++
++            /**
++             * setter for max_bytes
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobData::setMax_bytes(
++                    const int  arg_Max_bytes)
++             {
++                
++
++                if(isValidMax_bytes &&
++                        arg_Max_bytes == property_Max_bytes)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetMax_bytes();
++
++                
++                        property_Max_bytes = arg_Max_bytes;
++                        isValidMax_bytes = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for max_bytes
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::resetMax_bytes()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidMax_bytes = false; 
++               return true;
++           }
++
++           /**
++            * Check whether max_bytes is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::isMax_bytesNil()
++           {
++               return !isValidMax_bytes;
++           }
++
++           /**
++            * Set max_bytes to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::setMax_bytesNil()
++           {
++               return resetMax_bytes();
++           }
++
++           
++
++            /**
++             * Getter for from_end by  Property Number 3
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobData::getProperty3()
++            {
++                return getFrom_end();
++            }
++
++            /**
++             * getter for from_end.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobData::getFrom_end()
++             {
++                return property_From_end;
++             }
++
++            /**
++             * setter for from_end
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobData::setFrom_end(
++                    bool  arg_From_end)
++             {
++                
++
++                if(isValidFrom_end &&
++                        arg_From_end == property_From_end)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetFrom_end();
++
++                
++                        property_From_end = arg_From_end;
++                        isValidFrom_end = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for from_end
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::resetFrom_end()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidFrom_end = false; 
++               return true;
++           }
++
++           /**
++            * Check whether from_end is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::isFrom_endNil()
++           {
++               return !isValidFrom_end;
++           }
++
++           /**
++            * Set from_end to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobData::setFrom_endNil()
++           {
++               return resetFrom_end();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDataResponse.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDataResponse.cpp
+new file mode 100644
+index 0000000..f2c6f6b
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDataResponse.cpp
+@@ -0,0 +1,1513 @@
++
++
++        /**
++         * GetJobDataResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobDataResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobDataResponse|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobDataResponse::GetJobDataResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Data  = NULL;
++              
++            isValidData  = false;
++        
++                property_Status  = NULL;
++              
++            isValidStatus  = false;
++        
++                    property_File_name;
++                
++            isValidFile_name  = false;
++        
++            isValidFile_size  = false;
++        
++                    property_Content;
++                
++            isValidContent  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobDataResponse",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobDataResponse::GetJobDataResponse(AviaryCommon::JobData* arg_Data,AviaryCommon::Status* arg_Status,std::string arg_File_name,int arg_File_size,std::string arg_Content)
++        {
++             
++                   qname = NULL;
++             
++               property_Data  = NULL;
++             
++            isValidData  = true;
++            
++               property_Status  = NULL;
++             
++            isValidStatus  = true;
++            
++                 property_File_name;
++             
++            isValidFile_name  = true;
++            
++            isValidFile_size  = true;
++            
++                 property_Content;
++             
++            isValidContent  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobDataResponse",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Data = arg_Data;
++            
++                    property_Status = arg_Status;
++            
++                    property_File_name = arg_File_name;
++            
++                    property_File_size = arg_File_size;
++            
++                    property_Content = arg_Content;
++            
++        }
++        AviaryQuery::GetJobDataResponse::~GetJobDataResponse()
++        {
++            if (property_Data) delete property_Data;
++            if (property_Status) delete property_Status;
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobDataResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobDataResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++
++                     
++                     /*
++                      * building data element
++                      */
++                     
++                     
++                     
++                                   current_node = first_node;
++                                   is_early_node_valid = false;
++                                   
++                                   
++                                    while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                    {
++                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                    }
++                                    if(current_node != NULL)
++                                    {
++                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                        mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                    }
++                                   
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "data", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("data", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("data", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::JobData* element = new AviaryCommon::JobData();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element data");
++                                      }
++                                      else
++                                      {
++                                          status = setData(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for data ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element data missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building status element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
++                                 
++
++                           if (isParticle() ||  
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 AviaryCommon::Status* element = new AviaryCommon::Status();
++
++                                      status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                      if(AXIS2_FAILURE == status)
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
++                                      }
++                                      else
++                                      {
++                                          status = setStatus(element);
++                                      }
++                                    
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                              else if(!dont_care_minoccurs)
++                              {
++                                  if(element_qname)
++                                  {
++                                      axutil_qname_free(element_qname, Environment::getEnv());
++                                  }
++                                  /* this is not a nillable element*/
++				  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
++                                  return AXIS2_FAILURE;
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building file_name element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "file_name", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("file_name", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("file_name", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setFile_name(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element file_name");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setFile_name("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for file_name ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building file_size element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "file_size", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("file_size", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("file_size", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setFile_size(atoi(text_value));
++                                      }
++                                      
++                                      else
++                                      {
++                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element file_size");
++                                          status = AXIS2_FAILURE;
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for file_size ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++
++                     
++                     /*
++                      * building content element
++                      */
++                     
++                     
++                     
++                                    /*
++                                     * because elements are ordered this works fine
++                                     */
++                                  
++                                   
++                                   if(current_node != NULL && is_early_node_valid)
++                                   {
++                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                       
++                                       
++                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                        {
++                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                        }
++                                        if(current_node != NULL)
++                                        {
++                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++                                        }
++                                       
++                                   }
++                                   is_early_node_valid = false;
++                                 
++                                 element_qname = axutil_qname_create(Environment::getEnv(), "content", NULL, NULL);
++                                 
++
++                           if ( 
++                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("content", axiom_element_get_localname(current_element, Environment::getEnv())))))
++                           {
++                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("content", axiom_element_get_localname(current_element, Environment::getEnv()))))
++                              {
++                                is_early_node_valid = true;
++                              }
++                              
++                                 
++                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
++                                      if(text_value != NULL)
++                                      {
++                                            status = setContent(text_value);
++                                      }
++                                      
++                                      else
++                                      {
++                                            /*
++                                             * axis2_qname_t *qname = NULL;
++                                             * axiom_attribute_t *the_attri = NULL;
++                                             * 
++                                             * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
++                                             * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
++                                             */
++                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
++
++                                            axiom_attribute_t *the_attri = NULL;
++                                            axis2_char_t *attrib_text = NULL;
++                                            axutil_hash_t *attribute_hash = NULL;
++
++                                            attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
++
++                                            attrib_text = NULL;
++                                            if(attribute_hash)
++                                            {
++                                                 axutil_hash_index_t *hi;
++                                                 void *val;
++                                                 const void *key;
++                                        
++                                                 for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                                                 {
++                                                     axutil_hash_this(hi, &key, NULL, &val);
++                                                     
++                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
++                                                     {
++                                                         the_attri = (axiom_attribute_t*)val;
++                                                         break;
++                                                     }
++                                                 }
++                                            }
++
++                                            if(the_attri)
++                                            {
++                                                attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
++                                            }
++                                            else
++                                            {
++                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
++                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
++                                            }
++
++                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
++                                            {
++                                                WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element content");
++                                                status = AXIS2_FAILURE;
++                                            }
++                                            else
++                                            {
++                                                /* after all, we found this is a empty string */
++                                                status = setContent("");
++                                            }
++                                      }
++                                      
++                                 if(AXIS2_FAILURE ==  status)
++                                 {
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for content ");
++                                     if(element_qname)
++                                     {
++                                         axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     return AXIS2_FAILURE;
++                                 }
++                              }
++                           
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobDataResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobDataResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobDataResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_3;
++                    axis2_char_t *text_value_3_temp;
++                    
++                    axis2_char_t text_value_4[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t *text_value_5;
++                    axis2_char_t *text_value_5_temp;
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobDataResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidData)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property data");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("data"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("data")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing data element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sdata",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sdata>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Data->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Data->serialize(current_node, parent_element,
++                                                                                 property_Data->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Data->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidStatus)
++                   {
++                      
++                            
++                            WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
++                            return NULL;
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("status"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing status element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sstatus",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sstatus>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                     
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            property_Status->serialize(current_node, parent_element,
++                                                                                 property_Status->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!property_Status->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidFile_name)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("file_name"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("file_name")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing file_name element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sfile_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sfile_name>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_3 = (axis2_char_t*)property_File_name.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
++                           if (text_value_3_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidFile_size)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("file_size"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("file_size")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing file_size element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%sfile_size>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%sfile_size>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                               sprintf (text_value_4, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, property_File_size);
++                             
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidContent)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("content"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("content")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     
++                     /*
++                      * parsing content element
++                      */
++
++                    
++                    
++                            sprintf(start_input_str, "<%s%scontent>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                        start_input_str_len = axutil_strlen(start_input_str);
++                        sprintf(end_input_str, "</%s%scontent>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                        end_input_str_len = axutil_strlen(end_input_str);
++                    
++                           text_value_5 = (axis2_char_t*)property_Content.c_str();
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                           
++                            
++                           text_value_5_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_5, true);
++                           if (text_value_5_temp)
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_5_temp, axutil_strlen(text_value_5_temp));
++                               AXIS2_FREE(Environment::getEnv()->allocator, text_value_5_temp);
++                           }
++                           else
++                           {
++                               axutil_stream_write(stream, Environment::getEnv(), text_value_5, axutil_strlen(text_value_5));
++                           }
++                           
++                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                           
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for data by  Property Number 1
++             */
++            AviaryCommon::JobData* WSF_CALL
++            AviaryQuery::GetJobDataResponse::getProperty1()
++            {
++                return getData();
++            }
++
++            /**
++             * getter for data.
++             */
++            AviaryCommon::JobData* WSF_CALL
++            AviaryQuery::GetJobDataResponse::getData()
++             {
++                return property_Data;
++             }
++
++            /**
++             * setter for data
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDataResponse::setData(
++                    AviaryCommon::JobData*  arg_Data)
++             {
++                
++
++                if(isValidData &&
++                        arg_Data == property_Data)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Data)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"data is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetData();
++
++                
++                    if(NULL == arg_Data)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Data = arg_Data;
++                        isValidData = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for data
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::resetData()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Data != NULL)
++                {
++                   
++                   
++                         delete  property_Data;
++                     
++
++                   }
++
++                
++                
++                
++               isValidData = false; 
++               return true;
++           }
++
++           /**
++            * Check whether data is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::isDataNil()
++           {
++               return !isValidData;
++           }
++
++           /**
++            * Set data to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::setDataNil()
++           {
++               return resetData();
++           }
++
++           
++
++            /**
++             * Getter for status by  Property Number 2
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryQuery::GetJobDataResponse::getProperty2()
++            {
++                return getStatus();
++            }
++
++            /**
++             * getter for status.
++             */
++            AviaryCommon::Status* WSF_CALL
++            AviaryQuery::GetJobDataResponse::getStatus()
++             {
++                return property_Status;
++             }
++
++            /**
++             * setter for status
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDataResponse::setStatus(
++                    AviaryCommon::Status*  arg_Status)
++             {
++                
++
++                if(isValidStatus &&
++                        arg_Status == property_Status)
++                {
++                    
++                    return true;
++                }
++
++                
++                  if(NULL == arg_Status)
++                       
++                  {
++                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
++                      return AXIS2_FAILURE;
++                  }
++                
++
++                
++                resetStatus();
++
++                
++                    if(NULL == arg_Status)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Status = arg_Status;
++                        isValidStatus = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for status
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::resetStatus()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++            
++                
++
++                if(property_Status != NULL)
++                {
++                   
++                   
++                         delete  property_Status;
++                     
++
++                   }
++
++                
++                
++                
++               isValidStatus = false; 
++               return true;
++           }
++
++           /**
++            * Check whether status is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::isStatusNil()
++           {
++               return !isValidStatus;
++           }
++
++           /**
++            * Set status to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::setStatusNil()
++           {
++               return resetStatus();
++           }
++
++           
++
++            /**
++             * Getter for file_name by  Property Number 3
++             */
++            std::string WSF_CALL
++            AviaryQuery::GetJobDataResponse::getProperty3()
++            {
++                return getFile_name();
++            }
++
++            /**
++             * getter for file_name.
++             */
++            std::string WSF_CALL
++            AviaryQuery::GetJobDataResponse::getFile_name()
++             {
++                return property_File_name;
++             }
++
++            /**
++             * setter for file_name
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDataResponse::setFile_name(
++                    const std::string  arg_File_name)
++             {
++                
++
++                if(isValidFile_name &&
++                        arg_File_name == property_File_name)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetFile_name();
++
++                
++                        property_File_name = std::string(arg_File_name.c_str());
++                        isValidFile_name = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for file_name
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::resetFile_name()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidFile_name = false; 
++               return true;
++           }
++
++           /**
++            * Check whether file_name is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::isFile_nameNil()
++           {
++               return !isValidFile_name;
++           }
++
++           /**
++            * Set file_name to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::setFile_nameNil()
++           {
++               return resetFile_name();
++           }
++
++           
++
++            /**
++             * Getter for file_size by  Property Number 4
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobDataResponse::getProperty4()
++            {
++                return getFile_size();
++            }
++
++            /**
++             * getter for file_size.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobDataResponse::getFile_size()
++             {
++                return property_File_size;
++             }
++
++            /**
++             * setter for file_size
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDataResponse::setFile_size(
++                    const int  arg_File_size)
++             {
++                
++
++                if(isValidFile_size &&
++                        arg_File_size == property_File_size)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetFile_size();
++
++                
++                        property_File_size = arg_File_size;
++                        isValidFile_size = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for file_size
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::resetFile_size()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidFile_size = false; 
++               return true;
++           }
++
++           /**
++            * Check whether file_size is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::isFile_sizeNil()
++           {
++               return !isValidFile_size;
++           }
++
++           /**
++            * Set file_size to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::setFile_sizeNil()
++           {
++               return resetFile_size();
++           }
++
++           
++
++            /**
++             * Getter for content by  Property Number 5
++             */
++            std::string WSF_CALL
++            AviaryQuery::GetJobDataResponse::getProperty5()
++            {
++                return getContent();
++            }
++
++            /**
++             * getter for content.
++             */
++            std::string WSF_CALL
++            AviaryQuery::GetJobDataResponse::getContent()
++             {
++                return property_Content;
++             }
++
++            /**
++             * setter for content
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDataResponse::setContent(
++                    const std::string  arg_Content)
++             {
++                
++
++                if(isValidContent &&
++                        arg_Content == property_Content)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetContent();
++
++                
++                        property_Content = std::string(arg_Content.c_str());
++                        isValidContent = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for content
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::resetContent()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidContent = false; 
++               return true;
++           }
++
++           /**
++            * Check whether content is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::isContentNil()
++           {
++               return !isValidContent;
++           }
++
++           /**
++            * Set content to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDataResponse::setContentNil()
++           {
++               return resetContent();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetails.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetails.cpp
+new file mode 100644
+index 0000000..95ea11a
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetails.cpp
+@@ -0,0 +1,984 @@
++
++
++        /**
++         * GetJobDetails.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobDetails.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobDetails|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobDetails::GetJobDetails()
++        {
++
++        
++            qname = NULL;
++        
++                property_Ids  = NULL;
++              
++            isValidIds  = false;
++        
++            isValidPartialMatches  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobDetails",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobDetails::GetJobDetails(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches)
++        {
++             
++                   qname = NULL;
++             
++               property_Ids  = NULL;
++             
++            isValidIds  = true;
++            
++            isValidPartialMatches  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobDetails",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Ids = arg_Ids;
++            
++                    property_PartialMatches = arg_PartialMatches;
++            
++        }
++        AviaryQuery::GetJobDetails::~GetJobDetails()
++        {
++            if (property_Ids) {
++                while(!property_Ids->empty()) delete property_Ids->back(), property_Ids->pop_back();
++                delete property_Ids;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobDetails::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobDetails : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++                       { 
++                    /*
++                     * building Ids array
++                     */
++                       std::vector<AviaryCommon::JobID*>* arr_list =new std::vector<AviaryCommon::JobID*>();
++                   
++
++                     
++                     /*
++                      * building ids element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "ids", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("ids", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobID* element = new AviaryCommon::JobID();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element ids ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for ids ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setIds(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "partialMatches"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "partialMatches", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "partialMatches");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setPartialMatches(true);
++                           }
++                           else
++                           {
++                               setPartialMatches(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobDetails::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobDetails::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobDetails::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobDetails", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidPartialMatches)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_PartialMatches)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("partialMatches")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "partialMatches",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIds)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ids"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ids")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Ids array
++                      */
++                     if (property_Ids != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sids",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sids>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Ids->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobID* element = (*property_Ids)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing ids element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidPartialMatches)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_PartialMatches)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "partialMatches", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ids by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobDetails::getProperty1()
++            {
++                return getIds();
++            }
++
++            /**
++             * getter for ids.
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobDetails::getIds()
++             {
++                return property_Ids;
++             }
++
++            /**
++             * setter for ids
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::setIds(
++                    std::vector<AviaryCommon::JobID*>*  arg_Ids)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidIds &&
++                        arg_Ids == property_Ids)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Ids->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Ids)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetIds();
++
++                
++                    if(NULL == arg_Ids)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Ids = arg_Ids;
++                        if(non_nil_exists)
++                        {
++                            isValidIds = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of ids.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryQuery::GetJobDetails::getIdsAt(int i)
++            {
++                AviaryCommon::JobID* ret_val;
++                if(property_Ids == NULL)
++                {
++                    return (AviaryCommon::JobID*)0;
++                }
++                ret_val =   (*property_Ids)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of ids.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobDetails::setIdsAt(int i,
++                    AviaryCommon::JobID* arg_Ids)
++            {
++                 AviaryCommon::JobID* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidIds &&
++                    property_Ids &&
++                  
++                    arg_Ids == (*property_Ids)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Ids)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = true;
++                        (*property_Ids)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Ids)[i] = arg_Ids;
++                  
++
++               isValidIds = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to ids.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::addIds(
++                    AviaryCommon::JobID* arg_Ids)
++             {
++
++                
++                    if( NULL == arg_Ids
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++              
++               property_Ids->push_back(arg_Ids);
++              
++                isValidIds = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the ids array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobDetails::sizeofIds()
++            {
++
++                if(property_Ids == NULL)
++                {
++                    return 0;
++                }
++                return property_Ids->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::removeIdsAt(int i)
++            {
++                return setIdsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for ids
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::resetIds()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Ids != NULL)
++                {
++                  std::vector<AviaryCommon::JobID*>::iterator it =  property_Ids->begin();
++                  for( ; it <  property_Ids->end() ; ++it)
++                  {
++                     AviaryCommon::JobID* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Ids)
++                 delete property_Ids;
++                
++               isValidIds = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ids is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::isIdsNil()
++           {
++               return !isValidIds;
++           }
++
++           /**
++            * Set ids to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::setIdsNil()
++           {
++               return resetIds();
++           }
++
++           
++           /**
++            * Check whether ids is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::isIdsNilAt(int i)
++           {
++               return (isValidIds == false ||
++                       NULL == property_Ids ||
++                     NULL == (*property_Ids)[i]);
++            }
++
++           /**
++            * Set ids to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::setIdsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Ids == NULL ||
++                            isValidIds == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Ids->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Ids)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of ids is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Ids == NULL)
++                {
++                    isValidIds = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobID* element = (*property_Ids)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = false;
++                        (*property_Ids)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Ids)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for partialMatches by  Property Number 2
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::getProperty2()
++            {
++                return getPartialMatches();
++            }
++
++            /**
++             * getter for partialMatches.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::getPartialMatches()
++             {
++                return property_PartialMatches;
++             }
++
++            /**
++             * setter for partialMatches
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetails::setPartialMatches(
++                    bool  arg_PartialMatches)
++             {
++                
++
++                if(isValidPartialMatches &&
++                        arg_PartialMatches == property_PartialMatches)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetPartialMatches();
++
++                
++                        property_PartialMatches = arg_PartialMatches;
++                        isValidPartialMatches = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for partialMatches
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::resetPartialMatches()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPartialMatches = false; 
++               return true;
++           }
++
++           /**
++            * Check whether partialMatches is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::isPartialMatchesNil()
++           {
++               return !isValidPartialMatches;
++           }
++
++           /**
++            * Set partialMatches to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetails::setPartialMatchesNil()
++           {
++               return resetPartialMatches();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetailsResponse.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetailsResponse.cpp
+new file mode 100644
+index 0000000..0fcb9ae
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobDetailsResponse.cpp
+@@ -0,0 +1,780 @@
++
++
++        /**
++         * GetJobDetailsResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobDetailsResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobDetailsResponse|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobDetailsResponse::GetJobDetailsResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Jobs  = NULL;
++              
++            isValidJobs  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobDetailsResponse",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobDetailsResponse::GetJobDetailsResponse(std::vector<AviaryCommon::JobDetails*>* arg_Jobs)
++        {
++             
++                   qname = NULL;
++             
++               property_Jobs  = NULL;
++             
++            isValidJobs  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobDetailsResponse",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Jobs = arg_Jobs;
++            
++        }
++        AviaryQuery::GetJobDetailsResponse::~GetJobDetailsResponse()
++        {
++            if (property_Jobs) {
++                while(!property_Jobs->empty()) delete property_Jobs->back(), property_Jobs->pop_back();
++                delete property_Jobs;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobDetailsResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobDetailsResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                       { 
++                    /*
++                     * building Jobs array
++                     */
++                       std::vector<AviaryCommon::JobDetails*>* arr_list =new std::vector<AviaryCommon::JobDetails*>();
++                   
++
++                     
++                     /*
++                      * building jobs element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "jobs", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("jobs", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobDetails* element = new AviaryCommon::JobDetails();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element jobs ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for jobs ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setJobs(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobDetailsResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobDetailsResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobDetailsResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobDetailsResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJobs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("jobs"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("jobs")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Jobs array
++                      */
++                     if (property_Jobs != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sjobs",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sjobs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Jobs->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobDetails* element = (*property_Jobs)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing jobs element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for jobs by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobDetails*>* WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::getProperty1()
++            {
++                return getJobs();
++            }
++
++            /**
++             * getter for jobs.
++             */
++            std::vector<AviaryCommon::JobDetails*>* WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::getJobs()
++             {
++                return property_Jobs;
++             }
++
++            /**
++             * setter for jobs
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::setJobs(
++                    std::vector<AviaryCommon::JobDetails*>*  arg_Jobs)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidJobs &&
++                        arg_Jobs == property_Jobs)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Jobs->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Jobs)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetJobs();
++
++                
++                    if(NULL == arg_Jobs)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Jobs = arg_Jobs;
++                        if(non_nil_exists)
++                        {
++                            isValidJobs = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of jobs.
++             */
++            AviaryCommon::JobDetails* WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::getJobsAt(int i)
++            {
++                AviaryCommon::JobDetails* ret_val;
++                if(property_Jobs == NULL)
++                {
++                    return (AviaryCommon::JobDetails*)0;
++                }
++                ret_val =   (*property_Jobs)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of jobs.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::setJobsAt(int i,
++                    AviaryCommon::JobDetails* arg_Jobs)
++            {
++                 AviaryCommon::JobDetails* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidJobs &&
++                    property_Jobs &&
++                  
++                    arg_Jobs == (*property_Jobs)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobDetails*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Jobs)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = true;
++                        (*property_Jobs)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Jobs)[i] = arg_Jobs;
++                  
++
++               isValidJobs = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to jobs.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::addJobs(
++                    AviaryCommon::JobDetails* arg_Jobs)
++             {
++
++                
++                    if( NULL == arg_Jobs
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobDetails*>();
++                }
++              
++               property_Jobs->push_back(arg_Jobs);
++              
++                isValidJobs = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the jobs array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::sizeofJobs()
++            {
++
++                if(property_Jobs == NULL)
++                {
++                    return 0;
++                }
++                return property_Jobs->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobDetailsResponse::removeJobsAt(int i)
++            {
++                return setJobsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for jobs
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetailsResponse::resetJobs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Jobs != NULL)
++                {
++                  std::vector<AviaryCommon::JobDetails*>::iterator it =  property_Jobs->begin();
++                  for( ; it <  property_Jobs->end() ; ++it)
++                  {
++                     AviaryCommon::JobDetails* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Jobs)
++                 delete property_Jobs;
++                
++               isValidJobs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether jobs is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetailsResponse::isJobsNil()
++           {
++               return !isValidJobs;
++           }
++
++           /**
++            * Set jobs to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetailsResponse::setJobsNil()
++           {
++               return resetJobs();
++           }
++
++           
++           /**
++            * Check whether jobs is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetailsResponse::isJobsNilAt(int i)
++           {
++               return (isValidJobs == false ||
++                       NULL == property_Jobs ||
++                     NULL == (*property_Jobs)[i]);
++            }
++
++           /**
++            * Set jobs to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobDetailsResponse::setJobsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Jobs == NULL ||
++                            isValidJobs == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Jobs->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Jobs)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of jobs is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Jobs == NULL)
++                {
++                    isValidJobs = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobDetails* element = (*property_Jobs)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = false;
++                        (*property_Jobs)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Jobs)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatus.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatus.cpp
+new file mode 100644
+index 0000000..e7e69fe
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatus.cpp
+@@ -0,0 +1,984 @@
++
++
++        /**
++         * GetJobStatus.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobStatus.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobStatus|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobStatus::GetJobStatus()
++        {
++
++        
++            qname = NULL;
++        
++                property_Ids  = NULL;
++              
++            isValidIds  = false;
++        
++            isValidPartialMatches  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobStatus",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobStatus::GetJobStatus(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches)
++        {
++             
++                   qname = NULL;
++             
++               property_Ids  = NULL;
++             
++            isValidIds  = true;
++            
++            isValidPartialMatches  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobStatus",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Ids = arg_Ids;
++            
++                    property_PartialMatches = arg_PartialMatches;
++            
++        }
++        AviaryQuery::GetJobStatus::~GetJobStatus()
++        {
++            if (property_Ids) {
++                while(!property_Ids->empty()) delete property_Ids->back(), property_Ids->pop_back();
++                delete property_Ids;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobStatus::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobStatus : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++                       { 
++                    /*
++                     * building Ids array
++                     */
++                       std::vector<AviaryCommon::JobID*>* arr_list =new std::vector<AviaryCommon::JobID*>();
++                   
++
++                     
++                     /*
++                      * building ids element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "ids", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("ids", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobID* element = new AviaryCommon::JobID();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element ids ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for ids ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setIds(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "partialMatches"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "partialMatches", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "partialMatches");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setPartialMatches(true);
++                           }
++                           else
++                           {
++                               setPartialMatches(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobStatus::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobStatus::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobStatus::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobStatus", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidPartialMatches)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_PartialMatches)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("partialMatches")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "partialMatches",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIds)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ids"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ids")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Ids array
++                      */
++                     if (property_Ids != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sids",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sids>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Ids->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobID* element = (*property_Ids)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing ids element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidPartialMatches)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_PartialMatches)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "partialMatches", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ids by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobStatus::getProperty1()
++            {
++                return getIds();
++            }
++
++            /**
++             * getter for ids.
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobStatus::getIds()
++             {
++                return property_Ids;
++             }
++
++            /**
++             * setter for ids
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::setIds(
++                    std::vector<AviaryCommon::JobID*>*  arg_Ids)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidIds &&
++                        arg_Ids == property_Ids)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Ids->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Ids)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetIds();
++
++                
++                    if(NULL == arg_Ids)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Ids = arg_Ids;
++                        if(non_nil_exists)
++                        {
++                            isValidIds = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of ids.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryQuery::GetJobStatus::getIdsAt(int i)
++            {
++                AviaryCommon::JobID* ret_val;
++                if(property_Ids == NULL)
++                {
++                    return (AviaryCommon::JobID*)0;
++                }
++                ret_val =   (*property_Ids)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of ids.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobStatus::setIdsAt(int i,
++                    AviaryCommon::JobID* arg_Ids)
++            {
++                 AviaryCommon::JobID* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidIds &&
++                    property_Ids &&
++                  
++                    arg_Ids == (*property_Ids)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Ids)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = true;
++                        (*property_Ids)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Ids)[i] = arg_Ids;
++                  
++
++               isValidIds = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to ids.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::addIds(
++                    AviaryCommon::JobID* arg_Ids)
++             {
++
++                
++                    if( NULL == arg_Ids
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++              
++               property_Ids->push_back(arg_Ids);
++              
++                isValidIds = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the ids array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobStatus::sizeofIds()
++            {
++
++                if(property_Ids == NULL)
++                {
++                    return 0;
++                }
++                return property_Ids->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::removeIdsAt(int i)
++            {
++                return setIdsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for ids
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::resetIds()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Ids != NULL)
++                {
++                  std::vector<AviaryCommon::JobID*>::iterator it =  property_Ids->begin();
++                  for( ; it <  property_Ids->end() ; ++it)
++                  {
++                     AviaryCommon::JobID* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Ids)
++                 delete property_Ids;
++                
++               isValidIds = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ids is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::isIdsNil()
++           {
++               return !isValidIds;
++           }
++
++           /**
++            * Set ids to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::setIdsNil()
++           {
++               return resetIds();
++           }
++
++           
++           /**
++            * Check whether ids is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::isIdsNilAt(int i)
++           {
++               return (isValidIds == false ||
++                       NULL == property_Ids ||
++                     NULL == (*property_Ids)[i]);
++            }
++
++           /**
++            * Set ids to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::setIdsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Ids == NULL ||
++                            isValidIds == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Ids->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Ids)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of ids is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Ids == NULL)
++                {
++                    isValidIds = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobID* element = (*property_Ids)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = false;
++                        (*property_Ids)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Ids)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for partialMatches by  Property Number 2
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::getProperty2()
++            {
++                return getPartialMatches();
++            }
++
++            /**
++             * getter for partialMatches.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::getPartialMatches()
++             {
++                return property_PartialMatches;
++             }
++
++            /**
++             * setter for partialMatches
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatus::setPartialMatches(
++                    bool  arg_PartialMatches)
++             {
++                
++
++                if(isValidPartialMatches &&
++                        arg_PartialMatches == property_PartialMatches)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetPartialMatches();
++
++                
++                        property_PartialMatches = arg_PartialMatches;
++                        isValidPartialMatches = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for partialMatches
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::resetPartialMatches()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPartialMatches = false; 
++               return true;
++           }
++
++           /**
++            * Check whether partialMatches is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::isPartialMatchesNil()
++           {
++               return !isValidPartialMatches;
++           }
++
++           /**
++            * Set partialMatches to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatus::setPartialMatchesNil()
++           {
++               return resetPartialMatches();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatusResponse.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatusResponse.cpp
+new file mode 100644
+index 0000000..aa9aff2
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobStatusResponse.cpp
+@@ -0,0 +1,780 @@
++
++
++        /**
++         * GetJobStatusResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobStatusResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobStatusResponse|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobStatusResponse::GetJobStatusResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Jobs  = NULL;
++              
++            isValidJobs  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobStatusResponse",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobStatusResponse::GetJobStatusResponse(std::vector<AviaryCommon::JobStatus*>* arg_Jobs)
++        {
++             
++                   qname = NULL;
++             
++               property_Jobs  = NULL;
++             
++            isValidJobs  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobStatusResponse",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Jobs = arg_Jobs;
++            
++        }
++        AviaryQuery::GetJobStatusResponse::~GetJobStatusResponse()
++        {
++            if (property_Jobs) {
++                while(!property_Jobs->empty()) delete property_Jobs->back(), property_Jobs->pop_back();
++                delete property_Jobs;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobStatusResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobStatusResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                       { 
++                    /*
++                     * building Jobs array
++                     */
++                       std::vector<AviaryCommon::JobStatus*>* arr_list =new std::vector<AviaryCommon::JobStatus*>();
++                   
++
++                     
++                     /*
++                      * building jobs element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "jobs", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("jobs", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobStatus* element = new AviaryCommon::JobStatus();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element jobs ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for jobs ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setJobs(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobStatusResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobStatusResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobStatusResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobStatusResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJobs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("jobs"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("jobs")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Jobs array
++                      */
++                     if (property_Jobs != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sjobs",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sjobs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Jobs->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobStatus* element = (*property_Jobs)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing jobs element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for jobs by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobStatus*>* WSF_CALL
++            AviaryQuery::GetJobStatusResponse::getProperty1()
++            {
++                return getJobs();
++            }
++
++            /**
++             * getter for jobs.
++             */
++            std::vector<AviaryCommon::JobStatus*>* WSF_CALL
++            AviaryQuery::GetJobStatusResponse::getJobs()
++             {
++                return property_Jobs;
++             }
++
++            /**
++             * setter for jobs
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatusResponse::setJobs(
++                    std::vector<AviaryCommon::JobStatus*>*  arg_Jobs)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidJobs &&
++                        arg_Jobs == property_Jobs)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Jobs->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Jobs)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetJobs();
++
++                
++                    if(NULL == arg_Jobs)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Jobs = arg_Jobs;
++                        if(non_nil_exists)
++                        {
++                            isValidJobs = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of jobs.
++             */
++            AviaryCommon::JobStatus* WSF_CALL
++            AviaryQuery::GetJobStatusResponse::getJobsAt(int i)
++            {
++                AviaryCommon::JobStatus* ret_val;
++                if(property_Jobs == NULL)
++                {
++                    return (AviaryCommon::JobStatus*)0;
++                }
++                ret_val =   (*property_Jobs)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of jobs.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobStatusResponse::setJobsAt(int i,
++                    AviaryCommon::JobStatus* arg_Jobs)
++            {
++                 AviaryCommon::JobStatus* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidJobs &&
++                    property_Jobs &&
++                  
++                    arg_Jobs == (*property_Jobs)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobStatus*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Jobs)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = true;
++                        (*property_Jobs)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Jobs)[i] = arg_Jobs;
++                  
++
++               isValidJobs = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to jobs.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatusResponse::addJobs(
++                    AviaryCommon::JobStatus* arg_Jobs)
++             {
++
++                
++                    if( NULL == arg_Jobs
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobStatus*>();
++                }
++              
++               property_Jobs->push_back(arg_Jobs);
++              
++                isValidJobs = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the jobs array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobStatusResponse::sizeofJobs()
++            {
++
++                if(property_Jobs == NULL)
++                {
++                    return 0;
++                }
++                return property_Jobs->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobStatusResponse::removeJobsAt(int i)
++            {
++                return setJobsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for jobs
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatusResponse::resetJobs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Jobs != NULL)
++                {
++                  std::vector<AviaryCommon::JobStatus*>::iterator it =  property_Jobs->begin();
++                  for( ; it <  property_Jobs->end() ; ++it)
++                  {
++                     AviaryCommon::JobStatus* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Jobs)
++                 delete property_Jobs;
++                
++               isValidJobs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether jobs is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatusResponse::isJobsNil()
++           {
++               return !isValidJobs;
++           }
++
++           /**
++            * Set jobs to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatusResponse::setJobsNil()
++           {
++               return resetJobs();
++           }
++
++           
++           /**
++            * Check whether jobs is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatusResponse::isJobsNilAt(int i)
++           {
++               return (isValidJobs == false ||
++                       NULL == property_Jobs ||
++                     NULL == (*property_Jobs)[i]);
++            }
++
++           /**
++            * Set jobs to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobStatusResponse::setJobsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Jobs == NULL ||
++                            isValidJobs == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Jobs->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Jobs)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of jobs is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Jobs == NULL)
++                {
++                    isValidJobs = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobStatus* element = (*property_Jobs)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = false;
++                        (*property_Jobs)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Jobs)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummary.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummary.cpp
+new file mode 100644
+index 0000000..f511bd0
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummary.cpp
+@@ -0,0 +1,984 @@
++
++
++        /**
++         * GetJobSummary.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobSummary.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobSummary|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobSummary::GetJobSummary()
++        {
++
++        
++            qname = NULL;
++        
++                property_Ids  = NULL;
++              
++            isValidIds  = false;
++        
++            isValidPartialMatches  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobSummary",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobSummary::GetJobSummary(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches)
++        {
++             
++                   qname = NULL;
++             
++               property_Ids  = NULL;
++             
++            isValidIds  = true;
++            
++            isValidPartialMatches  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobSummary",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Ids = arg_Ids;
++            
++                    property_PartialMatches = arg_PartialMatches;
++            
++        }
++        AviaryQuery::GetJobSummary::~GetJobSummary()
++        {
++            if (property_Ids) {
++                while(!property_Ids->empty()) delete property_Ids->back(), property_Ids->pop_back();
++                delete property_Ids;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobSummary::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobSummary : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++                       { 
++                    /*
++                     * building Ids array
++                     */
++                       std::vector<AviaryCommon::JobID*>* arr_list =new std::vector<AviaryCommon::JobID*>();
++                   
++
++                     
++                     /*
++                      * building ids element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "ids", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("ids", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobID* element = new AviaryCommon::JobID();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element ids ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for ids ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setIds(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "partialMatches"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "partialMatches", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "partialMatches");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setPartialMatches(true);
++                           }
++                           else
++                           {
++                               setPartialMatches(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobSummary::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobSummary::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobSummary::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobSummary", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidPartialMatches)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_PartialMatches)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("partialMatches")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "partialMatches",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIds)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ids"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ids")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Ids array
++                      */
++                     if (property_Ids != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sids",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sids>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Ids->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobID* element = (*property_Ids)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing ids element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidPartialMatches)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_PartialMatches)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "partialMatches", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ids by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobSummary::getProperty1()
++            {
++                return getIds();
++            }
++
++            /**
++             * getter for ids.
++             */
++            std::vector<AviaryCommon::JobID*>* WSF_CALL
++            AviaryQuery::GetJobSummary::getIds()
++             {
++                return property_Ids;
++             }
++
++            /**
++             * setter for ids
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::setIds(
++                    std::vector<AviaryCommon::JobID*>*  arg_Ids)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidIds &&
++                        arg_Ids == property_Ids)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Ids->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Ids)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetIds();
++
++                
++                    if(NULL == arg_Ids)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Ids = arg_Ids;
++                        if(non_nil_exists)
++                        {
++                            isValidIds = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of ids.
++             */
++            AviaryCommon::JobID* WSF_CALL
++            AviaryQuery::GetJobSummary::getIdsAt(int i)
++            {
++                AviaryCommon::JobID* ret_val;
++                if(property_Ids == NULL)
++                {
++                    return (AviaryCommon::JobID*)0;
++                }
++                ret_val =   (*property_Ids)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of ids.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobSummary::setIdsAt(int i,
++                    AviaryCommon::JobID* arg_Ids)
++            {
++                 AviaryCommon::JobID* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidIds &&
++                    property_Ids &&
++                  
++                    arg_Ids == (*property_Ids)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Ids)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = true;
++                        (*property_Ids)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Ids)[i] = arg_Ids;
++                  
++
++               isValidIds = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to ids.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::addIds(
++                    AviaryCommon::JobID* arg_Ids)
++             {
++
++                
++                    if( NULL == arg_Ids
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::JobID*>();
++                }
++              
++               property_Ids->push_back(arg_Ids);
++              
++                isValidIds = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the ids array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobSummary::sizeofIds()
++            {
++
++                if(property_Ids == NULL)
++                {
++                    return 0;
++                }
++                return property_Ids->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::removeIdsAt(int i)
++            {
++                return setIdsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for ids
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::resetIds()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Ids != NULL)
++                {
++                  std::vector<AviaryCommon::JobID*>::iterator it =  property_Ids->begin();
++                  for( ; it <  property_Ids->end() ; ++it)
++                  {
++                     AviaryCommon::JobID* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Ids)
++                 delete property_Ids;
++                
++               isValidIds = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ids is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::isIdsNil()
++           {
++               return !isValidIds;
++           }
++
++           /**
++            * Set ids to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::setIdsNil()
++           {
++               return resetIds();
++           }
++
++           
++           /**
++            * Check whether ids is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::isIdsNilAt(int i)
++           {
++               return (isValidIds == false ||
++                       NULL == property_Ids ||
++                     NULL == (*property_Ids)[i]);
++            }
++
++           /**
++            * Set ids to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::setIdsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Ids == NULL ||
++                            isValidIds == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Ids->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Ids)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of ids is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Ids == NULL)
++                {
++                    isValidIds = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobID* element = (*property_Ids)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = false;
++                        (*property_Ids)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Ids)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for partialMatches by  Property Number 2
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::getProperty2()
++            {
++                return getPartialMatches();
++            }
++
++            /**
++             * getter for partialMatches.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::getPartialMatches()
++             {
++                return property_PartialMatches;
++             }
++
++            /**
++             * setter for partialMatches
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummary::setPartialMatches(
++                    bool  arg_PartialMatches)
++             {
++                
++
++                if(isValidPartialMatches &&
++                        arg_PartialMatches == property_PartialMatches)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetPartialMatches();
++
++                
++                        property_PartialMatches = arg_PartialMatches;
++                        isValidPartialMatches = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for partialMatches
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::resetPartialMatches()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPartialMatches = false; 
++               return true;
++           }
++
++           /**
++            * Check whether partialMatches is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::isPartialMatchesNil()
++           {
++               return !isValidPartialMatches;
++           }
++
++           /**
++            * Set partialMatches to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummary::setPartialMatchesNil()
++           {
++               return resetPartialMatches();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummaryResponse.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummaryResponse.cpp
+new file mode 100644
+index 0000000..5c9c574
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetJobSummaryResponse.cpp
+@@ -0,0 +1,780 @@
++
++
++        /**
++         * GetJobSummaryResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetJobSummaryResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetJobSummaryResponse|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetJobSummaryResponse::GetJobSummaryResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Jobs  = NULL;
++              
++            isValidJobs  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetJobSummaryResponse",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetJobSummaryResponse::GetJobSummaryResponse(std::vector<AviaryCommon::JobSummary*>* arg_Jobs)
++        {
++             
++                   qname = NULL;
++             
++               property_Jobs  = NULL;
++             
++            isValidJobs  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetJobSummaryResponse",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Jobs = arg_Jobs;
++            
++        }
++        AviaryQuery::GetJobSummaryResponse::~GetJobSummaryResponse()
++        {
++            if (property_Jobs) {
++                while(!property_Jobs->empty()) delete property_Jobs->back(), property_Jobs->pop_back();
++                delete property_Jobs;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetJobSummaryResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetJobSummaryResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                       { 
++                    /*
++                     * building Jobs array
++                     */
++                       std::vector<AviaryCommon::JobSummary*>* arr_list =new std::vector<AviaryCommon::JobSummary*>();
++                   
++
++                     
++                     /*
++                      * building jobs element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "jobs", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("jobs", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::JobSummary* element = new AviaryCommon::JobSummary();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element jobs ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for jobs ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setJobs(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetJobSummaryResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetJobSummaryResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetJobSummaryResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetJobSummaryResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidJobs)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("jobs"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("jobs")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Jobs array
++                      */
++                     if (property_Jobs != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sjobs",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sjobs>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Jobs->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::JobSummary* element = (*property_Jobs)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing jobs element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for jobs by  Property Number 1
++             */
++            std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::getProperty1()
++            {
++                return getJobs();
++            }
++
++            /**
++             * getter for jobs.
++             */
++            std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::getJobs()
++             {
++                return property_Jobs;
++             }
++
++            /**
++             * setter for jobs
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::setJobs(
++                    std::vector<AviaryCommon::JobSummary*>*  arg_Jobs)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidJobs &&
++                        arg_Jobs == property_Jobs)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Jobs->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"jobs has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Jobs)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetJobs();
++
++                
++                    if(NULL == arg_Jobs)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Jobs = arg_Jobs;
++                        if(non_nil_exists)
++                        {
++                            isValidJobs = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of jobs.
++             */
++            AviaryCommon::JobSummary* WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::getJobsAt(int i)
++            {
++                AviaryCommon::JobSummary* ret_val;
++                if(property_Jobs == NULL)
++                {
++                    return (AviaryCommon::JobSummary*)0;
++                }
++                ret_val =   (*property_Jobs)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of jobs.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::setJobsAt(int i,
++                    AviaryCommon::JobSummary* arg_Jobs)
++            {
++                 AviaryCommon::JobSummary* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidJobs &&
++                    property_Jobs &&
++                  
++                    arg_Jobs == (*property_Jobs)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobSummary*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Jobs)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = true;
++                        (*property_Jobs)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Jobs)[i] = arg_Jobs;
++                  
++
++               isValidJobs = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to jobs.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::addJobs(
++                    AviaryCommon::JobSummary* arg_Jobs)
++             {
++
++                
++                    if( NULL == arg_Jobs
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Jobs == NULL)
++                {
++                    property_Jobs = new std::vector<AviaryCommon::JobSummary*>();
++                }
++              
++               property_Jobs->push_back(arg_Jobs);
++              
++                isValidJobs = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the jobs array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::sizeofJobs()
++            {
++
++                if(property_Jobs == NULL)
++                {
++                    return 0;
++                }
++                return property_Jobs->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetJobSummaryResponse::removeJobsAt(int i)
++            {
++                return setJobsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for jobs
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummaryResponse::resetJobs()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Jobs != NULL)
++                {
++                  std::vector<AviaryCommon::JobSummary*>::iterator it =  property_Jobs->begin();
++                  for( ; it <  property_Jobs->end() ; ++it)
++                  {
++                     AviaryCommon::JobSummary* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Jobs)
++                 delete property_Jobs;
++                
++               isValidJobs = false; 
++               return true;
++           }
++
++           /**
++            * Check whether jobs is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummaryResponse::isJobsNil()
++           {
++               return !isValidJobs;
++           }
++
++           /**
++            * Set jobs to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummaryResponse::setJobsNil()
++           {
++               return resetJobs();
++           }
++
++           
++           /**
++            * Check whether jobs is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummaryResponse::isJobsNilAt(int i)
++           {
++               return (isValidJobs == false ||
++                       NULL == property_Jobs ||
++                     NULL == (*property_Jobs)[i]);
++            }
++
++           /**
++            * Set jobs to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetJobSummaryResponse::setJobsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Jobs == NULL ||
++                            isValidJobs == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Jobs->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Jobs)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of jobs is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Jobs == NULL)
++                {
++                    isValidJobs = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::JobSummary* element = (*property_Jobs)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidJobs = false;
++                        (*property_Jobs)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Jobs)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummary.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummary.cpp
+new file mode 100644
+index 0000000..beb6ed6
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummary.cpp
+@@ -0,0 +1,1167 @@
++
++
++        /**
++         * GetSubmissionSummary.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetSubmissionSummary.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetSubmissionSummary|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetSubmissionSummary::GetSubmissionSummary()
++        {
++
++        
++            qname = NULL;
++        
++                property_Ids  = NULL;
++              
++            isValidIds  = false;
++        
++            isValidPartialMatches  = false;
++        
++            isValidIncludeJobSummaries  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetSubmissionSummary",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetSubmissionSummary::GetSubmissionSummary(std::vector<AviaryCommon::SubmissionID*>* arg_Ids,bool arg_PartialMatches,bool arg_IncludeJobSummaries)
++        {
++             
++                   qname = NULL;
++             
++               property_Ids  = NULL;
++             
++            isValidIds  = true;
++            
++            isValidPartialMatches  = true;
++            
++            isValidIncludeJobSummaries  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetSubmissionSummary",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Ids = arg_Ids;
++            
++                    property_PartialMatches = arg_PartialMatches;
++            
++                    property_IncludeJobSummaries = arg_IncludeJobSummaries;
++            
++        }
++        AviaryQuery::GetSubmissionSummary::~GetSubmissionSummary()
++        {
++            if (property_Ids) {
++                while(!property_Ids->empty()) delete property_Ids->back(), property_Ids->pop_back();
++                delete property_Ids;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetSubmissionSummary::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetSubmissionSummary : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++                       { 
++                    /*
++                     * building Ids array
++                     */
++                       std::vector<AviaryCommon::SubmissionID*>* arr_list =new std::vector<AviaryCommon::SubmissionID*>();
++                   
++
++                     
++                     /*
++                      * building ids element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "ids", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("ids", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element ids ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for ids ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setIds(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "partialMatches"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "partialMatches", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "partialMatches");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setPartialMatches(true);
++                           }
++                           else
++                           {
++                               setPartialMatches(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "includeJobSummaries"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "includeJobSummaries", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "includeJobSummaries");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setIncludeJobSummaries(true);
++                           }
++                           else
++                           {
++                               setIncludeJobSummaries(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetSubmissionSummary::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetSubmissionSummary::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetSubmissionSummary::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetSubmissionSummary", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidPartialMatches)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_PartialMatches)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("partialMatches")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "partialMatches",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++                if(isValidIncludeJobSummaries)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_IncludeJobSummaries)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("includeJobSummaries")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "includeJobSummaries",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++            }
++            
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidIds)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("ids"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ids")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Ids array
++                      */
++                     if (property_Ids != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%sids",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%sids>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Ids->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::SubmissionID* element = (*property_Ids)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing ids element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidPartialMatches)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_PartialMatches)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "partialMatches", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidIncludeJobSummaries)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_IncludeJobSummaries)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "includeJobSummaries", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for ids by  Property Number 1
++             */
++            std::vector<AviaryCommon::SubmissionID*>* WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getProperty1()
++            {
++                return getIds();
++            }
++
++            /**
++             * getter for ids.
++             */
++            std::vector<AviaryCommon::SubmissionID*>* WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getIds()
++             {
++                return property_Ids;
++             }
++
++            /**
++             * setter for ids
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::setIds(
++                    std::vector<AviaryCommon::SubmissionID*>*  arg_Ids)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidIds &&
++                        arg_Ids == property_Ids)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Ids->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Ids)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetIds();
++
++                
++                    if(NULL == arg_Ids)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Ids = arg_Ids;
++                        if(non_nil_exists)
++                        {
++                            isValidIds = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of ids.
++             */
++            AviaryCommon::SubmissionID* WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getIdsAt(int i)
++            {
++                AviaryCommon::SubmissionID* ret_val;
++                if(property_Ids == NULL)
++                {
++                    return (AviaryCommon::SubmissionID*)0;
++                }
++                ret_val =   (*property_Ids)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of ids.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::setIdsAt(int i,
++                    AviaryCommon::SubmissionID* arg_Ids)
++            {
++                 AviaryCommon::SubmissionID* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidIds &&
++                    property_Ids &&
++                  
++                    arg_Ids == (*property_Ids)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::SubmissionID*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Ids)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = true;
++                        (*property_Ids)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Ids)[i] = arg_Ids;
++                  
++
++               isValidIds = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to ids.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::addIds(
++                    AviaryCommon::SubmissionID* arg_Ids)
++             {
++
++                
++                    if( NULL == arg_Ids
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Ids == NULL)
++                {
++                    property_Ids = new std::vector<AviaryCommon::SubmissionID*>();
++                }
++              
++               property_Ids->push_back(arg_Ids);
++              
++                isValidIds = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the ids array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetSubmissionSummary::sizeofIds()
++            {
++
++                if(property_Ids == NULL)
++                {
++                    return 0;
++                }
++                return property_Ids->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::removeIdsAt(int i)
++            {
++                return setIdsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for ids
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::resetIds()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Ids != NULL)
++                {
++                  std::vector<AviaryCommon::SubmissionID*>::iterator it =  property_Ids->begin();
++                  for( ; it <  property_Ids->end() ; ++it)
++                  {
++                     AviaryCommon::SubmissionID* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Ids)
++                 delete property_Ids;
++                
++               isValidIds = false; 
++               return true;
++           }
++
++           /**
++            * Check whether ids is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::isIdsNil()
++           {
++               return !isValidIds;
++           }
++
++           /**
++            * Set ids to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::setIdsNil()
++           {
++               return resetIds();
++           }
++
++           
++           /**
++            * Check whether ids is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::isIdsNilAt(int i)
++           {
++               return (isValidIds == false ||
++                       NULL == property_Ids ||
++                     NULL == (*property_Ids)[i]);
++            }
++
++           /**
++            * Set ids to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::setIdsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Ids == NULL ||
++                            isValidIds == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Ids->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Ids)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of ids is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Ids == NULL)
++                {
++                    isValidIds = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::SubmissionID* element = (*property_Ids)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidIds = false;
++                        (*property_Ids)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Ids)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
++            /**
++             * Getter for partialMatches by  Property Number 2
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getProperty2()
++            {
++                return getPartialMatches();
++            }
++
++            /**
++             * getter for partialMatches.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getPartialMatches()
++             {
++                return property_PartialMatches;
++             }
++
++            /**
++             * setter for partialMatches
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::setPartialMatches(
++                    bool  arg_PartialMatches)
++             {
++                
++
++                if(isValidPartialMatches &&
++                        arg_PartialMatches == property_PartialMatches)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetPartialMatches();
++
++                
++                        property_PartialMatches = arg_PartialMatches;
++                        isValidPartialMatches = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for partialMatches
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::resetPartialMatches()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidPartialMatches = false; 
++               return true;
++           }
++
++           /**
++            * Check whether partialMatches is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::isPartialMatchesNil()
++           {
++               return !isValidPartialMatches;
++           }
++
++           /**
++            * Set partialMatches to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::setPartialMatchesNil()
++           {
++               return resetPartialMatches();
++           }
++
++           
++
++            /**
++             * Getter for includeJobSummaries by  Property Number 3
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getProperty3()
++            {
++                return getIncludeJobSummaries();
++            }
++
++            /**
++             * getter for includeJobSummaries.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::getIncludeJobSummaries()
++             {
++                return property_IncludeJobSummaries;
++             }
++
++            /**
++             * setter for includeJobSummaries
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummary::setIncludeJobSummaries(
++                    bool  arg_IncludeJobSummaries)
++             {
++                
++
++                if(isValidIncludeJobSummaries &&
++                        arg_IncludeJobSummaries == property_IncludeJobSummaries)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetIncludeJobSummaries();
++
++                
++                        property_IncludeJobSummaries = arg_IncludeJobSummaries;
++                        isValidIncludeJobSummaries = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for includeJobSummaries
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::resetIncludeJobSummaries()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidIncludeJobSummaries = false; 
++               return true;
++           }
++
++           /**
++            * Check whether includeJobSummaries is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::isIncludeJobSummariesNil()
++           {
++               return !isValidIncludeJobSummaries;
++           }
++
++           /**
++            * Set includeJobSummaries to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummary::setIncludeJobSummariesNil()
++           {
++               return resetIncludeJobSummaries();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummaryResponse.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummaryResponse.cpp
+new file mode 100644
+index 0000000..b04a16c
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_GetSubmissionSummaryResponse.cpp
+@@ -0,0 +1,780 @@
++
++
++        /**
++         * GetSubmissionSummaryResponse.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_GetSubmissionSummaryResponse.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++               /*
++                * Implementation of the GetSubmissionSummaryResponse|http://query.aviary.grid.redhat.com Element
++                */
++           AviaryQuery::GetSubmissionSummaryResponse::GetSubmissionSummaryResponse()
++        {
++
++        
++            qname = NULL;
++        
++                property_Submissions  = NULL;
++              
++            isValidSubmissions  = false;
++        
++                  qname =  axutil_qname_create (Environment::getEnv(),
++                        "GetSubmissionSummaryResponse",
++                        "http://query.aviary.grid.redhat.com",
++                        NULL);
++                
++        }
++
++       AviaryQuery::GetSubmissionSummaryResponse::GetSubmissionSummaryResponse(std::vector<AviaryCommon::SubmissionSummary*>* arg_Submissions)
++        {
++             
++                   qname = NULL;
++             
++               property_Submissions  = NULL;
++             
++            isValidSubmissions  = true;
++            
++                 qname =  axutil_qname_create (Environment::getEnv(),
++                       "GetSubmissionSummaryResponse",
++                       "http://query.aviary.grid.redhat.com",
++                       NULL);
++               
++                    property_Submissions = arg_Submissions;
++            
++        }
++        AviaryQuery::GetSubmissionSummaryResponse::~GetSubmissionSummaryResponse()
++        {
++            if (property_Submissions) {
++                while(!property_Submissions->empty()) delete property_Submissions->back(), property_Submissions->pop_back();
++                delete property_Submissions;
++            }
++            axutil_qname_free(qname,Environment::getEnv());
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::GetSubmissionSummaryResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++               int i = 0;
++            
++               int sequence_broken = 0;
++               axiom_node_t *tmp_node = NULL;
++            
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++
++                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                    mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
++                    if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
++                    {
++                        
++                          first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                          
++                    }
++                    else
++                    {
++                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
++                              "Failed in building adb object for GetSubmissionSummaryResponse : "
++                              "Expected %s but returned %s",
++                              axutil_qname_to_string(qname, Environment::getEnv()),
++                              axutil_qname_to_string(mqname, Environment::getEnv()));
++                        
++                        return AXIS2_FAILURE;
++                    }
++                    
++                       { 
++                    /*
++                     * building Submissions array
++                     */
++                       std::vector<AviaryCommon::SubmissionSummary*>* arr_list =new std::vector<AviaryCommon::SubmissionSummary*>();
++                   
++
++                     
++                     /*
++                      * building submissions element
++                      */
++                     
++                     
++                     
++                                    element_qname = axutil_qname_create(Environment::getEnv(), "submissions", NULL, NULL);
++                                  
++                               
++                               for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
++                                             
++                               {
++                                  if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
++                                  {
++                                     current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                     is_early_node_valid = false;
++                                     continue;
++                                  }
++                                  
++                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                                  mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
++
++                                  if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submissions", axiom_element_get_localname(current_element, Environment::getEnv())))
++                                  {
++                                  
++                                      is_early_node_valid = true;
++                                      
++                                     AviaryCommon::SubmissionSummary* element = new AviaryCommon::SubmissionSummary();
++                                          
++                                          status =  element->deserialize(&current_node, &is_early_node_valid, false);
++                                          
++                                          if(AXIS2_FAILURE ==  status)
++                                          {
++					  WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element submissions ");
++                                          }
++                                          else
++                                          {
++                                            arr_list->push_back(element);
++                                            
++                                          }
++                                        
++                                     if(AXIS2_FAILURE ==  status)
++                                     {
++                                         WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for submissions ");
++                                         if(element_qname)
++                                         {
++                                            axutil_qname_free(element_qname, Environment::getEnv());
++                                         }
++                                         if(arr_list)
++                                         {
++                                            delete arr_list;
++                                         }
++                                         return false;
++                                     }
++
++                                     i++;
++                                    current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
++                                  }
++                                  else
++                                  {
++                                      is_early_node_valid = false;
++                                      sequence_broken = 1;
++                                  }
++                                  
++                               }
++
++                               
++                                   if (i < 0)
++                                   {
++                                     /* found element out of order */
++                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"submissions (@minOccurs = '0') only have %d elements", i);
++                                     if(element_qname)
++                                     {
++                                        axutil_qname_free(element_qname, Environment::getEnv());
++                                     }
++                                     if(arr_list)
++                                     {
++                                        delete arr_list;
++                                     }
++                                     return false;
++                                   }
++                               
++
++                               if(0 == arr_list->size())
++                               {
++                                    delete arr_list;
++                               }
++                               else
++                               {
++                                    status = setSubmissions(arr_list);
++                               }
++
++                              
++                            } 
++                        
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::GetSubmissionSummaryResponse::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::GetSubmissionSummaryResponse::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::GetSubmissionSummaryResponse::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++               int i = 0;
++               int count = 0;
++               void *element = NULL;
++             
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++               axis2_char_t *start_input_str = NULL;
++               axis2_char_t *end_input_str = NULL;
++               unsigned int start_input_str_len = 0;
++               unsigned int end_input_str_len = 0;
++            
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++             
++                int next_ns_index_value = 0;
++             
++                    namespaces = axutil_hash_make(Environment::getEnv());
++                    next_ns_index = &next_ns_index_value;
++                     
++                           ns1 = axiom_namespace_create (Environment::getEnv(),
++                                             "http://query.aviary.grid.redhat.com",
++                                             "n"); 
++                           axutil_hash_set(namespaces, "http://query.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
++                       
++                     
++                    parent_element = axiom_element_create (Environment::getEnv(), NULL, "GetSubmissionSummaryResponse", ns1 , &parent);
++                    
++                    
++                    axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
++
++
++            
++                    data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
++                  
++                       p_prefix = NULL;
++                      
++
++                   if (!isValidSubmissions)
++                   {
++                      
++                           /* no need to complain for minoccurs=0 element */
++                            
++                          
++                   }
++                   else
++                   {
++                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (4 + axutil_strlen(p_prefix) + 
++                                  axutil_strlen("submissions"))); 
++                                 
++                                 /* axutil_strlen("<:>") + 1 = 4 */
++                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
++                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("submissions")));
++                                  /* axutil_strlen("</:>") + 1 = 5 */
++                                  
++                     
++
++                   
++                   
++                     /*
++                      * Parsing Submissions array
++                      */
++                     if (property_Submissions != NULL)
++                     {
++                        
++
++                            sprintf(start_input_str, "<%s%ssubmissions",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                            
++                         start_input_str_len = axutil_strlen(start_input_str);
++
++                         sprintf(end_input_str, "</%s%ssubmissions>",
++                                 p_prefix?p_prefix:"",
++                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
++                         end_input_str_len = axutil_strlen(end_input_str);
++
++                         count = property_Submissions->size();
++                         for(i = 0; i < count; i++)
++                         {
++                            AviaryCommon::SubmissionSummary* element = (*property_Submissions)[i];
++
++                            if(NULL == element) 
++                            {
++                                continue;
++                            }
++
++                    
++                     
++                     /*
++                      * parsing submissions element
++                      */
++
++                    
++                     
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
++                            }
++                            element->serialize(current_node, parent_element,
++                                                                                 element->isParticle() || false, namespaces, next_ns_index);
++                            
++                            if(!element->isParticle())
++                            {
++                                axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
++                            }
++                            
++                         }
++                     }
++                   
++                     
++                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
++                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
++                 } 
++
++                 
++                   if(namespaces)
++                   {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, NULL, NULL, &val);
++                           AXIS2_FREE(Environment::getEnv()->allocator, val);
++                       }
++                       axutil_hash_free(namespaces, Environment::getEnv());
++                   }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for submissions by  Property Number 1
++             */
++            std::vector<AviaryCommon::SubmissionSummary*>* WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::getProperty1()
++            {
++                return getSubmissions();
++            }
++
++            /**
++             * getter for submissions.
++             */
++            std::vector<AviaryCommon::SubmissionSummary*>* WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::getSubmissions()
++             {
++                return property_Submissions;
++             }
++
++            /**
++             * setter for submissions
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::setSubmissions(
++                    std::vector<AviaryCommon::SubmissionSummary*>*  arg_Submissions)
++             {
++                
++                 int size = 0;
++                 int i = 0;
++                 bool non_nil_exists = false;
++                
++
++                if(isValidSubmissions &&
++                        arg_Submissions == property_Submissions)
++                {
++                    
++                    return true;
++                }
++
++                
++                 size = arg_Submissions->size();
++                 
++                 if (size < 0)
++                 {
++                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"submissions has less than minOccurs(0)");
++                     return false;
++                 }
++                 for(i = 0; i < size; i ++ )
++                 {
++                     if(NULL != (*arg_Submissions)[i])
++                     {
++                         non_nil_exists = true;
++                         break;
++                     }
++                 }
++
++                 
++
++                
++                resetSubmissions();
++
++                
++                    if(NULL == arg_Submissions)
++                         
++                {
++                    /* We are already done */
++                    return true;
++                }
++                
++                        property_Submissions = arg_Submissions;
++                        if(non_nil_exists)
++                        {
++                            isValidSubmissions = true;
++                        }
++                        
++                    
++                return true;
++             }
++
++            
++            /**
++             * Get ith element of submissions.
++             */
++            AviaryCommon::SubmissionSummary* WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::getSubmissionsAt(int i)
++            {
++                AviaryCommon::SubmissionSummary* ret_val;
++                if(property_Submissions == NULL)
++                {
++                    return (AviaryCommon::SubmissionSummary*)0;
++                }
++                ret_val =   (*property_Submissions)[i];
++                
++                    return ret_val;
++                  
++            }
++
++            /**
++             * Set the ith element of submissions.
++             */
++           bool WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::setSubmissionsAt(int i,
++                    AviaryCommon::SubmissionSummary* arg_Submissions)
++            {
++                 AviaryCommon::SubmissionSummary* element;
++                int size = 0;
++
++                int non_nil_count;
++                bool non_nil_exists = false;
++
++                 
++
++                if( isValidSubmissions &&
++                    property_Submissions &&
++                  
++                    arg_Submissions == (*property_Submissions)[i])
++                  
++                 {
++                    
++                    return AXIS2_SUCCESS; 
++                }
++
++                   
++                     non_nil_exists = true;
++                  
++
++                if(property_Submissions == NULL)
++                {
++                    property_Submissions = new std::vector<AviaryCommon::SubmissionSummary*>();
++                }
++                else{
++                /* check whether there already exist an element */
++                element = (*property_Submissions)[i];
++                }
++
++                
++                        if(NULL != element)
++                        {
++                          
++                          
++                          
++                                delete element;
++                             
++                        }
++                        
++                    
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidSubmissions = true;
++                        (*property_Submissions)[i]= NULL;
++                        
++                        return AXIS2_SUCCESS;
++                    }
++                
++                    (*property_Submissions)[i] = arg_Submissions;
++                  
++
++               isValidSubmissions = true;
++                
++                return AXIS2_SUCCESS;
++            }
++
++            /**
++             * Add to submissions.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::addSubmissions(
++                    AviaryCommon::SubmissionSummary* arg_Submissions)
++             {
++
++                
++                    if( NULL == arg_Submissions
++                     )
++                    {
++                      
++                           return true; 
++                        
++                    }
++                  
++
++                if(property_Submissions == NULL)
++                {
++                    property_Submissions = new std::vector<AviaryCommon::SubmissionSummary*>();
++                }
++              
++               property_Submissions->push_back(arg_Submissions);
++              
++                isValidSubmissions = true;
++                return true;
++             }
++
++            /**
++             * Get the size of the submissions array.
++             */
++            int WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::sizeofSubmissions()
++            {
++
++                if(property_Submissions == NULL)
++                {
++                    return 0;
++                }
++                return property_Submissions->size();
++            }
++
++            /**
++             * remove the ith element, same as set_nil_at.
++             */
++            bool WSF_CALL
++            AviaryQuery::GetSubmissionSummaryResponse::removeSubmissionsAt(int i)
++            {
++                return setSubmissionsNilAt(i);
++            }
++
++            
++
++           /**
++            * resetter for submissions
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummaryResponse::resetSubmissions()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++                if (property_Submissions != NULL)
++                {
++                  std::vector<AviaryCommon::SubmissionSummary*>::iterator it =  property_Submissions->begin();
++                  for( ; it <  property_Submissions->end() ; ++it)
++                  {
++                     AviaryCommon::SubmissionSummary* element = *it;
++                
++            
++                
++
++                if(element != NULL)
++                {
++                   
++                   
++                         delete  element;
++                     
++
++                   }
++
++                
++                
++                
++               }
++
++             }
++                
++                    if(NULL != property_Submissions)
++                 delete property_Submissions;
++                
++               isValidSubmissions = false; 
++               return true;
++           }
++
++           /**
++            * Check whether submissions is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummaryResponse::isSubmissionsNil()
++           {
++               return !isValidSubmissions;
++           }
++
++           /**
++            * Set submissions to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummaryResponse::setSubmissionsNil()
++           {
++               return resetSubmissions();
++           }
++
++           
++           /**
++            * Check whether submissions is nill at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummaryResponse::isSubmissionsNilAt(int i)
++           {
++               return (isValidSubmissions == false ||
++                       NULL == property_Submissions ||
++                     NULL == (*property_Submissions)[i]);
++            }
++
++           /**
++            * Set submissions to nil at i
++            */
++           bool WSF_CALL
++           AviaryQuery::GetSubmissionSummaryResponse::setSubmissionsNilAt(int i)
++           {
++                int size = 0;
++                int j;
++                bool non_nil_exists = false;
++
++                int k = 0;
++
++                if(property_Submissions == NULL ||
++                            isValidSubmissions == false)
++                {
++                    
++                    non_nil_exists = false;
++                }
++                else
++                {
++                    size = property_Submissions->size();
++                    for(j = 0, k = 0; j < size; j ++ )
++                    {
++                        if(i == j) continue; 
++                        if(NULL != (*property_Submissions)[i])
++                        {
++                            k++;
++                            non_nil_exists = true;
++                            if( k >= 0)
++                            {
++                                break;
++                            }
++                        }
++                    }
++                }
++                
++
++                if( k < 0)
++                {
++                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of submissions is beinng set to be smaller than the specificed number of minOccurs(0)");
++                       return AXIS2_FAILURE;
++                }
++ 
++                if(property_Submissions == NULL)
++                {
++                    isValidSubmissions = false;
++                    
++                    return true;
++                }
++                 
++                 /* check whether there already exist an element */
++                 AviaryCommon::SubmissionSummary* element = (*property_Submissions)[i];
++                if(NULL != element)
++                {
++                  
++                  
++                  
++                        delete element;
++                     
++                 }
++                 
++                    if(!non_nil_exists)
++                    {
++                        
++                        isValidSubmissions = false;
++                        (*property_Submissions)[i] = NULL;
++                        return AXIS2_SUCCESS;
++                    }
++                
++
++                
++                (*property_Submissions)[i] = NULL;
++                
++                return AXIS2_SUCCESS;
++
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_QueryRequestType.cpp b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_QueryRequestType.cpp
+new file mode 100644
+index 0000000..f59b227
+--- /dev/null
++++ b/src/condor_contrib/aviary/codegen/query/src/AviaryQuery_QueryRequestType.cpp
+@@ -0,0 +1,346 @@
++
++
++        /**
++         * QueryRequestType.cpp
++         *
++         * This file was auto-generated from WSDL
++         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
++         */
++
++        #include "AviaryQuery_QueryRequestType.h"
++        #include <Environment.h>
++        #include <WSFError.h>
++
++
++        using namespace wso2wsf;
++        using namespace std;
++        
++        using namespace AviaryQuery;
++        
++                /*
++                 * This type was generated from the piece of schema that had
++                 * name = QueryRequestType
++                 * Namespace URI = http://query.aviary.grid.redhat.com
++                 * Namespace Prefix = ns2
++                 */
++           AviaryQuery::QueryRequestType::QueryRequestType()
++        {
++
++        
++            isValidAllowPartialMatching  = false;
++        
++        }
++
++       AviaryQuery::QueryRequestType::QueryRequestType(bool arg_AllowPartialMatching)
++        {
++             
++            isValidAllowPartialMatching  = true;
++            
++                    property_AllowPartialMatching = arg_AllowPartialMatching;
++            
++        }
++        AviaryQuery::QueryRequestType::~QueryRequestType()
++        {
++
++        }
++
++        
++
++        bool WSF_CALL
++        AviaryQuery::QueryRequestType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
++        {
++          axiom_node_t *parent = *dp_parent;
++          
++          bool status = AXIS2_SUCCESS;
++          
++          axiom_attribute_t *parent_attri = NULL;
++          axiom_element_t *parent_element = NULL;
++          axis2_char_t *attrib_text = NULL;
++
++          axutil_hash_t *attribute_hash = NULL;
++
++           
++         const axis2_char_t* text_value = NULL;
++         axutil_qname_t *mqname = NULL;
++          
++            axutil_qname_t *element_qname = NULL; 
++            
++               axiom_node_t *first_node = NULL;
++               bool is_early_node_valid = true;
++               axiom_node_t *current_node = NULL;
++               axiom_element_t *current_element = NULL;
++            
++              
++              while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
++              {
++                  parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
++              }
++              if (NULL == parent)
++              {   
++                return AXIS2_FAILURE;
++              }
++              
++                      
++                      first_node = axiom_node_get_first_child(parent, Environment::getEnv());
++                      
++                    
++                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
++                 attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv());
++              
++                
++                
++                  parent_attri = NULL;
++                  attrib_text = NULL;
++                  if(attribute_hash)
++                  {
++                       axutil_hash_index_t *hi;
++                       void *val;
++                       const void *key;
++
++                       for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
++                       {
++                           axutil_hash_this(hi, &key, NULL, &val);
++                           
++                           
++                               if(!strcmp((axis2_char_t*)key, "allowPartialMatching"))
++                             
++                               {
++                                   parent_attri = (axiom_attribute_t*)val;
++                                   break;
++                               }
++                       }
++                  }
++
++                  if(parent_attri)
++                  {
++                    attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv());
++                  }
++                  else
++                  {
++                    /* this is hoping that attribute is stored in "allowPartialMatching", this happnes when name is in default namespace */
++                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "allowPartialMatching");
++                  }
++
++                  if(attrib_text != NULL)
++                  {
++                      
++                      
++                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
++                           {
++                               setAllowPartialMatching(true);
++                           }
++                           else
++                           {
++                               setAllowPartialMatching(false);
++                           }
++                        
++                    }
++                  
++                  if(element_qname)
++                  {
++                     axutil_qname_free(element_qname, Environment::getEnv());
++                     element_qname = NULL;
++                  }
++                 
++          return status;
++       }
++
++          bool WSF_CALL
++          AviaryQuery::QueryRequestType::isParticle()
++          {
++            
++                 return false;
++              
++          }
++
++
++          void WSF_CALL
++          AviaryQuery::QueryRequestType::declareParentNamespaces(
++                    axiom_element_t *parent_element,
++                    axutil_hash_t *namespaces, int *next_ns_index)
++          {
++            
++                  /* Here this is an empty function, Nothing to declare */
++                 
++          }
++
++        
++        
++        axiom_node_t* WSF_CALL
++	AviaryQuery::QueryRequestType::serialize(axiom_node_t *parent, 
++			axiom_element_t *parent_element, 
++			int parent_tag_closed, 
++			axutil_hash_t *namespaces, 
++			int *next_ns_index)
++        {
++            
++            
++               axiom_attribute_t *text_attri = NULL;
++             
++             axis2_char_t *string_to_stream;
++            
++         
++         axiom_node_t *current_node = NULL;
++         int tag_closed = 0;
++
++         
++         
++                axiom_namespace_t *ns1 = NULL;
++
++                axis2_char_t *qname_uri = NULL;
++                axis2_char_t *qname_prefix = NULL;
++                axis2_char_t *p_prefix = NULL;
++            
++                    axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
++                    
++                axis2_char_t *text_value = NULL;
++             
++            
++               axiom_data_source_t *data_source = NULL;
++               axutil_stream_t *stream = NULL;
++
++            
++                    current_node = parent;
++                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
++                    if (!data_source)
++                        return NULL;
++                    stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
++                    if (!stream)
++                        return NULL;
++                  
++            if(!parent_tag_closed)
++            {
++            
++                if(isValidAllowPartialMatching)
++                {
++                
++                        p_prefix = NULL;
++                      
++                           
++                           text_value = (axis2_char_t*)((property_AllowPartialMatching)?"true":"false");
++                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (Environment::getEnv()-> allocator, sizeof (axis2_char_t) *
++                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
++                                                             axutil_strlen(text_value) + 
++                                                             axutil_strlen("allowPartialMatching")));
++                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
++                                                "allowPartialMatching",  text_value);
++                           axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++                           AXIS2_FREE(Environment::getEnv()-> allocator, string_to_stream);
++                        
++                   }
++                   
++              string_to_stream = ">"; 
++              axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
++              tag_closed = 1;
++            
++            }
++            
++                    
++                    if(parent_tag_closed)
++                    {
++                       if(isValidAllowPartialMatching)
++                       {
++                       
++                           p_prefix = NULL;
++                           ns1 = NULL;
++                         
++                           
++                           text_value =  (axis2_char_t*)((property_AllowPartialMatching)?axutil_strdup(Environment::getEnv(), "true"):axutil_strdup(Environment::getEnv(), "false"));
++                           text_attri = axiom_attribute_create (Environment::getEnv(), "allowPartialMatching", text_value, ns1);
++                           axiom_element_add_attribute (parent_element, Environment::getEnv(), text_attri, parent);
++                           AXIS2_FREE(Environment::getEnv()->allocator, text_value);
++                        
++                      }
++                       
++                  }
++                
++
++            return parent;
++        }
++
++
++        
++
++            /**
++             * Getter for allowPartialMatching by  Property Number 1
++             */
++            bool WSF_CALL
++            AviaryQuery::QueryRequestType::getProperty1()
++            {
++                return getAllowPartialMatching();
++            }
++
++            /**
++             * getter for allowPartialMatching.
++             */
++            bool WSF_CALL
++            AviaryQuery::QueryRequestType::getAllowPartialMatching()
++             {
++                return property_AllowPartialMatching;
++             }
++
++            /**
++             * setter for allowPartialMatching
++             */
++            bool WSF_CALL
++            AviaryQuery::QueryRequestType::setAllowPartialMatching(
++                    bool  arg_AllowPartialMatching)
++             {
++                
++
++                if(isValidAllowPartialMatching &&
++                        arg_AllowPartialMatching == property_AllowPartialMatching)
++                {
++                    
++                    return true;
++                }
++
++                
++
++                
++                resetAllowPartialMatching();
++
++                
++                        property_AllowPartialMatching = arg_AllowPartialMatching;
++                        isValidAllowPartialMatching = true;
++                    
++                return true;
++             }
++
++             
++
++           /**
++            * resetter for allowPartialMatching
++            */
++           bool WSF_CALL
++           AviaryQuery::QueryRequestType::resetAllowPartialMatching()
++           {
++               int i = 0;
++               int count = 0;
++
++
++               
++               isValidAllowPartialMatching = false; 
++               return true;
++           }
++
++           /**
++            * Check whether allowPartialMatching is nill
++            */
++           bool WSF_CALL
++           AviaryQuery::QueryRequestType::isAllowPartialMatchingNil()
++           {
++               return !isValidAllowPartialMatching;
++           }
++
++           /**
++            * Set allowPartialMatching to nill (currently the same as reset)
++            */
++           bool WSF_CALL
++           AviaryQuery::QueryRequestType::setAllowPartialMatchingNil()
++           {
++               return resetAllowPartialMatching();
++           }
++
++           
++
+diff --git a/src/condor_contrib/aviary/etc/61aviary.config b/src/condor_contrib/aviary/etc/61aviary.config
+new file mode 100644
+index 0000000..5fdc884
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/61aviary.config
+@@ -0,0 +1,34 @@
++# Base configuration for Aviary
++#
++# Included is the Schedd plugin, AviaryScheddPlugin-plugin.so, and the aviary_query_server
++
++# The general Aviary config file for Axis2
++# axis2.xml has parameters that point to lib and services dir
++WSFCPP_HOME=/var/lib/condor/aviary/axis2.xml
++
++# Aviary Schedd plugin, provides submission and job control endpoint
++SCHEDD.PLUGINS = $(SCHEDD.PLUGINS) $(LIB)/plugins/AviaryScheddPlugin-plugin.so
++
++# Port the Aviary Schedd plugin listens on, default 9090
++#SCHEDD.HTTP_PORT = 9090
++
++# Aviary query server, provides endpoint for job and submission queries
++QUERY_SERVER = $(SBIN)/aviary_query_server
++QUERY_SERVER_ARGS = -f
++QUERY_SERVER.QUERY_SERVER_LOG = $(LOG)/QueryServerLog
++QUERY_SERVER.QUERY_SERVER_DEBUG = D_ALWAYS
++DAEMON_LIST = $(DAEMON_LIST), QUERY_SERVER
++
++# Port the QueryServer listens on, default 9091
++#QUERY_SERVER.HTTP_PORT = 9091
++
++# HISTORY_INTERVAL specifies the number of seconds between polls of the HISTORY file, default 120
++#QUERY_SERVER.HISTORY_INTERVAL = 120
++
++# If there is more than one Schedd on the system or if the Schedd and
++# QueryServer reside on different systems, it is necessary to tell the
++# QueryServer the name of the Schedd it is working with via
++# QUERY_SERVER.SCHEDD_NAME. This allows the QueryServer to provide
++# fully-qualified job ids, i.e. cluster.proc:pool:scheduler. Default
++# is constructed in the same way the Schedd constructs its name.
++#QUERY_SERVER.SCHEDD_NAME =
+diff --git a/src/condor_contrib/aviary/etc/aviary-common.xsd b/src/condor_contrib/aviary/etc/aviary-common.xsd
+new file mode 100644
+index 0000000..30f20be
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/aviary-common.xsd
+@@ -0,0 +1,203 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://common.aviary.grid.redhat.com" targetNamespace="http://common.aviary.grid.redhat.com">
++	<!-- common types should make use of simple and complex types for reuse -->
++	<xs:simpleType name="StatusCodeType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="OK"/>
++			<xs:enumeration value="FAIL"/>
++			<xs:enumeration value="NO_MATCH"/>
++			<xs:enumeration value="INVALID_OFFSET"/>
++			<xs:enumeration value="UNIMPLEMENTED"/>
++			<xs:enumeration value="UNAVAILABLE"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="Status">
++		<xs:sequence>
++			<xs:element name="code" type="tns:StatusCodeType"/>
++			<xs:element name="text" type="xs:string" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="AttributeType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="INTEGER"/>
++			<xs:enumeration value="FLOAT"/>
++			<xs:enumeration value="STRING"/>
++			<xs:enumeration value="EXPRESSION"/>
++			<xs:enumeration value="BOOLEAN"/>
++			<xs:enumeration value="UNDEFINED"/>
++			<xs:enumeration value="ERROR"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="Attribute">
++		<xs:sequence>
++			<xs:element name="name" type="xs:string"/>
++			<xs:element name="type" type="tns:AttributeType"/>
++			<xs:element name="value" type="xs:string"/>
++		</xs:sequence>
++	</xs:complexType>
++	<!-- might just want to use the following just for returning data like in getJobDetails -->
++	<xs:complexType name="Attributes">
++		<xs:sequence>
++			<xs:element name="attrs" type="tns:Attribute" minOccurs="0" maxOccurs="unbounded"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="OSType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="LINUX"/>
++			<xs:enumeration value="WINDOWS"/>
++			<!-- can expand later -->
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:simpleType name="ArchType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="INTEL"/>
++			<xs:enumeration value="X86_64"/>
++			<!-- can expand later -->
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:simpleType name="ResourceConstraintType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="OS"/>
++			<xs:enumeration value="ARCH"/>
++			<xs:enumeration value="MEMORY"/>
++			<xs:enumeration value="DISK"/>
++			<xs:enumeration value="FILESYSTEM"/>
++			<!-- when we say MEMORY or DISK we always mean at least the amount provided -->
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="ResourceConstraint">
++		<xs:sequence>
++			<xs:element name="type" type="tns:ResourceConstraintType"/>
++			<xs:element name="value" type="xs:string"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="JobConstraintType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="CMD"/>
++			<xs:enumeration value="ARGS"/>
++			<xs:enumeration value="OWNER"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="JobConstraint">
++		<xs:sequence>
++			<xs:element name="type" type="tns:JobConstraintType"/>
++			<xs:element name="value" type="xs:string"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:complexType name="SubmissionID">
++		<xs:sequence>
++			<xs:element name="name" type="xs:string" minOccurs="0"/>
++			<xs:element name="owner" type="xs:string" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:complexType name="JobID">
++		<xs:sequence>
++			<xs:element name="job" type="xs:string"/>
++			<xs:element name="pool" type="xs:string" minOccurs="0"/>
++			<xs:element name="scheduler" type="xs:string" minOccurs="0"/>
++			<xs:element name="submission" type="tns:SubmissionID" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="JobStatusType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="IDLE"/>
++			<xs:enumeration value="RUNNING"/>
++			<xs:enumeration value="REMOVED"/>
++			<xs:enumeration value="COMPLETED"/>
++			<xs:enumeration value="HELD"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<!-- reuse through extension not available for the following related types -->
++	<xs:complexType name="JobStatus">
++		<xs:sequence>
++			<xs:element name="id" type="tns:JobID"/>
++			<xs:element name="status" type="tns:Status"/>
++			<xs:element name="job_status" type="tns:JobStatusType" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:complexType name="JobSummary">
++		<xs:sequence>
++			<xs:element name="id" type="tns:JobID"/>
++			<xs:element name="status" type="tns:Status"/>
++			<xs:element name="queued" type="xs:dateTime"/>
++			<xs:element name="last_update" type="xs:dateTime"/>
++			<xs:element name="job_status" type="tns:JobStatusType"/>
++			<xs:element name="cmd" type="xs:string"/>
++			<xs:element name="args1" type="xs:string" minOccurs="0"/>
++			<xs:element name="args2" type="xs:string" minOccurs="0"/>
++			<xs:element name="held" type="xs:string" minOccurs="0"/>
++			<xs:element name="released" type="xs:string" minOccurs="0"/>
++			<xs:element name="removed" type="xs:string" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++		<xs:complexType name="SubmissionSummary">
++		<xs:sequence>
++			<xs:element name="id" type="tns:SubmissionID"/>
++			<xs:element name="status" type="tns:Status"/>
++			<xs:element name="completed" type="xs:int"/>
++			<xs:element name="held" type="xs:int"/>
++			<xs:element name="idle" type="xs:int"/>
++			<xs:element name="removed" type="xs:int"/>
++			<xs:element name="running" type="xs:int"/>
++			<xs:element name="jobs" type="tns:JobSummary" minOccurs="0" maxOccurs="unbounded"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:complexType name="JobDetails">
++		<xs:sequence>
++			<xs:element name="id" type="tns:JobID"/>
++			<xs:element name="status" type="tns:Status"/>
++			<xs:element name="details" type="tns:Attributes" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="JobDataType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="ERR"/>
++			<xs:enumeration value="LOG"/>
++			<xs:enumeration value="OUT"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="JobData">
++		<xs:sequence>
++			<xs:element name="id" type="tns:JobID"/>
++			<xs:element name="type" type="tns:JobDataType"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:simpleType name="ResourceType">
++		<xs:restriction base="xs:string">
++			<xs:enumeration value="COLLECTOR"/>
++			<xs:enumeration value="EXECUTOR"/>
++			<xs:enumeration value="EVENT_SERVER"/>
++			<xs:enumeration value="JOB_SERVER"/>
++			<xs:enumeration value="LOW_LATENCY"/>
++			<xs:enumeration value="MASTER"/>
++			<xs:enumeration value="NEGOTIATOR"/>
++			<xs:enumeration value="SCHEDULER"/>
++			<xs:enumeration value="CUSTOM"/>
++		</xs:restriction>
++	</xs:simpleType>
++	<xs:complexType name="ResourceID">
++		<xs:sequence>
++			<xs:element name="subsystem_type" type="tns:ResourceType"/>
++			<xs:element name="pool" type="xs:string"/>
++			<xs:element name="name" type="xs:string"/>
++			<xs:element name="custom_name" type="xs:string" minOccurs="0"/>
++		</xs:sequence>
++	</xs:complexType>
++</xs:schema>
+diff --git a/src/condor_contrib/aviary/etc/aviary-job.wsdl b/src/condor_contrib/aviary/etc/aviary-job.wsdl
+new file mode 100644
+index 0000000..c401778
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/aviary-job.wsdl
+@@ -0,0 +1,130 @@
++<?xml version="1.0" encoding="UTF-8" standalone="no"?>
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://grid.redhat.com/aviary-job/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:job="http://job.aviary.grid.redhat.com" xmlns:ns="http://common.aviary.grid.redhat.com" targetNamespace="http://grid.redhat.com/aviary-job/" name="aviary-job">
++	<wsdl:types>
++		<xsd:schema targetNamespace="http://grid.redhat.com/aviary-job/">
++			<xsd:import schemaLocation="aviary-job.xsd" namespace="http://job.aviary.grid.redhat.com"/>
++		</xsd:schema>
++	</wsdl:types>
++	<wsdl:message name="SubmitJobRequest">
++		<wsdl:part name="parameters" element="job:SubmitJob"/>
++	</wsdl:message>
++	<wsdl:message name="SubmitJobResponse">
++		<wsdl:part name="parameters" element="job:SubmitJobResponse"/>
++	</wsdl:message>
++	<wsdl:message name="HoldJobRequest">
++		<wsdl:part name="parameters" element="job:HoldJob"/>
++	</wsdl:message>
++	<wsdl:message name="HoldJobResponse">
++		<wsdl:part name="parameters" element="job:HoldJobResponse"/>
++	</wsdl:message>
++	<wsdl:message name="ReleaseJobRequest">
++		<wsdl:part name="parameters" element="job:ReleaseJob"/>
++	</wsdl:message>
++	<wsdl:message name="ReleaseJobResponse">
++		<wsdl:part name="parameters" element="job:ReleaseJobResponse"/>
++	</wsdl:message>
++	<wsdl:message name="RemoveJobRequest">
++		<wsdl:part name="parameters" element="job:RemoveJob"/>
++	</wsdl:message>
++	<wsdl:message name="RemoveJobResponse">
++		<wsdl:part name="parameters" element="job:RemoveJobResponse"/>
++	</wsdl:message>
++	<wsdl:message name="SetJobAttributeRequest">
++		<wsdl:part name="parameters" element="job:SetJobAttribute"/>
++	</wsdl:message>
++	<wsdl:message name="SetJobAttributeResponse">
++		<wsdl:part name="parameters" element="job:SetJobAttributeResponse"/>
++	</wsdl:message>
++	<wsdl:portType name="AviaryJob">
++		<wsdl:operation name="submitJob">
++			<wsdl:input message="tns:SubmitJobRequest"/>
++			<wsdl:output message="tns:SubmitJobResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="holdJob">
++			<wsdl:input message="tns:HoldJobRequest"/>
++			<wsdl:output message="tns:HoldJobResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="releaseJob">
++			<wsdl:input message="tns:ReleaseJobRequest"/>
++			<wsdl:output message="tns:ReleaseJobResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="removeJob">
++			<wsdl:input message="tns:RemoveJobRequest"/>
++			<wsdl:output message="tns:RemoveJobResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="setJobAttribute">
++			<wsdl:input message="tns:SetJobAttributeRequest"/>
++			<wsdl:output message="tns:SetJobAttributeResponse"/>
++		</wsdl:operation>
++	</wsdl:portType>
++	<wsdl:binding name="AviaryJobSOAPBinding" type="tns:AviaryJob">
++		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
++		<wsdl:operation name="submitJob">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-job/submit"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="holdJob">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-job/hold"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="releaseJob">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-job/release"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="removeJob">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-job/remove"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="setJobAttribute">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-job/set-attr"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++	</wsdl:binding>
++	<wsdl:service name="AviaryJobService">
++		<wsdl:port name="AviaryJobSOAPPort" binding="tns:AviaryJobSOAPBinding">
++			<soap:address location="http://localhost"/>
++		</wsdl:port>
++	</wsdl:service>
++</wsdl:definitions>
+diff --git a/src/condor_contrib/aviary/etc/aviary-job.xsd b/src/condor_contrib/aviary/etc/aviary-job.xsd
+new file mode 100644
+index 0000000..d00b63b
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/aviary-job.xsd
+@@ -0,0 +1,71 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:job="http://job.aviary.grid.redhat.com" xmlns:mrg="http://common.aviary.grid.redhat.com" targetNamespace="http://job.aviary.grid.redhat.com">
++	<xs:import namespace="http://common.aviary.grid.redhat.com" schemaLocation="aviary-common.xsd"/>
++	<!-- declare message-level elements using anonymous complex types for simpler generated types -->
++	<xs:element name="SubmitJob">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="cmd" type="xs:string"/>
++				<xs:element name="args" type="xs:string" minOccurs="0"/>
++				<xs:element name="owner" type="xs:string"/>
++				<xs:element name="iwd" type="xs:string"/>
++				<xs:element name="submission_name" type="xs:string" minOccurs="0"/>
++				<xs:element name="requirements" type="mrg:ResourceConstraint"  minOccurs="0" maxOccurs="unbounded"/>
++				<xs:element name="extra" type="mrg:Attribute" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++			<xs:attribute name="allowOverrides" type="xs:boolean" default="false"/>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="SubmitJobResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="id" type="mrg:JobID" minOccurs="0"/>
++				<xs:element name="status" type="mrg:Status"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:complexType name="ControlJob">
++		<xs:sequence>
++			<xs:element name="id" type="mrg:JobID"/>
++			<xs:element name="reason" type="xs:string"/>
++		</xs:sequence>
++	</xs:complexType>
++	<xs:complexType name="ControlJobResponse">
++		<xs:sequence>
++			<xs:element name="status" type="mrg:Status"/>
++		</xs:sequence>
++	</xs:complexType>
++	<!-- these all follow the same type pattern so reuse -->
++	<xs:element name="HoldJob" type="job:ControlJob"/>
++	<xs:element name="HoldJobResponse" type="job:ControlJobResponse"/>
++	<xs:element name="ReleaseJob" type="job:ControlJob"/>
++	<xs:element name="ReleaseJobResponse" type="job:ControlJobResponse"/>
++	<xs:element name="RemoveJob" type="job:ControlJob"/>
++	<xs:element name="RemoveJobResponse" type="job:ControlJobResponse"/>
++	<xs:element name="SetJobAttribute">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="id" type="mrg:JobID"/>
++				<xs:element name="attribute" type="mrg:Attribute"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="SetJobAttributeResponse" type="job:ControlJobResponse"/>
++</xs:schema>
+diff --git a/src/condor_contrib/aviary/etc/aviary-query.wsdl b/src/condor_contrib/aviary/etc/aviary-query.wsdl
+new file mode 100644
+index 0000000..3769e05
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/aviary-query.wsdl
+@@ -0,0 +1,130 @@
++<?xml version="1.0" encoding="UTF-8" standalone="no"?>
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://grid.redhat.com/aviary-query/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:qry="http://query.aviary.grid.redhat.com" xmlns:ns="http://common.aviary.grid.redhat.com" targetNamespace="http://grid.redhat.com/aviary-query/" name="aviary-query">
++	<wsdl:types>
++		<xsd:schema targetNamespace="http://grid.redhat.com/aviary-query/">
++			<xsd:import schemaLocation="aviary-query.xsd" namespace="http://query.aviary.grid.redhat.com"/>
++		</xsd:schema>
++	</wsdl:types>
++	<wsdl:message name="GetJobSummaryRequest">
++		<wsdl:part name="parameters" element="qry:GetJobSummary"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobSummaryResponse">
++		<wsdl:part name="parameters" element="qry:GetJobSummaryResponse"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobStatusRequest">
++		<wsdl:part name="parameters" element="qry:GetJobStatus"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobStatusResponse">
++		<wsdl:part name="parameters" element="qry:GetJobStatusResponse"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobDetailsRequest">
++		<wsdl:part name="parameters" element="qry:GetJobDetails"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobDetailsResponse">
++		<wsdl:part name="parameters" element="qry:GetJobDetailsResponse"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobDataRequest">
++		<wsdl:part name="parameters" element="qry:GetJobData"/>
++	</wsdl:message>
++	<wsdl:message name="GetJobDataResponse">
++		<wsdl:part name="parameters" element="qry:GetJobDataResponse"/>
++	</wsdl:message>
++	<wsdl:message name="GetSubmissionSummaryRequest">
++		<wsdl:part name="parameters" element="qry:GetSubmissionSummary"/>
++	</wsdl:message>
++	<wsdl:message name="GetSubmissionSummaryResponse">
++		<wsdl:part name="parameters" element="qry:GetSubmissionSummaryResponse"/>
++	</wsdl:message>
++	<wsdl:portType name="AviaryQuery">
++		<wsdl:operation name="getJobSummary">
++			<wsdl:input message="tns:GetJobSummaryRequest"/>
++			<wsdl:output message="tns:GetJobSummaryResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="getJobStatus">
++			<wsdl:input message="tns:GetJobStatusRequest"/>
++			<wsdl:output message="tns:GetJobStatusResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="getJobDetails">
++			<wsdl:input message="tns:GetJobDetailsRequest"/>
++			<wsdl:output message="tns:GetJobDetailsResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="getJobData">
++			<wsdl:input message="tns:GetJobDataRequest"/>
++			<wsdl:output message="tns:GetJobDataResponse"/>
++		</wsdl:operation>
++		<wsdl:operation name="getSubmissionSummary">
++			<wsdl:input message="tns:GetSubmissionSummaryRequest"/>
++			<wsdl:output message="tns:GetSubmissionSummaryResponse"/>
++		</wsdl:operation>
++	</wsdl:portType>
++	<wsdl:binding name="AviaryQuerySOAPBinding" type="tns:AviaryQuery">
++		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
++		<wsdl:operation name="getJobSummary">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-query/job/summary"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="getJobStatus">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-query/job/status"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="getJobDetails">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-query/job/details"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="getJobData">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-query/job/data"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++		<wsdl:operation name="getSubmissionSummary">
++			<soap:operation soapAction="http://grid.redhat.com/aviary-query/job/submission"/>
++			<wsdl:input>
++				<soap:body use="literal"/>
++			</wsdl:input>
++			<wsdl:output>
++				<soap:body use="literal"/>
++			</wsdl:output>
++		</wsdl:operation>
++	</wsdl:binding>
++	<wsdl:service name="AviaryQueryService">
++		<wsdl:port name="AviaryQuerySOAPPort" binding="tns:AviaryQuerySOAPBinding">
++			<soap:address location="http://localhost"/>
++		</wsdl:port>
++	</wsdl:service>
++</wsdl:definitions>
+diff --git a/src/condor_contrib/aviary/etc/aviary-query.xsd b/src/condor_contrib/aviary/etc/aviary-query.xsd
+new file mode 100644
+index 0000000..a46ceb8
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/aviary-query.xsd
+@@ -0,0 +1,106 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:qry="http://query.aviary.grid.redhat.com" xmlns:mrg="http://common.aviary.grid.redhat.com" targetNamespace="http://query.aviary.grid.redhat.com">
++	<xs:import namespace="http://common.aviary.grid.redhat.com" schemaLocation="aviary-common.xsd"/>
++
++	<!-- declare  message-level elements using anonymous complex types for simpler generated types -->
++	<!-- use of refs, inheritance into anonymous types, etc. eschewed for simplicity and interop -->
++	<xs:element name="GetJobSummary">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="ids" type="mrg:JobID" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++			<xs:attribute name="partialMatches" type="xs:boolean" default="true"/>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobSummaryResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="jobs" type="mrg:JobSummary" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobStatus">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="ids" type="mrg:JobID" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++			<xs:attribute name="partialMatches" type="xs:boolean" default="true"/>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobStatusResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="jobs" type="mrg:JobStatus" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobDetails">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="ids" type="mrg:JobID" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++			<xs:attribute name="partialMatches" type="xs:boolean" default="true"/>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobDetailsResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="jobs" type="mrg:JobDetails" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobData">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="data" type="mrg:JobData"/>
++				<xs:element name="max_bytes" type="xs:integer" default="1024"/>
++				<xs:element name="from_end" type="xs:boolean" minOccurs="0" default="false"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetJobDataResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="data" type="mrg:JobData"/>
++				<xs:element name="status" type="mrg:Status"/>
++				<xs:element name="file_name" type="xs:string" minOccurs="0"/>
++				<xs:element name="file_size" type="xs:integer" minOccurs="0"/>
++				<!-- string for file content...we probably want to keep line feeds, etc. TODO: need to revisit this-->
++				<xs:element name="content" type="xs:string" minOccurs="0"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetSubmissionSummary">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="ids" type="mrg:SubmissionID" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++			<xs:attribute name="partialMatches" type="xs:boolean" default="true"/>
++			<xs:attribute name="includeJobSummaries" type="xs:boolean" default="false"/>
++		</xs:complexType>
++	</xs:element>
++	<xs:element name="GetSubmissionSummaryResponse">
++		<xs:complexType>
++			<xs:sequence>
++				<xs:element name="submissions" type="mrg:SubmissionSummary" minOccurs="0" maxOccurs="unbounded"/>
++			</xs:sequence>
++		</xs:complexType>
++	</xs:element>
++</xs:schema>
+diff --git a/src/condor_contrib/aviary/etc/axis2.xml.in b/src/condor_contrib/aviary/etc/axis2.xml.in
+new file mode 100644
+index 0000000..4e06bbd
+--- /dev/null
++++ b/src/condor_contrib/aviary/etc/axis2.xml.in
+@@ -0,0 +1,102 @@
++<!--
++/*
++ * Copyright 2000-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++-->
++
++<!-- Aviary-specific axis2.xml -->
++<axisconfig name="Axis2/C">
++	<!-- ================================================= -->
++	<!-- Parameters -->
++	<!-- ================================================= -->
++	<parameter name="libDir">@WS02_LIB_ROOT@</parameter>
++	<parameter name="servicesDir">/var/lib/condor/aviary/services</parameter>
++	<parameter name="enableREST" locked="false">true</parameter>
++	<parameter name="persistOperationContext" locked="false">true</parameter>
++
++	<!-- ================================================= -->
++	<!-- Transport Ins -->
++	<!-- ================================================= -->
++	<transportReceiver name="http" class="libaxis2_http_receiver.so.0">
++		<parameter name="port" locked="false">6060</parameter>
++	</transportReceiver>
++
++    <!-- applies to Axis2/C clients only -->
++	<transportReceiver name="https" class="libaxis2_http_receiver.so.0">
++		<parameter name="port" locked="false">6060</parameter>
++	</transportReceiver>
++	<!--transportReceiver name="tcp" class="axis2_tcp_receiver"-->
++	<!--parameter name="port" locked="false">6060</parameter-->
++	<!--/transportReceiver-->
++
++	<!-- ================================================= -->
++	<!-- Transport Outs -->
++	<!-- ================================================= -->
++
++	<transportSender name="http" class="libaxis2_http_sender.so.0">
++		<parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
++		<parameter name="xml-declaration" insert="false"/>
++		<!--parameter name="Transfer-Encoding">chunked</parameter-->
++		<!--parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080" locked="true"/-->
++	</transportSender>
++
++    <!-- applies to Axis2/C clients only -->
++	<transportSender name="https" class="libaxis2_http_sender.so.0">
++		<parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
++		<parameter name="xml-declaration" insert="false"/>
++	</transportSender>
++
++	<!-- ================================================= -->
++	<!-- SSL  -->
++	<!-- ================================================= -->
++	<!-- NOTE: server-side SSL support currently unavailable for aviary components -->
++	<!-- alternatives include the use of a SSL-enabled proxy server such as squid; -->
++	<!-- the following settings would apply to Axis2/C clients only if enabled -->
++	<!-- set the server's SSL certificate here -->
++	<!--parameter name="SERVER_CERT">/path/to/ca/certificate</parameter-->
++	<!-- set the client's SSL key file and passphrase here for client auth -->
++	<!--parameter name="KEY_FILE">/path/to/client/certificate/chain/file</parameter-->
++	<!--parameter name="SSL_PASSPHRASE">passphrase</parameter-->
++
++	<!-- ================================================= -->
++	<!-- Phases  -->
++	<!-- ================================================= -->
++	<phaseOrder type="inflow">
++		<!-- System pre defined phases -->
++		<phase name="Transport"/>
++		<phase name="PreDispatch"/>
++		<phase name="Dispatch"/>
++		<phase name="PostDispatch"/>
++		<!-- End system pre defined phases -->
++		<!-- After PostDispatch phase, module or service author can add any phase as required  -->
++		<!-- User defined phases could be added here -->
++		<phase name="Security"/>
++		<phase name="Rahas"/>
++	</phaseOrder>
++	<phaseOrder type="outflow">
++		<!-- User defined phases could be added here -->
++		<phase name="MessageOut"/>
++		<phase name="Security"/>
++	</phaseOrder>
++	<phaseOrder type="INfaultflow">
++		<!-- User defined phases could be added here -->
++		<!--phase name="userphase1"/-->
++	</phaseOrder>
++	<phaseOrder type="Outfaultflow">
++		<!-- User defined phases could be added here -->
++		<!--phase name="userphase1"/-->
++		<phase name="MessageOut"/>
++	</phaseOrder>
++</axisconfig>
+diff --git a/src/condor_contrib/aviary/gen-xsd-cpp.sh b/src/condor_contrib/aviary/gen-xsd-cpp.sh
+new file mode 100755
+index 0000000..2740157
+--- /dev/null
++++ b/src/condor_contrib/aviary/gen-xsd-cpp.sh
+@@ -0,0 +1,51 @@
++#!/bin/sh
++
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# codegen to provide WSDL/XSD CPP headers and source
++
++WSFCPP_HOME=/usr
++if [ -z "$1" ]; then
++    echo No arg - using default
++else
++    WSFCPP_HOME=$1
++fi
++echo WSFCPP_HOME=$WSFCPP_HOME
++
++# generate our cpp types from WSDL
++WSDL2CPP.sh -uri etc/aviary-job.wsdl -or -d adb -ss -g -ns2p http://common.aviary.grid.redhat.com=AviaryCommon,http://job.aviary.grid.redhat.com=AviaryJob -o codegen/job
++WSDL2CPP.sh -uri etc/aviary-query.wsdl -or -d adb -ss -g -ns2p http://common.aviary.grid.redhat.com=AviaryCommon,http://query.aviary.grid.redhat.com=AviaryQuery -o codegen/query
++
++# get rid of the extraneous stuff that WSDL2CPP won't let us turn off
++rm -f codegen/job/*AviaryJob*Service*.{h,cpp,vcproj}
++rm -f codegen/query/*AviaryQuery*Service*.{h,cpp,vcproj}
++
++# setup our include dir
++if ! test -d include; then
++    mkdir include;
++fi
++
++# stow the headers for others steps in the build 
++mv codegen/job/src/*.h include;
++mv codegen/query/src/*.h include;
++
++# WSDLCPP should do this for us but break out common
++if ! test -d codegen/common/src; then
++    mkdir -p codegen/common/src;
++fi
++mv codegen/query/src/AviaryCommon*.cpp codegen/common/src
++rm -f codegen/job/src/AviaryCommon*.cpp
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_ArchType.h b/src/condor_contrib/aviary/include/AviaryCommon_ArchType.h
+new file mode 100644
+index 0000000..89aa5c2
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_ArchType.h
+@@ -0,0 +1,245 @@
++
++
++        #ifndef AviaryCommon_ARCHTYPE_H
++        #define AviaryCommon_ARCHTYPE_H
++
++       /**
++        * ArchType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ArchType class
++        */
++
++        namespace AviaryCommon{
++            class ArchType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            ArchType_INTEL,
++            ArchType_X86_64
++        } ADBArchTypeEnum;
++        
++        
++
++        class ArchType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_ArchType;
++
++                
++                bool isValidArchType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setArchTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ArchType
++         */
++
++        ArchType();
++
++        /**
++         * Destructor ArchType
++         */
++        ~ArchType();
++
++
++       
++
++        /**
++         * Constructor for creating ArchType
++         * @param 
++         * @param ArchType std::string
++         * @return newly created ArchType object
++         */
++        ArchType(std::string arg_ArchType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for ArchType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getArchType();
++
++        /**
++         * Setter for ArchType.
++         * @param arg_ArchType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setArchType(const std::string  arg_ArchType);
++
++        /**
++         * Re setter for ArchType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetArchType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for ArchType.
++            * @return ADBArchTypeEnum; -1 on failure
++            */
++            ADBArchTypeEnum WSF_CALL
++            getArchTypeEnum();
++            
++            /**
++            * Enum setter for ArchType.
++            * @param arg_ArchType ADBArchTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setArchTypeEnum(
++            const ADBArchTypeEnum arg_ArchType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ArchType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isArchTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ArchType_om_node node to serialize from
++         * @param ArchType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ArchType_om_node, axiom_element_t *ArchType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ArchType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ArchType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* ARCHTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_Attribute.h b/src/condor_contrib/aviary/include/AviaryCommon_Attribute.h
+new file mode 100644
+index 0000000..1f47890
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_Attribute.h
+@@ -0,0 +1,307 @@
++
++
++        #ifndef AviaryCommon_ATTRIBUTE_H
++        #define AviaryCommon_ATTRIBUTE_H
++
++       /**
++        * Attribute.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  Attribute class
++        */
++
++        namespace AviaryCommon{
++            class Attribute;
++        }
++        
++
++        
++       #include "AviaryCommon_AttributeType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class Attribute {
++
++        private:
++             std::string property_Name;
++
++                
++                bool isValidName;
++            AviaryCommon::AttributeType* property_Type;
++
++                
++                bool isValidType;
++            std::string property_Value;
++
++                
++                bool isValidValue;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setNameNil();
++            
++
++        bool WSF_CALL
++        setTypeNil();
++            
++
++        bool WSF_CALL
++        setValueNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class Attribute
++         */
++
++        Attribute();
++
++        /**
++         * Destructor Attribute
++         */
++        ~Attribute();
++
++
++       
++
++        /**
++         * Constructor for creating Attribute
++         * @param 
++         * @param Name std::string
++         * @param Type AviaryCommon::AttributeType*
++         * @param Value std::string
++         * @return newly created Attribute object
++         */
++        Attribute(std::string arg_Name,AviaryCommon::AttributeType* arg_Type,std::string arg_Value);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getName();
++
++        /**
++         * Setter for name.
++         * @param arg_Name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setName(const std::string  arg_Name);
++
++        /**
++         * Re setter for name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetName();
++        
++        
++
++        /**
++         * Getter for type. 
++         * @return AviaryCommon::AttributeType*
++         */
++        WSF_EXTERN AviaryCommon::AttributeType* WSF_CALL
++        getType();
++
++        /**
++         * Setter for type.
++         * @param arg_Type AviaryCommon::AttributeType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setType(AviaryCommon::AttributeType*  arg_Type);
++
++        /**
++         * Re setter for type
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetType();
++        
++        
++
++        /**
++         * Getter for value. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getValue();
++
++        /**
++         * Setter for value.
++         * @param arg_Value std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setValue(const std::string  arg_Value);
++
++        /**
++         * Re setter for value
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetValue();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isNameNil();
++
++
++        
++
++        /**
++         * Check whether type is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isTypeNil();
++
++
++        
++
++        /**
++         * Check whether value is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isValueNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param Attribute_om_node node to serialize from
++         * @param Attribute_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* Attribute_om_node, axiom_element_t *Attribute_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the Attribute is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for name by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for type by property number (2)
++         * @return AviaryCommon::AttributeType
++         */
++
++        AviaryCommon::AttributeType* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for value by property number (3)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty3();
++
++    
++
++};
++
++}        
++ #endif /* ATTRIBUTE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_AttributeType.h b/src/condor_contrib/aviary/include/AviaryCommon_AttributeType.h
+new file mode 100644
+index 0000000..34d7c36
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_AttributeType.h
+@@ -0,0 +1,250 @@
++
++
++        #ifndef AviaryCommon_ATTRIBUTETYPE_H
++        #define AviaryCommon_ATTRIBUTETYPE_H
++
++       /**
++        * AttributeType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  AttributeType class
++        */
++
++        namespace AviaryCommon{
++            class AttributeType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            AttributeType_INTEGER,
++            AttributeType_FLOAT,
++            AttributeType_STRING,
++            AttributeType_EXPRESSION,
++            AttributeType_BOOLEAN,
++            AttributeType_UNDEFINED,
++            AttributeType_ERROR
++        } ADBAttributeTypeEnum;
++        
++        
++
++        class AttributeType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_AttributeType;
++
++                
++                bool isValidAttributeType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setAttributeTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class AttributeType
++         */
++
++        AttributeType();
++
++        /**
++         * Destructor AttributeType
++         */
++        ~AttributeType();
++
++
++       
++
++        /**
++         * Constructor for creating AttributeType
++         * @param 
++         * @param AttributeType std::string
++         * @return newly created AttributeType object
++         */
++        AttributeType(std::string arg_AttributeType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for AttributeType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getAttributeType();
++
++        /**
++         * Setter for AttributeType.
++         * @param arg_AttributeType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAttributeType(const std::string  arg_AttributeType);
++
++        /**
++         * Re setter for AttributeType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetAttributeType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for AttributeType.
++            * @return ADBAttributeTypeEnum; -1 on failure
++            */
++            ADBAttributeTypeEnum WSF_CALL
++            getAttributeTypeEnum();
++            
++            /**
++            * Enum setter for AttributeType.
++            * @param arg_AttributeType ADBAttributeTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setAttributeTypeEnum(
++            const ADBAttributeTypeEnum arg_AttributeType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether AttributeType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isAttributeTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param AttributeType_om_node node to serialize from
++         * @param AttributeType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* AttributeType_om_node, axiom_element_t *AttributeType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the AttributeType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for AttributeType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* ATTRIBUTETYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_Attributes.h b/src/condor_contrib/aviary/include/AviaryCommon_Attributes.h
+new file mode 100644
+index 0000000..d3c9823
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_Attributes.h
+@@ -0,0 +1,296 @@
++
++
++        #ifndef AviaryCommon_ATTRIBUTES_H
++        #define AviaryCommon_ATTRIBUTES_H
++
++       /**
++        * Attributes.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  Attributes class
++        */
++
++        namespace AviaryCommon{
++            class Attributes;
++        }
++        
++
++        
++       #include "AviaryCommon_Attribute.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class Attributes {
++
++        private:
++             std::vector<AviaryCommon::Attribute*>* property_Attrs;
++
++                
++                bool isValidAttrs;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setAttrsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class Attributes
++         */
++
++        Attributes();
++
++        /**
++         * Destructor Attributes
++         */
++        ~Attributes();
++
++
++       
++
++        /**
++         * Constructor for creating Attributes
++         * @param 
++         * @param Attrs std::vector<AviaryCommon::Attribute*>*
++         * @return newly created Attributes object
++         */
++        Attributes(std::vector<AviaryCommon::Attribute*>* arg_Attrs);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for attrs. Deprecated for array types, Use getAttrsAt instead
++         * @return Array of AviaryCommon::Attribute*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::Attribute*>* WSF_CALL
++        getAttrs();
++
++        /**
++         * Setter for attrs.Deprecated for array types, Use setAttrsAt
++         * or addAttrs instead.
++         * @param arg_Attrs Array of AviaryCommon::Attribute*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAttrs(std::vector<AviaryCommon::Attribute*>*  arg_Attrs);
++
++        /**
++         * Re setter for attrs
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetAttrs();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of attrs.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::Attribute* of the array
++         */
++        WSF_EXTERN AviaryCommon::Attribute* WSF_CALL
++        getAttrsAt(int i);
++
++        /**
++         * Set the ith element of attrs. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Attrs element to set AviaryCommon::Attribute* to the array
++         * @return ith AviaryCommon::Attribute* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAttrsAt(int i,
++                AviaryCommon::Attribute* arg_Attrs);
++
++
++        /**
++         * Add to attrs.
++         * @param arg_Attrs element to add AviaryCommon::Attribute* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addAttrs(
++            AviaryCommon::Attribute* arg_Attrs);
++
++        /**
++         * Get the size of the attrs array.
++         * @return the size of the attrs array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofAttrs();
++
++        /**
++         * Remove the ith element of attrs.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeAttrsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether attrs is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isAttrsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether attrs is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isAttrsNilAt(int i);
++ 
++       
++        /**
++         * Set attrs to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setAttrsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param Attributes_om_node node to serialize from
++         * @param Attributes_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* Attributes_om_node, axiom_element_t *Attributes_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the Attributes is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for attrs by property number (1)
++         * @return Array of AviaryCommon::Attributes.
++         */
++
++        std::vector<AviaryCommon::Attribute*>* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* ATTRIBUTES_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobConstraint.h b/src/condor_contrib/aviary/include/AviaryCommon_JobConstraint.h
+new file mode 100644
+index 0000000..80f3da0
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobConstraint.h
+@@ -0,0 +1,253 @@
++
++
++        #ifndef AviaryCommon_JOBCONSTRAINT_H
++        #define AviaryCommon_JOBCONSTRAINT_H
++
++       /**
++        * JobConstraint.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobConstraint class
++        */
++
++        namespace AviaryCommon{
++            class JobConstraint;
++        }
++        
++
++        
++       #include "AviaryCommon_JobConstraintType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobConstraint {
++
++        private:
++             AviaryCommon::JobConstraintType* property_Type;
++
++                
++                bool isValidType;
++            std::string property_Value;
++
++                
++                bool isValidValue;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setTypeNil();
++            
++
++        bool WSF_CALL
++        setValueNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobConstraint
++         */
++
++        JobConstraint();
++
++        /**
++         * Destructor JobConstraint
++         */
++        ~JobConstraint();
++
++
++       
++
++        /**
++         * Constructor for creating JobConstraint
++         * @param 
++         * @param Type AviaryCommon::JobConstraintType*
++         * @param Value std::string
++         * @return newly created JobConstraint object
++         */
++        JobConstraint(AviaryCommon::JobConstraintType* arg_Type,std::string arg_Value);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for type. 
++         * @return AviaryCommon::JobConstraintType*
++         */
++        WSF_EXTERN AviaryCommon::JobConstraintType* WSF_CALL
++        getType();
++
++        /**
++         * Setter for type.
++         * @param arg_Type AviaryCommon::JobConstraintType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setType(AviaryCommon::JobConstraintType*  arg_Type);
++
++        /**
++         * Re setter for type
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetType();
++        
++        
++
++        /**
++         * Getter for value. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getValue();
++
++        /**
++         * Setter for value.
++         * @param arg_Value std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setValue(const std::string  arg_Value);
++
++        /**
++         * Re setter for value
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetValue();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether type is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isTypeNil();
++
++
++        
++
++        /**
++         * Check whether value is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isValueNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobConstraint_om_node node to serialize from
++         * @param JobConstraint_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobConstraint_om_node, axiom_element_t *JobConstraint_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobConstraint is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for type by property number (1)
++         * @return AviaryCommon::JobConstraintType
++         */
++
++        AviaryCommon::JobConstraintType* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for value by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* JOBCONSTRAINT_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobConstraintType.h b/src/condor_contrib/aviary/include/AviaryCommon_JobConstraintType.h
+new file mode 100644
+index 0000000..032c481
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobConstraintType.h
+@@ -0,0 +1,246 @@
++
++
++        #ifndef AviaryCommon_JOBCONSTRAINTTYPE_H
++        #define AviaryCommon_JOBCONSTRAINTTYPE_H
++
++       /**
++        * JobConstraintType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobConstraintType class
++        */
++
++        namespace AviaryCommon{
++            class JobConstraintType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            JobConstraintType_CMD,
++            JobConstraintType_ARGS,
++            JobConstraintType_OWNER
++        } ADBJobConstraintTypeEnum;
++        
++        
++
++        class JobConstraintType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_JobConstraintType;
++
++                
++                bool isValidJobConstraintType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobConstraintTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobConstraintType
++         */
++
++        JobConstraintType();
++
++        /**
++         * Destructor JobConstraintType
++         */
++        ~JobConstraintType();
++
++
++       
++
++        /**
++         * Constructor for creating JobConstraintType
++         * @param 
++         * @param JobConstraintType std::string
++         * @return newly created JobConstraintType object
++         */
++        JobConstraintType(std::string arg_JobConstraintType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for JobConstraintType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getJobConstraintType();
++
++        /**
++         * Setter for JobConstraintType.
++         * @param arg_JobConstraintType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobConstraintType(const std::string  arg_JobConstraintType);
++
++        /**
++         * Re setter for JobConstraintType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobConstraintType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for JobConstraintType.
++            * @return ADBJobConstraintTypeEnum; -1 on failure
++            */
++            ADBJobConstraintTypeEnum WSF_CALL
++            getJobConstraintTypeEnum();
++            
++            /**
++            * Enum setter for JobConstraintType.
++            * @param arg_JobConstraintType ADBJobConstraintTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setJobConstraintTypeEnum(
++            const ADBJobConstraintTypeEnum arg_JobConstraintType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether JobConstraintType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobConstraintTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobConstraintType_om_node node to serialize from
++         * @param JobConstraintType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobConstraintType_om_node, axiom_element_t *JobConstraintType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobConstraintType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for JobConstraintType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* JOBCONSTRAINTTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobData.h b/src/condor_contrib/aviary/include/AviaryCommon_JobData.h
+new file mode 100644
+index 0000000..970bc6c
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobData.h
+@@ -0,0 +1,255 @@
++
++
++        #ifndef AviaryCommon_JOBDATA_H
++        #define AviaryCommon_JOBDATA_H
++
++       /**
++        * JobData.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobData class
++        */
++
++        namespace AviaryCommon{
++            class JobData;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_JobDataType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobData {
++
++        private:
++             AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::JobDataType* property_Type;
++
++                
++                bool isValidType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobData
++         */
++
++        JobData();
++
++        /**
++         * Destructor JobData
++         */
++        ~JobData();
++
++
++       
++
++        /**
++         * Constructor for creating JobData
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Type AviaryCommon::JobDataType*
++         * @return newly created JobData object
++         */
++        JobData(AviaryCommon::JobID* arg_Id,AviaryCommon::JobDataType* arg_Type);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for type. 
++         * @return AviaryCommon::JobDataType*
++         */
++        WSF_EXTERN AviaryCommon::JobDataType* WSF_CALL
++        getType();
++
++        /**
++         * Setter for type.
++         * @param arg_Type AviaryCommon::JobDataType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setType(AviaryCommon::JobDataType*  arg_Type);
++
++        /**
++         * Re setter for type
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetType();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether type is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobData_om_node node to serialize from
++         * @param JobData_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobData_om_node, axiom_element_t *JobData_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobData is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for type by property number (2)
++         * @return AviaryCommon::JobDataType
++         */
++
++        AviaryCommon::JobDataType* WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* JOBDATA_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobDataType.h b/src/condor_contrib/aviary/include/AviaryCommon_JobDataType.h
+new file mode 100644
+index 0000000..94e2873
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobDataType.h
+@@ -0,0 +1,246 @@
++
++
++        #ifndef AviaryCommon_JOBDATATYPE_H
++        #define AviaryCommon_JOBDATATYPE_H
++
++       /**
++        * JobDataType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobDataType class
++        */
++
++        namespace AviaryCommon{
++            class JobDataType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            JobDataType_ERR,
++            JobDataType_LOG,
++            JobDataType_OUT
++        } ADBJobDataTypeEnum;
++        
++        
++
++        class JobDataType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_JobDataType;
++
++                
++                bool isValidJobDataType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobDataTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobDataType
++         */
++
++        JobDataType();
++
++        /**
++         * Destructor JobDataType
++         */
++        ~JobDataType();
++
++
++       
++
++        /**
++         * Constructor for creating JobDataType
++         * @param 
++         * @param JobDataType std::string
++         * @return newly created JobDataType object
++         */
++        JobDataType(std::string arg_JobDataType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for JobDataType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getJobDataType();
++
++        /**
++         * Setter for JobDataType.
++         * @param arg_JobDataType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobDataType(const std::string  arg_JobDataType);
++
++        /**
++         * Re setter for JobDataType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobDataType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for JobDataType.
++            * @return ADBJobDataTypeEnum; -1 on failure
++            */
++            ADBJobDataTypeEnum WSF_CALL
++            getJobDataTypeEnum();
++            
++            /**
++            * Enum setter for JobDataType.
++            * @param arg_JobDataType ADBJobDataTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setJobDataTypeEnum(
++            const ADBJobDataTypeEnum arg_JobDataType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether JobDataType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobDataTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobDataType_om_node node to serialize from
++         * @param JobDataType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobDataType_om_node, axiom_element_t *JobDataType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobDataType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for JobDataType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* JOBDATATYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobDetails.h b/src/condor_contrib/aviary/include/AviaryCommon_JobDetails.h
+new file mode 100644
+index 0000000..6012bdb
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobDetails.h
+@@ -0,0 +1,311 @@
++
++
++        #ifndef AviaryCommon_JOBDETAILS_H
++        #define AviaryCommon_JOBDETAILS_H
++
++       /**
++        * JobDetails.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobDetails class
++        */
++
++        namespace AviaryCommon{
++            class JobDetails;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++       #include "AviaryCommon_Attributes.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobDetails {
++
++        private:
++             AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            AviaryCommon::Attributes* property_Details;
++
++                
++                bool isValidDetails;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++        bool WSF_CALL
++        setDetailsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobDetails
++         */
++
++        JobDetails();
++
++        /**
++         * Destructor JobDetails
++         */
++        ~JobDetails();
++
++
++       
++
++        /**
++         * Constructor for creating JobDetails
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Status AviaryCommon::Status*
++         * @param Details AviaryCommon::Attributes*
++         * @return newly created JobDetails object
++         */
++        JobDetails(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,AviaryCommon::Attributes* arg_Details);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++        
++
++        /**
++         * Getter for details. 
++         * @return AviaryCommon::Attributes*
++         */
++        WSF_EXTERN AviaryCommon::Attributes* WSF_CALL
++        getDetails();
++
++        /**
++         * Setter for details.
++         * @param arg_Details AviaryCommon::Attributes*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setDetails(AviaryCommon::Attributes*  arg_Details);
++
++        /**
++         * Re setter for details
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetDetails();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**
++         * Check whether details is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isDetailsNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobDetails_om_node node to serialize from
++         * @param JobDetails_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobDetails_om_node, axiom_element_t *JobDetails_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobDetails is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for details by property number (3)
++         * @return AviaryCommon::Attributes
++         */
++
++        AviaryCommon::Attributes* WSF_CALL
++        getProperty3();
++
++    
++
++};
++
++}        
++ #endif /* JOBDETAILS_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobID.h b/src/condor_contrib/aviary/include/AviaryCommon_JobID.h
+new file mode 100644
+index 0000000..4c62c81
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobID.h
+@@ -0,0 +1,361 @@
++
++
++        #ifndef AviaryCommon_JOBID_H
++        #define AviaryCommon_JOBID_H
++
++       /**
++        * JobID.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobID class
++        */
++
++        namespace AviaryCommon{
++            class JobID;
++        }
++        
++
++        
++       #include "AviaryCommon_SubmissionID.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobID {
++
++        private:
++             std::string property_Job;
++
++                
++                bool isValidJob;
++            std::string property_Pool;
++
++                
++                bool isValidPool;
++            std::string property_Scheduler;
++
++                
++                bool isValidScheduler;
++            AviaryCommon::SubmissionID* property_Submission;
++
++                
++                bool isValidSubmission;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobNil();
++            
++
++        bool WSF_CALL
++        setPoolNil();
++            
++
++        bool WSF_CALL
++        setSchedulerNil();
++            
++
++        bool WSF_CALL
++        setSubmissionNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobID
++         */
++
++        JobID();
++
++        /**
++         * Destructor JobID
++         */
++        ~JobID();
++
++
++       
++
++        /**
++         * Constructor for creating JobID
++         * @param 
++         * @param Job std::string
++         * @param Pool std::string
++         * @param Scheduler std::string
++         * @param Submission AviaryCommon::SubmissionID*
++         * @return newly created JobID object
++         */
++        JobID(std::string arg_Job,std::string arg_Pool,std::string arg_Scheduler,AviaryCommon::SubmissionID* arg_Submission);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for job. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getJob();
++
++        /**
++         * Setter for job.
++         * @param arg_Job std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJob(const std::string  arg_Job);
++
++        /**
++         * Re setter for job
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJob();
++        
++        
++
++        /**
++         * Getter for pool. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getPool();
++
++        /**
++         * Setter for pool.
++         * @param arg_Pool std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPool(const std::string  arg_Pool);
++
++        /**
++         * Re setter for pool
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPool();
++        
++        
++
++        /**
++         * Getter for scheduler. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getScheduler();
++
++        /**
++         * Setter for scheduler.
++         * @param arg_Scheduler std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setScheduler(const std::string  arg_Scheduler);
++
++        /**
++         * Re setter for scheduler
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetScheduler();
++        
++        
++
++        /**
++         * Getter for submission. 
++         * @return AviaryCommon::SubmissionID*
++         */
++        WSF_EXTERN AviaryCommon::SubmissionID* WSF_CALL
++        getSubmission();
++
++        /**
++         * Setter for submission.
++         * @param arg_Submission AviaryCommon::SubmissionID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSubmission(AviaryCommon::SubmissionID*  arg_Submission);
++
++        /**
++         * Re setter for submission
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetSubmission();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether job is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobNil();
++
++
++        
++
++        /**
++         * Check whether pool is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPoolNil();
++
++
++        
++
++        /**
++         * Check whether scheduler is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSchedulerNil();
++
++
++        
++
++        /**
++         * Check whether submission is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSubmissionNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobID_om_node node to serialize from
++         * @param JobID_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobID_om_node, axiom_element_t *JobID_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobID is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for job by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for pool by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for scheduler by property number (3)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for submission by property number (4)
++         * @return AviaryCommon::SubmissionID
++         */
++
++        AviaryCommon::SubmissionID* WSF_CALL
++        getProperty4();
++
++    
++
++};
++
++}        
++ #endif /* JOBID_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobStatus.h b/src/condor_contrib/aviary/include/AviaryCommon_JobStatus.h
+new file mode 100644
+index 0000000..999d200
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobStatus.h
+@@ -0,0 +1,311 @@
++
++
++        #ifndef AviaryCommon_JOBSTATUS_H
++        #define AviaryCommon_JOBSTATUS_H
++
++       /**
++        * JobStatus.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobStatus class
++        */
++
++        namespace AviaryCommon{
++            class JobStatus;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++       #include "AviaryCommon_JobStatusType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobStatus {
++
++        private:
++             AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            AviaryCommon::JobStatusType* property_Job_status;
++
++                
++                bool isValidJob_status;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++        bool WSF_CALL
++        setJob_statusNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobStatus
++         */
++
++        JobStatus();
++
++        /**
++         * Destructor JobStatus
++         */
++        ~JobStatus();
++
++
++       
++
++        /**
++         * Constructor for creating JobStatus
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Status AviaryCommon::Status*
++         * @param Job_status AviaryCommon::JobStatusType*
++         * @return newly created JobStatus object
++         */
++        JobStatus(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,AviaryCommon::JobStatusType* arg_Job_status);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++        
++
++        /**
++         * Getter for job_status. 
++         * @return AviaryCommon::JobStatusType*
++         */
++        WSF_EXTERN AviaryCommon::JobStatusType* WSF_CALL
++        getJob_status();
++
++        /**
++         * Setter for job_status.
++         * @param arg_Job_status AviaryCommon::JobStatusType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJob_status(AviaryCommon::JobStatusType*  arg_Job_status);
++
++        /**
++         * Re setter for job_status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJob_status();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**
++         * Check whether job_status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJob_statusNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobStatus_om_node node to serialize from
++         * @param JobStatus_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobStatus_om_node, axiom_element_t *JobStatus_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobStatus is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for job_status by property number (3)
++         * @return AviaryCommon::JobStatusType
++         */
++
++        AviaryCommon::JobStatusType* WSF_CALL
++        getProperty3();
++
++    
++
++};
++
++}        
++ #endif /* JOBSTATUS_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobStatusType.h b/src/condor_contrib/aviary/include/AviaryCommon_JobStatusType.h
+new file mode 100644
+index 0000000..076191a
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobStatusType.h
+@@ -0,0 +1,248 @@
++
++
++        #ifndef AviaryCommon_JOBSTATUSTYPE_H
++        #define AviaryCommon_JOBSTATUSTYPE_H
++
++       /**
++        * JobStatusType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobStatusType class
++        */
++
++        namespace AviaryCommon{
++            class JobStatusType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            JobStatusType_IDLE,
++            JobStatusType_RUNNING,
++            JobStatusType_REMOVED,
++            JobStatusType_COMPLETED,
++            JobStatusType_HELD
++        } ADBJobStatusTypeEnum;
++        
++        
++
++        class JobStatusType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_JobStatusType;
++
++                
++                bool isValidJobStatusType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobStatusTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobStatusType
++         */
++
++        JobStatusType();
++
++        /**
++         * Destructor JobStatusType
++         */
++        ~JobStatusType();
++
++
++       
++
++        /**
++         * Constructor for creating JobStatusType
++         * @param 
++         * @param JobStatusType std::string
++         * @return newly created JobStatusType object
++         */
++        JobStatusType(std::string arg_JobStatusType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for JobStatusType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getJobStatusType();
++
++        /**
++         * Setter for JobStatusType.
++         * @param arg_JobStatusType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobStatusType(const std::string  arg_JobStatusType);
++
++        /**
++         * Re setter for JobStatusType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobStatusType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for JobStatusType.
++            * @return ADBJobStatusTypeEnum; -1 on failure
++            */
++            ADBJobStatusTypeEnum WSF_CALL
++            getJobStatusTypeEnum();
++            
++            /**
++            * Enum setter for JobStatusType.
++            * @param arg_JobStatusType ADBJobStatusTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setJobStatusTypeEnum(
++            const ADBJobStatusTypeEnum arg_JobStatusType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether JobStatusType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobStatusTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobStatusType_om_node node to serialize from
++         * @param JobStatusType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobStatusType_om_node, axiom_element_t *JobStatusType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobStatusType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for JobStatusType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* JOBSTATUSTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_JobSummary.h b/src/condor_contrib/aviary/include/AviaryCommon_JobSummary.h
+new file mode 100644
+index 0000000..b6128a6
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_JobSummary.h
+@@ -0,0 +1,745 @@
++
++
++        #ifndef AviaryCommon_JOBSUMMARY_H
++        #define AviaryCommon_JOBSUMMARY_H
++
++       /**
++        * JobSummary.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  JobSummary class
++        */
++
++        namespace AviaryCommon{
++            class JobSummary;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++       #include "AviaryCommon_JobStatusType.h"
++          
++        #include <axutil_date_time.h>
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class JobSummary {
++
++        private:
++             AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            axutil_date_time_t* property_Queued;
++
++                
++                bool isValidQueued;
++            axutil_date_time_t* property_Last_update;
++
++                
++                bool isValidLast_update;
++            AviaryCommon::JobStatusType* property_Job_status;
++
++                
++                bool isValidJob_status;
++            std::string property_Cmd;
++
++                
++                bool isValidCmd;
++            std::string property_Args1;
++
++                
++                bool isValidArgs1;
++            std::string property_Args2;
++
++                
++                bool isValidArgs2;
++            std::string property_Held;
++
++                
++                bool isValidHeld;
++            std::string property_Released;
++
++                
++                bool isValidReleased;
++            std::string property_Removed;
++
++                
++                bool isValidRemoved;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++        bool WSF_CALL
++        setQueuedNil();
++            
++
++        bool WSF_CALL
++        setLast_updateNil();
++            
++
++        bool WSF_CALL
++        setJob_statusNil();
++            
++
++        bool WSF_CALL
++        setCmdNil();
++            
++
++        bool WSF_CALL
++        setArgs1Nil();
++            
++
++        bool WSF_CALL
++        setArgs2Nil();
++            
++
++        bool WSF_CALL
++        setHeldNil();
++            
++
++        bool WSF_CALL
++        setReleasedNil();
++            
++
++        bool WSF_CALL
++        setRemovedNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class JobSummary
++         */
++
++        JobSummary();
++
++        /**
++         * Destructor JobSummary
++         */
++        ~JobSummary();
++
++
++       
++
++        /**
++         * Constructor for creating JobSummary
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Status AviaryCommon::Status*
++         * @param Queued axutil_date_time_t*
++         * @param Last_update axutil_date_time_t*
++         * @param Job_status AviaryCommon::JobStatusType*
++         * @param Cmd std::string
++         * @param Args1 std::string
++         * @param Args2 std::string
++         * @param Held std::string
++         * @param Released std::string
++         * @param Removed std::string
++         * @return newly created JobSummary object
++         */
++        JobSummary(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status,axutil_date_time_t* arg_Queued,axutil_date_time_t* arg_Last_update,AviaryCommon::JobStatusType* arg_Job_status,std::string arg_Cmd,std::string arg_Args1,std::string arg_Args2,std::string arg_Held,std::string arg_Released,std::string arg_Removed);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++        
++
++        /**
++         * Getter for queued. 
++         * @return axutil_date_time_t*
++         */
++        WSF_EXTERN axutil_date_time_t* WSF_CALL
++        getQueued();
++
++        /**
++         * Setter for queued.
++         * @param arg_Queued axutil_date_time_t*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setQueued(axutil_date_time_t*  arg_Queued);
++
++        /**
++         * Re setter for queued
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetQueued();
++        
++        
++
++        /**
++         * Getter for last_update. 
++         * @return axutil_date_time_t*
++         */
++        WSF_EXTERN axutil_date_time_t* WSF_CALL
++        getLast_update();
++
++        /**
++         * Setter for last_update.
++         * @param arg_Last_update axutil_date_time_t*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setLast_update(axutil_date_time_t*  arg_Last_update);
++
++        /**
++         * Re setter for last_update
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetLast_update();
++        
++        
++
++        /**
++         * Getter for job_status. 
++         * @return AviaryCommon::JobStatusType*
++         */
++        WSF_EXTERN AviaryCommon::JobStatusType* WSF_CALL
++        getJob_status();
++
++        /**
++         * Setter for job_status.
++         * @param arg_Job_status AviaryCommon::JobStatusType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJob_status(AviaryCommon::JobStatusType*  arg_Job_status);
++
++        /**
++         * Re setter for job_status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJob_status();
++        
++        
++
++        /**
++         * Getter for cmd. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getCmd();
++
++        /**
++         * Setter for cmd.
++         * @param arg_Cmd std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setCmd(const std::string  arg_Cmd);
++
++        /**
++         * Re setter for cmd
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetCmd();
++        
++        
++
++        /**
++         * Getter for args1. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getArgs1();
++
++        /**
++         * Setter for args1.
++         * @param arg_Args1 std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setArgs1(const std::string  arg_Args1);
++
++        /**
++         * Re setter for args1
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetArgs1();
++        
++        
++
++        /**
++         * Getter for args2. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getArgs2();
++
++        /**
++         * Setter for args2.
++         * @param arg_Args2 std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setArgs2(const std::string  arg_Args2);
++
++        /**
++         * Re setter for args2
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetArgs2();
++        
++        
++
++        /**
++         * Getter for held. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getHeld();
++
++        /**
++         * Setter for held.
++         * @param arg_Held std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setHeld(const std::string  arg_Held);
++
++        /**
++         * Re setter for held
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetHeld();
++        
++        
++
++        /**
++         * Getter for released. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getReleased();
++
++        /**
++         * Setter for released.
++         * @param arg_Released std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setReleased(const std::string  arg_Released);
++
++        /**
++         * Re setter for released
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetReleased();
++        
++        
++
++        /**
++         * Getter for removed. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getRemoved();
++
++        /**
++         * Setter for removed.
++         * @param arg_Removed std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRemoved(const std::string  arg_Removed);
++
++        /**
++         * Re setter for removed
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRemoved();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**
++         * Check whether queued is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isQueuedNil();
++
++
++        
++
++        /**
++         * Check whether last_update is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isLast_updateNil();
++
++
++        
++
++        /**
++         * Check whether job_status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJob_statusNil();
++
++
++        
++
++        /**
++         * Check whether cmd is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isCmdNil();
++
++
++        
++
++        /**
++         * Check whether args1 is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isArgs1Nil();
++
++
++        
++
++        /**
++         * Check whether args2 is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isArgs2Nil();
++
++
++        
++
++        /**
++         * Check whether held is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isHeldNil();
++
++
++        
++
++        /**
++         * Check whether released is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isReleasedNil();
++
++
++        
++
++        /**
++         * Check whether removed is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRemovedNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param JobSummary_om_node node to serialize from
++         * @param JobSummary_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* JobSummary_om_node, axiom_element_t *JobSummary_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the JobSummary is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for queued by property number (3)
++         * @return axutil_date_time_t*
++         */
++
++        axutil_date_time_t* WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for last_update by property number (4)
++         * @return axutil_date_time_t*
++         */
++
++        axutil_date_time_t* WSF_CALL
++        getProperty4();
++
++    
++        
++
++        /**
++         * Getter for job_status by property number (5)
++         * @return AviaryCommon::JobStatusType
++         */
++
++        AviaryCommon::JobStatusType* WSF_CALL
++        getProperty5();
++
++    
++        
++
++        /**
++         * Getter for cmd by property number (6)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty6();
++
++    
++        
++
++        /**
++         * Getter for args1 by property number (7)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty7();
++
++    
++        
++
++        /**
++         * Getter for args2 by property number (8)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty8();
++
++    
++        
++
++        /**
++         * Getter for held by property number (9)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty9();
++
++    
++        
++
++        /**
++         * Getter for released by property number (10)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty10();
++
++    
++        
++
++        /**
++         * Getter for removed by property number (11)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty11();
++
++    
++
++};
++
++}        
++ #endif /* JOBSUMMARY_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_OSType.h b/src/condor_contrib/aviary/include/AviaryCommon_OSType.h
+new file mode 100644
+index 0000000..3322a71
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_OSType.h
+@@ -0,0 +1,245 @@
++
++
++        #ifndef AviaryCommon_OSTYPE_H
++        #define AviaryCommon_OSTYPE_H
++
++       /**
++        * OSType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  OSType class
++        */
++
++        namespace AviaryCommon{
++            class OSType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            OSType_LINUX,
++            OSType_WINDOWS
++        } ADBOSTypeEnum;
++        
++        
++
++        class OSType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_OSType;
++
++                
++                bool isValidOSType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setOSTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class OSType
++         */
++
++        OSType();
++
++        /**
++         * Destructor OSType
++         */
++        ~OSType();
++
++
++       
++
++        /**
++         * Constructor for creating OSType
++         * @param 
++         * @param OSType std::string
++         * @return newly created OSType object
++         */
++        OSType(std::string arg_OSType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for OSType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getOSType();
++
++        /**
++         * Setter for OSType.
++         * @param arg_OSType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setOSType(const std::string  arg_OSType);
++
++        /**
++         * Re setter for OSType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetOSType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for OSType.
++            * @return ADBOSTypeEnum; -1 on failure
++            */
++            ADBOSTypeEnum WSF_CALL
++            getOSTypeEnum();
++            
++            /**
++            * Enum setter for OSType.
++            * @param arg_OSType ADBOSTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setOSTypeEnum(
++            const ADBOSTypeEnum arg_OSType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether OSType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isOSTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param OSType_om_node node to serialize from
++         * @param OSType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* OSType_om_node, axiom_element_t *OSType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the OSType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for OSType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* OSTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraint.h b/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraint.h
+new file mode 100644
+index 0000000..12557d8
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraint.h
+@@ -0,0 +1,253 @@
++
++
++        #ifndef AviaryCommon_RESOURCECONSTRAINT_H
++        #define AviaryCommon_RESOURCECONSTRAINT_H
++
++       /**
++        * ResourceConstraint.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ResourceConstraint class
++        */
++
++        namespace AviaryCommon{
++            class ResourceConstraint;
++        }
++        
++
++        
++       #include "AviaryCommon_ResourceConstraintType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class ResourceConstraint {
++
++        private:
++             AviaryCommon::ResourceConstraintType* property_Type;
++
++                
++                bool isValidType;
++            std::string property_Value;
++
++                
++                bool isValidValue;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setTypeNil();
++            
++
++        bool WSF_CALL
++        setValueNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ResourceConstraint
++         */
++
++        ResourceConstraint();
++
++        /**
++         * Destructor ResourceConstraint
++         */
++        ~ResourceConstraint();
++
++
++       
++
++        /**
++         * Constructor for creating ResourceConstraint
++         * @param 
++         * @param Type AviaryCommon::ResourceConstraintType*
++         * @param Value std::string
++         * @return newly created ResourceConstraint object
++         */
++        ResourceConstraint(AviaryCommon::ResourceConstraintType* arg_Type,std::string arg_Value);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for type. 
++         * @return AviaryCommon::ResourceConstraintType*
++         */
++        WSF_EXTERN AviaryCommon::ResourceConstraintType* WSF_CALL
++        getType();
++
++        /**
++         * Setter for type.
++         * @param arg_Type AviaryCommon::ResourceConstraintType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setType(AviaryCommon::ResourceConstraintType*  arg_Type);
++
++        /**
++         * Re setter for type
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetType();
++        
++        
++
++        /**
++         * Getter for value. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getValue();
++
++        /**
++         * Setter for value.
++         * @param arg_Value std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setValue(const std::string  arg_Value);
++
++        /**
++         * Re setter for value
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetValue();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether type is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isTypeNil();
++
++
++        
++
++        /**
++         * Check whether value is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isValueNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ResourceConstraint_om_node node to serialize from
++         * @param ResourceConstraint_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ResourceConstraint_om_node, axiom_element_t *ResourceConstraint_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ResourceConstraint is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for type by property number (1)
++         * @return AviaryCommon::ResourceConstraintType
++         */
++
++        AviaryCommon::ResourceConstraintType* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for value by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* RESOURCECONSTRAINT_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraintType.h b/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraintType.h
+new file mode 100644
+index 0000000..1b90eb1
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_ResourceConstraintType.h
+@@ -0,0 +1,248 @@
++
++
++        #ifndef AviaryCommon_RESOURCECONSTRAINTTYPE_H
++        #define AviaryCommon_RESOURCECONSTRAINTTYPE_H
++
++       /**
++        * ResourceConstraintType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ResourceConstraintType class
++        */
++
++        namespace AviaryCommon{
++            class ResourceConstraintType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            ResourceConstraintType_OS,
++            ResourceConstraintType_ARCH,
++            ResourceConstraintType_MEMORY,
++            ResourceConstraintType_DISK,
++            ResourceConstraintType_FILESYSTEM
++        } ADBResourceConstraintTypeEnum;
++        
++        
++
++        class ResourceConstraintType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_ResourceConstraintType;
++
++                
++                bool isValidResourceConstraintType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setResourceConstraintTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ResourceConstraintType
++         */
++
++        ResourceConstraintType();
++
++        /**
++         * Destructor ResourceConstraintType
++         */
++        ~ResourceConstraintType();
++
++
++       
++
++        /**
++         * Constructor for creating ResourceConstraintType
++         * @param 
++         * @param ResourceConstraintType std::string
++         * @return newly created ResourceConstraintType object
++         */
++        ResourceConstraintType(std::string arg_ResourceConstraintType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for ResourceConstraintType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getResourceConstraintType();
++
++        /**
++         * Setter for ResourceConstraintType.
++         * @param arg_ResourceConstraintType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setResourceConstraintType(const std::string  arg_ResourceConstraintType);
++
++        /**
++         * Re setter for ResourceConstraintType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetResourceConstraintType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for ResourceConstraintType.
++            * @return ADBResourceConstraintTypeEnum; -1 on failure
++            */
++            ADBResourceConstraintTypeEnum WSF_CALL
++            getResourceConstraintTypeEnum();
++            
++            /**
++            * Enum setter for ResourceConstraintType.
++            * @param arg_ResourceConstraintType ADBResourceConstraintTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setResourceConstraintTypeEnum(
++            const ADBResourceConstraintTypeEnum arg_ResourceConstraintType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ResourceConstraintType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isResourceConstraintTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ResourceConstraintType_om_node node to serialize from
++         * @param ResourceConstraintType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ResourceConstraintType_om_node, axiom_element_t *ResourceConstraintType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ResourceConstraintType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ResourceConstraintType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* RESOURCECONSTRAINTTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_ResourceID.h b/src/condor_contrib/aviary/include/AviaryCommon_ResourceID.h
+new file mode 100644
+index 0000000..c900d7b
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_ResourceID.h
+@@ -0,0 +1,361 @@
++
++
++        #ifndef AviaryCommon_RESOURCEID_H
++        #define AviaryCommon_RESOURCEID_H
++
++       /**
++        * ResourceID.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ResourceID class
++        */
++
++        namespace AviaryCommon{
++            class ResourceID;
++        }
++        
++
++        
++       #include "AviaryCommon_ResourceType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class ResourceID {
++
++        private:
++             AviaryCommon::ResourceType* property_Subsystem_type;
++
++                
++                bool isValidSubsystem_type;
++            std::string property_Pool;
++
++                
++                bool isValidPool;
++            std::string property_Name;
++
++                
++                bool isValidName;
++            std::string property_Custom_name;
++
++                
++                bool isValidCustom_name;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setSubsystem_typeNil();
++            
++
++        bool WSF_CALL
++        setPoolNil();
++            
++
++        bool WSF_CALL
++        setNameNil();
++            
++
++        bool WSF_CALL
++        setCustom_nameNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ResourceID
++         */
++
++        ResourceID();
++
++        /**
++         * Destructor ResourceID
++         */
++        ~ResourceID();
++
++
++       
++
++        /**
++         * Constructor for creating ResourceID
++         * @param 
++         * @param Subsystem_type AviaryCommon::ResourceType*
++         * @param Pool std::string
++         * @param Name std::string
++         * @param Custom_name std::string
++         * @return newly created ResourceID object
++         */
++        ResourceID(AviaryCommon::ResourceType* arg_Subsystem_type,std::string arg_Pool,std::string arg_Name,std::string arg_Custom_name);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for subsystem_type. 
++         * @return AviaryCommon::ResourceType*
++         */
++        WSF_EXTERN AviaryCommon::ResourceType* WSF_CALL
++        getSubsystem_type();
++
++        /**
++         * Setter for subsystem_type.
++         * @param arg_Subsystem_type AviaryCommon::ResourceType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSubsystem_type(AviaryCommon::ResourceType*  arg_Subsystem_type);
++
++        /**
++         * Re setter for subsystem_type
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetSubsystem_type();
++        
++        
++
++        /**
++         * Getter for pool. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getPool();
++
++        /**
++         * Setter for pool.
++         * @param arg_Pool std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPool(const std::string  arg_Pool);
++
++        /**
++         * Re setter for pool
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPool();
++        
++        
++
++        /**
++         * Getter for name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getName();
++
++        /**
++         * Setter for name.
++         * @param arg_Name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setName(const std::string  arg_Name);
++
++        /**
++         * Re setter for name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetName();
++        
++        
++
++        /**
++         * Getter for custom_name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getCustom_name();
++
++        /**
++         * Setter for custom_name.
++         * @param arg_Custom_name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setCustom_name(const std::string  arg_Custom_name);
++
++        /**
++         * Re setter for custom_name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetCustom_name();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether subsystem_type is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSubsystem_typeNil();
++
++
++        
++
++        /**
++         * Check whether pool is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPoolNil();
++
++
++        
++
++        /**
++         * Check whether name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isNameNil();
++
++
++        
++
++        /**
++         * Check whether custom_name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isCustom_nameNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ResourceID_om_node node to serialize from
++         * @param ResourceID_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ResourceID_om_node, axiom_element_t *ResourceID_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ResourceID is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for subsystem_type by property number (1)
++         * @return AviaryCommon::ResourceType
++         */
++
++        AviaryCommon::ResourceType* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for pool by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for name by property number (3)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for custom_name by property number (4)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty4();
++
++    
++
++};
++
++}        
++ #endif /* RESOURCEID_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_ResourceType.h b/src/condor_contrib/aviary/include/AviaryCommon_ResourceType.h
+new file mode 100644
+index 0000000..dd42777
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_ResourceType.h
+@@ -0,0 +1,252 @@
++
++
++        #ifndef AviaryCommon_RESOURCETYPE_H
++        #define AviaryCommon_RESOURCETYPE_H
++
++       /**
++        * ResourceType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ResourceType class
++        */
++
++        namespace AviaryCommon{
++            class ResourceType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            ResourceType_COLLECTOR,
++            ResourceType_EXECUTOR,
++            ResourceType_EVENT_SERVER,
++            ResourceType_JOB_SERVER,
++            ResourceType_LOW_LATENCY,
++            ResourceType_MASTER,
++            ResourceType_NEGOTIATOR,
++            ResourceType_SCHEDULER,
++            ResourceType_CUSTOM
++        } ADBResourceTypeEnum;
++        
++        
++
++        class ResourceType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_ResourceType;
++
++                
++                bool isValidResourceType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setResourceTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ResourceType
++         */
++
++        ResourceType();
++
++        /**
++         * Destructor ResourceType
++         */
++        ~ResourceType();
++
++
++       
++
++        /**
++         * Constructor for creating ResourceType
++         * @param 
++         * @param ResourceType std::string
++         * @return newly created ResourceType object
++         */
++        ResourceType(std::string arg_ResourceType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for ResourceType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getResourceType();
++
++        /**
++         * Setter for ResourceType.
++         * @param arg_ResourceType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setResourceType(const std::string  arg_ResourceType);
++
++        /**
++         * Re setter for ResourceType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetResourceType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for ResourceType.
++            * @return ADBResourceTypeEnum; -1 on failure
++            */
++            ADBResourceTypeEnum WSF_CALL
++            getResourceTypeEnum();
++            
++            /**
++            * Enum setter for ResourceType.
++            * @param arg_ResourceType ADBResourceTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setResourceTypeEnum(
++            const ADBResourceTypeEnum arg_ResourceType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ResourceType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isResourceTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ResourceType_om_node node to serialize from
++         * @param ResourceType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ResourceType_om_node, axiom_element_t *ResourceType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ResourceType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ResourceType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* RESOURCETYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_Status.h b/src/condor_contrib/aviary/include/AviaryCommon_Status.h
+new file mode 100644
+index 0000000..6c72d49
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_Status.h
+@@ -0,0 +1,253 @@
++
++
++        #ifndef AviaryCommon_STATUS_H
++        #define AviaryCommon_STATUS_H
++
++       /**
++        * Status.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  Status class
++        */
++
++        namespace AviaryCommon{
++            class Status;
++        }
++        
++
++        
++       #include "AviaryCommon_StatusCodeType.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class Status {
++
++        private:
++             AviaryCommon::StatusCodeType* property_Code;
++
++                
++                bool isValidCode;
++            std::string property_Text;
++
++                
++                bool isValidText;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setCodeNil();
++            
++
++        bool WSF_CALL
++        setTextNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class Status
++         */
++
++        Status();
++
++        /**
++         * Destructor Status
++         */
++        ~Status();
++
++
++       
++
++        /**
++         * Constructor for creating Status
++         * @param 
++         * @param Code AviaryCommon::StatusCodeType*
++         * @param Text std::string
++         * @return newly created Status object
++         */
++        Status(AviaryCommon::StatusCodeType* arg_Code,std::string arg_Text);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for code. 
++         * @return AviaryCommon::StatusCodeType*
++         */
++        WSF_EXTERN AviaryCommon::StatusCodeType* WSF_CALL
++        getCode();
++
++        /**
++         * Setter for code.
++         * @param arg_Code AviaryCommon::StatusCodeType*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setCode(AviaryCommon::StatusCodeType*  arg_Code);
++
++        /**
++         * Re setter for code
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetCode();
++        
++        
++
++        /**
++         * Getter for text. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getText();
++
++        /**
++         * Setter for text.
++         * @param arg_Text std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setText(const std::string  arg_Text);
++
++        /**
++         * Re setter for text
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetText();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether code is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isCodeNil();
++
++
++        
++
++        /**
++         * Check whether text is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isTextNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param Status_om_node node to serialize from
++         * @param Status_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* Status_om_node, axiom_element_t *Status_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the Status is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for code by property number (1)
++         * @return AviaryCommon::StatusCodeType
++         */
++
++        AviaryCommon::StatusCodeType* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for text by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* STATUS_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_StatusCodeType.h b/src/condor_contrib/aviary/include/AviaryCommon_StatusCodeType.h
+new file mode 100644
+index 0000000..bb71f9b
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_StatusCodeType.h
+@@ -0,0 +1,249 @@
++
++
++        #ifndef AviaryCommon_STATUSCODETYPE_H
++        #define AviaryCommon_STATUSCODETYPE_H
++
++       /**
++        * StatusCodeType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  StatusCodeType class
++        */
++
++        namespace AviaryCommon{
++            class StatusCodeType;
++        }
++        
++
++        
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        /* Enumeration for this type */
++        typedef enum {
++            StatusCodeType_OK,
++            StatusCodeType_FAIL,
++            StatusCodeType_NO_MATCH,
++            StatusCodeType_INVALID_OFFSET,
++            StatusCodeType_UNIMPLEMENTED,
++            StatusCodeType_UNAVAILABLE
++        } ADBStatusCodeTypeEnum;
++        
++        
++
++        class StatusCodeType {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_StatusCodeType;
++
++                
++                bool isValidStatusCodeType;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setStatusCodeTypeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class StatusCodeType
++         */
++
++        StatusCodeType();
++
++        /**
++         * Destructor StatusCodeType
++         */
++        ~StatusCodeType();
++
++
++       
++
++        /**
++         * Constructor for creating StatusCodeType
++         * @param 
++         * @param StatusCodeType std::string
++         * @return newly created StatusCodeType object
++         */
++        StatusCodeType(std::string arg_StatusCodeType);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for StatusCodeType. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getStatusCodeType();
++
++        /**
++         * Setter for StatusCodeType.
++         * @param arg_StatusCodeType std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatusCodeType(const std::string  arg_StatusCodeType);
++
++        /**
++         * Re setter for StatusCodeType
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatusCodeType();
++        
++            
++            /************************** Getters and Setters For Enumerations ********************************/
++            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/
++            
++            /**
++            * Enum getter for StatusCodeType.
++            * @return ADBStatusCodeTypeEnum; -1 on failure
++            */
++            ADBStatusCodeTypeEnum WSF_CALL
++            getStatusCodeTypeEnum();
++            
++            /**
++            * Enum setter for StatusCodeType.
++            * @param arg_StatusCodeType ADBStatusCodeTypeEnum
++            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
++            */
++            bool WSF_CALL
++            setStatusCodeTypeEnum(
++            const ADBStatusCodeTypeEnum arg_StatusCodeType);
++            
++          
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether StatusCodeType is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusCodeTypeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the content from a string to an ADB object
++         * @param node_value to deserialize
++         * @param parent_element The parent element if it is an element, NULL otherwise
++         * @return true on success, false otherwise
++         */
++       bool WSF_CALL
++       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++        /**
++         * Serialize ADB object to a string
++         * @param namespaces hash which contains a mapping of namespace uris to prefixes
++         * @return serialized string
++         */
++         char* WSF_CALL
++         serializeToString(axutil_hash_t *namespaces);
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param StatusCodeType_om_node node to serialize from
++         * @param StatusCodeType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* StatusCodeType_om_node, axiom_element_t *StatusCodeType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the StatusCodeType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for StatusCodeType by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* STATUSCODETYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_SubmissionID.h b/src/condor_contrib/aviary/include/AviaryCommon_SubmissionID.h
+new file mode 100644
+index 0000000..f4abae2
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_SubmissionID.h
+@@ -0,0 +1,251 @@
++
++
++        #ifndef AviaryCommon_SUBMISSIONID_H
++        #define AviaryCommon_SUBMISSIONID_H
++
++       /**
++        * SubmissionID.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SubmissionID class
++        */
++
++        namespace AviaryCommon{
++            class SubmissionID;
++        }
++        
++
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class SubmissionID {
++
++        private:
++             std::string property_Name;
++
++                
++                bool isValidName;
++            std::string property_Owner;
++
++                
++                bool isValidOwner;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setNameNil();
++            
++
++        bool WSF_CALL
++        setOwnerNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SubmissionID
++         */
++
++        SubmissionID();
++
++        /**
++         * Destructor SubmissionID
++         */
++        ~SubmissionID();
++
++
++       
++
++        /**
++         * Constructor for creating SubmissionID
++         * @param 
++         * @param Name std::string
++         * @param Owner std::string
++         * @return newly created SubmissionID object
++         */
++        SubmissionID(std::string arg_Name,std::string arg_Owner);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getName();
++
++        /**
++         * Setter for name.
++         * @param arg_Name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setName(const std::string  arg_Name);
++
++        /**
++         * Re setter for name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetName();
++        
++        
++
++        /**
++         * Getter for owner. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getOwner();
++
++        /**
++         * Setter for owner.
++         * @param arg_Owner std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setOwner(const std::string  arg_Owner);
++
++        /**
++         * Re setter for owner
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetOwner();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isNameNil();
++
++
++        
++
++        /**
++         * Check whether owner is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isOwnerNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SubmissionID_om_node node to serialize from
++         * @param SubmissionID_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SubmissionID_om_node, axiom_element_t *SubmissionID_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SubmissionID is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for name by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for owner by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* SUBMISSIONID_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryCommon_SubmissionSummary.h b/src/condor_contrib/aviary/include/AviaryCommon_SubmissionSummary.h
+new file mode 100644
+index 0000000..f72562e
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryCommon_SubmissionSummary.h
+@@ -0,0 +1,678 @@
++
++
++        #ifndef AviaryCommon_SUBMISSIONSUMMARY_H
++        #define AviaryCommon_SUBMISSIONSUMMARY_H
++
++       /**
++        * SubmissionSummary.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SubmissionSummary class
++        */
++
++        namespace AviaryCommon{
++            class SubmissionSummary;
++        }
++        
++
++        
++       #include "AviaryCommon_SubmissionID.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++       #include "AviaryCommon_JobSummary.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryCommon
++{
++        
++        
++
++        class SubmissionSummary {
++
++        private:
++             AviaryCommon::SubmissionID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            int property_Completed;
++
++                
++                bool isValidCompleted;
++            int property_Held;
++
++                
++                bool isValidHeld;
++            int property_Idle;
++
++                
++                bool isValidIdle;
++            int property_Removed;
++
++                
++                bool isValidRemoved;
++            int property_Running;
++
++                
++                bool isValidRunning;
++            std::vector<AviaryCommon::JobSummary*>* property_Jobs;
++
++                
++                bool isValidJobs;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++        bool WSF_CALL
++        setCompletedNil();
++            
++
++        bool WSF_CALL
++        setHeldNil();
++            
++
++        bool WSF_CALL
++        setIdleNil();
++            
++
++        bool WSF_CALL
++        setRemovedNil();
++            
++
++        bool WSF_CALL
++        setRunningNil();
++            
++
++        bool WSF_CALL
++        setJobsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SubmissionSummary
++         */
++
++        SubmissionSummary();
++
++        /**
++         * Destructor SubmissionSummary
++         */
++        ~SubmissionSummary();
++
++
++       
++
++        /**
++         * Constructor for creating SubmissionSummary
++         * @param 
++         * @param Id AviaryCommon::SubmissionID*
++         * @param Status AviaryCommon::Status*
++         * @param Completed int
++         * @param Held int
++         * @param Idle int
++         * @param Removed int
++         * @param Running int
++         * @param Jobs std::vector<AviaryCommon::JobSummary*>*
++         * @return newly created SubmissionSummary object
++         */
++        SubmissionSummary(AviaryCommon::SubmissionID* arg_Id,AviaryCommon::Status* arg_Status,int arg_Completed,int arg_Held,int arg_Idle,int arg_Removed,int arg_Running,std::vector<AviaryCommon::JobSummary*>* arg_Jobs);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::SubmissionID*
++         */
++        WSF_EXTERN AviaryCommon::SubmissionID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::SubmissionID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::SubmissionID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++        
++
++        /**
++         * Getter for completed. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getCompleted();
++
++        /**
++         * Setter for completed.
++         * @param arg_Completed int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setCompleted(const int  arg_Completed);
++
++        /**
++         * Re setter for completed
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetCompleted();
++        
++        
++
++        /**
++         * Getter for held. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getHeld();
++
++        /**
++         * Setter for held.
++         * @param arg_Held int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setHeld(const int  arg_Held);
++
++        /**
++         * Re setter for held
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetHeld();
++        
++        
++
++        /**
++         * Getter for idle. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getIdle();
++
++        /**
++         * Setter for idle.
++         * @param arg_Idle int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIdle(const int  arg_Idle);
++
++        /**
++         * Re setter for idle
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIdle();
++        
++        
++
++        /**
++         * Getter for removed. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getRemoved();
++
++        /**
++         * Setter for removed.
++         * @param arg_Removed int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRemoved(const int  arg_Removed);
++
++        /**
++         * Re setter for removed
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRemoved();
++        
++        
++
++        /**
++         * Getter for running. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getRunning();
++
++        /**
++         * Setter for running.
++         * @param arg_Running int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRunning(const int  arg_Running);
++
++        /**
++         * Re setter for running
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRunning();
++        
++        
++
++        /**
++         * Getter for jobs. Deprecated for array types, Use getJobsAt instead
++         * @return Array of AviaryCommon::JobSummary*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++        getJobs();
++
++        /**
++         * Setter for jobs.Deprecated for array types, Use setJobsAt
++         * or addJobs instead.
++         * @param arg_Jobs Array of AviaryCommon::JobSummary*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobs(std::vector<AviaryCommon::JobSummary*>*  arg_Jobs);
++
++        /**
++         * Re setter for jobs
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobs();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of jobs.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobSummary* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobSummary* WSF_CALL
++        getJobsAt(int i);
++
++        /**
++         * Set the ith element of jobs. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Jobs element to set AviaryCommon::JobSummary* to the array
++         * @return ith AviaryCommon::JobSummary* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobsAt(int i,
++                AviaryCommon::JobSummary* arg_Jobs);
++
++
++        /**
++         * Add to jobs.
++         * @param arg_Jobs element to add AviaryCommon::JobSummary* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addJobs(
++            AviaryCommon::JobSummary* arg_Jobs);
++
++        /**
++         * Get the size of the jobs array.
++         * @return the size of the jobs array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofJobs();
++
++        /**
++         * Remove the ith element of jobs.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeJobsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**
++         * Check whether completed is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isCompletedNil();
++
++
++        
++
++        /**
++         * Check whether held is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isHeldNil();
++
++
++        
++
++        /**
++         * Check whether idle is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdleNil();
++
++
++        
++
++        /**
++         * Check whether removed is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRemovedNil();
++
++
++        
++
++        /**
++         * Check whether running is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRunningNil();
++
++
++        
++
++        /**
++         * Check whether jobs is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether jobs is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNilAt(int i);
++ 
++       
++        /**
++         * Set jobs to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setJobsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SubmissionSummary_om_node node to serialize from
++         * @param SubmissionSummary_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SubmissionSummary_om_node, axiom_element_t *SubmissionSummary_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SubmissionSummary is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::SubmissionID
++         */
++
++        AviaryCommon::SubmissionID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for completed by property number (3)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for held by property number (4)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty4();
++
++    
++        
++
++        /**
++         * Getter for idle by property number (5)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty5();
++
++    
++        
++
++        /**
++         * Getter for removed by property number (6)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty6();
++
++    
++        
++
++        /**
++         * Getter for running by property number (7)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty7();
++
++    
++        
++
++        /**
++         * Getter for jobs by property number (8)
++         * @return Array of AviaryCommon::JobSummarys.
++         */
++
++        std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++        getProperty8();
++
++    
++
++};
++
++}        
++ #endif /* SUBMISSIONSUMMARY_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_ControlJob.h b/src/condor_contrib/aviary/include/AviaryJob_ControlJob.h
+new file mode 100644
+index 0000000..381e631
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_ControlJob.h
+@@ -0,0 +1,253 @@
++
++
++        #ifndef AviaryJob_CONTROLJOB_H
++        #define AviaryJob_CONTROLJOB_H
++
++       /**
++        * ControlJob.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ControlJob class
++        */
++
++        namespace AviaryJob{
++            class ControlJob;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class ControlJob {
++
++        private:
++             AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            std::string property_Reason;
++
++                
++                bool isValidReason;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setReasonNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ControlJob
++         */
++
++        ControlJob();
++
++        /**
++         * Destructor ControlJob
++         */
++        ~ControlJob();
++
++
++       
++
++        /**
++         * Constructor for creating ControlJob
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Reason std::string
++         * @return newly created ControlJob object
++         */
++        ControlJob(AviaryCommon::JobID* arg_Id,std::string arg_Reason);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for reason. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getReason();
++
++        /**
++         * Setter for reason.
++         * @param arg_Reason std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setReason(const std::string  arg_Reason);
++
++        /**
++         * Re setter for reason
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetReason();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether reason is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isReasonNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ControlJob_om_node node to serialize from
++         * @param ControlJob_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ControlJob_om_node, axiom_element_t *ControlJob_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ControlJob is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for reason by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* CONTROLJOB_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_ControlJobResponse.h b/src/condor_contrib/aviary/include/AviaryJob_ControlJobResponse.h
+new file mode 100644
+index 0000000..cf03407
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_ControlJobResponse.h
+@@ -0,0 +1,199 @@
++
++
++        #ifndef AviaryJob_CONTROLJOBRESPONSE_H
++        #define AviaryJob_CONTROLJOBRESPONSE_H
++
++       /**
++        * ControlJobResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ControlJobResponse class
++        */
++
++        namespace AviaryJob{
++            class ControlJobResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_Status.h"
++          
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class ControlJobResponse {
++
++        private:
++             AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ControlJobResponse
++         */
++
++        ControlJobResponse();
++
++        /**
++         * Destructor ControlJobResponse
++         */
++        ~ControlJobResponse();
++
++
++       
++
++        /**
++         * Constructor for creating ControlJobResponse
++         * @param 
++         * @param Status AviaryCommon::Status*
++         * @return newly created ControlJobResponse object
++         */
++        ControlJobResponse(AviaryCommon::Status* arg_Status);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ControlJobResponse_om_node node to serialize from
++         * @param ControlJobResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ControlJobResponse_om_node, axiom_element_t *ControlJobResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ControlJobResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for status by property number (1)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* CONTROLJOBRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_HoldJob.h b/src/condor_contrib/aviary/include/AviaryJob_HoldJob.h
+new file mode 100644
+index 0000000..119d76f
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_HoldJob.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_HOLDJOB_H
++        #define AviaryJob_HOLDJOB_H
++
++       /**
++        * HoldJob.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  HoldJob class
++        */
++
++        namespace AviaryJob{
++            class HoldJob;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJob.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class HoldJob {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJob* property_HoldJob;
++
++                
++                bool isValidHoldJob;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setHoldJobNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class HoldJob
++         */
++
++        HoldJob();
++
++        /**
++         * Destructor HoldJob
++         */
++        ~HoldJob();
++
++
++       
++
++        /**
++         * Constructor for creating HoldJob
++         * @param 
++         * @param HoldJob AviaryJob::ControlJob*
++         * @return newly created HoldJob object
++         */
++        HoldJob(AviaryJob::ControlJob* arg_HoldJob);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for HoldJob. 
++         * @return AviaryJob::ControlJob*
++         */
++        WSF_EXTERN AviaryJob::ControlJob* WSF_CALL
++        getHoldJob();
++
++        /**
++         * Setter for HoldJob.
++         * @param arg_HoldJob AviaryJob::ControlJob*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setHoldJob(AviaryJob::ControlJob*  arg_HoldJob);
++
++        /**
++         * Re setter for HoldJob
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetHoldJob();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether HoldJob is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isHoldJobNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param HoldJob_om_node node to serialize from
++         * @param HoldJob_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* HoldJob_om_node, axiom_element_t *HoldJob_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the HoldJob is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for HoldJob by property number (1)
++         * @return AviaryJob::ControlJob
++         */
++
++        AviaryJob::ControlJob* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* HOLDJOB_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_HoldJobResponse.h b/src/condor_contrib/aviary/include/AviaryJob_HoldJobResponse.h
+new file mode 100644
+index 0000000..3b8d1da
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_HoldJobResponse.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_HOLDJOBRESPONSE_H
++        #define AviaryJob_HOLDJOBRESPONSE_H
++
++       /**
++        * HoldJobResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  HoldJobResponse class
++        */
++
++        namespace AviaryJob{
++            class HoldJobResponse;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJobResponse.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class HoldJobResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJobResponse* property_HoldJobResponse;
++
++                
++                bool isValidHoldJobResponse;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setHoldJobResponseNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class HoldJobResponse
++         */
++
++        HoldJobResponse();
++
++        /**
++         * Destructor HoldJobResponse
++         */
++        ~HoldJobResponse();
++
++
++       
++
++        /**
++         * Constructor for creating HoldJobResponse
++         * @param 
++         * @param HoldJobResponse AviaryJob::ControlJobResponse*
++         * @return newly created HoldJobResponse object
++         */
++        HoldJobResponse(AviaryJob::ControlJobResponse* arg_HoldJobResponse);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for HoldJobResponse. 
++         * @return AviaryJob::ControlJobResponse*
++         */
++        WSF_EXTERN AviaryJob::ControlJobResponse* WSF_CALL
++        getHoldJobResponse();
++
++        /**
++         * Setter for HoldJobResponse.
++         * @param arg_HoldJobResponse AviaryJob::ControlJobResponse*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setHoldJobResponse(AviaryJob::ControlJobResponse*  arg_HoldJobResponse);
++
++        /**
++         * Re setter for HoldJobResponse
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetHoldJobResponse();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether HoldJobResponse is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isHoldJobResponseNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param HoldJobResponse_om_node node to serialize from
++         * @param HoldJobResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* HoldJobResponse_om_node, axiom_element_t *HoldJobResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the HoldJobResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for HoldJobResponse by property number (1)
++         * @return AviaryJob::ControlJobResponse
++         */
++
++        AviaryJob::ControlJobResponse* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* HOLDJOBRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_ReleaseJob.h b/src/condor_contrib/aviary/include/AviaryJob_ReleaseJob.h
+new file mode 100644
+index 0000000..9fc3c14
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_ReleaseJob.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_RELEASEJOB_H
++        #define AviaryJob_RELEASEJOB_H
++
++       /**
++        * ReleaseJob.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ReleaseJob class
++        */
++
++        namespace AviaryJob{
++            class ReleaseJob;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJob.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class ReleaseJob {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJob* property_ReleaseJob;
++
++                
++                bool isValidReleaseJob;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setReleaseJobNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ReleaseJob
++         */
++
++        ReleaseJob();
++
++        /**
++         * Destructor ReleaseJob
++         */
++        ~ReleaseJob();
++
++
++       
++
++        /**
++         * Constructor for creating ReleaseJob
++         * @param 
++         * @param ReleaseJob AviaryJob::ControlJob*
++         * @return newly created ReleaseJob object
++         */
++        ReleaseJob(AviaryJob::ControlJob* arg_ReleaseJob);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for ReleaseJob. 
++         * @return AviaryJob::ControlJob*
++         */
++        WSF_EXTERN AviaryJob::ControlJob* WSF_CALL
++        getReleaseJob();
++
++        /**
++         * Setter for ReleaseJob.
++         * @param arg_ReleaseJob AviaryJob::ControlJob*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setReleaseJob(AviaryJob::ControlJob*  arg_ReleaseJob);
++
++        /**
++         * Re setter for ReleaseJob
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetReleaseJob();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ReleaseJob is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isReleaseJobNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ReleaseJob_om_node node to serialize from
++         * @param ReleaseJob_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ReleaseJob_om_node, axiom_element_t *ReleaseJob_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ReleaseJob is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ReleaseJob by property number (1)
++         * @return AviaryJob::ControlJob
++         */
++
++        AviaryJob::ControlJob* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* RELEASEJOB_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_ReleaseJobResponse.h b/src/condor_contrib/aviary/include/AviaryJob_ReleaseJobResponse.h
+new file mode 100644
+index 0000000..6247516
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_ReleaseJobResponse.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_RELEASEJOBRESPONSE_H
++        #define AviaryJob_RELEASEJOBRESPONSE_H
++
++       /**
++        * ReleaseJobResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  ReleaseJobResponse class
++        */
++
++        namespace AviaryJob{
++            class ReleaseJobResponse;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJobResponse.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class ReleaseJobResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJobResponse* property_ReleaseJobResponse;
++
++                
++                bool isValidReleaseJobResponse;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setReleaseJobResponseNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class ReleaseJobResponse
++         */
++
++        ReleaseJobResponse();
++
++        /**
++         * Destructor ReleaseJobResponse
++         */
++        ~ReleaseJobResponse();
++
++
++       
++
++        /**
++         * Constructor for creating ReleaseJobResponse
++         * @param 
++         * @param ReleaseJobResponse AviaryJob::ControlJobResponse*
++         * @return newly created ReleaseJobResponse object
++         */
++        ReleaseJobResponse(AviaryJob::ControlJobResponse* arg_ReleaseJobResponse);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for ReleaseJobResponse. 
++         * @return AviaryJob::ControlJobResponse*
++         */
++        WSF_EXTERN AviaryJob::ControlJobResponse* WSF_CALL
++        getReleaseJobResponse();
++
++        /**
++         * Setter for ReleaseJobResponse.
++         * @param arg_ReleaseJobResponse AviaryJob::ControlJobResponse*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setReleaseJobResponse(AviaryJob::ControlJobResponse*  arg_ReleaseJobResponse);
++
++        /**
++         * Re setter for ReleaseJobResponse
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetReleaseJobResponse();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ReleaseJobResponse is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isReleaseJobResponseNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param ReleaseJobResponse_om_node node to serialize from
++         * @param ReleaseJobResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* ReleaseJobResponse_om_node, axiom_element_t *ReleaseJobResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the ReleaseJobResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ReleaseJobResponse by property number (1)
++         * @return AviaryJob::ControlJobResponse
++         */
++
++        AviaryJob::ControlJobResponse* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* RELEASEJOBRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_RemoveJob.h b/src/condor_contrib/aviary/include/AviaryJob_RemoveJob.h
+new file mode 100644
+index 0000000..7d66ddc
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_RemoveJob.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_REMOVEJOB_H
++        #define AviaryJob_REMOVEJOB_H
++
++       /**
++        * RemoveJob.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  RemoveJob class
++        */
++
++        namespace AviaryJob{
++            class RemoveJob;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJob.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class RemoveJob {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJob* property_RemoveJob;
++
++                
++                bool isValidRemoveJob;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setRemoveJobNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class RemoveJob
++         */
++
++        RemoveJob();
++
++        /**
++         * Destructor RemoveJob
++         */
++        ~RemoveJob();
++
++
++       
++
++        /**
++         * Constructor for creating RemoveJob
++         * @param 
++         * @param RemoveJob AviaryJob::ControlJob*
++         * @return newly created RemoveJob object
++         */
++        RemoveJob(AviaryJob::ControlJob* arg_RemoveJob);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for RemoveJob. 
++         * @return AviaryJob::ControlJob*
++         */
++        WSF_EXTERN AviaryJob::ControlJob* WSF_CALL
++        getRemoveJob();
++
++        /**
++         * Setter for RemoveJob.
++         * @param arg_RemoveJob AviaryJob::ControlJob*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRemoveJob(AviaryJob::ControlJob*  arg_RemoveJob);
++
++        /**
++         * Re setter for RemoveJob
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRemoveJob();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether RemoveJob is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRemoveJobNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param RemoveJob_om_node node to serialize from
++         * @param RemoveJob_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* RemoveJob_om_node, axiom_element_t *RemoveJob_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the RemoveJob is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for RemoveJob by property number (1)
++         * @return AviaryJob::ControlJob
++         */
++
++        AviaryJob::ControlJob* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* REMOVEJOB_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_RemoveJobResponse.h b/src/condor_contrib/aviary/include/AviaryJob_RemoveJobResponse.h
+new file mode 100644
+index 0000000..eb67b57
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_RemoveJobResponse.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_REMOVEJOBRESPONSE_H
++        #define AviaryJob_REMOVEJOBRESPONSE_H
++
++       /**
++        * RemoveJobResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  RemoveJobResponse class
++        */
++
++        namespace AviaryJob{
++            class RemoveJobResponse;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJobResponse.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class RemoveJobResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJobResponse* property_RemoveJobResponse;
++
++                
++                bool isValidRemoveJobResponse;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setRemoveJobResponseNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class RemoveJobResponse
++         */
++
++        RemoveJobResponse();
++
++        /**
++         * Destructor RemoveJobResponse
++         */
++        ~RemoveJobResponse();
++
++
++       
++
++        /**
++         * Constructor for creating RemoveJobResponse
++         * @param 
++         * @param RemoveJobResponse AviaryJob::ControlJobResponse*
++         * @return newly created RemoveJobResponse object
++         */
++        RemoveJobResponse(AviaryJob::ControlJobResponse* arg_RemoveJobResponse);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for RemoveJobResponse. 
++         * @return AviaryJob::ControlJobResponse*
++         */
++        WSF_EXTERN AviaryJob::ControlJobResponse* WSF_CALL
++        getRemoveJobResponse();
++
++        /**
++         * Setter for RemoveJobResponse.
++         * @param arg_RemoveJobResponse AviaryJob::ControlJobResponse*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRemoveJobResponse(AviaryJob::ControlJobResponse*  arg_RemoveJobResponse);
++
++        /**
++         * Re setter for RemoveJobResponse
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRemoveJobResponse();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether RemoveJobResponse is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRemoveJobResponseNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param RemoveJobResponse_om_node node to serialize from
++         * @param RemoveJobResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* RemoveJobResponse_om_node, axiom_element_t *RemoveJobResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the RemoveJobResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for RemoveJobResponse by property number (1)
++         * @return AviaryJob::ControlJobResponse
++         */
++
++        AviaryJob::ControlJobResponse* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* REMOVEJOBRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_SetJobAttribute.h b/src/condor_contrib/aviary/include/AviaryJob_SetJobAttribute.h
+new file mode 100644
+index 0000000..a046279
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_SetJobAttribute.h
+@@ -0,0 +1,259 @@
++
++
++        #ifndef AviaryJob_SETJOBATTRIBUTE_H
++        #define AviaryJob_SETJOBATTRIBUTE_H
++
++       /**
++        * SetJobAttribute.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SetJobAttribute class
++        */
++
++        namespace AviaryJob{
++            class SetJobAttribute;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_Attribute.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class SetJobAttribute {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Attribute* property_Attribute;
++
++                
++                bool isValidAttribute;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setAttributeNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SetJobAttribute
++         */
++
++        SetJobAttribute();
++
++        /**
++         * Destructor SetJobAttribute
++         */
++        ~SetJobAttribute();
++
++
++       
++
++        /**
++         * Constructor for creating SetJobAttribute
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Attribute AviaryCommon::Attribute*
++         * @return newly created SetJobAttribute object
++         */
++        SetJobAttribute(AviaryCommon::JobID* arg_Id,AviaryCommon::Attribute* arg_Attribute);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for attribute. 
++         * @return AviaryCommon::Attribute*
++         */
++        WSF_EXTERN AviaryCommon::Attribute* WSF_CALL
++        getAttribute();
++
++        /**
++         * Setter for attribute.
++         * @param arg_Attribute AviaryCommon::Attribute*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAttribute(AviaryCommon::Attribute*  arg_Attribute);
++
++        /**
++         * Re setter for attribute
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetAttribute();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether attribute is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isAttributeNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SetJobAttribute_om_node node to serialize from
++         * @param SetJobAttribute_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SetJobAttribute_om_node, axiom_element_t *SetJobAttribute_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SetJobAttribute is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for attribute by property number (2)
++         * @return AviaryCommon::Attribute
++         */
++
++        AviaryCommon::Attribute* WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* SETJOBATTRIBUTE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_SetJobAttributeResponse.h b/src/condor_contrib/aviary/include/AviaryJob_SetJobAttributeResponse.h
+new file mode 100644
+index 0000000..8d39178
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_SetJobAttributeResponse.h
+@@ -0,0 +1,203 @@
++
++
++        #ifndef AviaryJob_SETJOBATTRIBUTERESPONSE_H
++        #define AviaryJob_SETJOBATTRIBUTERESPONSE_H
++
++       /**
++        * SetJobAttributeResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SetJobAttributeResponse class
++        */
++
++        namespace AviaryJob{
++            class SetJobAttributeResponse;
++        }
++        
++
++        
++       #include "AviaryJob_ControlJobResponse.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class SetJobAttributeResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryJob::ControlJobResponse* property_SetJobAttributeResponse;
++
++                
++                bool isValidSetJobAttributeResponse;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setSetJobAttributeResponseNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SetJobAttributeResponse
++         */
++
++        SetJobAttributeResponse();
++
++        /**
++         * Destructor SetJobAttributeResponse
++         */
++        ~SetJobAttributeResponse();
++
++
++       
++
++        /**
++         * Constructor for creating SetJobAttributeResponse
++         * @param 
++         * @param SetJobAttributeResponse AviaryJob::ControlJobResponse*
++         * @return newly created SetJobAttributeResponse object
++         */
++        SetJobAttributeResponse(AviaryJob::ControlJobResponse* arg_SetJobAttributeResponse);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for SetJobAttributeResponse. 
++         * @return AviaryJob::ControlJobResponse*
++         */
++        WSF_EXTERN AviaryJob::ControlJobResponse* WSF_CALL
++        getSetJobAttributeResponse();
++
++        /**
++         * Setter for SetJobAttributeResponse.
++         * @param arg_SetJobAttributeResponse AviaryJob::ControlJobResponse*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSetJobAttributeResponse(AviaryJob::ControlJobResponse*  arg_SetJobAttributeResponse);
++
++        /**
++         * Re setter for SetJobAttributeResponse
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetSetJobAttributeResponse();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether SetJobAttributeResponse is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSetJobAttributeResponseNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SetJobAttributeResponse_om_node node to serialize from
++         * @param SetJobAttributeResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SetJobAttributeResponse_om_node, axiom_element_t *SetJobAttributeResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SetJobAttributeResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for SetJobAttributeResponse by property number (1)
++         * @return AviaryJob::ControlJobResponse
++         */
++
++        AviaryJob::ControlJobResponse* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* SETJOBATTRIBUTERESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_SubmitJob.h b/src/condor_contrib/aviary/include/AviaryJob_SubmitJob.h
+new file mode 100644
+index 0000000..e26d8ed
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_SubmitJob.h
+@@ -0,0 +1,747 @@
++
++
++        #ifndef AviaryJob_SUBMITJOB_H
++        #define AviaryJob_SUBMITJOB_H
++
++       /**
++        * SubmitJob.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SubmitJob class
++        */
++
++        namespace AviaryJob{
++            class SubmitJob;
++        }
++        
++
++        
++       #include "AviaryCommon_ResourceConstraint.h"
++          
++       #include "AviaryCommon_Attribute.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class SubmitJob {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::string property_Cmd;
++
++                
++                bool isValidCmd;
++            std::string property_Args;
++
++                
++                bool isValidArgs;
++            std::string property_Owner;
++
++                
++                bool isValidOwner;
++            std::string property_Iwd;
++
++                
++                bool isValidIwd;
++            std::string property_Submission_name;
++
++                
++                bool isValidSubmission_name;
++            std::vector<AviaryCommon::ResourceConstraint*>* property_Requirements;
++
++                
++                bool isValidRequirements;
++            std::vector<AviaryCommon::Attribute*>* property_Extra;
++
++                
++                bool isValidExtra;
++            bool property_AllowOverrides;
++
++                
++                bool isValidAllowOverrides;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setCmdNil();
++            
++
++        bool WSF_CALL
++        setArgsNil();
++            
++
++        bool WSF_CALL
++        setOwnerNil();
++            
++
++        bool WSF_CALL
++        setIwdNil();
++            
++
++        bool WSF_CALL
++        setSubmission_nameNil();
++            
++
++        bool WSF_CALL
++        setRequirementsNil();
++            
++
++        bool WSF_CALL
++        setExtraNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SubmitJob
++         */
++
++        SubmitJob();
++
++        /**
++         * Destructor SubmitJob
++         */
++        ~SubmitJob();
++
++
++       
++
++        /**
++         * Constructor for creating SubmitJob
++         * @param 
++         * @param Cmd std::string
++         * @param Args std::string
++         * @param Owner std::string
++         * @param Iwd std::string
++         * @param Submission_name std::string
++         * @param Requirements std::vector<AviaryCommon::ResourceConstraint*>*
++         * @param Extra std::vector<AviaryCommon::Attribute*>*
++         * @param AllowOverrides bool
++         * @return newly created SubmitJob object
++         */
++        SubmitJob(std::string arg_Cmd,std::string arg_Args,std::string arg_Owner,std::string arg_Iwd,std::string arg_Submission_name,std::vector<AviaryCommon::ResourceConstraint*>* arg_Requirements,std::vector<AviaryCommon::Attribute*>* arg_Extra,bool arg_AllowOverrides);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for cmd. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getCmd();
++
++        /**
++         * Setter for cmd.
++         * @param arg_Cmd std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setCmd(const std::string  arg_Cmd);
++
++        /**
++         * Re setter for cmd
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetCmd();
++        
++        
++
++        /**
++         * Getter for args. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getArgs();
++
++        /**
++         * Setter for args.
++         * @param arg_Args std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setArgs(const std::string  arg_Args);
++
++        /**
++         * Re setter for args
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetArgs();
++        
++        
++
++        /**
++         * Getter for owner. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getOwner();
++
++        /**
++         * Setter for owner.
++         * @param arg_Owner std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setOwner(const std::string  arg_Owner);
++
++        /**
++         * Re setter for owner
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetOwner();
++        
++        
++
++        /**
++         * Getter for iwd. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getIwd();
++
++        /**
++         * Setter for iwd.
++         * @param arg_Iwd std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIwd(const std::string  arg_Iwd);
++
++        /**
++         * Re setter for iwd
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIwd();
++        
++        
++
++        /**
++         * Getter for submission_name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getSubmission_name();
++
++        /**
++         * Setter for submission_name.
++         * @param arg_Submission_name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSubmission_name(const std::string  arg_Submission_name);
++
++        /**
++         * Re setter for submission_name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetSubmission_name();
++        
++        
++
++        /**
++         * Getter for requirements. Deprecated for array types, Use getRequirementsAt instead
++         * @return Array of AviaryCommon::ResourceConstraint*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::ResourceConstraint*>* WSF_CALL
++        getRequirements();
++
++        /**
++         * Setter for requirements.Deprecated for array types, Use setRequirementsAt
++         * or addRequirements instead.
++         * @param arg_Requirements Array of AviaryCommon::ResourceConstraint*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRequirements(std::vector<AviaryCommon::ResourceConstraint*>*  arg_Requirements);
++
++        /**
++         * Re setter for requirements
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetRequirements();
++        
++        
++
++        /**
++         * Getter for extra. Deprecated for array types, Use getExtraAt instead
++         * @return Array of AviaryCommon::Attribute*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::Attribute*>* WSF_CALL
++        getExtra();
++
++        /**
++         * Setter for extra.Deprecated for array types, Use setExtraAt
++         * or addExtra instead.
++         * @param arg_Extra Array of AviaryCommon::Attribute*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setExtra(std::vector<AviaryCommon::Attribute*>*  arg_Extra);
++
++        /**
++         * Re setter for extra
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetExtra();
++        
++        
++
++        /**
++         * Getter for allowOverrides. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getAllowOverrides();
++
++        /**
++         * Setter for allowOverrides.
++         * @param arg_AllowOverrides bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAllowOverrides(bool  arg_AllowOverrides);
++
++        /**
++         * Re setter for allowOverrides
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetAllowOverrides();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of requirements.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::ResourceConstraint* of the array
++         */
++        WSF_EXTERN AviaryCommon::ResourceConstraint* WSF_CALL
++        getRequirementsAt(int i);
++
++        /**
++         * Set the ith element of requirements. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Requirements element to set AviaryCommon::ResourceConstraint* to the array
++         * @return ith AviaryCommon::ResourceConstraint* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setRequirementsAt(int i,
++                AviaryCommon::ResourceConstraint* arg_Requirements);
++
++
++        /**
++         * Add to requirements.
++         * @param arg_Requirements element to add AviaryCommon::ResourceConstraint* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addRequirements(
++            AviaryCommon::ResourceConstraint* arg_Requirements);
++
++        /**
++         * Get the size of the requirements array.
++         * @return the size of the requirements array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofRequirements();
++
++        /**
++         * Remove the ith element of requirements.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeRequirementsAt(int i);
++
++        
++        
++        /**
++         * Get the ith element of extra.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::Attribute* of the array
++         */
++        WSF_EXTERN AviaryCommon::Attribute* WSF_CALL
++        getExtraAt(int i);
++
++        /**
++         * Set the ith element of extra. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Extra element to set AviaryCommon::Attribute* to the array
++         * @return ith AviaryCommon::Attribute* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setExtraAt(int i,
++                AviaryCommon::Attribute* arg_Extra);
++
++
++        /**
++         * Add to extra.
++         * @param arg_Extra element to add AviaryCommon::Attribute* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addExtra(
++            AviaryCommon::Attribute* arg_Extra);
++
++        /**
++         * Get the size of the extra array.
++         * @return the size of the extra array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofExtra();
++
++        /**
++         * Remove the ith element of extra.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeExtraAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether cmd is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isCmdNil();
++
++
++        
++
++        /**
++         * Check whether args is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isArgsNil();
++
++
++        
++
++        /**
++         * Check whether owner is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isOwnerNil();
++
++
++        
++
++        /**
++         * Check whether iwd is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIwdNil();
++
++
++        
++
++        /**
++         * Check whether submission_name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSubmission_nameNil();
++
++
++        
++
++        /**
++         * Check whether requirements is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isRequirementsNil();
++
++
++        
++
++        /**
++         * Check whether extra is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isExtraNil();
++
++
++        
++
++        /**
++         * Check whether allowOverrides is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isAllowOverridesNil();
++
++
++        
++        /**
++         * Set allowOverrides to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setAllowOverridesNil();
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether requirements is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isRequirementsNilAt(int i);
++ 
++       
++        /**
++         * Set requirements to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setRequirementsNilAt(int i);
++
++        
++        /**
++         * Check whether extra is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isExtraNilAt(int i);
++ 
++       
++        /**
++         * Set extra to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setExtraNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SubmitJob_om_node node to serialize from
++         * @param SubmitJob_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SubmitJob_om_node, axiom_element_t *SubmitJob_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SubmitJob is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for cmd by property number (1)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for args by property number (2)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for owner by property number (3)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for iwd by property number (4)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty4();
++
++    
++        
++
++        /**
++         * Getter for submission_name by property number (5)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty5();
++
++    
++        
++
++        /**
++         * Getter for requirements by property number (6)
++         * @return Array of AviaryCommon::ResourceConstraints.
++         */
++
++        std::vector<AviaryCommon::ResourceConstraint*>* WSF_CALL
++        getProperty6();
++
++    
++        
++
++        /**
++         * Getter for extra by property number (7)
++         * @return Array of AviaryCommon::Attributes.
++         */
++
++        std::vector<AviaryCommon::Attribute*>* WSF_CALL
++        getProperty7();
++
++    
++        
++
++        /**
++         * Getter for allowOverrides by property number (8)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty8();
++
++    
++
++};
++
++}        
++ #endif /* SUBMITJOB_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryJob_SubmitJobResponse.h b/src/condor_contrib/aviary/include/AviaryJob_SubmitJobResponse.h
+new file mode 100644
+index 0000000..42b32fd
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryJob_SubmitJobResponse.h
+@@ -0,0 +1,259 @@
++
++
++        #ifndef AviaryJob_SUBMITJOBRESPONSE_H
++        #define AviaryJob_SUBMITJOBRESPONSE_H
++
++       /**
++        * SubmitJobResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  SubmitJobResponse class
++        */
++
++        namespace AviaryJob{
++            class SubmitJobResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryJob
++{
++        
++        
++
++        class SubmitJobResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryCommon::JobID* property_Id;
++
++                
++                bool isValidId;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class SubmitJobResponse
++         */
++
++        SubmitJobResponse();
++
++        /**
++         * Destructor SubmitJobResponse
++         */
++        ~SubmitJobResponse();
++
++
++       
++
++        /**
++         * Constructor for creating SubmitJobResponse
++         * @param 
++         * @param Id AviaryCommon::JobID*
++         * @param Status AviaryCommon::Status*
++         * @return newly created SubmitJobResponse object
++         */
++        SubmitJobResponse(AviaryCommon::JobID* arg_Id,AviaryCommon::Status* arg_Status);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for id. 
++         * @return AviaryCommon::JobID*
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getId();
++
++        /**
++         * Setter for id.
++         * @param arg_Id AviaryCommon::JobID*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setId(AviaryCommon::JobID*  arg_Id);
++
++        /**
++         * Re setter for id
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetId();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether id is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param SubmitJobResponse_om_node node to serialize from
++         * @param SubmitJobResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* SubmitJobResponse_om_node, axiom_element_t *SubmitJobResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the SubmitJobResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for id by property number (1)
++         * @return AviaryCommon::JobID
++         */
++
++        AviaryCommon::JobID* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* SUBMITJOBRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobData.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobData.h
+new file mode 100644
+index 0000000..9439d0a
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobData.h
+@@ -0,0 +1,311 @@
++
++
++        #ifndef AviaryQuery_GETJOBDATA_H
++        #define AviaryQuery_GETJOBDATA_H
++
++       /**
++        * GetJobData.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobData class
++        */
++
++        namespace AviaryQuery{
++            class GetJobData;
++        }
++        
++
++        
++       #include "AviaryCommon_JobData.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobData {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryCommon::JobData* property_Data;
++
++                
++                bool isValidData;
++            int property_Max_bytes;
++
++                
++                bool isValidMax_bytes;
++            bool property_From_end;
++
++                
++                bool isValidFrom_end;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setDataNil();
++            
++
++        bool WSF_CALL
++        setMax_bytesNil();
++            
++
++        bool WSF_CALL
++        setFrom_endNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobData
++         */
++
++        GetJobData();
++
++        /**
++         * Destructor GetJobData
++         */
++        ~GetJobData();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobData
++         * @param 
++         * @param Data AviaryCommon::JobData*
++         * @param Max_bytes int
++         * @param From_end bool
++         * @return newly created GetJobData object
++         */
++        GetJobData(AviaryCommon::JobData* arg_Data,int arg_Max_bytes,bool arg_From_end);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for data. 
++         * @return AviaryCommon::JobData*
++         */
++        WSF_EXTERN AviaryCommon::JobData* WSF_CALL
++        getData();
++
++        /**
++         * Setter for data.
++         * @param arg_Data AviaryCommon::JobData*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setData(AviaryCommon::JobData*  arg_Data);
++
++        /**
++         * Re setter for data
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetData();
++        
++        
++
++        /**
++         * Getter for max_bytes. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getMax_bytes();
++
++        /**
++         * Setter for max_bytes.
++         * @param arg_Max_bytes int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setMax_bytes(const int  arg_Max_bytes);
++
++        /**
++         * Re setter for max_bytes
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetMax_bytes();
++        
++        
++
++        /**
++         * Getter for from_end. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getFrom_end();
++
++        /**
++         * Setter for from_end.
++         * @param arg_From_end bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setFrom_end(bool  arg_From_end);
++
++        /**
++         * Re setter for from_end
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetFrom_end();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether data is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isDataNil();
++
++
++        
++
++        /**
++         * Check whether max_bytes is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isMax_bytesNil();
++
++
++        
++
++        /**
++         * Check whether from_end is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isFrom_endNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobData_om_node node to serialize from
++         * @param GetJobData_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobData_om_node, axiom_element_t *GetJobData_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobData is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for data by property number (1)
++         * @return AviaryCommon::JobData
++         */
++
++        AviaryCommon::JobData* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for max_bytes by property number (2)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for from_end by property number (3)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty3();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBDATA_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobDataResponse.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDataResponse.h
+new file mode 100644
+index 0000000..6acae59
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDataResponse.h
+@@ -0,0 +1,421 @@
++
++
++        #ifndef AviaryQuery_GETJOBDATARESPONSE_H
++        #define AviaryQuery_GETJOBDATARESPONSE_H
++
++       /**
++        * GetJobDataResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobDataResponse class
++        */
++
++        namespace AviaryQuery{
++            class GetJobDataResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_JobData.h"
++          
++       #include "AviaryCommon_Status.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobDataResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            AviaryCommon::JobData* property_Data;
++
++                
++                bool isValidData;
++            AviaryCommon::Status* property_Status;
++
++                
++                bool isValidStatus;
++            std::string property_File_name;
++
++                
++                bool isValidFile_name;
++            int property_File_size;
++
++                
++                bool isValidFile_size;
++            std::string property_Content;
++
++                
++                bool isValidContent;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setDataNil();
++            
++
++        bool WSF_CALL
++        setStatusNil();
++            
++
++        bool WSF_CALL
++        setFile_nameNil();
++            
++
++        bool WSF_CALL
++        setFile_sizeNil();
++            
++
++        bool WSF_CALL
++        setContentNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobDataResponse
++         */
++
++        GetJobDataResponse();
++
++        /**
++         * Destructor GetJobDataResponse
++         */
++        ~GetJobDataResponse();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobDataResponse
++         * @param 
++         * @param Data AviaryCommon::JobData*
++         * @param Status AviaryCommon::Status*
++         * @param File_name std::string
++         * @param File_size int
++         * @param Content std::string
++         * @return newly created GetJobDataResponse object
++         */
++        GetJobDataResponse(AviaryCommon::JobData* arg_Data,AviaryCommon::Status* arg_Status,std::string arg_File_name,int arg_File_size,std::string arg_Content);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for data. 
++         * @return AviaryCommon::JobData*
++         */
++        WSF_EXTERN AviaryCommon::JobData* WSF_CALL
++        getData();
++
++        /**
++         * Setter for data.
++         * @param arg_Data AviaryCommon::JobData*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setData(AviaryCommon::JobData*  arg_Data);
++
++        /**
++         * Re setter for data
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetData();
++        
++        
++
++        /**
++         * Getter for status. 
++         * @return AviaryCommon::Status*
++         */
++        WSF_EXTERN AviaryCommon::Status* WSF_CALL
++        getStatus();
++
++        /**
++         * Setter for status.
++         * @param arg_Status AviaryCommon::Status*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setStatus(AviaryCommon::Status*  arg_Status);
++
++        /**
++         * Re setter for status
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetStatus();
++        
++        
++
++        /**
++         * Getter for file_name. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getFile_name();
++
++        /**
++         * Setter for file_name.
++         * @param arg_File_name std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setFile_name(const std::string  arg_File_name);
++
++        /**
++         * Re setter for file_name
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetFile_name();
++        
++        
++
++        /**
++         * Getter for file_size. 
++         * @return int*
++         */
++        WSF_EXTERN int WSF_CALL
++        getFile_size();
++
++        /**
++         * Setter for file_size.
++         * @param arg_File_size int*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setFile_size(const int  arg_File_size);
++
++        /**
++         * Re setter for file_size
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetFile_size();
++        
++        
++
++        /**
++         * Getter for content. 
++         * @return std::string*
++         */
++        WSF_EXTERN std::string WSF_CALL
++        getContent();
++
++        /**
++         * Setter for content.
++         * @param arg_Content std::string*
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setContent(const std::string  arg_Content);
++
++        /**
++         * Re setter for content
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetContent();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether data is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isDataNil();
++
++
++        
++
++        /**
++         * Check whether status is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isStatusNil();
++
++
++        
++
++        /**
++         * Check whether file_name is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isFile_nameNil();
++
++
++        
++
++        /**
++         * Check whether file_size is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isFile_sizeNil();
++
++
++        
++
++        /**
++         * Check whether content is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isContentNil();
++
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobDataResponse_om_node node to serialize from
++         * @param GetJobDataResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobDataResponse_om_node, axiom_element_t *GetJobDataResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobDataResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for data by property number (1)
++         * @return AviaryCommon::JobData
++         */
++
++        AviaryCommon::JobData* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for status by property number (2)
++         * @return AviaryCommon::Status
++         */
++
++        AviaryCommon::Status* WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for file_name by property number (3)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty3();
++
++    
++        
++
++        /**
++         * Getter for file_size by property number (4)
++         * @return int
++         */
++
++        int WSF_CALL
++        getProperty4();
++
++    
++        
++
++        /**
++         * Getter for content by property number (5)
++         * @return std::string
++         */
++
++        std::string WSF_CALL
++        getProperty5();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBDATARESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetails.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetails.h
+new file mode 100644
+index 0000000..adcb87a
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetails.h
+@@ -0,0 +1,357 @@
++
++
++        #ifndef AviaryQuery_GETJOBDETAILS_H
++        #define AviaryQuery_GETJOBDETAILS_H
++
++       /**
++        * GetJobDetails.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobDetails class
++        */
++
++        namespace AviaryQuery{
++            class GetJobDetails;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobDetails {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobID*>* property_Ids;
++
++                
++                bool isValidIds;
++            bool property_PartialMatches;
++
++                
++                bool isValidPartialMatches;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobDetails
++         */
++
++        GetJobDetails();
++
++        /**
++         * Destructor GetJobDetails
++         */
++        ~GetJobDetails();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobDetails
++         * @param 
++         * @param Ids std::vector<AviaryCommon::JobID*>*
++         * @param PartialMatches bool
++         * @return newly created GetJobDetails object
++         */
++        GetJobDetails(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for ids. Deprecated for array types, Use getIdsAt instead
++         * @return Array of AviaryCommon::JobID*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getIds();
++
++        /**
++         * Setter for ids.Deprecated for array types, Use setIdsAt
++         * or addIds instead.
++         * @param arg_Ids Array of AviaryCommon::JobID*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIds(std::vector<AviaryCommon::JobID*>*  arg_Ids);
++
++        /**
++         * Re setter for ids
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIds();
++        
++        
++
++        /**
++         * Getter for partialMatches. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getPartialMatches();
++
++        /**
++         * Setter for partialMatches.
++         * @param arg_PartialMatches bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPartialMatches(bool  arg_PartialMatches);
++
++        /**
++         * Re setter for partialMatches
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPartialMatches();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of ids.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getIdsAt(int i);
++
++        /**
++         * Set the ith element of ids. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Ids element to set AviaryCommon::JobID* to the array
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIdsAt(int i,
++                AviaryCommon::JobID* arg_Ids);
++
++
++        /**
++         * Add to ids.
++         * @param arg_Ids element to add AviaryCommon::JobID* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addIds(
++            AviaryCommon::JobID* arg_Ids);
++
++        /**
++         * Get the size of the ids array.
++         * @return the size of the ids array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofIds();
++
++        /**
++         * Remove the ith element of ids.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeIdsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ids is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNil();
++
++
++        
++
++        /**
++         * Check whether partialMatches is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPartialMatchesNil();
++
++
++        
++        /**
++         * Set partialMatches to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setPartialMatchesNil();
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether ids is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNilAt(int i);
++ 
++       
++        /**
++         * Set ids to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setIdsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobDetails_om_node node to serialize from
++         * @param GetJobDetails_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobDetails_om_node, axiom_element_t *GetJobDetails_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobDetails is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ids by property number (1)
++         * @return Array of AviaryCommon::JobIDs.
++         */
++
++        std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for partialMatches by property number (2)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBDETAILS_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetailsResponse.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetailsResponse.h
+new file mode 100644
+index 0000000..d8bfb23
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobDetailsResponse.h
+@@ -0,0 +1,300 @@
++
++
++        #ifndef AviaryQuery_GETJOBDETAILSRESPONSE_H
++        #define AviaryQuery_GETJOBDETAILSRESPONSE_H
++
++       /**
++        * GetJobDetailsResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobDetailsResponse class
++        */
++
++        namespace AviaryQuery{
++            class GetJobDetailsResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_JobDetails.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobDetailsResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobDetails*>* property_Jobs;
++
++                
++                bool isValidJobs;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobDetailsResponse
++         */
++
++        GetJobDetailsResponse();
++
++        /**
++         * Destructor GetJobDetailsResponse
++         */
++        ~GetJobDetailsResponse();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobDetailsResponse
++         * @param 
++         * @param Jobs std::vector<AviaryCommon::JobDetails*>*
++         * @return newly created GetJobDetailsResponse object
++         */
++        GetJobDetailsResponse(std::vector<AviaryCommon::JobDetails*>* arg_Jobs);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for jobs. Deprecated for array types, Use getJobsAt instead
++         * @return Array of AviaryCommon::JobDetails*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobDetails*>* WSF_CALL
++        getJobs();
++
++        /**
++         * Setter for jobs.Deprecated for array types, Use setJobsAt
++         * or addJobs instead.
++         * @param arg_Jobs Array of AviaryCommon::JobDetails*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobs(std::vector<AviaryCommon::JobDetails*>*  arg_Jobs);
++
++        /**
++         * Re setter for jobs
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobs();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of jobs.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobDetails* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobDetails* WSF_CALL
++        getJobsAt(int i);
++
++        /**
++         * Set the ith element of jobs. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Jobs element to set AviaryCommon::JobDetails* to the array
++         * @return ith AviaryCommon::JobDetails* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobsAt(int i,
++                AviaryCommon::JobDetails* arg_Jobs);
++
++
++        /**
++         * Add to jobs.
++         * @param arg_Jobs element to add AviaryCommon::JobDetails* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addJobs(
++            AviaryCommon::JobDetails* arg_Jobs);
++
++        /**
++         * Get the size of the jobs array.
++         * @return the size of the jobs array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofJobs();
++
++        /**
++         * Remove the ith element of jobs.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeJobsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether jobs is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether jobs is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNilAt(int i);
++ 
++       
++        /**
++         * Set jobs to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setJobsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobDetailsResponse_om_node node to serialize from
++         * @param GetJobDetailsResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobDetailsResponse_om_node, axiom_element_t *GetJobDetailsResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobDetailsResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for jobs by property number (1)
++         * @return Array of AviaryCommon::JobDetailss.
++         */
++
++        std::vector<AviaryCommon::JobDetails*>* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBDETAILSRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatus.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatus.h
+new file mode 100644
+index 0000000..aa9142f
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatus.h
+@@ -0,0 +1,357 @@
++
++
++        #ifndef AviaryQuery_GETJOBSTATUS_H
++        #define AviaryQuery_GETJOBSTATUS_H
++
++       /**
++        * GetJobStatus.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobStatus class
++        */
++
++        namespace AviaryQuery{
++            class GetJobStatus;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobStatus {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobID*>* property_Ids;
++
++                
++                bool isValidIds;
++            bool property_PartialMatches;
++
++                
++                bool isValidPartialMatches;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobStatus
++         */
++
++        GetJobStatus();
++
++        /**
++         * Destructor GetJobStatus
++         */
++        ~GetJobStatus();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobStatus
++         * @param 
++         * @param Ids std::vector<AviaryCommon::JobID*>*
++         * @param PartialMatches bool
++         * @return newly created GetJobStatus object
++         */
++        GetJobStatus(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for ids. Deprecated for array types, Use getIdsAt instead
++         * @return Array of AviaryCommon::JobID*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getIds();
++
++        /**
++         * Setter for ids.Deprecated for array types, Use setIdsAt
++         * or addIds instead.
++         * @param arg_Ids Array of AviaryCommon::JobID*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIds(std::vector<AviaryCommon::JobID*>*  arg_Ids);
++
++        /**
++         * Re setter for ids
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIds();
++        
++        
++
++        /**
++         * Getter for partialMatches. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getPartialMatches();
++
++        /**
++         * Setter for partialMatches.
++         * @param arg_PartialMatches bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPartialMatches(bool  arg_PartialMatches);
++
++        /**
++         * Re setter for partialMatches
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPartialMatches();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of ids.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getIdsAt(int i);
++
++        /**
++         * Set the ith element of ids. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Ids element to set AviaryCommon::JobID* to the array
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIdsAt(int i,
++                AviaryCommon::JobID* arg_Ids);
++
++
++        /**
++         * Add to ids.
++         * @param arg_Ids element to add AviaryCommon::JobID* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addIds(
++            AviaryCommon::JobID* arg_Ids);
++
++        /**
++         * Get the size of the ids array.
++         * @return the size of the ids array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofIds();
++
++        /**
++         * Remove the ith element of ids.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeIdsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ids is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNil();
++
++
++        
++
++        /**
++         * Check whether partialMatches is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPartialMatchesNil();
++
++
++        
++        /**
++         * Set partialMatches to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setPartialMatchesNil();
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether ids is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNilAt(int i);
++ 
++       
++        /**
++         * Set ids to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setIdsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobStatus_om_node node to serialize from
++         * @param GetJobStatus_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobStatus_om_node, axiom_element_t *GetJobStatus_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobStatus is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ids by property number (1)
++         * @return Array of AviaryCommon::JobIDs.
++         */
++
++        std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for partialMatches by property number (2)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBSTATUS_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatusResponse.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatusResponse.h
+new file mode 100644
+index 0000000..d75adb5
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobStatusResponse.h
+@@ -0,0 +1,300 @@
++
++
++        #ifndef AviaryQuery_GETJOBSTATUSRESPONSE_H
++        #define AviaryQuery_GETJOBSTATUSRESPONSE_H
++
++       /**
++        * GetJobStatusResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobStatusResponse class
++        */
++
++        namespace AviaryQuery{
++            class GetJobStatusResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_JobStatus.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobStatusResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobStatus*>* property_Jobs;
++
++                
++                bool isValidJobs;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobStatusResponse
++         */
++
++        GetJobStatusResponse();
++
++        /**
++         * Destructor GetJobStatusResponse
++         */
++        ~GetJobStatusResponse();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobStatusResponse
++         * @param 
++         * @param Jobs std::vector<AviaryCommon::JobStatus*>*
++         * @return newly created GetJobStatusResponse object
++         */
++        GetJobStatusResponse(std::vector<AviaryCommon::JobStatus*>* arg_Jobs);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for jobs. Deprecated for array types, Use getJobsAt instead
++         * @return Array of AviaryCommon::JobStatus*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobStatus*>* WSF_CALL
++        getJobs();
++
++        /**
++         * Setter for jobs.Deprecated for array types, Use setJobsAt
++         * or addJobs instead.
++         * @param arg_Jobs Array of AviaryCommon::JobStatus*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobs(std::vector<AviaryCommon::JobStatus*>*  arg_Jobs);
++
++        /**
++         * Re setter for jobs
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobs();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of jobs.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobStatus* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobStatus* WSF_CALL
++        getJobsAt(int i);
++
++        /**
++         * Set the ith element of jobs. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Jobs element to set AviaryCommon::JobStatus* to the array
++         * @return ith AviaryCommon::JobStatus* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobsAt(int i,
++                AviaryCommon::JobStatus* arg_Jobs);
++
++
++        /**
++         * Add to jobs.
++         * @param arg_Jobs element to add AviaryCommon::JobStatus* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addJobs(
++            AviaryCommon::JobStatus* arg_Jobs);
++
++        /**
++         * Get the size of the jobs array.
++         * @return the size of the jobs array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofJobs();
++
++        /**
++         * Remove the ith element of jobs.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeJobsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether jobs is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether jobs is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNilAt(int i);
++ 
++       
++        /**
++         * Set jobs to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setJobsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobStatusResponse_om_node node to serialize from
++         * @param GetJobStatusResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobStatusResponse_om_node, axiom_element_t *GetJobStatusResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobStatusResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for jobs by property number (1)
++         * @return Array of AviaryCommon::JobStatuss.
++         */
++
++        std::vector<AviaryCommon::JobStatus*>* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBSTATUSRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummary.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummary.h
+new file mode 100644
+index 0000000..9751a88
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummary.h
+@@ -0,0 +1,357 @@
++
++
++        #ifndef AviaryQuery_GETJOBSUMMARY_H
++        #define AviaryQuery_GETJOBSUMMARY_H
++
++       /**
++        * GetJobSummary.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobSummary class
++        */
++
++        namespace AviaryQuery{
++            class GetJobSummary;
++        }
++        
++
++        
++       #include "AviaryCommon_JobID.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobSummary {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobID*>* property_Ids;
++
++                
++                bool isValidIds;
++            bool property_PartialMatches;
++
++                
++                bool isValidPartialMatches;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobSummary
++         */
++
++        GetJobSummary();
++
++        /**
++         * Destructor GetJobSummary
++         */
++        ~GetJobSummary();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobSummary
++         * @param 
++         * @param Ids std::vector<AviaryCommon::JobID*>*
++         * @param PartialMatches bool
++         * @return newly created GetJobSummary object
++         */
++        GetJobSummary(std::vector<AviaryCommon::JobID*>* arg_Ids,bool arg_PartialMatches);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for ids. Deprecated for array types, Use getIdsAt instead
++         * @return Array of AviaryCommon::JobID*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getIds();
++
++        /**
++         * Setter for ids.Deprecated for array types, Use setIdsAt
++         * or addIds instead.
++         * @param arg_Ids Array of AviaryCommon::JobID*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIds(std::vector<AviaryCommon::JobID*>*  arg_Ids);
++
++        /**
++         * Re setter for ids
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIds();
++        
++        
++
++        /**
++         * Getter for partialMatches. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getPartialMatches();
++
++        /**
++         * Setter for partialMatches.
++         * @param arg_PartialMatches bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPartialMatches(bool  arg_PartialMatches);
++
++        /**
++         * Re setter for partialMatches
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPartialMatches();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of ids.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobID* WSF_CALL
++        getIdsAt(int i);
++
++        /**
++         * Set the ith element of ids. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Ids element to set AviaryCommon::JobID* to the array
++         * @return ith AviaryCommon::JobID* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIdsAt(int i,
++                AviaryCommon::JobID* arg_Ids);
++
++
++        /**
++         * Add to ids.
++         * @param arg_Ids element to add AviaryCommon::JobID* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addIds(
++            AviaryCommon::JobID* arg_Ids);
++
++        /**
++         * Get the size of the ids array.
++         * @return the size of the ids array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofIds();
++
++        /**
++         * Remove the ith element of ids.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeIdsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ids is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNil();
++
++
++        
++
++        /**
++         * Check whether partialMatches is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPartialMatchesNil();
++
++
++        
++        /**
++         * Set partialMatches to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setPartialMatchesNil();
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether ids is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNilAt(int i);
++ 
++       
++        /**
++         * Set ids to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setIdsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobSummary_om_node node to serialize from
++         * @param GetJobSummary_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobSummary_om_node, axiom_element_t *GetJobSummary_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobSummary is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ids by property number (1)
++         * @return Array of AviaryCommon::JobIDs.
++         */
++
++        std::vector<AviaryCommon::JobID*>* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for partialMatches by property number (2)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty2();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBSUMMARY_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummaryResponse.h b/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummaryResponse.h
+new file mode 100644
+index 0000000..5946d52
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetJobSummaryResponse.h
+@@ -0,0 +1,300 @@
++
++
++        #ifndef AviaryQuery_GETJOBSUMMARYRESPONSE_H
++        #define AviaryQuery_GETJOBSUMMARYRESPONSE_H
++
++       /**
++        * GetJobSummaryResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetJobSummaryResponse class
++        */
++
++        namespace AviaryQuery{
++            class GetJobSummaryResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_JobSummary.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetJobSummaryResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::JobSummary*>* property_Jobs;
++
++                
++                bool isValidJobs;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setJobsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetJobSummaryResponse
++         */
++
++        GetJobSummaryResponse();
++
++        /**
++         * Destructor GetJobSummaryResponse
++         */
++        ~GetJobSummaryResponse();
++
++
++       
++
++        /**
++         * Constructor for creating GetJobSummaryResponse
++         * @param 
++         * @param Jobs std::vector<AviaryCommon::JobSummary*>*
++         * @return newly created GetJobSummaryResponse object
++         */
++        GetJobSummaryResponse(std::vector<AviaryCommon::JobSummary*>* arg_Jobs);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for jobs. Deprecated for array types, Use getJobsAt instead
++         * @return Array of AviaryCommon::JobSummary*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++        getJobs();
++
++        /**
++         * Setter for jobs.Deprecated for array types, Use setJobsAt
++         * or addJobs instead.
++         * @param arg_Jobs Array of AviaryCommon::JobSummary*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobs(std::vector<AviaryCommon::JobSummary*>*  arg_Jobs);
++
++        /**
++         * Re setter for jobs
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetJobs();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of jobs.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::JobSummary* of the array
++         */
++        WSF_EXTERN AviaryCommon::JobSummary* WSF_CALL
++        getJobsAt(int i);
++
++        /**
++         * Set the ith element of jobs. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Jobs element to set AviaryCommon::JobSummary* to the array
++         * @return ith AviaryCommon::JobSummary* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setJobsAt(int i,
++                AviaryCommon::JobSummary* arg_Jobs);
++
++
++        /**
++         * Add to jobs.
++         * @param arg_Jobs element to add AviaryCommon::JobSummary* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addJobs(
++            AviaryCommon::JobSummary* arg_Jobs);
++
++        /**
++         * Get the size of the jobs array.
++         * @return the size of the jobs array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofJobs();
++
++        /**
++         * Remove the ith element of jobs.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeJobsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether jobs is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether jobs is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isJobsNilAt(int i);
++ 
++       
++        /**
++         * Set jobs to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setJobsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetJobSummaryResponse_om_node node to serialize from
++         * @param GetJobSummaryResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetJobSummaryResponse_om_node, axiom_element_t *GetJobSummaryResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetJobSummaryResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for jobs by property number (1)
++         * @return Array of AviaryCommon::JobSummarys.
++         */
++
++        std::vector<AviaryCommon::JobSummary*>* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* GETJOBSUMMARYRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummary.h b/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummary.h
+new file mode 100644
+index 0000000..0085561
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummary.h
+@@ -0,0 +1,414 @@
++
++
++        #ifndef AviaryQuery_GETSUBMISSIONSUMMARY_H
++        #define AviaryQuery_GETSUBMISSIONSUMMARY_H
++
++       /**
++        * GetSubmissionSummary.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetSubmissionSummary class
++        */
++
++        namespace AviaryQuery{
++            class GetSubmissionSummary;
++        }
++        
++
++        
++       #include "AviaryCommon_SubmissionID.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetSubmissionSummary {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::SubmissionID*>* property_Ids;
++
++                
++                bool isValidIds;
++            bool property_PartialMatches;
++
++                
++                bool isValidPartialMatches;
++            bool property_IncludeJobSummaries;
++
++                
++                bool isValidIncludeJobSummaries;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setIdsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetSubmissionSummary
++         */
++
++        GetSubmissionSummary();
++
++        /**
++         * Destructor GetSubmissionSummary
++         */
++        ~GetSubmissionSummary();
++
++
++       
++
++        /**
++         * Constructor for creating GetSubmissionSummary
++         * @param 
++         * @param Ids std::vector<AviaryCommon::SubmissionID*>*
++         * @param PartialMatches bool
++         * @param IncludeJobSummaries bool
++         * @return newly created GetSubmissionSummary object
++         */
++        GetSubmissionSummary(std::vector<AviaryCommon::SubmissionID*>* arg_Ids,bool arg_PartialMatches,bool arg_IncludeJobSummaries);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for ids. Deprecated for array types, Use getIdsAt instead
++         * @return Array of AviaryCommon::SubmissionID*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::SubmissionID*>* WSF_CALL
++        getIds();
++
++        /**
++         * Setter for ids.Deprecated for array types, Use setIdsAt
++         * or addIds instead.
++         * @param arg_Ids Array of AviaryCommon::SubmissionID*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIds(std::vector<AviaryCommon::SubmissionID*>*  arg_Ids);
++
++        /**
++         * Re setter for ids
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIds();
++        
++        
++
++        /**
++         * Getter for partialMatches. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getPartialMatches();
++
++        /**
++         * Setter for partialMatches.
++         * @param arg_PartialMatches bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setPartialMatches(bool  arg_PartialMatches);
++
++        /**
++         * Re setter for partialMatches
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetPartialMatches();
++        
++        
++
++        /**
++         * Getter for includeJobSummaries. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getIncludeJobSummaries();
++
++        /**
++         * Setter for includeJobSummaries.
++         * @param arg_IncludeJobSummaries bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIncludeJobSummaries(bool  arg_IncludeJobSummaries);
++
++        /**
++         * Re setter for includeJobSummaries
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetIncludeJobSummaries();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of ids.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::SubmissionID* of the array
++         */
++        WSF_EXTERN AviaryCommon::SubmissionID* WSF_CALL
++        getIdsAt(int i);
++
++        /**
++         * Set the ith element of ids. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Ids element to set AviaryCommon::SubmissionID* to the array
++         * @return ith AviaryCommon::SubmissionID* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setIdsAt(int i,
++                AviaryCommon::SubmissionID* arg_Ids);
++
++
++        /**
++         * Add to ids.
++         * @param arg_Ids element to add AviaryCommon::SubmissionID* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addIds(
++            AviaryCommon::SubmissionID* arg_Ids);
++
++        /**
++         * Get the size of the ids array.
++         * @return the size of the ids array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofIds();
++
++        /**
++         * Remove the ith element of ids.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeIdsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether ids is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNil();
++
++
++        
++
++        /**
++         * Check whether partialMatches is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isPartialMatchesNil();
++
++
++        
++        /**
++         * Set partialMatches to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setPartialMatchesNil();
++        
++
++        /**
++         * Check whether includeJobSummaries is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isIncludeJobSummariesNil();
++
++
++        
++        /**
++         * Set includeJobSummaries to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setIncludeJobSummariesNil();
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether ids is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isIdsNilAt(int i);
++ 
++       
++        /**
++         * Set ids to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setIdsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetSubmissionSummary_om_node node to serialize from
++         * @param GetSubmissionSummary_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetSubmissionSummary_om_node, axiom_element_t *GetSubmissionSummary_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetSubmissionSummary is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for ids by property number (1)
++         * @return Array of AviaryCommon::SubmissionIDs.
++         */
++
++        std::vector<AviaryCommon::SubmissionID*>* WSF_CALL
++        getProperty1();
++
++    
++        
++
++        /**
++         * Getter for partialMatches by property number (2)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty2();
++
++    
++        
++
++        /**
++         * Getter for includeJobSummaries by property number (3)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty3();
++
++    
++
++};
++
++}        
++ #endif /* GETSUBMISSIONSUMMARY_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummaryResponse.h b/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummaryResponse.h
+new file mode 100644
+index 0000000..36b5a9e
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_GetSubmissionSummaryResponse.h
+@@ -0,0 +1,300 @@
++
++
++        #ifndef AviaryQuery_GETSUBMISSIONSUMMARYRESPONSE_H
++        #define AviaryQuery_GETSUBMISSIONSUMMARYRESPONSE_H
++
++       /**
++        * GetSubmissionSummaryResponse.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  GetSubmissionSummaryResponse class
++        */
++
++        namespace AviaryQuery{
++            class GetSubmissionSummaryResponse;
++        }
++        
++
++        
++       #include "AviaryCommon_SubmissionSummary.h"
++          
++        #include <axutil_qname.h>
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class GetSubmissionSummaryResponse {
++
++        private:
++             
++                axutil_qname_t* qname;
++            std::vector<AviaryCommon::SubmissionSummary*>* property_Submissions;
++
++                
++                bool isValidSubmissions;
++            
++
++        /*** Private methods ***/
++          
++
++        bool WSF_CALL
++        setSubmissionsNil();
++            
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class GetSubmissionSummaryResponse
++         */
++
++        GetSubmissionSummaryResponse();
++
++        /**
++         * Destructor GetSubmissionSummaryResponse
++         */
++        ~GetSubmissionSummaryResponse();
++
++
++       
++
++        /**
++         * Constructor for creating GetSubmissionSummaryResponse
++         * @param 
++         * @param Submissions std::vector<AviaryCommon::SubmissionSummary*>*
++         * @return newly created GetSubmissionSummaryResponse object
++         */
++        GetSubmissionSummaryResponse(std::vector<AviaryCommon::SubmissionSummary*>* arg_Submissions);
++        
++        
++        /********************************** Class get set methods **************************************/
++        /******** Deprecated for array types, Use 'Getters and Setters for Arrays' instead ***********/
++        
++
++        /**
++         * Getter for submissions. Deprecated for array types, Use getSubmissionsAt instead
++         * @return Array of AviaryCommon::SubmissionSummary*s.
++         */
++        WSF_EXTERN std::vector<AviaryCommon::SubmissionSummary*>* WSF_CALL
++        getSubmissions();
++
++        /**
++         * Setter for submissions.Deprecated for array types, Use setSubmissionsAt
++         * or addSubmissions instead.
++         * @param arg_Submissions Array of AviaryCommon::SubmissionSummary*s.
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSubmissions(std::vector<AviaryCommon::SubmissionSummary*>*  arg_Submissions);
++
++        /**
++         * Re setter for submissions
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetSubmissions();
++        
++        /****************************** Get Set methods for Arrays **********************************/
++        /************ Array Specific Operations: get_at, set_at, add, remove_at, sizeof *****************/
++
++        /**
++         * E.g. use of get_at, set_at, add and sizeof
++         *
++         * for(i = 0; i < adb_element->sizeofProperty(); i ++ )
++         * {
++         *     // Getting ith value to property_object variable
++         *     property_object = adb_element->getPropertyAt(i);
++         *
++         *     // Setting ith value from property_object variable
++         *     adb_element->setPropertyAt(i, property_object);
++         *
++         *     // Appending the value to the end of the array from property_object variable
++         *     adb_element->addProperty(property_object);
++         *
++         *     // Removing the ith value from an array
++         *     adb_element->removePropertyAt(i);
++         *     
++         * }
++         *
++         */
++
++        
++        
++        /**
++         * Get the ith element of submissions.
++        * @param i index of the item to be obtained
++         * @return ith AviaryCommon::SubmissionSummary* of the array
++         */
++        WSF_EXTERN AviaryCommon::SubmissionSummary* WSF_CALL
++        getSubmissionsAt(int i);
++
++        /**
++         * Set the ith element of submissions. (If the ith already exist, it will be replaced)
++         * @param i index of the item to return
++         * @param arg_Submissions element to set AviaryCommon::SubmissionSummary* to the array
++         * @return ith AviaryCommon::SubmissionSummary* of the array
++         */
++        WSF_EXTERN bool WSF_CALL
++        setSubmissionsAt(int i,
++                AviaryCommon::SubmissionSummary* arg_Submissions);
++
++
++        /**
++         * Add to submissions.
++         * @param arg_Submissions element to add AviaryCommon::SubmissionSummary* to the array
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        addSubmissions(
++            AviaryCommon::SubmissionSummary* arg_Submissions);
++
++        /**
++         * Get the size of the submissions array.
++         * @return the size of the submissions array.
++         */
++        WSF_EXTERN int WSF_CALL
++        sizeofSubmissions();
++
++        /**
++         * Remove the ith element of submissions.
++         * @param i index of the item to remove
++         * @return true on success, false otherwise.
++         */
++        WSF_EXTERN bool WSF_CALL
++        removeSubmissionsAt(int i);
++
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        /* Use 'Checking and Setting NIL values for Arrays' to check and set nil for individual elements */
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether submissions is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isSubmissionsNil();
++
++
++        
++
++        /*************************** Checking and Setting 'NIL' values in Arrays *****************************/
++
++        /**
++         * NOTE: You may set this to remove specific elements in the array
++         *       But you can not remove elements, if the specific property is declared to be non-nillable or sizeof(array) < minOccurs
++         */
++        
++        /**
++         * Check whether submissions is Nill at position i
++         * @param i index of the item to return.
++         * @return true if the value is Nil at position i, false otherwise
++         */
++        bool WSF_CALL
++        isSubmissionsNilAt(int i);
++ 
++       
++        /**
++         * Set submissions to NILL at the  position i.
++         * @param i . The index of the item to be set Nill.
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setSubmissionsNilAt(int i);
++
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param GetSubmissionSummaryResponse_om_node node to serialize from
++         * @param GetSubmissionSummaryResponse_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* GetSubmissionSummaryResponse_om_node, axiom_element_t *GetSubmissionSummaryResponse_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the GetSubmissionSummaryResponse is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for submissions by property number (1)
++         * @return Array of AviaryCommon::SubmissionSummarys.
++         */
++
++        std::vector<AviaryCommon::SubmissionSummary*>* WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* GETSUBMISSIONSUMMARYRESPONSE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/include/AviaryQuery_QueryRequestType.h b/src/condor_contrib/aviary/include/AviaryQuery_QueryRequestType.h
+new file mode 100644
+index 0000000..40de943
+--- /dev/null
++++ b/src/condor_contrib/aviary/include/AviaryQuery_QueryRequestType.h
+@@ -0,0 +1,200 @@
++
++
++        #ifndef AviaryQuery_QUERYREQUESTTYPE_H
++        #define AviaryQuery_QUERYREQUESTTYPE_H
++
++       /**
++        * QueryRequestType.h
++        *
++        * This file was auto-generated from WSDL
++        * by the Apache Axis2/Java version: 1.0  Built on : Mar 02, 2011 (11:54:00 EST)
++        */
++
++       /**
++        *  QueryRequestType class
++        */
++
++        namespace AviaryQuery{
++            class QueryRequestType;
++        }
++        
++
++        
++
++        #include <stdio.h>
++        #include <OMElement.h>
++        #include <ServiceClient.h>
++        #include <ADBDefines.h>
++
++namespace AviaryQuery
++{
++        
++        
++
++        class QueryRequestType {
++
++        private:
++             bool property_AllowPartialMatching;
++
++                
++                bool isValidAllowPartialMatching;
++            
++
++        /*** Private methods ***/
++          
++
++
++
++        /******************************* public functions *********************************/
++
++        public:
++
++        /**
++         * Constructor for class QueryRequestType
++         */
++
++        QueryRequestType();
++
++        /**
++         * Destructor QueryRequestType
++         */
++        ~QueryRequestType();
++
++
++       
++
++        /**
++         * Constructor for creating QueryRequestType
++         * @param 
++         * @param AllowPartialMatching bool
++         * @return newly created QueryRequestType object
++         */
++        QueryRequestType(bool arg_AllowPartialMatching);
++        
++        
++        /********************************** Class get set methods **************************************/
++        
++        
++
++        /**
++         * Getter for allowPartialMatching. 
++         * @return bool
++         */
++        WSF_EXTERN bool WSF_CALL
++        getAllowPartialMatching();
++
++        /**
++         * Setter for allowPartialMatching.
++         * @param arg_AllowPartialMatching bool
++         * @return true on success, false otherwise
++         */
++        WSF_EXTERN bool WSF_CALL
++        setAllowPartialMatching(bool  arg_AllowPartialMatching);
++
++        /**
++         * Re setter for allowPartialMatching
++         * @return true on success, false
++         */
++        WSF_EXTERN bool WSF_CALL
++        resetAllowPartialMatching();
++        
++
++
++        /******************************* Checking and Setting NIL values *********************************/
++        
++
++        /**
++         * NOTE: set_nil is only available for nillable properties
++         */
++
++        
++
++        /**
++         * Check whether allowPartialMatching is Nill
++         * @return true if the element is Nil, false otherwise
++         */
++        bool WSF_CALL
++        isAllowPartialMatchingNil();
++
++
++        
++        /**
++         * Set allowPartialMatching to Nill (same as using reset)
++         * @return true on success, false otherwise.
++         */
++        bool WSF_CALL
++        setAllowPartialMatchingNil();
++        
++
++        /**************************** Serialize and De serialize functions ***************************/
++        /*********** These functions are for use only inside the generated code *********************/
++
++        
++        /**
++         * Deserialize the ADB object to an XML
++         * @param dp_parent double pointer to the parent node to be deserialized
++         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
++         * @param dont_care_minoccurs Dont set errors on validating minoccurs, 
++         *              (Parent will order this in a case of choice)
++         * @return true on success, false otherwise
++         */
++        bool WSF_CALL
++        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);
++                         
++            
++
++       /**
++         * Declare namespace in the most parent node 
++         * @param parent_element parent element
++         * @param namespaces hash of namespace uri to prefix
++         * @param next_ns_index pointer to an int which contain the next namespace index
++         */
++        void WSF_CALL
++        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);
++
++
++        
++
++        /**
++         * Serialize the ADB object to an xml
++         * @param QueryRequestType_om_node node to serialize from
++         * @param QueryRequestType_om_element parent element to serialize from
++         * @param tag_closed Whether the parent tag is closed or not
++         * @param namespaces hash of namespace uris to prefixes
++         * @param next_ns_index an int which contains the next namespace index
++         * @return axiom_node_t on success,NULL otherwise.
++         */
++        axiom_node_t* WSF_CALL
++        serialize(axiom_node_t* QueryRequestType_om_node, axiom_element_t *QueryRequestType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);
++
++        /**
++         * Check whether the QueryRequestType is a particle class (E.g. group, inner sequence)
++         * @return true if this is a particle class, false otherwise.
++         */
++        bool WSF_CALL
++        isParticle();
++
++
++
++        /******************************* get the value by the property number  *********************************/
++        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/
++
++      
++        
++
++        /**
++         * Getter for allowPartialMatching by property number (1)
++         * @return bool
++         */
++
++        bool WSF_CALL
++        getProperty1();
++
++    
++
++};
++
++}        
++ #endif /* QUERYREQUESTTYPE_H */
++    
++
+diff --git a/src/condor_contrib/aviary/license.txt b/src/condor_contrib/aviary/license.txt
+new file mode 100644
+index 0000000..046ad71
+--- /dev/null
++++ b/src/condor_contrib/aviary/license.txt
+@@ -0,0 +1,14 @@
++Copyright 2009-2011 Red Hat, Inc.
++
++Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
++
+diff --git a/src/condor_contrib/aviary/services/job/services.xml b/src/condor_contrib/aviary/services/job/services.xml
+new file mode 100644
+index 0000000..ab94581
+--- /dev/null
++++ b/src/condor_contrib/aviary/services/job/services.xml
+@@ -0,0 +1,26 @@
++<!-- This file was auto-generated from WSDL -->
++<!-- by the Apache Axis2 version: 1.0  Built on : Jan 09, 2011 (11:40:28 EST) -->
++<service name="AviaryJobService">
++<parameter name="ServiceClass" locked="xsd:false">aviary_job_axis</parameter>
++<description>AviaryJobServiceService</description>
++<operation name="submitJob" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">job#submit</parameter>
++</operation>
++<operation name="holdJob" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">job#hold</parameter>
++</operation>
++<operation name="releaseJob" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">job#release</parameter>
++</operation>
++<operation name="removeJob" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">job#remove</parameter>
++</operation>
++<operation name="setJobAttribute" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">job#setattr</parameter>
++</operation>
++</service>
+diff --git a/src/condor_contrib/aviary/services/query/services.xml b/src/condor_contrib/aviary/services/query/services.xml
+new file mode 100644
+index 0000000..b516976a
+--- /dev/null
++++ b/src/condor_contrib/aviary/services/query/services.xml
+@@ -0,0 +1,26 @@
++<!-- This file was auto-generated from WSDL -->
++<!-- by the Apache Axis2 version: 1.0  Built on : Mar 02, 2011 (11:53:41 EST) -->
++<service name="AviaryQueryService">
++<parameter name="ServiceClass" locked="xsd:false">aviary_query_axis</parameter>
++<description>AviaryQueryServiceService</description>
++<operation name="getJobSummary" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">query#summary</parameter>
++</operation>
++<operation name="getJobStatus" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">query#status</parameter>
++</operation>
++<operation name="getJobDetails" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">query#details</parameter>
++</operation>
++<operation name="getJobData" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">query#data</parameter>
++</operation>
++<operation name="getSubmissionSummary" mep="http://www.w3.org/2004/08/wsdl/in-out">
++<messageReceiver class="libwsf_cpp_msg_recv.so.0"/>
++<parameter name="wsamapping">query#submission</parameter>
++</operation>
++</service>
+diff --git a/src/condor_contrib/aviary/src/AviaryConversionMacros.h b/src/condor_contrib/aviary/src/AviaryConversionMacros.h
+new file mode 100644
+index 0000000..f809e75
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryConversionMacros.h
+@@ -0,0 +1,82 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef AVIARY_CONVERSION_MACROS_H
++#define AVIARY_CONVERSION_MACROS_H
++
++#define MGMT_DECLARATIONS	\
++ExprTree *expr;				\
++int num;					\
++float flt;					\
++char *str;					\
++(void)expr;(void)num;(void)flt;(void)str;
++
++
++#define BASE(attr,type,lookup_var,set_var,extra)					\
++if (ad.Lookup##type(#attr, lookup_var)) {							\
++	m_stats.attr = ((set_var) extra);						\
++} else {															\
++	dprintf(D_FULLDEBUG, "Warning: Could not find " #attr "\n");		\
++}
++
++#define OPT_BASE(attr,type,lookup_var,set_var,extra)				\
++if (ad.Lookup##type(#attr, lookup_var)) {							\
++	m_stats.attr = ((set_var) extra);						\
++} else {															\
++	m_stats.attr = "";										\
++}
++
++#define STRING(attr)												\
++if (ad.LookupString(#attr, &str)) {									\
++	m_stats.attr = str;									\
++	free(str);														\
++} else {															\
++	dprintf(D_FULLDEBUG, "Warning: Could not find " #attr "\n");		\
++}
++
++#define OPT_STRING(attr)												\
++if (ad.LookupString(#attr, &str)) {									\
++	m_stats.attr = str;									\
++	free(str);														\
++} else {															\
++	m_stats.attr = "";										\
++}
++
++#define INTEGER(attr) BASE(attr,Integer,num,(uint32_t) num,)
++#define OPT_INTEGER(attr) OPT_BASE(attr,Integer,num,(uint32_t) num,)
++#define DOUBLE(attr) BASE(attr,Float,flt,(double) flt,)
++#define OPT_DOUBLE(attr) OPT_BASE(attr,Float,flt,(double) flt,)
++#define TIME_INTEGER(attr) BASE(attr,Integer,num,(uint64_t) num,* 1000000000)
++#define OPT_TIME_INTEGER(attr) OPT_BASE(attr,Integer,num,(uint64_t) num,* 1000000000)
++
++#define EXPR(attr)													\
++	EXPR_BASE(attr,													\
++			  dprintf(D_FULLDEBUG, "Warning: " #attr " not found\n"))
++
++#define OPT_EXPR(attr)											 	\
++	EXPR_BASE(attr,													\
++			  m_stats.attr = "")
++
++#define EXPR_BASE(attr,else_action)									\
++expr = ad.Lookup(#attr);											\
++if (expr) {                                                         \
++      str = const_cast<char*>(ExprTreeToString(expr));              \
++      m_stats.attr = str;                             \
++} else {                                                         \
++      dprintf(D_FULLDEBUG, "Warning: " #attr " has no value\n");    	\
++}
++
++#endif /* AVIARY_CONVERSION_MACROS_H */
+diff --git a/src/condor_contrib/aviary/src/AviaryJobService.cpp b/src/condor_contrib/aviary/src/AviaryJobService.cpp
+new file mode 100644
+index 0000000..ee80c5e
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryJobService.cpp
+@@ -0,0 +1,356 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++        #include "AviaryJobServiceSkeleton.h"
++        #include "AviaryJobService.h"  
++        #include <ServiceSkeleton.h>
++        #include <stdio.h>
++        #include <axis2_svc.h>
++        #include <Environment.h>
++        #include <axiom_soap.h>
++
++
++        using namespace wso2wsf;
++        
++        using namespace AviaryJob;
++        
++
++        /** Load the service into axis2 engine */
++        WSF_SERVICE_INIT(AviaryJobService)
++
++          
++         /**
++          * function to free any soap input headers
++          */
++         AviaryJobService::AviaryJobService()
++	{
++          skel = wsfGetAviaryJobServiceSkeleton();
++    }
++
++
++	void WSF_CALL
++	AviaryJobService::init()
++	{
++
++      return;
++	}
++
++
++	AviaryJobService::~AviaryJobService()
++	{
++    }
++
++
++     
++
++     
++
++
++
++
++	/*
++	 * This method invokes the right service method
++	 */
++	OMElement* WSF_CALL
++	AviaryJobService::invoke(OMElement *omEle, MessageContext *msgCtx)
++	{
++         /* Using the function name, invoke the corresponding method
++          */
++
++          axis2_op_ctx_t *operation_ctx = NULL;
++          axis2_op_t *operation = NULL;
++          axutil_qname_t *op_qname = NULL;
++          axis2_char_t *op_name = NULL;
++          axis2_msg_ctx_t *in_msg_ctx = NULL;
++          
++          axiom_soap_envelope_t *req_soap_env = NULL;
++          axiom_soap_header_t *req_soap_header = NULL;
++          axiom_soap_envelope_t *res_soap_env = NULL;
++          axiom_soap_header_t *res_soap_header = NULL;
++
++          axiom_node_t *ret_node = NULL;
++          axiom_node_t *input_header = NULL;
++          axiom_node_t *output_header = NULL;
++          axiom_node_t *header_base_node = NULL;
++          axis2_msg_ctx_t *msg_ctx = NULL;
++          axiom_node_t* content_node = omEle->getAxiomNode();
++
++          
++            AviaryJob::RemoveJobResponse* ret_val1;
++            AviaryJob::RemoveJob* input_val1;
++            
++            AviaryJob::ReleaseJobResponse* ret_val2;
++            AviaryJob::ReleaseJob* input_val2;
++            
++            AviaryJob::SubmitJobResponse* ret_val3;
++            AviaryJob::SubmitJob* input_val3;
++            
++            AviaryJob::HoldJobResponse* ret_val4;
++            AviaryJob::HoldJob* input_val4;
++            
++            AviaryJob::SetJobAttributeResponse* ret_val5;
++            AviaryJob::SetJobAttribute* input_val5;
++            
++       
++          msg_ctx = msgCtx->getAxis2MessageContext();
++          operation_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, Environment::getEnv());
++          operation = axis2_op_ctx_get_op(operation_ctx, Environment::getEnv());
++          op_qname = (axutil_qname_t *)axis2_op_get_qname(operation, Environment::getEnv());
++          op_name = axutil_qname_get_localpart(op_qname, Environment::getEnv());
++
++          if (op_name)
++          {
++               
++
++                if ( axutil_strcmp(op_name, "removeJob") == 0 )
++                {
++
++                    
++                    input_val1 =
++                        
++                        new AviaryJob::RemoveJob();
++                        if( AXIS2_FAILURE ==  input_val1->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryJob::RemoveJob_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryJobServiceSkeleton skel;
++                        ret_val1 =  skel->removeJob(msgCtx ,input_val1);
++                    
++                        if ( NULL == ret_val1 )
++                        {
++                            
++                                delete input_val1;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val1->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val1;
++                                        
++                                            delete input_val1;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "releaseJob") == 0 )
++                {
++
++                    
++                    input_val2 =
++                        
++                        new AviaryJob::ReleaseJob();
++                        if( AXIS2_FAILURE ==  input_val2->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryJob::ReleaseJob_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryJobServiceSkeleton skel;
++                        ret_val2 =  skel->releaseJob(msgCtx ,input_val2);
++                    
++                        if ( NULL == ret_val2 )
++                        {
++                            
++                                delete input_val2;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val2->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val2;
++                                        
++                                            delete input_val2;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "submitJob") == 0 )
++                {
++
++                    
++                    input_val3 =
++                        
++                        new AviaryJob::SubmitJob();
++                        if( AXIS2_FAILURE ==  input_val3->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryJob::SubmitJob_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryJobServiceSkeleton skel;
++                        ret_val3 =  skel->submitJob(msgCtx ,input_val3);
++                    
++                        if ( NULL == ret_val3 )
++                        {
++                            
++                                delete input_val3;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val3->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val3;
++                                        
++                                            delete input_val3;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "holdJob") == 0 )
++                {
++
++                    
++                    input_val4 =
++                        
++                        new AviaryJob::HoldJob();
++                        if( AXIS2_FAILURE ==  input_val4->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryJob::HoldJob_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryJobServiceSkeleton skel;
++                        ret_val4 =  skel->holdJob(msgCtx ,input_val4);
++                    
++                        if ( NULL == ret_val4 )
++                        {
++                            
++                                delete input_val4;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val4->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val4;
++                                        
++                                            delete input_val4;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "setJobAttribute") == 0 )
++                {
++
++                    
++                    input_val5 =
++                        
++                        new AviaryJob::SetJobAttribute();
++                        if( AXIS2_FAILURE ==  input_val5->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryJob::SetJobAttribute_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryJobServiceSkeleton skel;
++                        ret_val5 =  skel->setJobAttribute(msgCtx ,input_val5);
++                    
++                        if ( NULL == ret_val5 )
++                        {
++                            
++                                delete input_val5;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val5->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val5;
++                                        
++                                            delete input_val5;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++             }
++            
++          AXIS2_LOG_ERROR(Environment::getEnv()->log, AXIS2_LOG_SI, "AviaryJobService service ERROR: invalid OM parameters in request\n");
++          return NULL;
++    }
++
++    OMElement* WSF_CALL
++    AviaryJobService::onFault(OMElement* omEle)
++	{
++		axiom_node_t *error_node = NULL;
++		axiom_element_t *error_ele = NULL;
++        axutil_error_codes_t error_code;
++        axiom_node_t *node = omEle->getAxiomNode();
++        error_code = (axutil_error_codes_t)Environment::getEnv()->error->error_number;
++
++        if(error_code <= AVIARYJOBSERVICESKELETON_ERROR_NONE ||
++                error_code >= AVIARYJOBSERVICESKELETON_ERROR_LAST )
++        {
++            error_ele = axiom_element_create(Environment::getEnv(), node, "fault", NULL,
++                            &error_node);
++            axiom_element_set_text(error_ele, Environment::getEnv(), "AviaryJobService|http://grid.redhat.com/aviary-job/ failed",
++                            error_node);
++        }
++        
++
++		return new OMElement(NULL,error_node);
++	}
++
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryJobService.h b/src/condor_contrib/aviary/src/AviaryJobService.h
+new file mode 100644
+index 0000000..7e0be8b
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryJobService.h
+@@ -0,0 +1,66 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++          #ifndef AVIARYJOBSERVICE_H
++          #define AVIARYJOBSERVICE_H
++
++#include <ServiceSkeleton.h>
++#include <stdio.h>
++#include <axis2_svc.h>
++
++using namespace wso2wsf;
++
++
++using namespace AviaryJob;
++
++
++
++#define WSF_SERVICE_SKEL_INIT(class_name) \
++AviaryJobServiceSkeleton* wsfGetAviaryJobServiceSkeleton(){ return new class_name(); }
++
++AviaryJobServiceSkeleton* wsfGetAviaryJobServiceSkeleton(); 
++
++
++
++        class AviaryJobService : public ServiceSkeleton
++        {
++            private:
++                AviaryJobServiceSkeleton *skel;
++
++            public:
++
++               union {
++                     
++               } fault;
++
++
++              WSF_EXTERN WSF_CALL AviaryJobService();
++
++              OMElement* WSF_CALL invoke(OMElement *message, MessageContext *msgCtx);
++
++              OMElement* WSF_CALL onFault(OMElement *message);
++
++              void WSF_CALL init();
++
++              ~AviaryJobService(); 
++      };
++
++
++
++#endif    //     AVIARYJOBSERVICE_H
++
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryJobServiceMacro.cpp b/src/condor_contrib/aviary/src/AviaryJobServiceMacro.cpp
+new file mode 100644
+index 0000000..76fc6cb
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryJobServiceMacro.cpp
+@@ -0,0 +1,44 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++
++#include "AviaryJobServiceSkeleton.h"
++#include "AviaryJobService.h"
++#include <ServiceSkeleton.h>
++#include <stdio.h>
++#include <axis2_svc.h>
++#include <Environment.h>
++
++using namespace wso2wsf;
++
++using namespace AviaryJob;
++
++
++
++/** Load the service into engine
++Note:- If you are extending from the Generated Skeleton class,you need is to change the argument provided to the
++macro to your derived class name.
++Example
++If your service is Calculator, you will have the business logic implementation class as CalculatorSkeleton.
++If the extended class is CalculatorSkeletonImpl, then you change the argument to the macro WSF_SERVICE_SKEL_INIT as
++WSF_SERVICE_SKEL_INIT(CalculatorSkeletonImpl). Also include the header file of the derived class, in this case CalculatorSkeletonImpl.h
++
++*/
++
++WSF_SERVICE_SKEL_INIT(AviaryJobServiceSkeleton)
++
++
++
+diff --git a/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.cpp b/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.cpp
+new file mode 100644
+index 0000000..884b4af
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.cpp
+@@ -0,0 +1,369 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// the implementation class for AviaryJob methods
++
++// condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_attributes.h"
++
++extern bool qmgmt_all_users_trusted;
++
++// local includes
++#include "AviaryJobServiceSkeleton.h"
++#include <AviaryJob_RemoveJob.h>
++#include <AviaryJob_RemoveJobResponse.h>
++#include <AviaryJob_ReleaseJob.h>
++#include <AviaryJob_ReleaseJobResponse.h>
++#include <AviaryJob_SubmitJob.h>
++#include <AviaryJob_SubmitJobResponse.h>
++#include <AviaryJob_HoldJob.h>
++#include <AviaryJob_HoldJobResponse.h>
++#include <AviaryJob_SetJobAttribute.h>
++#include <AviaryJob_SetJobAttributeResponse.h>
++#include "Codec.h"
++#include "SchedulerObject.h"
++#include "stl_string_utils.h"
++
++using namespace std;
++using namespace AviaryJob;
++using namespace AviaryCommon;
++using namespace aviary::codec;
++using namespace aviary::job;
++using namespace compat_classad;
++
++const char* BASIC_REQ_FORMAT = 
++"\
++( TARGET.Arch %s ) && \
++( %s ) && \
++( TARGET.Disk %s ) && \
++( ( TARGET.Memory * 1024 ) %s ) && \
++( TARGET.FileSystemDomain %s )";
++
++const char* BASIC_OS_FORMAT = "TARGET.OpSys == \"%s\"";
++const char* BASIC_WINOS_FORMAT = "TARGET.OpSys==\"WINNT51\" || TARGET.OpSys==\"WINNT52\" || TARGET.OpSys==\"WINNT60\"";
++const char* REQ_UNDEFINED = " =!= undefined ";
++const char* REQ_GTE_ZERO = " >= 0 ";
++
++//
++// Utility methods START
++//
++
++typedef vector<AviaryCommon::Attribute*> CommonAttributeCollection;
++
++void
++checkForSchedulerID(AviaryCommon::JobID* _jobId, string& _text)
++{
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++	if (!(_jobId->getPool() == schedulerObj->getPool()) ||
++		!(_jobId->getScheduler() == schedulerObj->getName())) {
++	_text = "WARNING: the pool and scheduler names of the requested jobid were empty or did not match this scheduler!";
++	}
++}
++
++void
++buildBasicRequirements(ResourceConstraintVectorType* _constraints, string& _reqs) {
++	// scan through these and build TARGET.<constraint> like string
++	string arch = REQ_UNDEFINED;
++	string opsys = REQ_UNDEFINED;
++	string disk = REQ_GTE_ZERO;
++	string memory = REQ_GTE_ZERO;
++	string filesystem = REQ_UNDEFINED;
++	for ( ResourceConstraintVectorType::const_iterator it = _constraints->begin(); it != _constraints->end();
++		 it++ ) {
++		ResourceConstraint* rc = *it;
++		ADBResourceConstraintTypeEnum rct = rc->getType()->getResourceConstraintTypeEnum();
++		switch (rct) {
++			case ResourceConstraintType_ARCH:
++				arch = " == \"" + rc->getValue() + "\"";
++				break;
++			case ResourceConstraintType_OS:
++				if (rc->getValue() == "WINDOWS") {
++					opsys = BASIC_WINOS_FORMAT;
++				}
++				else {
++					sprintf(opsys,BASIC_OS_FORMAT,rc->getValue().c_str());
++				}
++				break;
++            case ResourceConstraintType_DISK:
++				disk = " >= " + rc->getValue();
++				break;
++			case ResourceConstraintType_MEMORY:
++				memory = " >= " + rc->getValue();
++				break;
++            case ResourceConstraintType_FILESYSTEM:
++				filesystem = " == \"" + rc->getValue() + "\"";
++				break;
++			default:
++				dprintf(D_ALWAYS,"Ignoring unknown resource constraint submitted: %s:%s\n",
++						rc->getType()->getResourceConstraintType().c_str(),rc->getValue().c_str());
++		}
++	}
++	// order is important! see BASIC_REQ_FORMAT above
++	sprintf(_reqs, BASIC_REQ_FORMAT, arch.c_str(), opsys.c_str(), disk.c_str(), memory.c_str(), filesystem.c_str());
++}
++
++bool
++isBasicAttribute(const string& attr_name) {
++	return (
++		attr_name == ATTR_JOB_CMD ||
++		attr_name == ATTR_REQUIREMENTS ||
++		attr_name == ATTR_OWNER ||
++		attr_name == ATTR_JOB_IWD ||
++		attr_name == ATTR_JOB_ARGUMENTS1
++	);
++}
++
++void
++addExtraAttributes(const CommonAttributeCollection* extra_attrs, AttributeMapType& attr_map, bool override_basic) {
++	// add in the extras
++	for (CommonAttributeCollection::const_iterator i = extra_attrs->begin();i < extra_attrs->end();i++) {
++		AviaryCommon::Attribute* attr = *i;
++		const string& attr_key = attr->getName();
++
++		// Are we overriding our basic attributes?
++		if (!override_basic && isBasicAttribute(attr_key)) {
++			// exclude this attribute from the submission map
++			continue;
++		}
++
++		const char* attr_value = attr->getValue().c_str();
++		switch (attr->getType()->getAttributeTypeEnum()) {
++			case AviaryCommon::AttributeType_INTEGER:
++				attr_map[attr_key.c_str()] =
++					new AviaryAttribute(AviaryAttribute::INTEGER_TYPE,attr_value);
++			break;
++			case AviaryCommon::AttributeType_FLOAT:
++				attr_map[attr_key.c_str()] =
++					new AviaryAttribute(AviaryAttribute::FLOAT_TYPE,attr_value);
++			break;
++			case AviaryCommon::AttributeType_STRING:
++				attr_map[attr_key.c_str()] =
++					new AviaryAttribute(AviaryAttribute::STRING_TYPE,attr_value);
++			break;
++			case AviaryCommon::AttributeType_BOOLEAN:
++			case AviaryCommon::AttributeType_EXPRESSION:
++				attr_map[attr_key.c_str()] =
++					new AviaryAttribute(AviaryAttribute::EXPR_TYPE,attr_value);
++			break;
++			// probably shouldn't get here unless axis2 fails us
++			case AviaryCommon::AttributeType_ERROR:
++			case AviaryCommon::AttributeType_UNDEFINED:
++			default:
++				dprintf(D_FULLDEBUG,"Unknown type supplied for attribute '%s=%s'\n",
++						attr_key.c_str(),attr_value);
++		}
++	}
++}
++
++//
++// Utility methods END
++//
++
++//
++// Interface implementation START
++//
++
++
++AviaryJob::SubmitJobResponse*
++AviaryJobServiceSkeleton::submitJob(wso2wsf::MessageContext* /*outCtx*/ ,AviaryJob::SubmitJob* _submitJob)
++{
++    AviaryJob::SubmitJobResponse* submitJobResponse = new AviaryJob::SubmitJobResponse();
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++    AttributeMapType reqsMap, attrMap;
++	const char* submissionName = NULL;
++
++    // add the simple stuff first
++    attrMap[ATTR_JOB_CMD] = new AviaryAttribute(AviaryAttribute::STRING_TYPE, _submitJob->getCmd().c_str());
++    if (!(_submitJob->isArgsNil() || _submitJob->getArgs().empty())) {
++        attrMap[ATTR_JOB_ARGUMENTS1] = new AviaryAttribute(AviaryAttribute::STRING_TYPE, _submitJob->getArgs().c_str());
++    }
++    attrMap[ATTR_OWNER] = new AviaryAttribute(AviaryAttribute::STRING_TYPE, _submitJob->getOwner().c_str());
++    attrMap[ATTR_JOB_IWD] = new AviaryAttribute(AviaryAttribute::STRING_TYPE, _submitJob->getIwd().c_str());
++	if (!(_submitJob->isSubmission_nameNil() || _submitJob->getSubmission_name().empty())) {
++		submissionName = _submitJob->getSubmission_name().c_str();
++        attrMap[ATTR_JOB_SUBMISSION] = new AviaryAttribute(AviaryAttribute::STRING_TYPE,submissionName);
++    }
++
++    // build a requirements string and add to it
++    string reqBuilder;
++    if (!(_submitJob->isRequirementsNil() || _submitJob->getRequirements()->empty())) {
++        // build from resource constraints
++		buildBasicRequirements(_submitJob->getRequirements(), reqBuilder);
++    }
++    else {
++        // default
++        reqBuilder = "TRUE";
++    }
++    attrMap[ATTR_REQUIREMENTS] = new AviaryAttribute(AviaryAttribute::EXPR_TYPE, reqBuilder.c_str());
++
++    // need to add extras attrs also
++	// wso2 doesn't seem to make true nil checking easy
++	// might remove the Attributes element
++	CommonAttributeCollection* attrs = NULL;
++	if (!_submitJob->isExtraNil()) {
++		attrs = _submitJob->getExtra();
++		if (attrs && !attrs->empty()) {			
++			if (attrs && !attrs->empty()) {
++				addExtraAttributes(attrs, attrMap,_submitJob->getAllowOverrides());
++			}
++		}
++	}
++	
++    // invoke submit
++    string jobId, error;
++    // we need this since we don't have a trusted socket to the schedd,
++    // without it basically the schedd won't accept whatever we claim
++    // is Owner and the job will be pseudo-pruned
++    qmgmt_all_users_trusted = true;
++    if (!schedulerObj->submit(attrMap,jobId, error)) {
++        submitJobResponse->setStatus(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("FAIL"),error));
++    }
++    else {
++        string submissionId;
++        if (submissionName) {
++			submissionId = submissionName;
++		}
++		else {
++			submissionId = schedulerObj->getName();
++			submissionId.append("#");
++			submissionId.append(jobId);
++		}
++        submitJobResponse->setId(new AviaryCommon::JobID(
++				jobId,schedulerObj->getPool(),schedulerObj->getName(),
++				new AviaryCommon::SubmissionID(submissionId,_submitJob->getOwner().c_str())));
++        submitJobResponse->setStatus(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("OK"),""));
++    }
++    qmgmt_all_users_trusted = false;
++
++    // clean up
++    for (AttributeMapType::iterator i = attrMap.begin(); attrMap.end() != i; i++) {
++        delete (*i).second;
++    }
++    for (AttributeMapType::iterator i = reqsMap.begin(); reqsMap.end() != i; i++) {
++        delete (*i).second;
++    }
++
++    return submitJobResponse;
++}
++
++
++// TODO: would be nice to template these next 3
++AviaryJob::HoldJobResponse*
++AviaryJobServiceSkeleton::holdJob(wso2wsf::MessageContext* /*outCtx*/ ,AviaryJob::HoldJob* _holdJob)
++{
++	AviaryJob::HoldJobResponse* holdJobResponse = new HoldJobResponse;
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++    string error;
++
++	AviaryCommon::JobID* jobId = _holdJob->getHoldJob()->getId();
++	string reason = _holdJob->getHoldJob()->getReason();
++	string cluster_proc = jobId->getJob();
++	ControlJobResponse* controlJobResponse = NULL;
++
++	checkForSchedulerID(jobId, error);
++	if (!schedulerObj->hold(cluster_proc,reason,error)) {
++		dprintf(D_FULLDEBUG, "SchedulerObject Hold failed: %s\n", error.c_str());
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("FAIL"),error));
++	}
++	else {
++		// in this case, error may hve been the result of the pool/schedd check
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("OK"),error));
++	}
++
++	holdJobResponse->setHoldJobResponse(controlJobResponse);
++    return holdJobResponse;
++}
++
++
++AviaryJob::ReleaseJobResponse*
++AviaryJobServiceSkeleton::releaseJob(wso2wsf::MessageContext* /*outCtx*/ ,AviaryJob::ReleaseJob* _releaseJob)
++{
++	AviaryJob::ReleaseJobResponse* releaseJobResponse = new ReleaseJobResponse;
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++    string error;
++
++	AviaryCommon::JobID* jobId = _releaseJob->getReleaseJob()->getId();
++	string reason = _releaseJob->getReleaseJob()->getReason();
++	string cluster_proc = jobId->getJob();
++	ControlJobResponse* controlJobResponse = NULL;
++
++	checkForSchedulerID(jobId, error);
++	if (!schedulerObj->release(cluster_proc,reason,error)) {
++		dprintf(D_FULLDEBUG, "SchedulerObject Release failed: %s\n", error.c_str());
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("FAIL"),error));
++	}
++	else {
++		// in this case, error may hve been the result of the pool/schedd check
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("OK"),error));
++	}
++
++	releaseJobResponse->setReleaseJobResponse(controlJobResponse);
++    return releaseJobResponse;
++}
++
++AviaryJob::RemoveJobResponse*
++AviaryJobServiceSkeleton::removeJob(wso2wsf::MessageContext* /*outCtx*/ ,AviaryJob::RemoveJob* _removeJob)
++{
++	AviaryJob::RemoveJobResponse* removeJobResponse = new RemoveJobResponse;
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++    string error;
++
++	AviaryCommon::JobID* jobId = _removeJob->getRemoveJob()->getId();
++	string reason = _removeJob->getRemoveJob()->getReason();
++	string cluster_proc = jobId->getJob();
++	ControlJobResponse* controlJobResponse = NULL;
++
++	checkForSchedulerID(jobId, error);
++	if (!schedulerObj->remove(cluster_proc,reason,error)) {
++		dprintf(D_FULLDEBUG, "SchedulerObject Remove failed: %s\n", error.c_str());
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("FAIL"),error));
++	}
++	else {
++		// in this case, error may hve been the result of the pool/schedd check
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("OK"),error));
++	}
++
++	removeJobResponse->setRemoveJobResponse(controlJobResponse);
++    return removeJobResponse;
++}
++
++AviaryJob::SetJobAttributeResponse*
++AviaryJobServiceSkeleton::setJobAttribute(wso2wsf::MessageContext* /*outCtx*/ ,AviaryJob::SetJobAttribute* _setJobAttribute)
++{
++	AviaryJob::SetJobAttributeResponse* setAttrResponse = new SetJobAttributeResponse;
++	SchedulerObject* schedulerObj = SchedulerObject::getInstance();
++    string error;
++
++	AviaryCommon::JobID* jobId = _setJobAttribute->getId();
++	AviaryCommon::Attribute* attr = _setJobAttribute->getAttribute();
++	string cluster_proc = jobId->getJob();
++	ControlJobResponse* controlJobResponse = NULL;
++
++	checkForSchedulerID(jobId, error);
++	if (!schedulerObj->setAttribute(cluster_proc,attr->getName(),attr->getValue(),error)) {
++		dprintf(D_FULLDEBUG, "SchedulerObject SetAttribute failed: %s\n", error.c_str());
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("FAIL"),error));
++	}
++	else {
++		// in this case, error may hve been the result of the pool/schedd check
++		controlJobResponse = new ControlJobResponse(new AviaryCommon::Status(new AviaryCommon::StatusCodeType("OK"),error));
++	}
++
++	setAttrResponse->setSetJobAttributeResponse(controlJobResponse);
++    return setAttrResponse;
++}
+diff --git a/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.h b/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.h
+new file mode 100644
+index 0000000..12bddc3
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryJobServiceSkeleton.h
+@@ -0,0 +1,192 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef AVIARYJOBSERVICESKELETON_H
++#define AVIARYJOBSERVICESKELETON_H
++
++    #include <OMElement.h>
++    #include <MessageContext.h>
++   
++     #include <AviaryJob_RemoveJob.h>
++    
++     #include <AviaryJob_RemoveJobResponse.h>
++    
++     #include <AviaryJob_ReleaseJob.h>
++    
++     #include <AviaryJob_ReleaseJobResponse.h>
++    
++     #include <AviaryJob_SubmitJob.h>
++    
++     #include <AviaryJob_SubmitJobResponse.h>
++    
++     #include <AviaryJob_HoldJob.h>
++    
++     #include <AviaryJob_HoldJobResponse.h>
++    
++     #include <AviaryJob_SetJobAttribute.h>
++    
++     #include <AviaryJob_SetJobAttributeResponse.h>
++
++typedef std::vector<AviaryCommon::ResourceConstraint*> ResourceConstraintVectorType;
++    
++namespace AviaryJob {
++    
++
++   /** we have to reserve some error codes for adb and for custom messages */
++    #define AVIARYJOBSERVICESKELETON_ERROR_CODES_START (AXIS2_ERROR_LAST + 2500)
++
++    typedef enum
++    {
++        AVIARYJOBSERVICESKELETON_ERROR_NONE = AVIARYJOBSERVICESKELETON_ERROR_CODES_START,
++
++        AVIARYJOBSERVICESKELETON_ERROR_LAST
++    } AviaryJobServiceSkeleton_error_codes;
++
++    
++
++
++class AviaryJobServiceSkeleton
++{
++
++        public:
++            AviaryJobServiceSkeleton(){}
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "removeJob|http://grid.redhat.com/aviary-job/" operation.
++         * 
++         * @param _removeJob of the AviaryJob::RemoveJob
++         *
++         * @return AviaryJob::RemoveJobResponse*
++         */
++        
++
++         virtual 
++        AviaryJob::RemoveJobResponse* removeJob(wso2wsf::MessageContext *outCtx ,AviaryJob::RemoveJob* _removeJob);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "releaseJob|http://grid.redhat.com/aviary-job/" operation.
++         * 
++         * @param _releaseJob of the AviaryJob::ReleaseJob
++         *
++         * @return AviaryJob::ReleaseJobResponse*
++         */
++        
++
++         virtual 
++        AviaryJob::ReleaseJobResponse* releaseJob(wso2wsf::MessageContext *outCtx ,AviaryJob::ReleaseJob* _releaseJob);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "submitJob|http://grid.redhat.com/aviary-job/" operation.
++         * 
++         * @param _submitJob of the AviaryJob::SubmitJob
++         *
++         * @return AviaryJob::SubmitJobResponse*
++         */
++        
++
++         virtual 
++        AviaryJob::SubmitJobResponse* submitJob(wso2wsf::MessageContext *outCtx ,AviaryJob::SubmitJob* _submitJob);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "holdJob|http://grid.redhat.com/aviary-job/" operation.
++         * 
++         * @param _holdJob of the AviaryJob::HoldJob
++         *
++         * @return AviaryJob::HoldJobResponse*
++         */
++        
++
++         virtual 
++        AviaryJob::HoldJobResponse* holdJob(wso2wsf::MessageContext *outCtx ,AviaryJob::HoldJob* _holdJob);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "setJobAttribute|http://grid.redhat.com/aviary-job/" operation.
++         * 
++         * @param _setJobAttribute of the AviaryJob::SetJobAttribute
++         *
++         * @return AviaryJob::SetJobAttributeResponse*
++         */
++        
++
++         virtual 
++        AviaryJob::SetJobAttributeResponse* setJobAttribute(wso2wsf::MessageContext *outCtx ,AviaryJob::SetJobAttribute* _setJobAttribute);
++
++
++     
++
++
++
++};
++
++
++}
++
++
++
++        
++#endif // AVIARYJOBSERVICESKELETON_H
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryQueryService.cpp b/src/condor_contrib/aviary/src/AviaryQueryService.cpp
+new file mode 100644
+index 0000000..242c4e0
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryQueryService.cpp
+@@ -0,0 +1,358 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++        #include "AviaryQueryServiceSkeleton.h"
++        #include "AviaryQueryService.h"  
++        #include <ServiceSkeleton.h>
++        #include <stdio.h>
++        #include <axis2_svc.h>
++        #include <Environment.h>
++        #include <axiom_soap.h>
++
++
++        using namespace wso2wsf;
++        
++        using namespace AviaryQuery;
++        
++
++        /** Load the service into axis2 engine */
++        WSF_SERVICE_INIT(AviaryQueryService)
++
++          
++         /**
++          * function to free any soap input headers
++          */
++         AviaryQueryService::AviaryQueryService()
++	{
++          skel = wsfGetAviaryQueryServiceSkeleton();
++    }
++
++
++	void WSF_CALL
++	AviaryQueryService::init()
++	{
++
++      return;
++	}
++
++
++	AviaryQueryService::~AviaryQueryService()
++	{
++    }
++
++
++     
++
++     
++
++
++
++
++	/*
++	 * This method invokes the right service method
++	 */
++	OMElement* WSF_CALL
++	AviaryQueryService::invoke(OMElement *omEle, MessageContext *msgCtx)
++	{
++         /* Using the function name, invoke the corresponding method
++          */
++
++          axis2_op_ctx_t *operation_ctx = NULL;
++          axis2_op_t *operation = NULL;
++          axutil_qname_t *op_qname = NULL;
++          axis2_char_t *op_name = NULL;
++          axis2_msg_ctx_t *in_msg_ctx = NULL;
++          
++          axiom_soap_envelope_t *req_soap_env = NULL;
++          axiom_soap_header_t *req_soap_header = NULL;
++          axiom_soap_envelope_t *res_soap_env = NULL;
++          axiom_soap_header_t *res_soap_header = NULL;
++
++          axiom_node_t *ret_node = NULL;
++          axiom_node_t *input_header = NULL;
++          axiom_node_t *output_header = NULL;
++          axiom_node_t *header_base_node = NULL;
++          axis2_msg_ctx_t *msg_ctx = NULL;
++          axiom_node_t* content_node = omEle->getAxiomNode();
++
++          
++            AviaryQuery::GetJobDataResponse* ret_val1;
++            AviaryQuery::GetJobData* input_val1;
++            
++            AviaryQuery::GetJobStatusResponse* ret_val2;
++            AviaryQuery::GetJobStatus* input_val2;
++            
++            AviaryQuery::GetSubmissionSummaryResponse* ret_val3;
++            AviaryQuery::GetSubmissionSummary* input_val3;
++            
++            AviaryQuery::GetJobDetailsResponse* ret_val4;
++            AviaryQuery::GetJobDetails* input_val4;
++
++			AviaryQuery::GetJobSummaryResponse* ret_val5;
++            AviaryQuery::GetJobSummary* input_val5;
++            
++            
++       
++          msg_ctx = msgCtx->getAxis2MessageContext();
++          operation_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, Environment::getEnv());
++          operation = axis2_op_ctx_get_op(operation_ctx, Environment::getEnv());
++          op_qname = (axutil_qname_t *)axis2_op_get_qname(operation, Environment::getEnv());
++          op_name = axutil_qname_get_localpart(op_qname, Environment::getEnv());
++
++          if (op_name)
++          {
++               
++
++                if ( axutil_strcmp(op_name, "getJobData") == 0 )
++                {
++
++                    
++                    input_val1 =
++                        
++                        new AviaryQuery::GetJobData();
++                        if( AXIS2_FAILURE ==  input_val1->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryQuery::GetJobData_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryQueryServiceSkeleton skel;
++                        ret_val1 =  skel->getJobData(msgCtx ,input_val1);
++                    
++                        if ( NULL == ret_val1 )
++                        {
++                            
++                                delete input_val1;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val1->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val1;
++                                        
++                                            delete input_val1;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "getJobStatus") == 0 )
++                {
++
++                    
++                    input_val2 =
++                        
++                        new AviaryQuery::GetJobStatus();
++                        if( AXIS2_FAILURE ==  input_val2->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryQuery::GetJobStatus_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryQueryServiceSkeleton skel;
++                        ret_val2 =  skel->getJobStatus(msgCtx ,input_val2);
++                    
++                        if ( NULL == ret_val2 )
++                        {
++                            
++                                delete input_val2;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val2->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val2;
++                                        
++                                            delete input_val2;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "getSubmissionSummary") == 0 )
++                {
++
++                    
++                    input_val3 =
++                        
++                        new AviaryQuery::GetSubmissionSummary();
++                        if( AXIS2_FAILURE ==  input_val3->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryQuery::GetSubmissionSummary_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryQueryServiceSkeleton skel;
++                        ret_val3 =  skel->getSubmissionSummary(msgCtx ,input_val3);
++                    
++                        if ( NULL == ret_val3 )
++                        {
++                            
++                                delete input_val3;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val3->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val3;
++                                        
++                                            delete input_val3;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++             
++
++                if ( axutil_strcmp(op_name, "getJobDetails") == 0 )
++                {
++
++                    
++                    input_val4 =
++                        
++                        new AviaryQuery::GetJobDetails();
++                        if( AXIS2_FAILURE ==  input_val4->deserialize(&content_node, NULL, false))
++                        {
++                                        
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryQuery::GetJobDetails_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;      
++                        }
++                        
++                        //AviaryQueryServiceSkeleton skel;
++                        ret_val4 =  skel->getJobDetails(msgCtx ,input_val4);
++                    
++                        if ( NULL == ret_val4 )
++                        {
++                            
++                                delete input_val4;
++                            
++                            return NULL; 
++                        }
++                        ret_node = 
++                                            ret_val4->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val4;
++                                        
++                                            delete input_val4;
++                                        
++
++                        return new OMElement(NULL,ret_node);
++                    
++
++                    /* since this has no output params it just returns NULL */                    
++                    
++
++                }
++
++
++                if ( axutil_strcmp(op_name, "getJobSummary") == 0 )
++                {
++
++
++                    input_val5 =
++
++                        new AviaryQuery::GetJobSummary();
++                        if( AXIS2_FAILURE ==  input_val5->deserialize(&content_node, NULL, false))
++                        {
++
++                            AXIS2_ERROR_SET(Environment::getEnv()->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
++                            AXIS2_LOG_ERROR( Environment::getEnv()->log, AXIS2_LOG_SI, "NULL returned from the AviaryQuery::GetJobSummary_deserialize: "
++                                        "This should be due to an invalid XML");
++                            return NULL;
++                        }
++
++                        //AviaryQueryServiceSkeleton skel;
++                        ret_val5 =  skel->getJobSummary(msgCtx ,input_val5);
++
++                        if ( NULL == ret_val5 )
++                        {
++
++                                delete input_val5;
++
++                            return NULL;
++                        }
++                        ret_node =
++                                            ret_val5->serialize(NULL, NULL, AXIS2_TRUE, NULL, NULL);
++                                            delete ret_val5;
++
++                                            delete input_val5;
++
++
++                        return new OMElement(NULL,ret_node);
++
++
++                    /* since this has no output params it just returns NULL */
++
++
++                }
++
++             
++             }
++            
++          AXIS2_LOG_ERROR(Environment::getEnv()->log, AXIS2_LOG_SI, "AviaryQueryService service ERROR: invalid OM parameters in request\n");
++          return NULL;
++    }
++
++    OMElement* WSF_CALL
++    AviaryQueryService::onFault(OMElement* omEle)
++	{
++		axiom_node_t *error_node = NULL;
++		axiom_element_t *error_ele = NULL;
++        axutil_error_codes_t error_code;
++        axiom_node_t *node = omEle->getAxiomNode();
++        error_code = (axutil_error_codes_t)Environment::getEnv()->error->error_number;
++
++        if(error_code <= AVIARYQUERYSERVICESKELETON_ERROR_NONE ||
++                error_code >= AVIARYQUERYSERVICESKELETON_ERROR_LAST )
++        {
++            error_ele = axiom_element_create(Environment::getEnv(), node, "fault", NULL,
++                            &error_node);
++            axiom_element_set_text(error_ele, Environment::getEnv(), "AviaryQueryService|http://grid.redhat.com/aviary-query/ failed",
++                            error_node);
++        }
++        
++
++		return new OMElement(NULL,error_node);
++	}
++
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryQueryService.h b/src/condor_contrib/aviary/src/AviaryQueryService.h
+new file mode 100644
+index 0000000..18be684
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryQueryService.h
+@@ -0,0 +1,67 @@
++
++
++          #ifndef AVIARYQUERYSERVICE_H
++          #define AVIARYQUERYSERVICE_H
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#include <ServiceSkeleton.h>
++#include <stdio.h>
++#include <axis2_svc.h>
++
++using namespace wso2wsf;
++
++
++using namespace AviaryQuery;
++
++
++
++#define WSF_SERVICE_SKEL_INIT(class_name) \
++AviaryQueryServiceSkeleton* wsfGetAviaryQueryServiceSkeleton(){ return new class_name(); }
++
++AviaryQueryServiceSkeleton* wsfGetAviaryQueryServiceSkeleton(); 
++
++
++
++        class AviaryQueryService : public ServiceSkeleton
++        {
++            private:
++                AviaryQueryServiceSkeleton *skel;
++
++            public:
++
++               union {
++                     
++               } fault;
++
++
++              WSF_EXTERN WSF_CALL AviaryQueryService();
++
++              OMElement* WSF_CALL invoke(OMElement *message, MessageContext *msgCtx);
++
++              OMElement* WSF_CALL onFault(OMElement *message);
++
++              void WSF_CALL init();
++
++              ~AviaryQueryService(); 
++      };
++
++
++
++#endif    //     AVIARYQUERYSERVICE_H
++
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryQueryServiceMacro.cpp b/src/condor_contrib/aviary/src/AviaryQueryServiceMacro.cpp
+new file mode 100644
+index 0000000..d8cae4c
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryQueryServiceMacro.cpp
+@@ -0,0 +1,44 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++
++#include "AviaryQueryServiceSkeleton.h"
++#include "AviaryQueryService.h"
++#include <ServiceSkeleton.h>
++#include <stdio.h>
++#include <axis2_svc.h>
++#include <Environment.h>
++
++using namespace wso2wsf;
++
++using namespace AviaryQuery;
++
++
++
++/** Load the service into engine
++Note:- If you are extending from the Generated Skeleton class,you need is to change the argument provided to the
++macro to your derived class name.
++Example
++If your service is Calculator, you will have the business logic implementation class as CalculatorSkeleton.
++If the extended class is CalculatorSkeletonImpl, then you change the argument to the macro WSF_SERVICE_SKEL_INIT as
++WSF_SERVICE_SKEL_INIT(CalculatorSkeletonImpl). Also include the header file of the derived class, in this case CalculatorSkeletonImpl.h
++
++*/
++
++WSF_SERVICE_SKEL_INIT(AviaryQueryServiceSkeleton)
++
++
++
+diff --git a/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp
+new file mode 100644
+index 0000000..ecbbf41
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp
+@@ -0,0 +1,479 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// the implementation methods for AviaryQueryService methods
++
++//local includes
++#include "Globals.h"
++#include "JobServerObject.h"
++#include "AviaryQueryServiceSkeleton.h"
++#include <AviaryQuery_GetJobData.h>
++#include <AviaryQuery_GetJobDataResponse.h>
++#include <AviaryQuery_GetJobStatus.h>
++#include <AviaryQuery_GetJobStatusResponse.h>
++#include <AviaryQuery_GetSubmissionSummary.h>
++#include <AviaryQuery_GetSubmissionSummaryResponse.h>
++#include <AviaryQuery_GetJobDetails.h>
++#include <AviaryQuery_GetJobDetailsResponse.h>
++#include <AviaryQuery_GetJobSummary.h>
++#include <AviaryQuery_GetJobSummaryResponse.h>
++#include <Axis2SoapProvider.h>
++
++// condor includes
++#include "stl_string_utils.h"
++#include "proc.h"
++#include "condor_attributes.h"
++
++// axis includes
++#include "axutil_date_time.h"
++
++using namespace std;
++using namespace AviaryQuery;
++using namespace AviaryCommon;
++using namespace aviary::query;
++
++struct cmpid {
++	bool operator()(const char *a, const char *b) const {
++		return strcmp(a, b) < 0;
++	}
++};
++
++typedef vector<JobID*> JobIdCollection;
++typedef vector<SubmissionID*> SubmissionIdCollection;
++typedef vector<JobStatus*> JobStatusCollection;
++typedef vector<JobDetails*> JobDetailsCollection;
++typedef vector<JobSummary*> JobSummaryCollection;
++typedef vector<SubmissionSummary*> SubmissionSummaryCollection;
++typedef set<const char*, cmpid> IdCollection;
++
++// TODO: singleton this...
++extern aviary::soap::Axis2SoapProvider* provider;
++
++//
++// Utility section START
++//
++
++// Any key that begins with the '0' char is either the
++// header or a cluster, i.e. not a job
++#define IS_JOB(key) ((key) && '0' != (key)[0])
++
++// NOTE #1: unfortunately the Axis2/C generated code is inconsistent in its
++// internal checking of nillable (i.e., minOccurs=0) elements
++// so we have to use default ctors and build the element object using setters
++// otherwise segvs await us in generated code
++
++// NOTE #2: using template functions since WSO2 codegen won't give us
++// XSD extension->C++ inheritance
++template <class JobBase>
++void createGoodJobResponse(JobBase& jb, const char* job_id) {
++	JobServerObject* jso = JobServerObject::getInstance();
++	JobID* jid = new JobID;
++	jid->setJob(job_id);
++	jid->setPool(jso->getPool());
++	jid->setScheduler(jso->getName());
++	jb.setId(jid);
++	Status* js = new Status;
++	js->setCode(new StatusCodeType("OK"));
++	jb.setStatus(js);
++}
++
++template <class JobBase>
++void createBadJobResponse(JobBase& jb, const char* job_id, const AviaryStatus& error) {
++	JobID* jid = new JobID;
++	jid->setJob(job_id);
++	jb.setId(jid);
++	StatusCodeType* jst = new StatusCodeType;
++	jst->setStatusCodeTypeEnum(ADBStatusCodeTypeEnum(error.type));
++	Status* js = new Status(jst,error.text);
++	jb.setStatus(js);
++}
++
++// unfortunately no convenience functions from WS02 for dateTime
++axutil_date_time_t* encodeDateTime(const time_t* _time) {
++	struct tm _tm;
++
++	// need the re-entrant version because axutil_date_time_create
++	// calls time() again and overwrites static tm
++	localtime_r(_time,&_tm);
++	// get our Axis2 env for the allocator
++	const axutil_env_t* _env = provider->getEnv();
++
++	axutil_date_time_t* _value = NULL;
++	_value = axutil_date_time_create(_env);
++
++    if (!_value)
++    {
++        AXIS2_ERROR_SET(_env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
++        AXIS2_LOG_ERROR(_env->log, AXIS2_LOG_SI, "Out of memory");
++        return NULL;
++    }
++
++	// play their game with adjusting the year and month offset
++	axutil_date_time_set_date_time(_value,_env,
++								   _tm.tm_year+1900,
++								   _tm.tm_mon+1,
++								   _tm.tm_mday,
++								   _tm.tm_hour,
++								   _tm.tm_min,
++								   _tm.tm_sec,
++								   0);
++	return _value;
++};
++
++void mapFieldsToSummary(const JobSummaryFields& fields, JobSummary* _summary) {
++
++	// JobID should already been in our summary
++	SubmissionID* sid = new SubmissionID;
++	sid->setName(fields.submission_id);
++	sid->setOwner(fields.owner);
++	_summary->getId()->setSubmission(sid);
++	// do date/time conversion
++	_summary->setQueued(encodeDateTime((const time_t*)&fields.queued));
++	_summary->setLast_update(encodeDateTime((const time_t*)&fields.last_update));
++	JobStatusType* jst = new JobStatusType;
++	jst->setJobStatusType(getJobStatusString(fields.status));
++	_summary->setJob_status(jst);
++	_summary->setCmd(fields.cmd);
++	if (!fields.args1.empty()) {
++		_summary->setArgs1(fields.args1);
++	}
++	if (!fields.args2.empty()) {
++		_summary->setArgs2(fields.args2);
++	}
++	if (!fields.hold_reason.empty()) {
++		_summary->setHeld(fields.hold_reason);
++	}
++	if (!fields.release_reason.empty()) {
++		_summary->setReleased(fields.release_reason);
++	}
++	if (!fields.remove_reason.empty()) {
++		_summary->setRemoved(fields.remove_reason);
++	}
++}
++
++void mapToXsdAttributes(const aviary::codec::AttributeMapType& _map, AviaryCommon::Attributes* _attrs) {
++	for (AttributeMapIterator i = _map.begin(); _map.end() != i; i++) {
++		AviaryAttribute* codec_attr = (AviaryAttribute*)(*i).second;
++		AviaryCommon::Attribute* attr = new AviaryCommon::Attribute;
++		attr->setName((*i).first);
++		AviaryCommon::AttributeType* attr_type = new AviaryCommon::AttributeType;
++		switch (codec_attr->getType()) {
++			case AviaryAttribute::INTEGER_TYPE:
++				attr_type->setAttributeTypeEnum(AviaryCommon::AttributeType_INTEGER);
++				break;
++			case AviaryAttribute::FLOAT_TYPE:
++				attr_type->setAttributeTypeEnum(AviaryCommon::AttributeType_FLOAT);
++				break;
++			case AviaryAttribute::STRING_TYPE:
++				attr_type->setAttributeTypeEnum(AviaryCommon::AttributeType_STRING);
++				break;
++			case AviaryAttribute::EXPR_TYPE:
++				attr_type->setAttributeTypeEnum(AviaryCommon::AttributeType_EXPRESSION);
++				break;
++			default:
++				attr_type->setAttributeTypeEnum(AviaryCommon::AttributeType_UNDEFINED);
++		}
++		attr->setType(attr_type);
++		attr->setValue(codec_attr->getValue());
++		_attrs->addAttrs(attr);
++	}
++}
++
++//
++// Utility section END
++//
++
++//
++// Interface implementation START
++//
++GetSubmissionSummaryResponse* AviaryQueryServiceSkeleton::getSubmissionSummary(wso2wsf::MessageContext* /*outCtx*/
++	,GetSubmissionSummary* _getSubmissionSummary)
++{
++	GetSubmissionSummaryResponse* getSummaryResponse = new GetSubmissionSummaryResponse;
++
++	SubmissionCollectionType::const_iterator element = g_submissions.begin();
++	SubmissionSummaryCollection* submissions = new SubmissionSummaryCollection;
++
++	SubmissionCollectionType sub_map;
++
++	if (_getSubmissionSummary->isIdsNil() || _getSubmissionSummary->getIds()->size() == 0) {
++		// no ids supplied...they get them all
++		for (SubmissionCollectionType::iterator i = g_submissions.begin(); g_submissions.end() != i; i++) {
++			sub_map[(*i).first] = (*i).second;
++		}
++	}
++	else {
++		// fast track...client has supplied ids to scan
++		SubmissionIdCollection* id_list = _getSubmissionSummary->getIds();
++		for (SubmissionIdCollection::iterator sic_it = id_list->begin(); id_list->end() != sic_it; sic_it++) {
++			const char* sid_str = (*sic_it)->getName().c_str();
++			SubmissionCollectionType::iterator sct_it = g_submissions.find(sid_str);
++			if (sct_it != g_submissions.end()) {
++				sub_map[(*sct_it).first] = (*sct_it).second;
++			}
++			else {
++				// mark this as not matched when returning our results
++				sub_map[(*sct_it).first] = NULL;
++			}
++		}
++	}
++
++	for (SubmissionCollectionType::iterator i = sub_map.begin(); sub_map.end() != i; i++) {
++		SubmissionSummary* summary = new SubmissionSummary;
++		SubmissionObject *submission = (*i).second;
++
++		if (submission) {
++			SubmissionID* sid = new SubmissionID;
++			sid->setName(submission->getName());
++			sid->setOwner(submission->getOwner());
++			summary->setId(sid);
++			summary->setCompleted(submission->getCompleted().size());
++			summary->setHeld(submission->getHeld().size());
++			summary->setIdle(submission->getIdle().size());
++			summary->setRemoved(submission->getRemoved().size());
++			summary->setRunning(submission->getRunning().size());
++			Status* ss = new Status;
++			ss->setCode(new StatusCodeType("OK"));
++			summary->setStatus(ss);
++
++			if (!_getSubmissionSummary->isIncludeJobSummariesNil() && _getSubmissionSummary->getIncludeJobSummaries()) {
++				// client wants the job summaries also
++				JobSummaryPairCollection jobs;
++				submission->getJobSummaries(jobs);
++				for (JobSummaryPairCollection::const_iterator it = jobs.begin(); jobs.end() != it; it++) {
++					JobSummary* js = new JobSummary;
++					createGoodJobResponse<JobSummary>(*js,(*it).first);
++					mapFieldsToSummary(*((*it).second),js);
++					summary->addJobs(js);
++				}
++			}
++
++		}
++		else {
++			SubmissionID* sid = new SubmissionID;
++			summary->setId(sid);
++			StatusCodeType* sst = new StatusCodeType;
++			sst->setStatusCodeType("NO_MATCH");
++			Status* ss = new Status(sst,"Unable to locate submission");
++			summary->setStatus(ss);
++		}
++		submissions->push_back(summary);
++	}
++
++	getSummaryResponse->setSubmissions(submissions);
++
++    return getSummaryResponse;
++}
++
++GetJobStatusResponse* AviaryQueryServiceSkeleton::getJobStatus(wso2wsf::MessageContext* /*outCtx*/
++	,GetJobStatus* _getJobStatus)
++{
++	GetJobStatusResponse* jobStatusResponse = new GetJobStatusResponse;
++	JobServerObject* jso = JobServerObject::getInstance();
++	JobStatusCollection* job_results = new JobStatusCollection;
++
++	IdCollection id_set;
++
++	if (_getJobStatus->isIdsNil() || _getJobStatus->getIds()->size() == 0) {
++		// no ids supplied...they get them all
++		for (JobCollectionType::iterator i = g_jobs.begin(); g_jobs.end() != i; i++) {
++			const char* job_id = (*i).first;
++			if (IS_JOB(job_id)) {
++				id_set.insert(job_id);
++			}
++		}
++	}
++	else {
++		// fast track...client has supplied ids to scan
++		JobIdCollection* id_list = _getJobStatus->getIds();
++		for (JobIdCollection::iterator i = id_list->begin(); id_list->end() != i; i++) {
++			id_set.insert((*i)->getJob().c_str());
++		}
++	}
++
++	for (IdCollection::const_iterator i = id_set.begin(); id_set.end() != i; i++) {
++		JobStatus* js = new JobStatus;
++		const char* job = *i;
++		AviaryStatus status;
++		int job_status = JOB_STATUS_MIN;
++		if (jso->getStatus(job,job_status,status)) {
++			createGoodJobResponse<JobStatus>(*js,job);
++			JobStatusType* jst = new JobStatusType;
++			jst->setJobStatusType(getJobStatusString(job_status));
++			js->setJob_status(jst);
++		}
++		else {
++			// problem...report to client
++			createBadJobResponse<JobStatus>(*js,job,status);
++		}
++		job_results->push_back(js);
++	}
++
++	jobStatusResponse->setJobs(job_results);
++
++    return jobStatusResponse;
++}
++
++GetJobSummaryResponse* AviaryQueryServiceSkeleton::getJobSummary(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetJobSummary* _getJobSummary)
++{
++	GetJobSummaryResponse* jobSummaryResponse = new GetJobSummaryResponse;
++	JobServerObject* jso = JobServerObject::getInstance();
++	JobSummaryCollection* job_results = new JobSummaryCollection;
++	
++	IdCollection id_set;
++
++	if (_getJobSummary->isIdsNil() || _getJobSummary->getIds()->size() == 0) {
++		// no ids supplied...they get them all
++		for (JobCollectionType::iterator i = g_jobs.begin(); g_jobs.end() != i; i++) {
++			const char* job_id = (*i).first;
++			if (IS_JOB(job_id)) {
++				id_set.insert(job_id);
++			}
++		}
++	}
++	else {
++		// fast track...client has supplied ids to scan
++		JobIdCollection* id_list = _getJobSummary->getIds();
++		for (JobIdCollection::iterator i = id_list->begin(); id_list->end() != i; i++) {
++			id_set.insert((*i)->getJob().c_str());
++		}
++	}
++	
++	for (IdCollection::const_iterator i = id_set.begin(); id_set.end() != i; i++) {
++		JobSummary* js = new JobSummary;
++		const char* job = *i;
++		JobSummaryFields jsf;
++		AviaryStatus status;
++		if (jso->getSummary(job,jsf,status)) {
++			createGoodJobResponse<JobSummary>(*js,job);
++			mapFieldsToSummary(jsf,js);
++		}
++		else {
++			// problem...report to client
++			createBadJobResponse<JobSummary>(*js, job, status);
++		}
++		job_results->push_back(js);
++	}
++
++	jobSummaryResponse->setJobs(job_results);
++
++    return jobSummaryResponse;
++}
++
++GetJobDetailsResponse* AviaryQueryServiceSkeleton::getJobDetails(wso2wsf::MessageContext* /* outCtx*/
++	,GetJobDetails* _getJobDetails)
++{
++	GetJobDetailsResponse* jobDetailsResponse = new GetJobDetailsResponse;
++	JobServerObject* jso = JobServerObject::getInstance();
++	JobDetailsCollection* job_results = new JobDetailsCollection;
++
++	IdCollection id_set;
++
++	if (_getJobDetails->isIdsNil() || _getJobDetails->getIds()->size() == 0) {
++		// no ids supplied...they get them all
++		for (JobCollectionType::iterator i = g_jobs.begin(); g_jobs.end() != i; i++) {
++			const char* job_id = (*i).first;
++			if (IS_JOB(job_id)) {
++				id_set.insert(job_id);
++			}
++		}
++	}
++	else {
++		// fast track...client has supplied ids to scan
++		JobIdCollection* id_list = _getJobDetails->getIds();
++		for (JobIdCollection::iterator i = id_list->begin(); id_list->end() != i; i++) {
++			id_set.insert((*i)->getJob().c_str());
++		}
++	}
++
++	for (IdCollection::const_iterator i = id_set.begin(); id_set.end() != i; i++) {
++		JobDetails* jd = new JobDetails;
++		const char* job = *i;
++		aviary::codec::AttributeMapType attr_map;
++		AviaryStatus status;
++		if (jso->getJobAd(job,attr_map,status)) {
++			createGoodJobResponse<JobDetails>(*jd,job);
++			// load attributes
++			AviaryCommon::Attributes* attrs = new AviaryCommon::Attributes;
++			mapToXsdAttributes(attr_map,attrs);
++			jd->setDetails(attrs);
++		}
++		else {
++			// problem...report to client
++			createBadJobResponse<JobDetails>(*jd, job, status);
++		}
++		job_results->push_back(jd);
++
++        for (aviary::codec::AttributeMapType::iterator i = attr_map.begin();attr_map.end() != i; i++) {
++            delete (*i).second;
++        }
++	}
++
++	jobDetailsResponse->setJobs(job_results);
++
++    return jobDetailsResponse;
++}
++
++// NOTE: getJobData is the rare case (?) where someone wants to pull the job output
++// thus, we don't batch this - just one at a time
++GetJobDataResponse* AviaryQueryServiceSkeleton::getJobData(wso2wsf::MessageContext* /* outCtx */
++	,GetJobData* _getJobData)
++{
++    GetJobDataResponse* jobDataResponse = new  GetJobDataResponse;
++	JobServerObject* jso = JobServerObject::getInstance();
++
++	const char* job = _getJobData->getData()->getId()->getJob().c_str();
++	AviaryCommon::JobDataType* jdt = _getJobData->getData()->getType();
++	ADBJobDataTypeEnum file_type = jdt->getJobDataTypeEnum();
++	AviaryStatus status;
++	status.type = AviaryStatus::FAIL;
++	string fname, content;
++	int fsize;
++	if (jso->fetchJobData(job,UserFileType(file_type),fname,_getJobData->getMax_bytes(),_getJobData->getFrom_end(),fsize,content,status)) {
++		JobID* jid = new JobID;
++		jid->setJob(job);
++		jid->setPool(jso->getPool());
++		jid->setScheduler(jso->getName());
++		JobData* jd = new JobData;
++		jd->setId(jid);
++		jd->setType(jdt);
++		jobDataResponse->setData(jd);
++		Status* js = new Status;
++		js->setCode(new StatusCodeType("OK"));
++		jobDataResponse->setStatus(js);
++
++		// load requested file data
++		jobDataResponse->setContent(content);
++		jobDataResponse->setFile_name(fname);
++		jobDataResponse->setFile_size(fsize);
++	}
++	else {
++		// problem...report to client
++		JobID* jid = new JobID;
++		jid->setJob(job);
++		JobData* jd = new JobData;
++		jd->setId(jid);
++		jd->setType(jdt);
++		jobDataResponse->setData(jd);
++		StatusCodeType* jst = new StatusCodeType;
++		jst->setStatusCodeTypeEnum(ADBStatusCodeTypeEnum(status.type));
++		Status* js = new Status(jst,status.text);
++		jobDataResponse->setStatus(js);
++	}
++
++    return jobDataResponse;
++}
++
+diff --git a/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.h b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.h
+new file mode 100644
+index 0000000..e400201
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.h
+@@ -0,0 +1,177 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef AVIARYQUERYSERVICESKELETON_H
++#define AVIARYQUERYSERVICESKELETON_H
++
++    #include <OMElement.h>
++    #include <MessageContext.h>
++   
++     #include <AviaryQuery_GetJobData.h>
++    
++     #include <AviaryQuery_GetJobDataResponse.h>
++    
++     #include <AviaryQuery_GetJobStatus.h>
++    
++     #include <AviaryQuery_GetJobStatusResponse.h>
++    
++     #include <AviaryQuery_GetSubmissionSummary.h>
++    
++     #include <AviaryQuery_GetSubmissionSummaryResponse.h>
++    
++     #include <AviaryQuery_GetJobDetails.h>
++    
++     #include <AviaryQuery_GetJobDetailsResponse.h>
++
++     #include <AviaryQuery_GetJobSummary.h>
++
++     #include <AviaryQuery_GetJobSummaryResponse.h>
++    
++    
++namespace AviaryQuery {
++    
++
++   /** we have to reserve some error codes for adb and for custom messages */
++    #define AVIARYQUERYSERVICESKELETON_ERROR_CODES_START (AXIS2_ERROR_LAST + 2500)
++
++    typedef enum
++    {
++        AVIARYQUERYSERVICESKELETON_ERROR_NONE = AVIARYQUERYSERVICESKELETON_ERROR_CODES_START,
++
++        AVIARYQUERYSERVICESKELETON_ERROR_LAST
++    } AviaryQueryServiceSkeleton_error_codes;
++
++    
++
++
++class AviaryQueryServiceSkeleton
++{
++        public:
++            AviaryQueryServiceSkeleton(){}
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "getJobData|http://grid.redhat.com/aviary-query/" operation.
++         * 
++         * @param _getJobData of the AviaryQuery::GetJobData
++         *
++         * @return AviaryQuery::GetJobDataResponse*
++         */
++        
++
++         virtual 
++        AviaryQuery::GetJobDataResponse* getJobData(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetJobData* _getJobData);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "getJobStatus|http://grid.redhat.com/aviary-query/" operation.
++         * 
++         * @param _getJobStatus of the AviaryQuery::GetJobStatus
++         *
++         * @return AviaryQuery::GetJobStatusResponse*
++         */
++        
++
++         virtual 
++        AviaryQuery::GetJobStatusResponse* getJobStatus(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetJobStatus* _getJobStatus);
++
++
++     
++
++
++
++
++		 
++
++
++        /**
++         * Auto generated method declaration
++         * for "getSubmissionSummary|http://grid.redhat.com/aviary-query/" operation.
++         * 
++         * @param _getSubmissionSummary of the AviaryQuery::GetSubmissionSummary
++         *
++         * @return AviaryQuery::GetSubmissionSummaryResponse*
++         */
++        
++
++         virtual 
++        AviaryQuery::GetSubmissionSummaryResponse* getSubmissionSummary(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetSubmissionSummary* _getSubmissionSummary);
++
++
++     
++
++
++
++
++		 
++
++        /**
++         * Auto generated method declaration
++         * for "getJobDetails|http://grid.redhat.com/aviary-query/" operation.
++         * 
++         * @param _getJobDetails of the AviaryQuery::GetJobDetails
++         *
++         * @return AviaryQuery::GetJobDetailsResponse*
++         */
++        
++
++         virtual 
++        AviaryQuery::GetJobDetailsResponse* getJobDetails(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetJobDetails* _getJobDetails);
++
++
++         /**
++         * Auto generated method declaration
++         * for "getJobSummary|http://grid.redhat.com/aviary-query/" operation.
++         *
++         * @param _getJobSummary of the AviaryQuery::GetJobSummary
++         *
++         * @return AviaryQuery::GetJobSummaryResponse*
++         */
++
++
++         virtual
++        AviaryQuery::GetJobSummaryResponse* getJobSummary(wso2wsf::MessageContext *outCtx ,AviaryQuery::GetJobSummary* _getJobSummary);
++
++
++};
++
++
++}
++
++
++
++        
++#endif // AVIARYQUERYSERVICESKELETON_H
++    
++
+diff --git a/src/condor_contrib/aviary/src/AviaryScheddPlugin.cpp b/src/condor_contrib/aviary/src/AviaryScheddPlugin.cpp
+new file mode 100644
+index 0000000..ec1ceaf
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryScheddPlugin.cpp
+@@ -0,0 +1,366 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// condor includes
++#include "condor_common.h"
++#include "condor_qmgr.h"
++#include "condor_config.h"
++
++// local includes
++#include "AviaryScheddPlugin.h"
++#include "Axis2SoapProvider.h"
++#include "SchedulerObject.h"
++
++// Global from the condor_schedd, it's name
++extern char * Name;
++
++// Any key that begins with the '0' char is either the
++// header or a cluster, i.e. not a job
++#define IS_JOB(key) ((key) && '0' != (key)[0])
++
++using namespace std;
++using namespace aviary::job;
++using namespace aviary::soap;
++
++// global SchedulerObject
++// TODO: convert to singleton
++Axis2SoapProvider* provider = NULL;
++SchedulerObject* schedulerObj = NULL;
++
++void
++AviaryScheddPlugin::earlyInitialize()
++{
++
++    // Since this plugin is registered with multiple
++    // PluginManagers it may be initialized more than once,
++    // and we don't want that
++	static bool skip = false;
++	if (skip) return; skip = true;
++
++	// config then env for our all-important axis2 repo dir
++    const char* log_file = "./aviary_job.axis2.log";
++	string repo_path;
++	char *tmp = NULL;
++	if (tmp = param("WSFCPP_HOME")) {
++		repo_path = tmp;
++		free(tmp);
++	}
++	else if (tmp = getenv("WSFCPP_HOME")) {
++		repo_path = tmp;
++	}
++	else {
++		EXCEPT("No WSFCPP_HOME in config or env");
++	}
++
++	int port = param_integer("HTTP_PORT",9090);
++	int level = param_integer("AXIS2_DEBUG_LEVEL",AXIS2_LOG_LEVEL_CRITICAL);
++
++    // init transport here
++    provider = new Axis2SoapProvider(level,log_file,repo_path.c_str());
++    string axis_error;
++    if (!provider->init(port,AXIS2_HTTP_DEFAULT_SO_TIMEOUT,axis_error)) {
++		dprintf(D_ALWAYS, "%s\n",axis_error.c_str());
++        EXCEPT("Failed to initialize Axis2SoapProvider");
++    }
++
++	schedulerObj = SchedulerObject::getInstance();
++
++	dirtyJobs = new DirtyJobsType();
++
++	isHandlerRegistered = false;
++
++	ReliSock *sock = new ReliSock;
++	if (!sock) {
++		EXCEPT("Failed to allocate transport socket");
++	}
++	if (!sock->assign(provider->getHttpListenerSocket())) {
++		EXCEPT("Failed to bind transport socket");
++	}
++	int index;
++	if (-1 == (index =
++			   daemonCore->Register_Socket((Stream *) sock,
++										   "Aviary Method Socket",
++										   (SocketHandlercpp) ( &AviaryScheddPlugin::HandleTransportSocket ),
++										   "Handler for Aviary Methods.",
++										   this))) {
++		EXCEPT("Failed to register transport socket");
++	}
++
++	dprintf(D_ALWAYS,"Axis2 listener on http port: %d\n",port);
++
++	m_initialized = false;
++}
++
++void
++AviaryScheddPlugin::initialize()
++{
++		// Since this plugin is registered with multiple
++		// PluginManagers it may be initialized more than once,
++		// and we don't want that
++	static bool skip = false;
++	if (skip) return; skip = true;
++
++		// WalkJobQueue(int (*func)(ClassAd *))
++	ClassAd *ad = GetNextJob(1);
++	while (ad != NULL) {
++		MyString key;
++		PROC_ID id;
++		int value;
++
++		if (!ad->LookupInteger(ATTR_CLUSTER_ID, id.cluster)) {
++			EXCEPT("%s on job is missing or not an integer", ATTR_CLUSTER_ID);
++		}
++		if (!ad->LookupInteger(ATTR_PROC_ID, id.proc)) {
++			EXCEPT("%s on job is missing or not an integer", ATTR_PROC_ID);
++		}
++		if (!ad->LookupInteger(ATTR_JOB_STATUS, value)) {
++			EXCEPT("%s on job is missing or not an integer", ATTR_JOB_STATUS);
++		}
++
++		key.sprintf("%d.%d", id.cluster, id.proc);
++
++		processJob(key.Value(), ATTR_JOB_STATUS, value);
++
++		FreeJobAd(ad);
++		ad = GetNextJob(0);
++	}
++ 
++	m_initialized = true;
++}
++
++
++void
++AviaryScheddPlugin::shutdown()
++{
++		// Since this plugin is registered with multiple
++		// PluginManagers (eg, shadow) it may be shutdown
++		// more than once, and we don't want that
++	static bool skip = false;
++	if (skip) return; skip = true;
++
++	dprintf(D_FULLDEBUG, "AviaryScheddPlugin: shutting down...\n");
++
++	if (schedulerObj) {
++		delete schedulerObj;
++		schedulerObj = NULL;
++	}
++}
++
++
++void
++AviaryScheddPlugin::update(int cmd, const ClassAd *ad)
++{
++	MyString hashKey;
++
++	switch (cmd) {
++	case UPDATE_SCHEDD_AD:
++		dprintf(D_FULLDEBUG, "Received UPDATE_SCHEDD_AD\n");
++		schedulerObj->update(*ad);
++		break;
++	default:
++		dprintf(D_FULLDEBUG, "Unsupported command: %s\n",
++				getCollectorCommandString(cmd));
++	}
++}
++
++
++void
++AviaryScheddPlugin::archive(const ClassAd */*ad*/) { };
++
++
++void
++AviaryScheddPlugin::newClassAd(const char */*key*/) { };
++
++
++void
++AviaryScheddPlugin::setAttribute(const char *key,
++							   const char *name,
++							   const char *value)
++{
++	if (!m_initialized) return;
++
++//	dprintf(D_FULLDEBUG, "setAttribute: %s[%s] = %s\n", key, name, value);
++
++	markDirty(key, name, value);
++}
++
++
++void
++AviaryScheddPlugin::destroyClassAd(const char *_key)
++{
++	if (!m_initialized) return;
++
++//	dprintf(D_FULLDEBUG, "destroyClassAd: %s\n", key);
++
++	if (!IS_JOB(_key)) return;
++
++		// If we wait to process the deletion the job ad will be gone
++		// and we won't be able to lookup the Submission. So, we must
++		// process the job immediately, but that also means we need to
++		// process all pending changes for the job as well.
++	DirtyJobsType::iterator entry = dirtyJobs->begin();
++	while (dirtyJobs->end() != entry) {
++		string key = (*entry).first;
++		string name = (*entry).second.first;
++		int value = (*entry).second.second;
++
++		if (key == _key) {
++			processJob(key.c_str(), name.c_str(), value);
++
++				// No need to process this entry again later
++			entry = dirtyJobs->erase(entry);
++		} else {
++			entry++;
++		}
++	}
++}
++
++
++void
++AviaryScheddPlugin::deleteAttribute(const char */*key*/,
++								  const char */*name*/) { }
++
++int
++AviaryScheddPlugin::HandleTransportSocket(Stream *)
++{
++    // TODO: respond to a transport callback here?
++    string provider_error;
++    if (!provider->processHttpRequest(provider_error)) {
++        dprintf (D_ALWAYS,"Error processing request: %s\n",provider_error.c_str());
++    }
++
++    return KEEP_STREAM;
++}
++
++void
++AviaryScheddPlugin::processDirtyJobs()
++{
++	BeginTransaction();
++
++	while (!dirtyJobs->empty()) {
++		DirtyJobEntry entry = dirtyJobs->front(); dirtyJobs->pop_front();
++		string key = entry.first;
++		string name = entry.second.first;
++		int value = entry.second.second;
++
++		processJob(key.c_str(), name.c_str(), value);
++	}
++
++	CommitTransaction();
++
++	isHandlerRegistered = false;
++}
++
++
++bool
++AviaryScheddPlugin::processJob(const char *key,
++							 const char *name,
++							 int value)
++{
++	PROC_ID id;
++	ClassAd *jobAd;
++
++		// Skip any key that doesn't point to an actual job
++	if (!IS_JOB(key)) return false;
++
++//	dprintf(D_FULLDEBUG, "Processing: %s\n", key);
++
++	id = getProcByString(key);
++	if (id.cluster < 0 || id.proc < 0) {
++		dprintf(D_FULLDEBUG, "Failed to parse key: %s - skipping\n", key);
++		return false;
++	}
++
++		// Lookup the job ad assocaited with the key. If it is not
++		// present, skip the key
++	if (NULL == (jobAd = ::GetJobAd(id.cluster, id.proc, false))) {
++		dprintf(D_ALWAYS,
++				"NOTICE: Failed to lookup ad for %s - maybe deleted\n",
++				key);
++		return false;
++	}
++
++		// Store two pieces of information in the Job, 1. the
++		// Submission's name, 2. the Submission's id
++		//
++		// Submissions indexed on their name, the id is present
++		// for reconstruction of the Submission
++
++		// XXX: Use the jobAd instead of GetAttribute below, gets us $$() expansion
++
++	MyString submissionName;
++	if (GetAttributeString(id.cluster, id.proc,
++						   ATTR_JOB_SUBMISSION,
++						   submissionName) < 0) {
++			// Provide a default name for the Submission
++
++			// If we are a DAG node, we default to our DAG group
++		PROC_ID dagman;
++		if (GetAttributeInt(id.cluster, id.proc,
++							ATTR_DAGMAN_JOB_ID,
++							&dagman.cluster) >= 0) {
++			dagman.proc = 0;
++
++			if (GetAttributeString(dagman.cluster, dagman.proc,
++								   ATTR_JOB_SUBMISSION,
++								   submissionName) < 0) {
++					// This can only happen if the DAGMan job was
++					// removed, and we remained, which should not
++					// happen, but could. In such a case we are
++					// orphaned, and we'll make a guess. We'll be
++					// wrong if the DAGMan job didn't use the
++					// default, but it is better to be wrong than
++					// to fail entirely, which is the alternative.
++				submissionName.sprintf("%s#%d", Name, dagman.cluster);
++			}
++		} else {
++			submissionName.sprintf("%s#%d", Name, id.cluster);
++		}
++
++		MyString tmp;
++		tmp += "\"";
++		tmp += submissionName;
++		tmp += "\"";
++		SetAttribute(id.cluster, id.proc,
++					 ATTR_JOB_SUBMISSION,
++					 tmp.Value());
++	}
++}
++
++void
++AviaryScheddPlugin::markDirty(const char *key,
++							const char *name,
++							const char *value)
++{
++	if (!IS_JOB(key)) return;
++	if (!(strcasecmp(name, ATTR_JOB_STATUS) == 0 ||
++		  strcasecmp(name, ATTR_LAST_JOB_STATUS) == 0)) return;
++
++	DirtyJobStatus status(name, atoi(value));
++	DirtyJobEntry entry(key, status);
++	dirtyJobs->push_back(DirtyJobEntry(key, DirtyJobStatus(name, atoi(value))));
++
++	if (!isHandlerRegistered) {
++			// To test destroyClassAd, set the timeout here to a few
++			// seconds, submit a job and immediately delete it.
++		daemonCore->Register_Timer(0,
++								   (TimerHandlercpp)
++								   &AviaryScheddPlugin::processDirtyJobs,
++								   "Process Dirty",
++								   this);
++		isHandlerRegistered = true;
++	}
++}
+diff --git a/src/condor_contrib/aviary/src/AviaryScheddPlugin.h b/src/condor_contrib/aviary/src/AviaryScheddPlugin.h
+new file mode 100644
+index 0000000..ad247ac
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryScheddPlugin.h
+@@ -0,0 +1,93 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _AVIARYSCHEDDPLUGIN_H
++#define _AVIARYSCHEDDPLUGIN_H
++
++// c++ includes
++#include <list>
++#include <string>
++
++// condor includes
++#include "condor_qmgr.h"
++#include "../condor_schedd.V6/ScheddPlugin.h"
++#include "ClassAdLogPlugin.h"
++#include "../condor_daemon_core.V6/condor_daemon_core.h"
++
++// local includes
++#include "SchedulerObject.h"
++#include "PROC_ID_comparator.h"
++
++
++namespace aviary {
++namespace job {
++
++// BIG NOTE: If Service is not first in the parent list the
++//           processDirtyJobs handler will segfault when using the
++//           dirtyJobs list
++class AviaryScheddPlugin : public Service, ClassAdLogPlugin, ScheddPlugin
++{
++
++public:
++
++	void earlyInitialize();
++
++	void initialize();
++
++	void shutdown();
++
++	void update(int cmd, const ClassAd *ad);
++
++	void archive(const ClassAd *ad);
++
++	void newClassAd(const char */*key*/);
++
++	void setAttribute(const char *key,
++					  const char *name,
++					  const char *value);
++
++	void destroyClassAd(const char *key);
++
++	void deleteAttribute(const char *key,
++						 const char *name);
++
++private:
++
++	typedef std::pair<std::string, int> DirtyJobStatus;
++	typedef std::pair<std::string, DirtyJobStatus> DirtyJobEntry;
++	typedef std::list<DirtyJobEntry> DirtyJobsType;
++	DirtyJobsType *dirtyJobs;
++
++
++	bool isHandlerRegistered;
++
++	bool m_initialized;
++
++	bool m_isPublishing;
++
++	int HandleTransportSocket(Stream *);
++
++	void processDirtyJobs();
++
++	bool processJob(const char *key, const char *name, int value);
++
++	void markDirty(const char *key, const char *name, const char *value);
++
++};
++
++}} /* aviary::job */
++
++#endif /* _AVIARYSCHEDDPLUGIN_H */
+diff --git a/src/condor_contrib/aviary/src/AviaryScheddPluginInstantiation.cpp b/src/condor_contrib/aviary/src/AviaryScheddPluginInstantiation.cpp
+new file mode 100644
+index 0000000..71c40c6
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryScheddPluginInstantiation.cpp
+@@ -0,0 +1,35 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#include "condor_common.h"
++
++#include "AviaryScheddPlugin.h"
++
++using namespace aviary::job;
++
++AviaryScheddPlugin *scheddPluginInstance;
++
++#ifndef WIN32
++
++void
++__attribute__ ((constructor))
++init(void)
++{
++    scheddPluginInstance = new AviaryScheddPlugin();
++}
++
++#endif
++
+diff --git a/src/condor_contrib/aviary/src/AviaryUtils.cpp b/src/condor_contrib/aviary/src/AviaryUtils.cpp
+new file mode 100644
+index 0000000..61e0693
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryUtils.cpp
+@@ -0,0 +1,130 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_classad.h"
++#include "condor_debug.h"
++#include "compat_classad_util.h"
++#include "condor_qmgr.h"
++#include "get_daemon_name.h"
++
++// c++ includes
++#include <map>
++
++// local includes
++#include "AviaryUtils.h"
++
++using namespace std;
++using namespace compat_classad;
++
++string
++aviary::util::getPoolName()
++{
++    string poolName;
++    char *tmp = NULL;
++
++    tmp = param("COLLECTOR_HOST");
++    if (!tmp) {
++        tmp = strdup("NO COLLECTOR_HOST, NOT GOOD");
++    }
++    poolName = tmp;
++    free(tmp); tmp = NULL;
++
++    return poolName;
++}
++
++string
++aviary::util::getScheddName() {
++	string scheddName;
++	char* tmp = NULL;
++
++	tmp = param("SCHEDD_NAME");
++	if (!tmp) {
++		scheddName = default_daemon_name();
++	} else {
++		scheddName = build_valid_daemon_name(tmp);
++		free(tmp); tmp = NULL;
++	}
++
++	return scheddName;
++}
++
++// cleans up the quoted values from the job log reader
++string aviary::util::trimQuotes(const char* str) {
++	string val = str;
++
++	size_t endpos = val.find_last_not_of("\\\"");
++	if( string::npos != endpos ) {
++		val = val.substr( 0, endpos+1 );
++	}
++	size_t startpos = val.find_first_not_of("\\\"");
++	if( string::npos != startpos ) {
++		val = val.substr( startpos );
++	}
++
++	return val;
++}
++
++// validate that an incoming group/user name is
++// alphanumeric, underscores, or a dot separator
++bool aviary::util::isValidGroupUserName(const string& _name, string& _text) {
++	const char* ptr = _name.c_str();
++	while( *ptr ) {
++		char c = *ptr++;
++		if (	('a' > c || c > 'z') &&
++			('A' > c || c > 'Z') &&
++			('0' > c || c > '9') &&
++			(c != '_' ) &&
++			(c != '.' ) ) {
++			_text = "Invalid name for group/user - alphanumeric, underscore and dot characters only";
++			return false;
++		}
++	}
++	return true;
++}
++
++// validate that an incoming attribute name is
++// alphanumeric, or underscores
++bool aviary::util::isValidAttributeName(const string& _name, string& _text) {
++	const char* ptr = _name.c_str();
++	while( *ptr ) {
++		char c = *ptr++;
++		if (	('a' > c || c > 'z') &&
++			('A' > c || c > 'Z') &&
++			('0' > c || c > '9') &&
++			(c != '_' ) ) {
++			_text = "Invalid name for attribute - alphanumeric and underscore characters only";
++			return false;
++		}
++	}
++	return true;
++}
++
++bool aviary::util::checkRequiredAttrs(compat_classad::ClassAd& ad, const char* attrs[], string& missing) {
++	bool status = true;
++	int i = 0;
++
++        while (NULL != attrs[i]) {
++		if (!ad.Lookup(attrs[i])) {
++			missing += " "; missing += attrs[i];
++			status = false;
++		}
++		i++;
++	}
++	return status;
++}
+diff --git a/src/condor_contrib/aviary/src/AviaryUtils.h b/src/condor_contrib/aviary/src/AviaryUtils.h
+new file mode 100644
+index 0000000..b13314d
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/AviaryUtils.h
+@@ -0,0 +1,43 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _AVIARYUTILS_H
++#define _AVIARYUTILS_H
++
++// condor includes
++#include "condor_classad.h"
++
++using namespace std;
++using namespace compat_classad;
++
++namespace aviary {
++namespace util {
++
++string getPoolName();
++
++string getScheddName();
++
++string trimQuotes(const char* value);
++
++bool isValidGroupUserName(const string& _name, string& _text);
++
++bool isValidAttributeName(const string& _name, string& _text);
++
++bool checkRequiredAttrs(ClassAd& ad, const char* attrs[], string& missing);
++
++}}
++
++#endif /* _AVIARYUTILS_H */
+diff --git a/src/condor_contrib/aviary/src/Axis2SoapProvider.cpp b/src/condor_contrib/aviary/src/Axis2SoapProvider.cpp
+new file mode 100644
+index 0000000..22749b1
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Axis2SoapProvider.cpp
+@@ -0,0 +1,329 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include <axutil_error_default.h>
++#include <axutil_log_default.h>
++#include <axutil_thread_pool.h>
++#include <axiom_xml_reader.h>
++#include <axutil_file_handler.h>
++#include "Axis2SoapProvider.h"
++
++// NOTE: these types are not in the public
++// Axis2/C API via headers but we need them;
++// review if there is a newer rev after 1.6
++
++// lifted out from http_receiver.c
++typedef struct
++{
++     axis2_transport_receiver_t http_server;
++     axis2_http_svr_thread_t *svr_thread;
++     int port;
++     axis2_conf_ctx_t *conf_ctx;
++     axis2_conf_ctx_t *conf_ctx_private;
++} axis2_http_server_impl_t;
++ 
++#define AXIS2_INTF_TO_IMPL(http_server) \
++ ((axis2_http_server_impl_t *)(http_server))
++ 
++// lifted out from http_svr_thread.c
++struct axis2_http_svr_thread
++{
++    int listen_socket;
++    axis2_bool_t stopped;
++    axis2_http_worker_t *worker;
++    int port;
++};
++
++typedef struct axis2_http_svr_thd_args
++{
++    axutil_env_t *env;
++    axis2_socket_t socket;
++    axis2_http_worker_t *worker;
++    axutil_thread_t *thread;
++} axis2_http_svr_thd_args_t;
++
++using namespace aviary::soap;
++
++Axis2SoapProvider::Axis2SoapProvider(int _log_level, const char* _log_file, const char* _repo_path)
++{
++    if (_log_file) {
++        m_log_file = _log_file;
++    }
++    if (_repo_path) {
++        m_repo_path = _repo_path;
++    }
++    m_log_level = axutil_log_levels_t(_log_level);
++    m_env = NULL;
++    m_http_server = NULL;
++    m_svr_thread = NULL;
++    m_initialized = false;
++    m_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
++}
++
++Axis2SoapProvider::~Axis2SoapProvider()
++{
++    if (m_http_server) {
++        axis2_transport_receiver_free(m_http_server, m_env);
++    }
++
++    if (m_env) {
++        axutil_env_free(m_env);
++    }
++
++    axiom_xml_reader_cleanup();
++
++}
++
++bool
++Axis2SoapProvider::init(int _port, int _read_timeout, std::string& _error)
++{
++    if (m_log_file.empty() || m_repo_path.empty()) {
++        _error = "Log file or repo path is NULL";
++        return false;
++    }
++
++    if (!m_initialized) {
++        axutil_allocator_t* allocator = axutil_allocator_init(NULL);
++        axutil_error_t *error = axutil_error_create(allocator);
++        axutil_log_t *log = axutil_log_create(allocator, NULL, m_log_file.c_str());
++
++        // TODO: not sure we need a TP but don't wanted to get tripped up by a NP
++        // deeper in the stack
++        axutil_thread_pool_t *thread_pool = axutil_thread_pool_init(allocator);
++        axiom_xml_reader_init();
++        m_env = axutil_env_create(allocator);
++        axutil_error_init();
++
++        m_env = axutil_env_create_with_error_log_thread_pool(allocator, error, log, thread_pool);
++        m_env->log->level = m_log_level;
++
++        axis2_status_t status = axutil_file_handler_access(m_repo_path.c_str(), AXIS2_R_OK);
++
++        if (status != AXIS2_SUCCESS) {
++			_error = m_repo_path;
++			_error += " does not exist or insufficient permissions";
++            AXIS2_LOG_ERROR(m_env->log, AXIS2_LOG_SI,_error.c_str());
++            return m_initialized;
++        }
++
++        m_http_server = axis2_http_server_create_with_file(m_env, m_repo_path.c_str(), _port);
++        if (!m_http_server) {
++			_error =  AXIS2_ERROR_GET_MESSAGE(m_env->error);
++            AXIS2_LOG_ERROR(m_env->log, AXIS2_LOG_SI, "HTTP server create failed: %d: %s",
++                            m_env->error->error_number,_error.c_str());
++            return m_initialized;
++        }
++
++        m_svr_thread = createHttpReceiver(m_env,m_http_server,_error); 
++        if (!m_svr_thread) {
++			_error =  AXIS2_ERROR_GET_MESSAGE(m_env->error);
++			AXIS2_LOG_ERROR(m_env->log, AXIS2_LOG_SI, "HTTP receiver create failed: %d: %s",
++                            m_env->error->error_number,_error.c_str());
++            return m_initialized;
++        }
++
++        m_initialized = true;
++    }
++
++    return m_initialized;
++
++}
++
++axis2_http_svr_thread_t*
++Axis2SoapProvider::createHttpReceiver(axutil_env_t* _env, axis2_transport_receiver_t* _server, std::string& _error)
++{
++
++    axis2_http_server_impl_t *server_impl = NULL;
++    axis2_http_worker_t *worker = NULL;
++
++    server_impl = AXIS2_INTF_TO_IMPL(_server);
++    server_impl->svr_thread = axis2_http_svr_thread_create(_env, server_impl->port);
++
++    // shouldn't bother checking this for ST but we'll play along
++    if(!server_impl->svr_thread) {
++        AXIS2_LOG_ERROR(_env->log, AXIS2_LOG_SI, "unable to create server thread for port %d",
++                server_impl->port);
++        return NULL;
++    }
++
++    worker = axis2_http_worker_create(_env, server_impl->conf_ctx);
++    if(!worker) {
++        AXIS2_LOG_ERROR(_env->log, AXIS2_LOG_SI, "axis2 http worker creation failed");
++        axis2_http_svr_thread_free(server_impl->svr_thread, _env);
++        server_impl->svr_thread = NULL;
++        return NULL;
++    }
++
++    axis2_http_worker_set_svr_port(worker, _env, server_impl->port);
++    axis2_http_svr_thread_set_worker(server_impl->svr_thread, _env, worker);
++    return server_impl->svr_thread;
++
++}
++
++SOCKET
++Axis2SoapProvider::getHttpListenerSocket()
++{
++    SOCKET socket = INVALID_SOCKET;
++    if (m_svr_thread) {
++        socket = m_svr_thread->listen_socket;
++    }
++    return socket;
++}
++
++bool
++Axis2SoapProvider::processHttpRequest(std::string& _error)
++{
++    if (!m_initialized) {
++         _error = "Axis2SoapPovider has not been initialized yet";
++        return false;
++    }
++    else {
++
++        AXIS2_ENV_CHECK(m_env, AXIS2_FAILURE);
++
++        int socket = INVALID_SOCKET;
++        axis2_http_svr_thd_args_t *arg_list = NULL;
++
++        socket = (int)axutil_network_handler_svr_socket_accept(m_env, m_svr_thread->listen_socket);
++        if(!m_svr_thread->worker)
++        {
++            AXIS2_LOG_ERROR(m_env->log, AXIS2_LOG_SI,
++                "Worker not ready yet. Cannot serve the request");
++            axutil_network_handler_close_socket(m_env, socket);
++            return false;
++        }
++
++        arg_list = (axis2_http_svr_thd_args_t *)AXIS2_MALLOC(m_env->allocator, sizeof(axis2_http_svr_thd_args_t));
++        if(!arg_list)
++        {
++            AXIS2_LOG_ERROR(m_env->log, AXIS2_LOG_SI,
++                "Memory allocation error in the svr thread loop");
++            return false;
++        }
++
++        arg_list->env = (axutil_env_t *)m_env;
++        arg_list->socket = socket;
++        arg_list->worker = m_svr_thread->worker;
++
++        // single-threaded for DC
++        invokeHttpWorker(NULL, (void *)arg_list);
++    }
++
++    return true;
++}
++
++void *AXIS2_THREAD_FUNC
++Axis2SoapProvider::invokeHttpWorker(
++    axutil_thread_t * thd,
++    void *data)
++{
++    struct AXIS2_PLATFORM_TIMEB t1, t2;
++    axis2_simple_http_svr_conn_t *svr_conn = NULL;
++    axis2_http_simple_request_t *request = NULL;
++    int millisecs = 0;
++    double secs = 0;
++    axis2_http_worker_t *tmp = NULL;
++    axis2_status_t status = AXIS2_FAILURE;
++    axutil_env_t *env = NULL;
++    axis2_socket_t socket;
++    axutil_env_t *thread_env = NULL;
++    axis2_http_svr_thd_args_t *arg_list = NULL;
++
++#ifndef WIN32
++#ifdef AXIS2_SVR_MULTI_THREADED
++    signal(SIGPIPE, SIG_IGN);
++#endif
++#endif
++
++    if(!data)
++    {
++        return NULL;
++    }
++    arg_list = (axis2_http_svr_thd_args_t *)data;
++
++    env = arg_list->env;
++    thread_env = axutil_init_thread_env(env);
++
++    IF_AXIS2_LOG_DEBUG_ENABLED(env->log)
++    {
++        AXIS2_PLATFORM_GET_TIME_IN_MILLIS(&t1);
++    }
++
++    socket = arg_list->socket;
++    svr_conn = axis2_simple_http_svr_conn_create(thread_env, (int)socket);
++    if(!svr_conn)
++    {
++        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "creating simple_http_svr_connection failed");
++        return NULL;
++    }
++
++    axis2_simple_http_svr_conn_set_rcv_timeout(svr_conn, thread_env, m_http_socket_read_timeout);
++
++    /* read HTTPMethod, URL, HTTP Version and http headers. Leave the remaining in the stream */
++    request = axis2_simple_http_svr_conn_read_request(svr_conn, thread_env);
++    if(!request)
++    {
++        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Could not create request");
++        return NULL;
++    }
++
++    tmp = arg_list->worker;
++    status = axis2_http_worker_process_request(tmp, thread_env, svr_conn, request);
++    axis2_simple_http_svr_conn_free(svr_conn, thread_env);
++    axis2_http_simple_request_free(request, thread_env);
++
++    IF_AXIS2_LOG_DEBUG_ENABLED(env->log)
++    {
++        AXIS2_PLATFORM_GET_TIME_IN_MILLIS(&t2);
++        millisecs = t2.millitm - t1.millitm;
++        secs = difftime(t2.time, t1.time);
++        if(millisecs < 0)
++        {
++            millisecs += 1000;
++            secs--;
++        }
++        secs += millisecs / 1000.0;
++
++#if defined(WIN32)
++        AXIS2_LOG_DEBUG(thread_env->log, AXIS2_LOG_SI, "Request processed...");
++#else
++        AXIS2_LOG_DEBUG(thread_env->log, AXIS2_LOG_SI, "Request processed in %.3f seconds", secs);
++#endif
++    }
++
++    if(status == AXIS2_SUCCESS)
++    {
++        AXIS2_LOG_DEBUG(thread_env->log, AXIS2_LOG_SI, "Request served successfully");
++    }
++    else
++    {
++        AXIS2_LOG_WARNING(thread_env->log, AXIS2_LOG_SI, "Error occurred in processing request ");
++    }
++
++    // just ST here
++    AXIS2_FREE(thread_env->allocator, arg_list);
++    axutil_free_thread_env(thread_env);
++    thread_env = NULL;
++
++    return NULL;
++}
++
++// TODO: need a public axis2_tcp_worker.h for this
++//Axis2SoapProvider::processTcpRequest() {
++//    axis2_tcp_worker_process_request();
++//}
+diff --git a/src/condor_contrib/aviary/src/Axis2SoapProvider.h b/src/condor_contrib/aviary/src/Axis2SoapProvider.h
+new file mode 100644
+index 0000000..1828ee8
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Axis2SoapProvider.h
+@@ -0,0 +1,80 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _AXIS2SOAPPROVIDER_H
++#define _AXIS2SOAPPROVIDER_H
++
++#include <string>
++#include <axis2_http_server.h>
++#include <axis2_http_transport.h>
++#include <platforms/axutil_platform_auto_sense.h>
++#include <axis2_http_worker.h>
++#include <axutil_network_handler.h>
++#include <axis2_http_svr_thread.h>
++// TODO: future tcp support
++//#include <axis2_tcp_worker.h>
++
++// borrow what DC does
++#if !defined(WIN32)
++#  ifndef SOCKET
++#    define SOCKET int
++#  endif
++#  ifndef INVALID_SOCKET
++#    define INVALID_SOCKET -1
++#  endif
++#endif /* not WIN32 */
++
++#define DEFAULT_LOG_FILE "./axis2.log"
++#define DEFAULT_REPO_FILE "../axis2.xml"
++#define DEFAULT_PORT 9090
++
++// C++ wrapper around a SINGLE-THREADED
++// Axis2/C engine; suitable for integration
++// with DaemonCore socket registration
++// ./configure --enable-multi-thread=no
++
++namespace aviary {
++namespace soap {
++
++class Axis2SoapProvider {
++    public:
++        Axis2SoapProvider(int _log_level=AXIS2_LOG_LEVEL_DEBUG, const char* _log_file=DEFAULT_LOG_FILE, const char* _repo_path=DEFAULT_REPO_FILE);
++        ~Axis2SoapProvider();
++        bool init(int _port, int _read_timeout, std::string& _error);
++        SOCKET getHttpListenerSocket();
++        bool processHttpRequest(std::string& _error);
++
++		const axutil_env_t* getEnv() {return m_env;}
++
++    private:
++        std::string m_log_file;
++        std::string m_repo_path;
++        axutil_log_levels_t m_log_level;
++        axutil_env_t* m_env;
++        axis2_transport_receiver_t* m_http_server;
++        axis2_http_svr_thread_t* m_svr_thread;
++        int m_http_socket_read_timeout;
++        bool m_initialized;
++
++        axis2_http_svr_thread_t* createHttpReceiver(axutil_env_t* _env, axis2_transport_receiver_t* _server, std::string& _error);
++        void *AXIS2_THREAD_FUNC invokeHttpWorker( axutil_thread_t * thd, void *data );
++};
++
++}}
++
++#endif    // _AXIS2SOAPPROVIDER_H
+diff --git a/src/condor_contrib/aviary/src/CMakeLists.txt b/src/condor_contrib/aviary/src/CMakeLists.txt
+new file mode 100644
+index 0000000..ea1a512
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/CMakeLists.txt
+@@ -0,0 +1,85 @@
++ ###############################################################
++ # 
++ # Copyright (C) 2009-2011, Red Hat, Inc.
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ###############################################################
++
++# shouldn't happen if gen code checked-in
++if ( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../codegen" )
++     message( FATAL_ERROR "run ../gen-xsd-cpp.sh first!")
++endif ()
++
++############################
++# file target references.
++############################
++file( GLOB COMMON_GEN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../codegen/common/src/*.cpp )
++file( GLOB JOB_GEN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../codegen/job/src/*.cpp )
++file( GLOB JOB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/AviaryJobService*.cpp )
++file( GLOB QUERY_GEN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../codegen/query/src/*.cpp )
++file( GLOB QUERY_SRCS ${CMAKE_CURRENT_SOURCE_DIR} AviaryQueryService*.cpp )
++
++file( GLOB SCHED_PLUGIN_SRCS Codec.cpp AviaryUtils.cpp SchedulerObject.cpp
++			PROC_ID_comparator.cpp Axis2SoapProvider.cpp AviaryScheddPlugin*.cpp )
++
++file( GLOB JOB_SERVER_SRCS aviary_query_server.cpp Axis2SoapProvider.cpp 
++							SubmissionObject.cpp JobServerJobLogConsumer.cpp
++							Job.cpp HistoryFile.cpp HistoryProcessingUtils.cpp Globals.cpp
++							Codec.cpp JobServerObject.cpp AviaryUtils.cpp )
++
++############################
++# schedd plugin
++############################
++src_target_ref( condor_collector "hashkey" COLLECTOR_REF )
++src_target_ref( utils "set_user_priv_from_ad" UTILS_REF )
++
++add_library (aviary_job_axis SHARED ${COMMON_GEN_SRCS} ${JOB_GEN_SRCS} ${JOB_SRCS} Codec.cpp AviaryUtils.cpp SchedulerObject.cpp )
++# remove unresolved deps by copying in -lwso2_wsf objects
++target_link_libraries(aviary_job_axis -Wl,--whole-archive -lwso2_wsf -Wl,--no-whole-archive)
++
++condor_plugin( AviaryScheddPlugin-plugin "${COLLECTOR_REF};${UTILS_REF};${SCHED_PLUGIN_SRCS}" "${C_LIBEXEC}" "${WSO2_FOUND}" ON)
++# remove unresolved deps by copying in -laxis2_engine objects
++target_link_libraries(AviaryScheddPlugin-plugin -Wl,--whole-archive -laxis2_engine -Wl,--no-whole-archive)
++
++############################
++# query server (aka ye old job server)
++############################
++add_library (aviary_query_axis SHARED ${COMMON_GEN_SRCS} ${QUERY_GEN_SRCS} ${QUERY_SRCS} )
++target_link_libraries (aviary_query_axis ${WSO2_FOUND})
++
++condor_exe( aviary_query_server "${JOB_SERVER_SRCS}"
++			"${C_SBIN}" "${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${COREDUMPER_FOUND};${KRB5_FOUND};${GLOBUS_FOUND};${GCB_FOUND};${WSO2_FOUND}" OFF )
++
++############################
++# install targets && configure our axis2.xml for platform
++############################
++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../etc/axis2.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/../etc/axis2.xml" @ONLY)
++install (FILES ${CMAKE_CURRENT_BINARY_DIR}/../etc/axis2.xml DESTINATION ${CMAKE_INSTALL_PREFIX} )
++
++install (TARGETS aviary_query_axis DESTINATION ${C_SERVICES}/query)
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/../services/query/services.xml DESTINATION ${C_SERVICES}/query )
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-common.xsd
++			${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-query.xsd
++			${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-query.wsdl
++		DESTINATION ${C_SERVICES}/query )
++
++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../etc/61aviary.config DESTINATION "${C_ETC_EXAMPLES}")
++
++install (TARGETS aviary_job_axis DESTINATION ${C_SERVICES}/job)
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/../services/job/services.xml DESTINATION ${C_SERVICES}/job )
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-common.xsd
++				${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-job.xsd
++				${CMAKE_CURRENT_SOURCE_DIR}/../etc/aviary-job.wsdl
++		DESTINATION ${C_SERVICES}/job )
++
+diff --git a/src/condor_contrib/aviary/src/Codec.cpp b/src/condor_contrib/aviary/src/Codec.cpp
+new file mode 100644
+index 0000000..0a9b19f
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Codec.cpp
+@@ -0,0 +1,144 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++// condor includes
++#include "condor_common.h"
++#include "condor_qmgr.h"
++
++// local includes
++#include "Codec.h"
++#include "AviaryUtils.h"
++
++using namespace compat_classad;
++using namespace aviary::codec;
++using namespace aviary::util;
++
++// TODO: defer until linking issues sorted
++//Codec*
++//DefaultCodecFactory::createCodec() {
++//    if (!m_codec) {
++//        m_codec = new BaseCodec;
++//    }
++//    return m_codec;
++//}
++
++BaseCodec::BaseCodec()
++{
++    //
++}
++
++BaseCodec::~BaseCodec()
++{
++    //
++}
++
++
++bool
++BaseCodec::addAttributeToMap (ClassAd& ad, const char* name, AttributeMapType& _map)
++{
++    ExprTree *expr;
++
++    // All these extra lookups are horrible. They have to
++    // be there because the ClassAd may have multiple
++    // copies of the same attribute name! This means that
++    // the last attribute with a given name will set the
++    // value, but the last attribute tends to be the
++    // attribute with the oldest (wrong) value. How
++    // annoying is that!
++    if (!(expr = ad.Lookup(name))) {
++        dprintf(D_FULLDEBUG, "Warning: failed to lookup attribute '%s' from ad\n", name);
++        return false;
++    }
++
++    classad::Value value;
++    ad.EvaluateExpr(expr,value);
++	std::string key = name;
++    switch (value.GetType()) {
++        // seems this covers expressions also
++        case classad::Value::BOOLEAN_VALUE:
++            _map[key] = new AviaryAttribute(AviaryAttribute::EXPR_TYPE,trimQuotes(ExprTreeToString(expr)).c_str());
++            break;
++        case classad::Value::INTEGER_VALUE:
++            _map[key] = new AviaryAttribute(AviaryAttribute::INTEGER_TYPE,ExprTreeToString(expr));
++            break;
++        case classad::Value::REAL_VALUE:
++            _map[key] = new AviaryAttribute(AviaryAttribute::FLOAT_TYPE,ExprTreeToString(expr));
++            break;
++        case classad::Value::STRING_VALUE:
++        default:
++            _map[key] = new AviaryAttribute(AviaryAttribute::STRING_TYPE,trimQuotes(ExprTreeToString(expr)).c_str());
++    }
++
++    return true;
++}
++
++bool
++BaseCodec::classAdToMap(ClassAd& ad, AttributeMapType& _map)
++{
++    ExprTree *expr;
++	const char *name;
++	ad.ResetExpr();
++	_map.clear();
++	while (ad.NextExpr(name,expr)) {
++		if (!addAttributeToMap(ad, name, _map)) {
++                    return false;
++		}
++	}
++
++// //debug
++//        if (DebugFlags & D_FULLDEBUG) {
++//            ad.dPrint(D_FULLDEBUG|D_NOHEADER);
++//        }
++
++    return true;
++}
++
++
++bool
++BaseCodec::mapToClassAd(AttributeMapType& _map, ClassAd& ad)
++{
++
++    for (AttributeMapIterator entry = _map.begin(); _map.end() != entry; entry++) {
++        const char* name = entry->first.c_str();
++        AviaryAttribute* value = entry->second;
++
++        switch (value->getType()) {
++            case AviaryAttribute::INTEGER_TYPE:
++                ad.Assign(name, atoi(value->getValue()));
++                break;
++            case AviaryAttribute::FLOAT_TYPE:
++                ad.Assign(name, atof(value->getValue()));
++                break;
++            case AviaryAttribute::STRING_TYPE:
++                ad.Assign(name, value->getValue());
++                break;
++            case AviaryAttribute::EXPR_TYPE:
++                ad.AssignExpr(name, value->getValue());
++                break;
++            default:
++                dprintf(D_FULLDEBUG, "Warning: Unknown/unsupported type in map for attribute '%s'\n", name);
++        }
++    }
++
++//     // debug
++//     if (DebugFlags & D_FULLDEBUG) {
++//           ad.dPrint(D_FULLDEBUG|D_NOHEADER);
++//     }
++
++    return true;
++}
+diff --git a/src/condor_contrib/aviary/src/Codec.h b/src/condor_contrib/aviary/src/Codec.h
+new file mode 100644
+index 0000000..2172c9f
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Codec.h
+@@ -0,0 +1,127 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _CODEC_H
++#define _CODEC_H
++
++// c++ includes
++#include <map>
++#include <vector>
++
++// condor includes
++#include <compat_classad.h>
++
++using namespace std;
++using namespace compat_classad;
++
++namespace aviary {
++namespace codec {
++
++// universal err struct
++struct AviaryStatus
++{
++	// keep these aligned with whatever public API
++	// in XSD, JSON, etc.
++    enum StatusType
++    {
++		// don't use "OK"
++        A_OK = 0,
++        FAIL = 1,
++        NO_MATCH = 2,
++        STRING_TYPE = 3,
++		INVALID_OFFSET = 4,
++		UNIMPLEMENTED = 5,
++		UNAVAILABLE = 6
++    };
++
++    StatusType type;
++    string text;
++};
++
++class AviaryAttribute
++{
++public:
++    enum AttributeType
++    {
++        EXPR_TYPE = 0,
++        INTEGER_TYPE = 1,
++        FLOAT_TYPE = 2,
++        STRING_TYPE = 3
++    };
++    AviaryAttribute ( AttributeType _type, const char* _value): m_type(_type), m_value(_value) {};
++    ~AviaryAttribute() { /**/ };
++
++    AttributeType getType() const { return m_type; }
++    const char * getValue() const { return m_value.c_str(); }
++
++private:
++    AttributeType m_type;
++    std::string m_value;
++};
++
++typedef map<std::string, AviaryAttribute*> AttributeMapType;
++typedef AttributeMapType::const_iterator AttributeMapIterator;
++
++// TODO: revisit
++// singleton class for encoding/decoding from/to transport-specific types
++// to a simple type to be used in the impl;
++// intent is to sit above ClassAds but still interact with them;
++// base is suitable for SOAP, but QMF might need subclassing
++// with it's !!descriptors idiom
++class Codec {
++public:
++    virtual bool addAttributeToMap(ClassAd& ad, const char* name, AttributeMapType& _map) = 0;
++    virtual bool classAdToMap(ClassAd &ad, AttributeMapType &_map) = 0;
++    virtual bool mapToClassAd(AttributeMapType &_map, ClassAd &ad) = 0;
++
++};
++
++// TODO: defer until linking issues sorted
++//class CodecFactory {
++// public:
++//     virtual Codec* createCodec() = 0;
++// 
++// };
++// 
++// class DefaultCodecFactory: public CodecFactory {
++// public:
++//     virtual Codec* createCodec();
++// protected:
++//     Codec* m_codec;
++// };
++
++class BaseCodec: public Codec {
++public:
++    //friend class DefaultCodecFactory;
++    virtual bool addAttributeToMap(ClassAd& ad, const char* name, AttributeMapType& _map);
++    virtual bool classAdToMap(ClassAd &ad, AttributeMapType &_map);
++    virtual bool mapToClassAd(AttributeMapType &_map, ClassAd &ad);
++
++//protected:
++    BaseCodec();
++    ~BaseCodec();
++
++private:
++    BaseCodec (const BaseCodec &);
++    BaseCodec& operator= (const BaseCodec &);
++
++};
++
++}}
++
++#endif    // _CODEC_H
+diff --git a/src/condor_contrib/aviary/src/Globals.cpp b/src/condor_contrib/aviary/src/Globals.cpp
+new file mode 100644
+index 0000000..14e36fb
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Globals.cpp
+@@ -0,0 +1,29 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "Globals.h"
++
++namespace aviary {
++namespace query {
++
++JobCollectionType g_jobs;
++SubmissionCollectionType g_submissions;
++OwnerlessClusterType g_ownerless_clusters;
++OwnerlessSubmissionType g_ownerless_submissions;
++
++}}
+\ No newline at end of file
+diff --git a/src/condor_contrib/aviary/src/Globals.h b/src/condor_contrib/aviary/src/Globals.h
+new file mode 100644
+index 0000000..2b09add
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Globals.h
+@@ -0,0 +1,51 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _GLOBALS_H
++#define _GLOBALS_H
++
++// condor includes
++#include "condor_common.h"
++
++// c++ includes
++#include <map>
++
++// local includes
++#include "Job.h"
++#include "JobServerObject.h"
++#include "SubmissionObject.h"
++#include "cmpstr.h"
++
++using namespace std;
++
++namespace aviary {
++namespace query {
++
++typedef map<const char *, Job *, cmpstr> JobCollectionType;
++typedef map<const char *, SubmissionObject *, cmpstr> SubmissionCollectionType;
++typedef map<int, string> OwnerlessClusterType;
++typedef map<int, SubmissionObject*> OwnerlessSubmissionType;
++
++extern JobCollectionType g_jobs;
++extern SubmissionCollectionType g_submissions;
++extern OwnerlessClusterType g_ownerless_clusters;
++extern OwnerlessSubmissionType g_ownerless_submissions;
++
++}}
++
++#endif /* _GLOBALS_H */
+diff --git a/src/condor_contrib/aviary/src/HistoryFile.cpp b/src/condor_contrib/aviary/src/HistoryFile.cpp
+new file mode 100644
+index 0000000..13f6d0b
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/HistoryFile.cpp
+@@ -0,0 +1,385 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#include "condor_common.h"
++
++#include "condor_config.h"
++#include "condor_debug.h"
++
++#include "condor_attributes.h"
++
++#include "directory.h"
++
++#include "HistoryFile.h"
++
++#include "HistoryProcessingUtils.h"
++
++#include <libgen.h> // dirname
++
++#include <string>
++
++#define HISTORY_INDEX_SUFFIX ".idx"
++using std::string;
++
++
++HistoryFile::HistoryFile(const string name):
++	m_name(name),
++	m_stat(NULL),
++	m_file(NULL),
++	m_index(NULL)
++{
++}
++
++HistoryFile::~HistoryFile()
++{
++	cleanup();
++}
++
++void
++HistoryFile::cleanup()
++{
++	m_entries.clear();
++	if (m_file) { fclose(m_file); m_file = NULL; }
++	if (m_index) { fclose(m_index); m_index = NULL; }
++	if (m_stat) { free(m_stat); m_stat = NULL; }
++}
++
++HistoryFile::HistoryFile(const HistoryFile &base)
++{
++	m_file = NULL;
++	m_index = NULL;
++	m_stat = NULL;
++
++	*this = base;
++}
++
++HistoryFile &
++HistoryFile::operator=(const HistoryFile &base)
++{
++	if (this != &base) {
++		(*this).m_name = base.m_name;
++
++		cleanup();
++
++		// Don't just copy the stat and FILE* members, initialize them
++		CondorError errstack;
++		if (!init(errstack)) {
++			// XXX: Should throw an exception here
++			dprintf ( D_ALWAYS, "HistoryFile::operator=: %s\n",
++					errstack.getFullText(true));		
++		}
++	}
++
++	return *this;
++}
++
++bool
++HistoryFile::init(CondorError &errstack)
++{
++	StatWrapper stat_wrapper;
++
++	if (stat_wrapper.Stat(m_name.c_str())) {
++		errstack.pushf("HistoryFile::init", 1,
++					   "Failed to stat %s: %d (%s)\n",
++					   m_name.c_str(),
++					   stat_wrapper.GetErrno(),
++					   strerror(stat_wrapper.GetErrno()));
++		return false;
++	}
++
++	m_stat = (StatStructType *) malloc(sizeof(StatStructType));
++	ASSERT(m_stat);
++	memcpy(m_stat, stat_wrapper.GetBuf(), sizeof(StatStructType));
++	if (!S_ISREG(m_stat->st_mode)) {
++		errstack.pushf("HistoryFile::init", 2,
++					   "%s: not a regular file\n",
++					   m_name.c_str());
++		return false;
++	}
++
++	m_file = safe_fopen_wrapper(m_name.c_str(), "r");
++	if (NULL == m_file) {
++		errstack.pushf("HistoryFile::init", 4,
++					   "Failed to fopen %s: %d (%s)\n",
++					   m_name.c_str(), errno, strerror(errno));
++		return false;
++	}
++
++	// Store the index in history.INO.idx to handle renames
++	MyString tmp;
++	char *buf = strdup(m_name.c_str());
++	ASSERT(buf);
++	long unsigned int id;
++	ASSERT(getId(id));
++	tmp.sprintf("%s%shistory.%ld%s", dirname(buf), DIR_DELIM_STRING, id, HISTORY_INDEX_SUFFIX);
++	m_index_name = tmp.Value();
++	free(buf);
++
++	const char *mode = "r+";
++
++	if (stat_wrapper.Stat(m_index_name.c_str())) {
++			// Not being available is acceptable
++		if (ENOENT != stat_wrapper.GetErrno()) {
++			errstack.pushf("HistoryFile::init", 1,
++						   "Failed to stat %s: %d (%s)\n",
++						   m_index_name.c_str(),
++						   stat_wrapper.GetErrno(),
++						   strerror(stat_wrapper.GetErrno()));
++			return false;
++		}
++
++		mode = "w+";
++ 	}
++
++	const StatStructType *stat = stat_wrapper.GetBuf();
++	if (!S_ISREG(stat->st_mode)) {
++		errstack.pushf("HistoryFile::init", 2,
++					   "%s: not a regular file\n",
++					   m_index_name.c_str());
++		return false;
++	}
++
++	m_index = safe_fopen_wrapper(m_index_name.c_str(), mode);
++	if (NULL == m_index) {
++		errstack.pushf("HistoryFile::init", 4,
++					   "Failed to fopen %s: %d (%s)\n",
++					   m_index_name.c_str(), errno, strerror(errno));
++		return false;
++	}
++
++	return true;
++}
++
++bool
++HistoryFile::getId(long unsigned int &id)
++{
++	if (!m_stat) return false;
++
++	id = m_stat->st_ino;
++	return true;
++}
++
++HistoryFile::HistoryEntriesTypeIterators
++HistoryFile::poll(CondorError &/*errstack*/)
++{
++	// Record the end of the current set of records, used to
++	// return just the newly read records
++	int size = m_entries.size();
++
++	// Load from the index
++	CondorError ignored_errstack;
++	if (!pollIndex(ignored_errstack)) {
++		dprintf(D_FULLDEBUG, "%s\n", ignored_errstack.getFullText(true));		
++	}
++
++	// Seek to the end of the last known record
++	if (!m_entries.empty()) {
++		HistoryEntry entry = m_entries.back();
++		fseek(m_file, entry.stop, SEEK_SET);
++	}
++
++	int end, error, empty;
++	end = 0;
++	while (!end) {
++		long int start, stop;
++
++		start = ftell(m_file);
++
++		// NOTE: If the ClassAd parsing completes without finding
++		// the delimiter the result is end=1 and empty=0. This
++		// should be sufficient for identifying incomplete
++		// records that are otherwise valid.
++		ClassAd ad(m_file, "***", end, error, empty);
++
++		stop = ftell(m_file);
++
++		if (end) continue;
++		if (error) {
++			error = 0;
++			dprintf(D_ALWAYS, "HistoryFile::poll: malformed ad, skipping\n");
++			continue;
++		}
++		if (empty) {
++			empty = 0;
++			dprintf(D_ALWAYS, "HistoryFile::poll: empty ad, skipping\n");
++			continue;
++		}
++
++		int cluster, proc, q_date, status, entered_status;
++		char *global_id = NULL, *cmd = NULL, *args1 = NULL, *args2 = NULL;
++		char *release_reason = NULL, *hold_reason = NULL;
++		char *submission = NULL;
++		char *owner = NULL;
++		if (!ad.LookupInteger(ATTR_CLUSTER_ID, cluster)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping\n",
++					ATTR_CLUSTER_ID);
++			continue;
++		}
++		if (!ad.LookupInteger(ATTR_PROC_ID, proc)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping\n",
++					ATTR_PROC_ID);
++			continue;
++		}
++		if (!ad.LookupInteger(ATTR_Q_DATE, q_date)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping: %d.%d\n",
++					ATTR_Q_DATE, cluster, proc);
++			continue;
++		}
++		if (!ad.LookupInteger(ATTR_JOB_STATUS, status)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping: %d.%d\n",
++					ATTR_JOB_STATUS, cluster, proc);
++			continue;
++		}
++		if (!ad.LookupInteger(ATTR_ENTERED_CURRENT_STATUS, entered_status)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping: %d.%d\n",
++					ATTR_ENTERED_CURRENT_STATUS, cluster, proc);
++			continue;
++		}
++		if (!ad.LookupString(ATTR_GLOBAL_JOB_ID, &global_id)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping: %d.%d\n",
++					ATTR_GLOBAL_JOB_ID, cluster, proc);
++			continue;
++		}
++		if (!ad.LookupString(ATTR_JOB_CMD, &cmd)) {
++			dprintf(D_ALWAYS, "HistoryFile::poll: no %s, skipping: %d.%d\n",
++					ATTR_JOB_CMD, cluster, proc);
++			continue;
++		}
++		ad.LookupString(ATTR_JOB_ARGUMENTS1, &args1);
++		ad.LookupString(ATTR_JOB_ARGUMENTS2, &args2);
++		ad.LookupString(ATTR_RELEASE_REASON, &release_reason);
++		ad.LookupString(ATTR_HOLD_REASON, &hold_reason);
++		ad.LookupString(ATTR_JOB_SUBMISSION, &submission);
++		ad.LookupString(ATTR_OWNER, &owner);
++
++		// Write an index record
++		fprintf(m_index,
++				"%ld %ld %s %d %d %d %d %d\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
++				start, stop, global_id,
++				cluster, proc,
++				q_date, status, entered_status,
++				submission ? submission : "",
++				owner ? owner : "",
++				cmd,
++				args1 ? args1 : "",
++				args2 ? args2 : "",
++				release_reason ? release_reason : "",
++				hold_reason ? hold_reason : "");
++
++		HistoryEntry entry;
++
++		entry.file = m_name;
++		entry.start = start;
++		entry.stop = stop;
++		entry.id = global_id;
++		entry.cluster = cluster;
++		entry.proc = proc;
++		entry.q_date = q_date;
++		entry.status = status;
++		entry.entered_status = entered_status;
++		if (submission) entry.submission = submission;
++		if (owner) entry.owner = owner;
++		entry.cmd = cmd;
++		if (args1) entry.args1 = args1;
++		if (args2) entry.args2 = args2;
++		if (release_reason) entry.release_reason = release_reason;
++		if (hold_reason) entry.hold_reason = hold_reason;
++
++		m_entries.push_back(entry);
++
++        free(global_id);free(cmd);free(args1); free(args2);
++        free(release_reason); free(hold_reason);
++        free(submission);
++        free(owner);
++	}
++
++		// Return iterators for newly read records
++	return HistoryFile::HistoryEntriesTypeIterators(m_entries.begin() + size,
++													m_entries.end());
++}
++
++/**
++ * Index format:
++ *  start(%ld) stop(%ld) id(%s) cluster(%d) proc(%d) q_date(%d) status(%d) entered_status(%d)
++ *  submission(%s)
++ *  cmd(%s)
++ *  args1(%s)
++ * 	args2(%s)
++ *  release_reason(%s)
++ *  hold_reason(%s)
++ */
++bool
++HistoryFile::pollIndex(CondorError &errstack)
++{
++	while (1) {
++		int code;
++		HistoryEntry entry;
++
++		entry.file = m_name;
++		char *id = NULL;
++		code = fscanf(m_index, "%ld %ld %as %d %d %d %d %d",
++					  &entry.start, &entry.stop, &id,
++					  &entry.cluster, &entry.proc,
++					  &entry.q_date, &entry.status, &entry.entered_status);
++		if (code != 8) {
++			// Ok, at the end of the file, we're done
++			// code check is to handle truncated final entry
++			if (feof(m_index) && code < 0) {
++				break;
++			}
++
++			// XXX: EINTR?
++			errstack.pushf("HistoryFile::pollIndex", 6,
++						   "Failed to fscanf HistoryEntry from %s, "
++						   "rc=%d: %d (%s)\n",
++						   m_index_name.c_str(), code, errno, strerror(errno));
++
++			return false;
++		}
++
++		MyString buf;
++
++		buf.readLine(m_index); // consume newline
++
++#define BUF_SET(dest,attr)											\
++		if (buf.readLine(m_index)) {								\
++			buf.trim();												\
++			if (!buf.IsEmpty()) {									\
++				dest = buf.Value();									\
++			}														\
++		} else {													\
++			errstack.pushf("HistoryFile::pollIndex", 7,				\
++						   "Failed to read %s's %s from %s\n",		\
++						   id, attr, m_index_name.c_str());			\
++			return false;											\
++		}
++
++		BUF_SET(entry.submission, ATTR_JOB_SUBMISSION);
++		BUF_SET(entry.owner, ATTR_OWNER);
++		BUF_SET(entry.cmd, ATTR_JOB_CMD);
++		BUF_SET(entry.args1, ATTR_JOB_ARGUMENTS1);
++		BUF_SET(entry.args2, ATTR_JOB_ARGUMENTS2);
++		BUF_SET(entry.release_reason, ATTR_RELEASE_REASON);
++		BUF_SET(entry.hold_reason, ATTR_HOLD_REASON);
++
++		entry.id = id;
++		free(id); id = NULL;
++
++		m_entries.push_back(entry);
++	}
++
++	return true;
++}
+diff --git a/src/condor_contrib/aviary/src/HistoryFile.h b/src/condor_contrib/aviary/src/HistoryFile.h
+new file mode 100644
+index 0000000..a7b0adc
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/HistoryFile.h
+@@ -0,0 +1,90 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _HISTORYFILE_H
++#define _HISTORYFILE_H
++
++#include <string>
++#include <deque>
++
++using std::string;
++using std::deque;
++using std::pair;
++
++#include "stat_wrapper.h"
++#include "CondorError.h"
++
++namespace aviary {
++namespace history {
++		
++struct HistoryEntry
++{
++	string file;
++	long int start; // ftell stream index for record start
++	long int stop;  // ftell stream index for record end
++	string id;
++	int q_date;
++	int cluster;
++	int proc;
++	int status;
++	int entered_status;
++	string submission;
++	string owner;
++	string cmd;
++	string args1;
++	string args2;
++	string release_reason;
++	string hold_reason;
++};
++
++class HistoryFile
++{
++public:
++	typedef deque<HistoryEntry> HistoryEntriesType;
++	typedef HistoryEntriesType::const_iterator HistoryEntriesTypeIterator;
++	typedef pair<HistoryEntriesTypeIterator,
++				 HistoryEntriesTypeIterator> HistoryEntriesTypeIterators;
++
++	HistoryFile(const string name);
++
++	~HistoryFile();
++
++	HistoryFile(const HistoryFile &base);
++	HistoryFile & operator=(const HistoryFile &base);
++
++	bool init(CondorError &errstack);
++
++	bool getId(long unsigned int &id);
++
++	HistoryEntriesTypeIterators poll(CondorError &errstack);
++
++	void cleanup();
++
++private:
++	string m_name;
++	string m_index_name;
++	HistoryEntriesType m_entries;
++	StatStructType *m_stat;
++	FILE *m_file;
++	FILE *m_index;
++
++	bool pollIndex(CondorError &errstack);
++
++};
++
++}}
++
++#endif /* _HISTORYFILE_H */
+diff --git a/src/condor_contrib/aviary/src/HistoryProcessingUtils.cpp b/src/condor_contrib/aviary/src/HistoryProcessingUtils.cpp
+new file mode 100644
+index 0000000..0936f4d
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/HistoryProcessingUtils.cpp
+@@ -0,0 +1,265 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_debug.h"
++#include "condor_attributes.h"
++#include "CondorError.h"
++#include "directory.h"
++#include "stat_wrapper.h"
++
++//local includes
++#include "JobServerJobLogConsumer.h"
++#include "Job.h"
++#include "HistoryProcessingUtils.h"
++#include "HistoryFile.h"
++#include "AviaryUtils.h"
++#include "Globals.h"
++
++// platform includes
++#include <libgen.h> // dirname
++
++// c++ includes
++#include <string>
++#include <deque>
++#include <set>
++
++using namespace aviary::query;
++
++#define HISTORY_INDEX_SUFFIX ".idx"
++using namespace std;
++
++typedef set<long unsigned int> HistoryFileListType;
++static HistoryFileListType m_historyFiles;
++MyString m_path;
++
++// force a reset of history processing
++void aviary::history::init_history_files() {
++    m_historyFiles.clear();
++    processHistoryDirectory();
++    processOrphanedIndices();
++    processCurrentHistory(true);
++}
++
++// Processing jobs from history file must allow for
++// duplicates, such as when current history file is renamed.
++static
++void
++process ( const HistoryEntry &entry )
++{
++    MyString key;
++
++    key.sprintf ( "%d.%d", entry.cluster, entry.proc );
++
++    const char* key_cstr = key.StrDup();
++
++    HistoryJobImpl *hji = new HistoryJobImpl (entry);
++
++    JobCollectionType::const_iterator element = g_jobs.find ( key_cstr );
++    if ( g_jobs.end() != element )
++    {
++	(*element).second->setImpl(hji);
++	dprintf ( D_FULLDEBUG, "HistoryJobImpl added to '%s'\n", key_cstr );
++    }
++    else {
++      // live job long gone...could be a restart
++      Job* job = new Job(key_cstr);
++      job->setImpl(hji);
++      g_jobs[key_cstr] = job;
++      dprintf ( D_FULLDEBUG, "HistoryJobImpl created for '%s'\n", key_cstr);
++    }
++
++	// // debug
++	// fprintf ( stdout,
++	//          "%ld %ld %s %d %d %d %d %d %s %s %s %s %s %s %s\n",
++	//          entry.start, entry.stop, entry.id.c_str(),
++	//          entry.cluster, entry.proc,
++	//          entry.q_date, entry.status, entry.entered_status,
++	//          entry.submission.c_str(),
++	//          entry.owner.c_str(),
++	//          entry.cmd.c_str(),
++	//          entry.args1.c_str(),
++	//          entry.args2.c_str(),
++	//          entry.release_reason.c_str(),
++	//          entry.hold_reason.c_str() );
++}
++
++/**
++ * Process the history directory and maintain the history file map
++ *
++ * Only handle rotated history files, those history.* that are not an
++ * index. For each one that is not in the history file map, create a
++ * new HistoryFile, poll it for entries to process, and add it to the
++ * map.
++ */
++void
++aviary::history::processHistoryDirectory()
++{
++    const char *file = NULL;
++
++    Directory dir ( m_path.Value() );
++    dir.Rewind();
++    while ( ( file = dir.Next() ) )
++    {
++        // Skip all non-history files, e.g. history and history.*.idx
++        if ( strncmp ( file, "history.", 8 ) ||
++                !strncmp ( file + ( strlen ( file ) - 4 ), HISTORY_INDEX_SUFFIX, 4 ) ) continue;
++
++        HistoryFile h_file ( ( m_path + DIR_DELIM_STRING + file ).Value() );
++        CondorError errstack;
++        if ( !h_file.init ( errstack ) )
++        {
++            dprintf ( D_ALWAYS, "%s\n", errstack.getFullText() );
++            return;
++        }
++        errstack.clear();
++
++        long unsigned int id;
++        ASSERT ( h_file.getId ( id ) );
++        HistoryFileListType::iterator entry = m_historyFiles.find ( id );
++        if ( m_historyFiles.end() == entry )
++        {
++            HistoryFile::HistoryEntriesTypeIterators ij = h_file.poll ( errstack );
++            for ( HistoryFile::HistoryEntriesTypeIterator i = ij.first;
++                    i != ij.second;
++                    i++ )
++            {
++                process ( ( *i ) );
++            }
++
++            m_historyFiles.insert ( id );
++        }
++    }
++}
++
++/**
++ * Process orphaned index files, those that exist but do not have a
++ * corresponding history file.
++ *
++ * Process all .idx files looking for the corresponding HistoryFile in
++ * the history file map.
++ */
++void
++aviary::history::processOrphanedIndices()
++{
++    const char *file = NULL;
++
++    Directory dir ( m_path.Value() );
++    dir.Rewind();
++    while ( ( file = dir.Next() ) )
++    {
++        // Skip all non-history index files, e.g. history and history.*
++        if ( strncmp ( file, "history.", 8 ) ||
++                strncmp ( file + ( strlen ( file ) - 4 ), HISTORY_INDEX_SUFFIX, 4 ) ) continue;
++
++        // XXX: This is ugly because it indicates we know details
++        // of how HistoryFile implements index files.
++
++        // The index file is "history.%ld.idx" where %ld is the id
++        // of the history file the index is for.
++
++        long unsigned int id;
++        int count = sscanf ( file, "history.%ld.idx", &id );
++        if ( 1 != count )
++        {
++            dprintf ( D_ALWAYS, "Error parsing %s, skipping.\n", file );
++            continue;
++        }
++
++        HistoryFileListType::iterator entry = m_historyFiles.find ( id );
++        if ( m_historyFiles.end() == entry )
++        {
++            // The index is dangling, remove it.
++            if ( !dir.Remove_Current_File() )
++            {
++               dprintf ( D_ALWAYS, "Failed to remove: %s\n", file );
++            }
++        }
++    }
++}
++
++/**
++ * Process the current history file.
++ *
++ * 1) check to see if it is properly initialized, recording id (inode)
++ * 2) stat the current history file
++ * 3) poll for new entries and process them
++ * 4) detect rotations
++ */
++void
++aviary::history::processCurrentHistory(bool force_reset)
++{
++    static MyString currentHistoryFilename = m_path + DIR_DELIM_STRING + "history";
++    static HistoryFile currentHistory ( currentHistoryFilename.Value() );
++
++    CondorError errstack;
++
++    if (force_reset) {
++       currentHistory.cleanup();
++    }
++
++	// (1)
++    long unsigned int id;
++    if ( !currentHistory.getId ( id ) || force_reset)
++    {
++        if ( !currentHistory.init ( errstack ) )
++        {
++            dprintf ( D_ALWAYS, "%s\n", errstack.getFullText() );
++            return;
++        }
++        ASSERT ( currentHistory.getId ( id ) );
++        m_historyFiles.insert ( id );
++    }
++
++    // (2)
++    // Stat before poll to handle race of: poll + write + rotate + stat
++    StatWrapper stat_wrapper;
++    if ( stat_wrapper.Stat ( currentHistoryFilename ) )
++    {
++        dprintf ( D_ALWAYS, "Failed to stat %s: %d (%s)\n",
++                  currentHistoryFilename.Value(),
++                  stat_wrapper.GetErrno(), strerror ( stat_wrapper.GetErrno() ) );
++        return;
++    }
++    const StatStructType *stat = stat_wrapper.GetBuf();
++    ASSERT ( currentHistory.getId ( id ) );
++
++    // (3)
++    errstack.clear();
++    HistoryFile::HistoryEntriesTypeIterators poll = currentHistory.poll ( errstack );
++    for ( HistoryFile::HistoryEntriesTypeIterator i = poll.first;
++            i != poll.second;
++            i++ )
++    {
++        process ( ( *i ) );
++    }
++
++    // (4)
++    // If different the file has rotated
++    if ( id != stat->st_ino )
++    {
++        currentHistory = HistoryFile ( currentHistoryFilename.Value() );
++        if ( !currentHistory.init ( errstack ) )
++        {
++            dprintf ( D_ALWAYS, "%s\n", errstack.getFullText() );
++            return;
++        }
++        ASSERT ( currentHistory.getId ( id ) );
++        m_historyFiles.insert ( id );
++    }
++}
+diff --git a/src/condor_contrib/aviary/src/HistoryProcessingUtils.h b/src/condor_contrib/aviary/src/HistoryProcessingUtils.h
+new file mode 100644
+index 0000000..c16531a
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/HistoryProcessingUtils.h
+@@ -0,0 +1,34 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _HISTORYPROCESSINGUTILS_H
++#define _HISTORYPROCESSINGUTILS_H
++
++#include "Job.h"
++#include "AviaryUtils.h"
++
++namespace aviary {
++namespace history {
++
++void init_history_files();
++void processHistoryDirectory();
++void processOrphanedIndices();
++void processCurrentHistory(bool force_reset = false);
++bool populateMapFromClassAd ( ClassAd& ad, AttributeMapType& _map );
++
++}}
++
++#endif /* _HISTORYPROCESSINGUTILS_H */
+diff --git a/src/condor_contrib/aviary/src/Job.cpp b/src/condor_contrib/aviary/src/Job.cpp
+new file mode 100644
+index 0000000..89716d6
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Job.cpp
+@@ -0,0 +1,691 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++// condor includes
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "condor_attributes.h"
++//#include "condor_parser.h"
++#include "compat_classad.h"
++#include "proc.h"
++#include "stl_string_utils.h"
++
++// c++ includes
++#include <sstream>
++
++// local includes
++#include "Globals.h"
++#include "AviaryUtils.h"
++
++using namespace std;
++using namespace compat_classad;
++using namespace aviary::query;
++using namespace aviary::util;
++
++// Any key that begins with the '0' char is either the
++// header or a cluster, i.e. not a job
++#define IS_JOB(key) ((key) && '0' != (key)[0])
++
++// summary attributes
++ const char *ATTRS[] = {ATTR_CLUSTER_ID,
++                           ATTR_PROC_ID,
++                           ATTR_GLOBAL_JOB_ID,
++                           ATTR_Q_DATE,
++                           ATTR_ENTERED_CURRENT_STATUS,
++                           ATTR_JOB_STATUS,
++                           ATTR_JOB_CMD,
++                           ATTR_JOB_ARGUMENTS1,
++                           ATTR_JOB_ARGUMENTS2,
++                           ATTR_RELEASE_REASON,
++                           ATTR_HOLD_REASON,
++                           ATTR_JOB_SUBMISSION,
++                           ATTR_OWNER,
++                           NULL
++                          };
++
++// TODO: C++ utils which may very well exist elsewhere :-)
++template <class T>
++bool from_string ( T& t,
++                   const string& s,
++                   ios_base& ( *f ) ( ios_base& ) )
++{
++    istringstream iss ( s );
++    return ! ( iss >> f >> t ).fail();
++}
++
++template <class T>
++string to_string ( T t, ios_base & ( *f ) ( ios_base& ) )
++{
++    ostringstream oss;
++    oss << f << t;
++    return oss.str();
++}
++
++//////////////
++// LiveJobImpl
++//////////////
++LiveJobImpl::LiveJobImpl (const char* cluster_proc, ClusterJobImpl* parent)
++{
++    m_job = NULL;
++    m_parent = NULL;
++    m_summary_ad = NULL;
++    m_full_ad = new ClassAd();
++    if ( parent)
++    {
++        m_parent = parent;
++        m_parent->incrementRef();
++        m_full_ad->ChainToAd ( parent->m_full_ad );
++    }
++
++    dprintf ( D_FULLDEBUG, "LiveJobImpl created for '%s'\n", cluster_proc);
++}
++
++LiveJobImpl::~LiveJobImpl()
++{
++    // unchain our parent first
++    if (m_full_ad) {
++        m_full_ad->Unchain();
++        delete m_full_ad;
++        m_full_ad = NULL;
++    }
++
++    if (m_summary_ad) {
++        delete m_summary_ad;
++        m_summary_ad = NULL;
++    }
++
++    if (m_parent) {
++        m_parent->decrementRef();
++    }
++
++    dprintf ( D_FULLDEBUG, "LiveJobImpl destroyed: key '%s'\n", m_job->getKey());
++}
++
++bool
++LiveJobImpl::get ( const char *_name, const AviaryAttribute *&_attribute ) const
++{
++    // our job ad is chained so lookups will
++    // encompass our parent ad as well as the child
++
++    // parse the type
++    ExprTree *expr = NULL;
++    if ( ! ( expr = m_full_ad->Lookup ( _name ) ) )
++    {
++	    dprintf ( D_FULLDEBUG,
++                  "warning: failed to lookup attribute %s in job '%s'\n", _name, m_job->getKey() );
++        return false;
++    }
++    // decode the type
++    classad::Value value;
++    m_full_ad->EvaluateExpr(expr,value);
++    switch ( value.GetType() )
++    {
++        case classad::Value::INTEGER_VALUE:
++        {
++            int i;
++            if ( !m_full_ad->LookupInteger ( _name, i ) )
++            {
++                return false;
++            }
++            const char* int_str = to_string<int> ( i,dec ).c_str();
++            _attribute = new AviaryAttribute ( AviaryAttribute::INTEGER_TYPE, int_str );
++            return true;
++        }
++        case classad::Value::REAL_VALUE:
++        {
++            float f;
++            if ( !m_full_ad->LookupFloat ( _name, f ) )
++            {
++                return false;
++            }
++            const char* float_str = to_string<float> ( f,dec ).c_str();
++            _attribute = new AviaryAttribute ( AviaryAttribute::FLOAT_TYPE, float_str );
++            return true;
++        }
++        case classad::Value::STRING_VALUE:
++        {
++            MyString str;
++            if ( !m_full_ad->LookupString ( _name, str ) )
++            {
++                return false;
++            }
++            _attribute = new AviaryAttribute ( AviaryAttribute::STRING_TYPE, str.Value() );
++            return true;
++        }
++        default:
++        {
++            ExprTree* tree = NULL;
++            if ( ! ( tree = m_full_ad->Lookup ( _name ) ) )
++            {
++                return false;
++            }
++            const char* rhs;
++            rhs = ExprTreeToString( expr );
++            _attribute = new AviaryAttribute ( AviaryAttribute::EXPR_TYPE, rhs );
++            return true;
++        }
++    }
++
++    return false;
++}
++
++int LiveJobImpl::getStatus() const
++{
++    const AviaryAttribute* attr = NULL;
++
++    if ( !this->get ( ATTR_JOB_STATUS, attr ) )
++    {
++	// assume we might get cluster jobs here also
++	return JOB_STATUS_MIN;
++    }
++
++    return strtol ( attr->getValue(), ( char ** ) NULL, 10 );
++}
++
++void
++LiveJobImpl::set ( const char *_name, const char *_value )
++{
++
++    if ( strcasecmp ( _name, ATTR_JOB_SUBMISSION ) == 0 )
++    {
++        string val = trimQuotes( _value );
++        // grab the cluster from our key
++        PROC_ID id = getProcByString(m_job->getKey());
++	if (m_job) {
++		m_job->setSubmission ( val.c_str(), id.cluster );
++	}
++    }
++
++    // our status is changing...decrement for old one
++    if ( strcasecmp ( _name, ATTR_JOB_STATUS ) == 0 )
++    {
++	if ( m_job )
++        {
++	    m_job->setStatus(this->getStatus());
++            m_job->decrementSubmission ();
++        }
++    }
++
++    if ( strcasecmp ( _name, ATTR_OWNER ) == 0 )
++    {
++	// need to leave an owner for this job
++	// to be picked up soon
++	// if we are in here, we don't have m_submission
++	PROC_ID id = getProcByString(m_job->getKey());
++	string val = trimQuotes( _value );
++	g_ownerless_clusters[id.cluster] = val;
++	m_job->updateSubmission(id.cluster,val.c_str());
++    }
++
++    // parse the type
++    ExprTree *expr;
++    if ( ParseClassAdRvalExpr ( _value, expr ) )
++    {
++        dprintf ( D_ALWAYS,
++                  "error: parsing %s[%s] = %s, skipping\n",
++                  m_job->getKey(), _name, _value );
++        return;
++    }
++    // add this value to the classad
++    classad::Value value;
++    expr->Evaluate(value);
++    switch ( value.GetType() )
++    {
++        case classad::Value::INTEGER_VALUE:
++            int i;
++            from_string<int> ( i, string ( _value ), dec );
++            m_full_ad->Assign ( _name, i );
++            break;
++        case classad::Value::REAL_VALUE:
++            float f;
++            from_string<float> ( f, string ( _value ), dec );
++            m_full_ad->Assign ( _name, f );
++            break;
++        case classad::Value::STRING_VALUE:
++            m_full_ad->Assign ( _name, _value );
++            break;
++        default:
++            m_full_ad->AssignExpr ( _name, _value );
++            break;
++    }
++    delete expr; expr = NULL;
++
++    // our status has changed...increment for new one
++    if ( strcasecmp ( _name, ATTR_JOB_STATUS ) == 0 )
++    {
++        if ( m_job )
++        {
++	    m_job->setStatus(this->getStatus());
++            m_job->incrementSubmission ();
++        }
++    }
++}
++
++void
++LiveJobImpl::remove ( const char *_name )
++{
++	// seems we implode if we don't unchain first
++	classad::ClassAd* cp = m_full_ad->GetChainedParentAd();
++	m_full_ad->Delete ( _name );
++	m_full_ad->ChainToAd(cp);
++}
++
++const ClassAd* LiveJobImpl::getSummary ()
++{
++	if (!m_summary_ad) {
++		m_summary_ad = new ClassAd();
++		m_summary_ad->ResetExpr();
++		int i = 0;
++		while (NULL != ATTRS[i]) {
++			const AviaryAttribute* attr = NULL;
++			if (this->get(ATTRS[i],attr)) {
++				switch (attr->getType()) {
++					case AviaryAttribute::FLOAT_TYPE:
++						m_summary_ad->Assign(ATTRS[i], atof(attr->getValue()));
++						break;
++					case AviaryAttribute::INTEGER_TYPE:
++						m_summary_ad->Assign(ATTRS[i], atol(attr->getValue()));
++						break;
++					case AviaryAttribute::EXPR_TYPE:
++					case AviaryAttribute::STRING_TYPE:
++					default:
++						m_summary_ad->Assign(ATTRS[i], attr->getValue());
++				}
++			}
++			delete attr;
++		i++;
++        }
++	}
++
++	return m_summary_ad;
++}
++
++const ClassAd* LiveJobImpl::getFullAd () const
++{
++    return m_full_ad;
++}
++
++/////////////////
++// ClusterJobImpl
++/////////////////
++ClusterJobImpl::ClusterJobImpl(const char* key): LiveJobImpl(key, NULL)
++{
++        m_ref_count = 0;
++}
++
++ClusterJobImpl::~ClusterJobImpl()
++{
++        dprintf ( D_FULLDEBUG, "ClusterJobImpl destroyed: key '%s'\n", m_job->getKey());
++}
++
++void
++ClusterJobImpl::incrementRef()
++{
++        m_ref_count++;
++}
++
++void
++ClusterJobImpl::decrementRef()
++{
++        --m_ref_count;
++}
++
++/////////////////
++// HistoryJobImpl
++/////////////////
++HistoryJobImpl::HistoryJobImpl ( const HistoryEntry& _he):
++	m_he(_he)
++{
++    m_job = NULL;
++    g_ownerless_clusters[_he.cluster] = _he.owner;
++    dprintf ( D_FULLDEBUG, "HistoryJobImpl created for '%d.%d'\n", _he.cluster, _he.proc );
++}
++
++HistoryJobImpl::~HistoryJobImpl ()
++{
++	dprintf ( D_FULLDEBUG, "HistoryJobImpl destroyed: key '%s'\n", m_job->getKey());
++}
++
++int HistoryJobImpl::getStatus() const
++{
++    return m_he.status;
++}
++
++int HistoryJobImpl::getCluster() const
++{
++	return m_he.cluster;
++}
++
++const char* HistoryJobImpl::getSubmissionId() const
++{
++	return m_he.submission.c_str();
++}
++
++void HistoryJobImpl::getSummary ( ClassAd& _ad ) const
++{
++	_ad.ResetExpr();
++	// use HistoryEntry data only
++	_ad.Assign(ATTR_GLOBAL_JOB_ID,m_he.id.c_str());
++	_ad.Assign(ATTR_CLUSTER_ID,m_he.cluster);
++	_ad.Assign(ATTR_PROC_ID,m_he.proc);
++	_ad.Assign(ATTR_Q_DATE,m_he.q_date);
++	_ad.Assign(ATTR_JOB_STATUS,m_he.status);
++	_ad.Assign(ATTR_ENTERED_CURRENT_STATUS,m_he.entered_status);
++	_ad.Assign(ATTR_JOB_SUBMISSION,m_he.submission.c_str());
++	_ad.Assign(ATTR_OWNER,m_he.owner.c_str());
++	_ad.Assign(ATTR_JOB_CMD,m_he.cmd.c_str());
++
++	// beyond here these may be empty so don't
++	// automatically add to summary
++	if (!m_he.args1.empty()) {
++		_ad.Assign(ATTR_JOB_ARGUMENTS1,m_he.args1.c_str());
++	}
++	if (!m_he.args2.empty()) {
++		_ad.Assign(ATTR_JOB_ARGUMENTS2,m_he.args2.c_str());
++	}
++	if (!m_he.release_reason.empty()) {
++		_ad.Assign(ATTR_RELEASE_REASON,m_he.release_reason.c_str());
++	}
++	if (!m_he.hold_reason.empty()) {
++		_ad.Assign(ATTR_HOLD_REASON,m_he.hold_reason.c_str());
++	}
++
++}
++
++// specialization: this GetFullAd has to retrieve its classad attributes
++// from the history file based on index pointers
++void
++ HistoryJobImpl::getFullAd ( ClassAd& _ad) const
++{
++    // fseek to he.start
++    // ClassAd method to deserialize from a file with "***"
++
++    FILE * hFile;
++    int end = 0;
++    int error = 0;
++    int empty = 0;
++	string _text;
++
++    // TODO: move the ClassAd/file deserialize back to HistoryFile???
++    const char* fName = m_he.file.c_str();
++    if ( ! ( hFile = safe_fopen_wrapper ( fName, "r" ) ) )
++    {
++		sprintf(_text,"unable to open history file '%s'", m_he.file.c_str());
++        dprintf ( D_ALWAYS, "%s\n",_text.c_str());
++		_ad.Assign("JOB_AD_ERROR",_text.c_str());
++		return;
++    }
++    if ( fseek ( hFile , m_he.start , SEEK_SET ) )
++    {
++		sprintf(_text,"bad seek in '%s' at index %d", m_he.file.c_str(),m_he.start);
++        dprintf ( D_ALWAYS, "%s\n",_text.c_str());
++		_ad.Assign("JOB_AD_ERROR",_text.c_str());
++        return;
++    }
++
++    ClassAd myJobAd ( hFile, "***", end, error, empty );
++    fclose ( hFile );
++
++	// debug logging and error to i/f for now
++	// we might not have our original history file anymore
++    if ( error )
++    {
++		sprintf(_text,"malformed ad for job '%s' in file '%s'",m_job->getKey(), m_he.file.c_str());
++        dprintf ( D_FULLDEBUG, "%s\n", _text.c_str());
++		_ad.Assign("JOB_AD_ERROR",_text.c_str());
++		return;
++    }
++    if ( empty )
++    {
++		sprintf(_text,"empty ad for job '%s' in '%s'", m_job->getKey(),m_he.file.c_str());
++        dprintf ( D_FULLDEBUG,"%s\n", _text.c_str());
++		_ad.Assign("JOB_AD_ERROR",_text.c_str());
++		return;
++    }
++
++	if (!_ad.CopyFrom(myJobAd)) {
++		sprintf(_text,"problem copying contents of history ClassAd for '%s'",m_job->getKey());
++		dprintf ( D_ALWAYS, "%s\n",_text.c_str());
++		_ad.Assign("JOB_AD_ERROR",_text.c_str());
++	}
++
++}
++
++//////
++// Job
++//////
++Job::Job(const char* _key):  m_submission(NULL), m_live_job(NULL), m_history_job(NULL), m_key(_key) 
++{
++        dprintf (D_FULLDEBUG,"Job::Job of '%s'\n", m_key);
++}
++
++Job::~Job() {
++	// Destroy will be safe way to
++	// cleanup
++
++	dprintf (D_FULLDEBUG,"Job::~Job of '%s'\n", m_key);
++
++    this->decrementSubmission();
++
++	delete m_live_job;
++	delete m_history_job;
++
++	delete [] m_key;
++	// submissions are shared and can't be deleted here
++}
++
++void Job::setImpl (LiveJobImpl* lji)
++{
++	lji->setJob(this);
++	// probably shouldn't happen
++	if (m_live_job) {
++		delete m_live_job;
++	}
++	m_live_job = lji;
++
++	// status of a live job always has precedence
++	// so decrement if the history job got in ahead of it
++	if (m_history_job) {
++		m_status = m_history_job->getStatus();
++		m_submission->decrement(this);
++	}
++	m_status = m_live_job->getStatus();
++}
++
++void Job::setImpl (HistoryJobImpl* hji)
++{
++	hji->setJob(this);
++	// probably shouldn't happen
++	if (m_history_job) {
++		delete m_history_job;
++	}
++	m_history_job = hji;
++
++	// stay away from extra inc/decs if the live job is still doing its thing
++	if (!m_submission) {
++		m_status = m_history_job->getStatus();
++		setSubmission(m_history_job->getSubmissionId(),m_history_job->getCluster());
++	}
++
++	// call Destroy to see if we can clean up the live job
++	this->destroy();
++}
++
++void Job::setStatus(int status)
++{
++	m_status = status;
++}
++
++const char* Job::getKey() const
++{
++	return m_key;
++}
++
++void Job::set ( const char *_name, const char *_value ) {
++	if (m_live_job) {
++		m_live_job->set(_name,_value);
++	}
++	// ignore for history jobs
++}
++
++void Job::remove ( const char *_name ) {
++	if (m_live_job) {
++		m_live_job->remove(_name);
++	}
++	// ignore for history jobs
++}
++
++void Job::incrementSubmission() {
++	if (m_submission) {
++		m_submission->increment(this);
++	}
++}
++
++void Job::decrementSubmission() {
++	if (m_submission) {
++		m_submission->decrement(this);
++	}
++}
++
++void
++Job::updateSubmission ( int cluster, const char* owner )
++{
++	OwnerlessSubmissionType::const_iterator it = g_ownerless_submissions.find ( cluster );
++	if ( g_ownerless_submissions.end() != it ) {
++		SubmissionObject* submission = (*it).second;
++		submission->setOwner(owner);
++		g_ownerless_submissions.erase(cluster);
++	}
++}
++
++void
++Job::setSubmission ( const char* _subName, int cluster )
++{
++	const char* owner = NULL;
++
++	// need to see if someone has left us an owner
++	OwnerlessClusterType::const_iterator it = g_ownerless_clusters.find ( cluster );
++	if ( g_ownerless_clusters.end() != it )
++	{
++		owner = ( *it ).second.c_str() ;
++	}
++
++	SubmissionCollectionType::const_iterator element = g_submissions.find ( _subName );
++	SubmissionObject *submission;
++	if ( g_submissions.end() == element )
++	{
++		submission = new SubmissionObject ( _subName, owner );
++		g_submissions[strdup ( _subName ) ] = submission;
++	}
++	else
++	{
++		submission = ( *element ).second;
++	}
++	m_submission = submission;
++
++	m_submission->increment(this);
++
++	if (owner) {
++		// ensure that the submission has an owner
++		m_submission->setOwner ( owner );
++		g_ownerless_clusters.erase ( cluster );
++	}
++	else {
++		// add it to our list to be updated for owner
++		g_ownerless_submissions[cluster] = m_submission;
++	}
++
++}
++
++bool ClusterJobImpl::destroy()
++{
++        return m_ref_count == 0;
++}
++
++bool
++LiveJobImpl::destroy()
++{
++        return ((this->getStatus() == COMPLETED) || (this->getStatus() == REMOVED));
++}
++
++bool
++Job::destroy()
++{
++
++        bool live_destroy = (m_live_job && m_live_job->destroy());
++
++        if (m_history_job && live_destroy) {
++                // must be a proc
++                delete m_live_job;
++                m_live_job = NULL;
++                return false;
++        }
++
++        // hint to caller
++        return live_destroy;
++}
++
++// space v. speed tradeoff here - we want to keep the size of the job server down
++// since we may have to support millions of jobs in memory
++void Job::getFullAd ( ClassAd& _ad) const
++{
++	// history ads are always reconstructed
++	// so we deep copy the live job ad to be consistent
++	// on the interface
++
++	if (m_live_job) {
++		_ad = *(m_live_job->getFullAd());
++	}
++	else {
++		m_history_job->getFullAd(_ad);
++	}
++
++}
++
++// poke a hole for live job ad chaining
++const ClassAd* Job::getClassAd() const
++{
++	const ClassAd* ad_ptr = NULL;
++	if (m_live_job) {
++		ad_ptr = m_live_job->getFullAd();
++	}
++	return ad_ptr;
++
++}
++
++void Job::getSummary ( ClassAd& _ad) const
++{
++	//same thing as full ad
++	if (m_live_job) {
++		_ad.CopyFrom(*m_live_job->getSummary());
++	}
++	else {
++		m_history_job->getSummary(_ad);
++	}
++}
++
++int Job::getStatus() const
++{
++	return m_status;
++}
++
++JobImpl* Job::getImpl() {
++        // only will provide live job impl
++        // if it's NULL the caller needs to deal
++        return m_live_job;
++}
+diff --git a/src/condor_contrib/aviary/src/Job.h b/src/condor_contrib/aviary/src/Job.h
+new file mode 100644
+index 0000000..453d941
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/Job.h
+@@ -0,0 +1,160 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _JOB_H
++#define _JOB_H
++
++// c++ includes
++#include <string>
++#include <map>
++#include <set>
++#include <vector>
++
++// condor includes
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "condor_classad.h"
++
++// local includes
++#include "Codec.h"
++#include "HistoryFile.h"
++#include "cmpstr.h"
++
++using std::string;
++using std::map;
++using std::set;
++using std::vector;
++
++using namespace aviary::codec;
++using namespace aviary::history;
++
++namespace aviary {
++namespace query {
++
++class SubmissionObject;
++class Job;
++
++// interface class for job impls
++class JobImpl
++{
++public:
++        Job* getJob() { return m_job; }
++        void setJob(Job* _job) { m_job = _job; }
++
++protected:
++        Job* m_job;
++        JobImpl() {};
++};
++
++class ClusterJobImpl;
++
++// Job delegate that encapsulates the job active in the queue
++class LiveJobImpl: public JobImpl
++{
++    public:
++        LiveJobImpl ( const char*, ClusterJobImpl* );
++        virtual ~LiveJobImpl();
++        int getStatus () const;
++        const ClassAd* getSummary ();
++        const ClassAd* getFullAd () const;
++        void set ( const char* , const char* );
++        bool get ( const char * , const AviaryAttribute *& ) const;
++        void remove ( const char* );
++
++        virtual bool destroy();
++
++    private:
++        ClusterJobImpl* m_parent;
++        ClassAd* m_full_ad;
++        ClassAd* m_summary_ad;
++};
++
++class ClusterJobImpl: public LiveJobImpl
++{
++public:
++        ClusterJobImpl(const char*);
++        ~ClusterJobImpl();
++        void incrementRef();
++        void decrementRef();
++        bool destroy();
++
++private:
++        int m_ref_count;
++};
++
++// Job delegate that encapsulates the archived job history
++// and can derive the attributes of its associated class ad
++class HistoryJobImpl: public JobImpl
++{
++    public:
++        HistoryJobImpl (const HistoryEntry&);
++        ~HistoryJobImpl();
++        int  getStatus () const;
++        void getSummary ( ClassAd& ) const;
++        void getFullAd ( ClassAd& ) const;
++        int  getCluster() const;
++        const char* getSubmissionId () const;
++
++    private:
++        HistoryEntry m_he;
++};
++
++// the public face of jobs
++// not for subclassing - clients (generally) shouldn't be
++// burdened with the live/history distinction
++class Job
++{
++    public:
++        Job(const char*);
++        ~Job();
++
++        const char * getKey() const;
++
++        int  getStatus () const;
++        void setStatus(int);
++
++        void getSummary (ClassAd&) const;
++        void getFullAd (ClassAd&) const;
++        const ClassAd* getClassAd() const;
++
++        void set ( const char* , const char* );
++        void remove ( const char* );
++
++        void setSubmission ( const char*, int );
++        void updateSubmission ( int, const char* );
++        void incrementSubmission();
++        void decrementSubmission();
++
++        void setImpl(LiveJobImpl*);
++        void setImpl(HistoryJobImpl*);
++        JobImpl* getImpl();
++
++        bool destroy();
++
++    private:
++        SubmissionObject *m_submission;
++        // live job to start, history job when ready
++        LiveJobImpl* m_live_job;
++        HistoryJobImpl* m_history_job;
++        const char* m_key;
++        int m_status;
++};
++
++}}
++
++#endif /* _JOB_H */
+diff --git a/src/condor_contrib/aviary/src/JobServerJobLogConsumer.cpp b/src/condor_contrib/aviary/src/JobServerJobLogConsumer.cpp
+new file mode 100644
+index 0000000..4172562
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/JobServerJobLogConsumer.cpp
+@@ -0,0 +1,226 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++// condor includes
++#include "condor_common.h"
++#include "condor_debug.h"
++//#include "condor_exprtype.h"
++#include "condor_attributes.h"
++//#include "condor_astbase.h"
++//#include "condor_parser.h"
++#include "condor_qmgr.h"
++#include "ClassAdLogReader.h"
++
++// local includes
++#include "JobServerJobLogConsumer.h"
++#include "Globals.h"
++#include "HistoryProcessingUtils.h"
++
++using namespace aviary::query;
++using namespace aviary::history;
++
++#define IS_JOB(key) ((key) && '0' != (key)[0])
++
++JobServerJobLogConsumer::JobServerJobLogConsumer(): m_reader(NULL)
++{ }
++
++JobServerJobLogConsumer::~JobServerJobLogConsumer()
++{ }
++
++void
++JobServerJobLogConsumer::Reset()
++{
++	// When deleting jobs, to avoid problems with jobs referencing
++	// deleted clusters, we must be sure to delete the clusters
++	// last
++
++	dprintf(D_FULLDEBUG, "JobServerJobLogConsumer::Reset() - deleting jobs and submissions\n");
++
++	for (JobCollectionType::iterator i = g_jobs.begin();
++	     g_jobs.end() != i; i++) {
++		// Skip clusters for now
++		if ('0' != (*i).second->getKey()[0]) {
++			delete (*i).second;
++			g_jobs.erase(i);
++		}
++	}
++
++	for (JobCollectionType::iterator i = g_jobs.begin();
++		  g_jobs.end() != i; i++) {
++		     delete (*i).second;
++		     g_jobs.erase(i);
++	}
++
++	for (SubmissionCollectionType::iterator i = g_submissions.begin();
++		       g_submissions.end() != i; i++) {
++			  delete (*i).second;
++			  g_submissions.erase(i);
++	}
++
++	// due to the shared use of g_jobs
++	// a JobLogReader->Reset() might cause
++	// us to reload our history
++	init_history_files();
++
++}
++
++bool
++JobServerJobLogConsumer::NewClassAd(const char *_key,
++									const char */*type*/,
++									const char */*target*/)
++{
++
++	dprintf(D_FULLDEBUG, "JobServerJobLogConsumer::NewClassAd processing _key='%s'\n", _key);
++
++	// ignore the marker
++	if (strcmp(_key,"0.0") == 0) {
++	  return true;
++	}
++
++    const char* key_dup = strdup(_key);
++
++	if ('0' == _key[0]) {
++		// Cluster ad
++		if (g_jobs.end() == g_jobs.find(_key)) {
++			Job* new_cluster_job = new Job(key_dup);
++			new_cluster_job->setImpl(new ClusterJobImpl(key_dup));
++			g_jobs[key_dup] = new_cluster_job;
++		}
++	} else {
++		// Proc ad
++
++		// first see if some other proc job is here
++		// ie history
++		if (g_jobs.end() != g_jobs.find(_key)) {
++			return true;
++		}
++
++		PROC_ID proc = getProcByString(_key);
++		MyString cluster_key;
++
++		cluster_key.sprintf("0%d.-1", proc.cluster);
++
++		const char *cluster_dup = cluster_key.StrDup();
++		JobCollectionType::const_iterator element = g_jobs.find(cluster_dup);
++        ClusterJobImpl* cluster_impl = NULL;
++
++		if (g_jobs.end() == element) {
++			// didn't find an existing cluster job so create a new one
++			Job* new_cluster_job = new Job(cluster_dup);
++            cluster_impl = new ClusterJobImpl(cluster_dup);
++            new_cluster_job->setImpl(cluster_impl);
++            g_jobs[cluster_dup] = new_cluster_job;
++		} else {
++			// found an existing cluster job - we'll assume it is the cluster parent
++			cluster_impl = static_cast<ClusterJobImpl*>((*element).second->getImpl());
++		}
++
++        Job* new_proc_job = new Job(key_dup);
++        new_proc_job->setImpl(new LiveJobImpl(key_dup, cluster_impl));
++        g_jobs[key_dup] = new_proc_job;
++
++	}
++
++	return true;
++}
++
++bool
++JobServerJobLogConsumer::DestroyClassAd(const char *_key)
++{
++
++	// ignore the marker
++	if (strcmp(_key,"0.0") == 0) {
++	  return true;
++	}
++
++   dprintf ( D_FULLDEBUG, "JobServerJobLogConsumer::DestroyClassAd - key '%s'\n", _key);
++    JobCollectionType::iterator g_element = g_jobs.find(_key);
++
++    if (g_jobs.end() == g_element) {
++        dprintf(D_ALWAYS,
++                "error reading %s: no such job found for key '%s'\n",
++                m_reader->GetClassAdLogFileName(), _key);
++        return false;
++    }
++
++    Job* job = (*g_element).second;
++    // Destroy will figure out the submission decrement
++    if (job->destroy()) {
++            delete job;
++            job = NULL;
++            g_jobs.erase(g_element);
++    }
++
++    return true;
++}
++
++bool
++JobServerJobLogConsumer::SetAttribute(const char *_key,
++									  const char *_name,
++									  const char *_value)
++{
++
++	// ignore the marker
++	if (strcmp(_key,"0.0") == 0) {
++	  return true;
++	}
++
++	if (0 == strcmp(_name,"NextClusterNum") ) {
++		// skip over these
++		//dprintf(D_FULLDEBUG, "%s: skipping job entry '%s' for '%s = %s'\n",
++		//	m_reader->GetJobLogFileName(), _key, _name, _value);
++		return true;
++	}
++
++    JobCollectionType::const_iterator g_element = g_jobs.find(_key);
++
++	if (g_jobs.end() == g_element) {
++		dprintf(D_ALWAYS,
++				"error reading %s : no such job '%s' for '%s = %s'\n",
++				m_reader->GetClassAdLogFileName(),
++				_key, _name, _value);
++		return false;
++	}
++
++	(*g_element).second->set(_name, _value);
++
++	return true;
++}
++
++bool
++JobServerJobLogConsumer::DeleteAttribute(const char *_key,
++										 const char *_name)
++{
++	// ignore the marker
++	if (strcmp(_key,"0.0") == 0) {
++	  return true;
++	}
++
++	JobCollectionType::const_iterator g_element = g_jobs.find(_key);
++
++	if (g_jobs.end() == g_element) {
++		dprintf(D_ALWAYS,
++				"error reading %s: no such job '%s' for 'delete %s'\n",
++                m_reader->GetClassAdLogFileName(), _key, _name);
++		return false;
++	}
++
++	(*g_element).second->remove(_name);
++
++	return true;
++}
+diff --git a/src/condor_contrib/aviary/src/JobServerJobLogConsumer.h b/src/condor_contrib/aviary/src/JobServerJobLogConsumer.h
+new file mode 100644
+index 0000000..22703ed
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/JobServerJobLogConsumer.h
+@@ -0,0 +1,62 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _JOBSERVERJOBLOGCONSUMER_H
++#define _JOBSERVERJOBLOGCONSUMER_H
++
++// condor includes
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "ClassAdLogReader.h"
++
++// local includes
++#include "Job.h"
++#include "SubmissionObject.h"
++
++// c++ includes
++#include <string>
++#include <map>
++#include <set>
++
++using namespace std;
++
++class JobServerJobLogConsumer: public ClassAdLogConsumer
++{
++public:
++	JobServerJobLogConsumer();
++	~JobServerJobLogConsumer();
++
++	void Reset();
++	bool NewClassAd(const char *key,
++					const char *type,
++					const char *target);
++	bool DestroyClassAd(const char *key);
++	bool SetAttribute(const char *key,
++					  const char *name,
++					  const char *value);
++	bool DeleteAttribute(const char *key,
++						 const char *name);
++    void SetJobLogReader(ClassAdLogReader *_reader) { m_reader = _reader; }
++
++
++private:
++
++    ClassAdLogReader *m_reader;
++};
++
++#endif /* _JOBSERVERJOBLOGCONSUMER_H */
+diff --git a/src/condor_contrib/aviary/src/JobServerObject.cpp b/src/condor_contrib/aviary/src/JobServerObject.cpp
+new file mode 100644
+index 0000000..ee76024
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/JobServerObject.cpp
+@@ -0,0 +1,374 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++//condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_attributes.h"
++#include "condor_debug.h"
++#include "condor_qmgr.h"
++#include "set_user_priv_from_ad.h"
++#include "stat_info.h"
++#include "stl_string_utils.h"
++
++// C++ includes
++// enable for debugging classad to ostream
++// watch out for unistd clash
++//#include <sstream>
++
++//local includes
++#include "JobServerObject.h"
++#include "AviaryConversionMacros.h"
++#include "AviaryUtils.h"
++#include "Codec.h"
++#include "JobServerJobLogConsumer.h"
++#include "Globals.h"
++
++using namespace std;
++using namespace aviary::query;
++using namespace aviary::util;
++using namespace aviary::codec;
++
++JobServerObject* JobServerObject::m_instance = NULL;
++
++JobServerObject::JobServerObject ()
++{
++	m_name = getScheddName();
++	m_pool = getPoolName();
++	m_codec = new BaseCodec;
++}
++
++JobServerObject::~JobServerObject()
++{
++	delete m_codec;
++}
++
++JobServerObject* JobServerObject::getInstance()
++{
++    if (!m_instance) {
++        m_instance = new JobServerObject();
++    }
++    return m_instance;
++}
++
++void
++JobServerObject::update ( const ClassAd &ad )
++{
++    MGMT_DECLARATIONS;
++
++    m_stats.Pool = getPoolName();
++    STRING ( CondorPlatform );
++    STRING ( CondorVersion );
++    TIME_INTEGER ( DaemonStartTime );
++//  TIME_INTEGER(JobQueueBirthdate);
++    STRING ( Machine );
++//  INTEGER(MaxJobsRunning);
++    INTEGER ( MonitorSelfAge );
++    DOUBLE ( MonitorSelfCPUUsage );
++    DOUBLE ( MonitorSelfImageSize );
++    INTEGER ( MonitorSelfRegisteredSocketCount );
++    INTEGER ( MonitorSelfResidentSetSize );
++    TIME_INTEGER ( MonitorSelfTime );
++    STRING ( MyAddress );
++    //TIME_INTEGER(MyCurrentTime);
++    STRING ( Name );
++//  INTEGER(NumUsers);
++    STRING ( PublicNetworkIpAddr );
++//  INTEGER(TotalHeldJobs);
++//  INTEGER(TotalIdleJobs);
++//  INTEGER(TotalJobAds);
++//  INTEGER(TotalRemovedJobs);
++//  INTEGER(TotalRunningJobs);
++
++    m_stats.System = m_stats.Machine;
++}
++
++Job*
++getValidKnownJob(const char* key, AviaryStatus &_status) {
++
++	// #1: is it even a proper "cluster.proc"?
++	PROC_ID id = getProcByString(key);
++	if (id.cluster < 0 || id.proc < 0) {
++		sprintf (_status.text, "Invalid job id '%s'",key);
++		dprintf(D_FULLDEBUG, "%s\n", _status.text.c_str());
++		_status.type = AviaryStatus::FAIL;
++		return NULL;
++	}
++
++	// #2 is it anywhere in our job map?
++    JobCollectionType::const_iterator element = g_jobs.find(key);
++    if ( g_jobs.end() == element ) {
++		sprintf (_status.text, "Unknown local job id '%s'",key);
++		dprintf(D_FULLDEBUG, "%s\n", _status.text.c_str());
++		_status.type = AviaryStatus::NO_MATCH;
++		return NULL;
++    }
++
++	return (*element).second;
++}
++
++bool JobServerObject::getStatus(const char* key, int& job_status, AviaryStatus &_status) {
++	Job* job = NULL;
++	if (!(job = getValidKnownJob(key,_status))) {
++		return false;
++	}
++
++	job_status = job->getStatus();
++
++	_status.type = AviaryStatus::A_OK;
++	return true;
++}
++
++bool JobServerObject::getSummary(const char* key, JobSummaryFields& _summary, AviaryStatus &_status) {
++	Job* job = NULL;
++	if (!(job = getValidKnownJob(key,_status))) {
++		return false;
++	}
++
++    ClassAd classAd;
++    job->getSummary ( classAd );
++    // little cheat for ad problems with history lookups
++    string str;
++    if ( classAd.LookupString("JOB_AD_ERROR", str) )
++    {
++		sprintf(_status.text,"Error obtaining ClassAd for job '%s'; ",key);
++		_status.text += str;
++		dprintf(D_ALWAYS,"%s\n",_status.text.c_str());
++        return false;
++    }
++
++	// return the limited attributes
++    classAd.LookupString(ATTR_JOB_CMD,_summary.cmd);
++	classAd.LookupString(ATTR_JOB_ARGUMENTS1,_summary.args1);
++	classAd.LookupString(ATTR_JOB_ARGUMENTS2,_summary.args2);
++	classAd.LookupString(ATTR_HOLD_REASON,_summary.hold_reason);
++	classAd.LookupString(ATTR_RELEASE_REASON,_summary.release_reason);
++	classAd.LookupString(ATTR_REMOVE_REASON,_summary.remove_reason);
++	classAd.LookupString(ATTR_JOB_SUBMISSION,_summary.submission_id);
++	classAd.LookupString(ATTR_OWNER,_summary.owner);
++	classAd.LookupInteger(ATTR_Q_DATE,_summary.queued);
++	classAd.LookupInteger(ATTR_ENTERED_CURRENT_STATUS,_summary.last_update);
++	_summary.status = job->getStatus();
++
++	_status.type = AviaryStatus::A_OK;
++    return true;
++}
++
++bool
++JobServerObject::getJobAd ( const char* key, AttributeMapType& _map, AviaryStatus &_status)
++{
++	Job* job = NULL;
++	if (!(job = getValidKnownJob(key,_status))) {
++		return false;
++	}
++    // call Job::getFullAd and use utils to populate the map
++    ClassAd classAd;
++    job->getFullAd ( classAd );
++    // little cheat for ad problems with history lookups
++    string str;
++    if ( classAd.LookupString("JOB_AD_ERROR", str) )
++    {
++		sprintf(_status.text,"Error obtaining ClassAd for job '%s'; ",key);
++		_status.text += str;
++		dprintf(D_ALWAYS,"%s\n",_status.text.c_str());
++    }
++
++    // return all the attributes in the ClassAd
++    if ( !m_codec->classAdToMap ( classAd, _map  ) )
++    {
++		sprintf(_status.text,"Error mapping info for job '%s'; ",key);
++		dprintf(D_ALWAYS,"%s\n",_status.text.c_str());
++        return false;
++    }
++
++    // debug
++//    if (DebugFlags & D_FULLDEBUG) {
++//        classAd.dPrint(D_FULLDEBUG|D_NOHEADER);
++//        std::ostringstream oss;
++//        oss << _map;
++//        dprintf(D_FULLDEBUG|D_NOHEADER, oss.str().c_str());
++//    }
++
++	_status.type = AviaryStatus::A_OK;
++    return true;
++}
++
++bool
++JobServerObject::fetchJobData(const char* key,
++					   const UserFileType ftype,
++					   std::string& fname,
++					   int max_bytes,
++					   bool from_end,
++					   int& fsize,
++					   std::string &data,
++					   AviaryStatus &_status)
++{
++	int32_t start;
++	int32_t end;
++	priv_state prev_priv_state;
++	int fd = -1;
++	int count;
++	int length;
++	int whence;
++	char *buffer;
++	bool fetched;
++	Job* job = NULL;
++
++	if (!(job =getValidKnownJob(key,_status))) {
++		return false;
++	}
++
++
++	ClassAd ad;
++	string str;
++	job->getFullAd ( ad );
++	if ( ad.LookupString("JOB_AD_ERROR", str)  ) {
++		sprintf(_status.text,"Error checking ClassAd for user priv on job '%s'; ",key);
++		_status.text += str;
++		dprintf(D_ALWAYS,"%s\n",_status.text.c_str());
++		return false;
++	}
++	
++	// find out what the actual file is from classad lookup
++	switch (ftype) {
++		case ERR:
++			if ( !ad.LookupString(ATTR_JOB_ERROR, fname)  ) {
++				sprintf (_status.text,  "No error file for job '%s'",key);
++				dprintf(D_ALWAYS,"%s\n", _status.text.c_str());
++				return false;
++			}
++			break;
++		case LOG:
++			if ( !ad.LookupString(ATTR_ULOG_FILE, fname)  ) {
++				sprintf (_status.text,  "No log file for job '%s'",key);
++				dprintf(D_ALWAYS,"%s\n", _status.text.c_str());
++				return false;
++			}
++			break;
++		case OUT:
++			if ( !ad.LookupString(ATTR_JOB_OUTPUT, fname)  ) {
++				sprintf (_status.text,  "No output file for job '%s'",key);
++				dprintf(D_ALWAYS,"%s\n", _status.text.c_str());
++				return false;
++			}
++			break;
++		default:
++			// ruh-roh...asking for a file type we don't know about
++			sprintf (_status.text,  "Unknown file type for job '%s'",key);
++			dprintf(D_ALWAYS,"%s\n", _status.text.c_str());
++			return false;
++	}
++	
++	StatInfo the_file(fname.c_str());
++	if (the_file.Error()) {
++		sprintf (_status.text, "Error opening requested file '%s', error %d",fname.c_str(),the_file.Errno());
++		dprintf(D_ALWAYS,"%s\n", _status.text.c_str());
++		return false;
++	}
++
++	fsize = the_file.GetFileSize();
++
++	// we calculate these based on file size
++	if (from_end) {
++		end = fsize;
++		start = end - max_bytes;
++	}
++	else {
++		start = 0;
++		end = max_bytes;
++	}
++
++	// start >= 0, end >= 0 :: lseek(start, SEEK_SET), read(end - start)
++	//  end < start :: error, attempt to read backwards
++	// start >= 0, end < 0 :: error, don't know length
++	// start < 0, end > 0 :: attempt to read off end of file, end = 0
++	// start < 0, end <= 0 :: lseek(start, SEEK_END), read(abs(start - end))
++	//  end < start :: error, attempt to read backwards
++
++	// TODO: redundant checks given above
++	if ((start >= 0 && end >= 0 && end < start) ||
++		(start >= 0 && end < 0) ||
++		(start < 0 && end <= 0 && end < start)) {
++		_status.text = "Invalid start and end values";
++		return false;
++	}
++
++	// Instead of reading off the end of the file, read to the
++	// end of it
++	if (start < 0 && end > 0) {
++		end = 0;
++	}
++
++	if (start >= 0) {
++		whence = SEEK_SET;
++		length = end - start;
++	} else {
++		whence = SEEK_END;
++		length = abs(start - end);
++	}
++
++	// TODO: Sanity check that length isn't too big?
++	buffer = new char[length + 1];
++
++	prev_priv_state = set_user_priv_from_ad(ad);
++
++	if (-1 != (fd = safe_open_wrapper(fname.c_str(),
++									  O_RDONLY | _O_BINARY,
++									  0))) {
++			// If we are seeking from the end of the file, it is
++			// possible that we will try to seek off the front of the
++			// file. To avoid this, we check the file's size and set
++			// the max length that we are able to seek
++		if (SEEK_END == whence) {
++			struct stat buf;
++			if (-1 != fstat(fd, &buf)) {
++				if (buf.st_size < abs(start)) {
++					start = -buf.st_size;
++				}
++			} // if fstat fails, we just continue having made an effort
++		}
++
++		if (-1 != lseek(fd, start, whence)) {				
++			if (-1 == (count = full_read(fd, buffer, length))) {
++				_status.text = "Failed to read from " + fname;
++				fetched = false;
++			} else {
++					// Terminate the string.
++				buffer[count] = '\0';
++
++				data = buffer;
++				fetched = true;
++			}
++
++			close(fd); // assume closed on failure?
++		} else {
++			_status.text = "Failed to seek in " + fname;
++			fetched = false;
++		}
++	} else {
++		_status.text = "Failed to open " + fname;
++		fetched = false;
++	}
++
++	set_priv(prev_priv_state);
++
++	delete [] buffer;
++
++	if (fetched) {
++		_status.type = AviaryStatus::A_OK;
++	}
++	return fetched;
++}
+diff --git a/src/condor_contrib/aviary/src/JobServerObject.h b/src/condor_contrib/aviary/src/JobServerObject.h
+new file mode 100644
+index 0000000..d305270
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/JobServerObject.h
+@@ -0,0 +1,124 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _JOBSERVEROBJECT_H
++#define _JOBSERVEROBJECT_H
++
++// condor includes
++#include "condor_common.h"
++#include "condor_classad.h"
++
++// local includes
++#include "Codec.h"
++
++struct a;
++struct a;
++struct a;
++struct a;
++using namespace std;
++using namespace compat_classad;
++using namespace aviary::codec;
++
++namespace aviary {
++namespace query {
++
++struct JobServerStats {
++    // Properties
++    string      CondorPlatform;
++    string      CondorVersion;
++    int64_t     DaemonStartTime;
++    string      Pool;
++    string      System;
++    uint32_t    MaxJobsRunning;
++    string      Machine;
++    string      MyAddress;
++    string      Name;
++	string		PublicNetworkIpAddr;
++
++    // Statistics
++    uint32_t    MonitorSelfAge;
++    double      MonitorSelfCPUUsage;
++    double      MonitorSelfImageSize;
++    uint32_t    MonitorSelfRegisteredSocketCount;
++    uint32_t    MonitorSelfResidentSetSize;
++    int64_t     MonitorSelfTime;
++    uint32_t    NumUsers;
++};
++
++enum UserFileType {
++	ERR = 0,
++	LOG = 1,
++	OUT = 2
++};
++
++struct JobSummaryFields {
++	int status;
++	string cmd;
++	string args1;
++	string args2;
++	int queued;
++	int last_update;
++	string hold_reason;
++	string release_reason;
++	string remove_reason;
++	string submission_id;
++	string owner;
++};
++
++typedef pair<const char*,JobSummaryFields*> JobSummaryPair;
++typedef vector<JobSummaryPair> JobSummaryPairCollection;
++
++class JobServerObject
++{
++public:
++
++	void update(const ClassAd &ad);
++
++	bool getStatus(const char* id, int& status, AviaryStatus &_status);
++	bool getSummary(const char* key, JobSummaryFields& _summary, AviaryStatus &_status);
++	bool getJobAd(const char* id, AttributeMapType& _map, AviaryStatus &_status);
++	bool fetchJobData(const char* key,
++					   const UserFileType ftype,
++					   std::string& fname,
++					   int max_bytes,
++					   bool from_end,
++					   int& fsize,
++					   std::string &data,
++			           AviaryStatus &_status);
++
++    ~JobServerObject();
++	static JobServerObject* getInstance();
++
++	const char* getName() { return m_name.c_str(); }
++	const char* getPool() { return m_pool.c_str(); }
++
++private:
++    JobServerObject();
++	JobServerObject(JobServerObject const&);
++	JobServerObject& operator=(JobServerObject const&);
++
++	string m_name;
++	string m_pool;
++	JobServerStats m_stats;
++	Codec* m_codec;
++
++	static JobServerObject* m_instance;
++
++};
++
++}} /* aviary::query */
++
++#endif /* _JOBSERVEROBJECT_H */
+diff --git a/src/condor_contrib/aviary/src/PROC_ID_comparator.cpp b/src/condor_contrib/aviary/src/PROC_ID_comparator.cpp
+new file mode 100644
+index 0000000..6eb94ba
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/PROC_ID_comparator.cpp
+@@ -0,0 +1,41 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// condor includes
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "proc.h"
++
++// local includes
++#include "PROC_ID_comparator.h"
++
++using namespace aviary::util;
++
++bool
++PROC_ID_comparator::operator()(const std::string &lhs, const std::string &rhs)
++{
++	PROC_ID lhs_id, rhs_id;
++
++		// !!! The EXCEPT macro is "#define EXCEPT \", so we must
++		// !!! enclose it in { }'s else we'll always EXCEPT
++
++	if (!StrToProcId(lhs.c_str(), lhs_id)) { EXCEPT("Invalid LHS PROC_ID %s", lhs.c_str()); }
++	if (!StrToProcId(rhs.c_str(), rhs_id)) { EXCEPT("Invalid RHS PROC_ID %s", rhs.c_str()); }
++
++	return
++		(lhs_id.cluster < rhs_id.cluster) ||
++		((lhs_id.cluster == rhs_id.cluster) && (lhs_id.proc < rhs_id.proc));
++}
+diff --git a/src/condor_contrib/aviary/src/PROC_ID_comparator.h b/src/condor_contrib/aviary/src/PROC_ID_comparator.h
+new file mode 100644
+index 0000000..4a45d1c
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/PROC_ID_comparator.h
+@@ -0,0 +1,32 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _PROC_ID_COMPARATOR_H
++#define _PROC_ID_COMPARATOR_H
++
++#include <string>
++
++namespace aviary {
++namespace util {
++
++struct PROC_ID_comparator
++{
++	bool operator()(const std::string &lhs, const std::string &rhs);
++};
++
++}};
++
++#endif /* _PROC_ID_COMPARATOR_H */
+diff --git a/src/condor_contrib/aviary/src/SchedulerObject.cpp b/src/condor_contrib/aviary/src/SchedulerObject.cpp
+new file mode 100644
+index 0000000..5f48c97
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/SchedulerObject.cpp
+@@ -0,0 +1,363 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++// condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_attributes.h"
++#include "condor_debug.h"
++#include "condor_qmgr.h"
++#include "../condor_schedd.V6/scheduler.h"
++
++// local includes
++#include "AviaryUtils.h"
++#include "AviaryConversionMacros.h"
++#include "SchedulerObject.h"
++#include "Codec.h"
++
++// Global Scheduler object, used for needReschedule
++extern Scheduler scheduler;
++extern char * Name;
++
++using namespace aviary::job;
++using namespace aviary::util;
++using namespace aviary::codec;
++
++SchedulerObject* SchedulerObject::m_instance = NULL;
++
++SchedulerObject::SchedulerObject()
++{
++    m_pool = getPoolName();
++	m_name = getScheddName();
++    m_codec = new BaseCodec();
++}
++
++SchedulerObject::~SchedulerObject()
++{
++	delete m_codec;
++}
++
++SchedulerObject* SchedulerObject::getInstance()
++{
++    if (!m_instance) {
++        m_instance = new SchedulerObject();
++    }
++    return m_instance;
++}
++
++void
++SchedulerObject::update(const ClassAd &ad)
++{
++	MGMT_DECLARATIONS;
++
++	m_stats.Pool = getPoolName();
++	STRING(CondorPlatform);
++	STRING(CondorVersion);
++	TIME_INTEGER(DaemonStartTime);
++	TIME_INTEGER(JobQueueBirthdate);
++	STRING(Machine);
++	INTEGER(MaxJobsRunning);
++	INTEGER(MonitorSelfAge);
++	DOUBLE(MonitorSelfCPUUsage);
++	DOUBLE(MonitorSelfImageSize);
++	INTEGER(MonitorSelfRegisteredSocketCount);
++	INTEGER(MonitorSelfResidentSetSize);
++	TIME_INTEGER(MonitorSelfTime);
++	STRING(MyAddress);
++    //TIME_INTEGER(MyCurrentTime);
++	STRING(Name);
++	INTEGER(NumUsers);
++	STRING(MyAddress);
++	INTEGER(TotalHeldJobs);
++	INTEGER(TotalIdleJobs);
++	INTEGER(TotalJobAds);
++	INTEGER(TotalRemovedJobs);
++	INTEGER(TotalRunningJobs);
++	m_stats.System = m_stats.Machine;
++
++	// debug
++	if (DebugFlags & D_FULLDEBUG) {
++		const_cast<ClassAd*>(&ad)->dPrint(D_FULLDEBUG|D_NOHEADER);
++	}
++}
++
++
++bool
++SchedulerObject::submit(AttributeMapType &jobAdMap, std::string &id, std::string &text)
++{
++	int cluster;
++	int proc;
++
++    if (!m_codec) {
++        text = "Codec has not been initialized";
++        return false;
++    }
++
++	// our mandatory set of attributes for a submit
++	const char* required[] = {
++				ATTR_JOB_CMD,
++				ATTR_REQUIREMENTS,
++				ATTR_OWNER,
++				ATTR_JOB_IWD,
++				NULL
++				};
++
++		// 1. Create transaction
++	BeginTransaction();
++
++		// 2. Create cluster
++	if (-1 == (cluster = NewCluster())) {
++		AbortTransaction();
++		text = "Failed to create new cluster";
++		return false;
++	}
++
++		// 3. Create proc
++	if (-1 == (proc = NewProc(cluster))) {
++		AbortTransaction();
++		text = "Failed to create new proc";
++		return false;
++	}
++
++		// 4. Submit job ad
++
++		// Schema: (vanilla job)
++		// Schedd demands - Owner, JobUniverse
++		// To run - JobStatus, Requirements
++
++		// Schedd excepts if no Owner
++		// Schedd prunes on startup if no Owner or JobUniverse
++		// Schedd won't run job without JobStatus
++		// Job cannot match without Requirements
++		// Shadow rejects jobs without an Iwd
++		// Shadow: Job has no CondorVersion, assuming pre version 6.3.3
++		// Shadow: Unix Vanilla job is pre version 6.3.3, setting 'TransferFiles = "NEVER"'
++		// Starter won't run job without Cmd
++		// Starter needs a valid Owner (local account name) if not using nobody
++		// condor_q requires ClusterId (int), ProcId (int), QDate (int), RemoteUserCpu (float), JobStatus (int), JobPrio (int), ImageSize (int), Owner (str) and Cmd (str)
++
++		// Schema: (vm job)
++		// ShouldTransferFiles - unset by default, must be set
++
++	ClassAd ad;
++	int universe;
++
++    // ShouldTransferFiles - unset by default, must be set
++    // shadow will try to setup local transfer sandbox otherwise
++    // without good priv
++    ad.Assign(ATTR_SHOULD_TRANSFER_FILES, "NO");
++
++	if (!m_codec->mapToClassAd(jobAdMap, ad)) {
++		AbortTransaction();
++		text = "Failed to parse job ad";
++		return false;
++	}
++
++	std::string missing;
++	if (!checkRequiredAttrs(ad, required, missing)) {
++		AbortTransaction();
++		text = "Job ad is missing required attributes: " + missing;
++		return false;
++	}
++
++		// EARLY SET: These attribute are set early so the incoming ad
++		// has a change to override them.
++	::SetAttribute(cluster, proc, ATTR_JOB_STATUS, "1"); // 1 = idle
++
++		// Junk that condor_q wants, but really shouldn't be necessary
++	::SetAttribute(cluster, proc, ATTR_JOB_REMOTE_USER_CPU, "0.0"); // float
++	::SetAttribute(cluster, proc, ATTR_JOB_PRIO, "0");              // int
++	::SetAttribute(cluster, proc, ATTR_IMAGE_SIZE, "0");            // int
++
++	if (!ad.LookupInteger(ATTR_JOB_UNIVERSE, universe)) {
++		char* uni_str = param("DEFAULT_UNIVERSE");
++		if (!uni_str) {
++			universe = CONDOR_UNIVERSE_VANILLA;
++		}
++		else {
++			universe = CondorUniverseNumber(uni_str);
++		}
++		::SetAttributeInt(cluster, proc, ATTR_JOB_UNIVERSE, universe );
++	}
++	// more stuff - without these our idle stats are whack
++	if ( universe != CONDOR_UNIVERSE_MPI && universe != CONDOR_UNIVERSE_PVM ) {
++		::SetAttribute(cluster, proc, ATTR_MAX_HOSTS, "1");              // int
++		::SetAttribute(cluster, proc, ATTR_MIN_HOSTS, "1");            // int
++	}
++	::SetAttribute(cluster, proc, ATTR_CURRENT_HOSTS, "0"); // int
++
++	ExprTree *expr;
++	const char *name;
++	std::string value;
++	ad.ResetExpr();
++	while (ad.NextExpr(name,expr)) {
++
++			// All these extra lookups are horrible. They have to
++			// be there because the ClassAd may have multiple
++			// copies of the same attribute name! This means that
++			// the last attribute with a given name will set the
++			// value, but the last attribute tends to be the
++			// attribute with the oldest (wrong) value. How
++			// annoying is that!
++		if (!(expr = ad.Lookup(name))) {
++			dprintf(D_ALWAYS, "Failed to lookup %s\n", name);
++
++			AbortTransaction();
++			text = "Failed to parse job ad attribute";
++			return false;
++		}
++
++        value = ExprTreeToString(expr);
++        ::SetAttribute(cluster, proc, name, value.c_str());
++	}
++
++		// LATE SET: These attributes are set late, after the incoming
++		// ad, so they override whatever the incoming ad set.
++	char buf[22]; // 22 is max size for an id, 2^32 + . + 2^32 + \0
++	snprintf(buf, 22, "%d", cluster);
++	::SetAttribute(cluster, proc, ATTR_CLUSTER_ID, buf);
++	snprintf(buf, 22, "%d", proc);
++	::SetAttribute(cluster, proc, ATTR_PROC_ID, buf);
++	snprintf(buf, 22, "%d", time(NULL));
++	::SetAttribute(cluster, proc, ATTR_Q_DATE, buf);
++
++		// Could check for some invalid attributes, e.g
++		//  JobUniverse <= CONDOR_UNIVERSE_MIN or >= CONDOR_UNIVERSE_MAX
++	
++		// 5. Commit transaction
++	CommitTransaction();
++
++
++		// 6. Reschedule
++	scheduler.needReschedule();
++
++
++		// 7. Return identifier
++		// TODO: dag ids?
++	MyString tmp;
++	//tmp.sprintf("%s#%d.%d", Name, cluster, proc);
++	// we have other API compositions for job id and submission id
++	// so let's return raw cluster.proc
++	tmp.sprintf("%d.%d", cluster, proc);
++	id = tmp.Value();
++
++	return true;
++}
++
++bool
++SchedulerObject::setAttribute(std::string key,
++							  std::string name,
++							  std::string value,
++							  std::string &text)
++{
++	PROC_ID id = getProcByString(key.c_str());
++	if (id.cluster < 0 || id.proc < 0) {
++		dprintf(D_FULLDEBUG, "SetAttribute: Failed to parse id: %s\n", key.c_str());
++		text = "Invalid Id";
++		return false;
++	}
++
++	if (!isValidAttributeName(name,text)) {
++		return false;
++	}
++
++		// All values are strings in the eyes of
++		// ::SetAttribute. Their type is inferred when read from
++		// the ClassAd log. It is important that the incoming
++		// value is properly quoted to differentiate between EXPR
++		// and STRING.
++	if (::SetAttribute(id.cluster,
++					   id.proc,
++					   name.c_str(),
++					   value.c_str())) {
++		text = "Failed to set attribute " + name + " to " + value;
++		return false;
++	}
++
++	return true;
++}
++
++bool
++SchedulerObject::hold(std::string key, std::string &reason, std::string &text)
++{
++	PROC_ID id = getProcByString(key.c_str());
++	if (id.cluster < 0 || id.proc < 0) {
++		dprintf(D_FULLDEBUG, "Hold: Failed to parse id: %s\n", key.c_str());
++		text = "Invalid Id";
++		return false;
++	}	
++
++	if (!holdJob(id.cluster,
++				 id.proc,
++				 reason.c_str(),
++				 true, // Always perform this action within a transaction
++				 true, // Always notify the shadow of the hold
++				 false, // Do not email the user about this action
++				 false, // Do not email admin about this action
++				 false // This is not a system related (internal) hold
++				 )) {
++		text = "Failed to hold job";
++		return false;
++	}
++
++	return true;
++}
++
++bool
++SchedulerObject::release(std::string key, std::string &reason, std::string &text)
++{
++	PROC_ID id = getProcByString(key.c_str());
++	if (id.cluster < 0 || id.proc < 0) {
++		dprintf(D_FULLDEBUG, "Release: Failed to parse id: %s\n", key.c_str());
++		text = "Invalid Id";
++		return false;
++	}
++
++	if (!releaseJob(id.cluster,
++					id.proc,
++					reason.c_str(),
++					true, // Always perform this action within a transaction
++					false, // Do not email the user about this action
++					false // Do not email admin about this action
++					)) {
++		text = "Failed to release job";
++		return false;
++	}
++
++	return true;
++}
++
++bool
++SchedulerObject::remove(std::string key, std::string &reason, std::string &text)
++{
++	PROC_ID id = getProcByString(key.c_str());
++	if (id.cluster < 0 || id.proc < 0) {
++		dprintf(D_FULLDEBUG, "Remove: Failed to parse id: %s\n", key.c_str());
++		text = "Invalid Id";
++		return false;
++	}	
++
++	if (!abortJob(id.cluster,
++				  id.proc,
++				  reason.c_str(),
++				  true // Always perform within a transaction
++				  )) {
++		text = "Failed to remove job";
++		return false;
++	}
++
++	return true;
++}
+diff --git a/src/condor_contrib/aviary/src/SchedulerObject.h b/src/condor_contrib/aviary/src/SchedulerObject.h
+new file mode 100644
+index 0000000..670218e
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/SchedulerObject.h
+@@ -0,0 +1,100 @@
++/*
++ * Copyright 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#ifndef _SCHEDULEROBJECT_H
++#define _SCHEDULEROBJECT_H
++
++// condor includes
++#include "condor_common.h"
++#include "condor_classad.h"
++
++// local includes
++#include "Codec.h"
++#include "AviaryUtils.h"
++
++using namespace std;
++using namespace aviary::util;
++using namespace aviary::codec;
++
++namespace aviary {
++namespace job {
++
++struct SchedulerStats {
++    // Properties
++    string      CondorPlatform;
++    string      CondorVersion;
++    int64_t     DaemonStartTime;
++    string      Pool;
++    string      System;
++    int64_t     JobQueueBirthdate;
++    uint32_t    MaxJobsRunning;
++    string      Machine;
++    string      MyAddress;
++    string      Name;
++
++    // Statistics
++    uint32_t    MonitorSelfAge;
++    double      MonitorSelfCPUUsage;
++    double      MonitorSelfImageSize;
++    uint32_t    MonitorSelfRegisteredSocketCount;
++    uint32_t    MonitorSelfResidentSetSize;
++    int64_t     MonitorSelfTime;
++    uint32_t    NumUsers;
++    uint32_t    TotalHeldJobs;
++    uint32_t    TotalIdleJobs;
++    uint32_t    TotalJobAds;
++    uint32_t    TotalRemovedJobs;
++    uint32_t    TotalRunningJobs;
++};
++
++class SchedulerObject {
++public:
++
++
++	void update(const ClassAd &ad);
++	bool submit(AttributeMapType& jobAdMap, string& id, string& text);
++	bool setAttribute(string id,
++                      string name,
++                      string value,
++                      string &text);
++	bool hold(string id, string &reason, string &text);
++	bool release(string id, string &reason, string &text);
++	bool remove(string id, string &reason, string &text);
++
++    static SchedulerObject* getInstance();
++
++	const char* getPool() {return m_pool.c_str(); }
++	const char* getName() {return m_name.c_str(); }
++
++	~SchedulerObject();
++
++private:
++    SchedulerObject();
++	SchedulerObject(SchedulerObject const&);
++	SchedulerObject& operator=(SchedulerObject const&);
++
++    string m_pool;
++    string m_name;
++	Codec* m_codec;
++    SchedulerStats m_stats;
++    static SchedulerObject* m_instance;
++
++};
++
++
++}} /* aviary::job */
++
++#endif /* _SCHEDULEROBJECT_H */
+diff --git a/src/condor_contrib/aviary/src/SubmissionObject.cpp b/src/condor_contrib/aviary/src/SubmissionObject.cpp
+new file mode 100644
+index 0000000..32d19f2
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/SubmissionObject.cpp
+@@ -0,0 +1,221 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++// condor includes
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_debug.h"
++#include "condor_attributes.h"
++#include "proc.h"
++
++// local includes
++#include "SubmissionObject.h"
++#include "JobServerObject.h"
++#include "AviaryUtils.h"
++
++using namespace std;
++using namespace aviary::query;
++using namespace aviary::codec;
++using namespace aviary::util;
++
++SubmissionObject::SubmissionObject (
++                                     const char *_name,
++                                     const char *_owner ) :
++        ownerSet ( false )
++{
++	m_name = _name;
++    if ( _owner )
++    {
++        setOwner ( _owner );
++    }
++    else
++    {
++        setOwner ( "Unknown" );
++        ownerSet = false;
++    }
++
++    m_codec = new BaseCodec;
++
++    dprintf ( D_FULLDEBUG, "Created new SubmissionObject '%s' for '%s'\n", _name, _owner);
++}
++
++SubmissionObject::~SubmissionObject()
++{
++	dprintf ( D_FULLDEBUG, "SubmissionObject::~SubmissionObject for '%s'\n", m_name.c_str());
++	delete m_codec;
++}
++
++void
++SubmissionObject::increment ( const Job *job )
++{
++    int status = job->getStatus();
++
++    dprintf ( D_FULLDEBUG, "SubmissionObject::increment '%s' on '%s'\n", getJobStatusString(status), job->getKey());
++
++    switch ( status )
++    {
++        case IDLE:
++            m_idle.insert ( job );
++            break;
++        case RUNNING:
++            m_running.insert ( job );
++            break;
++        case REMOVED:
++            m_removed.insert ( job );
++            break;
++        case COMPLETED:
++            m_completed.insert ( job );
++            break;
++        case HELD:
++            m_held.insert ( job );
++            break;
++        default:
++            dprintf ( D_ALWAYS, "error: Unknown %s of %d on %s\n",
++                      ATTR_JOB_STATUS, status, job->getKey() );
++            break;
++    }
++}
++
++void
++SubmissionObject::decrement ( const Job *job )
++{
++    int status = job->getStatus();
++
++    dprintf ( D_FULLDEBUG, "SubmissionObject::decrement '%s' on '%s'\n", getJobStatusString(status), job->getKey());
++
++    switch ( status )
++    {
++        case IDLE:
++            m_idle.erase ( job );
++            break;
++        case RUNNING:
++            m_running.erase ( job );
++            break;
++        case REMOVED:
++            m_removed.erase ( job );
++            break;
++        case COMPLETED:
++            m_completed.erase ( job );
++            break;
++        case HELD:
++            m_held.erase ( job );
++            break;
++        default:
++            dprintf ( D_ALWAYS, "error: Unknown %s of %d on %s\n",
++                      ATTR_JOB_STATUS, status, job->getKey() );
++            break;
++    }
++}
++
++
++const SubmissionObject::JobSet &
++SubmissionObject::getIdle()
++{
++    return m_idle;
++}
++
++const SubmissionObject::JobSet &
++SubmissionObject::getRunning()
++{
++    return m_running;
++}
++
++const SubmissionObject::JobSet &
++SubmissionObject::getRemoved()
++{
++    return m_removed;
++}
++
++const SubmissionObject::JobSet &
++SubmissionObject::getCompleted()
++{
++    return m_completed;
++}
++
++const SubmissionObject::JobSet &
++SubmissionObject::getHeld()
++{
++    return m_held;
++}
++
++void
++SubmissionObject::setOwner ( const char *_owner )
++{
++    if (_owner && !ownerSet )
++    {
++        m_owner = _owner;
++        ownerSet = true;
++    }
++}
++
++JobSummaryPair makeJobPair(const Job* job) {
++	JobServerObject* jso = JobServerObject::getInstance();
++	const char* job_cp = job->getKey();
++	JobSummaryFields* jsf = new JobSummaryFields;
++	AviaryStatus status;
++	// TODO: should check this return val i suppose
++	jso->getSummary(job_cp, *jsf, status);
++	return make_pair(job_cp,jsf);
++}
++
++void
++SubmissionObject::getJobSummaries ( JobSummaryPairCollection &jobs)
++{
++
++    // id, timestamp (which?), command, args, ins, outs, state, message
++    // id, time queued, time entered current state, state, command, args, hold reason, release reason
++
++    // find all the jobs in their various states...
++
++    //1) Idle
++    for ( SubmissionObject::JobSet::const_iterator i = getIdle().begin();
++            getIdle().end() != i; i++ )
++    {
++		jobs.push_back(makeJobPair(*i));
++	}
++
++    //2) Running
++    for ( SubmissionObject::JobSet::const_iterator i = getRunning().begin();
++            getRunning().end() != i;
++            i++ )
++    {
++		jobs.push_back(makeJobPair(*i));
++    }
++
++    //3) Removed
++    for ( SubmissionObject::JobSet::const_iterator i = getRemoved().begin();
++            getRemoved().end() != i; i++ )
++    {
++		jobs.push_back(makeJobPair(*i));
++    }
++
++    //4) Completed
++    for ( SubmissionObject::JobSet::const_iterator i = getCompleted().begin();
++            getCompleted().end() != i; i++ )
++    {
++		jobs.push_back(makeJobPair(*i));
++    }
++
++    //5) Held
++    for ( SubmissionObject::JobSet::const_iterator i = getHeld().begin();
++            getHeld().end() != i; i++ )
++    {
++		jobs.push_back(makeJobPair(*i));
++    }
++
++}
+diff --git a/src/condor_contrib/aviary/src/SubmissionObject.h b/src/condor_contrib/aviary/src/SubmissionObject.h
+new file mode 100644
+index 0000000..2b0f7a6
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/SubmissionObject.h
+@@ -0,0 +1,88 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _SUBMISSIONOBJECT_H
++#define _SUBMISSIONOBJECT_H
++
++// c++ includes
++#include <string>
++#include <map>
++#include <set>
++
++// coondor includes
++#include "condor_common.h"
++
++// local includes
++#include "Job.h"
++#include "JobServerObject.h"
++
++using std::string;
++using std::map;
++using std::set;
++
++namespace aviary {
++namespace query {
++		
++struct cmpjob {
++	bool operator()(const Job *a, const Job *b) const {
++		return strcmp(a->getKey(), b->getKey()) < 0;
++	}
++};
++
++class SubmissionObject
++{
++public:
++    friend class Job;
++	typedef set<const Job *, cmpjob> JobSet;
++
++	SubmissionObject( const char *name, const char *owner);
++	~SubmissionObject();
++
++	const JobSet & getIdle();
++	const JobSet & getRunning();
++	const JobSet & getRemoved();
++	const JobSet & getCompleted();
++	const JobSet & getHeld();
++
++	void setOwner(const char *owner);
++	const char* getOwner() { return m_owner.c_str(); }
++	const char* getName() { return m_name.c_str(); }
++	void getJobSummaries(JobSummaryPairCollection& _jobs);
++
++protected:
++	void increment(const Job *job);
++	void decrement(const Job *job);
++
++private:
++	JobSet m_idle;
++	JobSet m_running;
++	JobSet m_removed;
++	JobSet m_completed;
++	JobSet m_held;
++
++	bool ownerSet;
++
++	string m_name;
++	string m_owner;
++	Codec* m_codec;
++
++};
++
++}}
++
++#endif /* _SUBMISSIONOBJECT_H */
+diff --git a/src/condor_contrib/aviary/src/aviary_query_server.cpp b/src/condor_contrib/aviary/src/aviary_query_server.cpp
+new file mode 100644
+index 0000000..1231a27
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/aviary_query_server.cpp
+@@ -0,0 +1,279 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++// condor includes
++#include "condor_common.h"
++#include "condor_daemon_core.h"
++#include "condor_debug.h"
++#include "condor_attributes.h"
++#include "get_daemon_name.h"
++#include "subsystem_info.h"
++#include "condor_config.h"
++#include "stat_info.h"
++#include "JobLogMirror.h"
++
++// local includes
++#include "Axis2SoapProvider.h"
++#include "JobServerJobLogConsumer.h"
++#include "JobServerObject.h"
++#include "HistoryProcessingUtils.h"
++#include "Globals.h"
++
++// about self
++DECL_SUBSYSTEM("QUERY_SERVER", SUBSYSTEM_TYPE_DAEMON );	// used by Daemon Core
++
++using namespace std;
++using namespace aviary::query;
++using namespace aviary::soap;
++using namespace aviary::history;
++
++ClassAd	*ad = NULL;
++Axis2SoapProvider* provider = NULL;
++JobLogMirror *mirror = NULL;
++JobServerJobLogConsumer *consumer = NULL;
++JobServerObject *job_server = NULL;
++
++extern MyString m_path;
++
++void init_classad();
++void Dump();
++int HandleTransportSocket(Service *, Stream *);
++int HandleResetSignal(Service *, int);
++void ProcessHistoryTimer(Service*);
++
++//-------------------------------------------------------------
++
++int main_init(int /* argc */, char * /* argv */ [])
++{
++	dprintf(D_ALWAYS, "main_init() called\n");
++
++	// setup the job log consumer
++	consumer = new JobServerJobLogConsumer();
++	mirror = new JobLogMirror(consumer);
++	mirror->init();
++
++    // config then env for our all-important axis2 repo dir
++    const char* log_file = "./aviary_query.axis2.log";
++	string repo_path;
++	char *tmp = NULL;
++	if (tmp = param("WSFCPP_HOME")) {
++		repo_path = tmp;
++		free(tmp);
++	}
++	else if (tmp = getenv("WSFCPP_HOME")) {
++		repo_path = tmp;
++	}
++	else {
++		EXCEPT("No WSFCPP_HOME in config or env");
++	}
++
++	int port = param_integer("HTTP_PORT",9091);
++	int level = param_integer("AXIS2_DEBUG_LEVEL",AXIS2_LOG_LEVEL_CRITICAL);
++
++    // init transport here
++    provider = new Axis2SoapProvider(level,log_file,repo_path.c_str());
++
++    std::string axis_error;
++    if (!provider->init(port,AXIS2_HTTP_DEFAULT_SO_TIMEOUT,axis_error)) {
++		dprintf(D_ALWAYS, "%s\n",axis_error.c_str());
++        EXCEPT("Failed to initialize Axis2SoapProvider");
++    }
++
++	init_classad();
++
++	ReliSock *sock = new ReliSock;
++	if (!sock) {
++		EXCEPT("Failed to allocate transport socket");
++	}
++
++	if (!sock->assign(provider->getHttpListenerSocket())) {
++		EXCEPT("Failed to bind transport socket");
++	}
++	int index;
++	if (-1 == (index =
++			   daemonCore->Register_Socket((Stream *) sock,
++                                           "Transport method socket",
++										   (SocketHandler)
++										   HandleTransportSocket,
++                                           "Handler for transport invocations"))) {
++		EXCEPT("Failed to register transport socket");
++	}
++
++	job_server = JobServerObject::getInstance();
++
++	dprintf(D_ALWAYS,"Axis2 listener on http port: %d\n",port);
++
++    // before doing any job history processing, set the location of the files
++    // TODO: need to test mal-HISTORY values: HISTORY=/tmp/somewhere
++    const char* tmp2 = param ( "HISTORY" );
++    StatInfo si( tmp2 );
++    tmp2 = si.DirPath ();
++    if ( !tmp2 )
++    {
++        dprintf ( D_ALWAYS, "warning: No HISTORY defined - Aviary Query Server will not process history jobs\n" );
++    }
++    else
++    {
++        m_path = tmp2;
++        dprintf ( D_FULLDEBUG, "HISTORY path is %s\n",tmp2 );
++        // register a timer for processing of historical job files
++        if (-1 == (index =
++            daemonCore->Register_Timer(
++                0,
++                param_integer("HISTORY_INTERVAL",120),
++                (TimerHandler)ProcessHistoryTimer,
++                "Timer for processing job history files"
++                ))) {
++        EXCEPT("Failed to register history timer");
++        }
++    }
++
++    // useful for testing job coalescing
++    // and potentially just useful
++	if (-1 == (index =
++		daemonCore->Register_Signal(SIGUSR1,
++				    "Forced Reset Signal",
++				    (SignalHandler)
++				    HandleResetSignal,
++				    "Handler for Reset signals"))) {
++		EXCEPT("Failed to register Reset signal");
++	}
++
++	return TRUE;
++}
++
++void
++init_classad()
++{
++	if ( ad ) {
++		delete ad;
++	}
++	ad = new ClassAd();
++
++	ad->SetMyTypeName("QueryServer");
++	ad->SetTargetTypeName("Daemon");
++
++	char* default_name = default_daemon_name();
++		if( ! default_name ) {
++			EXCEPT( "default_daemon_name() returned NULL" );
++		}
++	ad->Assign(ATTR_NAME, default_name);
++	delete [] default_name;
++
++	ad->Assign(ATTR_MY_ADDRESS, my_ip_string());
++
++	// Initialize all the DaemonCore-provided attributes
++	daemonCore->publish( ad );
++
++}
++
++//-------------------------------------------------------------
++
++int 
++main_config()
++{
++	dprintf(D_ALWAYS, "main_config() called\n");
++
++	return TRUE;
++}
++
++//-------------------------------------------------------------
++
++void Stop()
++{
++	if (param_boolean("DUMP_STATE", false)) {
++		Dump();
++	}
++
++	delete job_server;
++
++	DC_Exit(0);
++}
++
++//-------------------------------------------------------------
++
++int main_shutdown_fast()
++{
++	dprintf(D_ALWAYS, "main_shutdown_fast() called\n");
++
++	Stop();
++
++	DC_Exit(0);
++	return TRUE;	// to satisfy c++
++}
++
++//-------------------------------------------------------------
++
++int main_shutdown_graceful()
++{
++	dprintf(D_ALWAYS, "main_shutdown_graceful() called\n");
++
++	Stop();
++
++	DC_Exit(0);
++	return TRUE;	// to satisfy c++
++}
++
++//-------------------------------------------------------------
++
++void
++main_pre_dc_init( int /* argc */, char* /* argv */ [] )
++{
++		// dprintf isn't safe yet...
++}
++
++
++void
++main_pre_command_sock_init( )
++{
++}
++
++
++int
++HandleTransportSocket(Service *, Stream *)
++{
++	// respond to a transport callback here
++	std::string provider_error;
++    if (!provider->processHttpRequest(provider_error)) {
++        dprintf (D_ALWAYS,"Error processing request: %s\n",provider_error.c_str());
++    }
++
++	return KEEP_STREAM;
++}
++
++int
++HandleResetSignal(Service *, int)
++{
++	consumer->Reset();
++
++    return TRUE;
++}
++
++void ProcessHistoryTimer(Service*) {
++	dprintf(D_FULLDEBUG, "ProcessHistoryTimer() called\n");
++    processHistoryDirectory();
++    processOrphanedIndices();
++    processCurrentHistory();
++}
++
++
++void
++Dump()
++{
++	dprintf(D_ALWAYS|D_NOHEADER, "DUMP called\n");
++}
+diff --git a/src/condor_contrib/aviary/src/cmpstr.h b/src/condor_contrib/aviary/src/cmpstr.h
+new file mode 100644
+index 0000000..a4b2fbe
+--- /dev/null
++++ b/src/condor_contrib/aviary/src/cmpstr.h
+@@ -0,0 +1,28 @@
++/***************************************************************
++ *
++ * Copyright (C) 2009-2011 Red Hat, Inc.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _CMPSTR_H
++#define _CMPSTR_H
++
++struct cmpstr {
++   bool operator()(const char *a, const char *b) const {
++      return strcmp(a, b) < 0;
++   }
++};
++
++#endif /* _CMPSTR_H */
+diff --git a/src/condor_contrib/aviary/test/jobcontrol.py b/src/condor_contrib/aviary/test/jobcontrol.py
+new file mode 100755
+index 0000000..a7c051f
+--- /dev/null
++++ b/src/condor_contrib/aviary/test/jobcontrol.py
+@@ -0,0 +1,57 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# uses Suds - https://fedorahosted.org/suds/
++from suds import *
++from suds.client import Client
++from sys import exit, argv, stdin
++import time
++
++# change these for other default locations and ports
++job_wsdl = 'file:/var/lib/condor/aviary/services/job/aviary-job.wsdl'
++
++cmds = ['holdJob', 'releaseJob', 'removeJob']
++
++cmdarg = len(argv) > 1 and argv[1]
++cproc =  len(argv) > 2 and argv[2]
++job_url = len(argv) > 3 and argv[3] or "http://localhost:9090/services/job/"
++
++if cmdarg not in cmds:
++	print "error unknown command: ", cmdarg
++	print "available commands are: ",cmds
++	exit(1)
++
++client = Client(job_wsdl);
++job_url += cmdarg
++client.set_options(location=job_url)
++
++# set up our JobID
++jobId = client.factory.create('ns0:JobID')
++jobId.job = cproc
++
++try:
++	func = getattr(client.service, cmdarg, None)
++	if callable(func):
++	    result = func(jobId,"test")
++except Exception, e:
++	print "unable to access scheduler at: ", job_url
++	print e
++	exit(1)
++
++if result.code != "OK":
++	print result.code,"; ", result.text
+diff --git a/src/condor_contrib/aviary/test/jobquery.py b/src/condor_contrib/aviary/test/jobquery.py
+new file mode 100755
+index 0000000..f311c38
+--- /dev/null
++++ b/src/condor_contrib/aviary/test/jobquery.py
+@@ -0,0 +1,68 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# uses Suds - https://fedorahosted.org/suds/
++import logging
++from suds import *
++from suds.client import Client
++from sys import exit, argv, stdin
++import time
++
++# enable these to see the SOAP messages
++#logging.basicConfig(level=logging.INFO)
++#logging.getLogger('suds.client').setLevel(logging.DEBUG)
++
++# change these for other default locations and ports
++job_wsdl = 'file:/var/lib/condor/aviary/services/query/aviary-query.wsdl'
++
++cmds = ['getJobStatus', 'getJobSummary', 'getJobDetails']
++
++cmdarg = len(argv) > 1 and argv[1]
++cproc =  len(argv) > 2 and argv[2]
++job_url = len(argv) > 3 and argv[3] or "http://localhost:9091/services/query/"
++
++if cmdarg not in cmds:
++	print "error unknown command: ", cmdarg
++	print "available commands are: ",cmds
++	exit(1)
++
++client = Client(job_wsdl);
++job_url += cmdarg
++client.set_options(location=job_url)
++
++# enable to see service schema
++#print client
++
++# set up our JobID
++if cproc:
++	jobId = client.factory.create("ns0:JobID")
++	jobId.job = cproc
++else:
++	# returns all jobs
++	jobId = None
++
++try:
++	func = getattr(client.service, cmdarg, None)
++	if callable(func):
++	    result = func(jobId)
++except Exception, e:
++	print "invocation failed: ", job_url
++	print e
++	exit(1)
++
++print result
+diff --git a/src/condor_contrib/aviary/test/setattr.py b/src/condor_contrib/aviary/test/setattr.py
+new file mode 100755
+index 0000000..175210c
+--- /dev/null
++++ b/src/condor_contrib/aviary/test/setattr.py
+@@ -0,0 +1,54 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# uses Suds - https://fedorahosted.org/suds/
++from suds import *
++from suds.client import Client
++from sys import exit, argv, stdin
++import time
++
++# change these for other default locations and ports
++job_wsdl = 'file:/var/lib/condor/aviary/services/job/aviary-job.wsdl'
++
++cproc =  len(argv) > 1 and argv[1]
++attr_name = len(argv) > 2 and argv[2]
++attr_value = len(argv) > 3 and argv[3]
++job_url = len(argv) > 4 and argv[4] or "http://localhost:9090/services/job/setJobAttribute"
++
++client = Client(job_wsdl);
++client.set_options(location=job_url)
++
++# set up our JobID
++jobId = client.factory.create('ns0:JobID')
++jobId.job = cproc
++
++# set up the Attribute
++aviary_attr = client.factory.create('ns0:Attribute')
++aviary_attr.name = attr_name
++aviary_attr.type = "STRING";
++aviary_attr.value = '"'+attr_value+'"'
++
++try:
++	result = client.service.setJobAttribute(jobId, aviary_attr)
++except Exception, e:
++	print "unable to access scheduler at: ", job_url
++	print e
++	exit(1)
++
++if result.code != "OK":
++	print result.code,"; ", result.text
+diff --git a/src/condor_contrib/aviary/test/submissions.py b/src/condor_contrib/aviary/test/submissions.py
+new file mode 100755
+index 0000000..1f03d63
+--- /dev/null
++++ b/src/condor_contrib/aviary/test/submissions.py
+@@ -0,0 +1,55 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# uses Suds - https://fedorahosted.org/suds/
++import logging
++from suds import *
++from suds.client import Client
++from sys import exit, argv
++
++# enable these to see the SOAP messages
++#logging.basicConfig(level=logging.INFO)
++#logging.getLogger('suds.client').setLevel(logging.DEBUG)
++
++query_wsdl = 'file:/var/lib/condor/aviary/services/query/aviary-query.wsdl'
++
++sub_name = len(argv) > 1 and argv[1]
++query_url = len(argv) > 2 and argv[2] or 'http://localhost:9091/services/query/getSubmissionSummary'
++
++client = Client(query_wsdl);
++client.set_options(location=query_url)
++
++# enable to see service schema
++#print client
++
++# set up our ID
++if sub_name:
++	subId = client.factory.create("ns0:SubmissionID")
++	subId.name = sub_name
++else:
++	# returns all jobs
++	subId = None
++
++try:
++	submissions = client.service.getSubmissionSummary(subId)
++except Exception, e:
++	print "invocation failed: ", query_url
++	print e
++	exit(1)
++
++print submissions
+diff --git a/src/condor_contrib/aviary/test/submit.py b/src/condor_contrib/aviary/test/submit.py
+new file mode 100755
+index 0000000..a4bfabe
+--- /dev/null
++++ b/src/condor_contrib/aviary/test/submit.py
+@@ -0,0 +1,89 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++#
++# Copyright 2009-2011 Red Hat, Inc.
++#
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++
++# uses Suds - https://fedorahosted.org/suds/
++from suds import *
++from suds.client import Client
++from sys import exit, argv
++import time, pwd, os
++
++uid = pwd.getpwuid(os.getuid())[0]
++if not uid:
++    uid = "condor"
++
++quiet = False
++
++# change these for other default locations and ports
++job_wsdl = 'file:/var/lib/condor/aviary/services/job/aviary-job.wsdl'
++job_url = 'http://localhost:9090/services/job/submitJob'
++
++for arg in argv[1:]:
++	if arg == '-q':
++		quiet = True
++	if "http://" in arg:
++		url = arg
++
++client = Client(job_wsdl);
++client.set_options(location=job_url)
++
++if not quiet:
++	print client
++	
++# add specific requirements here
++req1 = client.factory.create("ns0:ResourceConstraint")
++req1.type = 'OS'
++req1.value = 'LINUX'
++reqs = [ req1 ]
++
++# add extra Condor-specific or custom job attributes here
++extra1 = client.factory.create("ns0:Attribute")
++extra1.name = 'RECIPE'
++extra1.type = 'STRING'
++extra1.value = 'SECRET_SAUCE'
++extras = [ extra1 ]
++
++try:
++	result = client.service.submitJob( \
++	# the executable command
++		'/bin/sleep', \
++	# some arguments for the command
++		'120', \
++	# the submitter name
++		uid, \
++	# initial working directory wwhere job will execute
++		'/tmp', \
++	# an arbitrary string identifying the target submission group
++		'python_test_submit', \
++	# special resource requirements
++		reqs,	\
++	# additional attributes
++		extras
++	)
++except Exception, e:
++	print "invocation failed at: ", job_url
++	print e
++	exit(1)	
++
++if result.status.code != "OK":
++	print result.status.code,"; ", result.status.text
++	exit(1)
++
++if not quiet:
++	print result
++else:
++	print result.id.job;
+diff --git a/src/condor_contrib/condor_dbq/author.txt b/src/condor_contrib/condor_dbq/author.txt
+new file mode 100644
+index 0000000..e34989f
+--- /dev/null
++++ b/src/condor_contrib/condor_dbq/author.txt
+@@ -0,0 +1,3 @@
++author: James Kupsch
++organization: University of Wisconsin-Madison
++e-mail: kupsch at cs.wisc.edu
+diff --git a/src/condor_contrib/condor_dbq/condor_dbq.pl b/src/condor_contrib/condor_dbq/condor_dbq.pl
+new file mode 100755
+index 0000000..dd07292
+--- /dev/null
++++ b/src/condor_contrib/condor_dbq/condor_dbq.pl
+@@ -0,0 +1,1792 @@
++#!/usr/bin/perl -w
++
++################################################################
++#
++# Copyright (C) 2009-2010, Condor Team, Computer Sciences Department,
++# University of Wisconsin-Madison, WI.
++# 
++# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++# 
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++################################################################
++
++
++use strict;
++use DBI;
++use Getopt::Long;
++use Carp;
++
++
++my $condorQCmd		= "condor_q";
++my $condorSubmitCmd	= "condor_submit";
++
++my $condorAttrPrefix	= 'CDBQ_';
++my $cdbqIdAttr		= "${condorAttrPrefix}ID";
++my $cdbqSysAttr		= "${condorAttrPrefix}SYS";
++
++
++package CondorUserLog;
++
++sub new
++{
++    my $invocant = shift;
++
++    my $class = ref($invocant) || $invocant;
++    my $self = {
++		filename	=> undef,
++		fh		=> undef,
++		buf		=> '',
++		bufOffset	=> 0,
++		fileOffset	=> 0,
++		readChunkSize	=> 1024,
++		dev		=> undef,
++		ino		=> undef,
++		fileErrMsg	=> undef,
++		fileErrNum	=> 0,
++		lastUpdateTime	=> 0,
++		@_
++		};
++
++    die "filename required" unless defined $self->{filename};
++
++    if (defined $self->{offset})  {
++	$self->{bufOffset} = $self->{fileOffset} = $self->{offset};
++	delete $self->{offset};
++    }
++
++    bless $self, $class;
++    return $self;
++}
++
++
++sub FileExists
++{
++    my $self = shift;
++
++    return -f $self->{filename};
++}
++
++
++sub Open
++{
++    my $self = shift;
++
++    if (!defined $self->{fh})  {
++	my $fh;
++	my $errMsg = '';
++	my $errNum = 0;
++
++	my $r = open $fh, "<", $self->{filename};
++	if ($r)  {
++	    binmode $fh;
++	    $r = seek $fh, $self->{fileOffset}, 0;
++	    if ($r)  {
++		$self->{fh} = $fh;
++	    }  else  {
++		$errMsg = "seek: $!";
++		$errNum = 0 + $!;
++		close $fh
++	    }
++	}  else  {
++	    $errMsg = "open: $!";
++	    $errNum = 0 + $!;
++	}
++
++	$self->{fileErrMsg} = $errMsg;
++	$self->{fileErrNum} = $errNum;
++    }
++
++    return $self->{fh};
++}
++
++
++sub Close
++{
++    my $self = shift;
++
++    if (defined $self->{fh})  {
++	my $r = close $self->{fh};
++	$self->{fh} = undef if $r;
++	return $r;
++    }
++
++    return 0;
++}
++
++
++sub SetPosition
++{
++    my $self = shift;
++    my $pos = shift;
++
++    $self->{buf} = '';
++    $self->{bufOffset} = $self->{fileOffset} = $pos;
++
++    my $r = seek $self->{fh}, $pos, 0;
++    if (!$r)  {
++	$self->Close;
++    }
++}
++
++
++sub DESTROY
++{
++    my $self = shift;
++
++    $self->Close;
++}
++
++
++sub ReadFileChunk
++{
++    my $self = shift;
++
++    my $fh = $self->Open;
++
++    return unless defined $fh;
++
++    my $fileSize = -s $fh;
++    my $fileOffset = $self->{fileOffset};
++
++    if ($fileOffset > $fileSize)  {
++	$self->{fileErrMsg}
++		= "File truncated size=$fileSize, last read=$fileOffset";
++	$self->{fileErrNum} = -1;
++	return;
++    }
++
++    my $fileBytesRemaining = $fileSize - $fileOffset;
++    my $readSize = $self->{readChunkSize};
++    $readSize = $fileBytesRemaining if $fileBytesRemaining < $readSize; 
++
++    return 0 if $readSize == 0;
++
++    my $buf;
++    my $bytesRead = read $fh, $buf, $readSize;
++
++    if ($bytesRead != $readSize)  {
++	seek $fh, 0, 1;
++	$self->{fileErrMsg}
++		= "Read truncated wanted=$readSize, read=$bytesRead";
++	$self->{fileErrNum} = -1;
++	return;
++    }
++
++    $self->{buf} .= $buf;
++    $self->{fileOffset} += $bytesRead;
++
++    return $bytesRead;
++}
++
++
++#
++# returns (record, recordOffset, nextRecordOffset)	 if record found
++#         (					 )	 if no record available
++#         (undef , recordOffset, undef, errMsg, errNum)  if error
++#
++sub GetNextRecord
++{
++    my $self = shift;
++
++    while (1)  {
++	my ($r, $delim, $rest) = split /^(\.{3}\r?\n)/m, $self->{buf}, 2;
++	my $recordPos = $self->{bufOffset};
++
++	if (defined $delim)  {
++	    # found record
++	    $self->{buf} = $rest;
++	    $self->{bufOffset} += length($r) + length($delim);
++
++	    return ($r, $recordPos, $self->{bufOffset});
++	}  else  {
++	    my $amount = $self->ReadFileChunk;
++
++	    if (!defined $amount)  {
++		# error occurred
++		return (undef, $recordPos, undef,
++			    $self->{fileErrMsg}, $self->{fileErrNum});
++	    }  elsif ($amount == 0)  {
++		# no record found
++		return;
++	    }
++	}
++    }
++}
++
++
++
++
++package CondorWork;
++
++
++sub new
++{
++    my $invocant = shift;
++
++    my $class = ref($invocant) || $invocant;
++    my $self = {
++		workId		=> undef,
++		filename	=> undef,
++		userLog		=> undef,
++		nextPos		=> 0,
++		logErrMsg	=> undef,
++		logErrNum	=> undef,
++		totalJobs	=> 0,
++		completeJobs	=> 0,
++		jobs		=> {},
++		@_
++		};
++
++    die "filename required" unless defined $self->{filename};
++    
++    die "workId required" unless defined $self->{workId};
++
++    $self->{userLog} = new CondorUserLog(
++				filename	=> $self->{filename},
++				offset		=> $self->{nextPos}
++				);
++
++    bless $self, $class;
++    return $self;
++}
++
++
++my $eventRE = qr/^(\d+)\s+			# state
++		\((\d+)\.(\d+)\.(\d+)\)\s+	# cluster,proc.subproc
++		(\d+)\/(\d+)\s+			# MM DD
++		(\d+):(\d+):(\d+)\s+		# hh:mm:ss
++		(.*)$/sx;			# info
++
++my $normalTermRE = qr/Normal termination \(return value (\d+)\)/;
++
++my $abnormalTermRE = qr/Abnormal termination \(signal (\d+)\)/;
++
++# states in this array should go in the database
++# 	true value indicates state is terminal: 5 (terminated) and 9 (removed)
++my %states = map {$_ => ($_ == 5 || $_ == 9)} qw( 0 1 2 4 5 7 9 10 11 12 13);
++
++
++sub Print
++{
++    my $self = shift;
++
++    print "----- CondorWork -------\n";
++    my @keyNames = qw(workId filename nextPos logErrMsg logErrNum
++			totalJobs completeJobs);
++    foreach my $k (@keyNames)  {
++	my $v = $self->{$k};
++	$v = "<undef>" unless defined $v;
++	printf "%15s  %s\n", $k, $v;
++    }
++    printf "%15s  %s\n", "jobsSeen", scalar(keys %{$self->{jobs}});
++    print "------------------------\n";
++}
++
++
++sub RestoreJobs
++{
++    my $self = shift;
++    my $jobs = shift;
++
++    %{$self->{jobs}} = %$jobs;
++}
++
++
++sub MakeCondorId
++{
++    return join '.', @_;
++}
++
++
++sub IsTerminalState
++{
++    my $state = shift;
++    return exists($states{$state}) && $states{$state};
++}
++
++
++sub SetPosition
++{
++    my $self = shift;
++    my $pos = shift;
++
++    $self->{userLog}->SetPosition($pos);
++}
++
++
++sub NumIncompleteJobs
++{
++    my $self = shift;
++
++    return $self->{totalJobs} - $self->{completeJobs};
++}
++
++
++sub ParseRecordToEvent
++{
++    my ($record, $recordPos, $nextPos, $logErrMsg, $logErrNum) = @_;
++    my %e;
++
++    if (!defined $recordPos)  {
++	%e = (
++		type		=> 'none'
++	    );
++    }  elsif (!defined $record)  {
++	%e = (
++		type		=> 'error',
++		recordPos	=> $recordPos,
++		errMsg		=> $logErrMsg,
++		errNum		=> $logErrNum,
++	    );
++    }  elsif ($record =~  $eventRE)  {
++	%e = (
++		type		=> 'event',
++		state		=> 0 + $1,
++		cluster		=> 0 + $2,
++		proc		=> 0 + $3,
++		subproc		=> 0 + $4,
++		mon		=> 0 + $5,
++		day		=> 0 + $6,
++		hr		=> 0 + $7,
++		min		=> 0 + $8,
++		sec		=> 0 + $9,
++		info		=> $10,
++		exitSignal	=> undef,
++		exitCode	=> undef,
++		recordPos	=> $recordPos,
++		nextPos		=> $nextPos
++	    );
++
++	# guess at adjusting the year, since the year isn't in the record :(
++	# 	1 month ahead is the future
++	# 	everything else is in the past
++	my ($mo, $yr) = (localtime time)[4, 5];
++	++$mo;
++	$yr += 1900;
++	++$yr if ($mo == 12 && $e{mo} == 1);
++	--$yr if ($mo + 1 < $e{mon});
++	$e{yr} = $yr;
++
++	$e{terminal} = IsTerminalState($e{state});
++
++	# get how it terminated if state is 5
++	if ($e{state} == 5)  {
++	    if ($e{info} =~ $normalTermRE)  {
++		$e{exitCode} = 0 + $1;
++	    }  elsif ($e{info} =~ $abnormalTermRE)  {
++		$e{exitSignal} = 0 + $1;
++	    }
++	}
++
++	# only certain states get updated in the database
++	$e{recordState} = exists $states{$e{state}};
++
++	# create id to use for printing and key values
++	$e{id} = MakeCondorId(@e{qw(cluster proc subproc)});
++
++	# create ts in database format
++	$e{ts} = "$e{yr}-$e{mon}-$e{day} $e{hr}:$e{min}:$e{sec}";
++    }  else  {
++	%e = (
++		type		=> 'error',
++		recordPos	=> $recordPos,
++		errMsg		=> "invalid record format at offset $recordPos"
++	    );
++    }
++
++    return \%e;
++}
++
++
++sub GetNextEvent
++{
++    my $self = shift;
++
++    my $userLog = $self->{userLog};
++
++    my $event = ParseRecordToEvent($userLog->GetNextRecord());
++
++    return $event;
++}
++
++
++sub GetNewEvents
++{
++    my $self = shift;
++
++    my $errMsg;
++    my $errNum;
++    my $nextPos;
++
++    my %jobs;
++
++    while (1)  {
++	my $e = $self->GetNextEvent;
++	my $type = $e->{type};
++
++	last if $type eq 'none';
++
++	if ($type eq 'event')  {
++	    $nextPos = $e->{nextPos};
++
++	    next unless $e->{recordState};
++
++	    my $id = $e->{id};
++	    $jobs{$id} = $e unless exists $jobs{$id} && $jobs{$id}->{terminal};
++	}  elsif ($type eq 'error')  {
++	    if (scalar(keys %jobs) == 0)  {
++		$errMsg = $e->{errMsg};
++		$errNum = $e->{errNum};
++	    }
++
++	    $self->SetPosition($e->{recordPos});
++
++	    last;
++	}  else  {
++	    die "unknown event type ($type)";
++	}
++    }
++
++    return (\%jobs, $errMsg, $errNum, $nextPos);
++}
++
++
++sub AddCondorIdsFromLog
++{
++    my $self = shift;
++    my $jobs = shift;
++
++    while (1)  {
++	my $e = $self->GetNextEvent;
++
++	if ($e->{type} eq 'event')  {
++	    $jobs->{$e->{id}} = 1;
++	}  else  {
++	    last;
++	}
++    }
++}
++
++
++sub PrintEvent
++{
++    my $e = shift;
++
++    my @attrs = qw( type recordPos nextPos state id cluster proc subproc
++		    yr mon day hr min sec ts info terminal
++		    exitSignal exitCode recordState errMsg errNum );
++
++    print "-------------\n";
++    foreach my $k (@attrs)  {
++	next unless exists $e->{$k};
++	my $v = $e->{$k};
++	$v = "<undef>" unless defined $v;
++	printf "%-14s: %s\n", $k, $v;
++    }
++    print "-------------\n";
++}
++
++
++sub RemoveAlreadyTerminatedJobEvents
++{
++    my $self = shift;
++    my $newJobs = shift;
++    my $currentJobs = $self->{jobs};
++
++    foreach my $j (keys %$newJobs)  {
++	delete $newJobs->{$j} if exists $currentJobs->{$j} && $currentJobs->{$j};
++    }
++}
++
++
++sub ApplyJobUpdates
++{
++    my $self = shift;
++    my ($newJobs, $errMsg, $errNum, $nextPos) = @_;
++    my $currentJobs = $self->{jobs};
++    my $completeJobs = $self->{completeJobs};
++
++    $self->{errMsg} = $errMsg;
++    $self->{errNum} = $errNum;
++    $self->{nextPos} = $nextPos;
++
++    foreach my $j (keys %$newJobs)  {
++	my $jobComplete = $newJobs->{$j}->{terminal};
++	$currentJobs->{$j} = $jobComplete;
++	++$completeJobs if $jobComplete;
++    }
++
++    $self->{completeJobs} = $completeJobs;
++}
++
++
++sub ProcessNewEvents
++{
++    my $self = shift;
++    my ($dbh, $insertJobSth, $updateJobSth, $updateWorkJobsSth,
++		$updateWorkCompleteSth, $updateWorkJobsErrorSth) = @_;
++
++    my $currentJobs = $self->{jobs};
++    my $id = $self->{id};
++    my $success = 1;
++    my $completeJobs = $self->{completeJobs};
++
++    my ($newJobs, $errMsg, $errNum, $nextPos) = $self->GetNewEvents;
++
++    if (scalar keys %$newJobs)  {
++	$self->RemoveAlreadyTerminatedJobEvents($newJobs);
++	my $workId = $self->{workId};
++
++	$dbh->begin_work;
++
++	foreach my $jobId (keys %$newJobs)  {
++	    my $job = $newJobs->{$jobId};
++
++	    if (defined $currentJobs->{$jobId})  {
++		# existing job
++		my @attrs = qw(state info ts exitCode exitSignal	
++				    cluster proc subproc);
++
++		my $rows = $updateJobSth->execute(@{$job}{@attrs}, $workId);
++		if (!defined $rows || $rows != 1)  {
++		    my $dbErr = $dbh->errstr;
++		    $success = 0;
++		    main::LogAndExit("Update work record failed id=$id: $dbErr\n", 1);
++		}
++	    }  else  {
++		# new job
++		my @attrs = qw(state info ts ts
++				    cluster proc subproc);
++
++		my $rows = $insertJobSth->execute(@{$job}{@attrs}, $workId);
++		if (!defined $rows || $rows != 1)  {
++		    my $dbErr = $dbh->errstr;
++		    $success = 0;
++		    main::LogAndExit("Insert work record failed id=$id: $dbErr\n", 1);
++		}
++	    }
++
++	    $currentJobs->{$jobId} = $job->{terminal};
++	    ++$completeJobs if $job->{terminal};
++	}
++
++	my $updateWorkSth;
++	if ($completeJobs >= $self->{totalJobs})  {
++	    # all jobs for work are done
++	    $updateWorkSth = $updateWorkCompleteSth;
++	}  else  {
++	    # still jobs to complete
++	    $updateWorkSth = $updateWorkJobsSth;
++	}
++
++	my $rows = $updateWorkSth->execute($nextPos, $completeJobs, $workId);
++	if (!defined $rows && $rows != 1)  {
++	    my $dbErr = $dbh->errstr;
++	    $success = 0;
++	    main::LogAndExit("update work record failed id=$id: $dbErr\n", 1);
++	}
++
++	if ($success)  {
++	    $dbh->commit;
++	}  else  {
++	    $dbh->rollback;
++	}
++    }  elsif (defined $errMsg || defined $errNum)  {
++	my $rows = $updateWorkJobsErrorSth->execute($nextPos, $errMsg, $errNum, $id);
++	if (!defined $rows || $rows != 1)  {
++	    my $dbErr = $dbh->errstr;
++	    $success = 0;
++	    main::LogAndExit("Updating work record failed id=$id: $dbErr\n", 1);
++	}
++    }
++
++    $self->ApplyJobUpdates($newJobs, $errMsg, $errNum, $nextPos);
++}
++
++
++
++package CondorActiveWork;
++
++
++sub new
++{
++    my $invocant = shift;
++
++    my $class = ref($invocant) || $invocant;
++    my $self = {
++		work			=> {},
++		numIncompleteJobs	=> 0
++		};
++
++    bless $self, $class;
++    return $self;
++}
++
++
++sub AddWork
++{
++    my $self = shift;
++    my ($workId, $filename, $totalJobs, @remain) = @_;
++
++    my $work = new CondorWork(	workId => $workId,
++				filename => $filename,
++				totalJobs => $totalJobs,
++				@remain);
++
++    $self->{work}->{$workId} = $work;
++    $self->{numIncompleteJobs} += $totalJobs;
++}
++
++
++sub NumWork
++{
++    my $self = shift;
++    return scalar keys %{$self->{work}};
++}
++
++
++sub NumIncompleteJobs
++{
++    my $self = shift;
++    return $self->{numIncompleteJobs};
++}
++
++
++sub ProcessWork
++{
++    my $self = shift;
++    my @dbArgs = @_;
++    my $work = $self->{work};
++
++    foreach my $id (keys %$work)  {
++	my $w = $work->{$id};
++	my $prevNumIncompleteJobs = $w->NumIncompleteJobs;
++	my $r = $w->ProcessNewEvents(@dbArgs);
++	my $curNumIncompleteJobs = $w->NumIncompleteJobs;
++	$self->{numIncompleteJobs} -= $prevNumIncompleteJobs - $curNumIncompleteJobs;
++	delete $work->{$id} if $curNumIncompleteJobs == 0;
++    }
++}
++
++
++my $condorQRe = qr/\s*^(?:(\d+)\s+)?(\d+)\s+(\d+)\s*$/;
++
++sub CheckIfWorkSubmitted
++{
++    my $self = shift;
++    my ($workId, $filename) = @_;
++    my %jobs;
++
++    my @cmd = (
++		$condorQCmd,
++		'-format',	'%d ',		'subprocid',
++		'-format',	'%d ',		'procid',
++		'-format',	'%d\n',		'clusterid',
++		'-constraint',	"$cdbqIdAttr == $workId"
++		);
++
++    my ($exitCode, $exitSignal, $out, $err) = main::ExecuteCommand(\@cmd, '');
++    
++    if ($exitCode != 0 || $exitSignal != 0)  {
++	$out = '' unless defined $out;
++	$err = '' unless defined $err;
++	main::LogAndExit("$condorQCmd failed to recover"
++			. "$cdbqIdAttr=$workId\n$out\n---\n$err\n", 1);
++    }
++
++    foreach my $line (split /\n/, $out)  {
++	next if $line =~ /^\s*$/;
++	my ($sp, $p, $c) = ($line =~ /$condorQRe/);
++	$sp = 0 unless defined $sp;
++	main::LogAndExit("$condorQCmd produced invalid line: $line", 1)
++		unless defined $c;
++
++	my $condorId = CondorWork::MakeCondorId($c, $p, $sp);
++	$jobs{$condorId} = 1;
++    }
++
++    my $work = new CondorWork(filename => $filename, workId => $workId);
++    $work->AddCondorIdsFromLog(\%jobs);
++
++    return scalar(keys %jobs);
++}
++
++
++sub RecoverChosenWork
++{
++    my $self = shift;
++    my ($getChosenWorkSth, $submitSuccessSth, $revertChosenSth) = @_;
++
++    my %jobsSeen;
++    my $numJobs = scalar keys %jobsSeen;
++    my $cluster;
++
++    my %work;
++    $getChosenWorkSth->execute();
++    while (my @data = $getChosenWorkSth->fetchrow_array())  {
++	my ($workId, $filename) = @data;
++	$work{$workId} = $filename;
++    }
++    $getChosenWorkSth->finish();
++
++    foreach my $workId (keys %work)  {
++	my $numJobs = $self->CheckIfWorkSubmitted($workId, $work{$workId});
++	if ($numJobs > 0)  {
++	    my $rows = $submitSuccessSth->execute(undef, undef, $numJobs, $workId);
++	    if (!defined $rows || $rows != 1)  {
++		LogAndExit("Error: Updating db for successful submit", 1);
++	    }
++	}  else  {
++	    my $rows = $revertChosenSth->execute($workId);
++	    if (!defined $rows || $rows != 1)  {
++		LogAndExit("Error: Updating db for successful submit", 1);
++	    }
++	}
++    }
++}
++
++
++sub RestoreStateFromDatabase
++{
++    my $self = shift;
++
++    my $getInBatchWorkSth = shift;
++    my $getInBatchJobsSth = shift;
++    my $activeWork = $self->{work};
++
++    $getInBatchWorkSth->execute();
++    while (my @data = $getInBatchWorkSth->fetchrow_array())  {
++	my ($workId, $filename, $nextPos, $logErrMsg, $logErrNum,
++		    $totalJobs, $completeJobs) = @data;
++	my $work = new CondorWork(
++				workId		=> $workId,
++				filename	=> $filename,
++				nextPos		=> $nextPos,
++				logErrMsg	=> $logErrMsg,
++				logErrNum	=> $logErrNum,
++				totalJobs	=> $totalJobs,
++				completeJobs	=> $completeJobs
++				);
++	$activeWork->{$workId} = $work;
++	$self->{numIncompleteJobs} += $totalJobs - $completeJobs;
++	print "Restore $workId totalJobs=$totalJobs completeJobs=$completeJobs\n";
++    }
++    $getInBatchWorkSth->finish();
++
++    my %jobs;
++    $getInBatchJobsSth->execute();
++    while (my @data = $getInBatchJobsSth->fetchrow_array())  {
++	my ($workId, $cluster, $proc, $subproc, $state) = @data;
++	my $condorId = CondorWork::MakeCondorId($cluster, $proc, $subproc);
++	$jobs{$workId}{$condorId} = CondorWork::IsTerminalState($state);
++    }
++    $getInBatchJobsSth->finish();
++
++    foreach my $workId (keys %jobs)  {
++	print "Restore $workId seen-jobs=", scalar(keys %{$jobs{$workId}}), "\n";
++	$activeWork->{$workId}->RestoreJobs($jobs{$workId});
++    }
++}
++
++
++sub Recover
++{
++    my $self = shift;
++    my ($getInBatchWorkSth, $getInBatchJobsSth, $getChosenWorkSth,
++		$submitSuccessSth, $revertChosenSth) = @_;
++
++    $self->RecoverChosenWork($getChosenWorkSth,
++			    $submitSuccessSth, $revertChosenSth);
++    $self->RestoreStateFromDatabase($getInBatchWorkSth, $getInBatchJobsSth);
++}
++
++
++
++package main;
++
++
++my $tablePrefix = '';
++my $workTable = $tablePrefix . 'work';
++my $jobsTable = $tablePrefix . 'jobs';
++
++my %options;
++my %sqlStmts;
++
++my %defaultDbInfoFiles = (
++			admin	=> 'db.admin.conf',
++			submit	=> 'db.submit.conf',
++			worker	=> 'db.worker.conf'
++			);
++
++
++sub InitializeSqlStmts
++{
++    %sqlStmts = (
++
++    createWorkTable => qq{
++CREATE TABLE $workTable  (
++    work_data		TEXT		NOT NULL,
++    create_ts		TIMESTAMP	NOT NULL DEFAULT current_timestamp,
++    id			BIGINT		PRIMARY KEY,
++	    -- DEFAULT NEXTVAL('${workTable}_seq') handled by trigger
++    insert_user		TEXT		NOT NULL DEFAULT user,
++    state		TEXT		NOT NULL DEFAULT 'initial',
++            -- values:  initial  chosen  in_batch  complete  failed
++    cdbq_user		TEXT,
++    batch_sys		TEXT,
++    cmd_stdout		TEXT,
++    cmd_stderr		TEXT,
++    cmd_exit_code	INTEGER,
++    cmd_exit_signal	INTEGER,
++    log_file		TEXT,
++    next_pos		INTEGER,
++    total_jobs		INTEGER,
++    complete_jobs	INTEGER,
++    log_err_msg		TEXT,
++    log_err_num		INTEGER,
++    update_ts		TIMESTAMP,
++    user_id		INTEGER,
++    user_text		TEXT
++)
++    },
++
++    createJobsTable => qq{
++CREATE TABLE $jobsTable  (
++    work_id		BIGINT		REFERENCES $workTable ON DELETE CASCADE,
++    cluster		INTEGER		NOT NULL,
++    proc		INTEGER		NOT NULL,
++    subproc		INTEGER		NOT NULL,
++    state		INTEGER		NOT NULL,
++    info		TEXT		NOT NULL,
++    record_ts		TIMESTAMP	NOT NULL,
++    create_ts		TIMESTAMP	NOT NULL,
++    update_ts		TIMESTAMP	NOT NULL,
++    exit_code		INTEGER,
++    exit_signal		INTEGER,
++
++    PRIMARY KEY (work_id, cluster, proc, subproc)
++)
++    },
++
++    createWorkSeq		=> "CREATE SEQUENCE ${workTable}_seq",
++
++    createWorkFunction => qq{
++CREATE OR REPLACE FUNCTION ${workTable}_trigger() RETURNS trigger AS
++\$\$
++BEGIN
++    IF TG_OP = 'INSERT' THEN
++	NEW.create_ts = current_timestamp;
++	NEW.id = NEXTVAL('${workTable}_seq');
++	NEW.cdbq_user = NULL;
++	NEW.state = 'initial';
++	NEW.insert_user = user;
++    ELSIF TG_OP = 'UPDATE' THEN
++	IF OLD.state = 'initial' THEN
++	    NEW.cdbq_user = user;
++	    NEW.state = 'chosen';
++	ELSIF OLD.cdbq_user <> user THEN
++	    RAISE EXCEPTION 'user ''\%\%'' not allowed to update $workTable id=%%',
++				    user,                             OLD.id;
++	END IF;
++	NEW.create_ts = OLD.create_ts;
++	NEW.id = OLD.id;
++    END IF;
++
++    RETURN NEW;
++END
++\$\$ LANGUAGE plpgsql
++    },
++
++    createWorkTrigger => qq{
++CREATE TRIGGER ${workTable}_trigger
++    BEFORE INSERT OR UPDATE
++    ON $workTable
++    FOR EACH ROW EXECUTE PROCEDURE ${workTable}_trigger()
++    },
++
++
++    createJobsFunction => q{
++CREATE OR REPLACE FUNCTION jobs_trigger() RETURNS trigger AS
++$$
++BEGIN
++    IF TG_OP = 'DELETE' THEN
++	IF OLD.state <> 5 AND OLD.state <> 9 THEN
++	    RAISE EXCEPTION 'job ''%%'' still in batch system', OLD.work_id;
++	END IF;
++
++	RETURN OLD;
++    END IF;
++
++    RETURN NEW;
++END
++$$ LANGUAGE plpgsql
++    },
++
++    createJobsTrigger => qq{
++CREATE TRIGGER jobs_trigger
++    BEFORE DELETE
++    ON $jobsTable
++    FOR EACH ROW EXECUTE PROCEDURE jobs_trigger()
++    },
++
++    createSubmitUser		=> 'CREATE USER %s PASSWORD \'%s\'',
++
++    grantSubmitUserWorkTable	=> "GRANT SELECT, INSERT ON $workTable TO \%s",
++
++    grantSubmitUserJobsTable	=> "GRANT SELECT ON $jobsTable TO \%s",
++
++    grantSubmitUserWorkSeq	=> "GRANT USAGE on ${workTable}_seq TO \%s",
++
++    createExecuteUser		=> 'CREATE USER %s PASSWORD \'%s\'',
++
++    grantExecuteUserWorkTable	=> "GRANT SELECT, UPDATE ON $workTable TO \%s",
++
++    grantExecuteUserJobsTable	=> "GRANT SELECT, INSERT, UPDATE ON $jobsTable TO \%s",
++
++    revokePublicSchemaCreate => qq(
++REVOKE
++    CREATE
++    ON SCHEMA public
++    FROM public
++    CASCADE
++    ),
++
++    createLangPlpgsql		=> "create language plpgsql",
++
++    updateWorkToChosen => qq{
++UPDATE $workTable
++    SET batch_sys = ?, state = 'chosen', log_file = ? || '/work.' || id || '.log'
++    WHERE id in
++	(SELECT id
++	    FROM $workTable
++	    WHERE state = 'initial'
++	    ORDER BY id
++	    LIMIT $options{grabamount})
++    },
++
++    selectChosenWork => qq{
++SELECT id, work_data, log_file
++    FROM $workTable
++    WHERE state = 'chosen' AND batch_sys = ?
++    ORDER BY id
++    },
++
++    updateWorkToInBatch => qq{
++UPDATE $workTable
++    SET state = 'in_batch',
++	cmd_exit_code = 0, cmd_exit_signal = 0,
++	cmd_stdout = ?, cmd_stderr = ?,
++	total_jobs = ?, complete_jobs = 0
++    WHERE id = ?
++    },
++
++    updateWorkToTmpFailed => qq{
++UPDATE $workTable
++    SET state = 'initial',
++	cmd_exit_code = ?, cmd_exit_signal = 0,
++	cmd_stdout = ?, cmd_stderr = ?
++    WHERE id = ?
++    },
++
++    updateWorkToFailed => qq{
++UPDATE $workTable
++    SET state = 'failed',
++	cmd_exit_code = ?, cmd_exit_signal = ?,
++	cmd_stdout = ?, cmd_stderr = ?
++    WHERE id = ?
++    },
++
++    insertJob => qq{
++INSERT INTO $jobsTable
++    (state, info, record_ts, create_ts, update_ts,
++    cluster, proc, subproc, work_id)
++    VALUES  (?, ?, ?, ?, current_timestamp, ?, ?, ?, ?)
++    },
++
++    updateJob => qq{
++UPDATE $jobsTable
++    SET state = ?, info = ?, record_ts = ?, exit_code = ?, exit_signal = ?,
++	update_ts = current_timestamp
++    WHERE cluster = ? AND proc = ? AND subproc = ? AND work_id = ?
++    },
++
++    updateWorkJobs => qq(
++UPDATE $workTable
++    SET next_pos = ?, complete_jobs = ?, update_ts = current_timestamp
++    WHERE id = ?
++    ),
++
++    updateWorkComplete => qq(
++UPDATE $workTable
++    SET state = 'complete', next_pos = ?, complete_jobs = ?,
++	update_ts = current_timestamp
++    WHERE id = ?
++    ),
++
++    updateWorkJobsError => qq(
++UPDATE $workTable
++    SET next_pos = ?, log_err_msg = ?, log_err_num = ?,
++	update_ts = current_timestamp
++    WHERE id = ?
++    ),
++
++    getChosenWork => qq(
++SELECT id, log_file
++    FROM $workTable
++    WHERE state = 'chosen'
++    ),
++
++    updateWorkToInitial => qq(
++UPDATE $workTable
++    SET state = 'initial'
++    WHERE id = ?
++    ),
++
++    updateAllChosenWorkToInitial => qq(
++UPDATE $workTable
++    SET state = 'initial'
++    WHERE state = 'chosen'
++    ),
++
++    getInBatchWork => qq(
++SELECT id, log_file, next_pos, log_err_msg, log_err_num,
++	total_jobs, complete_jobs
++    FROM $workTable
++    WHERE state = 'in_batch'
++    ),
++
++    getInBatchJobs => qq(
++SELECT $workTable.id, $jobsTable.cluster, proc, subproc, $jobsTable.state
++    FROM $workTable, $jobsTable
++    WHERE $workTable.state = 'in_batch' AND id = work_id
++    ORDER BY id
++    )
++
++    );
++}
++
++
++sub GetDbConnectionInfo
++{
++    my ($dbInfoDir, $dbInfoFile, $dbInfoType) = @_;
++
++    my $defaultDbInfoFile = $defaultDbInfoFiles{$dbInfoType};
++
++    die "unknown dbinfotype=$dbInfoType" unless defined $defaultDbInfoFile;
++
++    $dbInfoFile = "$dbInfoDir/$defaultDbInfoFile" if $dbInfoFile eq '';
++
++    if ($dbInfoFile eq '-')  {
++	open DBINFOFILE, '-'
++		or LogAndExit("open db info file '-' failed: $!", 1);
++    }  else  {
++	open DBINFOFILE, '<', $dbInfoFile
++		or LogAndExit("open db info file '$dbInfoFile' failed: $!", 1);
++    }
++
++    my $dataSource = <DBINFOFILE>;
++    my $user = <DBINFOFILE>;
++    my $password =<DBINFOFILE>;
++
++    close DBINFOFILE or LogAndExit("close db info file '$dbInfoFile' failed: $!", 1);
++
++    LogAndExit("db info file '$dbInfoFile' is empty", 1) unless defined $dataSource;
++    chomp $dataSource;
++    LogAndExit("db info file '$dbInfoFile' missing user", 1) unless defined $user;
++    LogAndExit("db info file '$dbInfoFile' bad user '$user' is non-alphanumeric", 1) unless $user =~ /^\w+$/;
++    chomp $user;
++    chomp $password if defined $password;
++
++    return ($dataSource, $user, $password);
++}
++
++
++sub ConnectToDb
++{
++    my ($dbInfoDir, $dbInfoFile, $dbInfoType) = @_;
++    my ($dataSource, $user, $password)
++		= GetDbConnectionInfo($dbInfoDir, $dbInfoFile, $dbInfoType);
++
++    my %dbAttrs = (AutoCommit => 1, PrintError => 0, PrintWarn => 0);
++    my $dbh = DBI->connect($dataSource, $user, $password, \%dbAttrs) or die;
++
++    return $dbh;
++}
++
++
++sub ExecuteDbOperation
++{
++    my ($dbh, $options, $stmtId, @params) = @_;
++
++    die "unknown db stmt '$stmtId'" unless defined $sqlStmts{$stmtId};
++
++    my $stmt = sprintf $sqlStmts{$stmtId}, @params;
++
++    if ($options->{noexecute})  {
++	$stmt =~ s/\s*$//;
++	print "\n$stmt;\n";
++    }  else  {
++	my $rows = $dbh->do($stmt);
++	unless (defined $rows)  {
++	    my $dbErr = $dbh->errstr;
++	    LogAndExit("Db stmt failed: $dbErr\n$stmt", 1);
++	}
++    }
++}
++
++
++my %preparedStmtCache;
++
++sub GetPreparedStmt
++{
++    my ($dbh, $stmtId) = @_;
++    my $sth;
++
++    if (exists $preparedStmtCache{$stmtId})  {
++	$sth = $preparedStmtCache{$stmtId};
++    }  else  {
++	die "unknown db stmt '$stmtId'" unless defined $sqlStmts{$stmtId};
++
++	my $stmt = $sqlStmts{$stmtId};
++
++	$sth = $dbh->prepare($stmt) or die "prepare failed '$stmt'";
++    }
++
++    return $sth;
++}
++
++
++sub DoCreateLangPlpgsql
++{
++    my ($dbh, $options) = @_;
++
++    ExecuteDbOperation($dbh, $options, 'createLangPlpgsql');
++}
++
++
++sub DoRevokePublicSchemaCreate
++{
++    my ($dbh, $options) = @_;
++
++    ExecuteDbOperation($dbh, $options, 'revokePublicSchemaCreate');
++}
++
++
++sub DoInitDb
++{
++    my ($dbh, $options) = @_;
++
++    ExecuteDbOperation($dbh, $options, 'createWorkTable');
++    ExecuteDbOperation($dbh, $options, 'createJobsTable');
++    ExecuteDbOperation($dbh, $options, 'createWorkSeq');
++
++    ExecuteDbOperation($dbh, $options, 'createWorkFunction');
++    ExecuteDbOperation($dbh, $options, 'createWorkTrigger');
++
++    ExecuteDbOperation($dbh, $options, 'createJobsFunction');
++    ExecuteDbOperation($dbh, $options, 'createJobsTrigger');
++}
++
++
++sub DoCreateSubmitUser
++{
++
++    my ($dbh, $options) = @_;
++
++    my $dbInfoFile = $options->{createsubmituser};
++    my $dbInfoDir = $options->{dbinfodir};
++    my ($dataSource, $user, $password) 
++		    = GetDbConnectionInfo($dbInfoDir, $dbInfoFile, 'submit');
++
++    ExecuteDbOperation($dbh, $options, 'createSubmitUser', $user, $password);
++    ExecuteDbOperation($dbh, $options, 'grantSubmitUserWorkTable', $user);
++    ExecuteDbOperation($dbh, $options, 'grantSubmitUserJobsTable', $user);
++    ExecuteDbOperation($dbh, $options, 'grantSubmitUserWorkSeq', $user);
++}
++
++
++sub DoCreateWorkUser
++{
++
++    my ($dbh, $options) = @_;
++
++    my $dbInfoFile = $options->{createworkuser};
++    my $dbInfoDir = $options->{dbinfodir};
++    my ($dataSource, $user, $password) 
++		    = GetDbConnectionInfo($dbInfoDir, $dbInfoFile, 'worker');
++
++    ExecuteDbOperation($dbh, $options, 'createExecuteUser', $user, $password);
++    ExecuteDbOperation($dbh, $options, 'grantExecuteUserWorkTable', $user);
++    ExecuteDbOperation($dbh, $options, 'grantExecuteUserJobsTable', $user);
++}
++
++
++my $progVersion = '1.0b3';
++
++my $progName = $0;
++$progName =~ s/.*[\\\/]//;
++
++
++sub Log
++{
++    my $data = shift;
++
++    print STDERR "$data\n";
++}
++
++
++sub LogAndExit
++{
++    my ($data, $code) = @_;
++
++    Log $data;
++
++    exit $code;
++}
++
++
++
++
++sub Usage
++{
++    print STDERR <<EOF;
++Usage: $progName [options]...
++
++    --dbinfofile      -f  db info file
++    --dbinfodir       -a  db info dir
++    --logdir          -d  user log directory
++    --sleepamount         number of seconds to sleep between iterations
++    --maxwork             maximum number of submitted work (0 is infinite)
++    --maxjobs             maximum number of incomplete jobs (0 is infinite)
++    --grabamount          number of new work pieces to grab at once
++    --id                  id for the queue
++
++    --initdb              initialize database
++    --createlang          create plpgsql language in database
++    --revokepublic        revoke create access to public schema
++    --createsubmituser    add a submit db account from db info file
++    --createworkuser      add an execute db account from db info file
++
++    --submit              submit Condor job to db
++
++    --noexecute       -n  just print sql commands
++
++    --help            -h  print this message
++    --version         -v  print version number
++EOF
++}
++
++
++sub ProcessOptions
++{
++    %options = (
++		    dbinfofile		=> '',
++		    dbinfodir		=> '.',
++		    logdir		=> '.',
++		    sleepamount		=> 10,
++		    maxwork		=> 0,
++		    maxjobs		=> 0,
++		    grabamount		=> 10,
++		    id			=> '',
++		    initdb		=> 0,
++		    createlang		=> 0,
++		    revokepublic	=> 0,
++		    createsubmituser	=> undef,
++		    createworkuser	=> undef,
++		    submit		=> undef,
++		    noexecute		=> 0,
++		    help		=> 0,
++		    version		=> 0
++		);
++
++    my @options = (
++		    "dbinfofile|f=s",
++		    "dbinfodir|a=s",
++		    "logdir|d=s",
++		    "sleepamount=i",
++		    "maxwork=i",
++		    "maxjobs=i",
++		    "grabamount=i",
++		    "id=s",
++		    "initdb!",
++		    "createlang!",
++		    "revokepublic!",
++		    "createsubmituser:s",
++		    "createworkuser:s",
++		    "submit=s",
++		    "noexecute|n!",
++		    "help|h!",
++		    "version|v!"
++		);
++
++    my $ok = GetOptions(\%options, @options);
++    if (!$ok || $options{help})  {
++	Usage();
++	exit !$ok;
++    }
++
++    if ($options{version})  {
++	print "$progName: $progVersion\n";
++	exit 0;
++    }
++
++    $options{id} = `hostname` if $options{id} eq '';
++    chomp $options{id};
++
++    if (!-d $options{logdir})  {
++	print STDERR "User log directory '$options{logdir}' does not exist\n";
++	exit 1;
++    }
++}
++
++
++sub Initialize
++{
++    ProcessOptions();
++    InitializeSqlStmts();
++}
++
++
++sub CheckCondorSubmitRunning
++{
++    my $cmd = "$condorQCmd 2>&1 >/dev/null";
++    `$cmd`;
++
++    return $? == 0;
++}
++
++
++sub GetFileContents
++{
++    my ($filename) = @_;
++
++    local $/;
++    if ($filename eq '-')  {
++	open INFILE, '-' or LogAndExit("open '-': $!", 1);
++    }  else  {
++	open INFILE, '<', $filename or LogAndExit("open < '$filename': $!", 1);
++    }
++    my $data = <INFILE>;
++    close INFILE or LogAndExit("close $filename: $!", 1);
++
++    return $data;
++}
++
++
++sub ShellQuoteArg
++{
++    my $data = shift;
++
++    $data =~ s/'/'\\''/g;
++    $data = "'$data'" if $data =~ tr|A-Za-z0-9/-_||c;
++
++    return $data;
++}
++
++
++sub ExecuteCommand
++{
++    my ($cmdToExec, $inData, $timeout) = @_;
++
++    $inData = '' unless defined $inData;
++
++    use IPC::Open3;
++    use Fcntl;
++    use Errno qw{:POSIX};
++
++    local $SIG{PIPE} = 'IGNORE';
++
++    local (*CMDIN, *CMDOUT, *CMDERR);
++
++    # The following block of code should just be
++    #
++    #   my $cmdPid = open3(\*CMDIN, \*CMDOUT, \*CMDERR, @$cmdToExec);
++    #
++    # A bug in open3 causes die to be called in the event that exec fails
++    # which has the side effect of running all the destructors, which
++    # closes all of our database handles.  open3 should only ever throw
++    # an exception in the child and only if the exec fails, so try and
++    # catch it and exit immediately to work around the open3 bug.
++    #
++    my $cmdPid;
++    eval {
++	$cmdPid = open3(\*CMDIN, \*CMDOUT, \*CMDERR, @$cmdToExec);
++    };
++    if ($@)  {
++	print STDERR "ExecuteCommand: exec failed: '" . join("', '", @$cmdToExec), "'";
++	eval { require POSIX; POSIX::_exit(255); };
++	exit 255;
++    }
++
++    my $cmdinFlags = fcntl(CMDIN, F_GETFL, 0);
++    fcntl(CMDIN, F_SETFL, $cmdinFlags | O_NONBLOCK);
++
++    my $inFileno = fileno(CMDIN);
++    my $outFileno = fileno(CMDOUT);
++    my $errFileno = fileno(CMDERR);
++
++    my $outData = '';
++    my $outLen = 0;
++    my $errData = '';
++    my $errLen = 0;
++
++    my $inLen = length($inData);
++    my $inOffset = 0;
++
++    my $openFds = 3;
++
++    if ($inLen == 0)  {
++	$inFileno = -1;
++	--$openFds;
++	close(CMDIN) or die "close CMDIN: $!";
++    }
++
++    while ($openFds > 0)  {
++	my $readVec = '';
++	my $writeVec = '';
++
++	vec($readVec, $outFileno, 1) = 1 unless $outFileno == -1;
++	vec($readVec, $errFileno, 1) = 1 unless $errFileno == -1;
++	vec($writeVec, $inFileno, 1) = 1 unless $inFileno == -1;
++
++	my $numFds = select($readVec, $writeVec, undef, $timeout);
++	if ($numFds == -1)  {
++	    if ($!{EINTR} || $!{EAGAIN})  {
++		redo;
++	    }  else  {
++		die "select failed: $!";
++	    }
++	}  elsif ($numFds == 0)  {
++	    kill 9, $cmdPid;
++	    waitpid $cmdPid, 0;
++	    die "select timeout expired, retrying";
++	}
++
++	if (vec($readVec, $outFileno, 1))  {
++	    my $bytesRead = sysread(CMDOUT, $outData, 1024, $outLen);
++	    if (defined $bytesRead)  {
++		if ($bytesRead > 0)  {
++		    $outLen += $bytesRead;
++		}  elsif ($bytesRead == 0)  {
++		    $outFileno = -1;
++		    --$openFds;
++		    close(CMDOUT) or die "close CMDOUT: $!";
++		}
++	    }  else  {
++		if (!$!{EINTR} && !$!{EAGAIN})  {
++		    kill 9, $cmdPid;
++		    waitpid $cmdPid, 0;
++		    die "sysread CMDOUT: $!";
++		}
++	    }
++	}
++
++	if (vec($readVec, $errFileno, 1))  {
++	    my $bytesRead = sysread(CMDERR, $errData, 1024, $errLen);
++	    if (defined $bytesRead)  {
++		if ($bytesRead > 0)  {
++		    $errLen += $bytesRead;
++		}  elsif ($bytesRead == 0)  {
++		    $errFileno = -1;
++		    --$openFds;
++		    close(CMDERR) or die "close CMDERR: $!";
++		}
++	    }  else  {
++		if (!$!{EINTR} && !$!{EAGAIN})  {
++		    kill 9, $cmdPid;
++		    waitpid $cmdPid, 0;
++		    die "sysread CMDERR: $!";
++		}
++	    }
++	}
++
++	if (vec($writeVec, $inFileno, 1))  {
++	    my $bytesToWrite = $inLen - $inOffset;
++	    my $bytesWritten = syswrite(CMDIN, $inData, $bytesToWrite, $inOffset);
++	    if (defined $bytesWritten)  {
++		if ($bytesWritten > 0)  {
++		    $inOffset += $bytesWritten;
++		    if ($inOffset >= $inLen)  {
++			$inFileno = -1;
++			--$openFds;
++			close(CMDIN) or die "close CMDIN: $!";
++		    }
++		}
++	    }  else  {
++		if ($!{EPIPE})  {
++		    $inFileno = -1;
++		    --$openFds;
++		    close(CMDIN) or die "close CMDIN: $!";
++		}  elsif (!$!{EINTR} && !$!{EAGAIN})  {
++		    kill 9, $cmdPid;
++		    waitpid $cmdPid, 0;
++		    die "sysread CMDERR: $!";
++		}
++	    }
++	}
++    }
++
++    waitpid $cmdPid, 0;
++
++    my $exitCode = $? >> 8;
++    my $signalValue = $? & 127;
++
++    return ($exitCode, $signalValue, $outData, $errData);
++}
++
++
++my $scheddDownRE = qr/^ERROR: Can't find address of local schedd/m;
++my $parseScheddNumAndCluster = qr/^(\d+) job\(s\) submitted to cluster \d+/m;
++
++sub SubmitToCondor
++{
++    my ($sysId, $workId, $subFile, $logFile) = @_;
++
++    my @cmd = ($condorSubmitCmd,
++		'-a', "log = $logFile",
++		'-a', "+$cdbqIdAttr = $workId",
++		'-a', "+$cdbqSysAttr = \"$sysId\""
++		);
++    my ($exitCode, $exitSignal, $out, $err) = ExecuteCommand(\@cmd, $subFile);
++
++    my $isTmpErr
++	= ($exitSignal == 0 && $exitCode != 0 && $err =~ /$scheddDownRE/);
++
++    my $numJobs = 0;
++    while ($out =~ /$parseScheddNumAndCluster/g)  {
++	$numJobs += $1;
++    }
++
++    return ($exitCode, $exitSignal, $out, $err, $isTmpErr, $numJobs);
++}
++
++
++sub DoAdminCmds
++{
++    my ($options) = @_;
++
++    my $dbh = ConnectToDb($options->{dbinfodir}, $options->{dbinfofile}, 'admin');
++
++    if ($options->{createlang})  {
++	DoCreateLangPlpgsql($dbh, $options);
++    }
++
++    if ($options->{revokepublic})  {
++	DoRevokePublicSchemaCreate($dbh, $options);
++    }
++
++    if ($options->{initdb})  {
++	DoInitDb($dbh, $options);
++    }
++
++    if (defined $options->{createsubmituser})  {
++	DoCreateSubmitUser($dbh, $options);
++    }
++
++    if (defined $options->{createworkuser})  {
++	DoCreateWorkUser($dbh, $options);
++    }
++
++    $dbh->disconnect() or die;
++}
++
++
++sub DoSubmit
++{
++    my ($options) = @_;
++
++    my $dbh = ConnectToDb($options->{dbinfodir}, $options->{dbinfofile}, 'submit');
++
++    my $submit = GetFileContents($options->{submit});
++
++    if ($options->{noexecute})  {
++	$submit =~ s/'/''/g;
++	print "\nINSERT INTO $workTable (work_data) VALUES ('$submit');\n";
++    }  else  {
++	my $stmt = "INSERT INTO $workTable (work_data) VALUES (?);";
++	my $rows = $dbh->do($stmt, undef, $submit);
++	unless (defined $rows)  {
++	    my $dbErr = $dbh->errstr;
++	    LogAndExit("Db stmt failed: $dbErr\n$stmt", 1);
++	}
++    }
++
++    $dbh->disconnect() or die;
++}
++
++
++sub DoGrabWork
++{
++    my ($options, $dbh, $sth) = @_;
++
++    my $id = $options->{id};
++    my $logDir = $options->{logdir};
++
++    my $rows = $sth->execute($id, $logDir);
++    if (!defined $rows)  {
++	LogAndExit("GrabWork failed", 1);
++    }
++}
++
++
++sub DoSubmitWork
++{
++    my ($activeWork, $options, $dbh, $chosenWorkSth, $submitSuccessSth,
++			    $submitFailSth, $submitTmpFailSth,
++			    $updateAllChosenWorkToInitialSth) = @_;
++
++    my $id = $options->{id};
++    my $maxJobs = $options->{maxjobs};
++    my $maxWork = $options->{maxwork};
++
++    my @work;
++
++    $chosenWorkSth->execute($id);
++
++    while (my @data = $chosenWorkSth->fetchrow_array())  {
++	my $w = {work_id => $data[0], work_data => $data[1], log_file => $data[2]};
++
++	push @work, $w;
++    }
++    $chosenWorkSth->finish();
++
++    while (@work)  {
++	my $w = shift @work;
++	my $workId = $w->{work_id};
++	my $workData = $w->{work_data};
++	my $logFile = $w->{log_file};
++
++	if (($maxJobs > 0 && $activeWork->NumIncompleteJobs >= $maxJobs)
++		    || ($maxWork > 0 && $activeWork->NumWork >= $maxWork))  {
++	    my $rows = $updateAllChosenWorkToInitialSth->execute();
++	    print "revert rows = $rows\n";
++	    if (!defined $rows || $rows == 0)  {
++		LogAndExit("Error: Reverting all chosen work to initial", 1);
++	    }
++	    last;
++	}
++
++	# set a temporary error here
++	die "$logFile exists" if -e $logFile;
++
++	my ($exitCode, $exitSignal, $out, $err, $isTmpErr, $numJobs)
++			= SubmitToCondor($id, $workId, $workData, $logFile);
++
++	$err .= "Unable to extract number of jobs from submission output\n"
++		    unless $exitSignal != 0 || $exitCode != 0 || defined $numJobs;
++
++	if ($exitSignal == 0 && $exitCode == 0 && defined $numJobs)  {
++	    my $rows = $submitSuccessSth->execute($out, $err, $numJobs, $workId);
++	    if (!defined $rows || $rows != 1)  {
++		LogAndExit("Error: Updating db for successful submit", 1);
++	    }
++	    $activeWork->AddWork($workId, $logFile, $numJobs);
++	}  elsif ($isTmpErr)  {
++	    my $rows = $submitTmpFailSth->execute($exitCode,
++						    $out, $err, $workId);
++	    if (!defined $rows || $rows != 1)  {
++		LogAndExit("Error: Updating db for temporary failed submit", 1);
++	    }
++	}  else  {
++	    my $rows = $submitFailSth->execute($exitCode, $exitSignal,
++						    $out, $err, $workId);
++	    if (!defined $rows || $rows != 1)  {
++		print $dbh->errstr, "\n";
++		LogAndExit("Error: Updating db for failed submit", 1);
++	    }
++	}
++    }
++}
++
++
++sub DoProcessQueue
++{
++    my ($options) = @_;
++
++    my $id = $options{id};
++    my $sleepAmount = $options{sleepamount};
++    my $maxWork = $options{maxwork};
++    my $maxJobs = $options{maxjobs};
++
++    my $dbh = ConnectToDb($options->{dbinfodir}, $options->{dbinfofile}, 'worker');
++
++    my $grabSth			= GetPreparedStmt($dbh, 'updateWorkToChosen');
++    my $chosenWorkSth		= GetPreparedStmt($dbh, 'selectChosenWork');
++    my $submitSuccessSth	= GetPreparedStmt($dbh, 'updateWorkToInBatch');
++    my $submitFailSth		= GetPreparedStmt($dbh, 'updateWorkToFailed');
++    my $submitTmpFailSth	= GetPreparedStmt($dbh, 'updateWorkToTmpFailed');
++    my $updateAllChosenWorkToInitialSth	= GetPreparedStmt($dbh, 'updateAllChosenWorkToInitial');
++    my $insertJobSth		= GetPreparedStmt($dbh, 'insertJob');
++    my $updateJobSth		= GetPreparedStmt($dbh, 'updateJob');
++    my $updateWorkJobsSth	= GetPreparedStmt($dbh, 'updateWorkJobs');
++    my $updateWorkCompleteSth	= GetPreparedStmt($dbh, 'updateWorkComplete');
++    my $updateWorkJobsErrorSth	= GetPreparedStmt($dbh, 'updateWorkJobsError');
++    my $getInBatchWorkSth	= GetPreparedStmt($dbh, 'getInBatchWork');
++    my $getInBatchJobsSth	= GetPreparedStmt($dbh, 'getInBatchJobs');
++    my $getChosenWorkSth	= GetPreparedStmt($dbh, 'getChosenWork');
++    my $revertChosenSth		= GetPreparedStmt($dbh, 'updateWorkToInitial');
++
++    my $activeWork = new CondorActiveWork;
++
++    $activeWork->Recover($getInBatchWorkSth, $getInBatchJobsSth,
++			$getChosenWorkSth, $submitSuccessSth, $revertChosenSth);
++
++    my $done = 0;
++    while (!$done)  {
++	if (($maxJobs == 0 || $activeWork->NumIncompleteJobs < $maxJobs)
++		    && ($maxWork == 0 || $activeWork->NumWork < $maxWork))  {
++	    DoGrabWork($options, $dbh, $grabSth);
++
++	    DoSubmitWork($activeWork, $options, $dbh, $chosenWorkSth,
++			    $submitSuccessSth, $submitFailSth, $submitTmpFailSth,
++			    $updateAllChosenWorkToInitialSth);
++	}
++
++	$activeWork->ProcessWork($dbh,
++				$insertJobSth, $updateJobSth, $updateWorkJobsSth,
++				$updateWorkCompleteSth, $updateWorkJobsErrorSth);
++
++	sleep $sleepAmount;
++    }
++
++    $dbh->disconnect() or die;
++}
++
++
++sub Main
++{
++    my $processQueue = 1;
++
++    Initialize();
++
++    if (       $options{initdb}
++	    || $options{createlang}
++	    || $options{revokepublic}
++	    || defined $options{createsubmituser}
++	    || defined $options{createworkuser}
++	    )  {
++	DoAdminCmds(\%options);
++	$processQueue = 0;
++    }
++
++    if ($options{submit})  {
++	DoSubmit(\%options);
++	$processQueue = 0;
++    }
++
++    if ($processQueue)  {
++	DoProcessQueue(\%options);
++    }
++}
++
++
++Main();
+diff --git a/src/condor_contrib/condor_dbq/condor_dbq.pl.man.tex b/src/condor_contrib/condor_dbq/condor_dbq.pl.man.tex
+new file mode 100644
+index 0000000..a61c19a
+--- /dev/null
++++ b/src/condor_contrib/condor_dbq/condor_dbq.pl.man.tex
+@@ -0,0 +1,471 @@
++\begin{ManPage}{\label{man-condor-dbq.pl}\Condor{dbq.pl}}{1}
++{Provides a relational database management system interface to Condor.
++Condor submit file contents are inserted into a table, \Condor{dbq.pl}
++submits the job to Condor, and updates a table with the status of the
++work to allow the monitoring of its progress.}
++\Synopsis
++
++\SynProg{\Condor{dbq.pl}}
++\oOptArg{{-}{-}dbinfofile}{dbinfofile}
++\oOptArg{{-}{-}dbinfodir}{dbinfodir}
++\oOptArg{{-}{-}logdir}{logfiledir}
++\oOptArg{{-}{-}sleepamount}{seconds}
++\oOptArg{{-}{-}maxwork}{numofwork}
++\oOptArg{{-}{-}maxjobs}{numofjobs}
++\oOptArg{{-}{-}grabamount}{numjobs}
++
++\SynProg{\Condor{dbq.pl}}
++\oOpt{{-}{-}initdb}
++\oOpt{{-}{-}createlang}
++\oOpt{{-}{-}revokepublic}
++\oOptArg{{-}{-}createsubmituser}{[dbinfofile]}
++\oOptArg{{-}{-}createworkuser}{[dbinfofile]}
++\oOptArg{{-}{-}submit}{submitfile}
++\oOpt{{-}{-}noexecute}
++
++\SynProg{\Condor{dbq.pl}}
++\oOpt{{-}{-}help}
++
++\SynProg{\Condor{dbq.pl}}
++\oOpt{{-}{-}version}
++
++
++\Description
++\Condor{dbq.pl} provides a relational database interface to submit Condor
++jobs, and monitor their progress as they are executed.
++The user submits work to the system by inserting a row into a database table.
++The user can query the \Condor{dbq.pl} tables to monitor the progress of their
++work.
++
++\Condor{dbq.pl} is careful to submit each piece of work into Condor exactly
++once.
++\Condor{dbq.pl} can be stopped at any time.  Upon restart it will recover its
++state and resume operation.
++
++
++\Condor{dbq.pl} has two main modes of operation.  The first, its normal
++mode, performs the role of taking jobs from the database, submitting them
++to Condor and updating the results of their execution.
++The second mode performs administrative tasks on the database including
++creating the necessary tables and accounts to use \Condor{dbq.pl}.
++
++In the normal mode of operation, \Condor{dbq.pl} alternates between polling
++the database for new work to submit to Condor, and monitoring the submitted
++work's user logs for new events.
++The database is updated to reflect the current state of the system.
++There are several options described in the Options Section that can be used to
++throttle \Condor{dbq.pl}
++
++The submission data for each work is in the same format allowed by
++\Condor{submit}.
++The only limitation is that the user can not specify a user log using the
++\emph{log} attribute as \Condor{dbq.pl} will override this attribute with
++its own value.
++\Condor{dbq.pl} uses \Condor{submit} to perform the submission into Condor.
++The only changes made to the submission are the user log is overridden, and
++attributes with a prefix of \emph{CDBQ\_} are added.
++For correct operation, work submitted to this \Condor{schedd} outside of
++\Condor{dbq.pl} must not add attributes or modify atttibutes with a prefix of
++\emph{CDBQ\_}.
++
++\Condor{dbq.pl} operates by using two tables.
++The \emph{work} table represents each piece of work.
++The \emph{jobs} table represents the individual jobs once the work is submitted
++to Condor.
++Other than inserting the work initially, users should only query the tables,
++and should not otherwise update values unless specified below.  A description
++of the fields and types of each table are described next.
++
++\begin{description}
++\item[work table]
++  Each row represents a piece of work to be executed by Condor.
++  The table's attribute names, their SQL types and descriptions are as follows:
++
++  \begin{description}
++    \item[work\_data TEXT]
++	Stores the Condor submit file data.
++	This is the only attribute that needs to be set when inserting a
++	new piece of work.
++    \item[create\_ts TIMESTAMP]
++	Database timestamp when record was created.
++    \item[id BIGINT]
++	Unique id for this record.
++    \item[insert\_user TEXT]
++	Database user that inserted this record.
++    \item[state TEXT]
++      The state of the piece of work in the system.
++      The possible values are as follows:
++      \begin{description}
++	\item[initial]
++	  Job has not yet been submitted to Condor.
++	\item[chosen]
++	  Job is about to be submitted to Condor.
++	\item[in\_batch]
++	  Job has successfully been submitted to Condor, but has not
++	  yet completed.
++	\item[complete]
++	  All the jobs of this work have completed successfully or
++	  have beeen removed.
++	\item[failed]
++	  The work has failed due to a permanent error.
++      \end{description}
++    \item[cdbq\_user TEXT]
++	Database user that inserted this record into Condor.
++	NULL if \Condor{submit} not executed.
++    \item[cmd\_stdout TEXT]
++	Standard out of \Condor{submit} after submitting this job.
++	NULL if \Condor{submit} not executed.
++    \item[cmd\_stderr TEXT]
++	Standard error of \Condor{submit} after submitting this job.
++	NULL if \Condor{submit} not executed.
++    \item[cmd\_exit\_code INTEGER]
++	Exit code of \Condor{submit}.
++	0 is success, other values indicate failure.
++	NULL if \Condor{submit} not executed.
++    \item[cmd\_exit\_signal INTEGER]
++	Signal causing this \Condor{submit} to fail.
++	0 is non-signal exit, other values represent the signal number.
++	NULL if \Condor{submit} not executed.
++    \item[log\_file TEXT]
++	Path to Condor's user log file for this work.
++    \item[next\_pos INTEGER]
++	Offset between last and next event record to read.
++    \item[total\_jobs INTEGER]
++	Total number of jobs that are represented by this work.
++    \item[complete\_jobs INTEGER]
++	Total number of jobs that have completed or been removed.
++    \item[log\_err\_msg TEXT]
++	Last error message caused by accessing the user log file.
++    \item[log\_err\_num INTEGER]
++	Last error number caused by accessing the user log file.
++    \item[update\_ts TIMESTAMP]
++	Database timestamp when record was last updated.
++    \item[user\_id INTEGER]
++	For use by the user to store an integer value.
++    \item[user\_text TEXT]
++	For use by the user to store a text value.
++  \end{description}
++
++\item[jobs table:]
++  Each row repreents a job of a piece of work.
++  These rows are inserted once the work has been submitted to the Condor system 
++  and Condor has written a submitted event to the user log file.
++  The table's attribute names, their SQL types and descriptions are as follows:
++
++  \begin{description}
++    \item[work\_id BIGINT]
++	Id from the \emph{work} table.
++    \item[cluster INTEGER]
++	Condor cluster id of this job.
++    \item[proc INTEGER]
++	Condor process id of this job.
++    \item[subproc INTEGER]
++	Condor subprocess id of this job.
++    \item[state INTEGER]
++	Condor user log record event type of the last event seen for this job.
++    \item[info TEXT]
++	Additional information from the last log record seen for this job.
++    \item[record\_ts TIMESTAMP]
++	User log timestamp from the last log record event processed.
++    \item[create\_ts TIMESTAMP]
++	Database timestamp when job was first seen.
++    \item[update\_ts TIMESTAMP]
++	Database timestamp when record was last updated.
++    \item[exit\_code INTEGER]
++	Exit code of of this job.
++	0 is success, other values indicate failure.
++	NULL if job not yet complete.
++    \item[exit\_signal INTEGER]
++	Signal causing this job to fail.
++	0 is non-signal exit, other values represent the signal number.
++	NULL if job not yet complete.
++  \end{description}
++\end{description}
++
++The other functions of \Condor{dbq.pl} perform administrative tasks on the
++database.
++These include inserting a new record into the work table given a Condor submit
++file, and creating the tables and accounts required by \Condor{dbq.pl}.
++If any of this functionality is requested, only the administrative tasks are
++performed; the normal processing of work is not started.
++
++If \Opt{{-}{-}noexecute} is used with any of the administrative functions, 
++the SQL statements are printed to standard out instead of being executing.
++This is useful to review the statements for security purposes, or to modify
++them before creating the database objects.
++
++The \OptArg{{-}{-}submit}{filename} option is used to insert a work record into
++the system using the contents of \emph{filename} for the Condor submit file
++data.  If \emph{filename} is `-', the program reads the Condor submit file from
++standard in.
++
++The \Opt{{-}{-}initdb} option causes the tables and other database objects to
++be created.
++
++The \Opt{{-}{-}createlang} option creates the plpgsql language to allow the
++trigger functions created by \Opt{{-}{-}initdb} to be used.
++This is not necessary if the database administrator created the language for
++use when the database was created.
++
++The \Opt{{-}{-}revokepublic} option prevents the database users from creating
++object new tables in the database in the `public' schema that PostgreSQL grants
++by default to all users.
++If the user accounts do not need to create tables this option should be used to
++revoke this unnecessary privilege.
++
++The \OptArg{{-}{-}createsubmituser}{[dbinfofile]} option creates a database user
++that can be used to submit jobs.
++The username and password for this account is obtained from the db information
++file specified, or using the default location for submit db information file
++if none is specified.
++This account has privileges to  insert work into the work table, and read
++values from both tables.
++
++The \OptArg{{-}{-}createworkuser}{[dbinfofile]} option creates a database user
++that can be used by \Condor{dbq.pl} to perform its normal operation.
++The username and password for this account is obtained from the db information
++file specified, or using the default location for worker db information file
++if none is specified.
++This account has privileges to update existing records in the work table, and
++to insert and update records in the jobs table.
++
++There are three types of database accounts required by \Condor{dbq.pl}.
++The first is an administrative database account that can create database
++accounts, tables and other objects.
++The administrative account requires database privileges to create tables and
++users in the database.
++This account is used by the administrative commands except the submit function.
++
++The second account type is used to insert work records into the database by the
++\Opt{{-}{-}submit} option.
++This account requires privileges to insert records into the work table.
++The account can be created using the \Opt{{-}{-}createsubmituser}, which also
++grants access to select records from the two tables allowing this account to
++used to both submit work and to monitor its progress.
++Multiple acconts of this type may be used.
++
++The final account type is used to perform the actual work of the system.
++This account requires privileges to update records in the work table and to
++both insert and update records in the jobs table.
++The account can be created using the \Opt{{-}{-}createworkuser}.
++
++The account information describing an account is stored in a database
++information file that contains three lines:  the perl DBI string describing the
++database, the username, and the password.
++As these files contain sensitive information, only the operating system
++accounts used to run the \Condor{dbq.pl} should be able to read the database
++account information files.
++By default, a separate db information file is used to store each of the three
++accounts with the program selecting the credential information based on the
++selected operation.
++These files are stored in a directory specified by \Opt{{-}{-}dbinfodir}, and are
++named db.admin.conf, db.submit.conf, and db.work.conf for the administrative,
++submit and work accounts respectively.
++If this scheme is used the correct account will be used without having to
++specify the account information file.
++If an account information file is missing \Condor{dbq.pl} will fail if an
++operation is selected that requires the missing account information file.
++
++
++\begin{Options}
++  \OptItem{\OptArg{{-}{-}dbinfofile}{dbinfofile}}{
++    Db information file containing the DBI connection string, username and
++    password one to a line.
++    If not specified this file defaults to files in the \Opt{{-}{-}dbinfodir}
++    directory with the names db.work.conf, db.submit.conf, or db.admin.conf,
++    based on the functionality requested being process the queue, submit a job,
++    or perform administrative database functions respectively.
++    The default value is the current directory.
++    }
++  \OptItem{\OptArg{{-}{-}dbinfodir}{dbinfodir}}{
++    Directory to look for default database information files when
++    \Opt{{-}{-}dbinfofile} is not specified.
++    }
++  \OptItem{\OptArg{{-}{-}logdir}{logfiledir}}{
++    Directory name to place the Condor user log files generated by the Condor
++    system.
++    The default value is the current directory.
++    }
++  \OptItem{\OptArg{{-}{-}sleepamount}{seconds}}{
++    Amount of time to sleep between each iteration of polling the database
++    system for new work and processing new events in the Condor user logs.
++    The default value is 10 seconds.
++    }
++  \OptItem{\OptArg{{-}{-}maxwork}{numofwork}}{
++    Maximum number of inprogress work in the Condor system.
++    If there is less work in the Condor system, new work will be submitted if
++    available.
++    }
++  \OptItem{\OptArg{{-}{-}maxjobs}{numofjobs}}{
++    Maximum number of incomplete jobs in the Condor system.
++    If there are fewer jobs, new work will be submitted if available.
++    }
++  \OptItem{\OptArg{{-}{-}grabamount}{numofwork}}{
++    Maximum amount of work to pull from the database system to insert into the
++    Condor system per iteration.
++    The default value is 10 work records.
++    }
++
++  \OptItem{\Opt{{-}{-}initdb}}{
++    Create the tables and other associated database objects required by the
++    condor\_dbq system.
++    }
++  \OptItem{\Opt{{-}{-}createlang}}{
++    Causes the plpgsql language to created in the database.
++    }
++  \OptItem{\Opt{{-}{-}revokepublic}}{
++    Revokes the default ability of database users to create new tables in the
++    `public' schema in the database.
++    }
++  \OptItem{\OptArg{{-}{-}createsubmituser}{[dbinfofile]}}{
++    Create a database account that has proper permissions to insert a work
++    submission to the database.
++    The username and paosword for the account is taken from the db information
++    file specified or the default submit db information file is used if none is
++    specified.
++    }
++  \OptItem{\OptArg{{-}{-}createworkuser}{[dbinfofile]}}{
++    Create a database account that has proper permissions to allow condor\_dbq
++    to process the queue.
++    The username and paosword for the account is taken from the db information
++    file specified or the default worker db information file is used if none is
++    specified.
++    }
++  \OptItem{\OptArg{{-}{-}submit}{submitfile}}{
++    Insert a row in the database containing the contents of \Arg{submitfile}.
++    A \Arg{submitfile} value of `-' will read the submit file from standard
++    in.
++    }
++  \OptItem{\Opt{{-}{-}noexecute}}{
++    Do not execute any of the administrative database commands.
++    Just print them out to standard out.
++    }
++
++  \OptItem{\Opt{{-}{-}help}}{
++    Print a help message and exit.
++    }
++
++  \OptItem{\Opt{{-}{-}version}}{
++    Print the version and exit.
++    }
++\end{Options}
++
++
++\Examples
++
++This section will present a complete introduction to using \Condor{dbq.pl}
++including setup of the environment, creation of the database accounts and
++tables, inserting work, and querying results.
++This example assumes the database `condor\_dbq\_db' is already created, and
++accessible on the same host via TCP/IP on the standard port.
++It also assumes that the administrative database account,
++`condor\_dbq\_admin\_user,' exists with the password
++`condor\_dbq\_admin\_password,' and that this account has the ability to create
++new database users and tables in the `condor\_dbq\_db' database.
++The example code is written in the bash shell.
++
++Create a secure directory to store the db information files.
++
++\begin{verbatim}
++mkdir condor_dbq_conf
++chmod 0700 condor_dbq_conf
++\end{verbatim}
++
++Create the database account information files for a PostgreSQL database
++named condor\_dbq\_db:
++
++\begin{verbatim}
++cat > condor_dbq_conf/db.admin.conf <<EOF
++DBI:Pg:database=condor_dbq_db;host=localhost
++condor_dbq_admin_user
++condor_dbq_admin_password
++EOF
++
++cat > condor_dbq_conf/db.submit.conf <<EOF
++DBI:Pg:database=condor_dbq_db;host=localhost
++condor_dbq_submit_user
++condor_dbq_submit_password
++EOF
++
++cat > condor_dbq_conf/db.worker.conf <<EOF
++DBI:Pg:database=condor_dbq_db;host=localhost
++condor_dbq_worker_user
++condor_dbq_worker_password
++EOF
++\end{verbatim}
++
++Create the plpgsql language used by objects created by \Opt{{-}{-}initdb}:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --createlang
++\end{verbatim}
++
++Create the database tables and objects:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --initdb
++\end{verbatim}
++
++Revoke the default ability of database users to create new tables:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --revokepublic
++\end{verbatim}
++
++Create the worker account that \Condor{dbq.pl} will use for its normal
++operation using the default db worker information file for account information:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --createworkuser
++\end{verbatim}
++
++Create the submit account that users can use to insert work into the
++system using the default submit db information file for account information:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --createsubmituser
++\end{verbatim}
++
++Create the directory to store the user logs:
++
++\begin{verbatim}
++mkdir condor_dbq_logs
++chmod 0722 condor_dbq_logs
++\end{verbatim}
++
++Start the system:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --logdir=condor_dbq_logs
++\end{verbatim}
++
++Create a Condor submit file containing a simple job:
++
++\begin{verbatim}
++cat > my.submit <<EOF
++Universe = vanilla
++transfer_executable = false
++notification = never
++output = my.out
++error = my.err
++log = my.log
++Executable = /bin/sh
++Arguments = "-c 'exit 0'"
++Queue
++EOF
++\end{verbatim}
++
++Insert the Condor submit file into the work table:
++
++\begin{verbatim}
++condor_dbq.pl --dbinfodir=condor_dbq_conf --submit=my.submit
++\end{verbatim}
++
++
++\ExitStatus
++
++\Condor{dbq.pl} will exit with a status value of 0 (zero) upon success,
++and it will exit with a non-zero value upon failure.
++
++
++\end{ManPage}
+diff --git a/src/condor_contrib/condor_dbq/condor_dbq_man.pdf b/src/condor_contrib/condor_dbq/condor_dbq_man.pdf
+new file mode 100644
+index 0000000..ce8620d
+--- /dev/null
++++ b/src/condor_contrib/condor_dbq/condor_dbq_man.pdf
+@@ -0,0 +1,658 @@
++%PDF-1.6
%âãÏÓ
++39 0 obj
<</Linearized 1/L 303204/O 42/E 64236/N 8/T 302382/H [ 8176 324]>>
endobj
                
xref
39 394
0000000016 00000 n
++0000008500 00000 n
++0000008672 00000 n
++0000008797 00000 n
++0000009029 00000 n
++0000009098 00000 n
++0000009132 00000 n
++0000009174 00000 n
++0000010396 00000 n
++0000011383 00000 n
++0000012593 00000 n
++0000013699 00000 n
++0000014852 00000 n
++0000016028 00000 n
++0000017188 00000 n
++0000018171 00000 n
++0000018338 00000 n
++0000018420 00000 n
++0000018512 00000 n
++0000018595 00000 n
++0000018700 00000 n
++0000018781 00000 n
++0000018876 00000 n
++0000018963 00000 n
++0000019018 00000 n
++0000019134 00000 n
++0000019233 00000 n
++0000019349 00000 n
++0000019506 00000 n
++0000019595 00000 n
++0000019688 00000 n
++0000019839 00000 n
++0000019983 00000 n
++0000020085 00000 n
++0000020237 00000 n
++0000020343 00000 n
++0000020435 00000 n
++0000020582 00000 n
++0000020700 00000 n
++0000020816 00000 n
++0000020948 00000 n
++0000021037 00000 n
++0000021171 00000 n
++0000021311 00000 n
++0000021451 00000 n
++0000021601 00000 n
++0000021742 00000 n
++0000021867 00000 n
++0000021998 00000 n
++0000022130 00000 n
++0000022224 00000 n
++0000022354 00000 n
++0000022446 00000 n
++0000022604 00000 n
++0000022693 00000 n
++0000022790 00000 n
++0000022925 00000 n
++0000023028 00000 n
++0000023142 00000 n
++0000023300 00000 n
++0000023397 00000 n
++0000023500 00000 n
++0000023656 00000 n
++0000023771 00000 n
++0000023892 00000 n
++0000024040 00000 n
++0000024146 00000 n
++0000024259 00000 n
++0000024438 00000 n
++0000024562 00000 n
++0000024698 00000 n
++0000024842 00000 n
++0000024961 00000 n
++0000025056 00000 n
++0000025208 00000 n
++0000025306 00000 n
++0000025438 00000 n
++0000025579 00000 n
++0000025697 00000 n
++0000025797 00000 n
++0000025940 00000 n
++0000026058 00000 n
++0000026202 00000 n
++0000026354 00000 n
++0000026454 00000 n
++0000026606 00000 n
++0000026725 00000 n
++0000026827 00000 n
++0000026947 00000 n
++0000027125 00000 n
++0000027267 00000 n
++0000027393 00000 n
++0000027523 00000 n
++0000027637 00000 n
++0000027763 00000 n
++0000027891 00000 n
++0000028011 00000 n
++0000028139 00000 n
++0000028251 00000 n
++0000028381 00000 n
++0000028520 00000 n
++0000028642 00000 n
++0000028761 00000 n
++0000028890 00000 n
++0000029018 00000 n
++0000029163 00000 n
++0000029278 00000 n
++0000029402 00000 n
++0000029532 00000 n
++0000029644 00000 n
++0000029756 00000 n
++0000029862 00000 n
++0000029976 00000 n
++0000030081 00000 n
++0000030218 00000 n
++0000030332 00000 n
++0000030445 00000 n
++0000030556 00000 n
++0000030700 00000 n
++0000030799 00000 n
++0000030917 00000 n
++0000031082 00000 n
++0000031191 00000 n
++0000031299 00000 n
++0000031433 00000 n
++0000031551 00000 n
++0000031665 00000 n
++0000031826 00000 n
++0000031949 00000 n
++0000032078 00000 n
++0000032222 00000 n
++0000032353 00000 n
++0000032465 00000 n
++0000032602 00000 n
++0000032715 00000 n
++0000032838 00000 n
++0000032987 00000 n
++0000033114 00000 n
++0000033226 00000 n
++0000033407 00000 n
++0000033513 00000 n
++0000033648 00000 n
++0000033784 00000 n
++0000033893 00000 n
++0000033999 00000 n
++0000034168 00000 n
++0000034280 00000 n
++0000034381 00000 n
++0000034539 00000 n
++0000034651 00000 n
++0000034749 00000 n
++0000034890 00000 n
++0000035011 00000 n
++0000035139 00000 n
++0000035277 00000 n
++0000035380 00000 n
++0000035484 00000 n
++0000035631 00000 n
++0000035778 00000 n
++0000035882 00000 n
++0000036004 00000 n
++0000036148 00000 n
++0000036281 00000 n
++0000036391 00000 n
++0000036548 00000 n
++0000036690 00000 n
++0000036824 00000 n
++0000036969 00000 n
++0000037126 00000 n
++0000037282 00000 n
++0000037429 00000 n
++0000037577 00000 n
++0000037715 00000 n
++0000037877 00000 n
++0000038017 00000 n
++0000038165 00000 n
++0000038310 00000 n
++0000038456 00000 n
++0000038595 00000 n
++0000038734 00000 n
++0000038879 00000 n
++0000039023 00000 n
++0000039163 00000 n
++0000039304 00000 n
++0000039446 00000 n
++0000039587 00000 n
++0000039728 00000 n
++0000039868 00000 n
++0000040006 00000 n
++0000040148 00000 n
++0000040291 00000 n
++0000040432 00000 n
++0000040568 00000 n
++0000040708 00000 n
++0000040845 00000 n
++0000040958 00000 n
++0000041073 00000 n
++0000041229 00000 n
++0000041339 00000 n
++0000041458 00000 n
++0000041597 00000 n
++0000041727 00000 n
++0000041871 00000 n
++0000042001 00000 n
++0000042119 00000 n
++0000042233 00000 n
++0000042354 00000 n
++0000042498 00000 n
++0000042618 00000 n
++0000042739 00000 n
++0000042863 00000 n
++0000043017 00000 n
++0000043145 00000 n
++0000043261 00000 n
++0000043373 00000 n
++0000043481 00000 n
++0000043590 00000 n
++0000043728 00000 n
++0000043841 00000 n
++0000043960 00000 n
++0000044095 00000 n
++0000044229 00000 n
++0000044393 00000 n
++0000044548 00000 n
++0000044687 00000 n
++0000044815 00000 n
++0000044934 00000 n
++0000045054 00000 n
++0000045180 00000 n
++0000045314 00000 n
++0000045459 00000 n
++0000045590 00000 n
++0000045731 00000 n
++0000045866 00000 n
++0000046001 00000 n
++0000046117 00000 n
++0000046253 00000 n
++0000046395 00000 n
++0000046517 00000 n
++0000046660 00000 n
++0000046792 00000 n
++0000046915 00000 n
++0000047018 00000 n
++0000047122 00000 n
++0000047237 00000 n
++0000047393 00000 n
++0000047491 00000 n
++0000047600 00000 n
++0000047736 00000 n
++0000047844 00000 n
++0000047953 00000 n
++0000048107 00000 n
++0000048219 00000 n
++0000048341 00000 n
++0000048497 00000 n
++0000048607 00000 n
++0000048721 00000 n
++0000048839 00000 n
++0000048955 00000 n
++0000049083 00000 n
++0000049209 00000 n
++0000049358 00000 n
++0000049473 00000 n
++0000049599 00000 n
++0000049712 00000 n
++0000049829 00000 n
++0000049944 00000 n
++0000050066 00000 n
++0000050172 00000 n
++0000050275 00000 n
++0000050388 00000 n
++0000050501 00000 n
++0000050614 00000 n
++0000050705 00000 n
++0000050819 00000 n
++0000050937 00000 n
++0000051039 00000 n
++0000051173 00000 n
++0000051281 00000 n
++0000051415 00000 n
++0000051525 00000 n
++0000051666 00000 n
++0000051810 00000 n
++0000051927 00000 n
++0000052045 00000 n
++0000052208 00000 n
++0000052316 00000 n
++0000052420 00000 n
++0000052539 00000 n
++0000052659 00000 n
++0000052776 00000 n
++0000052893 00000 n
++0000053014 00000 n
++0000053137 00000 n
++0000053278 00000 n
++0000053421 00000 n
++0000053558 00000 n
++0000053681 00000 n
++0000053821 00000 n
++0000053914 00000 n
++0000054007 00000 n
++0000054111 00000 n
++0000054255 00000 n
++0000054366 00000 n
++0000054518 00000 n
++0000054682 00000 n
++0000054805 00000 n
++0000054949 00000 n
++0000055100 00000 n
++0000055239 00000 n
++0000055383 00000 n
++0000055519 00000 n
++0000055641 00000 n
++0000055772 00000 n
++0000055890 00000 n
++0000056001 00000 n
++0000056118 00000 n
++0000056223 00000 n
++0000056328 00000 n
++0000056436 00000 n
++0000056546 00000 n
++0000056653 00000 n
++0000056773 00000 n
++0000056889 00000 n
++0000057010 00000 n
++0000057126 00000 n
++0000057246 00000 n
++0000057360 00000 n
++0000057476 00000 n
++0000057599 00000 n
++0000057702 00000 n
++0000057805 00000 n
++0000057912 00000 n
++0000058016 00000 n
++0000058115 00000 n
++0000058217 00000 n
++0000058322 00000 n
++0000058423 00000 n
++0000058526 00000 n
++0000058628 00000 n
++0000058736 00000 n
++0000058844 00000 n
++0000058949 00000 n
++0000059050 00000 n
++0000059155 00000 n
++0000059256 00000 n
++0000059356 00000 n
++0000059461 00000 n
++0000059568 00000 n
++0000059666 00000 n
++0000059775 00000 n
++0000059872 00000 n
++0000059974 00000 n
++0000060079 00000 n
++0000060181 00000 n
++0000060291 00000 n
++0000060394 00000 n
++0000060494 00000 n
++0000060590 00000 n
++0000060689 00000 n
++0000060789 00000 n
++0000060889 00000 n
++0000060986 00000 n
++0000061084 00000 n
++0000061189 00000 n
++0000061290 00000 n
++0000061397 00000 n
++0000061496 00000 n
++0000061598 00000 n
++0000061700 00000 n
++0000061803 00000 n
++0000061906 00000 n
++0000062007 00000 n
++0000062108 00000 n
++0000062218 00000 n
++0000062322 00000 n
++0000062427 00000 n
++0000062533 00000 n
++0000062635 00000 n
++0000062739 00000 n
++0000062844 00000 n
++0000062942 00000 n
++0000063042 00000 n
++0000063147 00000 n
++0000063256 00000 n
++0000063359 00000 n
++0000063491 00000 n
++0000063583 00000 n
++0000063693 00000 n
++0000063807 00000 n
++0000063910 00000 n
++0000064020 00000 n
++0000064131 00000 n
++0000008176 00000 n
++trailer
<</Size 433/Prev 302373/Root 40 0 R/Info 38 0 R/ID[<6F2F6545ACF891F99CB2375770F79DD3><96C4DE4AF4E2484098D79C6703EB75C0>]>>
startxref
0
%%EOF
                  
432 0 obj
<</Length 224/E 266/Filter/FlateDecode/I 282/O 228/S 158/V 244>>stream
++xÚb```f`P˜ÃÀÊÀÀQÈ À€ , at QŽ	@ã…Ù<‹ù×ðë³oc©fèa`Xѵª¢Ž3l燞Î4Q$–;%®«QÖ¼0;{>ÇéHu©ç‡#Õ£ž2bè $ŒF€0º%@ ÎÀ˜óH‹±XD‰›;YB°APSöÌŒ6Á:k·ô,EÇ+6EñæY¬v(³$lc2Ðc= õ‹ƒÇy /Š6Üòó#À~gõ‡ûX™±dȳÌbÿ´Ëlq0Ÿá@€ ‚¨G½
endstream
endobj
40 0 obj
<</PageMode/UseOutlines/ViewerPreferences<<>>/Outlines 62 0 R/Dests 35 0 R/Metadata 37 0 R/AcroForm 41 0 R/Pages 36 0 R/OpenAction[null/Fit]/Type/Catalog>>
endobj
41 0 obj
<</Fields[]/DA(/Helv 0 Tf 0 g )/DR<</Font<</Helv 33 0 R/ZaDb 34 0 R>>/Encoding<</PDFDocEncoding 32 0 R>>>>>>
endobj
42 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents[46 0 R 47 0 R 48 0 R 49 0 R 50 0 R 51 0 R 52 0 R 53 0 R]/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 43 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 44 0 R>>/Type/Page>>
endobj
43 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R/R384 61 0 R>>
endobj
44 0 obj
<</R6167 45 0 R>>
endobj
45 0 obj
<</OPM 1/Type/ExtGState>>
endobj
46 0 obj
<</Length 1152/Filter/FlateDecode>>stream
++H‰´WKo7.zÜ_Áãn‘¥ù’W§A뢒V@I¶,+måز”ý÷á>8«]mÑ pDÉyñ›of÷BI-ýë×÷ÕÅÏ !ˆí¡Râ;üÛVûJç3¢ÿYß‹Ëž³Q‰$pbuWu4žŠRF¬î«wõºiµðꇦõ2Æ”lý±[ÆPß!Ûj¬ô>9÷ëê‡êÕªzSí…íÌ·NF¡mPÒdC !’ã—WÕÅÕOâøôiS]¼ººøžþ»|ý®¾_U¯®Ä›M2¤Ä#bß”å~ŒH6­‘ÉyêÇQ¸k*w&E„æBâæLA'&W·hâ}Ý`˜”­u1ñ¾¤¤Ãú ]n„|,iíkS–½”gytÖðLªP?hƒTÿO&ÐNZf†$ÜCIQcš#1Xð+“M )̓í?Q
++´u&áÛ”ˆ¼²”pQÙˆ¼#N¢b^ß”å¾,ˆÑdxâ]£
).¢£u@†¢h-¢Þâ"¿ùkš‚DYlRSR{uýgÎo|ÞÍÁ»)•y at M“¨c}Kg¤×R§ÐOvrWT]é±H™­y½Óòš+C³^†h¸_Ëz{)Ø8TVˆ1 at Aö‘ÎB}OhIÆèՎÎäaÒm‘nŠ”iØ,j8¢5Ä[€Ä\ø«ìaŒUAŸ0sRŸº| ðãò­òàw
RGônáº!‹˜õa ˆ!/x”)ÅG¢slý²A<Ðix94Ï"½…EˆŽ ÂÙA¦½„ Æý¤ˆXiª	ÝSRoiµ©?•ý›r‹=JÎYPΘüˆ¦¨ þšª	p^»ýMl\®n˜‹…ãäž
ÚÄ鳏Ƚ¥œ·CÒ[mº´38O*Ê(6%^0¬JCäÅWî3ólÿ¶K!¨pFëqRœùl.ø¾\æåFZY“Û-š}Ñ5<g}Ï^ÓVš€2vªué,÷e È‚ž§¡ŠÎÌÆZ›»˜òñ‹ÎÆ¿2$Ýd@/oŠëÏŒy¿dòÜ<€<?Î…DfA&Në¡«ì	D3¿ë¼ô?Œ
++ŸPC	,ƒĄ̊Ã	ˆœÿFX‘f?ü–¦¦š¢Ärèã'MKêYC˜—H×&0R-µøñÙ>sò\C®œÒõgêåA©“¾Ç´}èSä퉔µšA[a½ew˜”¡à©¾ÅžÏG´ƒETºÃ
ëÀw]ŸQÑÌ=Ɓ¾ñnP‰
¦ùÀ=ÐAj?þ”OHŠî_/Ž;~ón°”(ƒÆi9ÏÚÜ+òEŒÍàÃ¥eθ1ßßöOìΘ´ç
++Ë%ä7Çf}>
²-Ç=e²ŒÓé¥#þˆ§Ç@«8rb_CÃDHD.?ôÕê›wõ/ypÆÑðAS¥ƒØOÓ$|(ÂÇQHÞK:Ï­•Ê«ä™t°ë&Ô„\DM½Ýsßwè¨Õ˜‚ù÷Ý@ç'Ÿwâo ð#é
endstream
endobj
47 0 obj
<</Length 918/Filter/FlateDecode>>stream
++H‰Ì—Mo9†‹çWÌqæ0Š(ê‹×tl(°[ØCÑCc×Aºqš:I»?©±GâLÇζM‹Â€-’H=âKÒ¨ëô鬊5`pJÇÚ¡ŽÊÇz¹©ÎΫÓó—õýöá]uúw
ÕéïéëìÏçüsþ[ý¬zq^ÿU}¬`wÎþg¹©ÏÕé+Œ¶&EÞx[/ÖìÖÔ`µB¢dHY
õbS½nVmçTŒDØ\”áÇÝ0†FµQdÍmž¼n5o
ù7‹?’Á@Ò 
Ê
++lt±b¯[¾§ñ÷‹#ÈŨÐQÈ‹»a±­ZPd(v1¢£æªwÁ9ÍMšDжY·@*:Ó|È®žä×eÇ»¶å½Ç8¸¤¥KTDrƒK«|ØŽ¸±ý<».³ÊìÉê}@ÂY†”óÚ>¼ág0†ßœàæyš¨‘™ðäÕû¡#wD{d_Ot5·cû(Ñ OF´pUˆn[LÌ|8£_eÁY·š¸êáhOQû‡
ÚšyíšKéñ€ôÿSc—µ°|-Qxü,Fš8)ÃÙXßSë=»*þöØ\4f›WŽÈl‚U‡d”GWw`žHëw½7díÌx9¼ÍHߖ̵áÉHÖD±9”À¾Ÿ::"ï]Ê`™|qJ˜_f¦’ý›2©õîxhB:=JÆ>ŽºÇ´îpäæ¼Ö‘·™È¿%T>· 
++}”/qÙü3;’)³®oòl`ÓvZ­£ab]tû¹µÊ±Û4ò`Œ˜hdRkÜAl=‹mªè6p­¿‹àö¾,‰i—N=Øý“#˜Yp\"”#ÞQr½v×E»ïg³ãEY;õb’tTÜþ	Å}Y±-Bê½8,iç@êì4mˆLv#϶¹çe辄;)XwÇ'¦’7a+•<êÑ:А‚’aó¬Ñ¸Ûµ,”F9f¸±H1í¤l•,½XTÜ(Ö8ÓpÚèIÙŸÐp²¡dç‡õ›hGùó»Ãô*›¨EÙ¾w¦ã>jÞC£4Ž2<ïâfß?–áÁ)â§<žá—%]o[à&Œý¥L`÷e—hD©kËÝ/‡—˜½œcÅü¸Ëõ7ânÙá4ŠšO©ýá¬æEÔs¡BE¤QÞü6÷ªã—êG¢¯»<^p<(+þüjO™;éû¢TŠÚáÜTöää&ýjýŸ  yï»
endstream
endobj
48 0 obj
<</Length 1140/Filter/FlateDecode>>stream
++H‰ÔWKo7.rœ_¡ãLÑ‘EQ/^¨‹hŠz|°×ëÚMÖvìu›üûRógwI 0à8?RÔê§êè7LF‘¦`ƒS«Ë*9Mž”Q«‹êuýºAí‚­/šÖëD ¾>ï—Áøúº1š¢qÖÖ7EzY¤·Eú¬hx›7ï-Ô›¦BÀTŸŽÆNWc‘¤cÎkô”FÏN›Öiëɤ¼»E²: W-€N‘âè~ÞH˜Æ8jlÇÍbµî½óêûŒvÀPlŠð¬‹)a½›‰ï7ìrÝÎûòýMšŒ«§ÕC†Á“sRQ93†2ËZŒ=Á,mŠ‹b¶O[J±ÏZ@aÈZ^áí$|6­Þ–σ[È:»”ùd?š2—sQRfYd(‰¿œÒ n/3¼{Xæ´8±mÝù´Úò*‘³iˆ¶#ÛîÀìEǁüh¶3Lˆl`ü‘mӍI$¢»bî)Æ/‚†IÇ9Ï¿&h7@·Å9‘Ð÷‹ÒuYvXÛäi ³ÓZ¶.ó€C¢yéÊ8œÜÝÚˆJàZf©5ØŸ¥(j©Ä#˜^ø{?B¶ôrU½ªÞ)4*ÿ±IFÆ6)ç=h—Ôz[ŸTG'¿¨Ýýã¦:ú]Auôcþwüësþ9y¡¾«^ž(ÖSA¯gøYoÕñê0è÷(`n!Cà¼Ó!©Õ–#:¬Í¼|79¯9õšØµXßíÕ¡³¡¶1CíK#øÂxÕ¥›Ò¬ë	2ߍø/{Ó]&{=[x3Ï{JÚaŠ}Þ3_¾AÞÑ[m¿EÞÑéþ?yÿ«	¢ñ°|	‰Þx=9&ð¿ù$-0æäìÓbÖ×øÚ$&XÇ0 
’j1pèO½`–zfZˆ'Œ‡œ6³†eŽ\b§‡¯×M‹Ú¸Œõ{O­ã&œ‹aøì
ùGž"\Èý2ïLvùÚµ!_»^­~®Vßœª#*‡Tíǁ'¹j2GÙ_Èœý\5‹\EÒ‘¹Š‘£pð’•r>'²ÞI,‚ŽÎØÈ 1yLÅ鳸ʅ_IËù¶Œ¦ͺ"ÇÐkE2NÞib 9+Ò]‘
++câ®,Ù<“º˜›\è†F¿Ê÷<ÙŠ™@HÏ—¶–ÂÚd¥ŒmXž×v‹Y	õ²á–¼CéèºÚø8'UÝf)i‹ñ_Œ?ÜÝ-ìóé§G¡~Þ8í¹¬iÖ&M(.wäÒ[ÿÙdîXÇP©r»ïI·|˜^)?°S†Íså
++LçV1D
4à ¿Ýr68.qaôQn¸:¡²BÙ”£þåbP§îåb?Y“ðqË-ðº<¸€ÆOJÄrCŸʉ:|SýOQÒ>© 8•­’c´Az?®¨KÁ»Ç',š¹·p²xs½ÊÝÙz¿ov £P[Þ³ºh!ynT𹼞 Ê°&¶Ù@ÿ¼‹ÞÏF1)o
++|ó
++ë¤Lq!½šÎor~B„§šSõ  ÜO)
endstream
endobj
49 0 obj
<</Length 1036/Filter/FlateDecode>>stream
++H‰¼W]o;åy~Å<f&Mœï×EBº-âñ°l[ZѲti¹—3“;»³€¨*µQÆqbûœcwõ²k¥Ñ®Uíê¼y'¾vF:¯|÷’É´¸èz-½7Ɉ[\¦ ½ºÞÉcßó^”-¯éÐçù;ù,Ž¼‰b×y¬vüžñ´s0N
>÷1‰u^â{½Ï›¤¬Øv:J °â¿üÙHìW÷´»-^Ñzå¥UZœ“íšÞÊŽ±Ý1É«ÊvÖh`Á¾_½lú)ѽ†1Õ‡^öSZæú†.È@v½QV*Ä
++—’
Q\Ñ1´Òbæhwx—KÖòjîÐÔ ¯$6t{Ìçì*×	Ĺz¨î"_SA¾^ƒªŠ{5ãåÄœ¼6Qµ	ÍÀÛvuÙh,§N~B䆮ØRu]¬dÛys7A.ßð|ÕüÛܵFµù§·2¶€Y•[c£–*¶›Ûæô¬99{ÕÞï.š“·­nN^ä_§ÿ<Å?gÏÚ'Íó³ý4zôSþlnÛÓÕB£
^dÂ`ŒEÒà—[Œè|~æzûݼ‰™¬sA|¡ï†’´ø}dÐi¦1ËûšòG”½Y$÷×\¸ w™ƒmÎä·2›¥šÑ‹‘®>?W¥GžJe##×éøx†x>í}¤+g¹Ø§`Ö›8	Vsì\æk–]s^‘óÅBšÉPh´F™qŽ»¥—~¢M*æ"Ö{rá<ªîê”*Ìg
++n‰lû˜6Ù÷ÝDñ# ×&¨ô€ ôÚ$0“Q	èÁ0/‚z‚©…äô¬V¹ð6IcŽ)ÛˆKëeÆ7xUIÜM.{’1¤eRÚ¨ìÄ4ÆÖï‹ÓXñµ¦zWå*à™¹^$ð†Ì\
++Œ83òÍ„k®}*w·ÜÒ3ñ´³Ò×iYHö*ÒŒ’2ë´’&çùÿÙr9#ìvÖ#KÛñq¯Qd耍28S÷” !r®–®qˆnì߈½¾”ô¥a(8hL%à2!©u8^©G ©õ8#½@R†`Öš†˜(EÞ›XâXy)qôd"à Qs”2嘦œdÙhSÏw“é—ƒe¬h^€,WˆLQ§e2POD^êpbšà–ªùiPa>M\4½‰7]¯p at RÑó^Wãhš¼ˆ•U«^˜Ó×KÓØ$5á@€rt~˜šç·\/2ë¦{L5¢åüæ[^!ÐýþÀ‰,ÇËêÇ·³¿±úe 9Î.ÑØ	gÌ´V¡ßL,“s&âwFátÍDŽQaq ^“ÜÊp¨,È/ô¨Ÿâ}ÌÙ[±y”Ù’ÃŒgYj0 ¬ŽZ
endstream
endobj
50 0 obj
<</Length 1083/Filter/FlateDecode>>stream
++H‰´WKoä6.zô¯ðÑbE¤^Ô5ÛšÚb€=,zHf’Mº™dIÿ¾”üíñLöÐ"@âXI}ü>R~ßìÚÎ)¢Ms]?÷Õv¨¢u.4Ÿ¦—­VÑ[Œþ÷ÍOÕùo&Ä:òô¶ÞÜVHÊ@tµ®7»ê}sWü^µ(ïøækÛ•‹¶yÎîœChþj”ñšš§´îù}³o;«":?í7ìê>o2:@ó¸fú4eÛ1¸æ¦ìçøƒrZšÞ&ON™>þðòÓêþ/­WÁDmeRÏ%©ûr¨§âàQk*¶h6Ua4üx7‹e4ª Ð|ß‚Š8V‰úµ5ÊyíƒzÆ{}Ð^â#ðQQ¤"òËþ-?‚î
qá;$RÚÓ7B )g^i¢9–‰<L`G®”óÝ&ÿèâTŠ’_^ñS)ƒQǪ̈´€¬" 
++¯eׄº‘%™”3cÌÿSw€}Ú"¬ øÇB|Á†ÇòöÛFâj4,Ù²T$Ÿ(*`ƒ>¯ZAnÚ'§Ay0‡hd>"²\LŒRý"ïÃÓ¤Ú_OU/…4ÎRNyãÅúKA³xE\ç끠FÁFÉKÓ»i]d5â‚3™2pšÛPlÞ´V9ô¡KÖ»u½tÀÔ¨¤P³]™åÖ)padùËZoÙ­á+ 8z~òÜÅðøù£åŽ
++‚ù7Ëú@YŸ‡%þcë@
++.”šØ&×ÞLˆ áFŽKdÆß7¿¿9Cðé bÓ¶<)zíúXA[Ä“6Û#ŒI˜Å;ÖbïÐ~m …JŒ!E{xPMÈ%‘lK¹…ø„¸wÉ(ÌHsk¥éNÉ WTfìÀ«è¼h¿pôXO̍~NLÑŸ¤'šS6¸—¥O ¢¬ñëO
++–ÓŸ¹®<J#ž)ûJNå±_|,™¤³pÑOµ™25JÇãÊÏõãÎ𚲎4¹,\—N>	wÖîr͘À«Âôx(ëEø»U üTQi&ÀªˆOõ‹5·‰•NÌÊŒÉm‚̃}µ‘”§«µ¼ÿ™œöj îøÞG¤áÔ<ãp>±ÅMP䮹$Ñ&)¡4ؾ&ê—U}/Z#“í¬ i´8RHzX›˜Ã-š´¼E_Dc¡ÞAj‹û¤ ”l
C°áí¦úµú\]§V?ÕÈwx¶¬¹£°V©Þî«‹ËêüòçúùËËMuþ®†êüÇôëâ—7üçò‡ú»êíeÍ~8¿ìgø³Ý×›•Cô6ujºÁ˜ÒõfÏ'*²¼.¹ŸøòX̦õOÇ×ÀH#hÅG&7!Åw &o{£Ë¶£t¹ãN?6
++ÇïNÆñΨ ¸RZuiúW²ô—GîŠß0’ãl=} XPÖýÿ(g3ì+kùÖÿ-=ë Kvì
endstream
endobj
51 0 obj
<</Length 1106/Filter/FlateDecode>>stream
++H‰´WKoÜ6Л~…n‘€jLßW§âEãt‚6»ë؈ױoƒþû%JÉ\;9¼ÅyßÌ輺«•¨ã_§Á×èœM¿Zð¾Þì«Ó³êäì¯úáþ°«NÞײ:yÿ¾}E?gÔ/ª×gõyuWÉAOúÙìëÓUuòNyQ­®W•îÔè(i£!X¯öÕ‡fÛvѨwͧþ)Hiš»éÚ!hc\s›ß_·‚´ƒòãêÏhÏn=XÙ\mÉĺí$X«‚J‚J8Ù<äÇ]¾pßZp*ÝÜL>0ù²Ð·¶SJÕ6¥Ò{«|’Šî6ßÛN€Â[Éo0edWiR¨qTöµ;æ*?Þ仟£c„³Ü‡Ë|ì*C/ФBô§ë¢ëì4•ÊŠÙÝo­c•Ä^­òÑõæ¢%Œ¡	Âó îãÚ)îî®E­è¥)V¸CAn[w6±¦ß[)A9;¦Æ‡±xZ k¾~ë@zÃ# «„ÀÑW´nY>o½H¯¯²øCTJVòˆÒW­ƒ:XîTÆËð,Á[*÷ïQ“…†CŽåg›¢
++8:Hém‘vuæö|5ãœÝ\ ǐÚsùKŽne‰™6U]P%YüQ&££WKò-Ýc,Cuc¥)zÿe:{ÙF¤ 2#õ#3m O˜<L7‡Ú{Ä9ñ)`*Ÿæ¬Ê?çØ’NÌàîU¹£àVVBp˜mó/…$-ËBdgË<£îh-C³"¥€ÁSšó;éh”²3Ñh›qš g¤->žæš²ÃÌ#2…1jo9¤(Yh{¦r¢ÝæÇmI+s`—Oé*j*<>ç:
ã?Ëáo-¥ZI¡ùᆷtò›®˜£@ÃbB^íht|èA¹+²w2äg˜Í£c­‹š¡ñ"ª"v˜ð¬ÓÙÔÂûÌëýÀ%jáq\'.A„5RÓO`£Q Û|ŒŽ®Xä>~?s5q%øDò‚W/K³ésÒ«sñ¶È «|Æ73Ž£r1DÞµw‹Y×÷MɯހÄl>+™ü„eUnÀ]S:ê€Þ9ÔáÑ$ïyóHƒÄÈæï8;-MKe8Ñž
++Ÿª0,4}ø®ùgÉžHÄM‘©GµH{y¤ïYêÖfƵõ¬öÊ4έ¹&?ÓãǤ£[ÅÁÃ2—rQ3ÿŠ“ìºÄ¥´ .bïiÑ#³X°àX\¿[¢…׫ê|±Õ+¤]i«ځø…[½¢uÛ
ê_·Õwˆ´RÖ:I§2„!y©içtÐ~nÕË2ùé8¾•¦ï
ýCÃt@ªN›CÜúfûk¯KÇQ».Ž­ËŒåg7¤ÞAj¦l›æ²^|:<E…Ücr«fÞ±Uoìê9RiTÑ=&´žetà•=òõ6[Ò¤DÚTçWëÿ #›'é
endstream
endobj
52 0 obj
<</Length 1090/Filter/FlateDecode>>stream
++H‰´WÛnÜ6í³¾BZ ¢É^_ˆh‹òäÁñ:¶o.Ž ßRG+m6-j¶i.9×3‡ÇÛ×
8«<b«Ûí®yÛí6= íDìÞoz§bŒ¡û;¯’1îÝöusöFÝ&•<xÛn?4&©bM\mz£¼Ç„ݧéb÷q²¶«›Ÿ¦Í‡
*çÑ {x¹mþl¾´¨[þê­Š­5†£jM´n´Wûæü¢9»ø½}|xºnÎÞ´¦9{Å?ÎÿxA¿.~ki^^´d§1ÅÎðëjßžoW’(gÈ‘U€†)„v»§Œ¾ŽÁuO5öRžäµëö›^« uô¦»Ûh•‚¶ Ý#/½s`†²…$=‚§Â§8–MmzÔVé`º--¤h}w[^Sk,(ã²®yy?ù㎁õ* ÊÝ»º¤­J at YɈ{Þ—täˆ{DP1˜¶7Pb¬u—¥ËÎx¹+<½MŠ (Û |å]§è[Z¸­×f.è,5Þ¤#g¹8&*‹~èQÞ͍sÉZþ|åÕJ“Ù«êA8ÃõQ V”œƒ1ô‡ö2´ÝçY£F_ƒQfþ!—Ù‡¹Qƒ¯K=­lÀ1r[2ˆÔ›õJw‘QS‡éf4ºjH"ÀsSlʇ
++g›·Óýê~•¸“èìæYX^™|«[š»ÒDD—5]X>Ý`)ò»º÷~C0IPÜ֧¬æeÉ&óŸ¹-/O’ŽÒDnž™Ü¨K<Ðäh"·Ý‚Òxù¥²¨d@~‚Ü9MoÂ÷C†,ø»—Ë2á`b<wìÛ´º®ƒ”I[±6w‹A¤K…Î,cVéLPÉEy£0ø#|'–FŽ³üi‚s¾ÃˆôôPÒ¹B>TŒ`"¸H´càh*rL%$¿ 5Î*ÿq°`¸²ã1
++bjŸŸ+? Á¹°®è¹ Œÿƒ ¬ð	² T<ë¨ ˆÆÀŽF…Ã\L
++oÖòü»A!‚qcÑN0ÿÉ*±äŸµhcÈ\õÜ
@g”£ÂÈÔçv!Ä8ö…“Æñ$…¢j³‚Îœôym¦'H<è3ÚéiÏO;ªp8ÏRÚeð?£5W„[K½¿Ðbcû™BLG„Àãڵ̟<‰:ÒC¥Ð¦ÔëÅÆ*–Èn®øf Ë›âs*W	Ñæ¡IF¥èGÙkC\Sv”ÑÒAJx({YøX'¥ÝRRâÜÂÍÌ[5rŒÄÞ^]X˜¿49H‹‡øá¦ÕT£â;ìY׋¥ziUÝÕ¡žx”ñW|
++et*П¦äI;H8ñÛšHeDŽÒ ú÷mZ]¯J¬
++‰ø_i7R.ÆêØ•>#?ÿ
++¨Á”é,* F#›;—£Õ	tö˜fZewí? -{VY
endstream
endobj
53 0 obj
<</Length 914/Filter/FlateDecode>>stream
++H‰´VÉŽ9q̯ȣSšt;á%®Í¢i$¤iTš9 ô‚@Pt7bøû	çæÈ"[ *©Ò²3cyñâ9vO›Þ´„¡íÁ·»«æ…yÕõ>e#˜]lÎÌhnºh9ŸÌu׃œˆæA–™ÿ䣐mÊÙêG¯»ž¬_îž6'Ï1»–-G©Ý½nˆ,„[7ú}Ø‘
ž8šG]ïldŽÌi×£õL)›óº]ì=Þ5çͧ][~â(·X—'F¶.·—ûæô¬99{ÖÞÝ|¾nNþm¡9ù«üþýPgÚ?šÇg­Øi`´3=.÷í鮄œX‡ã;-ä`Ž,ÉÉ~ÄmÆe–ÑFOó9
++.WD¦eή³Ú´’~‰Í“Ðr
++qFXŽoFØA@»¬æÕüɼ@–R]×/«Ë»bIª’2ÿ±R_US*¥»Î	L蘷Ã2:’‹Õ?Å¡MìÍ—Àb
++a•Ólþ]a¢³™²¹íІèb2Ÿ«É‹å›}!ûqò>rWQá]¯ê0°VàS/&·R3µûfq¦<Œa!øM‚{Ÿ,òBp…ö7¸ptAÓbUBåcƒôDÀ–~)é×i̤'iظ"ý€dÎ’s~BJ³¦rú(Ï	¶u“¡ØIŒ3l
++
++U{UÛƒbÞÕq	|.’4ŠàÔӁöòª%Y&fTÔÒõÊD%ûUÝ<h5•Ý'd¢wÖËÓWž¿­¦ öG"¾q¬©
++ù¢.?iMò–)„Y Êæûzò7k*€ÃŒÚÔ¯DSI·3(ƒ!ÛœX!yÐÅÏ3ܯª…­B¶mRËE"U__tPTçðÄý¶‚Ü-c‹”ŽTÙ{ë(ha:qbT1v¢4_Çð#çá'øRî×ä\ŽpŠ¾)/Zr±•)!grT$ؼd†!ÁçÀÐPÒJ«+jÌ;°ËÛ"ŠÉf¤õ”€‰Æ)a
++wš2ÅqJ·ïL§„_×\ÛS	V9ùUsÕæQÑzÝü.n·1ƒaü}ñyr±‚ Qtp¿à_?l+«ª÷"‹NTþ¹J«û큡^ãoW÷mu4òˤcµÉMØ’ Wã(ƒ…Ü…i3	Õ‰jùª^P+ÍÛÏ</d¢ȱNHµêfšjSa§&´z/.,8oÚÿ ë¹j^
endstream
endobj
54 0 obj
<</Differences[2/fi/fl 30/grave 136/circumflex 147/quotedblleft/quotedblright/bullet/endash/emdash/tilde 169/copyright 174/registered]/Type/Encoding>>
endobj
55 0 obj
<</Subtype/Type1/BaseFont/Times-Roman/Encoding 54 0 R/Type/Font>>
endobj
56 0 obj
<</Differences[2/fi/fl 148/quotedblright 150/endash/emdash]/Type/Encoding>>
endobj
57 0 obj
<</Subtype/Type1/BaseFont/Times-Italic/Encoding 56 0 R/Type/Font>>
endobj
58 0 obj
<</Differences[2/fi/fl 147/quotedblleft/quotedblright 150/endash/emdash]/Type/Encoding>>
endobj
59 0 obj
<</Subtype/Type1/BaseFont/Times-Bold/Encoding 58 0 R/Type/Font>>
endobj
60 0 obj
<</Differences[2/fi 147/quotedblleft/quotedblright 151/emdash]/Type/Encoding>>
endobj
61 0 obj
<</Subtype/Type1/BaseFont/Times-BoldItalic/Encoding 60 0 R/Type/Font>>
endobj
62 0 obj
<</First 6
 3 0 R/Count 11/Last 64 0 R>>
endobj
63 0 obj
<</First 424 0 R/Parent 62 0 R/Next 87 0 R/Dest/chapter.1/Count -8/Last 425 0 R/Title(1 Overview)>>
endobj
64 0 obj
<</Parent 62 0 R/Dest/chapter.11/Prev 65 0 R/Title(11 Appendix B: Magic Numbers)>>
endobj
65 0 obj
<</Parent 62 0 R/Next 64 0 R/Dest/chapter.10/Prev 66 0 R/Title(10 Appendix A: ClassAd Attributes)>>
endobj
66 0 obj
<</First 67 0 R/Parent 62 0 R/Next 65 0 R/Dest/chapter.9/Count -58/Last 68 0 R/Prev 69 0 R/Title(9 Command Reference Manual \(man pages\))>>
endobj
67 0 obj
<</Parent 66 0 R/Next 423 0 R/Dest/section*.304/Title(cleanup_release)>>
endobj
68 0 obj
<</Parent 66 0 R/Dest/section*.762/Prev 368 0 R/Title(uniq_pid_undertaker)>>
endobj
69 0 obj
<</First 70 0 R/Parent 62 0 R/Next 66 0 R/Dest/chapter.8/Count -7/Last 71 0 R/Prev 72 0 R/Title(8 Version History and Release Notes)>>
endobj
70 0 obj
<</First 365 0 R/Parent 69 0 R/Next 364 0 R/Dest/section.8.1/Count -3/Last 366 0 R/Title(8.1 Introduction to Condor Version
 s)>>
endobj
71 0 obj
<</Parent 69 0 R/Dest/section.8.7/Prev 360 0 R/Title(8.7 Stable Release Series 7.0)>>
endobj
72 0 obj
<</First 73 0 R/Parent 62 0 R/Next 69 0 R/Dest/chapter.7/Count -7/Last 74 0 R/Prev 75 0 R/Title(7 Frequently Asked Questions \(FAQ\))>>
endobj
73 0 obj
<</Parent 72 0 R/Next 359 0 R/Dest/section.7.1/Title(7.1 Obtaining & Installing Condor)>>
endobj
74 0 obj
<</Parent 72 0 R/Dest/section.7.7/Prev 355 0 R/Title(7.7 Other questions)>>
endobj
75 0 obj
<</First 76 0 R/Parent 62 0 R/Next 72 0 R/Dest/chapter.6/Count -4/Last 77 0 R/Prev 78 0 R/Title(6 Platform-Specific Information)>>
endobj
76 0 obj
<</First 352 0 R/Parent 75 0 R/Next 340 0 R/Dest/section.6.1/Count -3/Last 353 0 R/Title(6.1 Linux)>>
endobj
77 0 obj
<</First 337 0 R/Parent 75 0 R/Dest/section.6.4/Count -2/Last 338 0 R/Prev 339 0 R/Title(6.4 AIX)>>
endobj
78 0 obj
<</First 79 0 R/Parent 62 0 R/Next 75 0 R/Dest/chapter.5/Count -6/Last 80 0 R/Prev 81 0 R/Title(5 Grid Computing)>>
endobj
79 0 obj
<</
 Parent 78 0 R/Next 323 0 R/Dest/section.5.1/Title(5.1 Introduction)>>
endobj
80 0 obj
<</First 314 0 R/Parent 78 0 R/Dest/section.5.6/Count -5/Last 315 0 R/Prev 316 0 R/Title(5.6 The Condor Job Router)>>
endobj
81 0 obj
<</First 82 0 R/Parent 62 0 R/Next 78 0 R/Dest/chapter.4/Count -6/Last 83 0 R/Prev 84 0 R/Title(4 Miscellaneous Concepts)>>
endobj
82 0 obj
<</First 311 0 R/Parent 81 0 R/Next 292 0 R/Dest/section.4.1/Count -3/Last 312 0 R/Title(4.1  Condor's ClassAd Mechanism)>>
endobj
83 0 obj
<</First 281 0 R/Parent 81 0 R/Dest/section.4.6/Count -10/Last 282 0 R/Prev 283 0 R/Title(4.6  Condor Database Queue condor_dbq.pl)>>
endobj
84 0 obj
<</First 85 0 R/Parent 62 0 R/Next 81 0 R/Dest/chapter.3/Count -16/Last 86 0 R/Prev 87 0 R/Title(3 Administrators' Manual)>>
endobj
85 0 obj
<</First 279 0 R/Parent 84 0 R/Next 192 0 R/Dest/section.3.1/Count -2/Last 280 0 R/Title(3.1 Introduction)>>
endobj
86 0 obj
<</First 154 0 R/Parent 84 0 R/Dest/section.3.16/Count -5/Last 155 0 R/Pr
 ev 156 0 R/Title(3.16 Power Management)>>
endobj
87 0 obj
<</First 88 0 R/Parent 62 0 R/Next 84 0 R/Dest/chapter.2/Count -15/Last 89 0 R/Prev 63 0 R/Title(2 Users' Manual)>>
endobj
88 0 obj
<</Parent 87 0 R/Next 125 0 R/Dest/section.2.1/Title(2.1 Welcome to Condor)>>
endobj
89 0 obj
<</First 90 0 R/Parent 87 0 R/Dest/section.2.15/Count -1/Last 90 0 R/Prev 91 0 R/Title(2.15 Potential Problems)>>
endobj
90 0 obj
<</Parent 89 0 R/Dest/subsection.2.15.1/Title(2.15.1 Renaming of argv[0])>>
endobj
91 0 obj
<</First 92 0 R/Parent 87 0 R/Next 89 0 R/Dest/section.2.14/Count -4/Last 93 0 R/Prev 94 0 R/Title(2.14 Special Environment Considerations)>>
endobj
92 0 obj
<</Parent 91 0 R/Next 153 0 R/Dest/subsection.2.14.1/Title(2.14.1 AFS)>>
endobj
93 0 obj
<</Parent 91 0 R/Dest/subsection.2.14.4/Prev 152 0 R/Title(2.14.4  Job Leases)>>
endobj
94 0 obj
<</First 95 0 R/Parent 87 0 R/Next 91 0 R/Dest/section.2.13/Count -5/Last 96 0 R/Prev 97 0 R/Title(2.13 Job Monitor)>>
endobj
95 0 obj
<</P
 arent 94 0 R/Next 151 0 R/Dest/subsection.2.13.1/Title(2.13.1 Transition States)>>
endobj
96 0 obj
<</Parent 94 0 R/Dest/subsection.2.13.5/Prev 149 0 R/Title(2.13.5 Keyboard and Mouse Shortcuts)>>
endobj
97 0 obj
<</First 98 0 R/Parent 87 0 R/Next 94 0 R/Dest/section.2.12/Count -2/Last 99 0 R/Prev 100 0 R/Title(2.12 Time Scheduling for Job Execution)>>
endobj
98 0 obj
<</Parent 97 0 R/Next 99 0 R/Dest/subsection.2.12.1/Title(2.12.1 Job Deferral)>>
endobj
99 0 obj
<</Parent 97 0 R/Dest/subsection.2.12.2/Prev 98 0 R/Title(2.12.2 CronTab Scheduling)>>
endobj
100 0 obj
<</First 101 0 R/Parent 87 0 R/Next 97 0 R/Dest/section.2.11/Count -4/Last 102 0 R/Prev 103 0 R/Title(2.11 Virtual Machine Applications)>>
endobj
101 0 obj
<</Parent 100 0 R/Next 148 0 R/Dest/subsection.2.11.1/Title(2.11.1 The Submit Description File)>>
endobj
102 0 obj
<</Parent 100 0 R/Dest/subsection.2.11.4/Prev 147 0 R/Title(2.11.4 Job Completion in the vm Universe)>>
endobj
103 0 obj
<</First 104 0 R/Parent 8
 7 0 R/Next 100 0 R/Dest/section.2.10/Count -9/Last 105 0 R/Prev 106 0 R/Title(2.10 DAGMan Applications)>>
endobj
104 0 obj
<</Parent 103 0 R/Next 146 0 R/Dest/subsection.2.10.1/Title(2.10.1 DAGMan Terminology)>>
endobj
105 0 obj
<</Parent 103 0 R/Dest/subsection.2.10.9/Prev 140 0 R/Title(2.10.9 Visualizing DAGs with dot)>>
endobj
106 0 obj
<</First 107 0 R/Parent 87 0 R/Next 103 0 R/Dest/section.2.9/Count -4/Last 108 0 R/Prev 109 0 R/Title(2.9 Parallel Applications \(Including MPI Applications\))>>
endobj
107 0 obj
<</Parent 106 0 R/Next 139 0 R/Dest/subsection.2.9.1/Title(2.9.1 Prerequisites to Running Parallel Jobs)>>
endobj
108 0 obj
<</Parent 106 0 R/Dest/subsection.2.9.4/Prev 138 0 R/Title(2.9.4 MPI Applications Within Condor's Parallel Universe)>>
endobj
109 0 obj
<</First 110 0 R/Parent 87 0 R/Next 106 0 R/Dest/section.2.8/Count -3/Last 111 0 R/Prev 112 0 R/Title(2.8 Java Applications)>>
endobj
110 0 obj
<</Parent 109 0 R/Next 137 0 R/Dest/subsection.2.8.1/Title(2.8.1
  A Simple Example Java Application)>>
endobj
111 0 obj
<</Parent 109 0 R/Dest/subsection.2.8.3/Prev 137 0 R/Title(2.8.3 Chirp I/O)>>
endobj
112 0 obj
<</First 113 0 R/Parent 87 0 R/Next 109 0 R/Dest/section.2.7/Count -3/Last 114 0 R/Prev 115 0 R/Title(2.7 Priorities and Preemption)>>
endobj
113 0 obj
<</Parent 112 0 R/Next 136 0 R/Dest/subsection.2.7.1/Title(2.7.1 Job Priority)>>
endobj
114 0 obj
<</Parent 112 0 R/Dest/subsection.2.7.3/Prev 136 0 R/Title(2.7.3  Details About How Condor Jobs Vacate Machines)>>
endobj
115 0 obj
<</First 116 0 R/Parent 87 0 R/Next 112 0 R/Dest/section.2.6/Count -7/Last 117 0 R/Prev 118 0 R/Title(2.6 Managing a Job)>>
endobj
116 0 obj
<</Parent 115 0 R/Next 135 0 R/Dest/subsection.2.6.1/Title(2.6.1 Checking on the progress of jobs)>>
endobj
117 0 obj
<</Parent 115 0 R/Dest/subsection.2.6.7/Prev 131 0 R/Title(2.6.7 Job Completion)>>
endobj
118 0 obj
<</First 119 0 R/Parent 87 0 R/Next 115 0 R/Dest/section.2.5/Count -7/Last 120 0 R/Prev 121 0 R/Ti
 tle(2.5 Submitting a Job)>>
endobj
119 0 obj
<</Parent 118 0 R/Next 130 0 R/Dest/subsection.2.5.1/Title(2.5.1 Submit Description File Commands)>>
endobj
120 0 obj
<</Parent 118 0 R/Dest/subsection.2.5.7/Prev 126 0 R/Title(2.5.7 Heterogeneous Submit: Execution on Differing Architectures)>>
endobj
121 0 obj
<</First 122 0 R/Parent 87 0 R/Next 118 0 R/Dest/section.2.4/Count -1/Last 122 0 R/Prev 123 0 R/Title(2.4 Road-map for Running Jobs)>>
endobj
122 0 obj
<</Parent 121 0 R/Dest/subsection.2.4.1/Title(2.4.1  Choosing a Condor Universe)>>
endobj
123 0 obj
<</First 124 0 R/Parent 87 0 R/Next 121 0 R/Dest/section.2.3/Count -1/Last 124 0 R/Prev 125 0 R/Title(2.3 Matchmaking with ClassAds)>>
endobj
124 0 obj
<</Parent 123 0 R/Dest/subsection.2.3.1/Title(2.3.1 Inspecting Machine ClassAds with condor_status)>>
endobj
125 0 obj
<</Parent 87 0 R/Next 123 0 R/Dest/section.2.2/Prev 88 0 R/Title(2.2 Introduction)>>
endobj
126 0 obj
<</Parent 118 0 R/Next 120 0 R/Dest/subsection.2.5.6/Prev
  127 0 R/Title(2.5.6 Environment Variables)>>
endobj
127 0 obj
<</Parent 118 0 R/Next 126 0 R/Dest/subsection.2.5.5/Prev 128 0 R/Title(2.5.5  Submitting Jobs Without a Shared File System: Condor's File Transfer Mechanism)>>
endobj
128 0 obj
<</Parent 118 0 R/Next 127 0 R/Dest/subsection.2.5.4/Prev 129 0 R/Title(2.5.4  Submitting Jobs Using a Shared File System)>>
endobj
129 0 obj
<</Parent 118 0 R/Next 128 0 R/Dest/subsection.2.5.3/Prev 130 0 R/Title(2.5.3 About Requirements and Rank)>>
endobj
130 0 obj
<</Parent 118 0 R/Next 129 0 R/Dest/subsection.2.5.2/Prev 119 0 R/Title(2.5.2 Sample submit description files)>>
endobj
131 0 obj
<</Parent 115 0 R/Next 117 0 R/Dest/subsection.2.6.6/Prev 132 0 R/Title(2.6.6 In the log file)>>
endobj
132 0 obj
<</Parent 115 0 R/Next 131 0 R/Dest/subsection.2.6.5/Prev 133 0 R/Title(2.6.5 Why is the job not running?)>>
endobj
133 0 obj
<</Parent 115 0 R/Next 132 0 R/Dest/subsection.2.6.4/Prev 134 0 R/Title(2.6.4 Changing the priority of jobs)>>
 
endobj
134 0 obj
<</Parent 115 0 R/Next 133 0 R/Dest/subsection.2.6.3/Prev 135 0 R/Title(2.6.3 Placing a job on hold)>>
endobj
135 0 obj
<</Parent 115 0 R/Next 134 0 R/Dest/subsection.2.6.2/Prev 116 0 R/Title(2.6.2 Removing a job from the queue)>>
endobj
136 0 obj
<</Parent 112 0 R/Next 114 0 R/Dest/subsection.2.7.2/Prev 113 0 R/Title(2.7.2 User priority)>>
endobj
137 0 obj
<</Parent 109 0 R/Next 111 0 R/Dest/subsection.2.8.2/Prev 110 0 R/Title(2.8.2 Less Simple Java Specifications)>>
endobj
138 0 obj
<</Parent 106 0 R/Next 108 0 R/Dest/subsection.2.9.3/Prev 139 0 R/Title(2.9.3 Parallel Jobs with Separate Requirements)>>
endobj
139 0 obj
<</Parent 106 0 R/Next 138 0 R/Dest/subsection.2.9.2/Prev 107 0 R/Title(2.9.2 Parallel Job Submission)>>
endobj
140 0 obj
<</Parent 103 0 R/Next 105 0 R/Dest/subsection.2.10.8/Prev 141 0 R/Title(2.10.8 File Paths in DAGs)>>
endobj
141 0 obj
<</Parent 103 0 R/Next 140 0 R/Dest/subsection.2.10.7/Prev 142 0 R/Title(2.10.7 Job Recovery: The Res
 cue DAG)>>
endobj
142 0 obj
<</Parent 103 0 R/Next 141 0 R/Dest/subsection.2.10.6/Prev 143 0 R/Title(2.10.6 Advanced Features of DAGMan)>>
endobj
143 0 obj
<</Parent 103 0 R/Next 142 0 R/Dest/subsection.2.10.5/Prev 144 0 R/Title(2.10.5 Job Monitoring, Job Failure, and Job Removal)>>
endobj
144 0 obj
<</Parent 103 0 R/Next 143 0 R/Dest/subsection.2.10.4/Prev 145 0 R/Title(2.10.4 Job Submission)>>
endobj
145 0 obj
<</Parent 103 0 R/Next 144 0 R/Dest/subsection.2.10.3/Prev 146 0 R/Title(2.10.3 Submit Description File)>>
endobj
146 0 obj
<</Parent 103 0 R/Next 145 0 R/Dest/subsection.2.10.2/Prev 104 0 R/Title(2.10.2 Input File Describing the DAG)>>
endobj
147 0 obj
<</Parent 100 0 R/Next 102 0 R/Dest/subsection.2.11.3/Prev 148 0 R/Title(2.11.3 Disk Images)>>
endobj
148 0 obj
<</Parent 100 0 R/Next 147 0 R/Dest/subsection.2.11.2/Prev 101 0 R/Title(2.11.2 Checkpoints)>>
endobj
149 0 obj
<</Parent 94 0 R/Next 96 0 R/Dest/subsection.2.13.4/Prev 150 0 R/Title(2.13.4 Zooming)>>
endobj
 
150 0 obj
<</Parent 94 0 R/Next 149 0 R/Dest/subsection.2.13.3/Prev 151 0 R/Title(2.13.3 Selecting Jobs)>>
endobj
151 0 obj
<</Parent 94 0 R/Next 150 0 R/Dest/subsection.2.13.2/Prev 95 0 R/Title(2.13.2 Events)>>
endobj
152 0 obj
<</Parent 91 0 R/Next 93 0 R/Dest/subsection.2.14.3/Prev 153 0 R/Title(2.14.3 Condor Daemons That Do Not Run as root)>>
endobj
153 0 obj
<</Parent 91 0 R/Next 152 0 R/Dest/subsection.2.14.2/Prev 92 0 R/Title(2.14.2 NFS Automounter)>>
endobj
154 0 obj
<</Parent 86 0 R/Next 278 0 R/Dest/subsection.3.16.1/Title(3.16.1 Entering a Low Power State)>>
endobj
155 0 obj
<</Parent 86 0 R/Dest/subsection.3.16.5/Prev 276 0 R/Title(3.16.5 Windows Platform Details)>>
endobj
156 0 obj
<</First 157 0 R/Parent 84 0 R/Next 86 0 R/Dest/section.3.15/Count -1/Last 157 0 R/Prev 158 0 R/Title(3.15 Virtual Machines)>>
endobj
157 0 obj
<</Parent 156 0 R/Dest/subsection.3.15.1/Title(3.15.1 Configuration Parameters)>>
endobj
158 0 obj
<</Parent 84 0 R/Next 156 0 R/Dest/sectio
 n.3.14/Prev 159 0 R/Title(3.14 Java Support Installation)>>
endobj
159 0 obj
<</First 160 0 R/Parent 84 0 R/Next 158 0 R/Dest/section.3.13/Count -12/Last 161 0 R/Prev 162 0 R/Title(3.13 Setting Up for Special Environments)>>
endobj
160 0 obj
<</Parent 159 0 R/Next 275 0 R/Dest/subsection.3.13.1/Title(3.13.1 Using Condor with AFS)>>
endobj
161 0 obj
<</Parent 159 0 R/Dest/subsection.3.13.12/Prev 266 0 R/Title(3.13.12 Concurrency Limits)>>
endobj
162 0 obj
<</First 163 0 R/Parent 84 0 R/Next 159 0 R/Dest/section.3.12/Count -4/Last 164 0 R/Prev 165 0 R/Title(3.12 Quill)>>
endobj
163 0 obj
<</Parent 162 0 R/Next 265 0 R/Dest/subsection.3.12.1/Title(3.12.1 Installation and Configuration)>>
endobj
164 0 obj
<</Parent 162 0 R/Dest/subsection.3.12.4/Prev 264 0 R/Title(3.12.4 Quill and Its RDBMS Schema)>>
endobj
165 0 obj
<</First 166 0 R/Parent 84 0 R/Next 162 0 R/Dest/section.3.11/Count -2/Last 167 0 R/Prev 168 0 R/Title(3.11 The High Availability of Daemons)>>
endobj
166 0 obj
<</
 Parent 165 0 R/Next 167 0 R/Dest/subsection.3.11.1/Title(3.11.1  High Availability of the Job Queue)>>
endobj
167 0 obj
<</Parent 165 0 R/Dest/subsection.3.11.2/Prev 166 0 R/Title(3.11.2  High Availability of the Central Manager)>>
endobj
168 0 obj
<</First 169 0 R/Parent 84 0 R/Next 165 0 R/Dest/section.3.10/Count -3/Last 170 0 R/Prev 171 0 R/Title(3.10 Pool Management)>>
endobj
169 0 obj
<</Parent 168 0 R/Next 263 0 R/Dest/subsection.3.10.1/Title(3.10.1  Shutting Down and Restarting a Condor Pool)>>
endobj
170 0 obj
<</Parent 168 0 R/Dest/subsection.3.10.3/Prev 263 0 R/Title(3.10.3 Using Dynamic Attributes)>>
endobj
171 0 obj
<</First 172 0 R/Parent 84 0 R/Next 168 0 R/Dest/section.3.9/Count -2/Last 173 0 R/Prev 174 0 R/Title(3.9 DaemonCore)>>
endobj
172 0 obj
<</Parent 171 0 R/Next 173 0 R/Dest/subsection.3.9.1/Title(3.9.1 DaemonCore and Unix signals)>>
endobj
173 0 obj
<</Parent 171 0 R/Dest/subsection.3.9.2/Prev 172 0 R/Title(3.9.2 DaemonCore and Command-line Arguments)
 >>
endobj
174 0 obj
<</First 175 0 R/Parent 84 0 R/Next 171 0 R/Dest/section.3.8/Count -4/Last 176 0 R/Prev 177 0 R/Title(3.8  The Checkpoint Server)>>
endobj
175 0 obj
<</Parent 174 0 R/Next 262 0 R/Dest/subsection.3.8.1/Title(3.8.1  Preparing to Install a Checkpoint Server)>>
endobj
176 0 obj
<</Parent 174 0 R/Dest/subsection.3.8.4/Prev 261 0 R/Title(3.8.4  Checkpoint Server Domains)>>
endobj
177 0 obj
<</First 178 0 R/Parent 84 0 R/Next 174 0 R/Dest/section.3.7/Count -5/Last 179 0 R/Prev 180 0 R/Title(3.7 Networking \(includes sections on Port Usage and GCB\))>>
endobj
178 0 obj
<</Parent 177 0 R/Next 260 0 R/Dest/subsection.3.7.1/Title(3.7.1 Port Usage in Condor)>>
endobj
179 0 obj
<</Parent 177 0 R/Dest/subsection.3.7.5/Prev 258 0 R/Title(3.7.5 Using TCP to Send Updates to the condor_collector)>>
endobj
180 0 obj
<</First 181 0 R/Parent 84 0 R/Next 177 0 R/Dest/section.3.6/Count -13/Last 182 0 R/Prev 183 0 R/Title(3.6 Security)>>
endobj
181 0 obj
<</Parent 180 0 R/Next 
 257 0 R/Dest/subsection.3.6.1/Title(3.6.1 Condor's Security Model)>>
endobj
182 0 obj
<</Parent 180 0 R/Dest/subsection.3.6.13/Prev 247 0 R/Title(3.6.13 Support for glexec)>>
endobj
183 0 obj
<</First 184 0 R/Parent 84 0 R/Next 180 0 R/Dest/section.3.5/Count -9/Last 185 0 R/Prev 186 0 R/Title(3.5 Policy Configuration for the condor_startd)>>
endobj
184 0 obj
<</Parent 183 0 R/Next 246 0 R/Dest/subsection.3.5.1/Title(3.5.1  Startd ClassAd Attributes)>>
endobj
185 0 obj
<</Parent 183 0 R/Dest/subsection.3.5.9/Prev 240 0 R/Title(3.5.9 Policy Settings)>>
endobj
186 0 obj
<</First 187 0 R/Parent 84 0 R/Next 183 0 R/Dest/section.3.4/Count -8/Last 188 0 R/Prev 189 0 R/Title(3.4 User Priorities and Negotiation)>>
endobj
187 0 obj
<</Parent 186 0 R/Next 239 0 R/Dest/subsection.3.4.1/Title(3.4.1 Real User Priority \(RUP\))>>
endobj
188 0 obj
<</Parent 186 0 R/Dest/subsection.3.4.8/Prev 234 0 R/Title(3.4.8 Group Quotas)>>
endobj
189 0 obj
<</First 190 0 R/Parent 84 0 R/Next 186 0 R/Des
 t/section.3.3/Count -34/Last 191 0 R/Prev 192 0 R/Title(3.3 Configuration)>>
endobj
190 0 obj
<</Parent 189 0 R/Next 233 0 R/Dest/subsection.3.3.1/Title(3.3.1 Introduction to Configuration Files)>>
endobj
191 0 obj
<</Parent 189 0 R/Dest/subsection.3.3.34/Prev 202 0 R/Title(3.3.34 condor_rooster Configuration File Macros)>>
endobj
192 0 obj
<</First 193 0 R/Parent 84 0 R/Next 189 0 R/Dest/section.3.2/Count -9/Last 194 0 R/Prev 85 0 R/Title(3.2 Installation)>>
endobj
193 0 obj
<</Parent 192 0 R/Next 201 0 R/Dest/subsection.3.2.1/Title(3.2.1  Obtaining Condor)>>
endobj
194 0 obj
<</Parent 192 0 R/Dest/subsection.3.2.9/Prev 195 0 R/Title(3.2.9 Dynamic Deployment)>>
endobj
195 0 obj
<</Parent 192 0 R/Next 194 0 R/Dest/subsection.3.2.8/Prev 196 0 R/Title(3.2.8  Installing the CondorView Client Contrib Module)>>
endobj
196 0 obj
<</Parent 192 0 R/Next 195 0 R/Dest/subsection.3.2.7/Prev 197 0 R/Title(3.2.7 Upgrading - Installing a Newer Version of Condor)>>
endobj
197 0 obj
<</Pare
 nt 192 0 R/Next 196 0 R/Dest/subsection.3.2.6/Prev 198 0 R/Title(3.2.6  RPMs)>>
endobj
198 0 obj
<</Parent 192 0 R/Next 197 0 R/Dest/subsection.3.2.5/Prev 199 0 R/Title(3.2.5 Installation on Windows)>>
endobj
199 0 obj
<</Parent 192 0 R/Next 198 0 R/Dest/subsection.3.2.4/Prev 200 0 R/Title(3.2.4  Condor is installed Under Unix ... now what?)>>
endobj
200 0 obj
<</Parent 192 0 R/Next 199 0 R/Dest/subsection.3.2.3/Prev 201 0 R/Title(3.2.3  Newer Unix Installation Procedure)>>
endobj
201 0 obj
<</Parent 192 0 R/Next 200 0 R/Dest/subsection.3.2.2/Prev 193 0 R/Title(3.2.2 Preparation)>>
endobj
202 0 obj
<</Parent 189 0 R/Next 191 0 R/Dest/subsection.3.3.33/Prev 203 0 R/Title(3.3.33 Configuration File Entries Relating to condor_ssh_to_job)>>
endobj
203 0 obj
<</Parent 189 0 R/Next 202 0 R/Dest/subsection.3.3.32/Prev 204 0 R/Title(3.3.32  Configuration File Macros Affecting APIs)>>
endobj
204 0 obj
<</Parent 189 0 R/Next 203 0 R/Dest/subsection.3.3.31/Prev 205 0 R/Title(3.3.31 MyPr
 oxy Configuration File Macros)>>
endobj
205 0 obj
<</Parent 189 0 R/Next 204 0 R/Dest/subsection.3.3.30/Prev 206 0 R/Title(3.3.30 Configuration File Entries Relating to Quill)>>
endobj
206 0 obj
<</Parent 189 0 R/Next 205 0 R/Dest/subsection.3.3.29/Prev 207 0 R/Title(3.3.29 Configuration File Entries Relating to High Availability)>>
endobj
207 0 obj
<</Parent 189 0 R/Next 206 0 R/Dest/subsection.3.3.28/Prev 208 0 R/Title(3.3.28 Configuration File Entries Relating to Virtual Machines)>>
endobj
208 0 obj
<</Parent 189 0 R/Next 207 0 R/Dest/subsection.3.3.27/Prev 209 0 R/Title(3.3.27 Configuration File Entries Relating to PrivSep)>>
endobj
209 0 obj
<</Parent 189 0 R/Next 208 0 R/Dest/subsection.3.3.26/Prev 210 0 R/Title(3.3.26 Configuration File Entries Relating to Security)>>
endobj
210 0 obj
<</Parent 189 0 R/Next 209 0 R/Dest/subsection.3.3.25/Prev 211 0 R/Title(3.3.25 Configuration File Entries for DAGMan)>>
endobj
211 0 obj
<</Parent 189 0 R/Next 210 0 R/Dest/subsection.3
 .3.24/Prev 212 0 R/Title(3.3.24 Configuration File Entries Relating to Grid Usage and Glidein)>>
endobj
212 0 obj
<</Parent 189 0 R/Next 211 0 R/Dest/subsection.3.3.23/Prev 213 0 R/Title(3.3.23 Grid Monitor Configuration File Entries)>>
endobj
213 0 obj
<</Parent 189 0 R/Next 212 0 R/Dest/subsection.3.3.22/Prev 214 0 R/Title(3.3.22 condor_lease_manager Configuration File Entries)>>
endobj
214 0 obj
<</Parent 189 0 R/Next 213 0 R/Dest/subsection.3.3.21/Prev 215 0 R/Title(3.3.21 condor_job_router Configuration File Entries)>>
endobj
215 0 obj
<</Parent 189 0 R/Next 214 0 R/Dest/subsection.3.3.20/Prev 216 0 R/Title(3.3.20 condor_gridmanager Configuration File Entries)>>
endobj
216 0 obj
<</Parent 189 0 R/Next 215 0 R/Dest/subsection.3.3.19/Prev 217 0 R/Title(3.3.19 condor_credd Configuration File Macros)>>
endobj
217 0 obj
<</Parent 189 0 R/Next 216 0 R/Dest/subsection.3.3.18/Prev 218 0 R/Title(3.3.18 condor_procd Configuration File Macros)>>
endobj
218 0 obj
<</Parent 189 0 R/
 Next 217 0 R/Dest/subsection.3.3.17/Prev 219 0 R/Title(3.3.17 condor_negotiator Configuration File Entries)>>
endobj
219 0 obj
<</Parent 189 0 R/Next 218 0 R/Dest/subsection.3.3.16/Prev 220 0 R/Title(3.3.16 condor_collector Configuration File Entries)>>
endobj
220 0 obj
<</Parent 189 0 R/Next 219 0 R/Dest/subsection.3.3.15/Prev 221 0 R/Title(3.3.15 condor_preen Configuration File Entries)>>
endobj
221 0 obj
<</Parent 189 0 R/Next 220 0 R/Dest/subsection.3.3.14/Prev 222 0 R/Title(3.3.14 condor_submit Configuration File Entries)>>
endobj
222 0 obj
<</Parent 189 0 R/Next 221 0 R/Dest/subsection.3.3.13/Prev 223 0 R/Title(3.3.13 condor_starter Configuration File Entries)>>
endobj
223 0 obj
<</Parent 189 0 R/Next 222 0 R/Dest/subsection.3.3.12/Prev 224 0 R/Title(3.3.12 condor_shadow Configuration File Entries)>>
endobj
224 0 obj
<</Parent 189 0 R/Next 223 0 R/Dest/subsection.3.3.11/Prev 225 0 R/Title(3.3.11 condor_schedd Configuration File Entries)>>
endobj
225 0 obj
<</Parent 189
  0 R/Next 224 0 R/Dest/subsection.3.3.10/Prev 226 0 R/Title(3.3.10 condor_startd Configuration File Macros)>>
endobj
226 0 obj
<</Parent 189 0 R/Next 225 0 R/Dest/subsection.3.3.9/Prev 227 0 R/Title(3.3.9 condor_master Configuration File Macros)>>
endobj
227 0 obj
<</Parent 189 0 R/Next 226 0 R/Dest/subsection.3.3.8/Prev 228 0 R/Title(3.3.8 Checkpoint Server Configuration File Macros)>>
endobj
228 0 obj
<</Parent 189 0 R/Next 227 0 R/Dest/subsection.3.3.7/Prev 229 0 R/Title(3.3.7 Shared File System Configuration File Macros)>>
endobj
229 0 obj
<</Parent 189 0 R/Next 228 0 R/Dest/subsection.3.3.6/Prev 230 0 R/Title(3.3.6 Network-Related Configuration File Entries)>>
endobj
230 0 obj
<</Parent 189 0 R/Next 229 0 R/Dest/subsection.3.3.5/Prev 231 0 R/Title(3.3.5 DaemonCore Configuration File Entries)>>
endobj
231 0 obj
<</Parent 189 0 R/Next 230 0 R/Dest/subsection.3.3.4/Prev 232 0 R/Title(3.3.4 Daemon Logging Configuration File Entries)>>
endobj
232 0 obj
<</Parent 189 0 R/Next
  231 0 R/Dest/subsection.3.3.3/Prev 233 0 R/Title(3.3.3 Condor-wide Configuration File Entries)>>
endobj
233 0 obj
<</Parent 189 0 R/Next 232 0 R/Dest/subsection.3.3.2/Prev 190 0 R/Title(3.3.2 Special Macros)>>
endobj
234 0 obj
<</Parent 186 0 R/Next 188 0 R/Dest/subsection.3.4.7/Prev 235 0 R/Title(3.4.7 Group Accounting)>>
endobj
235 0 obj
<</Parent 186 0 R/Next 234 0 R/Dest/subsection.3.4.6/Prev 236 0 R/Title(3.4.6 The Layperson's Description of the Pie Spin and Pie Slice)>>
endobj
236 0 obj
<</Parent 186 0 R/Next 235 0 R/Dest/subsection.3.4.5/Prev 237 0 R/Title(3.4.5 Negotiation)>>
endobj
237 0 obj
<</Parent 186 0 R/Next 236 0 R/Dest/subsection.3.4.4/Prev 238 0 R/Title(3.4.4 Priority Calculation)>>
endobj
238 0 obj
<</Parent 186 0 R/Next 237 0 R/Dest/subsection.3.4.3/Prev 239 0 R/Title(3.4.3 Priorities in Negotiation and Preemption)>>
endobj
239 0 obj
<</Parent 186 0 R/Next 238 0 R/Dest/subsection.3.4.2/Prev 187 0 R/Title(3.4.2 Effective User Priority \(EUP\))>>
endobj
24
 0 0 obj
<</Parent 183 0 R/Next 185 0 R/Dest/subsection.3.5.8/Prev 241 0 R/Title(3.5.8  State/Activity Transition Expression Summary)>>
endobj
241 0 obj
<</Parent 183 0 R/Next 240 0 R/Dest/subsection.3.5.7/Prev 242 0 R/Title(3.5.7  State and Activity Transitions)>>
endobj
242 0 obj
<</Parent 183 0 R/Next 241 0 R/Dest/subsection.3.5.6/Prev 243 0 R/Title(3.5.6  Machine Activities)>>
endobj
243 0 obj
<</Parent 183 0 R/Next 242 0 R/Dest/subsection.3.5.5/Prev 244 0 R/Title(3.5.5  Machine States)>>
endobj
244 0 obj
<</Parent 183 0 R/Next 243 0 R/Dest/subsection.3.5.4/Prev 245 0 R/Title(3.5.4  The RANK   expression)>>
endobj
245 0 obj
<</Parent 183 0 R/Next 244 0 R/Dest/subsection.3.5.3/Prev 246 0 R/Title(3.5.3 The IS_VALID_CHECKPOINT_PLATFORM   expression)>>
endobj
246 0 obj
<</Parent 183 0 R/Next 245 0 R/Dest/subsection.3.5.2/Prev 184 0 R/Title(3.5.2  The START expression)>>
endobj
247 0 obj
<</Parent 180 0 R/Next 182 0 R/Dest/subsection.3.6.12/Prev 248 0 R/Title(3.6.12 Privilege 
 Separation)>>
endobj
248 0 obj
<</Parent 180 0 R/Next 247 0 R/Dest/subsection.3.6.11/Prev 249 0 R/Title(3.6.11 User Accounts in Condor)>>
endobj
249 0 obj
<</Parent 180 0 R/Next 248 0 R/Dest/subsection.3.6.10/Prev 250 0 R/Title(3.6.10 Using Condor w/ Firewalls, Private Networks, and NATs)>>
endobj
250 0 obj
<</Parent 180 0 R/Next 249 0 R/Dest/subsection.3.6.9/Prev 251 0 R/Title(3.6.9 Host-Based Security in Condor)>>
endobj
251 0 obj
<</Parent 180 0 R/Next 250 0 R/Dest/subsection.3.6.8/Prev 252 0 R/Title(3.6.8 Security Sessions)>>
endobj
252 0 obj
<</Parent 180 0 R/Next 251 0 R/Dest/subsection.3.6.7/Prev 253 0 R/Title(3.6.7 Authorization)>>
endobj
253 0 obj
<</Parent 180 0 R/Next 252 0 R/Dest/subsection.3.6.6/Prev 254 0 R/Title(3.6.6 Integrity)>>
endobj
254 0 obj
<</Parent 180 0 R/Next 253 0 R/Dest/subsection.3.6.5/Prev 255 0 R/Title(3.6.5 Encryption)>>
endobj
255 0 obj
<</Parent 180 0 R/Next 254 0 R/Dest/subsection.3.6.4/Prev 256 0 R/Title(3.6.4 The Unified Map File for Auth
 entication)>>
endobj
256 0 obj
<</Parent 180 0 R/Next 255 0 R/Dest/subsection.3.6.3/Prev 257 0 R/Title(3.6.3 Authentication)>>
endobj
257 0 obj
<</Parent 180 0 R/Next 256 0 R/Dest/subsection.3.6.2/Prev 181 0 R/Title(3.6.2 Security Negotiation)>>
endobj
258 0 obj
<</Parent 177 0 R/Next 179 0 R/Dest/subsection.3.7.4/Prev 259 0 R/Title(3.7.4 Generic Connection Brokering \(GCB\))>>
endobj
259 0 obj
<</Parent 177 0 R/Next 258 0 R/Dest/subsection.3.7.3/Prev 260 0 R/Title(3.7.3 Condor Connection Brokering \(CCB\))>>
endobj
260 0 obj
<</Parent 177 0 R/Next 259 0 R/Dest/subsection.3.7.2/Prev 178 0 R/Title(3.7.2 Configuring Condor for Machines With Multiple Network Interfaces )>>
endobj
261 0 obj
<</Parent 174 0 R/Next 176 0 R/Dest/subsection.3.8.3/Prev 262 0 R/Title(3.8.3  Configuring the Pool to Use Multiple Checkpoint Servers)>>
endobj
262 0 obj
<</Parent 174 0 R/Next 261 0 R/Dest/subsection.3.8.2/Prev 175 0 R/Title(3.8.2  Installing the Checkpoint Server Module)>>
endobj
263 0 obj
 
<</Parent 168 0 R/Next 170 0 R/Dest/subsection.3.10.2/Prev 169 0 R/Title(3.10.2 Reconfiguring a Condor Pool)>>
endobj
264 0 obj
<</Parent 162 0 R/Next 164 0 R/Dest/subsection.3.12.3/Prev 265 0 R/Title(3.12.3 Quill and Security)>>
endobj
265 0 obj
<</Parent 162 0 R/Next 264 0 R/Dest/subsection.3.12.2/Prev 163 0 R/Title(3.12.2 Four Usage Examples)>>
endobj
266 0 obj
<</Parent 159 0 R/Next 161 0 R/Dest/subsection.3.13.11/Prev 267 0 R/Title(3.13.11 Limiting Resource Usage)>>
endobj
267 0 obj
<</Parent 159 0 R/Next 266 0 R/Dest/subsection.3.13.10/Prev 268 0 R/Title(3.13.10 Group ID-Based Process Tracking)>>
endobj
268 0 obj
<</Parent 159 0 R/Next 267 0 R/Dest/subsection.3.13.9/Prev 269 0 R/Title(3.13.9 Configuring Condor for Running Backfill Jobs)>>
endobj
269 0 obj
<</Parent 159 0 R/Next 268 0 R/Dest/subsection.3.13.8/Prev 270 0 R/Title(3.13.8  Condor's Dedicated Scheduling)>>
endobj
270 0 obj
<</Parent 159 0 R/Next 269 0 R/Dest/subsection.3.13.7/Prev 271 0 R/Title(3.13.7  Conf
 iguring The Startd for SMP Machines)>>
endobj
271 0 obj
<</Parent 159 0 R/Next 270 0 R/Dest/subsection.3.13.6/Prev 272 0 R/Title(3.13.6  Running Jobs within VMware or Xen)>>
endobj
272 0 obj
<</Parent 159 0 R/Next 271 0 R/Dest/subsection.3.13.5/Prev 273 0 R/Title(3.13.5  Configuring The CondorView Server)>>
endobj
273 0 obj
<</Parent 159 0 R/Next 272 0 R/Dest/subsection.3.13.4/Prev 274 0 R/Title(3.13.4 The condor_kbdd)>>
endobj
274 0 obj
<</Parent 159 0 R/Next 273 0 R/Dest/subsection.3.13.3/Prev 275 0 R/Title(3.13.3 Full Installation of condor_compile)>>
endobj
275 0 obj
<</Parent 159 0 R/Next 274 0 R/Dest/subsection.3.13.2/Prev 160 0 R/Title(3.13.2 Configuring Condor for Multiple Platforms)>>
endobj
276 0 obj
<</Parent 86 0 R/Next 155 0 R/Dest/subsection.3.16.4/Prev 277 0 R/Title(3.16.4 Linux Platform Details)>>
endobj
277 0 obj
<</Parent 86 0 R/Next 276 0 R/Dest/subsection.3.16.3/Prev 278 0 R/Title(3.16.3 Keeping a ClassAd for a Hibernating Machine)>>
endobj
278 0 obj
<</P
 arent 86 0 R/Next 277 0 R/Dest/subsection.3.16.2/Prev 154 0 R/Title(3.16.2 Returning From a Low Power State)>>
endobj
279 0 obj
<</Parent 85 0 R/Next 280 0 R/Dest/subsection.3.1.1/Title(3.1.1 The Different Roles a Machine Can Play)>>
endobj
280 0 obj
<</Parent 85 0 R/Dest/subsection.3.1.2/Prev 279 0 R/Title(3.1.2 The Condor Daemons)>>
endobj
281 0 obj
<</Parent 83 0 R/Next 310 0 R/Dest/subsection.4.6.1/Title(4.6.1 Client Interactions)>>
endobj
282 0 obj
<</Parent 83 0 R/Dest/subsection.4.6.10/Prev 303 0 R/Title(4.6.10 Checkpoint Library Interface)>>
endobj
283 0 obj
<</First 284 0 R/Parent 81 0 R/Next 83 0 R/Dest/section.4.5/Count -5/Last 285 0 R/Prev 286 0 R/Title(4.5 Application Program Interfaces)>>
endobj
284 0 obj
<</Parent 283 0 R/Next 302 0 R/Dest/subsection.4.5.1/Title(4.5.1  Web Service)>>
endobj
285 0 obj
<</Parent 283 0 R/Dest/subsection.4.5.5/Prev 300 0 R/Title(4.5.5  The Condor Perl Module)>>
endobj
286 0 obj
<</First 287 0 R/Parent 81 0 R/Next 283 0 R/Dest/sect
 ion.4.4/Count -2/Last 288 0 R/Prev 289 0 R/Title(4.4 Job Hooks)>>
endobj
287 0 obj
<</Parent 286 0 R/Next 288 0 R/Dest/subsection.4.4.1/Title(4.4.1  Hooks that Fetch Work)>>
endobj
288 0 obj
<</Parent 286 0 R/Dest/subsection.4.4.2/Prev 287 0 R/Title(4.4.2  Hooks for a Job Router)>>
endobj
289 0 obj
<</First 290 0 R/Parent 81 0 R/Next 286 0 R/Dest/section.4.3/Count -5/Last 291 0 R/Prev 292 0 R/Title(4.3 Computing On Demand \(COD\))>>
endobj
290 0 obj
<</Parent 289 0 R/Next 299 0 R/Dest/subsection.4.3.1/Title(4.3.1  Overview of How COD Works)>>
endobj
291 0 obj
<</Parent 289 0 R/Dest/subsection.4.3.5/Prev 297 0 R/Title(4.3.5 Limitations of COD Support in Condor)>>
endobj
292 0 obj
<</First 293 0 R/Parent 81 0 R/Next 289 0 R/Dest/section.4.2/Count -4/Last 294 0 R/Prev 82 0 R/Title(4.2  Condor's Checkpoint Mechanism)>>
endobj
293 0 obj
<</Parent 292 0 R/Next 296 0 R/Dest/subsection.4.2.1/Title(4.2.1 Standalone Checkpointing)>>
endobj
294 0 obj
<</Parent 292 0 R/Dest/subsection.4
 .2.4/Prev 295 0 R/Title(4.2.4 Checkpoint Library Interface)>>
endobj
295 0 obj
<</Parent 292 0 R/Next 294 0 R/Dest/subsection.4.2.3/Prev 296 0 R/Title(4.2.3 Checkpoint Warnings)>>
endobj
296 0 obj
<</Parent 292 0 R/Next 295 0 R/Dest/subsection.4.2.2/Prev 293 0 R/Title(4.2.2 Checkpoint Safety)>>
endobj
297 0 obj
<</Parent 289 0 R/Next 291 0 R/Dest/subsection.4.3.4/Prev 298 0 R/Title(4.3.4  Managing COD Resource Claims)>>
endobj
298 0 obj
<</Parent 289 0 R/Next 297 0 R/Dest/subsection.4.3.3/Prev 299 0 R/Title(4.3.3  Defining a COD Application)>>
endobj
299 0 obj
<</Parent 289 0 R/Next 298 0 R/Dest/subsection.4.3.2/Prev 290 0 R/Title(4.3.2  Authorizing Users to Create and Manage COD Claims)>>
endobj
300 0 obj
<</Parent 283 0 R/Next 285 0 R/Dest/subsection.4.5.4/Prev 301 0 R/Title(4.5.4  The Condor GAHP)>>
endobj
301 0 obj
<</Parent 283 0 R/Next 300 0 R/Dest/subsection.4.5.3/Prev 302 0 R/Title(4.5.3  The Command Line Interface)>>
endobj
302 0 obj
<</Parent 283 0 R/Next 301 0 R/D
 est/subsection.4.5.2/Prev 284 0 R/Title(4.5.2  The DRMAA API)>>
endobj
303 0 obj
<</Parent 83 0 R/Next 282 0 R/Dest/subsection.4.6.9/Prev 304 0 R/Title(4.6.9 Checkpoint Warnings)>>
endobj
304 0 obj
<</Parent 83 0 R/Next 303 0 R/Dest/subsection.4.6.8/Prev 305 0 R/Title(4.6.8 Checkpoint Safety)>>
endobj
305 0 obj
<</Parent 83 0 R/Next 304 0 R/Dest/subsection.4.6.7/Prev 306 0 R/Title(4.6.7 Standalone Checkpointing)>>
endobj
306 0 obj
<</Parent 83 0 R/Next 305 0 R/Dest/subsection.4.6.6/Prev 307 0 R/Title(4.6.6 Recovery)>>
endobj
307 0 obj
<</Parent 83 0 R/Next 306 0 R/Dest/subsection.4.6.5/Prev 308 0 R/Title(4.6.5 Setup)>>
endobj
308 0 obj
<</Parent 83 0 R/Next 307 0 R/Dest/subsection.4.6.4/Prev 309 0 R/Title(4.6.4 Database Schema)>>
endobj
309 0 obj
<</Parent 83 0 R/Next 308 0 R/Dest/subsection.4.6.3/Prev 310 0 R/Title(4.6.3 Monitoring Work)>>
endobj
310 0 obj
<</Parent 83 0 R/Next 309 0 R/Dest/subsection.4.6.2/Prev 281 0 R/Title(4.6.2 Submitting Work)>>
endobj
311 0 obj
<</Par
 ent 82 0 R/Next 313 0 R/Dest/subsection.4.1.1/Title(4.1.1 Syntax)>>
endobj
312 0 obj
<</Parent 82 0 R/Dest/subsection.4.1.3/Prev 313 0 R/Title(4.1.3 ClassAds in the Condor System)>>
endobj
313 0 obj
<</Parent 82 0 R/Next 312 0 R/Dest/subsection.4.1.2/Prev 311 0 R/Title(4.1.2 Evaluation Semantics)>>
endobj
314 0 obj
<</Parent 80 0 R/Next 336 0 R/Dest/subsection.5.6.1/Title(5.6.1 Routing Mechanism)>>
endobj
315 0 obj
<</Parent 80 0 R/Dest/subsection.5.6.5/Prev 334 0 R/Title(5.6.5 Example: constructing the routing table from ReSS)>>
endobj
316 0 obj
<</Parent 78 0 R/Next 80 0 R/Dest/section.5.5/Prev 317 0 R/Title(5.5 Dynamic Deployment)>>
endobj
317 0 obj
<</First 318 0 R/Parent 78 0 R/Next 316 0 R/Dest/section.5.4/Count -3/Last 319 0 R/Prev 320 0 R/Title(5.4 Glidein)>>
endobj
318 0 obj
<</Parent 317 0 R/Next 333 0 R/Dest/subsection.5.4.1/Title(5.4.1 What condor_glidein Does)>>
endobj
319 0 obj
<</Parent 317 0 R/Dest/subsection.5.4.3/Prev 333 0 R/Title(5.4.3 Running Jobs on the
  Remote Grid Resource After Glidein )>>
endobj
320 0 obj
<</First 321 0 R/Parent 78 0 R/Next 317 0 R/Dest/section.5.3/Count -9/Last 322 0 R/Prev 323 0 R/Title(5.3 The Grid Universe)>>
endobj
321 0 obj
<</Parent 320 0 R/Next 332 0 R/Dest/subsection.5.3.1/Title(5.3.1 Condor-C, The condor Grid Type )>>
endobj
322 0 obj
<</Parent 320 0 R/Dest/subsection.5.3.9/Prev 326 0 R/Title(5.3.9 Matchmaking in the Grid Universe)>>
endobj
323 0 obj
<</First 324 0 R/Parent 78 0 R/Next 320 0 R/Dest/section.5.2/Count -2/Last 325 0 R/Prev 79 0 R/Title(5.2 Connecting Condor Pools with Flocking)>>
endobj
324 0 obj
<</Parent 323 0 R/Next 325 0 R/Dest/subsection.5.2.1/Title(5.2.1 Flocking Configuration)>>
endobj
325 0 obj
<</Parent 323 0 R/Dest/subsection.5.2.2/Prev 324 0 R/Title(5.2.2 Job Considerations)>>
endobj
326 0 obj
<</Parent 320 0 R/Next 322 0 R/Dest/subsection.5.3.8/Prev 327 0 R/Title(5.3.8 The cream Grid Type )>>
endobj
327 0 obj
<</Parent 320 0 R/Next 326 0 R/Dest/subsection.5.3.7/Prev 3
 28 0 R/Title(5.3.7 The amazon Grid Type )>>
endobj
328 0 obj
<</Parent 320 0 R/Next 327 0 R/Dest/subsection.5.3.6/Prev 329 0 R/Title(5.3.6 The lsf Grid Type )>>
endobj
329 0 obj
<</Parent 320 0 R/Next 328 0 R/Dest/subsection.5.3.5/Prev 330 0 R/Title(5.3.5 The pbs Grid Type )>>
endobj
330 0 obj
<</Parent 320 0 R/Next 329 0 R/Dest/subsection.5.3.4/Prev 331 0 R/Title(5.3.4 The unicore Grid Type )>>
endobj
331 0 obj
<</Parent 320 0 R/Next 330 0 R/Dest/subsection.5.3.3/Prev 332 0 R/Title(5.3.3 The nordugrid Grid Type )>>
endobj
332 0 obj
<</Parent 320 0 R/Next 331 0 R/Dest/subsection.5.3.2/Prev 321 0 R/Title(5.3.2 Condor-G, the gt2, gt4, and gt5 Grid Types)>>
endobj
333 0 obj
<</Parent 317 0 R/Next 319 0 R/Dest/subsection.5.4.2/Prev 318 0 R/Title(5.4.2 Configuration Requirements in the Local Pool)>>
endobj
334 0 obj
<</Parent 80 0 R/Next 315 0 R/Dest/subsection.5.6.4/Prev 335 0 R/Title(5.6.4  Routing Table Entry ClassAd Attributes)>>
endobj
335 0 obj
<</Parent 80 0 R/Next 334 0 R
 /Dest/subsection.5.6.3/Prev 336 0 R/Title(5.6.3  An Example Configuration)>>
endobj
336 0 obj
<</Parent 80 0 R/Next 335 0 R/Dest/subsection.5.6.2/Prev 314 0 R/Title(5.6.2 Job Submission with Job Routing Capability)>>
endobj
337 0 obj
<</Parent 77 0 R/Next 338 0 R/Dest/subsection.6.4.1/Title(6.4.1 AIX 5.2L)>>
endobj
338 0 obj
<</Parent 77 0 R/Dest/subsection.6.4.2/Prev 337 0 R/Title(6.4.2 AIX 5.1L)>>
endobj
339 0 obj
<</Parent 75 0 R/Next 77 0 R/Dest/section.6.3/Prev 340 0 R/Title(6.3 Macintosh OS X)>>
endobj
340 0 obj
<</First 341 0 R/Parent 75 0 R/Next 339 0 R/Dest/section.6.2/Count -11/Last 342 0 R/Prev 76 0 R/Title(6.2 Microsoft Windows)>>
endobj
341 0 obj
<</Parent 340 0 R/Next 351 0 R/Dest/subsection.6.2.1/Title(6.2.1 Limitations under Windows)>>
endobj
342 0 obj
<</Parent 340 0 R/Dest/subsection.6.2.11/Prev 343 0 R/Title(6.2.11 Some differences between Condor for Unix -vs- Condor for Windows)>>
endobj
343 0 obj
<</Parent 340 0 R/Next 342 0 R/Dest/subsection.6.2.10/Prev
  344 0 R/Title(6.2.10 Interoperability between Condor for Unix and Condor for Windows)>>
endobj
344 0 obj
<</Parent 340 0 R/Next 343 0 R/Dest/subsection.6.2.9/Prev 345 0 R/Title(6.2.9 Network files and Condor)>>
endobj
345 0 obj
<</Parent 340 0 R/Next 344 0 R/Dest/subsection.6.2.8/Prev 346 0 R/Title(6.2.8 Security Considerations in Condor for Windows)>>
endobj
346 0 obj
<</Parent 340 0 R/Next 345 0 R/Dest/subsection.6.2.7/Prev 347 0 R/Title(6.2.7 Details on how Condor for Windows starts/stops a job)>>
endobj
347 0 obj
<</Parent 340 0 R/Next 346 0 R/Dest/subsection.6.2.6/Prev 348 0 R/Title(6.2.6 Using Windows Scripts as Job Executables)>>
endobj
348 0 obj
<</Parent 340 0 R/Next 347 0 R/Dest/subsection.6.2.5/Prev 349 0 R/Title(6.2.5 Executing Jobs with the User's Profile Loaded)>>
endobj
349 0 obj
<</Parent 340 0 R/Next 348 0 R/Dest/subsection.6.2.4/Prev 350 0 R/Title(6.2.4 Executing Jobs as the Submitting User)>>
endobj
350 0 obj
<</Parent 340 0 R/Next 349 0 R/Dest/subsection
 .6.2.3/Prev 351 0 R/Title(6.2.3 Secure Password Storage)>>
endobj
351 0 obj
<</Parent 340 0 R/Next 350 0 R/Dest/subsection.6.2.2/Prev 341 0 R/Title(6.2.2 Supported Features under Windows)>>
endobj
352 0 obj
<</Parent 76 0 R/Next 354 0 R/Dest/subsection.6.1.1/Title(6.1.1 Linux Kernel-specific Information)>>
endobj
353 0 obj
<</Parent 76 0 R/Dest/subsection.6.1.3/Prev 354 0 R/Title(6.1.3 Red Hat Fedora 1, 2, and 3)>>
endobj
354 0 obj
<</Parent 76 0 R/Next 353 0 R/Dest/subsection.6.1.2/Prev 352 0 R/Title(6.1.2 Red Hat Version 9.x)>>
endobj
355 0 obj
<</Parent 72 0 R/Next 74 0 R/Dest/section.7.6/Prev 356 0 R/Title(7.6 Troubleshooting)>>
endobj
356 0 obj
<</Parent 72 0 R/Next 355 0 R/Dest/section.7.5/Prev 357 0 R/Title(7.5 Grid Computing)>>
endobj
357 0 obj
<</Parent 72 0 R/Next 356 0 R/Dest/section.7.4/Prev 358 0 R/Title(7.4 Condor on Windows)>>
endobj
358 0 obj
<</Parent 72 0 R/Next 357 0 R/Dest/section.7.3/Prev 359 0 R/Title(7.3 Running Condor Jobs)>>
endobj
359 0 obj
<</Paren
 t 72 0 R/Next 358 0 R/Dest/section.7.2/Prev 73 0 R/Title(7.2 Setting up Condor)>>
endobj
360 0 obj
<</Parent 69 0 R/Next 71 0 R/Dest/section.8.6/Prev 361 0 R/Title(8.6 Development Release Series 7.1)>>
endobj
361 0 obj
<</Parent 69 0 R/Next 360 0 R/Dest/section.8.5/Prev 362 0 R/Title(8.5 Stable Release Series 7.2)>>
endobj
362 0 obj
<</Parent 69 0 R/Next 361 0 R/Dest/section.8.4/Prev 363 0 R/Title(8.4 Development Release Series 7.3)>>
endobj
363 0 obj
<</Parent 69 0 R/Next 362 0 R/Dest/section.8.3/Prev 364 0 R/Title(8.3 Stable Release Series 7.4)>>
endobj
364 0 obj
<</Parent 69 0 R/Next 363 0 R/Dest/section.8.2/Prev 70 0 R/Title(8.2 Development Release Series 7.5)>>
endobj
365 0 obj
<</Parent 70 0 R/Next 367 0 R/Dest/subsection.8.1.1/Title(8.1.1  Condor Version Number Scheme)>>
endobj
366 0 obj
<</Parent 70 0 R/Dest/subsection.8.1.3/Prev 367 0 R/Title(8.1.3  The Development Release Series)>>
endobj
367 0 obj
<</Parent 70 0 R/Next 366 0 R/Dest/subsection.8.1.2/Prev 365 0 R/Ti
 tle(8.1.2 The Stable Release Series)>>
endobj
368 0 obj
<</Parent 66 0 R/Next 68 0 R/Dest/section*.754/Prev 369 0 R/Title(uniq_pid_midwife)>>
endobj
369 0 obj
<</Parent 66 0 R/Next 368 0 R/Dest/section*.746/Prev 370 0 R/Title(install_release)>>
endobj
370 0 obj
<</Parent 66 0 R/Next 369 0 R/Dest/section*.738/Prev 371 0 R/Title(filelock_undertaker)>>
endobj
371 0 obj
<</Parent 66 0 R/Next 370 0 R/Dest/section*.730/Prev 372 0 R/Title(filelock_midwife)>>
endobj
372 0 obj
<</Parent 66 0 R/Next 371 0 R/Dest/section*.721/Prev 373 0 R/Title(condor_wait)>>
endobj
373 0 obj
<</Parent 66 0 R/Next 372 0 R/Dest/section*.714/Prev 374 0 R/Title(condor_version)>>
endobj
374 0 obj
<</Parent 66 0 R/Next 373 0 R/Dest/section*.705/Prev 375 0 R/Title(condor_vacate_job)>>
endobj
375 0 obj
<</Parent 66 0 R/Next 374 0 R/Dest/section*.697/Prev 376 0 R/Title(condor_vacate)>>
endobj
376 0 obj
<</Parent 66 0 R/Next 375 0 R/Dest/section*.690/Prev 377 0 R/Title(condor_userprio)>>
endobj
377 0 obj
<</Par
 ent 66 0 R/Next 376 0 R/Dest/section*.682/Prev 378 0 R/Title(condor_userlog)>>
endobj
378 0 obj
<</Parent 66 0 R/Next 377 0 R/Dest/section*.674/Prev 379 0 R/Title(condor_updates_stats)>>
endobj
379 0 obj
<</Parent 66 0 R/Next 378 0 R/Dest/section*.667/Prev 380 0 R/Title(condor_transfer_data)>>
endobj
380 0 obj
<</Parent 66 0 R/Next 379 0 R/Dest/section*.658/Prev 381 0 R/Title(condor_submit_dag)>>
endobj
381 0 obj
<</Parent 66 0 R/Next 380 0 R/Dest/section*.648/Prev 382 0 R/Title(condor_submit)>>
endobj
382 0 obj
<</Parent 66 0 R/Next 381 0 R/Dest/section*.641/Prev 383 0 R/Title(condor_store_cred)>>
endobj
383 0 obj
<</Parent 66 0 R/Next 382 0 R/Dest/section*.632/Prev 384 0 R/Title(condor_status)>>
endobj
384 0 obj
<</Parent 66 0 R/Next 383 0 R/Dest/section*.623/Prev 385 0 R/Title(condor_stats)>>
endobj
385 0 obj
<</Parent 66 0 R/Next 384 0 R/Dest/section*.615/Prev 386 0 R/Title(condor_ssh_to_job)>>
endobj
386 0 obj
<</Parent 66 0 R/Next 385 0 R/Dest/section*.607/Prev 387 0 R
 /Title(condor_set_shutdown)>>
endobj
387 0 obj
<</Parent 66 0 R/Next 386 0 R/Dest/section*.597/Prev 388 0 R/Title(condor_run)>>
endobj
388 0 obj
<</Parent 66 0 R/Next 387 0 R/Dest/section*.590/Prev 389 0 R/Title(condor_router_history)>>
endobj
389 0 obj
<</Parent 66 0 R/Next 388 0 R/Dest/section*.581/Prev 390 0 R/Title(condor_rm)>>
endobj
390 0 obj
<</Parent 66 0 R/Next 389 0 R/Dest/section*.573/Prev 391 0 R/Title(condor_restart)>>
endobj
391 0 obj
<</Parent 66 0 R/Next 390 0 R/Dest/section*.565/Prev 392 0 R/Title(condor_reschedule)>>
endobj
392 0 obj
<</Parent 66 0 R/Next 391 0 R/Dest/section*.556/Prev 393 0 R/Title(condor_release)>>
endobj
393 0 obj
<</Parent 66 0 R/Next 392 0 R/Dest/section*.549/Prev 394 0 R/Title(condor_reconfig_schedd)>>
endobj
394 0 obj
<</Parent 66 0 R/Next 393 0 R/Dest/section*.541/Prev 395 0 R/Title(condor_reconfig)>>
endobj
395 0 obj
<</Parent 66 0 R/Next 394 0 R/Dest/section*.532/Prev 396 0 R/Title(condor_qedit)>>
endobj
396 0 obj
<</Parent 66 0 R
 /Next 395 0 R/Dest/section*.523/Prev 397 0 R/Title(condor_q)>>
endobj
397 0 obj
<</Parent 66 0 R/Next 396 0 R/Dest/section*.516/Prev 398 0 R/Title(condor_prio)>>
endobj
398 0 obj
<</Parent 66 0 R/Next 397 0 R/Dest/section*.509/Prev 399 0 R/Title(condor_preen)>>
endobj
399 0 obj
<</Parent 66 0 R/Next 398 0 R/Dest/section*.502/Prev 400 0 R/Title(condor_power)>>
endobj
400 0 obj
<</Parent 66 0 R/Next 399 0 R/Dest/section*.494/Prev 401 0 R/Title(condor_on)>>
endobj
401 0 obj
<</Parent 66 0 R/Next 400 0 R/Dest/section*.486/Prev 402 0 R/Title(condor_off)>>
endobj
402 0 obj
<</Parent 66 0 R/Next 401 0 R/Dest/section*.479/Prev 403 0 R/Title(condor_master_off)>>
endobj
403 0 obj
<</Parent 66 0 R/Next 402 0 R/Dest/section*.473/Prev 404 0 R/Title(condor_master)>>
endobj
404 0 obj
<</Parent 66 0 R/Next 403 0 R/Dest/section*.466/Prev 405 0 R/Title(condor_load_history)>>
endobj
405 0 obj
<</Parent 66 0 R/Next 404 0 R/Dest/section*.457/Prev 406 0 R/Title(condor_hold)>>
endobj
406 0 obj
<</
 Parent 66 0 R/Next 405 0 R/Dest/section*.449/Prev 407 0 R/Title(condor_history)>>
endobj
407 0 obj
<</Parent 66 0 R/Next 406 0 R/Dest/section*.438/Prev 408 0 R/Title(condor_glidein)>>
endobj
408 0 obj
<</Parent 66 0 R/Next 407 0 R/Dest/section*.429/Prev 409 0 R/Title(condor_findhost)>>
endobj
409 0 obj
<</Parent 66 0 R/Next 408 0 R/Dest/section*.421/Prev 410 0 R/Title(condor_fetchlog)>>
endobj
410 0 obj
<</Parent 66 0 R/Next 409 0 R/Dest/section*.413/Prev 411 0 R/Title(condor_dbq.pl)>>
endobj
411 0 obj
<</Parent 66 0 R/Next 410 0 R/Dest/section*.405/Prev 412 0 R/Title(condor_dagman)>>
endobj
412 0 obj
<</Parent 66 0 R/Next 411 0 R/Dest/section*.399/Prev 413 0 R/Title(condor_convert_history)>>
endobj
413 0 obj
<</Parent 66 0 R/Next 412 0 R/Dest/section*.391/Prev 414 0 R/Title(condor_configure)>>
endobj
414 0 obj
<</Parent 66 0 R/Next 413 0 R/Dest/section*.383/Prev 415 0 R/Title(condor_config_val)>>
endobj
415 0 obj
<</Parent 66 0 R/Next 414 0 R/Dest/section*.376/Prev 416 0 R/
 Title(condor_config_bind)>>
endobj
416 0 obj
<</Parent 66 0 R/Next 415 0 R/Dest/section*.370/Prev 417 0 R/Title(condor_compile)>>
endobj
417 0 obj
<</Parent 66 0 R/Next 416 0 R/Dest/section*.361/Prev 418 0 R/Title(condor_cold_stop)>>
endobj
418 0 obj
<</Parent 66 0 R/Next 417 0 R/Dest/section*.352/Prev 419 0 R/Title(condor_cold_start)>>
endobj
419 0 obj
<</Parent 66 0 R/Next 418 0 R/Dest/section*.343/Prev 420 0 R/Title(condor_cod)>>
endobj
420 0 obj
<</Parent 66 0 R/Next 419 0 R/Dest/section*.335/Prev 421 0 R/Title(condor_chirp)>>
endobj
421 0 obj
<</Parent 66 0 R/Next 420 0 R/Dest/section*.327/Prev 422 0 R/Title(condor_checkpoint)>>
endobj
422 0 obj
<</Parent 66 0 R/Next 421 0 R/Dest/section*.321/Prev 423 0 R/Title(condor_check_userlogs)>>
endobj
423 0 obj
<</Parent 66 0 R/Next 422 0 R/Dest/section*.312/Prev 67 0 R/Title(condor_advertise)>>
endobj
424 0 obj
<</Parent 63 0 R/Next 431 0 R/Dest/section.1.1/Title(1.1 High-Throughput Computing \(HTC\) and its Requirements)>>
end
 obj
425 0 obj
<</Parent 63 0 R/Dest/section.1.8/Prev 426 0 R/Title(1.8 Privacy Notice)>>
endobj
426 0 obj
<</Parent 63 0 R/Next 425 0 R/Dest/section.1.7/Prev 427 0 R/Title(1.7 Contact Information)>>
endobj
427 0 obj
<</Parent 63 0 R/Next 426 0 R/Dest/section.1.6/Prev 428 0 R/Title(1.6 Contributions to Condor)>>
endobj
428 0 obj
<</Parent 63 0 R/Next 427 0 R/Dest/section.1.5/Prev 429 0 R/Title(1.5 Availability)>>
endobj
429 0 obj
<</Parent 63 0 R/Next 428 0 R/Dest/section.1.4/Prev 430 0 R/Title(1.4 Current Limitations)>>
endobj
430 0 obj
<</Parent 63 0 R/Next 429 0 R/Dest/section.1.3/Prev 431 0 R/Title(1.3 Exceptional Features)>>
endobj
431 0 obj
<</Parent 63 0 R/Next 430 0 R/Dest/section.1.2/Prev 424 0 R/Title(1.2 Condor's Power)>>
endobj
1 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 3 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 23 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 2 0 R>>/Type/Page>>
endobj
2 0 obj
<</R6173 45 0 R>>
endobj
3 0 obj
<</Length 5115/Filte
 r/FlateDecode>>stream
++xœí]Ys$·‘ÞØGþŠ~Ûn‡XÂ}øͲÇÚqȶ$SލXï9rhÍÁ
%Í¿w&
++($ª²ºš}Pv„C!±U]U y|™ÈÌ~¿\	ü'ÿ}ñæìóoôzuûÙX}	ÿÞž½?“éžUþóâÍꋸO±Š]tÊ™ÕÅÍYÿ	w…•‹¾S«‹7gÿ·~±9—sVºõ»Í¹íBˆQ¯ßöƒ__׋äûÝYùÿ‹?œ=»8ûæìýJ÷ß›.¬¤ö¢Si ×¹€ÿâùÙçÏÿ¸úøááåÙçÿ³’gŸÿ7þ狯žÿnõgÏž¯¾yôjtì|ŒtEdÆWõãûaEÝæ\uÑXë×÷ÃÅ×/7*:\ç#NùÎËhaÈ‹kâoë
,S9¡×²ñ·M¹ŠïÐÖw&”'|º-Jiת~ýG',¡£ÑŠRRøï‡j߉SRùÂ
++ë)ÃJä9=c%„3®wØgBŠûúñeOKä:¯£0ëËzñcÃZ%Ë­Hö6çZÁÿH_¦ÓùîDtë‡áâ‰êA©õ]}ÓÛÊg·ð–À>2¥…—ëŸ6RvÚ‰€³Æ—Êæk2¿«5Ò÷dQu| ¡
0’Ñëxi§¢¶výªN¥>•É9Ú>˜†Ó¾ó§é¬r2ÂÂ>ƒ}?~×hkà>"´[šÖ.;²_d½÷d2Ìוä"Ù²ÝdÉ½y~N‡,†^ª€TL»è\ž@zÙÝ„wêcé#.F¹.8™‰˜»Á-—±.ó‡}"ß×…}_/âîºØ	U67Çl.ŒÊnî¹=
++œ½:—ªß“¿×É¿c…óªO&;,c'ctí§·]V1"o{ÝÐJ³éWj„òTöî©Jc¾æ5ÝâôP»Å
++t·ò^}ÕheÏÛî*N4-|ºÛ(Û	ð#¹6<Ro|¨{Bxýõ&í@P1>=U%ëŠ( Nì´ñäkÂÁ/êK!…¦öjxŠ¬nÌh­ }/Âÿ±tMe&:k9'\³¼:ç7h}£²NÓç?ns”ðœ* Ûw' è÷ïpú¡ó0ÀoeDhr]?¶r亨AN at x´t ¹ÃúÏ›sÑy!P&'<1’$xðå­gî%ÚâmY‚ž±=
µTíeÈ ³–$D²i`A@×A ç9¼¶Ìη ¡Hò€R0­éðéNr•Ÿ*‘{"ìÕ†ƒýfÔÊûõgHWÙy؃FáðF»s¹3±ã«ñΏDÌä:/Ðjž‰È­Ÿú}wB”‡	‹´óûT楱߉C-}!Ÿ¦·â€Ó÷™®—A€-zÁG
)‰R$"ö1«5Ci:·ú†ç
<ý‘Å;ªµ‰ (-:3ðIô~"ø€â©(¶˜NÉаá?nàƒŒ>Ò[ÉR§û‹7 ׁæi£7ðlÓ<V6kXM/µy'ÎAƒ¾ßÊù<r%¡Ón$(ݧIMcË_²²ù)¢¤S°6‚‚µ&ñï›ñÔ¿01К×쫪’	V ¦àžcŽ;:JÚ"F•¥npU–(âYÙJDѲ¢ÂÑ.SAìÛ¼%Z6féÓ0ê=ÇÝDM±ó߆5ÓÕWƒÈej ¹YS„wQŒþ%§¦*©®ùéö´µRiϼ0ÀØWUöÈóEaxG)ùr#AŒ ×ŸY,^Ý¿‚^e‹^3
€7aÆB…µh+¢IC_"¢Ê-QƒK
++v¯+5ñ’ZÜ>­•að’žõ`Ü Â$öˆz€•…vÄÖö‚ÈU w<(ì"9êî¨èX¼Ìn‰‰äýw¬Ñ93Òt¡aèËHßé`–!f¡CñÒU©3¯I›žo4(Jà×IP£nfvœ†éÅ µÁ­Ÿòð@žæÈú5 Ó
++à4	ÞY’Yl9ƒ›©èCd|&\ÈÕ’iù¯µx9,l?oýÈÇF“Bcü¦‘ìTaP
++ä$ðpöéhâôâç!+cí
++~ý—An¿AáÀÏå«MÂÄJúý´õ"–z¤¾4Òîo‰3ˆèÃÈ%e~II=x7½Ú“
æ%Æb s
++Ëêò~=<ŪhàC0À_]üjÕœ·p.Xiq+ÃÊÂÍø÷ÁJÉ+Áô2â@ _J°²ð1é==ÒŽZÀÙx6|ú_“E«ð¶Dw:†!€YٺՐÛ
@¿×Ö,£ý\Âbàfî ‘„EYOpƒU¢!ãóªŒ\Eo^è.F5è¼k­^¦ÙX
++œìâ*f·ÿT:¸Š´L¸F å5`%;‚aÔš—àæ£:´Í*Gd3:uïÃ`¬õ6éL4SŸ…`×ëš,,¼	(q£ø]eLÎÅœèÚÑÓ·l'üV6ý-áàRŠ3ÅM°°eM½üyÞXM¶9	BÏ dØ
++˜%ì	`<I{Ò¸e	ëHi˪·úý¬nŽøÔÊ"«„Sêf§@r#Ôé|ÄXçYxÕ)¢†ŸÃ† ¿E0xÆ0Q€{\usU±› xM«ˆnî`îÒ3àÓ¬¿«¹½í¤¬šûw8)x…ÔoóŒãÃ
OÂÜP ª–Å!ü°ä©ûí¥¦žÕécíñ[Ç'&£'tæ
@óPåÅ¾aœe¡ÒXP– /-À èÅõÒ’Pî"¡1ÎÛ¢Š¶ë/8Þúr€¸é¢“\”?M¿™9¹åçe”…}¾#ò×÷õj¦Já±0:‰H;&yðG`4kúx+¹çÞ—kKî}¡G«½š8t	uMÔ}¯Ü¨m©‰ ¬òòóM³{¤ôˆå%Ò)8Ô™^w=Ú‡5‹ª:W±	{H;qgàM`<3ÏgÍL2V‰Zø¥¥_˜Ë0lîHëTV`cT]NÒîõŽì1«}¼$ÄÂ5„5:7ÂÑì¢ei7 {-ØÁ ·qóX;/둸ªW}ìHËǝôµ×G.·Ä˜óD+I>QìÌÐé%k“²!ý|ªFËÐà;n,6ÿd6†ÔŸ¦¸ÎBz§#€ƒª£ð§"—#™â‰VS2 ¶m“"ÐeMÎ
#xJôëáÖlŒY1€QîHž·.Í!g¼öŒ³Èëñ¨£˜ØŸïdÚýaò6Ù¢€«‰b,ôBÕ´íô
g a®—'
ß_qß·1ã|è°§£?òww>àï¡ÊÁÑ×í§y/Î%Èœ)Š·	ÒÃLvg&Ï$³
++»é }€Áì®›Î[!Þ³µåøµ=S®dmv½wÉ÷Žäü3op¡û¹Ôˆ|⼄ϡB§S²¬Áxú‘R=gP!ŒLc4.ëíáFŽOçò!=IÉ:Tå°|òbÎ7Pqd™ˆ²ç³HHðSµÍ»è¬‡=Oç4#25ˆaÀ}’`rP	¡›c¬ÏîT>¹x;V¼uÈÈ¢·ìŽžO‘[É®’wµÑƒâf¿®QLNüÈ^âäYï\LÙ3#i擢߀D„h-ž¯#>=6ÓU Ð^8âÅt\"G4>ԝœ+rKä]8ÀO;eü	ÙI;:XU" !wó`€T2øp¯'A醥J„óGzÄZæλ?~˜O[š-€…úõL¦E{ਨ>Š«'ðïIÔ¯¥—#MåèŠÊjo#k2Xƒ™úø=!ñ»aT:þ8𵋪€æ>ŽEë†s<ïÆdçÈ_?ÆÍ;™)š°çf«°d¶n6 ˆ„M–ÿ•ÛmðESµÍ†ÚøÕËÁóe™‡pÙÕ6w”
½S€0O7É•:õSC; O&êåàHAžhXâ³Ñ=RI:öýâù­±Xd¢CЧT3ƒ"„iˆOgW'Š³Yá¯Çâl ?©4a‡@›°;þУ´Vp`’@¯™á[;eÁC—}ÏH.ÔÍL¾•Ë4'&q|œ½I
æ<)<æ
õáýŒ¾#Ÿ¿ªõ_áÀ¾“mæÊ͆-ÉP†óƒ†ä×Û:¿óÞº™ä8Õ£M’q¶T…¹ŒµXÏ'&ÕÞMPùª0¯VÁ@vÔ*ž$
¼íƒ$NÒÏçËÂ" ÇyYŠœ5ÅlW;ìRÒ‰œ×¹×^/¹®V¦SX
öûXe}3šÖ¤
mSUäh«¿zÍSHnK:ü–âPíëÀS'al6{f6§kª«J*©‚JÏF]´i
^Ïî+ìÎbì_„}¤êÆuG£ÀÏ’(ÃâS㘜ÀŠ2f¬í¦œ°Õ¥ú\ð]‚¨d·ÈÙ&/ŒhäƒêT8jÀk6‡$óŸ—Óæ#ia:Óú»<-@™J'
b<V«Ä
(hg[ÃSü¡™‚O<'ô‡ =*e8Ð
++™`N[´^¬™h°› ƒMÆɧ0AZub‚!8Ä'	|¼µMfy/$pîm‚²¿ûoÈìØÙ,yÌQæÄfÉ¢>*w̘%ßaÈaÂ'0Kê ³d@ƽy³”BLžý\š,pü²]*¥´»Ù¥>'ß=Æ.éÐE³KÇsŒ”8-Û&I	F©ýÛ*l•DŠ:½U”Ž+ˆÝù™©.æ©yŸfö^#|kfÏŸµ4V5ÛO’™Óƒ‘Õjf«ŠŸ¾¬ú¬^üÃ+ÈÉüy:HÍ“|Vse~fÕzf
++È
++SäMYS“ªÙº`-±–ÔþÆZbõ­9î¾óÖÔd”®Ù÷ÓXK‡ñåAc©h|Ÿ¨5m˜PëÔŠæ £!3ÖOŸaÏðٍnµg›à'øU®3â€òñäïEÓ¦#Œ#F&[Ê{îK2Àã÷֍|±ÉQȨ¤n2ûù¦+%c͵iÎßµõwE:ÑìÔ¦ûº`õ]Ä”úÓBQeÁ‚P©¨NÛMYš+
Tz£=ý§4éÿ…öÇ4éÊ»£udÛjÒa N™#›ôÓÏ>›t:ûŠ(ÉŒoë:ÞrIH¯3ëx5©sȬz4KÀ»¨–¾zÒDnž$ú³í±„qYtMˆö¸ä˜z‡®m=¬M‚¶j3u°Á©’cWæȈÁ‰3;&[ñˆÁit§lu­æIc¿Q¿ GsvjÜp‡yㆱÔ>Tƒ£ÕNÜ߈=#çr©XosÌE}ÎÓm½uʦ=f8G
++
++5èã-xvøøY“4•úZÈHº?œ¾XUŸ#E¦øãyÆ·oz`_@Ò¿OÓ¤KkeËs+ÿ=NQ$µæh¥'á_zasÛÄTñh—‚!û¢¢؝Øåx$
++Ä™+Ü(.ï­@z!Ûqù‘¹w•C&Áj‚‹’t!ÏsÇõ@Máà |ÕRρÚ7s$N/0‰¸8FuÓ&Ž‹ûK#Rú|X½’I‡ƒÞ¯73Å\Ò«šÊuÌTô>	¥o¾b]í-ìî•p¯›ùŒã´v¾IB¦ã+:UxîRƒ03*®yËÀÔ¼\¥)S•¦Ò*>
Ðת3Y%ÝóÕ Cµù4æÕ21aòZ'¼3çÉ™íWy³ªÌC%Œ0IÚ•T²Œ@ZSµTD¸rœµ–ßúÆÚÎ{•òšó˜Z¨CHÊcI˜}ïm”gpCöt÷-Vß–î¿T–þ˜RÐØÁz¤úëæ;FTæ‹ÏXJM§WJºxâà·í}Méºr¦þwnW$)sèÊûxQoê^eʪ_
9ÈX(5U¾üAíë*>{Ä”\.ôLÃ
++fðï¨vz*q\ƒ¨wÓnóÑSÓíÈš†>9Ó%m9Œ|Tì­NŸðÁÎ7H9nQ	þ‘	1·•Â@'ÿ<6Á@LÉ£žè`)nó<N$3£ÿˆ$S¸ÅWÙô²yº"›l¸G=½rOëÅr•jùŸ®DEJ̪÷f9Ð+’ÁŠÓ¶‘Ë^‘ n0þ0ù¸EO s<ÍœvoçÜ«>l—\QÝm_æRפGnÞ¥í
	4¥<c49Óo{.
++Ö¹õ´KRkÐê0dì[ª9¦²¹Jæˉ8H´‰-´ý§ô`c]ÓVfÛz$ç¨Ù®«šÊÝÏ©E}j'ÍL5èRx/Hx°Ë‡Š»‹â´Í}Š¸»ÐIÚO>å"íuÊÕKpΛ^è„6ÛÁùQ’;h³„]´A:‹šùMŸíê`o̐Û_î­&µìO ¶4>ªzÐaüËIpœàO¯¤HÂ?²ùµf¤Âð…Ö¬UgÅ­Ï (þñ	Å-ÅÃVxú]=´½“‹‘Þ…ô¨õ_¯wa©§è]˜íéRïÂGÄÅöÿ‹}°´˜T3
++Î.—Ç.ÈPΐTž 8+ñ'„zâ{4‘ÅkKYTcµ
Öï7X<ï­cbðAÏÙ„Âß)"ÂiêŽøÒtVºfÚJO›‰MV«nû0®T¦…Ñcc
++ó˜:ë!¤™ÞôÀ=¿RÍÉ™s6ä@^ÇOq!•Êc9»6:EéÞñ¬þˆŽ€Ø &¶Îq8nŸ™=î*¼ŸÃû¸ü~^|!–ƒÛƒˆÍ9ÛnÿÑ ;ãÝ1xlô[}™Çð§ØàýÖ‚ÖƶÝÈcû¶…ϱ´¿ÉðZÊY°Ú”Ä3Žk;¾ˆ?*ê<0'FÆŽÿy8–šnÔ8Ù·(2Æ[#"]Ð
æåA¡‹ä.øæì̈N(
endstream
endobj
4 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 6 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 24 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 5 0 R>>/Type/Page>>
endobj
5 0 obj
<</R6179 45 0 R>>
endobj
6 0 obj
<</Length 5892/Filter/FlateDecode>>stream
++xœÝ]ës7rOù#ÿŠývË”9¼Ë§ØçºèÊ—²:IÕÝUDJ”NI=hYÿ}º1x40ÝåËqR.›ëÙÐèǯ_Øw›y›ÿIÏÞ}õ£.l.>Í›?¿GïŽD¼g“þœ½Ý|}
++÷)?o¬´zsúâhAÀ]~cƒ›äæôíÑ_¶gÇ'b²Ö»½:>1“÷!¨íåòÑ»íy½H¾¬&c‚Ö;ýÓÑ·§G?½Û¨åõ'zò¡Ü<Éø";YÿúÉÑWOþ¼ùøþæùÑWÿµG_ýþçë￁?Oþ°ù§£oŸl~¸õjT˜\tEdÆÏêÇweEÓñ‰œ‚6Æm¯ËÅ7Ç3®e°¸"xИ¼NºÉ‰`à•§çðŠ¿na™ÒÎj+ê+þzœ¯âʸIûü„‹·!ÌV֏aùhgC訕¤”œ]€ñaÊMóÃPRùÂÌ“³ÿQ–xE	*¦ Ä¬·€Š0#éüöc¹ó)wg%íöùÂl
++¾ÿ=¥ÕŠÞ: {eâ}{|¢&4¼ëieW¹/q2z²ÁgÚÉéY:˜¶ð“”Ên?Á×2Ànhòuš‹Už°AüZ˜5™*¹³ÊÅǸ*5;I!`‚"NOj9ä+ß_•‡žÕyÖ‹/ð¢šfmÉãuJ¯ê@dNguNÏñùVǏùéXˆI9cÈ×u™¯±°gNnOz+xæeeVòö(þv¶‘Š8c4Qf”Žšgo2I3áå§u¨†âqNÑ5WŠ//UBÈ4Ò€jq23IhÙc¤ [wžhï3!â¢.ëÇ…¤NÈJRké`--–’+úÆïK)q±ôù§u^qYÆK‰k:‘^€L‰Í	êý,–µ=ö¼r=ِKdÁy²põCVÍÛ›•"*¾E¹¾~UWö±Šèšxøªó4þìè
Wimª‡—å]H%à
"øͱžŒ´".$´?/"žˆà	³}®ßÕ‹Yùx‹SÀz†2[ûƸ"%î3·ºÖfG‹> ü_ybEù8{žm/3ÿ,Ê%‘óC’ =ÍÊf	¸©Ó[í7•ªý8i‰…WáýZJ»ýV ,¡tU‰ñ­`ä¬À‚–KüaŠëòt	TÜ‹`¾_¦5•ÌJ~C~ê¢|\Ä)QèDÈ…F_ì1K ÕÏÀP§Õê¼lä/*<ßH1KDVß°²ô»ccðÍ.2
++X:e%`µ7qÇÃÓ"»øõ¬€Ýpf‰èÓKŽM	gôªÕÑöKœì¦3Céν¢óŒjvnû…Ö?1ø‡Õ“ÐtÔÏeÔë~ü,Q6‚Ú!Í	$‰¸>ï”lTÄp’FiRv
++ã]s4}Å2µQÉƉ±[|§/
´A»
¨È„ÙÓñ	5\Vvv®³²Yl~_nM«Å}'y½ Q“2Á/ËNæ̺îî|7u„ü
˜eDþ³‰¸õñðªñ@Ç€/í½`V²=È€fpï×Q¿kô'ð=ØÆ`ÔöÅÆ‹ è\Øþ;ÒØl|J9ÍT#Ð!™YžŸxD³€03+Š´™VUYì*š(m@[Ê}ò•÷¯ñ€´›T(þÅ'Ɔ½/¢üºªón$R¥ŒEfC˜¸š”7¬ÅMn•/ˆ¾c7–Q›É./"žðõ
ñ12”©.Q¤ï«*&»ÞCÜùo˧ºñõڏ0h|H²ôñrš/îÈñÁÙeœiF(yCtHÞ6Þ4'
+æÆD~÷“+¯Ín °ØìÏbäù¬bíÐu[wâ?ó©E6úºléûc ´Â}"êå,Y*óØé€Ñƒ÷÷ÝHD ·±ÔzhkóJ~È6&oîmD[üžÛ˜iE¶‘ºyC£Ÿ/ƒ—«Mö.ô›=E}ŸMÆÍÚ'­0σIkE,¼¾î|¾NÇY2âc{&XLȝEùax “’å6ìÓ(ê?Y¨Õ¤ˆ)¾§Pszø9…rqk„µTy×7]t‘¨>–D¢è„ccBe· ââv©•ÇOÝ.é&¯Õ:Gk笊Yß°À€ºâ ¼P	˜[Î^!T+—(Ïèý]&¹n ”³Üva›ˆîa‰ðæÌ%)q1I\zxŸäe¿¸( ä0Q*.ä=—ES¾8°`"‹Æ
¤á¿9iáñè<y¢ôþ•<Hâáäã*?¾âxšõßT¦c£uürqGâ|VÚåi¥™äPÂàL¦“cçõöL=”ø´…÷”ø&ªÊ`‡û¯¨[\o>Ð’ý\p˜LñsŽý¥·“Vš²E·¯SNËäk°1	ÊÈÅ´"¦VŒêq]L«£‹iNhq1«+„Dv‰©û3l§%‰@אÈé±÷“W2,²š¼÷øŒ‡¿/!xÞæfPÕæý´
++ t\D|†}LÌËà:XÔ†UxŸ‘<u]ßðÿNt‹¹;0Fšôf‰AÁcg«‘dÍåy}~:xâ3¼,ø'EVϪÙÂKßcAŸÚ ç»GT‰!,|ѤXAž–ü_T!ªÇùœ!üÀì­.4]Ôú%m™¥!ÆUˆ*ç)Rv_ê³fÌšu¥ ¨#1ú*k¡ÖòƒYe!Ú.¸w$¨ê™¨>îuAnçåÚ%ÂÆ<ôFû˜ß{L‰€Ù)Ûö[6]ÿ÷$¢pñáqO`¸O`naIƒ˜Ÿd4ìÜd¦‡™ÁN¨†€P̵*bS~8#¤.„“ D” ¸ý‘óàH¢$‰ÅRU)Thrû8‡Ç¸œlÒßÖ‚_(ܧTUðŒ
++rÀvMÖL9
kñ/‚Û I™ÁçÕ„¤€ÀÀíz;ã¤C!%C±±¹³•„q!ØøT“ëÔ3x*–ÑìÊÊ$P­ŒF_
++P_ÌÄ‚ŸÓ¸È$§A³Ý$ñ‡UbN«6NÐËe·™dYCi[¨ÑM®…%øAž"ÃòÓ]©.|ªü~pjW´Bùþ'òù»šW/¹àFKc@
++ÈR°rHs1K†%5Þ@x™@ìÏܾeuhÜ@Z…¿3ëÅWŸìõ”çGRŒ(Z(˜#`jüæm&3¾¨ë¸äpÓ›ùsòÑÕ¥o0G…2D¯\pÑbbNq¶ÎN3èÂ5D”¸È1/Ö5ÉsH,ß›Ië0†Õn^÷t¨«tæúâ$à•¦k!/ l=%%ZxÆ×Jx…é'ã åÇÉ
++^½xR]üªn$vŽ.F‚CH;L[ùˆ+ÑÓ´­:ÑàˆÁ‚EV/2=iguyˆJ‡eƒÿlyÍI@×I	a/Jthtk©ÒªTÕ4Õ}ä"­J]DÊ2˦åKFìٝBœ¯úÒVs>ãT/¬É‚èiU¤Ã/Ÿ€ôOm¡P5µfˆðP6~‡h$¬>4)ñð›0'`ÓÀ$€ƒ8«\3®A îœ¡fq¸á´^ËòM	ÁÍŠ‰^6ÉZ¦m“o{²~Ðͼ^Põ*c	*ºs‡êÝw#Ä‹]‹M®=c¥š£eTVÿ˜ÍRÁv
++/²“mšvÌSßÑ‹ÐÕ{ñå:5C)ûd+抹?#-*ŒÆu<g™œ7fM&©\©ï%z¤™f4âM¦P‚¢°R\òjT^×™ û×izáV0û!ž²Ï–ÇÕäê3Öcf#²hV•nRg¯íÀ5Äyy; ûÙ>«tžl™EQ˜¥’£˜ÑÝ!÷Õ£³¦§)^Oç/ÒNȈš” ÑÍ
K|OX„Ó–7‚¼^o=Ï{î´k¡’šmŒŒøCÍ2Å@÷tRāì€eGõsyôjz‰pÖs癣	ïZö (OñŽ4­!œdçu=U“Ã8„دê«{“M¡þÚQȏLsÝå¢Íz(ÅËèq#ÍÄ
.„Ի彫Æí€(Ýúk_>õzdj¸Çw6­bduÞh¤šøD‚	Çt<á°ïر^uZ»Št*÷Ïå#kà=Uy×Yø=ý†·µðØ? –]9õ`auÞÂKÕ¦9ùˆ&\>RÝ[Á2)4Fü+E,Zjd	T†C×òsÚ-ÙÅìâCs8ÈõÄÚ´èDqÓi—®Ôñ°Z’µ[ÁEëÛb&üd¼̐°×MX;kmæ`W¨ŸGÏRØr9h#J!Ó]ìP6¹ßåiÿ²;`®¨›A§†ZÓ±~­v)Â/­ØÌõœˆÑâªøÆ—Š^SАZ\½µÑ.mÇãÊgÉwV—…µùµ¯­UXiÿiŸûÒ0Æ1fÅ‚§×…K]5Ô}«‚™hI)/¼[³gœòå¢ûüäA¦l©¯S“ªØwcö8à¼×©oà$òæ:Ú_a@?®ÝÉ&HbŸv)'…iê§Z‡wµb9œÚ/,#»UãÌï ]ÄlØêCŒü ÓrCŦÃÚ‰fˆiÓñ|[ßKD4aše[‡„Æ[N‡\:±ÿƼEöߊÇ1T•ë¿Ì݁ãäP¦Ï°ù
PvÝÁšÔé"KîmNŒŸË¾¬~i|ÌÍ:•™Gϸ)állæ2ïuA{ß°ºò¢¸ÎÑ:nh\õI
++v:ðB{¿“Ö–s†`ݪ?X³_>÷,°ù#
++J5òVÙ¹´QT.c+±ìÂ^" c©˜öí.õÖz*qæ¢D¾] •Äø„™ÙþÏáøDñZ~¤4üw5ÒèOØBÄ«:ì+›gåòMÚƒVš®jš]b‚ÆåæPk-<ÿ„”°¬Ýéà°+xѾ
++aùX‹€	> ©ô¸t]x†0ðQ$r:›}UßE6ãf§©`³ï¯ªaçR/~ÙF°ó¤ØöÆêd/:½°´ºH‚à®89_ö8ökW(ø¹â¡½áïÒoç)ìA˜¶×üª·—É
++òv¦Et±¨{_±ëJãíNv·¶gv¤Îœ&[’·ÿ¬^?cÅ¡ŽÚ&3
++zûîèôŸwä1ZÐÔ%œØ.ìÄr]GZDuõä™·ðɃ[$(ó|Ü™ŽPB9Tä‹:Y¾™ŸXŒ§$^VSØ{€¡²
0¬ûqÝ©‘ÝP%Z\××ÉÄ€”·û”3Á•†«>xžquæÉMÊ!Át¨MŠ°ïwORÒù®sk2°'öµíK
++ÜùôÀÑ¡€úîD‹ÝAJÕ%o—
++Ì÷)ÆÇ	6ˆv˜èP`ÛIÅpWÎßɦýE“§^ỈÒ:Y#=¡Dhz›mküý¤¿)µ%·:-µRôp«XJÄ`3_¿»æÇ—Äb¬.R¸k…ƒ”\§ó†¹ì6„Gw/99møhßîñ=诀±ÖIlW¯"òPàÇœ¶ww@æ‚Ñ$í!)/µƒvNÞ&]½ã`œİåŽ|`‘”æò
«U«¬¸/>Õ³_ƈ-ûQûõºbv³û`;­
++=u­ˆiäyPÏnA|¿-Á­¢£ywìŽÁö ˜â²+(köjC[Å&¼dèH¤àlIpôzŒ¥p\Ò !æ8 at N%ÚIïvPH99P´‘)Êò¹pþVŸ‹¾¿•¾< )/K}  \Ž0ê€ÈÒéÿ¬§/6iüŒœ×7¦ðÊ¡eû¨Ú^˜xêŸj‰¸ÊYí©<Ú)5tÆnľê4Õ·< ÓŒ"Šj}jH·ÖœòqXP…"a`&&eü=Á6o¬gƒJaÈâZªIxÙՋĒU~W/¾Á7y,4Œ\rCÝprA§þðèØZƒuQ~”åkÚ1Éa‘8BN9!”Øs.Ú·VWè¦%Áb>/æ&Ò»‚Çü‰`ÀâáÔ+Z!ŽŒç
UCÕ1K XDÄ"ù«Z33Á¶sQl¬¹1ØU£»HŒÂ»fwH&„Ø{l—³X«,&Šû-¤ïPg¼*©?ìÌŠhî’2#£ïÙ¦²ú©½ëeó"-Tã`kÇvô@GZI/ÝÇÚ)°*X>ýëfw–œG ±Ýæ` ‡Ú­l•¥A…H¦Z¶ÔEºšÎÐ0ÑÝ•’ì«[壤¼ÃðoZO:Û†‰ÄŽ"»ˆŸˆóÌG?I7â¾8‘.þXÊõi—-Zg¦¸·‡ñÞ†t•QN‘È»» 1„iv™zšYÍÕÔ¼$A¯z傆6ȁY\ðò
kcÎú9·:ךÆm9߬ã‰ÑzÃúη9Ú‡ª^>Õè34îx@`«ÐÀŒñ„½Ç:ÕFsx<k­8§B#êóZ¡*¼ƒÏC{h¨•œliÒI
++7M9l&^°
:¸–1η,zÔ Þ³émµ“™w@‘ QTÉ ]pၵ6j®j©—&©]½2©
++ýïE䉱çk“c…Y±ÅÖrÜ-ö!ȐõnÛª£¸˜‘{ÞXVX€ŠGº:qv³k
++ØØ8ö+óeÐñ©¾Ktû<ïèw¡çd	*-1»‡}rVr%÷Wcƒ¨­!` pAº¦Øå†e_ÒÏw̍<–Òþ·C—Th‡Ú³~qY#§•ÅÃ^,­R걘,ügù,‰ç綹‘ß3VAýo\~[ÒËRmÖBôKÚÐøÉ4×´'¥nÏæb»ŒÔäãSÅM)TæF	¬Œ¢‡D®“R<›ŠêîœÓ[Fx£ÞÉsy¥ X: #˜NcƒU=ÀÜÉÏËqÔ1SÜ+Päu©<#¡ù[P±/çêÃôÇʱIqÅl-Ôç%hÍà€&Z0Ë9>¥Œ®A¢ëþËôjïš8{ë}Ãp4ç5J¼kéùwÂsSóÛ叺†Iæ/e"ÄQ}Æ1=›‘¸}i¯¿ÑßéXÿ`CͦîÇ_JA"ªHÊ®3ŠyŒÀøá祂V’aæì/#çE È4ƒ;7ȵ+™WöíoÄ\%”áiåÕmsi©Qxt‚"™W֍ä‡;úã4Ì‚Æë†J üéø[ûâe•‰Vgy¦Ê¨Z;OQÍ÷mvNYD’"áu“ÓUp&‹ïogß„uò”Îë1/£c-ã1+‡YÝ|6a¬êKH¸RaŒúa‹Ö/`½3^˜ø`Yko#U;ÀéT ÍRÈ7€ïj¨
ºÈfm‡R¤µ¶#͸385è~8$ŽNÞìý0Û¬<þ¼™%"xÝ“*ÊðKÖ/èLLÊëË.啈Özœmu6s*?­a‡k¬¹×¢/"›ú5Ï›«YzV~É×võ4È BNÂ8z•¬aü=°î=¶±êaëøB™p÷º—8m/;¶ŒÍ
++ƒ È£&ûhÅ°g‰ÙÚ|p.hméˆÏ	߇IZ†pËë×y)b¡s¥äŠé{
v¦³bÄ™Aã9Ó†ẫ80ØK}úͳD×bﮩ f÷.án%rÝw×±ºÆÝ‚¦ƒ[ðÊÕçÿòŽ
ð‹ƒkìèGtò|Ö°Rqñ¹öÔbÜùu·¢ücP~ËI'þàÚ•R	çVŸ‘ºÜ…ÖŸh*(›ÔT~¦ð3NV[u=ïÛ“ªõ4[\·ûç==VÎÛ‡è\n“z6‰ÅŸö4V†ïíý*á?AÌ\”—A$ieä¼W®Õ^À­é/bõ\ç‘;rÙEƒÀ#–¦º3J~Äp¦X0º ÂYì2ùÔ„(\ðÃÑÿ ™ÑRó
endstream
endobj
7 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 9 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 25 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 8 0 R>>/Type/Page>>
endobj
8 0 obj
<</R6185 45 0 R>>
endobj
9 0 obj
<</Length 5767/Filter/FlateDecode>>stream
++xœÕ][s»qNù‘¿b¹)ïœÁÈ[ŽíJ”Š+9.–ó`ûA%JçPwʉþ}·AhÌ,É¡rR.[ëå®}ùúëöÓažØaöÿIÿ¾|wñß4³êpóåb>üü÷æâÓÏÒ?/ß~¼‚焝nršky¸z}[`ð”=hg&~¸zwñ—Ë—Ç›´VL_~8žÔd­sâò}ühÍåuùýýóQLJ9)ÿvõo¸ºøéâÓAÄîOr²&Ì<ñБž´õÿñÙÅÏþx¸ûüõÕÅÿu`?ü«ÿŸÿówðϳßþáâÏ?Ý{6ÂMÆ9<#4âåã§eFÓñÄ''•2——/o34.¹Ó~FНq¸;n&Ãœ‚.¯®¡‹¿^aš\Ïâ’•.þzÌßú6„2“´ù
sŒ©KQ>Îñ£žZG)8^ÉÙ8h&(Ì4ï²’õÔ*¹P³ï+,ãÕñ$&—oÊ_-â’Öɲª13YãDžõiY¦ò		Üç#›'ÉGÍ^>/Ý-/¡¿ÿ÷‘±Ih'ky\þþË‘MN°Y^~]>}ÉâŠúÜM¥’0£&.ËSù‹oBÏ:kDØ¿‹ü¼
ò#fÐî¼._~X¾üM#sáÏiX¦ò·0VË9)ˆÒLðÔ"ˆ¥ÙeTw¡]¥8ÃÃ*Â 9ç“–:o†K¨'#Ü,ñ`žÇZXÜê«òí߬”
++Çì§Y¡/ºôíêÑ/Ëb¿*~]žü’—¶“ƒ8Í°³weÖoÚæE”+ma$/ɹúr23Þâ<ÍÒPÂbÇ¡ŠE†
ãÖÏß¿¯]z=<ùmùHÊsnÙÙ—e4JÅ=ð9g`˜¥ÑÑ0+&¼yz2Ãv3¯LJ§9áã§2§dšýÆ#y¾]‡T‰“÷5¾«ãq퐤ÁÒpË'«y6öµ‹b/gîµ5[›Ê°ä?¿ƒ–”ž´*´ºòª`ȇÎ& sš¨-99öIå­ï ,ø%ôZ‡W”²Vb½ˆýÛjjéI>P€gÌf;/”JÊ’ûâ°ƒZèm½ËCyO©rš*ÈdhSIOŽGý¾têÕöÒ‚1ù¸nÊH’;˜-2peH×iû­‚íõÒÕ˜f£{ûé͇
dŒ6È’ú6 =¬šRXdTÐêíÔ8ë×brïYîav¸ø-Ê–¢Þ·b³Ø%¿À’%iW®,êÌ‹»äaªÎÞtÒýúu=å…]”°†aaL?Âð÷mÍ«µE-699$ìÂr	MÀ.ýfæits°ñô6m­ïõUZEþ°x¾ßúµ3%y/eÌÑjEoàMZ¾ZÅ‹hf]Çt¿Ìcz}4Þ>‡ÅIã-6gI9F'eü´»<px±2k¡k°ª…Q±R¤bÿŸø9ÝB€´ºe!^”Î mQ„ʏ析[›2akýXŒuQP¸fIüÌ,£
âW½ÿÚï4U¨öŸöÿ¾
ÁU-”_°ÿ?åu>ÁR.7q¹!îÜÙÊø#%÷.…éiv|:4öMºI¨J¥_vEí@¿vªChŽ¹íeˆê;4ö‘¤·GÀ¯³†·ÿNû
++¤‡p…K¯‘½š!(|WiA”ƒ49õ-¨¼ Nû°—ÿC»¥ì; ЈüM2BU¨?j&ì\ñ´'‹¦™UÔÏ"T¾ltî3Ï~hº$ŸÔ¶º§›Õ0¢5ghw¼9Vðˆ²
ÐÇàÃw!M‹ƒãÜâÿÐlø]u‚»EÀ)¯ÿâF‘Ì#mí¤¦q‰HjŠ}EªérKû‹T·Î;î«íÑA6'ic&½ó‹ª/8¦^ÈS•Gé€9
6Ò.\.ŸÅáêß/®þq›Å¨—ÇYÖ‹Úý]±Á”É…&_úFî)z)Z3ï$Ø*0ÁûØq€÷Dzɷ§OwØÅñ[EÓ
++…ŒC0‰ùÒu¡-Êœ6‚jâ \T7“iÉNät£Jk5©…7!µ²B=iH-x1'}Gž	ÄdgÄ9uDMrçÔ îR¸…ºôm80aÐÜ8VŠ£Ô‰Ú œBðvA—’à
++Æ^^Á.´A—Ñ–™BEXGººÃuHÀÀƒMdv– bh –dÐCfôm§˜QóS) ¾Y«÷ÁHB€”
++>0^ÕhOB¼„z«·$`b æ…‚ÿ7Û}
Y³^ûX²Ü> ¡!Rò~êKX’v- kH„)&Æ0«1PtÀ€ÏÇï £ð3	‹^6«ƒ“¢² üš;pÿY÷-˜ßZ÷êkùkVÓ´æu´Oä!\à«Hçÿ‰l õsí[ ÚÉš4nþÉc \èèÁ#0‡†?X÷Àó@|aåXã"úç°U1b˜Žß >QŒÙD?žzàrýøiY½“lÂ’s;1>P^*"ǍvÆ3ˆgQšI-šü~NúºSÞŠÅË¢´î·Ÿ¹Í@éR¬B.öÜ䢁0lãëðeÑà74K°dcÅ™õi‡!›Ù³O½à6‘8 Š)@›‰Døc½mžGQ¼¬dY	´“E,;“ÊRa3÷¬™¤ûm}Ò:³˜ûŸŽ÷
++ÿœÄiéÌ0íá‡EgV7Bõp'´(E^ž"úË6Á¬›|}#WãÇí,ØQטçð­æ4]Ty‘ŠâQl„æ
++'­iøïÅ41c@©,=ÜffЧ´ªéÄ<û*³ÏK[‘è;`ÒÜh²†A9Õë‘Yéj,4xRpuEà¯ÑÇbWKÄ‹%8{Ÿ¬Ó¦#wËÛdTnݱ¶ò Œw­ô€NA&…‡`‚A8Ã=aZäa”ðÝÊÅ4ÜÎHΧñªÜsyûªÍŠÈÌ•2CؾUÎõÒgÝ@Q6õÚ‡·óìvPØ°²¥†I…éúäæIÔ¶¬Mqjl‘Ùó‹’ËI*·+ß3ŒhxØTîòdÚº}kÚ¢KzrÎÖ˜jÃ$¥ªxì¸òuÈ5„hIcèš2@ÈÈð<EM49Ëõb±›ÑZJn{kéÛ¹o™YmVí<ͨ Ë§) îí+N>=={e ëX½IG¶‚‰·#ä~(ÞŠC£Ì¦Ì…‰dÝ”öÊD•Ú…n4ßËÚ.ÑYÔ×RÔµ‹½‚FÇHuy²)’àÐê’!ÌUª^C+X•¬„:³s’ZÑž9Ð…
++³ àÁ¿¨¸%É‡#DœCTŠEl\{àIw-zåÝpÒ0±Ùˆ½t
++,›]ˆ²~­ÓÅœBPv²³lHÉ,Y~Àý♇g3¯ýˆ(h;ãé‡ÊØ
++ch±|¦ZРȀ©«bkb«ÏQ8gÛL ‹è'I¥ÒÒ
¡o•ìÆÊ,0£Ž \<‹XÞùãñd'îWÏÜ’cC#n‹¼³¯i³øŽ±EL	ôìëX/È”9Gsn¤‹[ˆ½pa£Ò”:%vÊë<±YG¡äô“çèOþ{Ê,IzYµ…†'…ASH§‘U¸õÎ°Á|[‘³ç„ÕaŒR6aµÐ®©Ü…Õ"ˆJM_&Ÿ3 6r2”%xçgÂ'ÆÇå_aô#Œ¦U]xÖ})®_±IažÿùµÿRMJ‡´,´S¼Òî`;‘“,h™‘¸û´t
++£9‹Úôûh÷a6³P‘ØúÙÀZb»ânSN1®Ôâ7w‰bƒw¨ÂþˆÏrrKÇõykÈõ0ÀMèµíhC­~…áΈsóc÷œŽ4î9º´úËW4Lï™ÄbL€°ŠãÓa‡Í‘>¸B
ot+ÞôI†ªF{¸ÓK±QªÁ–"ÇÍP}µQ[9£½Né­T’•šŠ”\Œ[°èëÐÕE/yìSôþc^2Éž¾Š˜	íê4f	:©9§’9
k-›
k0`œgY&ÀûMÄ|VüGNVÖFdÎó[hf)<³MÝvþóø|Y ©žLø^)l¥
++‚.¡<jË	ï/Zß¹X߇™U=É´ô–\l¥y7ÙØ7¶0–íP8²ØÚæ¼H@÷’†8”Wj‚Ö8<Òû=OŽ@àlÆSÔ®TϯaׇÏ'qÏûÈY_Œncgi°y¦•À</°ðmù=Û ¶´þçðÃBÑtˆã–\ž÷•ÂWÌeÓþ	lƒ•“Ux¡¶NÂÝfêß\þÞo ™gðÈ?z²|¬?•ô̳БÃ#E—–ŒAâùŸ\ßӁ§óÎì‘õKº›	*	†ˆ1°[NmìyâDûÞ`­NQ(ËŸXÁØ°jI´‡óÆÈÏ'Yf_³ .ÿ‘’ùL¥!Š®›\)YJ’rq¡„6:–W%ÃÐYöQJs=*AËZ}H®;ÕS*	©U{íêJ”®”DIÕ”’ÌznÃ[ŸoŸ·’6$"ˆ³"°Qäß‘-û–Vb-bKs!µ“°9êÚèÄ
++3â‚ZrX0à}ΰ¦"<ñïÑï¾eó¡CœÃ8Õ…KÌžÜfY¡šÉoÙ‘Ûì+êBtP
++W
++ßøˆºp~.O~D]AG೿Ã	uTÁVtyè"õš#Z€ u}9hÓÂÂÒ[¡`UmW‘Ó»U4î}D%aÁ¶Ló¡höLkYYäxÆ%âJáÈ0å?0ûVòC?ô»ŒÅ£d]x-o%Y\ú±(Úµ­jíE]£kù°mºŸî®Â©’´ðuªdxz<D ôQwV*2)3­‹å­»Nªº("é­µM@êµbðã¹²•óåIÈ¿“QëžJ[EҩĵO]·)À7m²wXÏzÿìeºaUÔt/Õ ®`Ø0[ôYÜ(×…M-){]ÙìéÒùMÿ¢¨ø6s£ï{élܪ8|t¹3ïû¹Q
¸ßÚ•H@*„Œ†ôýF7ZxWÙœEôý:¶'þ]ÿb„÷V®)>	Ÿ°²Bw†#ƒpNA´Y…E•$†¦N‰Å-jït³˜D,™È[T¼ãÛ¨´º:رU+´1¨o)É«q‰U·iAaJžq‹ˆŸŸŸÉêR;nñM¶^|MTWê›ÿüúÈ<P’t¿¦Þ)Ü8}c™öpBã7Äsâ‘d•P]pŸ‹]†g³ýe|T[Phiº¨º­F@ü¡„D5÷?<²”8§ã·]°T;9„<ý
++ÁÚŽSoiP±&·YBïèÁüiT€´|ìG‡2uly®P\;I•¶jcø‘òÇ`yÙÅZåT§ê‚ϵû»ü)ª¾”™t$êy%1¹ƒ´¼³ù¿9ظ@u‹	·®-àóV¢/Ï•Æ®ÀÊÕijtœ’ëÚÐØô—ãr×¹©
++i‡Ú37*½?ûŽ›nÉ=«SQlù%äë¾h	@ׇgÖN÷™¯Oãz¶²Üä3ÀÔôub$íMöm®UKåçM«Þ#Hw—oçZ)bMùF
mw™HŒPíe29)SËÞ£búteÕ &¨ª`a®Ö³¨ƒêùsnvL‹5(ž¥‰º´h9caêäçàʍHµ=­5é«îŽ>º	±-ïs2£ßŽMí)•lJ!ãÓ¦¤‘wzÚ&¤ëM´›ÐÛÆøPÛ%›Cñ×<’ÍÊ:*
uÁTS$m2œ(EíÎ<rÂw¿XÐgùS³Õ
++àÿl‚Ïj§û™lµžýéßÑ4˧¤«½®¡#);מ- "bzXy*¢0Pð„¤gVÑÔokÓìK•¥mŒŽç¦XýÚRýà°õ ÙJ¬ŒX†Œw²mæî{¢÷ÎüÇϸ~sqRùý.VZÎŽlek»\Ë>
³ñ”í‹i7P#³qSÓù57߁Óg 3¨dÄPT°DíÌ_ó«xÈ
剟„?¨œµå?Rdª5„/Ÿ—H„“aè ¶Q³¶Ê—œˆpíp~Òoé$5 at P’*ðéˆP¤OÉSGꮉƒp-QþœˆÁ±*¶¡!Ãò dE€f±Â_Ð×ø¸
++¸FÖüøyCh¸
++91Pê<TüC „;	3(Ç}*)‹üäØÃJ¥æ"&’ñ£K›É©ŒT7““#†Ö{\2Fv2€Ó·‹|ü&)7º"ðgófè½…,|˜-A3UÄ#K „9TÕ×AéËíg`kt<U9˜¸†.üŽ“çH»¸ªî®ìîÒÇ«Ó×^ä
++ YµE8f& f.½%e›ÞY_ü#}]‚mñ³®¶©Jåc$We[h¶ü~Äk<]}VÔîL¹ôŽB¿i­vÌÏ.õP-1-fªÌðX"¼· -í‰Ñìõajî.lMw<èr
++ÿ#%¦€î_
	~%†×¾å¬Ã9ôA*2¡Õ¼ÁŠ¢ ­¬)qø2GÐáÞ·™¨Á[ROé’»{ðÜþ”“VÏýPN6_ºzOî8Ümõ¯•ÚÃ3õ	Äkõ”ÝswÞx¨8WJ>Ì0V]KˆÙ´f+U4˜ñËé%éïmCáð­#îôͪ…ÏâE£OÊ­Ýá4ÎèÖùåMÓÊÒžsMKXG÷¸Í¥Íy¶µuâ8Àÿ¦‹ˆj‘–Þ¤—ëŽô5ôU]¸À6^Á`WnÕNŒ‘á+Òã4ų	÷<ø”; e;W¿
++ô3ÕJS9ïÕžA÷?ê3ÛGŸ¡å³KW´D…ãø´ùc.¬LWÛ>:¯.ŠªŠ¢Ï,œkÁeE\GAx:]– )!O‡ÍùŠþížœiÈ—*9«ÞÙöÙ©=~;#q37lÌóè6–¯•ª&ïÒ€Ë@4­(x¢×_’Ã"S2T¶6³'èE#ytyÞ‰’÷ïpãÉW]ë™Àû{ÆÜø²ŸÇ1×Ô;ýOÁ=%3qM¾Tý¤b`ý¯ë”ÖC1v»YÍå÷*e!~«ÝÈEþ"LùäS½Ë¯¼2îé·]vü™š}ËŒSÆÿû‰éló
++a Ñr›œ$®†J<_„NÉ‚T<˜@÷”[жù(`ÓHÞÇ·i	î­Í5 ÔU]ã“l¿j)ƒõŸÀÙÉÆ¡J㶕´bé.Ú<(ÒŠ	¦œ—ô¶ÇRÏ$PfÆøÄСçÎŒ 5¸.¢h÷šT­´Hy‡Ü›ôtšãM£tHjNßDçmé¶j†T¨P)ø»#l×ÌÑéuc\“G?IO­ÑÇí«|LVU+Ú`ߤ٭Wˆ7 Nfîèk'·Ùbòõ# (
[¥š:ÇxcŒ/³hîn$BÒ¸¨2-ª0r TJ²7‰[õùêÖšc®"oƒ®Oˆ%"fJ!:SgcÐ&žì<£ÿrìS6ì~ 4!R÷¡1-øÿƒ®ÿܲe¡,âÉ~n™Ÿ>(Q¶4ŸÎ ]2hÓŸ0úpc™þ&“³=áé·ª–Oµ_zÆk.ãÈÑ;9‰ÕÍ‹%±QÒ

BÉ#4!ÃÈiÒ2F^J¹HÁOÿCñŠ
endstream
endobj
10 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 12 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 26 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 11 0 R>>/Type/Page>>
endobj
11 0 obj
<</R6191 45 0 R>>
endobj
12 0 obj
<</Length 3849/Filter/FlateDecode>>stream
++xœÝ\[o·.ú¸¿bß²tiÞ/u´ „ö!	Ù’å»,[Jìßs8äðÃ™•Ö+Ç(ŠÖÓÙ™!yxÎw¾s¡®Öœ‰5Çÿ¤Ÿ¾Y=øÙŠ ÖV|ý/øïÅêj%â3ëôÏÓ7ë‡'ðœò|X°ÒêõɳÕðOùµ
ŽÉõÉ›Õ/›§Û`Öa7—۝aÞ‡ 6o‡Kï6gå&ùýýV1c‚Ö¿ü°úþdõxuµVÃð;ÍüZ(Ç™ŒYf=Nüá£ÕƒG?®¯ßßœ¯üw-Vþÿóð§oáŸGß­ÿ¶úþÑúñW£s!Б?)—WãŠØv'YÐƸͻñæë-‡k,®†s's"òä†øu³…eJËÕF”!~Ýæ»ø
eÓ>¿áâcA³Qårx9Xnˆµ’T’Üø>,P9Ə#I1«0FHb܍K,Wò¶'y#Åæ¼h¹|·,(Áõæ´Hè
ÜôAKŸu	$ƒÊà%(]~åš
++g¬éŒ­d&‘E[&E†Oj­jµ-#%ù@uy²ó(u\ìŸÛgŽso¬f¤±ªZθ»Åˆ`=Êr¦Š‘ÁÍgpÓ9fy€ßQšŠ;±yQK¾ŽÏÆeõì%Þ
L*7,Âr›59þ~^„.­ò¨ôñ-²}ÀdÈï×e’Õ’'ÈwßâÊÎÑ»§åY²ÏÓÀF§UÆI^O4	_{¿µÌiâiwb/*!¤5¹\–]@1[ÃŒÉÜã]ò Qå×íñòmyö"
÷t|àyyà|‹Z$-è¹áâ¬üÞ_¹ûd„zwØ^%$‘´S
++ä$ôz'dk
ŸÚq=âÝ/Ð4©
sΣ¸’±Wp¿“R2n³N‡¨RpKë¨%R6(ŒL9ëȶĭTŒî<¨4³Á絩Ñ×Déœá—pã%æò~ùæÓ®2k÷R’M)öx1¬ÇZroXŽ‚¹ë‘é¦4bóÌBX%l£ýyêd7?à2Á9ÑŒ×&¨?§(µd0Ò·[
cƒ—¯U›È(Ý$:œ7È™@øû‡¤‹à‰ÊºHfŸ_2Š‚Æe¥íù²( ¸OÅAnNà’tk[›@\‰öž*>±íg[ð¦Aº@5ü¦k×8EÇ<㏭ðL„ú-òèÍt°—/趤%DÃÉb
‡8ržôÔË»9—ñ²õ.QïÈ^­òÃ0eø?\®w
++>ÕsÃōßú±\Vhƒnl8ÏÿUvƒ]÷ªšÈ
++S|fñÔÉ3i]»3œž0q|ËŒó]ƈ(0¼Òõ·&á?nwž)@Åd|,{Ý÷—Dà®Íá–²Úú÷üV×¢•Í@Hï– '€ˆ.À,£×5ÜäçÎ[°G•A$bkxÞSg̲*PîT3ŸxW‡YÌQÒ2¿ß
++t¢WªQGqË´P>5 ñ8︖ف9ÚKDÆaŒe@ãn¹´ ßQÌã’»¸æ º”mpmäQ,yF́ҞƒŒj4»>¿-h€;†¢@/'>oPwÜW.uz5§Æ3çý”H$ïZûìaþ hS»3„´t‘ìÌ?p"
++{Ÿ³Ü«¢Y”Vu­ˆˆÐˆ@e”¬ÓùK.O’é÷™fÕ™~TFýlàFB ­ŠzªÄèP£_’œ+
++P“UÅKòÀ“®»#J¼×[x1ø/0p¸«xÙÒ=Þ“çÛШq(•Õ8Š—eéÄvÊ>.‡f`¸4(?Ž«  þC]ºmOaCóízŠ	—hGjs­ÒÖª¬”‡OdÉ6ìóN¶UØT©æýß°”Û¹‹&ÐBñ(‰áÜ…•J¶Þ#=ÛsàÁ…Ùë,Ç(ì~¯"/ EZ¿Q§mˆpgˆÓPg’1ŒcѪÅÇö¶±Ø#ÖÁœ¾f8Ž4\Íâq‰ÎáyÓJìKjž±/`ðE—„ŸÒžÍ•S©ÄÉ2´ž’¿:›j”-õ/ óÜ Mtô“D\|ö¦‡LPzˆ\›‰.Rüý4[¤mï
++šµèdz¯ñQð0–
++xŒ.»…b¡!0„ #¹¤¸„źƒ:ÆZ®šÀe
++CÌ\V-%*œ mYÆèòÕƒ!ˆ7ƒQË㛓A¢éÔŠÀâôù6àἝ²ïÛ•Gý¶“|Ümé÷D£š˜ ¸¹·Ljž*b`hÒ9Ý¡›î±D—²=*¨=Ù9è¥oèPÙ
‘µäø4YŒòAÏài«ÆòÁ­£–	À)‘DdÅtò£g=ãI~öƯX7¨õ²_yQr¹Ö_TâLOžXÿ¤Iý,;Šî—pö¼ò`ù²V=‰,Ï©ãB–¬l¥ðc„÷Lc£!ÏzblÌB9æw©ÓšÃQjT‚³Zåz)e²ÑO»lƒ¼?Ïl†üóÁ»y´ÌŠˆµeüqª/»èð´;U° [3Z5l³w£¶›&JØ}ÿl5–¾Êª>%¡h;Uœi¢f™³{[ÜÛ\’&3S¶ÖF,ÚjPÃ#•­kËÅVml´p¨.[æ/¯’PÜQRl‹¨ƒ‰0dmþ™ô¼ßÂ>jQ
++S
µ½&ñÐøûëJ¿GŸ“1ªðå>©4ÈhÕ¤„Ð"H'?z‡°€QCö­~—›“	šâõn ³XÀ÷31ÈÛÞ§nz¦~Q¹¼
++A³ûN&bÔ]óëC
AR‡;¤‚uTP»m0–Õb¿úF…°·¯€9’ò¡q¯¶]¢
++Ûßu"¨Àõ+ÈÅ`ºm-€šY£ÆxPN<žwBÜj†0mâƒT»•R ¤z>vÀ4ÑqV Oü¤ë	ˆþ÷Ië§íT©’‘›iL8®ZåÂG‹~ÄÏÆ~PªÈÉù$öƒ9so·º¸UR°J¯‡aâK{u1í”teÜͧ”Ó
++¬oã°aJDv»ƒºøÍïцLàžöRLr>í¦–€ÓùfüØPõ˜ÎU½Nâo&Ì
o–Æi¢æÀZ	çúìö^ ëö•ßÏõ¼4Q7¯R,èF7ãƒ]§ú¾¹:å%¾’õö›ôžÕöåa˜<wšfÿ×áúJÿ[¥eS2¶%˜×^2áNÚ=fMbŒ}pZf‘ÙÞ¶ÍKê×ÚüWjD‹é/mû®¡Z ¬
++Â!¯§¿'4‰µi«÷T»ßUPB›O@%¤ïü^ç|&Ù㺈K®ÈÏý¨ çì
Ó¶ò;—C;¨¶BÛä§4è†Ù—ŸJB£û;¤ª`¬"ðv‹²±åÔžXÛÍÄVJv]ë‰xR¥:_MÄ“sY5:Žd¶ÇÛ²ç<¬ïþØžE…˜d!íd1ˆºƒÛ¾î²Œi?+ò
++¸)Ɲ'ߺìÌ$5ãpßÍ/•m~–ªËÀòJ[}'¡dëô_–ËN`‚ZJΓ[ ¿®V*˜¬bš‡™ýtÔ’d‡J©Q• „}VøC‹MÙs Iu‰mÖ‡7È›¬$¦æåLRx¦Û1aE,:l`Þ¢¼ÇÅàH`0ú‹Ø•Býq%ÉÊWë˜-.µ*㤬lìë :F(0”6¬¯!)3·¯-S—à Q.“õÚÔu"}'>ë;ª­„±ÒVŽ™–(?Û4Á]ØTI íፆ˜wMúÒ÷Dl²ïÓ²âó)þ—fÇ$–·~W™P£w¨î­ÞEÎXçòòîÔá8–kîƒçÞºò3I­Ã,té•ü?cµÚ!C‰h¸d_1=SʃÔb>Õ΁\Mjµõ±ïeŽÔjð¡¢rðw"µ:†Êâ³Ú8麠r‰ûg˜q¨jÑb:J‰þ2f™¤Ô´+$Ø r!öГcɹΝ4ÇsNÒ‚ßg
++^X
ë	0fvÏɱLúš2Þ•†Bh¡w9«°Ãó"ÊÍûèLµË!¶›®þõï"—†EJ@˜/Ë¥Ó7¿$—ƈ°"”AkÌ—v=Ê!Jº9Á”ô„ýÝ•Kc÷”’-™ÆXTÏå—fÉ4JMÙ;“é @ßÍg’iŒ“ëPòk`Óq®á«`Ó“ìÏál:e_ö5(tÎ%å3Ü.™&Ý[G!Ó1§ î‘L£‚ù9dSyréäPË×D¦“Æ44—ô5csVì'Yî)ŠcHãuóýøUâ?»ù©ëž º‡.ú­ß†OWMÀ›”M}Õ5¢rÌÚ™]!idBz8â`TteM54€·zÈŽ›
++NíócÊŠ{åæ®åÏž‘ŒOóËK2»ÃLλT 9;‰•yÓoFÍêXý- ¬…;c+uŒÐ0-L¡¿i۝ô©4²Éuÿ÷´w
++'QTI—‘Lò@ÏŒwç„ד ò/šÿN)˜®#G‰'=xMïÆM…vCÝ­Êf§Vm¦ý{—¾I?‡ªC~R1®;ÐÅ´
Mä´ÂÐÜ6¾§OáÐDÕÐÑ1ÏG¢‰}‹_©8›™†ÐYÞ<Eˆñóg£ÕvúxN¥´ë\vÞÇÉ]rrvhÑ™4°ïC} aKÉwø‚ðc	§:A&–èÔ@òrÏÇÇu"ñfÁ†¡9ÃŽq…K]lHWeÛÄÀMäc³*9­ðUªÒÉ­˜”~|
	ůÍ16	–hE¨ºßK'K÷}êóÌ®-Ðóéw5ØB“U処RA%¶miäPdÖ—y~+,4,’È°±¼
saÖ¶óéÔ")‹î{èwÒN¤—m²›JnT§MˆßO¢•ù\yÞRàÆÁ¼[lVNïI³òO8-nÃâ¾e0ˆ>Äa™O=ïV5›Ôþ¥m{+JÉ5jûlûÞà€æ3#
++‘ÍT`ÕakÄ€kd_þSB^€mØûK­Iü£$vyqÿßT9軝bŽÙ~óþ
¦Ùæ¬Îßû¨J{]ë
++=è¡éøGü#yxæ"g×]Ä"^Ùê(i1²ºÅo\!Ýeöé3ÁÑšãE-x¼ú,×!`
endstream
endobj
13 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 15 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 29 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 14 0 R>>/Type/Page>>
endobj
14 0 obj
<</R6197 45 0 R>>
endobj
15 0 obj
<</Length 3022/Filter/FlateDecode>>stream
++xœí\Ys·Nåqžy7åqJœÙr”S‘Vò`§‘KQJHQ¼¬èߧ3.)ïŠQäRQb1 at w£ûë^Ì9sŽÿºÏ£³ÙÞ÷V7?¹šñùàçdv1q̼û8:›?>€qÊóy`ÁJ«ç/gi£üÜÇäüàlöÃâh¹ÌZ#ìâ|¹2ÌûÔâMjz·X—NòýåR1c‚Öÿ8øÓìÉÁìÙìb®Òò+Íü\(Ç™ŒYf=þx¶·ÿçùõåÍñlïïs1Ûû#þ÷øé×ð±ÿÍüW³'ûóg÷æFæB ŠKó¢çˆ-W’mŒ[¼í;O—&×2Xä–s.'s"Xò`
Kü¸X›Òrµe‰—¹çPÆ1íó.B˜…*M™š–"G­$•$wæ•c|;’“za8s6‰qÕ³XZ?--Ž±8.jsYšW¨–[·xÝË3«
ùÍR° ƒ—MkÉ´*Kì)n·ÁÀ–9¸îf5FŠ¬¡(÷k	jà]€f?àU ÄJ£™ñ6q`ÐZq h.]b õš.E€•4(´Z¼H«ÞXâ†®Ó Ì/8SHÔúçÓ¤Š;ÑQ›E!;¹À	,ŽrYeÁ¬´gÀ¨Oòy²Ž¤QçÀ½¶>Q•šgËÀ†J ž+ú#5èùJ1nx@%S(½Âõµ•^´u,8®úÝìà7?,p´óTÄD\8LIÄI¤}T$w]´dRÞ $Lõ²cˆÌб§´	ƒ-ã°
o)Rå½=è)¥«lc¯QF i(QiA ;BøyÙò3´Ž U#8‰»{<d7÷F•š*E]24q +WzÖ
¼é[yVyjdöZ®f•tóNØÀi™4IÊK9¶½HÈI™U·Bi©èŽË&ÝàÐ×ÄÎBëeÆ”	Wž&ºã¬BÀÝ™«QæWBÊ*_dÚoq5ñû¢³S¾Æ«âkšêAöšXÀÍPAbsrã¢
++èneÖՁ
++‘ißv:bÝÁ—h#	Pæ ÇÇÙˆ,]‚P“\Œ	Ü£HV2 Ä€#ZzÏE’ÄOM¸)>Ž_°ÙÙç-¶ÞOõ%ÊDt4,j"È‹Ò±Ž˜(4%io/4³Ihš¨Ù‹æ‘ÞÃÖÐâ—ɤăujÛè
…Ž1D!äëÀ”•·øÅä–>FƲÛÐYp7	B¢ |m¨8R¨Í¦S±ìá”Ò´1´ã™œ(¢r¦Æ¥•ü»ïCÚ,˜oð›åp1”nÞtxÌ	™	$X¼ïÃÄD©ãñ¦ôfc–”¬ãáþ£…ß´`ˆªR
++à¥ÀŸ*î³Ï÷ÚR}Ýx*™o·
+!ÓFŒb!4 bBÅF‡.4ÎÞ;KC*N¼ìóÍ-vŸžéb“ÛBÅÚè¤~°Õuè?S0-Œ›Z±¯“'–˜ÕwÂJ«bº ê-%^µwÊÞ0JIÅ…îâ
++§Èõ2:íÝ“ëA%Å&r¿H˜,E •ÆU˜y:ˆÐ¨Í©P%Ä¿Ï èöß6Á ê‰U¯‡¸¸¹wºe7Â~7J‹XýaLˆ³¯£¼äíæ¡,Fd@âì<TUpD+ÞâºÇˈL¹¨w	,`m¥@f`´$çù:¦]2–” :Qô^yj¹òÉ€+„
++bReÁ€‚ƒ·Ü~F ¼lA¸1ê ‘(¦!ô®nœæ(
Pd¥Â0È ;ž,÷HPgá—)[( ó+V§*[([3Día6Uy ß@úç)…¯†<§†µuŠ]†ñ¶-”Pð:£>'V5t€EãHhͺ"„Ò0nÁ(«²„‚ŒÛë@‰ºc؃‘ê"ûĶ§ß  £¸¤i±Y‡ÌÊH&yè<ÆðtÞQ¢×Œ÷;÷ÃTÕ±‹Ä§ªŽRƪ£A´÷;ô&¼UbâneÇ)’5d¯…d°{*’	”êKà4.·MóaYøÎùp€ÜÊW|¨¯YÙ¹\j	ßCL÷åÜ»’FFW¯ZߦJ]Á©AÆ£ìœI•)Ç9&Å£_F÷žOa’
++ èÜŒ#ʤŒ ¹™‘teHÄËÇ›J:ùQôWI¬ðš–ÉÝ/äG)Ý=Åà†ô€â;¸œF±f²ò¥EžwÎ	¤A芓íij–B²M
év¶MS9«F™}heMw™ÌTÜ9¨\£Q›í:Éä⬏2ì]	ùª¤v%¹`Â7XëTp˜Á’LjÇiÇI/™³À>[çµç]ïÁ2…ž#/¥dZ ½Ã¯
Ã}ÞnY«“J«v]ù‚¬zDÔ“I“>Öè?´h‚TX
++T˜P¼¦¯AŒ¼A*eYp}Ô¹kwVGv×P g2¸ÐÏ„qÈÆ"ŒïœâàÀäõfŠ¿@u 4nÛ‘{îd]é2ªvE.›³9¨1¦j†ÄŒŽ­"§¥¼X*‘	¿|€ßÌ snßX]N‘
b¹X…êX¯`Ì­âá¸
++Òl:È:ÏØ+ä-8šb®Ã	 ÎØB¢·ª³.Ùó`‚½Ý)O÷¦:ˆwÇ©¥žpOˆMÄ¿(•ÅM‡­$J®–Ê´nú&UGMªZ™Zt1 ý¶*üŸ§r”ó®]·"…Âó†º2ÎYàY0µµ ±©ô}âÈùû5^wP‚ëgã ²:ô("™UæG£ÊH<zÈÍui¾.ÍK¬âH ‚x|{ÏKóMs†ój†Ü|Þ{Xšͱ~Ù7£ôŒ’_•æYsºua”—^Wš¼j~jBŸ{4v¿%Ùxo殇!$-±ÚèÊ…TR£jª£&fm<‚cƒ0 at Ná=¼…'Ggô)1á!ŠªÛRW–´‡8yÒÆɼü_»HU¥?}FÊßᢚ‰mŸ0'FÞ´v2çN‘£,n/bˆ2º$Râ[ä"\ÔÆÆësoëBb;\Ô&î7.T_HŒdŽÜÁÝ¿ŠdgbIm÷$;¼q¢6“ühxq¥vS+	¼Wãö«‹3¦½(Íë‚Á¿_®,×Lƒš}
++p¼ØÛ´krLÆöº¹Z7ƒKh¸‘2£$`Ï¿+½¤ù¤4ÿRšßN8Ýoʐǥ¹_šJóiiž4¬›’¸nöŽz=$W¥÷¸4¿îœDÙ‰Êà´U¦½÷¿mÆ,d᫦¾Z¼y§â-ÆñCm:¥káó m\*îvÎáFqÖǵº±uà–o´ŽçeËošÜ·ˆœŒ-?5žß6'»j6ßmâbÝ«yC1î‚R7Dúù=‘ùMsl{‡¯Ê°û¹ÌÇ«âÁýüŸð?<þ
wûŽ†wûùh†»Âÿÿã[ó.þ`á¾>@MÅŸŸ#ØèqIÍn¬¨ã~	þ?#ð  8¶Üç;ZÇÏDÿÿ•¬g«2Ø¥#÷ñ]¡&ïü‘³7Ò[Š¥¥}AJµdSÝµoÛž”æM«ÈY–B…Ç÷Æ6]L@ÙwÇŒ¥Âú>w’¢1)Èý«y/|ô‚euc-T7>øæy~͵¢•ÜW½g,¥`\õeèU©‡—Ë u?×Ö«KuýÐuÿýa|­Ø›ÐTCôŽ¨†ÝºúÉÚ5Lið†™®a~¬`Mó5Ö3%P`¹sµiÚv5áe“ÜÉ#ÄIÏû è9^Ø%ã$¼<ÔaBPGMrÒ¶£2à´96½ƒ¦„=YßJhÔÔÎU^ëÛ§yœwëó`nœ’éê"û­ú-À`>¨ª‘àö?¾à0hwøz’²ø‡Œa6F(g½àÛ÷¹æï–q`ÿoK >^€™¸ýVÿ©†É7Ä]ßWî±,Ì°_qæô.'Иk2AŽ]Ç'°å¦g÷Fxw.ø=[jg4”!r¬ÚdsôÎo$¯ù¶S¯ÏfÿÑ”#
endstream
endobj
16 0 obj
<</CropBox[0 0 612 792]/Parent 36 0 R/Contents 18 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 30 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 17 0 R>>/Type/Page>>
endobj
17 0 obj
<</R6203 45 0 R>>
endobj
18 0 obj
<</Length 2015/Filter/FlateDecode>>stream
++xœíZësÜ4gøxÿž~²¬èýèPf()>´L'¹<é]Ú¼Zòß#Ù–µò­ãæ -™NzYÞ—v»+ë´ „4üë~çËÙÆcÍ©(Ïg´øÖÿÎNg¬YSt?óeñpÛ¯–Ž8͵,¶f-æWÙB;Cx±½œ=)çU͈֊éòEU+b­s¢<i‡Ö”{i<?«QÊIùÇö÷³GÛ³­Ùi!Zöµ$¶`ÂPÂFšh¸9ÛØü±¸8»ÜŸmü^°ÙÆwῇ?å6¿.>š=Ú,¶n¬pÄ85ï¦ái¯©jNœTÊ”/ûÉEE=qɝyvÆAvÜÃœò,·÷<‹§eåÕ䚊’%O«8heˆ´ñ
Ó,sŒ©R¬5UÀŽRphIjœ§ï†ÐÛ±$õÅz¯à„K¿(ìzž¤áºà,
Ÿ¡kwÓð4
I¾LÃ…7Ž¶D°²N“õÙcTÜTÜ=ô5 Äƒ4üw-òì:ÆÆÇj®›’’0çF…›Ì^LH6BSs?̶?}R>®jJ¤Q’ºr¿âœH®Xùªb–pJ3ðx^iÂŒkÖ\râ^4ñ§gåQZ™žïe“±*—ŽWî¤ÉË´t‘¨=VX¥áZ Çi-xíRè‡W˜$ÚEµ<‚“ʇ¨ˆÂúÉŽ•¾fw±¥ç]5Õà²_Ø<U–óh	Ñ ²&F8*ýc/›C?Ù²Ô°Æu”%Æ¿?ÇÞ¤p™;I¤S 9´-œ-_‡ÇŒ(Î!ם*¸Ö{§ˆP¸; Ýf%àŸô»ß³ï<0G®:®y€ZÊZúwØõaa?
_¡ò>Gׂ]¹„¢79šùœ*\ôÌjÓ¤Šƒu$’{áW•ôÑàßjƒLRn r™ö—× ¢ò„­öÇƃDV—E^
Èjáé®ÁšÒÏ+˜¯E^í]¦Š%Å~¨FüÑÏD†C1ŽóZŽ+"œ‰»°"Àñ^šLè{!s¤ åÞ¦¡ UÚ±P–ýc)×Ê»³.BøûÂV¤^ÌÝ$û5ió|1¿•ôkEªH_‡ôk(µ:æ¬f;0©yÕ„23–K×óuЖ±L‰ÌÀ­ë	é/
yG{tìØÀÖ5ý`È;®t–j‚xŠ§`
++́æ:ÔÇ`ÎÎ(älà;·™V0_:IÏÛ´i¹X
È(V±úå~Òk¥D	“—Ø67L 8¤•\&øAͬ¯1„.jÆãί‡>sS)WõnÞ?èû”h·…RŽàØÊĦ2pÕ”WAOæ·05^=¸99î‚Aj
÷}ž¬ŠGrö»B ñ,XÒóöÑíV=xÊûF¦‰Â&$ã±+­ï
++š¨ ™£â€zeíËÀ‚×#º!
¨ˆ@ísŽ’MÒL—9mã÷VeNWÅLõ}çñ 	¶u©ƒH at t¼Š£Ê¬QåŽ¿ RLW9|«µšµ9ځt	ˆ¹Ñ¬ÝAæ Ùó¹ÚŒ [Ö^FF}zjt©E)Ÿw\üÂŒMÓòù0©:AeCí	\#‰y5LØa¼L»¬š.ÜwÓ4„’æš4߈ån'Íw'I.°t·?„‰¦ÜPÙ7Ø1{ÔÑÖ}E€¶ÖvïZ¢oÂÛŒñoJ5ê° þ 2ý]z¿Kïƒ ;OW,Q›^ Þ>éßÂÙÆÔYo‡ü À@|¡¼æ(/Ë®:T®l’ƒRc•R
+++å’ÃÞðжÃ9xš8"oOwB9;à  
Eå8Vþwñ·@éb^Ôgi‘ŽÒp‰’ÛKŠÒ4kҐgÃ÷Í(ØIQº­©~é3òEÊÈ;XqÚ×Ñ7)Ó¯Òãa­s?¨Õºââ.Kþ¿²ä¤K¯m$K¾!š7×
€ßBžÝIy*QºÑ%ö¼ÍèµÛðÐçX¶ÒÄ®-ö®SGþÙ'Å~)ZУ“‡]êWM1«'ð(ø‡—C2¡½MÿÄrv²Éý•×aZ^ÆœóEUk*‰äæ²+§ÆêF,æÕ¢²”ßú~žfÁðQþ”†ßŒ$â_Q$üÀ§;´ªQ¶É¯P«áÜèp'žù
Kùñ•
++çd=˜Òëºà/t¶s+ÜËTœv‡§ªL§4áF@Ó cÆGw¨ÿ•í5
++úAu¤:FYœdÞCä5à”—•‚2€<nhüë1Q ÊdˆNqC¼÷¥3”æY&ÕÇ‹|ûGSÝ:¬§òfÜ&€A×Ìø>®̐?Ž5èkxEÖ‚0:Êí˜ïî—¨éQe–¨â'¨¶ç¨2÷Ò‚üÄ"nÝ'S5È«] p/W¼w -T»ý‰Ùh<ðYìMÓT3´YÕÖƒg„ظ4ÕNöÍ4–`à wª/zWë®îô-–Ö:¬ŸþTÐÜ—³#¥Üԝ°›Sw
âß·qýb±C–†ñVŠh :×ß㶌H£oãRŽlý$á£NJÝ Ý²o$5ƒ÷UÁGŠt?)»¯SsF½lù[å¥oÎHG>b"TƨÞ]‚Wž,¥ÂîAÑ$ÇgAGªh×ðkEÖvwvó«Ê½BàSª&˜¶­kúØ{ÁÖìoŠFs
endstream
endobj
19 0 obj
<</CropBox[0 0 612 792]/Annots[20 0 R]/Parent 36 0 R/Contents 22 0 R/Rotate 0/MediaBox[0 0 612 792]/Resources<</Font 31 0 R/ProcSet[/PDF/ImageB/Text]/ExtGState 21 0 R>>/Type/Page>>
endobj
20 0 obj
<</Rect[278.724 449.484 429.276 460.476]/Subtype/Link/A<</URI(http://www.condorproject.org/license)/S/URI>>/C[0 1 1]/H/I/Border[0 0 0.12]/Type/Annot>>
endobj
21 0 obj
<</R6209 45 0 R>>
endobj
22 0 obj
<</Length 1693/Filter/FlateDecode>>stream
++xœ½XÛ’Ü4åÙ_áG›ÂÝ/¼åV°TRņ<–™½@í}3ð!üI·,[­±²°©$•ÚŒJ–ÕêîsN·|Ór&ZŽÿÒïæ¢Y½´’‡öô®áí7ðwÚÜ4"®iÓÏæ¢}¼†uÊó6°`¥Õíú¤w°Ê·68&ÛõEós·éÁ¬5ÂvWý`˜÷!¨îrz×mó$y~Û+fLÐú—õwͳusØÜ´j4?hæ[¡g2²Ìz<øãƒfuð¢}s»;nV¯ZѬ¾Åÿÿ~ž¶_4ÏÚÃ{£s!PÈ‰ÍÛÙ#Ö’mŒë®çÉóžÃæZ‹9¨9é˜Á€ÉõL¼îzpSZ®:‘M¼î§YÜCÇ´ŸÞpqYÂt*õ8´Ü8j%i$¹°?8¨ã'’6Á‚1r˜ÖcŸõši”ëþDˆx§­ï~ëŸáÁto Œ°\ÈÐý h€ãI
“‚9+•íŽòKyr7/¼Ã$h+½Hñ.Ó+5*øvý¼YùÉA*•ü< •Ì~.þќ٬27|2.Ò&i8HHТ;îgÊ»€ÙžŽCÞz3-õ㾎soEZ¡¸Ãóâ3„†eN:„4 $o!åË­KKã[GcfX#³»Ùå»eJ»îm/<“8G^:¯½tŒ/¼ ¥Wóä	N ê8Ê3/ÄÌdaT÷WÞö8o{ðD®É^Èt©€	Ú³×™Øyé%®Ôâÿ./ÜdCih•§æó[qd¼”ÝWx~ØAkŠË¼ë6%@Ë2Cc­†"‚0Îè	0÷ƒD¹	$Æ$D[{ ¨{°µIZQ€“ÀuI N\åá嬓Ýóe´p)_NÈ9`»ý|áèì ¸aÒ©vrôw(Ôâù.3aF”¦³×ÙI	ž[ ÔIïÀ?.45PòŽÊfŽK7y…o%=ÐÊLzYˆ¸²Pk¸˜ôòQBnUܬÂgóÜUéÛ^Ë€ßui)õøI¬
:<PŽc`8œjÝ[Ï‚Ó…‹$F˜ä ßu­àà¶û‘èÙ%)	¬ázqVÁëdÓÌ»©¼ïQÝÄóW½ó€<J©ÌNBäpG!›ØKÌ´ÿ=¯|Ñž)´¥ìÞÎÏ«æk6ÿRž$žj#)®gˆ¼Ûƒˆá&u£šŸ-¡öÁXºÆ\ºÀÚ_ƒ„ð4??ËCT"ïጺû‹þ;M{µ°BdyžæOæI^†QÈx0úbE(õ€Èrš$éBZxìD
++KÕÿ(ëZℱ
++I¡¤g‚×-’•¤$å:E
++mQçâ9¤óÐϡސPR“H̉Úf€oÕŸcý†ÖÜ@ÍyŠÇ¨‰¢¾‘ÑÃÄúd-Oõ‰•¸X=qƒÅ™AŽ
++’ŠIËž‚¸”õdd›ò	p,.h~OúXy_JH|+ïJ‚]¯}ÕGRm<Šø0…o.x£²ÀI|EYö¾,—K‰Ç!
++³šk󩶅hAÁåÖth ü²2ÖAl}@ò‘l’6ð<w9/q…†t„¨æé“³`²p×’Þì÷dQË«}b„</èµÍiBBTäî9*©ÊzÀ:•öjI”}ò˜ô|»ûŧ wªÉxŸ‹”3+ôD¹3úv at FqÏw¢TäøgÙ>n  špƒXx¡±©¶săò|n\÷´§x’ oI´Ø @Þe™¬tãµÙ‘i)jƒ€:'ঃ—e”4$0TVÆvºl†I«™ÖVoÆЍx¸§M	úÐN¿N`¤0fx)Úkš„ò¦Þ4•– ‹L(•¾p»«‡âijZž^Ò¨
++ʘö±ÕYbvGáU\‚‘'ÕîB€–{7Ç'WÅÛÑ*~TiO†Õ_çÉUÀ*ÏÒ{N96Å×SÇŸÝÍÉÚ»?fü^Wæòºß«EP‘øGŽT4"@Oµ
++rê¤WTWgÿ—RE.­÷‘V¨ì“¹PíuB
++¯ºP•m.…ñ’))ÞKì²Åˆs>꨸2Á¥~ýÜ««
++Ú$¨›ëjý›‚ôÓ03ª¼ÒÝÿñÏ(Cöc|¡ÚcKúB½:Hhü°ñrp1KËÛYZy[¨qY$s
#h*oÑñÒÃte:VÐb÷_ý1Õ*ívþzóžVà$>ªºI&Iìª~FÁaó/4Ý
endstream
endobj
23 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R>>
endobj
24 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R>>
endobj
25 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R/R384 61 0 R>>
endobj
26 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R/R384 61 0 R>>
endobj
27 0 obj
<</Subtype/Type1/BaseFont/Courier/Encoding 28 0 R/Type/Font>>
endobj
28 0 obj
<</Differences[30/grave/quotesingle 136/circumflex 152/tilde]/Type/Encoding>>
endobj
29 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R/R382 27 0 R>>
endobj
30 0 obj
<</R379 55 0 R/R380 57 0 R/R382 27 0 R>>
endobj
31 0 obj
<</R379 55 0 R/R380 57 0 R/R381 59 0 R>>
endobj
32 0 obj
<</Differences[24/breve/caron/circumflex/dotaccent/hungarumlaut/ogonek/ring/tilde 39/quotesingle 96/grave 128/bullet/dagger/daggerdbl/ellipsis/emdash/endash/florin/fraction/guilsinglleft/guilsinglright/minus/perthousand/quotedblbase/quote
 dblleft/quotedblright/quoteleft/quoteright/quotesinglbase/trademark/fi/fl/Lslash/OE/Scaron/Ydieresis/Zcaron/dotlessi/lslash/oe/scaron/zcaron 160/Euro 164/currency 166/brokenbar 168/dieresis/copyright/ordfeminine 172/logicalnot/.notdef/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu 183/periodcentered/cedilla/onesuperior/ordmasculine 188/onequarter/onehalf/threequarters 192/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]/Type/Encoding>>
endobj
33 0 obj
<</Subtype/Type1/Name/Helv/BaseFont
 /Helvetica/Encoding 32 0 R/Type/Font>>
endobj
34 0 obj
<</Subtype/Type1/Name/ZaDb/BaseFont/ZapfDingbats/Type/Font>>
endobj
35 0 obj
<</table.3.1<</Rect[1532.7 1084.3 1549.3 1067.7]/D[null/XYZ 185.613 590.396 null]>>/table.3.2<</Rect[1587.7 1957.3 1604.3 1940.7]/D[null/XYZ 192.238 485.243 null]>>/subsection.2.14.1<</Rect[291.695 720.301 299.997 628.977]/D[null/XYZ 36.1346 644.24 null]>>/subsection.2.14.2<</Rect[291.695 3399.3 299.997 3307.98]/D[null/XYZ 36.1346 321.554 null]>>/subsection.2.14.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.2.14.4<</Rect[291.695 3515.3 299.997 3423.98]/D[null/XYZ 36.1346 307.582 null]>>/subsection.2.11.1<</Rect[291.695 4145.3 299.997 4053.98]/D[null/XYZ 36.1346 231.698 null]>>/subsection.2.11.2<</Rect[291.695 2125.3 299.997 2033.98]/D[null/XYZ 36.1346 475.008 null]>>/subsection.2.11.3<</Rect[291.695 2692.3 299.997 2600.98]/D[null/XYZ 36.1346 406.712 null]>>/subsection.2.11.4<</Rect[291.695 4046.3 299.997
  3954.98]/D[null/XYZ 36.1346 243.623 null]>>/subsection.6.2.10<</Rect[291.695 2909.3 299.997 2817.98]/D[null/XYZ 36.1346 380.575 null]>>/subsection.6.2.11<</Rect[291.695 4503.3 299.997 4411.98]/D[null/XYZ 36.1346 188.578 null]>>/page.10<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.11<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.12<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.13<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.300<</Rect[291.695 3975.3 299.997 3883.98]/D[null/XYZ 36.1346 252.175 null]>>/page.14<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.301<</Rect[291.695 4556.3 299.997 4464.98]/D[null/XYZ 36.1346 182.194 null]>>/page.15<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.302<</Rect[291.695 4706.3 299.997 4614.98]/D[null/XYZ 36.1346 164.126 null]>>/page.16<</Rec
 t[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.303<</Rect[291.695 4888.3 299.997 4796.98]/D[null/XYZ 36.1346 142.204 null]>>/page.17<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.304<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.18<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.19<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.vii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.20<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.21<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.22<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.23<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.24<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page
 .25<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.26<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.27<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.28<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.29<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.viii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.1<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.2<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.3<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.4<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.5<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.6<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/p
 age.7<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.8<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.9<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.30<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.31<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.32<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.33<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.34<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.35<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.36<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.37<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.38<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]
 >>/page.39<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.40<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.41<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.42<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.43<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.44<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.45<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.46<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.47<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.48<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.49<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.i<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501
  null]>>/page.v<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.x<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.50<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.51<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.52<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.53<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.54<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.55<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.56<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.57<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.58<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.59<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 69
 3.501 null]>>/page.60<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.61<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.62<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.63<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.64<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.65<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.66<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.67<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.68<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.69<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.4.4.1<</Rect[291.695 4278.3 299.997 4186.98]/D[null/XYZ 36.1346 215.679 null]>>/subsection.4.4.2<</Rect[291.695 2294.3 299.997 2202.98
 ]/D[null/XYZ 36.1346 454.651 null]>>/subsection.4.1.1<</Rect[291.695 2861.3 299.997 2769.98]/D[null/XYZ 36.1346 386.356 null]>>/subsection.3.6.10<</Rect[291.695 1947.3 299.997 1855.98]/D[null/XYZ 36.1346 496.448 null]>>/subsection.4.1.2<</Rect[291.695 2428.3 299.997 2336.97]/D[null/XYZ 36.1346 438.511 null]>>/subsection.3.6.11<</Rect[291.695 2556.3 299.997 2464.98]/D[null/XYZ 36.1346 423.094 null]>>/subsection.4.1.3<</Rect[291.695 2544.3 299.997 2452.98]/D[null/XYZ 36.1346 424.539 null]>>/subsection.3.6.12<</Rect[291.695 2484.3 299.997 2392.98]/D[null/XYZ 36.1346 431.766 null]>>/subsection.3.6.13<</Rect[291.695 1537.3 299.997 1445.98]/D[null/XYZ 36.1346 545.832 null]>>/page.70<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Doc-Start<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.71<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.72<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 3
 6.1346 693.501 null]>>/page.73<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.74<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.75<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.76<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.77<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.78<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.79<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.80<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.81<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.82<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.83<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.84<</Rect[291.695 228.299 308.299 211.695]/D[nul
 l/XYZ 36.1346 693.501 null]>>/page.85<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.86<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.87<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.88<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.89<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.90<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.91<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.92<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.93<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.94<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.95<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.96<</Rect[291.695 228.299 308.299 211.695
 ]/D[null/XYZ 36.1346 693.501 null]>>/page.97<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.98<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.99<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/chapter.10<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.11<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.900<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.901<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.902<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.903<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.904<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.905<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.906<</Rect[291.695 228
 .299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.600<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.907<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.601<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.908<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.602<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.909<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.603<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.604<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.605<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.606<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.300<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.607
 <</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.301<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.608<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.302<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.609<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.1<</Rect[291.695 2627.3 299.997 2535.98]/D[null/XYZ 36.1346 414.542 null]>>/page.303<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.2<</Rect[291.695 2078.3 299.997 1986.97]/D[null/XYZ 36.1346 480.669 null]>>/page.304<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.3<</Rect[291.695 2128.3 299.997 2036.97]/D[null/XYZ 36.1346 474.646 null]>>/page.305<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.4<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1
 346 667.366 null]>>/page.306<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.5<</Rect[291.695 1221.3 299.997 1129.98]/D[null/XYZ 36.1346 583.894 null]>>/page.307<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.6<</Rect[291.695 2408.3 299.997 2316.97]/D[null/XYZ 36.1346 440.92 null]>>/page.308<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.7.7<</Rect[291.695 2588.3 299.997 2496.97]/D[null/XYZ 36.1346 419.239 null]>>/page.309<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.4.1<</Rect[291.695 3391.3 299.997 3299.98]/D[null/XYZ 36.1346 322.518 null]>>/section.4.2<</Rect[291.695 2672.3 299.997 2580.98]/D[null/XYZ 36.1346 409.122 null]>>/section.4.3<</Rect[291.695 3654.3 299.997 3562.98]/D[null/XYZ 36.1346 290.839 null]>>/section.4.4<</Rect[291.695 2808.3 299.997 2716.97]/D[null/XYZ 36.1346 392.74 null]>>/section.4.5<</Rect[291.695 1215.3
  299.997 1123.98]/D[null/XYZ 36.1346 584.617 null]>>/section.4.6<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.1.1<</Rect[291.695 2314.3 299.997 2222.98]/D[null/XYZ 36.1346 452.242 null]>>/section.1.2<</Rect[291.695 1331.3 299.997 1239.98]/D[null/XYZ 36.1346 570.645 null]>>/page.910<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.3<</Rect[291.695 1430.3 299.997 1338.98]/D[null/XYZ 36.1346 558.72 null]>>/page.911<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.4<</Rect[291.695 2344.3 299.997 2252.98]/D[null/XYZ 36.1346 448.629 null]>>/page.912<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.5<</Rect[291.695 3615.3 299.997 3523.98]/D[null/XYZ 36.1346 295.537 null]>>/page.913<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.6<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]
 >>/page.914<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.7<</Rect[291.695 2635.3 299.997 2543.98]/D[null/XYZ 36.1346 413.578 null]>>/page.915<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.1.8<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.916<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.610<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.917<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.611<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.918<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.612<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.919<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.613<</Rect[291.695 228.299 308.299 211.695]/D[null/X
 YZ 36.1346 693.501 null]>>/page.614<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.615<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.616<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.310<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.617<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.311<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.618<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.312<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.619<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.313<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.314<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.315<</Rect[291.695 228.299 308.29
 9 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.316<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.317<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.318<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.319<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.920<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.921<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.922<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.923<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.924<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.925<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.10<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.926<<
 /Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.11<</Rect[291.695 1284.3 299.997 1192.98]/D[null/XYZ 36.1346 576.306 null]>>/page.620<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.927<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.12<</Rect[291.695 3444.3 299.997 3352.98]/D[null/XYZ 36.1346 316.134 null]>>/page.621<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.928<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.11.1<</Rect[1686.69 1589.3 1703.3 1572.7]/D[null/XYZ 204.162 529.569 null]>>/subsection.3.3.13<</Rect[291.695 4493.3 299.997 4401.98]/D[null/XYZ 36.1346 189.782 null]>>/page.622<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.929<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.11.2<</Rect[1763.7 777.3 1780.3 760.695]/D[nul
 l/XYZ 213.437 627.374 null]>>/subsection.3.3.14<</Rect[291.695 1023.3 299.997 931.975]/D[null/XYZ 36.1346 607.744 null]>>/page.623<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.11.3<</Rect[1685.7 4337.3 1702.3 4320.7]/D[null/XYZ 204.042 198.572 null]>>/subsection.3.3.15<</Rect[291.695 1023.3 299.997 931.975]/D[null/XYZ 36.1346 607.744 null]>>/page.624<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.11.4<</Rect[1719.7 1141.3 1736.3 1124.7]/D[null/XYZ 208.137 583.53 null]>>/subsection.3.3.16<</Rect[291.695 2628.3 299.997 2536.97]/D[null/XYZ 36.1346 414.421 null]>>/page.625<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.11.5<</Rect[1574.7 4281.3 1591.3 4264.7]/D[null/XYZ 190.672 205.317 null]>>/subsection.3.3.17<</Rect[291.695 1272.3 299.997 1180.98]/D[null/XYZ 36.1346 577.752 null]>>/page.626<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection
 .3.3.18<</Rect[291.695 4408.3 299.997 4316.98]/D[null/XYZ 36.1346 200.02 null]>>/page.320<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.627<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.19<</Rect[291.695 2895.3 299.997 2803.98]/D[null/XYZ 36.1346 382.261 null]>>/page.321<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.628<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.322<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.629<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.323<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.324<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.325<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.326<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 
 36.1346 693.501 null]>>/section*.500<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.327<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.501<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.328<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.502<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.329<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.503<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.504<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/section*.505<</Rect[291.695 3524.3 299.997 3432.98]/D[null/XYZ 36.1346 306.498 null]>>/section*.506<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.200<</Rect[291.695 4631.3 299.997 4539.98]/D[null/XYZ 36.1346 173.16 null]>>/section*.507<</Re
 ct[291.695 1279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/section*.201<</Rect[291.695 3610.3 299.997 3518.98]/D[null/XYZ 36.1346 296.139 null]>>/section*.508<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/section*.202<</Rect[291.695 3115.3 299.997 3023.98]/D[null/XYZ 36.1346 355.762 null]>>/section*.509<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.203<</Rect[291.695 4646.3 299.997 4554.98]/D[null/XYZ 36.1346 171.353 null]>>/section*.204<</Rect[291.695 1155.3 299.997 1063.98]/D[null/XYZ 36.1346 591.844 null]>>/section*.205<</Rect[291.695 4052.3 299.997 3960.98]/D[null/XYZ 36.1346 242.901 null]>>/section*.206<</Rect[291.695 4334.3 299.997 4242.98]/D[null/XYZ 36.1346 208.933 null]>>/section*.207<</Rect[291.695 3187.3 299.997 3095.98]/D[null/XYZ 36.1346 347.09 null]>>/section*.208<</Rect[291.695 4457.3 299.997 4365.98]/D[null/XYZ 36.1346 194.118 null]>>/section*.209<</Rect[291.695 1044.3 299.997 952.977]
 /D[null/XYZ 36.1346 605.214 null]>>/subsection.3.3.20<</Rect[291.695 4106.3 299.997 4014.98]/D[null/XYZ 36.1346 236.396 null]>>/subsection.3.3.21<</Rect[291.695 3746.3 299.997 3654.98]/D[null/XYZ 36.1346 279.758 null]>>/page.630<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.22<</Rect[291.695 2085.3 299.997 1993.98]/D[null/XYZ 36.1346 479.826 null]>>/page.631<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.23<</Rect[291.695 3360.3 299.997 3268.98]/D[null/XYZ 36.1346 326.252 null]>>/page.632<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.24<</Rect[291.695 1949.3 299.997 1857.98]/D[null/XYZ 36.1346 496.207 null]>>/page.633<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.25<</Rect[291.695 3333.3 299.997 3241.97]/D[null/XYZ 36.1346 329.504 null]>>/page.634<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.13
 46 693.501 null]>>/subsection.3.15.1<</Rect[291.695 1321.3 299.997 1229.98]/D[null/XYZ 36.1346 571.849 null]>>/subsection.3.3.26<</Rect[291.695 4607.3 299.997 4515.98]/D[null/XYZ 36.1346 176.051 null]>>/page.635<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.27<</Rect[291.695 4239.3 299.997 4147.98]/D[null/XYZ 36.1346 220.376 null]>>/page.636<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.28<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.330<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.637<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.29<</Rect[291.695 4028.3 299.997 3936.98]/D[null/XYZ 36.1346 245.791 null]>>/page.331<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.638<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.
 332<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.639<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.333<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.334<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.12.1<</Rect[291.695 4590.3 299.997 4498.98]/D[null/XYZ 36.1346 178.098 null]>>/page.335<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.12.2<</Rect[291.695 2230.3 299.997 2138.98]/D[null/XYZ 36.1346 462.36 null]>>/page.336<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.510<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/subsection.3.12.3<</Rect[291.695 1404.3 299.997 1312.98]/D[null/XYZ 36.1346 561.852 null]>>/page.337<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.511<</Rect[291.695 1769.3 299.997 1
 677.98]/D[null/XYZ 36.1346 517.888 null]>>/subsection.3.12.4<</Rect[291.695 4222.3 299.997 4130.98]/D[null/XYZ 36.1346 222.424 null]>>/page.338<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.512<</Rect[291.695 3657.3 299.997 3565.98]/D[null/XYZ 36.1346 290.478 null]>>/page.339<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.513<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.514<</Rect[291.695 1279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/section*.515<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/section*.516<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.210<</Rect[291.695 1074.3 299.997 982.977]/D[null/XYZ 36.1346 601.6 null]>>/section*.517<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.211<</Rect[291.695 4772.3 299.997 4680.98]/D[null/XYZ 36.1346 156.177 
 null]>>/section*.518<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null]>>/section*.212<</Rect[291.695 3581.3 299.997 3489.98]/D[null/XYZ 36.1346 299.632 null]>>/section*.519<</Rect[291.695 3657.3 299.997 3565.98]/D[null/XYZ 36.1346 290.478 null]>>/section*.213<</Rect[291.695 3284.3 299.997 3192.98]/D[null/XYZ 36.1346 335.406 null]>>/section*.214<</Rect[291.695 649.302 299.997 557.977]/D[null/XYZ 36.1346 652.792 null]>>/section*.215<</Rect[291.695 4745.3 299.997 4653.98]/D[null/XYZ 36.1346 159.428 null]>>/section*.216<</Rect[291.695 3742.3 299.997 3650.98]/D[null/XYZ 36.1346 280.24 null]>>/section*.217<</Rect[291.695 3152.3 299.997 3060.98]/D[null/XYZ 36.1346 351.306 null]>>/section*.218<</Rect[291.695 3696.3 299.997 3604.98]/D[null/XYZ 36.1346 285.781 null]>>/section*.219<</Rect[291.695 4422.3 299.997 4330.98]/D[null/XYZ 36.1346 198.334 null]>>/subsection.3.3.30<</Rect[291.695 4203.3 299.997 4111.98]/D[null/XYZ 36.1346 224.713 null]>>/subsection.3.3.31<<
 /Rect[291.695 1737.3 299.997 1645.98]/D[null/XYZ 36.1346 521.742 null]>>/page.640<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.32<</Rect[291.695 3027.3 299.997 2935.98]/D[null/XYZ 36.1346 366.362 null]>>/page.641<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.33<</Rect[291.695 3148.3 299.997 3056.97]/D[null/XYZ 36.1346 351.787 null]>>/page.642<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.34<</Rect[291.695 1521.3 299.997 1429.98]/D[null/XYZ 36.1346 547.759 null]>>/page.643<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.644<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.645<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.646<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.340<</Rect[291.695 228.299 308.299 211.695]/D[n
 ull/XYZ 36.1346 693.501 null]>>/page.647<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.341<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.648<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.342<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.649<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.343<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.344<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.345<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.346<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.520<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.347<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.521<</Rect[291.695 1
 279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/page.348<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.522<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/page.349<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.523<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.524<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.525<</Rect[291.695 2334.3 299.997 2242.98]/D[null/XYZ 36.1346 449.833 null]>>/section*.526<</Rect[291.695 2476.3 299.997 2384.98]/D[null/XYZ 36.1346 432.73 null]>>/section*.220<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.527<</Rect[291.695 4633.3 299.997 4541.98]/D[null/XYZ 36.1346 172.919 null]>>/section*.221<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.528<</Rect[291.695 1795.3 299.997 1703.98]/D[null/XYZ 36.13
 46 514.756 null]>>/section*.222<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/section*.529<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.223<</Rect[291.695 4830.3 299.997 4738.98]/D[null/XYZ 36.1346 149.19 null]>>/section*.224<</Rect[291.695 1158.3 299.997 1066.97]/D[null/XYZ 36.1346 591.483 null]>>/section*.225<</Rect[291.695 1328.3 299.997 1236.97]/D[null/XYZ 36.1346 571.006 null]>>/section*.226<</Rect[291.695 3266.3 299.997 3174.98]/D[null/XYZ 36.1346 337.574 null]>>/subsection.3.9.1<</Rect[291.695 3663.3 299.997 3571.98]/D[null/XYZ 36.1346 289.756 null]>>/section*.227<</Rect[291.695 2718.3 299.997 2626.97]/D[null/XYZ 36.1346 403.581 null]>>/subsection.3.9.2<</Rect[291.695 2380.3 299.997 2288.98]/D[null/XYZ 36.1346 444.293 null]>>/section*.228<</Rect[291.695 3263.3 299.997 3171.97]/D[null/XYZ 36.1346 337.936 null]>>/section*.229<</Rect[291.695 3889.3 299.997 3797.98]/D[null/XYZ 36.1346 262.534 null]>>/page.
 650<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.651<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.1<</Rect[291.695 2036.3 299.997 1944.98]/D[null/XYZ 36.1346 485.728 null]>>/page.652<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.2<</Rect[291.695 2840.3 299.997 2748.98]/D[null/XYZ 36.1346 388.886 null]>>/page.653<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.3<</Rect[291.695 3711.3 299.997 3619.98]/D[null/XYZ 36.1346 283.974 null]>>/page.654<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.4<</Rect[291.695 1432.3 299.997 1340.98]/D[null/XYZ 36.1346 558.479 null]>>/page.655<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.5<</Rect[291.695 2607.3 299.997 2515.98]/D[null/XYZ 36.1346 416.951 null]>>/page.656<</Rect[291.695 228.299 308
 .299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.6<</Rect[291.695 4591.3 299.997 4499.98]/D[null/XYZ 36.1346 177.978 null]>>/page.657<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.350<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.7<</Rect[291.695 4607.3 299.997 4515.98]/D[null/XYZ 36.1346 176.051 null]>>/page.658<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.351<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.8<</Rect[291.695 1587.3 299.997 1495.98]/D[null/XYZ 36.1346 539.81 null]>>/page.659<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.1<</Rect[291.695 3609.3 299.997 3517.98]/D[null/XYZ 36.1346 296.26 null]>>/page.352<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.6.9<</Rect[291.695 1886.3 299.997 1794.98]/D[null/XYZ 36.1346
  503.795 null]>>/subsection.3.3.2<</Rect[291.695 3309.3 299.997 3217.98]/D[null/XYZ 36.1346 332.395 null]>>/page.353<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.3<</Rect[291.695 2790.3 299.997 2698.98]/D[null/XYZ 36.1346 394.908 null]>>/page.354<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.3.4<</Rect[291.695 2085.3 299.997 1993.98]/D[null/XYZ 36.1346 479.826 null]>>/page.355<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.530<</Rect[291.695 1279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/subsection.3.3.5<</Rect[291.695 4377.3 299.997 4285.98]/D[null/XYZ 36.1346 203.754 null]>>/page.356<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.531<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/subsection.3.3.6<</Rect[291.695 1487.3 299.997 1395.98]/D[null/XYZ 36.1346 551.855 null]>>/page.35
 7<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.532<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/subsection.3.3.7<</Rect[291.695 4310.3 299.997 4218.98]/D[null/XYZ 36.1346 211.824 null]>>/page.358<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.533<</Rect[291.695 1242.3 299.997 1150.98]/D[null/XYZ 36.1346 581.365 null]>>/subsection.3.3.8<</Rect[291.695 4177.3 299.997 4085.98]/D[null/XYZ 36.1346 227.844 null]>>/page.359<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.534<</Rect[291.695 1866.3 299.997 1774.98]/D[null/XYZ 36.1346 506.204 null]>>/subsection.3.3.9<</Rect[291.695 1637.3 299.997 1545.98]/D[null/XYZ 36.1346 533.787 null]>>/section*.535<</Rect[291.695 4784.3 299.997 4692.98]/D[null/XYZ 36.1346 154.731 null]>>/section*.536<</Rect[291.695 1331.3 299.997 1239.98]/D[null/XYZ 36.1346 570.645 null]>>/section*.230<</Rect[291.695 4415.3 29
 9.997 4323.98]/D[null/XYZ 36.1346 199.177 null]>>/section*.537<</Rect[291.695 2370.3 299.997 2278.98]/D[null/XYZ 36.1346 445.497 null]>>/section*.231<</Rect[291.695 3067.3 299.997 2975.98]/D[null/XYZ 36.1346 361.544 null]>>/section*.538<</Rect[291.695 3129.3 299.997 3037.98]/D[null/XYZ 36.1346 354.076 null]>>/section*.232<</Rect[291.695 1400.3 299.997 1308.98]/D[null/XYZ 36.1346 562.334 null]>>/section*.539<</Rect[291.695 3754.3 299.997 3662.98]/D[null/XYZ 36.1346 278.794 null]>>/section*.233<</Rect[291.695 2323.3 299.997 2231.97]/D[null/XYZ 36.1346 451.159 null]>>/subsection.6.4.1<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.234<</Rect[291.695 4370.3 299.997 4278.98]/D[null/XYZ 36.1346 204.597 null]>>/subsection.6.4.2<</Rect[291.695 1118.3 299.997 1026.97]/D[null/XYZ 36.1346 596.301 null]>>/section*.235<</Rect[291.695 2671.3 299.997 2579.98]/D[null/XYZ 36.1346 409.242 null]>>/section*.236<</Rect[291.695 3313.3 299.997 3221.97]/D[null/X
 YZ 36.1346 331.913 null]>>/section*.237<</Rect[291.695 4038.3 299.997 3946.98]/D[null/XYZ 36.1346 244.587 null]>>/section*.238<</Rect[291.695 770.301 299.997 678.977]/D[null/XYZ 36.1346 638.217 null]>>/section*.239<</Rect[291.695 2327.3 299.997 2235.98]/D[null/XYZ 36.1346 450.677 null]>>/subsection.6.1.1<</Rect[291.695 1271.3 299.997 1179.98]/D[null/XYZ 36.1346 577.872 null]>>/subsection.6.1.2<</Rect[291.695 3043.3 299.997 2951.97]/D[null/XYZ 36.1346 364.435 null]>>/subsection.6.1.3<</Rect[291.695 3669.3 299.997 3577.98]/D[null/XYZ 36.1346 289.033 null]>>/page.660<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.661<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.662<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.663<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.664<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.66
 5<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.666<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.360<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.667<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.361<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.668<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.362<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.669<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.363<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.364<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.365<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.540<</Rect[291.695 4299.3 299.997 4207.98]/D[null/XYZ 36.1346 2
 13.149 null]>>/page.366<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.541<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.367<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.542<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.368<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.543<</Rect[291.695 2499.3 299.997 2407.98]/D[null/XYZ 36.1346 429.959 null]>>/page.369<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.544<</Rect[291.695 4353.3 299.997 4261.98]/D[null/XYZ 36.1346 206.645 null]>>/section*.545<</Rect[291.695 3470.3 299.997 3378.98]/D[null/XYZ 36.1346 313.002 null]>>/section*.546<</Rect[291.695 4114.3 299.997 4022.98]/D[null/XYZ 36.1346 235.432 null]>>/section*.240<</Rect[291.695 3264.3 299.997 3172.98]/D[null/XYZ 36.1346 337.815 null]>>/section*.547<</Rect[291.695 14
 77.3 299.997 1385.98]/D[null/XYZ 36.1346 553.059 null]>>/section*.241<</Rect[291.695 1560.3 299.997 1468.98]/D[null/XYZ 36.1346 543.062 null]>>/section*.548<</Rect[291.695 2022.3 299.997 1930.98]/D[null/XYZ 36.1346 487.414 null]>>/section*.242<</Rect[291.695 3600.3 299.997 3508.98]/D[null/XYZ 36.1346 297.344 null]>>/section*.549<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.243<</Rect[291.695 4284.3 299.997 4192.98]/D[null/XYZ 36.1346 214.956 null]>>/section*.244<</Rect[291.695 2603.3 299.997 2511.97]/D[null/XYZ 36.1346 417.433 null]>>/section*.245<</Rect[291.695 3936.3 299.997 3844.98]/D[null/XYZ 36.1346 256.873 null]>>/section*.246<</Rect[291.695 2058.3 299.997 1966.97]/D[null/XYZ 36.1346 483.078 null]>>/section*.247<</Rect[291.695 1529.3 299.997 1437.98]/D[null/XYZ 36.1346 546.796 null]>>/section*.248<</Rect[291.695 2985.3 299.997 2893.98]/D[null/XYZ 36.1346 371.421 null]>>/section*.249<</Rect[291.695 4557.3 299.997 4465.98]/D[null/XYZ 
 36.1346 182.073 null]>>/page.670<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.671<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.672<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.673<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.674<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.675<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.676<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.370<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.677<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.371<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.678<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.372<</Rect[291.695 228.299 308.299 2
 11.695]/D[null/XYZ 36.1346 693.501 null]>>/page.679<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.373<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.374<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.375<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.376<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.550<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.377<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.551<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/page.378<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.552<</Rect[291.695 2277.3 299.997 2185.98]/D[null/XYZ 36.1346 456.699 null]>>/page.379<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.553<
 </Rect[291.695 3268.3 299.997 3176.97]/D[null/XYZ 36.1346 337.333 null]>>/section*.554<</Rect[291.695 3794.3 299.997 3702.98]/D[null/XYZ 36.1346 273.976 null]>>/section*.555<</Rect[291.695 4339.3 299.997 4247.98]/D[null/XYZ 36.1346 208.331 null]>>/section*.556<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.250<</Rect[291.695 1566.3 299.997 1474.98]/D[null/XYZ 36.1346 542.339 null]>>/section*.557<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.251<</Rect[291.695 2391.3 299.997 2299.98]/D[null/XYZ 36.1346 442.968 null]>>/section*.558<</Rect[291.695 2301.3 299.997 2209.98]/D[null/XYZ 36.1346 453.808 null]>>/section*.252<</Rect[291.695 936.3 299.997 844.976]/D[null/XYZ 36.1346 618.223 null]>>/section*.559<</Rect[291.695 3225.3 299.997 3133.98]/D[null/XYZ 36.1346 342.513 null]>>/section*.253<</Rect[291.695 3106.3 299.997 3014.98]/D[null/XYZ 36.1346 356.846 null]>>/section*.254<</Rect[291.695 3749.3 299.997 36
 57.98]/D[null/XYZ 36.1346 279.397 null]>>/section*.255<</Rect[291.695 1476.3 299.997 1384.98]/D[null/XYZ 36.1346 553.18 null]>>/section*.256<</Rect[291.695 2598.3 299.997 2506.97]/D[null/XYZ 36.1346 418.035 null]>>/section*.257<</Rect[291.695 3980.3 299.997 3888.98]/D[null/XYZ 36.1346 251.573 null]>>/section*.258<</Rect[291.695 790.301 299.997 698.977]/D[null/XYZ 36.1346 635.808 null]>>/section*.259<</Rect[291.695 2378.3 299.997 2286.97]/D[null/XYZ 36.1346 444.534 null]>>/page.680<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.681<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.682<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.683<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.684<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.685<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.686
 <</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.380<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.687<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.381<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.688<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.382<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.689<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.383<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.384<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.385<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.386<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.560<</Rect[291.695 2110.3 299.997 2018.98]/D[null/XYZ 36.1346 47
 6.814 null]>>/page.387<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.561<</Rect[291.695 2654.3 299.997 2562.98]/D[null/XYZ 36.1346 411.289 null]>>/page.388<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.562<</Rect[291.695 3353.3 299.997 3261.97]/D[null/XYZ 36.1346 327.095 null]>>/page.389<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.563<</Rect[291.695 3978.3 299.997 3886.98]/D[null/XYZ 36.1346 251.814 null]>>/section*.564<</Rect[291.695 4523.3 299.997 4431.98]/D[null/XYZ 36.1346 186.169 null]>>/section*.565<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.566<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.260<</Rect[291.695 3351.3 299.997 3259.98]/D[null/XYZ 36.1346 327.336 null]>>/section*.567<</Rect[291.695 2499.3 299.997 2407.98]/D[null/XYZ 36.1346 429.959 null]>>/section*.261<</Rect[291.695
  4012.3 299.997 3920.98]/D[null/XYZ 36.1346 247.719 null]>>/section*.568<</Rect[291.695 3988.3 299.997 3896.98]/D[null/XYZ 36.1346 250.609 null]>>/section*.262<</Rect[291.695 2603.3 299.997 2511.97]/D[null/XYZ 36.1346 417.433 null]>>/section*.569<</Rect[291.695 2188.3 299.997 2096.97]/D[null/XYZ 36.1346 467.419 null]>>/section*.263<</Rect[291.695 4098.3 299.997 4006.98]/D[null/XYZ 36.1346 237.36 null]>>/section*.264<</Rect[291.695 789.302 299.997 697.977]/D[null/XYZ 36.1346 635.929 null]>>/section*.265<</Rect[291.695 2753.3 299.997 2661.97]/D[null/XYZ 36.1346 399.365 null]>>/section*.266<</Rect[291.695 902.3 299.997 810.975]/D[null/XYZ 36.1346 622.318 null]>>/section*.267<</Rect[291.695 3739.3 299.997 3647.98]/D[null/XYZ 36.1346 280.601 null]>>/section*.268<</Rect[291.695 1414.3 299.997 1322.98]/D[null/XYZ 36.1346 560.647 null]>>/section*.269<</Rect[291.695 1763.3 299.997 1671.97]/D[null/XYZ 36.1346 518.611 null]>>/page.690<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 
 36.1346 693.501 null]>>/page.691<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.692<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.693<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.694<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.695<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.696<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.390<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.697<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.391<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.698<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.392<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.699<</Rect[291.695 228.299 308.299 2
 11.695]/D[null/XYZ 36.1346 693.501 null]>>/page.393<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.394<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.395<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.396<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.570<</Rect[291.695 2831.3 299.997 2739.98]/D[null/XYZ 36.1346 389.97 null]>>/page.397<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.571<</Rect[291.695 4305.3 299.997 4213.98]/D[null/XYZ 36.1346 212.427 null]>>/page.398<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.572<</Rect[291.695 4848.3 299.997 4756.98]/D[null/XYZ 36.1346 147.022 null]>>/page.399<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.573<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.5
 74<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.575<</Rect[291.695 2500.3 299.997 2408.98]/D[null/XYZ 36.1346 429.839 null]>>/section*.576<</Rect[291.695 4421.3 299.997 4329.98]/D[null/XYZ 36.1346 198.454 null]>>/section*.270<</Rect[291.695 2800.3 299.997 2708.98]/D[null/XYZ 36.1346 393.704 null]>>/section*.577<</Rect[291.695 3144.3 299.997 3052.98]/D[null/XYZ 36.1346 352.269 null]>>/section*.271<</Rect[291.695 3543.3 299.997 3451.98]/D[null/XYZ 36.1346 304.21 null]>>/section*.578<</Rect[291.695 3785.3 299.997 3693.98]/D[null/XYZ 36.1346 275.06 null]>>/section*.272<</Rect[291.695 4848.3 299.997 4756.98]/D[null/XYZ 36.1346 147.022 null]>>/section*.579<</Rect[291.695 944.302 299.997 852.977]/D[null/XYZ 36.1346 617.259 null]>>/section*.273<</Rect[291.695 2961.3 299.997 2869.98]/D[null/XYZ 36.1346 374.311 null]>>/section*.274<</Rect[291.695 4251.3 299.997 4159.98]/D[null/XYZ 36.1346 218.931 null]>>/section*.275<</Rect[291.695 673.299 299.997
  581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.276<</Rect[291.695 2910.3 299.997 2818.98]/D[null/XYZ 36.1346 380.454 null]>>/section*.277<</Rect[291.695 3851.3 299.997 3759.98]/D[null/XYZ 36.1346 267.111 null]>>/section*.278<</Rect[291.695 4483.3 299.997 4391.98]/D[null/XYZ 36.1346 190.987 null]>>/section*.279<</Rect[291.695 1483.3 299.997 1391.97]/D[null/XYZ 36.1346 552.337 null]>>/section*.580<</Rect[291.695 1489.3 299.997 1397.98]/D[null/XYZ 36.1346 551.614 null]>>/section*.581<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.582<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.583<</Rect[291.695 2400.3 299.997 2308.98]/D[null/XYZ 36.1346 441.884 null]>>/section*.584<</Rect[291.695 3890.3 299.997 3798.98]/D[null/XYZ 36.1346 262.413 null]>>/section*.585<</Rect[291.695 3106.3 299.997 3014.98]/D[null/XYZ 36.1346 356.846 null]>>/section*.586<</Rect[291.695 3750.3 299.997 3658.98]/D[null/XYZ 36.1346 279
 .276 null]>>/section*.280<</Rect[291.695 3136.3 299.997 3044.98]/D[null/XYZ 36.1346 353.233 null]>>/section*.587<</Rect[291.695 4681.3 299.997 4589.98]/D[null/XYZ 36.1346 167.137 null]>>/section*.281<</Rect[291.695 4061.3 299.997 3969.98]/D[null/XYZ 36.1346 241.816 null]>>/section*.588<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.282<</Rect[291.695 4457.3 299.997 4365.98]/D[null/XYZ 36.1346 194.118 null]>>/section*.589<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.283<</Rect[291.695 3901.3 299.997 3809.98]/D[null/XYZ 36.1346 261.088 null]>>/section*.284<</Rect[291.695 2252.3 299.997 2160.98]/D[null/XYZ 36.1346 459.71 null]>>/section*.285<</Rect[291.695 1195.3 299.997 1103.98]/D[null/XYZ 36.1346 587.026 null]>>/section*.286<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.287<</Rect[291.695 3604.3 299.997 3512.98]/D[null/XYZ 36.1346 296.862 null]>>/section*.288<</Rec
 t[291.695 1517.3 299.997 1425.98]/D[null/XYZ 36.1346 548.241 null]>>/section*.289<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.590<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.591<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.592<</Rect[291.695 2035.3 299.997 1943.98]/D[null/XYZ 36.1346 485.848 null]>>/section*.593<</Rect[291.695 2761.3 299.997 2669.98]/D[null/XYZ 36.1346 398.401 null]>>/section*.594<</Rect[291.695 4663.3 299.997 4571.98]/D[null/XYZ 36.1346 169.306 null]>>/section*.595<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.596<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.290<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.597<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.291<</Rect[291.695 2676.3 299.997 2584.
 98]/D[null/XYZ 36.1346 408.64 null]>>/section*.598<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.292<</Rect[291.695 2540.3 299.997 2448.98]/D[null/XYZ 36.1346 425.021 null]>>/section*.599<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/section*.293<</Rect[291.695 3238.3 299.997 3146.97]/D[null/XYZ 36.1346 340.947 null]>>/section*.294<</Rect[291.695 2739.3 299.997 2647.98]/D[null/XYZ 36.1346 401.051 null]>>/section*.295<</Rect[291.695 2943.3 299.997 2851.97]/D[null/XYZ 36.1346 376.48 null]>>/section*.296<</Rect[291.695 2806.3 299.997 2714.98]/D[null/XYZ 36.1346 392.981 null]>>/section*.297<</Rect[291.695 3979.3 299.997 3887.98]/D[null/XYZ 36.1346 251.693 null]>>/section*.298<</Rect[291.695 2639.3 299.997 2547.98]/D[null/XYZ 36.1346 413.096 null]>>/section*.299<</Rect[291.695 2091.3 299.997 1999.98]/D[null/XYZ 36.1346 479.103 null]>>/chapter.1<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]
 >>/chapter.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.4<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.5<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.6<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.7<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.8<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/chapter.9<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.3.10<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.3.11<</Rect[291.695 3071.3 299.997 2979.98]/D[null/XYZ 36.1346 361.062 null]>>/section.3.12<</Rect[291.695 3808.3 299.997 3716.98]/D[null/XYZ 36.1346 272.29 null]>>/section.3.13<</Rect[291.695 3682.3 299.997 35
 90.98]/D[null/XYZ 36.1346 287.467 null]>>/section.3.14<</Rect[291.695 4236.3 299.997 4144.98]/D[null/XYZ 36.1346 220.738 null]>>/section.3.15<</Rect[291.695 3679.3 299.997 3587.98]/D[null/XYZ 36.1346 287.828 null]>>/section.3.16<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/figure.3.1<</Rect[1842.7 2585.3 1859.3 2568.7]/D[null/XYZ 222.953 409.601 null]>>/figure.3.2<</Rect[1565.7 4974.3 1582.3 4957.7]/D[null/XYZ 189.588 121.845 null]>>/subsection.2.8.1<</Rect[291.695 2683.3 299.997 2591.97]/D[null/XYZ 36.1346 407.797 null]>>/figure.3.3<</Rect[1881.69 3471.3 1898.3 3454.7]/D[null/XYZ 227.65 302.882 null]>>/subsection.2.8.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/figure.3.4<</Rect[1640.7 4027.3 1657.3 4010.7]/D[null/XYZ 198.622 235.912 null]>>/subsection.2.8.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.2.5.1<</Rect[291.695 807.3 299.997 715.975]/D[null/XYZ 36.1346 633.761 
 null]>>/subsection.2.5.2<</Rect[291.695 4109.3 299.997 4017.98]/D[null/XYZ 36.1346 236.035 null]>>/subsection.2.5.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.2.5.4<</Rect[291.695 2897.3 299.997 2805.98]/D[null/XYZ 36.1346 382.02 null]>>/subsection.2.5.5<</Rect[291.695 3826.3 299.997 3734.98]/D[null/XYZ 36.1346 270.122 null]>>/subsection.2.5.6<</Rect[291.695 2728.3 299.997 2636.97]/D[null/XYZ 36.1346 402.376 null]>>/subsection.2.5.7<</Rect[291.695 2218.3 299.997 2126.97]/D[null/XYZ 36.1346 463.806 null]>>/subsection.5.6.1<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.5.6.2<</Rect[291.695 4411.3 299.997 4319.98]/D[null/XYZ 36.1346 199.659 null]>>/subsection.5.6.3<</Rect[291.695 4491.3 299.997 4399.98]/D[null/XYZ 36.1346 190.023 null]>>/subsection.5.6.4<</Rect[291.695 780.301 299.997 688.977]/D[null/XYZ 36.1346 637.013 null]>>/subsection.5.6.5<</Rect[291.695 824.302 299.997 732.977]/D[null/XYZ 3
 6.1346 631.713 null]>>/subsection.5.3.1<</Rect[291.695 1818.3 299.997 1726.97]/D[null/XYZ 36.1346 511.986 null]>>/subsection.5.3.2<</Rect[291.695 1978.3 299.997 1886.97]/D[null/XYZ 36.1346 492.714 null]>>/subsection.5.3.3<</Rect[291.695 1139.3 299.997 1047.98]/D[null/XYZ 36.1346 593.771 null]>>/subsection.5.3.4<</Rect[291.695 3984.3 299.997 3892.98]/D[null/XYZ 36.1346 251.091 null]>>/subsection.5.3.5<</Rect[291.695 1870.3 299.997 1778.98]/D[null/XYZ 36.1346 505.722 null]>>/subsection.5.3.6<</Rect[291.695 4580.3 299.997 4488.98]/D[null/XYZ 36.1346 179.303 null]>>/subsection.5.3.7<</Rect[291.695 2548.3 299.997 2456.97]/D[null/XYZ 36.1346 424.057 null]>>/subsection.5.3.8<</Rect[291.695 4494.3 299.997 4402.98]/D[null/XYZ 36.1346 189.661 null]>>/subsection.5.3.9<</Rect[291.695 3379.3 299.997 3287.98]/D[null/XYZ 36.1346 323.963 null]>>/subsection.8.1.1<</Rect[291.695 3206.3 299.997 3114.98]/D[null/XYZ 36.1346 344.801 null]>>/subsection.8.1.2<</Rect[291.695 528.299 299.997 436.975]
 /D[null/XYZ 36.1346 667.366 null]>>/subsection.8.1.3<</Rect[291.695 1620.3 299.997 1528.98]/D[null/XYZ 36.1346 535.835 null]>>/table.4.1<</Rect[1684.7 1725.3 1701.3 1708.7]/D[null/XYZ 203.922 513.187 null]>>/table.4.2<</Rect[1526.69 667.3 1543.3 650.695]/D[null/XYZ 184.89 640.624 null]>>/table.4.3<</Rect[1544.7 667.3 1561.3 650.695]/D[null/XYZ 187.059 640.624 null]>>/table.1.1<</Rect[1420.7 3807.3 1437.3 3790.7]/D[null/XYZ 172.123 262.411 null]>>/table.1.2<</Rect[1331.69 1004.3 1348.3 987.697]/D[null/XYZ 161.403 600.032 null]>>/page.xiii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/table.1.3<</Rect[1293.7 2225.3 1310.3 2208.7]/D[null/XYZ 156.826 452.962 null]>>/table.1.4<</Rect[967.697 4659.3 984.302 4642.7]/D[null/XYZ 117.559 159.787 null]>>/subsection.2.15.1<</Rect[291.695 3011.3 299.997 2919.98]/D[null/XYZ 36.1346 368.289 null]>>/subsection.2.12.1<</Rect[291.695 2717.3 299.997 2625.98]/D[null/XYZ 36.1346 403.701 null]>>/subsection.2.12.2<</Re
 ct[291.695 4404.3 299.997 4312.98]/D[null/XYZ 36.1346 200.502 null]>>/Item.100<</Rect[291.695 1648.3 299.997 1556.97]/D[null/XYZ 36.1346 532.462 null]>>/Item.101<</Rect[291.695 2312.3 299.997 2220.98]/D[null/XYZ 36.1346 452.484 null]>>/Item.102<</Rect[291.695 2479.3 299.997 2387.98]/D[null/XYZ 36.1346 432.368 null]>>/Item.103<</Rect[291.695 2645.3 299.997 2553.98]/D[null/XYZ 36.1346 412.374 null]>>/Item.104<</Rect[291.695 2535.3 299.997 2443.98]/D[null/XYZ 36.1346 425.623 null]>>/Item.105<</Rect[291.695 2701.3 299.997 2609.98]/D[null/XYZ 36.1346 405.628 null]>>/Item.106<</Rect[291.695 3453.3 299.997 3361.98]/D[null/XYZ 36.1346 315.05 null]>>/Item.107<</Rect[291.695 4108.3 299.997 4016.98]/D[null/XYZ 36.1346 236.155 null]>>/Item.108<</Rect[291.695 1853.3 299.997 1761.97]/D[null/XYZ 36.1346 507.77 null]>>/Item.109<</Rect[291.695 2008.3 299.997 1916.97]/D[null/XYZ 36.1346 489.1 null]>>/Item.110<</Rect[291.695 2162.3 299.997 2070.98]/D[null/XYZ 36.1346 470.551 null]>>/Item.111<<
 /Rect[291.695 2310.3 299.997 2218.98]/D[null/XYZ 36.1346 452.724 null]>>/Item.112<</Rect[291.695 1377.3 299.997 1285.98]/D[null/XYZ 36.1346 565.104 null]>>/Item.113<</Rect[291.695 2329.3 299.997 2237.98]/D[null/XYZ 36.1346 450.436 null]>>/Item.114<</Rect[291.695 2695.3 299.997 2603.98]/D[null/XYZ 36.1346 406.351 null]>>/Item.115<</Rect[291.695 2837.3 299.997 2745.98]/D[null/XYZ 36.1346 389.247 null]>>/Item.116<</Rect[291.695 3309.3 299.997 3217.98]/D[null/XYZ 36.1346 332.395 null]>>/Item.117<</Rect[291.695 732.3 299.997 640.975]/D[null/XYZ 36.1346 642.794 null]>>/Item.118<</Rect[291.695 1315.3 299.997 1223.98]/D[null/XYZ 36.1346 572.572 null]>>/Item.119<</Rect[291.695 2593.3 299.997 2501.97]/D[null/XYZ 36.1346 418.637 null]>>/Item.120<</Rect[291.695 2235.3 299.997 2143.98]/D[null/XYZ 36.1346 461.758 null]>>/Item.121<</Rect[291.695 2395.3 299.997 2303.98]/D[null/XYZ 36.1346 442.486 null]>>/Item.122<</Rect[291.695 2556.3 299.997 2464.98]/D[null/XYZ 36.1346 423.094 null]>>/Item
 .123<</Rect[291.695 4305.3 299.997 4213.98]/D[null/XYZ 36.1346 212.427 null]>>/Item.124<</Rect[291.695 4466.3 299.997 4374.98]/D[null/XYZ 36.1346 193.034 null]>>/Item.125<</Rect[291.695 4632.3 299.997 4540.98]/D[null/XYZ 36.1346 173.04 null]>>/Item.126<</Rect[291.695 4798.3 299.997 4706.98]/D[null/XYZ 36.1346 153.045 null]>>/Item.127<</Rect[291.695 3690.3 299.997 3598.98]/D[null/XYZ 36.1346 286.503 null]>>/Item.128<</Rect[291.695 3935.3 299.997 3843.98]/D[null/XYZ 36.1346 256.993 null]>>/Item.129<</Rect[291.695 4172.3 299.997 4080.98]/D[null/XYZ 36.1346 228.447 null]>>/Item.130<</Rect[291.695 2071.3 299.997 1979.98]/D[null/XYZ 36.1346 481.512 null]>>/Item.131<</Rect[291.695 2253.3 299.997 2161.97]/D[null/XYZ 36.1346 459.59 null]>>/Item.132<</Rect[291.695 2417.3 299.997 2325.98]/D[null/XYZ 36.1346 439.836 null]>>/Item.133<</Rect[291.695 2681.3 299.997 2589.98]/D[null/XYZ 36.1346 408.037 null]>>/Item.134<</Rect[291.695 3738.3 299.997 3646.98]/D[null/XYZ 36.1346 280.722 null]>>
 /Item.135<</Rect[291.695 3953.3 299.997 3861.98]/D[null/XYZ 36.1346 254.825 null]>>/Item.136<</Rect[291.695 4151.3 299.997 4059.98]/D[null/XYZ 36.1346 230.976 null]>>/Item.137<</Rect[291.695 4383.3 299.997 4291.98]/D[null/XYZ 36.1346 203.032 null]>>/Item.138<</Rect[291.695 4947.3 299.997 4855.98]/D[null/XYZ 36.1346 135.098 null]>>/Item.139<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.140<</Rect[291.695 619.302 299.997 527.977]/D[null/XYZ 36.1346 656.405 null]>>/Item.141<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.142<</Rect[291.695 917.3 299.997 825.975]/D[null/XYZ 36.1346 620.511 null]>>/Item.143<</Rect[291.695 1248.3 299.997 1156.97]/D[null/XYZ 36.1346 580.642 null]>>/Item.144<</Rect[291.695 1579.3 299.997 1487.98]/D[null/XYZ 36.1346 540.773 null]>>/Item.145<</Rect[291.695 4427.3 299.997 4335.98]/D[null/XYZ 36.1346 197.732 null]>>/Item.146<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.3
 66 null]>>/Item.147<</Rect[291.695 1688.3 299.997 1596.97]/D[null/XYZ 36.1346 527.644 null]>>/Item.148<</Rect[291.695 946.3 299.997 854.976]/D[null/XYZ 36.1346 617.018 null]>>/Item.149<</Rect[291.695 2535.3 299.997 2443.98]/D[null/XYZ 36.1346 425.623 null]>>/subsection.4.5.1<</Rect[291.695 1523.3 299.997 1431.97]/D[null/XYZ 36.1346 547.519 null]>>/subsection.4.5.2<</Rect[291.695 1875.3 299.997 1783.98]/D[null/XYZ 36.1346 505.12 null]>>/Item.150<</Rect[291.695 2335.3 299.997 2243.98]/D[null/XYZ 36.1346 449.713 null]>>/subsection.4.5.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.151<</Rect[291.695 2501.3 299.997 2409.98]/D[null/XYZ 36.1346 429.718 null]>>/subsection.4.5.4<</Rect[291.695 985.301 299.997 893.977]/D[null/XYZ 36.1346 612.32 null]>>/Item.152<</Rect[291.695 2667.3 299.997 2575.98]/D[null/XYZ 36.1346 409.724 null]>>/subsection.4.5.5<</Rect[291.695 1511.3 299.997 1419.98]/D[null/XYZ 36.1346 548.964 null]>>/Item.153<</Rect[291.695 32
 25.3 299.997 3133.98]/D[null/XYZ 36.1346 342.513 null]>>/Item.154<</Rect[291.695 3505.3 299.997 3413.98]/D[null/XYZ 36.1346 308.786 null]>>/Item.155<</Rect[291.695 4066.3 299.997 3974.98]/D[null/XYZ 36.1346 241.214 null]>>/subsection.4.2.1<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.156<</Rect[291.695 1727.3 299.997 1635.98]/D[null/XYZ 36.1346 522.947 null]>>/subsection.4.2.2<</Rect[291.695 2870.3 299.997 2778.98]/D[null/XYZ 36.1346 385.272 null]>>/Item.157<</Rect[291.695 1992.3 299.997 1900.98]/D[null/XYZ 36.1346 491.027 null]>>/subsection.4.2.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.158<</Rect[291.695 2391.3 299.997 2299.98]/D[null/XYZ 36.1346 442.968 null]>>/subsection.4.2.4<</Rect[291.695 3162.3 299.997 3070.98]/D[null/XYZ 36.1346 350.101 null]>>/Item.159<</Rect[291.695 2972.3 299.997 2880.98]/D[null/XYZ 36.1346 372.987 null]>>/Item.160<</Rect[291.695 1965.3 299.997 1873.98]/D[null/XYZ 36.1346 4
 94.28 null]>>/Item.161<</Rect[291.695 2131.3 299.997 2039.98]/D[null/XYZ 36.1346 474.285 null]>>/Item.162<</Rect[291.695 2298.3 299.997 2206.97]/D[null/XYZ 36.1346 454.17 null]>>/Item.163<</Rect[291.695 4303.3 299.997 4211.98]/D[null/XYZ 36.1346 212.668 null]>>/Item.164<</Rect[291.695 4446.3 299.997 4354.98]/D[null/XYZ 36.1346 195.443 null]>>/Item.165<</Rect[291.695 4461.3 299.997 4369.98]/D[null/XYZ 36.1346 193.636 null]>>/Item.166<</Rect[291.695 4639.3 299.997 4547.98]/D[null/XYZ 36.1346 172.196 null]>>/Item.167<</Rect[291.695 4805.3 299.997 4713.98]/D[null/XYZ 36.1346 152.202 null]>>/Item.168<</Rect[291.695 4971.3 299.997 4879.98]/D[null/XYZ 36.1346 132.207 null]>>/Item.169<</Rect[291.695 1665.3 299.997 1573.98]/D[null/XYZ 36.1346 530.414 null]>>/Item.170<</Rect[291.695 1931.3 299.997 1839.98]/D[null/XYZ 36.1346 498.375 null]>>/Item.171<</Rect[291.695 1482.3 299.997 1390.98]/D[null/XYZ 36.1346 552.457 null]>>/Item.172<</Rect[291.695 1647.3 299.997 1555.98]/D[null/XYZ 36.1
 346 532.583 null]>>/Item.173<</Rect[291.695 2014.3 299.997 1922.98]/D[null/XYZ 36.1346 488.377 null]>>/Item.174<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.175<</Rect[291.695 1690.3 299.997 1598.98]/D[null/XYZ 36.1346 527.403 null]>>/Item.176<</Rect[291.695 1955.3 299.997 1863.98]/D[null/XYZ 36.1346 495.484 null]>>/Item.177<</Rect[291.695 3744.3 299.997 3652.98]/D[null/XYZ 36.1346 279.999 null]>>/Item.178<</Rect[291.695 4346.3 299.997 4254.98]/D[null/XYZ 36.1346 207.488 null]>>/Item.179<</Rect[291.695 2471.3 299.997 2379.98]/D[null/XYZ 36.1346 433.332 null]>>/Item.180<</Rect[291.695 3859.3 299.997 3767.98]/D[null/XYZ 36.1346 266.147 null]>>/Item.181<</Rect[291.695 4325.3 299.997 4233.98]/D[null/XYZ 36.1346 210.018 null]>>/Item.182<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.183<</Rect[291.695 2042.3 299.997 1950.98]/D[null/XYZ 36.1346 485.005 null]>>/Item.184<</Rect[291.695 2905.3 299.997 2813.98]/D[null
 /XYZ 36.1346 381.057 null]>>/Item.185<</Rect[291.695 3751.3 299.997 3659.98]/D[null/XYZ 36.1346 279.156 null]>>/Item.186<</Rect[291.695 2887.3 299.997 2795.98]/D[null/XYZ 36.1346 383.225 null]>>/Item.187<</Rect[291.695 3041.3 299.997 2949.98]/D[null/XYZ 36.1346 364.675 null]>>/Item.188<</Rect[291.695 3194.3 299.997 3102.98]/D[null/XYZ 36.1346 346.246 null]>>/Item.189<</Rect[291.695 3331.3 299.997 3239.98]/D[null/XYZ 36.1346 329.745 null]>>/Item.190<</Rect[291.695 4345.3 299.997 4253.98]/D[null/XYZ 36.1346 207.608 null]>>/Item.191<</Rect[291.695 4594.3 299.997 4502.98]/D[null/XYZ 36.1346 177.616 null]>>/Item.192<</Rect[291.695 4777.3 299.997 4685.98]/D[null/XYZ 36.1346 155.574 null]>>/Item.193<</Rect[291.695 1007.3 299.997 915.975]/D[null/XYZ 36.1346 609.671 null]>>/Item.194<</Rect[291.695 1146.3 299.997 1054.98]/D[null/XYZ 36.1346 592.928 null]>>/Item.195<</Rect[291.695 1301.3 299.997 1209.98]/D[null/XYZ 36.1346 574.258 null]>>/Item.196<</Rect[291.695 1456.3 299.997 1364.98]
 /D[null/XYZ 36.1346 555.589 null]>>/Item.197<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.198<</Rect[291.695 629.302 299.997 537.977]/D[null/XYZ 36.1346 655.201 null]>>/Item.199<</Rect[291.695 783.299 299.997 691.975]/D[null/XYZ 36.1346 636.652 null]>>/Item.1<</Rect[291.695 1434.3 299.997 1351.28]/D[null/XYZ 36.1346 557.238 null]>>/Item.2<</Rect[291.695 4912.3 299.997 4829.28]/D[null/XYZ 36.1346 138.314 null]>>/page.700<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.3<</Rect[291.695 703.299 299.997 620.277]/D[null/XYZ 36.1346 645.288 null]>>/page.701<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.4<</Rect[291.695 1634.3 299.997 1551.28]/D[null/XYZ 36.1346 533.148 null]>>/page.702<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.5<</Rect[291.695 3775.3 299.997 3692.28]/D[null/XYZ 36.1346 275.265 null]>>/page.703<</Rect[291.695 228.299 308.299 211
 .695]/D[null/XYZ 36.1346 693.501 null]>>/Item.6<</Rect[291.695 4264.3 299.997 4181.28]/D[null/XYZ 36.1346 216.365 null]>>/page.704<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.7<</Rect[291.695 4572.3 299.997 4489.28]/D[null/XYZ 36.1346 179.267 null]>>/page.705<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.8<</Rect[291.695 687.3 299.997 604.278]/D[null/XYZ 36.1346 647.215 null]>>/page.706<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.9<</Rect[291.695 1375.3 299.997 1292.28]/D[null/XYZ 36.1346 564.345 null]>>/page.400<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.707<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.401<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.708<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.402<</Rect[291.695 228.299 308.2
 99 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.709<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.1<</Rect[291.695 2338.3 299.997 2246.97]/D[null/XYZ 36.1346 449.352 null]>>/page.403<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.2<</Rect[291.695 3647.3 299.997 3555.98]/D[null/XYZ 36.1346 291.683 null]>>/page.404<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.3<</Rect[291.695 2707.3 299.997 2615.98]/D[null/XYZ 36.1346 404.906 null]>>/page.405<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.4<</Rect[291.695 1425.3 299.997 1333.98]/D[null/XYZ 36.1346 559.323 null]>>/page.406<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.5<</Rect[291.695 2410.3 299.997 2318.98]/D[null/XYZ 36.1346 440.679 null]>>/page.100<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.407
 <</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.6<</Rect[291.695 1729.3 299.997 1637.98]/D[null/XYZ 36.1346 522.706 null]>>/page.101<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.408<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.8.7<</Rect[291.695 2035.3 299.997 1943.98]/D[null/XYZ 36.1346 485.848 null]>>/page.102<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.409<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.1<</Rect[291.695 2338.3 299.997 2246.97]/D[null/XYZ 36.1346 449.352 null]>>/page.103<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.2<</Rect[291.695 2509.3 299.997 2417.98]/D[null/XYZ 36.1346 428.755 null]>>/page.104<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.3<</Rect[291.695 1532.3 299.997 1440.98]/D[null/XYZ 36.
 1346 546.435 null]>>/page.105<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.4<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.106<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.5<</Rect[291.695 4322.3 299.997 4230.98]/D[null/XYZ 36.1346 210.379 null]>>/page.107<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.5.6<</Rect[291.695 2360.3 299.997 2268.98]/D[null/XYZ 36.1346 446.702 null]>>/page.108<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.109<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.2.1<</Rect[291.695 2314.3 299.997 2222.98]/D[null/XYZ 36.1346 452.242 null]>>/section.2.2<</Rect[291.695 4224.3 299.997 4132.98]/D[null/XYZ 36.1346 222.183 null]>>/section.2.3<</Rect[291.695 2095.3 299.997 2003.98]/D[null/XYZ 36.1346 478.621 null]>>/section.2.4<</Rect[291.695 3500
 .3 299.997 3408.98]/D[null/XYZ 36.1346 309.389 null]>>/section.2.5<</Rect[291.695 3208.3 299.997 3116.97]/D[null/XYZ 36.1346 344.56 null]>>/section.2.6<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.2.7<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.2.8<</Rect[291.695 4544.3 299.997 4452.98]/D[null/XYZ 36.1346 183.639 null]>>/section.2.9<</Rect[291.695 1025.3 299.997 933.977]/D[null/XYZ 36.1346 607.503 null]>>/page.710<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.711<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.712<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.713<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.714<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.715<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>
 /page.716<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.410<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.717<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.411<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.718<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.412<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.719<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.413<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.414<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.415<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.416<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.110<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1
 346 693.501 null]>>/page.417<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.111<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.418<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.112<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.419<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.113<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.114<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.115<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.116<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.117<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.118<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.119<</Rect[291.695 228.299 308.299 211.6
 95]/D[null/XYZ 36.1346 693.501 null]>>/page.720<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.721<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.722<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.723<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.724<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.725<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.726<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.420<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.727<</Rect[291.695 228.299 308.299 211.695]/D[42 0 R/XYZ 36.1346 693.501 null]>>/page.421<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.728<</Rect[291.695 228.299 308.299 211.695]/D[1 0 R/XYZ 36.1346 693.501 null]>>/page.422<</Rect[291.695
  228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.729<</Rect[291.695 228.299 308.299 211.695]/D[4 0 R/XYZ 36.1346 693.501 null]>>/page.423<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.424<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.425<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.426<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.600<</Rect[291.695 1596.3 299.997 1504.98]/D[null/XYZ 36.1346 538.726 null]>>/page.120<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.427<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.601<</Rect[291.695 2387.3 299.997 2295.98]/D[null/XYZ 36.1346 443.45 null]>>/page.121<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.428<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>
 >/section*.602<</Rect[291.695 4754.3 299.997 4662.98]/D[null/XYZ 36.1346 158.344 null]>>/page.122<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.429<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.603<</Rect[291.695 2236.3 299.997 2144.98]/D[null/XYZ 36.1346 461.638 null]>>/page.123<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.604<</Rect[291.695 4205.3 299.997 4113.98]/D[null/XYZ 36.1346 224.471 null]>>/page.124<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.605<</Rect[291.695 4929.3 299.997 4837.98]/D[null/XYZ 36.1346 137.266 null]>>/page.125<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.606<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.126<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.300<</Rect[291.695 3382.3 299.997 3290
 .98]/D[null/XYZ 36.1346 323.602 null]>>/section*.607<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/page.127<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.301<</Rect[291.695 3780.3 299.997 3688.98]/D[null/XYZ 36.1346 275.663 null]>>/section*.608<</Rect[291.695 1238.3 299.997 1146.97]/D[null/XYZ 36.1346 581.847 null]>>/page.128<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.302<</Rect[291.695 1400.3 299.997 1308.98]/D[null/XYZ 36.1346 562.334 null]>>/section*.609<</Rect[291.695 2489.3 299.997 2397.98]/D[null/XYZ 36.1346 431.164 null]>>/page.129<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.303<</Rect[291.695 1561.3 299.997 1469.98]/D[null/XYZ 36.1346 542.941 null]>>/section*.304<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.305<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/se
 ction*.306<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/section*.307<</Rect[291.695 2761.3 299.997 2669.98]/D[null/XYZ 36.1346 398.401 null]>>/section*.308<</Rect[291.695 3335.3 299.997 3243.98]/D[null/XYZ 36.1346 329.263 null]>>/section*.309<</Rect[291.695 3861.3 299.997 3769.98]/D[null/XYZ 36.1346 265.906 null]>>/page.730<</Rect[291.695 228.299 308.299 211.695]/D[7 0 R/XYZ 36.1346 693.501 null]>>/page.731<</Rect[291.695 228.299 308.299 211.695]/D[10 0 R/XYZ 36.1346 693.501 null]>>/page.732<</Rect[291.695 228.299 308.299 211.695]/D[13 0 R/XYZ 36.1346 693.501 null]>>/page.733<</Rect[291.695 228.299 308.299 211.695]/D[16 0 R/XYZ 36.1346 693.501 null]>>/page.734<</Rect[291.695 228.299 308.299 211.695]/D[19 0 R/XYZ 36.1346 693.501 null]>>/subsection.3.16.1<</Rect[291.695 1364.3 299.997 1272.98]/D[null/XYZ 36.1346 566.67 null]>>/page.735<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.16.2<</Rect[291.695 2147.3
  299.997 2055.98]/D[null/XYZ 36.1346 472.358 null]>>/page.736<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.16.3<</Rect[291.695 3056.3 299.997 2964.98]/D[null/XYZ 36.1346 362.869 null]>>/page.430<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.737<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.16.4<</Rect[291.695 4146.3 299.997 4054.98]/D[null/XYZ 36.1346 231.578 null]>>/page.431<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.738<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.16.5<</Rect[291.695 2152.3 299.997 2060.98]/D[null/XYZ 36.1346 471.755 null]>>/page.432<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.739<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.433<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.
 501 null]>>/page.434<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.13.1<</Rect[291.695 4430.3 299.997 4338.98]/D[null/XYZ 36.1346 197.37 null]>>/page.435<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.13.2<</Rect[291.695 2450.3 299.997 2358.98]/D[null/XYZ 36.1346 435.861 null]>>/page.436<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.610<</Rect[291.695 3674.3 299.997 3582.98]/D[null/XYZ 36.1346 288.43 null]>>/subsection.3.13.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.130<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.437<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.611<</Rect[291.695 1793.3 299.997 1701.97]/D[null/XYZ 36.1346 514.997 null]>>/subsection.3.13.4<</Rect[291.695 1487.3 299.997 1395.98]/D[null/XYZ 36.1346 551.855 null]>>/page.131<</Rect[
 291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.438<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.612<</Rect[291.695 2430.3 299.997 2338.98]/D[null/XYZ 36.1346 438.27 null]>>/subsection.3.13.5<</Rect[291.695 1671.3 299.997 1579.98]/D[null/XYZ 36.1346 529.692 null]>>/page.132<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.439<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.613<</Rect[291.695 4043.3 299.997 3951.98]/D[null/XYZ 36.1346 243.985 null]>>/subsection.3.13.6<</Rect[291.695 703.299 299.997 611.975]/D[null/XYZ 36.1346 646.288 null]>>/page.133<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.614<</Rect[291.695 4582.3 299.997 4490.98]/D[null/XYZ 36.1346 179.062 null]>>/subsection.3.13.7<</Rect[291.695 1787.3 299.997 1695.98]/D[null/XYZ 36.1346 515.72 null]>>/page.134<</Rect[291.695 228.299 308.299 211.695]/
 D[null/XYZ 36.1346 693.501 null]>>/section*.615<</Rect[291.695 722.3 299.997 630.975]/D[null/XYZ 36.1346 643.999 null]>>/subsection.3.10.1<</Rect[291.695 1378.3 299.997 1286.97]/D[null/XYZ 36.1346 564.984 null]>>/subsection.3.13.8<</Rect[291.695 3943.3 299.997 3851.98]/D[null/XYZ 36.1346 256.03 null]>>/page.135<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.616<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/subsection.3.10.2<</Rect[291.695 2254.3 299.997 2162.98]/D[null/XYZ 36.1346 459.469 null]>>/subsection.3.13.9<</Rect[291.695 4454.3 299.997 4362.98]/D[null/XYZ 36.1346 194.479 null]>>/page.136<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.310<</Rect[291.695 4387.3 299.997 4295.98]/D[null/XYZ 36.1346 202.55 null]>>/section*.617<</Rect[291.695 2135.3 299.997 2043.98]/D[null/XYZ 36.1346 473.803 null]>>/subsection.3.10.3<</Rect[291.695 2496.3 299.997 2404.98]/D[null/XYZ 36.13
 46 430.321 null]>>/page.137<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.311<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.618<</Rect[291.695 2326.3 299.997 2234.98]/D[null/XYZ 36.1346 450.797 null]>>/page.138<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.312<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.619<</Rect[291.695 1414.3 299.997 1322.98]/D[null/XYZ 36.1346 560.647 null]>>/page.139<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.313<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.314<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null]>>/section*.315<</Rect[291.695 4120.3 299.997 4028.98]/D[null/XYZ 36.1346 234.71 null]>>/section*.316<</Rect[291.695 1311.3 299.997 1219.98]/D[null/XYZ 36.1346 573.054 null]>>/section*.317<</Rect[2
 91.695 3981.3 299.997 3889.98]/D[null/XYZ 36.1346 251.452 null]>>/section*.318<</Rect[291.695 945.301 299.997 853.977]/D[null/XYZ 36.1346 617.138 null]>>/section*.319<</Rect[291.695 1570.3 299.997 1478.98]/D[null/XYZ 36.1346 541.857 null]>>/page.740<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.741<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.742<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.743<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.744<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.745<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.746<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.440<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.747<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 
 null]>>/page.441<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.748<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.442<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.749<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.443<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.444<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.445<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.446<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.620<</Rect[291.695 4309.3 299.997 4217.98]/D[null/XYZ 36.1346 211.945 null]>>/page.140<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.447<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.621<</Rect[291.695 4929.3 299.997 4837.98]/D[
 null/XYZ 36.1346 137.266 null]>>/page.141<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.448<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.622<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.142<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.449<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.623<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/page.143<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.624<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.144<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.625<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null]>>/page.145<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.626<</Rec
 t[291.695 4189.3 299.997 4097.98]/D[null/XYZ 36.1346 226.399 null]>>/page.146<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.320<</Rect[291.695 2115.3 299.997 2023.98]/D[null/XYZ 36.1346 476.212 null]>>/section*.627<</Rect[291.695 1795.3 299.997 1703.98]/D[null/XYZ 36.1346 514.756 null]>>/page.147<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.321<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.628<</Rect[291.695 2460.3 299.997 2368.98]/D[null/XYZ 36.1346 434.657 null]>>/page.148<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.322<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.629<</Rect[291.695 3865.3 299.997 3773.98]/D[null/XYZ 36.1346 265.424 null]>>/page.149<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.323<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 
 36.1346 517.888 null]>>/section*.324<</Rect[291.695 2941.3 299.997 2849.98]/D[null/XYZ 36.1346 376.72 null]>>/section*.325<</Rect[291.695 3567.3 299.997 3475.98]/D[null/XYZ 36.1346 301.319 null]>>/section*.326<</Rect[291.695 4112.3 299.997 4020.98]/D[null/XYZ 36.1346 235.674 null]>>/section*.327<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.328<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.329<</Rect[291.695 2500.3 299.997 2408.98]/D[null/XYZ 36.1346 429.839 null]>>/page.750<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.751<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.7.1<</Rect[291.695 2496.3 299.997 2404.98]/D[null/XYZ 36.1346 430.321 null]>>/page.752<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.7.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.753<<
 /Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.7.3<</Rect[291.695 1345.3 299.997 1253.98]/D[null/XYZ 36.1346 568.958 null]>>/page.754<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.7.4<</Rect[291.695 3586.3 299.997 3494.98]/D[null/XYZ 36.1346 299.03 null]>>/page.755<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.7.5<</Rect[291.695 4607.3 299.997 4515.98]/D[null/XYZ 36.1346 176.051 null]>>/page.756<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.450<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.757<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.451<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.758<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.1<</Rect[291.695 1587.3 299.997 1495.98]
 /D[null/XYZ 36.1346 539.81 null]>>/page.452<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.759<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.2<</Rect[291.695 2971.3 299.997 2879.98]/D[null/XYZ 36.1346 373.107 null]>>/page.453<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.3<</Rect[291.695 1653.3 299.997 1561.97]/D[null/XYZ 36.1346 531.86 null]>>/page.454<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.4<</Rect[291.695 3347.3 299.997 3255.98]/D[null/XYZ 36.1346 327.818 null]>>/page.455<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.5<</Rect[291.695 1204.3 299.997 1112.98]/D[null/XYZ 36.1346 585.942 null]>>/page.456<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.630<</Rect[291.695 4490.3 299.997 4398.98]/D[null/XYZ 36.1346 190.143 null]>>/
 page.150<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.6<</Rect[291.695 2240.3 299.997 2148.98]/D[null/XYZ 36.1346 461.156 null]>>/page.457<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.631<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.151<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.7<</Rect[291.695 4607.3 299.997 4515.98]/D[null/XYZ 36.1346 176.051 null]>>/page.458<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.632<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/subsection.3.1.1<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.152<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.4.8<</Rect[291.695 4209.3 299.997 4117.98]/D[null/XYZ 36.1346 223.99 null]>>/page.459<</Rect[291.695 228.2
 99 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.633<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/subsection.3.1.2<</Rect[291.695 1172.3 299.997 1080.98]/D[null/XYZ 36.1346 589.797 null]>>/page.153<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.634<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null]>>/page.154<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.635<</Rect[291.695 4189.3 299.997 4097.98]/D[null/XYZ 36.1346 226.399 null]>>/page.155<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.636<</Rect[291.695 1644.3 299.997 1552.98]/D[null/XYZ 36.1346 532.944 null]>>/page.156<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.330<</Rect[291.695 4521.3 299.997 4429.98]/D[null/XYZ 36.1346 186.409 null]>>/section*.637<</Rect[291.695 671.3 299.997 579.976]/D[null/XYZ 36.1346 65
 0.142 null]>>/page.157<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.331<</Rect[291.695 2763.3 299.997 2671.97]/D[null/XYZ 36.1346 398.161 null]>>/section*.638<</Rect[291.695 1893.3 299.997 1801.97]/D[null/XYZ 36.1346 502.952 null]>>/page.158<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.332<</Rect[291.695 3402.3 299.997 3310.98]/D[null/XYZ 36.1346 321.193 null]>>/section*.639<</Rect[291.695 2518.3 299.997 2426.97]/D[null/XYZ 36.1346 427.671 null]>>/page.159<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.333<</Rect[291.695 4929.3 299.997 4837.98]/D[null/XYZ 36.1346 137.266 null]>>/section*.334<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.335<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.336<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.337<</Rect[291.695
  2766.3 299.997 2674.98]/D[null/XYZ 36.1346 397.799 null]>>/section*.338<</Rect[291.695 1795.3 299.997 1703.98]/D[null/XYZ 36.1346 514.756 null]>>/section*.339<</Rect[291.695 4081.3 299.997 3989.98]/D[null/XYZ 36.1346 239.407 null]>>/subsection.6.2.1<</Rect[291.695 3431.3 299.997 3339.98]/D[null/XYZ 36.1346 317.7 null]>>/subsection.6.2.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.760<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.3<</Rect[291.695 4607.3 299.997 4515.98]/D[null/XYZ 36.1346 176.051 null]>>/page.761<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.4<</Rect[291.695 2882.3 299.997 2790.98]/D[null/XYZ 36.1346 383.827 null]>>/page.762<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.5<</Rect[291.695 4325.3 299.997 4233.98]/D[null/XYZ 36.1346 210.018 null]>>/page.763<</Rect[291.695 228.299 308.299 211.695]/
 D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.6<</Rect[291.695 1893.3 299.997 1801.97]/D[null/XYZ 36.1346 502.952 null]>>/page.764<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.7<</Rect[291.695 3279.3 299.997 3187.98]/D[null/XYZ 36.1346 336.008 null]>>/page.765<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.8<</Rect[291.695 1653.3 299.997 1561.97]/D[null/XYZ 36.1346 531.86 null]>>/page.766<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.6.2.9<</Rect[291.695 2583.3 299.997 2491.97]/D[null/XYZ 36.1346 419.842 null]>>/page.460<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.767<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.461<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.768<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/pag
 e.462<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.769<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.463<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.464<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.465<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.466<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.640<</Rect[291.695 3063.3 299.997 2971.97]/D[null/XYZ 36.1346 362.026 null]>>/page.160<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.467<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.641<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/page.161<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.468<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36
 .1346 693.501 null]>>/section*.642<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.162<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.469<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.643<</Rect[291.695 2268.3 299.997 2176.97]/D[null/XYZ 36.1346 457.783 null]>>/page.163<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.644<</Rect[291.695 4720.3 299.997 4628.98]/D[null/XYZ 36.1346 162.44 null]>>/page.164<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.645<</Rect[291.695 2209.3 299.997 2117.98]/D[null/XYZ 36.1346 464.89 null]>>/page.165<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.646<</Rect[291.695 2835.3 299.997 2743.98]/D[null/XYZ 36.1346 389.488 null]>>/page.166<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.340<</Rect[291.695 19
 18.3 299.997 1826.97]/D[null/XYZ 36.1346 499.941 null]>>/section*.647<</Rect[291.695 3380.3 299.997 3288.98]/D[null/XYZ 36.1346 323.843 null]>>/page.167<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.341<</Rect[291.695 2543.3 299.997 2451.97]/D[null/XYZ 36.1346 424.66 null]>>/section*.648<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/page.168<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.342<</Rect[291.695 3088.3 299.997 2996.97]/D[null/XYZ 36.1346 359.014 null]>>/section*.649<</Rect[291.695 1241.3 299.997 1149.98]/D[null/XYZ 36.1346 581.485 null]>>/page.169<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.343<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.344<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.345<</Rect[291.695 3596.3 299.997 3504.98]/D[null/XYZ 36.1346 2
 97.826 null]>>/section*.346<</Rect[291.695 2162.3 299.997 2070.98]/D[null/XYZ 36.1346 470.551 null]>>/section*.347<</Rect[291.695 1577.3 299.997 1485.98]/D[null/XYZ 36.1346 541.014 null]>>/section*.348<</Rect[291.695 1834.3 299.997 1742.98]/D[null/XYZ 36.1346 510.058 null]>>/section*.349<</Rect[291.695 2055.3 299.997 1963.98]/D[null/XYZ 36.1346 483.439 null]>>/page.770<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.771<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.772<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.773<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.774<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.775<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.776<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.470<</Rect[291.695 228.299 308.29
 9 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.777<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.471<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.778<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.472<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.779<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.473<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.474<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.475<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.476<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.650<</Rect[291.695 1964.3 299.997 1872.98]/D[null/XYZ 36.1346 494.4 null]>>/page.170<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.477<</Rect[29
 1.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.651<</Rect[291.695 4884.3 299.997 4792.98]/D[null/XYZ 36.1346 142.686 null]>>/page.171<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.478<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.652<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.172<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.479<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.653<</Rect[291.695 1298.3 299.997 1206.97]/D[null/XYZ 36.1346 574.62 null]>>/page.173<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.654<</Rect[291.695 3945.3 299.997 3853.98]/D[null/XYZ 36.1346 255.788 null]>>/page.174<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.655<</Rect[291.695 1345.3 299.997 1253.98]/D[null/XYZ 36.1346 
 568.958 null]>>/page.175<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.656<</Rect[291.695 1870.3 299.997 1778.98]/D[null/XYZ 36.1346 505.722 null]>>/page.176<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.350<</Rect[291.695 2680.3 299.997 2588.98]/D[null/XYZ 36.1346 408.158 null]>>/section*.657<</Rect[291.695 2415.3 299.997 2323.98]/D[null/XYZ 36.1346 440.077 null]>>/page.177<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.351<</Rect[291.695 3225.3 299.997 3133.98]/D[null/XYZ 36.1346 342.513 null]>>/section*.658<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.178<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.352<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.659<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.179<</Rect[291.695 228.
 299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.353<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.354<</Rect[291.695 2234.3 299.997 2142.98]/D[null/XYZ 36.1346 461.878 null]>>/section*.355<</Rect[291.695 3059.3 299.997 2967.98]/D[null/XYZ 36.1346 362.507 null]>>/section*.356<</Rect[291.695 1147.3 299.997 1055.98]/D[null/XYZ 36.1346 592.808 null]>>/section*.357<</Rect[291.695 1691.3 299.997 1599.98]/D[null/XYZ 36.1346 527.283 null]>>/section*.358<</Rect[291.695 3287.3 299.997 3195.98]/D[null/XYZ 36.1346 335.045 null]>>/section*.359<</Rect[291.695 3812.3 299.997 3720.98]/D[null/XYZ 36.1346 271.809 null]>>/page.780<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.781<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.782<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.783<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.
 501 null]>>/page.784<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.785<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.786<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.480<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.787<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.481<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.788<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.482<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.789<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.483<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.484<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.485<</Rect[291.695 228.299 308.299 211.695]/D[nu
 ll/XYZ 36.1346 693.501 null]>>/page.486<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.660<</Rect[291.695 2533.3 299.997 2441.97]/D[null/XYZ 36.1346 425.864 null]>>/page.180<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.487<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.661<</Rect[291.695 3358.3 299.997 3266.97]/D[null/XYZ 36.1346 326.493 null]>>/page.181<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.488<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.662<</Rect[291.695 1545.3 299.997 1453.98]/D[null/XYZ 36.1346 544.869 null]>>/page.182<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.489<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.663<</Rect[291.695 2071.3 299.997 1979.98]/D[null/XYZ 36.1346 481.512 null]>>/page.183<</Rect[291.69
 5 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.664<</Rect[291.695 2715.3 299.997 2623.98]/D[null/XYZ 36.1346 403.942 null]>>/subsection.3.13.10<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.184<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.665<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/subsection.3.13.11<</Rect[291.695 4544.3 299.997 4452.98]/D[null/XYZ 36.1346 183.639 null]>>/page.185<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.666<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/subsection.3.13.12<</Rect[291.695 2417.3 299.997 2325.98]/D[null/XYZ 36.1346 439.836 null]>>/page.186<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.360<</Rect[291.695 4357.3 299.997 4265.98]/D[null/XYZ 36.1346 206.163 null]>>/section*.667<</Rect[291.695 721.3 299.997 629.
 976]/D[null/XYZ 36.1346 644.119 null]>>/page.187<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.361<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.668<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.188<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.362<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.669<</Rect[291.695 2301.3 299.997 2209.98]/D[null/XYZ 36.1346 453.808 null]>>/page.189<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.363<</Rect[291.695 2234.3 299.997 2142.98]/D[null/XYZ 36.1346 461.878 null]>>/section*.364<</Rect[291.695 3059.3 299.997 2967.98]/D[null/XYZ 36.1346 362.507 null]>>/section*.365<</Rect[291.695 4930.3 299.997 4838.98]/D[null/XYZ 36.1346 137.145 null]>>/section*.366<</Rect[291.695 671.3 299.997 579.976]/D[null/XYZ 36.1346 650.142 null]>>/sec
 tion*.367<</Rect[291.695 2025.3 299.997 1933.98]/D[null/XYZ 36.1346 487.052 null]>>/section*.368<</Rect[291.695 2651.3 299.997 2559.98]/D[null/XYZ 36.1346 411.651 null]>>/section*.369<</Rect[291.695 3196.3 299.997 3104.98]/D[null/XYZ 36.1346 346.006 null]>>/page.790<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.791<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.792<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.793<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.794<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.795<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.796<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.490<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.797<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ
  36.1346 693.501 null]>>/page.491<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.798<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.492<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.799<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.493<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.494<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.495<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.496<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.670<</Rect[291.695 3894.3 299.997 3802.98]/D[null/XYZ 36.1346 261.931 null]>>/page.190<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.497<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.671<</Rect[291.695 2475.3 29
 9.997 2383.98]/D[null/XYZ 36.1346 432.85 null]>>/page.191<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.498<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.672<</Rect[291.695 3100.3 299.997 3008.98]/D[null/XYZ 36.1346 357.569 null]>>/page.192<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.499<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.673<</Rect[291.695 3645.3 299.997 3553.98]/D[null/XYZ 36.1346 291.923 null]>>/page.193<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.674<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.194<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.675<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.195<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/secti
 on*.676<</Rect[291.695 2035.3 299.997 1943.98]/D[null/XYZ 36.1346 485.848 null]>>/page.196<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.370<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.677<</Rect[291.695 3026.3 299.997 2934.98]/D[null/XYZ 36.1346 366.482 null]>>/page.197<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.371<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.678<</Rect[291.695 2872.3 299.997 2780.98]/D[null/XYZ 36.1346 385.032 null]>>/page.198<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.372<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/section*.679<</Rect[291.695 3517.3 299.997 3425.98]/D[null/XYZ 36.1346 307.341 null]>>/page.199<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.373<</Rect[291.695 3581.3 299.997 3489.98
 ]/D[null/XYZ 36.1346 299.632 null]>>/section*.374<</Rect[291.695 4305.3 299.997 4213.98]/D[null/XYZ 36.1346 212.427 null]>>/section*.375<</Rect[291.695 4848.3 299.997 4756.98]/D[null/XYZ 36.1346 147.022 null]>>/section*.376<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.377<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.378<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/section*.379<</Rect[291.695 3524.3 299.997 3432.98]/D[null/XYZ 36.1346 306.498 null]>>/section*.680<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.681<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.682<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.683<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.684<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null
 ]>>/section*.685<</Rect[291.695 4303.3 299.997 4211.98]/D[null/XYZ 36.1346 212.668 null]>>/section*.686<</Rect[291.695 2109.3 299.997 2017.98]/D[null/XYZ 36.1346 476.935 null]>>/section*.380<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.687<</Rect[291.695 2834.3 299.997 2742.98]/D[null/XYZ 36.1346 389.608 null]>>/section*.381<</Rect[291.695 1180.3 299.997 1088.98]/D[null/XYZ 36.1346 588.833 null]>>/section*.688<</Rect[291.695 3459.3 299.997 3367.98]/D[null/XYZ 36.1346 314.327 null]>>/section*.382<</Rect[291.695 1725.3 299.997 1633.98]/D[null/XYZ 36.1346 523.187 null]>>/section*.689<</Rect[291.695 4004.3 299.997 3912.98]/D[null/XYZ 36.1346 248.682 null]>>/section*.383<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.384<</Rect[291.695 1239.3 299.997 1147.98]/D[null/XYZ 36.1346 581.726 null]>>/section*.2<</Rect[291.695 4229.3 299.997 4146.28]/D[null/XYZ 36.1346 220.581 null]>>/section*.385<</Rect[291.695 30
 88.3 299.997 2996.97]/D[null/XYZ 36.1346 359.014 null]>>/section*.3<</Rect[291.695 2723.3 299.997 2631.97]/D[null/XYZ 36.1346 402.979 null]>>/section*.386<</Rect[291.695 3389.3 299.997 3297.98]/D[null/XYZ 36.1346 322.759 null]>>/section*.4<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.387<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.5<</Rect[291.695 2779.3 299.997 2687.98]/D[null/XYZ 36.1346 396.233 null]>>/section*.388<</Rect[291.695 1295.3 299.997 1203.98]/D[null/XYZ 36.1346 574.981 null]>>/section*.6<</Rect[291.695 3594.3 299.997 3502.98]/D[null/XYZ 36.1346 298.066 null]>>/section*.389<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.7<</Rect[291.695 4296.3 299.997 4204.98]/D[null/XYZ 36.1346 213.511 null]>>/section*.8<</Rect[291.695 1328.3 299.997 1236.97]/D[null/XYZ 36.1346 571.006 null]>>/section*.9<</Rect[291.695 2136.3 299.997 2044.98]/D[null/XYZ 36.1346 473.
 683 null]>>/section*.690<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.691<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.692<</Rect[291.695 2068.3 299.997 1976.97]/D[null/XYZ 36.1346 481.873 null]>>/section*.693<</Rect[291.695 2791.3 299.997 2699.98]/D[null/XYZ 36.1346 394.788 null]>>/section*.694<</Rect[291.695 3272.3 299.997 3180.98]/D[null/XYZ 36.1346 336.852 null]>>/section*.695<</Rect[291.695 3897.3 299.997 3805.98]/D[null/XYZ 36.1346 261.57 null]>>/section*.696<</Rect[291.695 4442.3 299.997 4350.98]/D[null/XYZ 36.1346 195.925 null]>>/section*.390<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.697<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.391<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.698<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.392<</Rect[29
 1.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.699<</Rect[291.695 2135.3 299.997 2043.98]/D[null/XYZ 36.1346 473.803 null]>>/section*.393<</Rect[291.695 2333.3 299.997 2241.97]/D[null/XYZ 36.1346 449.954 null]>>/section*.394<</Rect[291.695 1164.3 299.997 1072.98]/D[null/XYZ 36.1346 590.76 null]>>/section*.395<</Rect[291.695 3139.3 299.997 3047.98]/D[null/XYZ 36.1346 352.871 null]>>/section*.396<</Rect[291.695 3783.3 299.997 3691.98]/D[null/XYZ 36.1346 275.302 null]>>/section*.397<</Rect[291.695 1568.3 299.997 1476.97]/D[null/XYZ 36.1346 542.098 null]>>/section*.398<</Rect[291.695 2113.3 299.997 2021.97]/D[null/XYZ 36.1346 476.453 null]>>/section*.399<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.10<</Rect[291.695 2746.3 299.997 2654.98]/D[null/XYZ 36.1346 400.208 null]>>/section*.11<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.12<</Rect[291.695 3193.3 299.997 3101.97]/D[null
 /XYZ 36.1346 346.367 null]>>/section*.13<</Rect[291.695 1738.3 299.997 1646.97]/D[null/XYZ 36.1346 521.622 null]>>/section*.14<</Rect[291.695 3869.3 299.997 3777.98]/D[null/XYZ 36.1346 264.943 null]>>/section*.15<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.16<</Rect[291.695 2661.3 299.997 2569.98]/D[null/XYZ 36.1346 410.446 null]>>/section*.17<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.18<</Rect[291.695 4067.3 299.997 3975.98]/D[null/XYZ 36.1346 241.094 null]>>/section*.19<</Rect[291.695 2034.3 299.997 1942.98]/D[null/XYZ 36.1346 485.968 null]>>/section*.20<</Rect[291.695 4758.3 299.997 4666.98]/D[null/XYZ 36.1346 157.863 null]>>/section*.21<</Rect[291.695 3116.3 299.997 3024.98]/D[null/XYZ 36.1346 355.642 null]>>/section*.22<</Rect[291.695 4513.3 299.997 4421.98]/D[null/XYZ 36.1346 187.373 null]>>/section*.23<</Rect[291.695 1486.3 299.997 1394.98]/D[null/XYZ 36.1346 551.975 null]>>/section*.24<</
 Rect[291.695 4444.3 299.997 4352.98]/D[null/XYZ 36.1346 195.684 null]>>/section*.25<</Rect[291.695 2985.3 299.997 2893.98]/D[null/XYZ 36.1346 371.421 null]>>/section*.26<</Rect[291.695 1140.3 299.997 1048.98]/D[null/XYZ 36.1346 593.651 null]>>/section*.27<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.28<</Rect[291.695 3045.3 299.997 2953.98]/D[null/XYZ 36.1346 364.194 null]>>/section*.29<</Rect[291.695 1277.3 299.997 1185.98]/D[null/XYZ 36.1346 577.149 null]>>/page.ii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.30<</Rect[291.695 2804.3 299.997 2712.98]/D[null/XYZ 36.1346 393.222 null]>>/section*.31<</Rect[291.695 2672.3 299.997 2580.98]/D[null/XYZ 36.1346 409.122 null]>>/section*.32<</Rect[291.695 3108.3 299.997 3016.97]/D[null/XYZ 36.1346 356.605 null]>>/figure.4.1<</Rect[1784.7 1547.3 1801.3 1530.7]/D[null/XYZ 215.967 534.628 null]>>/section*.33<</Rect[291.695 3715.3 299.997 3623.98]/D[null/XYZ 3
 6.1346 283.492 null]>>/figure.4.2<</Rect[1254.7 3382.3 1271.3 3365.7]/D[null/XYZ 152.128 313.602 null]>>/section*.34<</Rect[291.695 3747.3 299.997 3655.98]/D[null/XYZ 36.1346 279.638 null]>>/subsection.2.9.1<</Rect[291.695 2001.3 299.997 1909.98]/D[null/XYZ 36.1346 489.943 null]>>/section*.35<</Rect[291.695 1323.3 299.997 1231.97]/D[null/XYZ 36.1346 571.609 null]>>/subsection.2.9.2<</Rect[291.695 4072.3 299.997 3980.98]/D[null/XYZ 36.1346 240.492 null]>>/section*.36<</Rect[291.695 2808.3 299.997 2716.97]/D[null/XYZ 36.1346 392.74 null]>>/subsection.2.9.3<</Rect[291.695 2266.3 299.997 2174.98]/D[null/XYZ 36.1346 458.024 null]>>/section*.37<</Rect[291.695 3811.3 299.997 3719.98]/D[null/XYZ 36.1346 271.929 null]>>/subsection.2.9.4<</Rect[291.695 1221.3 299.997 1129.98]/D[null/XYZ 36.1346 583.894 null]>>/section*.38<</Rect[291.695 3038.3 299.997 2946.97]/D[null/XYZ 36.1346 365.037 null]>>/section*.39<</Rect[291.695 2580.3 299.997 2488.98]/D[null/XYZ 36.1346 420.203 null]>>/page.
 iv<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.ix<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.2.6.1<</Rect[291.695 3060.3 299.997 2968.98]/D[null/XYZ 36.1346 362.387 null]>>/subsection.2.6.2<</Rect[291.695 1321.3 299.997 1229.98]/D[null/XYZ 36.1346 571.849 null]>>/subsection.2.6.3<</Rect[291.695 3603.3 299.997 3511.98]/D[null/XYZ 36.1346 296.983 null]>>/subsection.2.6.4<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.2.6.5<</Rect[291.695 3354.3 299.997 3262.98]/D[null/XYZ 36.1346 326.974 null]>>/subsection.2.6.6<</Rect[291.695 3260.3 299.997 3168.98]/D[null/XYZ 36.1346 338.297 null]>>/subsection.2.6.7<</Rect[291.695 4227.3 299.997 4135.98]/D[null/XYZ 36.1346 221.822 null]>>/subsection.2.3.1<</Rect[291.695 1089.3 299.997 997.977]/D[null/XYZ 36.1346 599.794 null]>>/subsection.5.4.1<</Rect[291.695 1765.3 299.997 1673.98]/D[null/XYZ 36.1346 518.37 null]>>/section*.
 40<</Rect[291.695 3265.3 299.997 3173.98]/D[null/XYZ 36.1346 337.695 null]>>/subsection.5.4.2<</Rect[291.695 4552.3 299.997 4460.98]/D[null/XYZ 36.1346 182.676 null]>>/section*.41<</Rect[291.695 2107.3 299.997 2015.98]/D[null/XYZ 36.1346 477.176 null]>>/subsection.5.4.3<</Rect[291.695 2243.3 299.997 2151.97]/D[null/XYZ 36.1346 460.795 null]>>/section*.42<</Rect[291.695 656.3 299.997 564.976]/D[null/XYZ 36.1346 651.949 null]>>/section*.43<</Rect[291.695 4454.3 299.997 4362.98]/D[null/XYZ 36.1346 194.479 null]>>/section*.44<</Rect[291.695 1144.3 299.997 1052.98]/D[null/XYZ 36.1346 593.169 null]>>/section*.45<</Rect[291.695 2152.3 299.997 2060.98]/D[null/XYZ 36.1346 471.755 null]>>/section*.46<</Rect[291.695 1144.3 299.997 1052.98]/D[null/XYZ 36.1346 593.169 null]>>/section*.47<</Rect[291.695 2081.3 299.997 1989.98]/D[null/XYZ 36.1346 480.307 null]>>/section*.48<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.49<</Rect[291.695 1123.3 299.997 10
 31.97]/D[null/XYZ 36.1346 595.699 null]>>/section.2.10<</Rect[291.695 4501.3 299.997 4409.98]/D[null/XYZ 36.1346 188.818 null]>>/section.2.11<</Rect[291.695 3190.3 299.997 3098.98]/D[null/XYZ 36.1346 346.728 null]>>/section.2.12<</Rect[291.695 1928.3 299.997 1836.97]/D[null/XYZ 36.1346 498.736 null]>>/section.2.13<</Rect[291.695 1397.3 299.997 1305.98]/D[null/XYZ 36.1346 562.695 null]>>/section.2.14<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.2.15<</Rect[291.695 2726.3 299.997 2634.98]/D[null/XYZ 36.1346 402.617 null]>>/page.xvii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.50<</Rect[291.695 4845.3 299.997 4753.98]/D[null/XYZ 36.1346 147.383 null]>>/section*.51<</Rect[291.695 1340.3 299.997 1248.98]/D[null/XYZ 36.1346 569.561 null]>>/section*.52<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.53<</Rect[291.695 1477.3 299.997 1385.98]/D[null/XYZ 36.1346 553.059 nu
 ll]>>/section*.54<</Rect[291.695 3913.3 299.997 3821.98]/D[null/XYZ 36.1346 259.643 null]>>/section*.55<</Rect[291.695 4101.3 299.997 4009.98]/D[null/XYZ 36.1346 236.998 null]>>/section*.56<</Rect[291.695 2058.3 299.997 1966.97]/D[null/XYZ 36.1346 483.078 null]>>/section*.57<</Rect[291.695 4257.3 299.997 4165.98]/D[null/XYZ 36.1346 218.208 null]>>/section*.58<</Rect[291.695 2014.3 299.997 1922.98]/D[null/XYZ 36.1346 488.377 null]>>/section*.59<</Rect[291.695 3232.3 299.997 3140.98]/D[null/XYZ 36.1346 341.669 null]>>/table.5.1<</Rect[1238.7 2412.3 1255.3 2395.7]/D[null/XYZ 150.201 430.439 null]>>/table.2.1<</Rect[1551.69 1101.3 1568.3 1084.7]/D[null/XYZ 187.902 588.348 null]>>/table.2.2<</Rect[1249.7 1360.3 1266.3 1343.7]/D[null/XYZ 151.526 557.152 null]>>/section*.60<</Rect[291.695 4114.3 299.997 4022.98]/D[null/XYZ 36.1346 235.432 null]>>/section*.61<</Rect[291.695 4682.3 299.997 4590.98]/D[null/XYZ 36.1346 167.017 null]>>/section*.62<</Rect[291.695 1859.3 299.997 1767.98]/
 D[null/XYZ 36.1346 507.047 null]>>/section*.63<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.64<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.65<</Rect[291.695 1277.3 299.997 1185.98]/D[null/XYZ 36.1346 577.149 null]>>/section*.66<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.67<</Rect[291.695 2828.3 299.997 2736.97]/D[null/XYZ 36.1346 390.331 null]>>/section*.68<</Rect[291.695 3175.3 299.997 3083.98]/D[null/XYZ 36.1346 348.535 null]>>/section*.69<</Rect[291.695 1542.3 299.997 1450.98]/D[null/XYZ 36.1346 545.23 null]>>/subsection.2.13.1<</Rect[291.695 2651.3 299.997 2559.98]/D[null/XYZ 36.1346 411.651 null]>>/subsection.2.13.2<</Rect[291.695 4239.3 299.997 4147.98]/D[null/XYZ 36.1346 220.376 null]>>/section*.70<</Rect[291.695 3244.3 299.997 3152.98]/D[null/XYZ 36.1346 340.224 null]>>/subsection.2.13.3<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.3
 66 null]>>/section*.71<</Rect[291.695 1142.3 299.997 1050.98]/D[null/XYZ 36.1346 593.41 null]>>/subsection.2.13.4<</Rect[291.695 1439.3 299.997 1347.98]/D[null/XYZ 36.1346 557.636 null]>>/section*.72<</Rect[291.695 4845.3 299.997 4753.98]/D[null/XYZ 36.1346 147.383 null]>>/subsection.2.13.5<</Rect[291.695 2845.3 299.997 2753.98]/D[null/XYZ 36.1346 388.284 null]>>/section*.73<</Rect[291.695 2324.3 299.997 2232.98]/D[null/XYZ 36.1346 451.038 null]>>/section*.74<</Rect[291.695 1227.3 299.997 1135.98]/D[null/XYZ 36.1346 583.172 null]>>/section*.75<</Rect[291.695 2671.3 299.997 2579.98]/D[null/XYZ 36.1346 409.242 null]>>/subsection.2.10.1<</Rect[291.695 1587.3 299.997 1495.98]/D[null/XYZ 36.1346 539.81 null]>>/section*.76<</Rect[291.695 1126.3 299.997 1034.98]/D[null/XYZ 36.1346 595.337 null]>>/subsection.2.10.2<</Rect[291.695 1288.3 299.997 1196.97]/D[null/XYZ 36.1346 575.824 null]>>/section*.77<</Rect[291.695 1573.3 299.997 1481.97]/D[null/XYZ 36.1346 541.496 null]>>/subsection
 .2.10.3<</Rect[291.695 2114.3 299.997 2022.98]/D[null/XYZ 36.1346 476.332 null]>>/section*.78<</Rect[291.695 2039.3 299.997 1947.98]/D[null/XYZ 36.1346 485.366 null]>>/subsection.2.10.4<</Rect[291.695 901.3 299.997 809.976]/D[null/XYZ 36.1346 622.438 null]>>/section*.79<</Rect[291.695 2941.3 299.997 2849.98]/D[null/XYZ 36.1346 376.72 null]>>/subsection.2.10.5<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.2.10.6<</Rect[291.695 4053.3 299.997 3961.98]/D[null/XYZ 36.1346 242.78 null]>>/subsection.2.10.7<</Rect[291.695 4086.3 299.997 3994.98]/D[null/XYZ 36.1346 238.805 null]>>/subsection.2.10.8<</Rect[291.695 3641.3 299.997 3549.98]/D[null/XYZ 36.1346 292.405 null]>>/subsection.2.10.9<</Rect[291.695 3237.3 299.997 3145.98]/D[null/XYZ 36.1346 341.067 null]>>/section*.80<</Rect[291.695 3728.3 299.997 3636.98]/D[null/XYZ 36.1346 281.926 null]>>/section*.81<</Rect[291.695 4830.3 299.997 4738.98]/D[null/XYZ 36.1346 149.19 null]>>/section*.82<</
 Rect[291.695 945.301 299.997 853.977]/D[null/XYZ 36.1346 617.138 null]>>/section*.83<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.84<</Rect[291.695 4712.3 299.997 4620.98]/D[null/XYZ 36.1346 163.404 null]>>/section*.85<</Rect[291.695 2666.3 299.997 2574.98]/D[null/XYZ 36.1346 409.844 null]>>/section*.86<</Rect[291.695 2771.3 299.997 2679.98]/D[null/XYZ 36.1346 397.197 null]>>/section*.87<</Rect[291.695 4845.3 299.997 4753.98]/D[null/XYZ 36.1346 147.383 null]>>/section*.88<</Rect[291.695 1410.3 299.997 1318.98]/D[null/XYZ 36.1346 561.129 null]>>/section*.89<</Rect[291.695 1551.3 299.997 1459.98]/D[null/XYZ 36.1346 544.146 null]>>/section*.90<</Rect[291.695 2955.3 299.997 2863.98]/D[null/XYZ 36.1346 375.034 null]>>/section*.91<</Rect[291.695 1409.3 299.997 1317.98]/D[null/XYZ 36.1346 561.25 null]>>/section*.92<</Rect[291.695 3965.3 299.997 3873.98]/D[null/XYZ 36.1346 253.379 null]>>/section*.93<</Rect[291.695 1808.3 299.997 1716.97]/D[nul
 l/XYZ 36.1346 513.19 null]>>/section*.94<</Rect[291.695 4170.3 299.997 4078.98]/D[null/XYZ 36.1346 228.687 null]>>/section*.95<</Rect[291.695 4687.3 299.997 4595.98]/D[null/XYZ 36.1346 166.415 null]>>/section*.96<</Rect[291.695 1776.3 299.997 1684.98]/D[null/XYZ 36.1346 517.045 null]>>/section*.97<</Rect[291.695 3718.3 299.997 3626.98]/D[null/XYZ 36.1346 283.131 null]>>/section*.98<</Rect[291.695 4332.3 299.997 4240.98]/D[null/XYZ 36.1346 209.175 null]>>/section*.99<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/Item.200<</Rect[291.695 1291.3 299.997 1199.98]/D[null/XYZ 36.1346 575.463 null]>>/Item.201<</Rect[291.695 1881.3 299.997 1789.98]/D[null/XYZ 36.1346 504.397 null]>>/Item.202<</Rect[291.695 3496.3 299.997 3404.98]/D[null/XYZ 36.1346 309.871 null]>>/Item.203<</Rect[291.695 4750.3 299.997 4658.98]/D[null/XYZ 36.1346 158.826 null]>>/Item.204<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.205<</Rect[291.695 735
 .301 299.997 643.977]/D[null/XYZ 36.1346 642.433 null]>>/Item.206<</Rect[291.695 4630.3 299.997 4538.98]/D[null/XYZ 36.1346 173.28 null]>>/Item.207<</Rect[291.695 835.301 299.997 743.977]/D[null/XYZ 36.1346 630.388 null]>>/page.xii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.208<</Rect[291.695 2057.3 299.997 1965.98]/D[null/XYZ 36.1346 483.198 null]>>/Item.209<</Rect[291.695 3401.3 299.997 3309.98]/D[null/XYZ 36.1346 321.313 null]>>/page.xiv<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.210<</Rect[291.695 3535.3 299.997 3443.98]/D[null/XYZ 36.1346 305.173 null]>>/Item.211<</Rect[291.695 3767.3 299.997 3675.98]/D[null/XYZ 36.1346 277.229 null]>>/Item.212<</Rect[291.695 3900.3 299.997 3808.98]/D[null/XYZ 36.1346 261.209 null]>>/Item.213<</Rect[291.695 4231.3 299.997 4139.98]/D[null/XYZ 36.1346 221.34 null]>>/Item.214<</Rect[291.695 4365.3 299.997 4273.98]/D[null/XYZ 36.1346 205.199 null]>>/Item.215<</Rect[29
 1.695 4697.3 299.997 4605.98]/D[null/XYZ 36.1346 165.21 null]>>/Item.216<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.217<</Rect[291.695 702.3 299.997 610.975]/D[null/XYZ 36.1346 646.408 null]>>/Item.218<</Rect[291.695 1548.3 299.997 1456.97]/D[null/XYZ 36.1346 544.507 null]>>/Item.219<</Rect[291.695 1781.3 299.997 1689.98]/D[null/XYZ 36.1346 516.442 null]>>/page.iii<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.220<</Rect[291.695 2196.3 299.997 2104.98]/D[null/XYZ 36.1346 466.456 null]>>/Item.221<</Rect[291.695 3596.3 299.997 3504.98]/D[null/XYZ 36.1346 297.826 null]>>/Item.222<</Rect[291.695 3762.3 299.997 3670.98]/D[null/XYZ 36.1346 277.831 null]>>/Item.223<</Rect[291.695 3911.3 299.997 3819.98]/D[null/XYZ 36.1346 259.884 null]>>/Item.224<</Rect[291.695 4077.3 299.997 3985.98]/D[null/XYZ 36.1346 239.889 null]>>/Item.225<</Rect[291.695 2300.3 299.997 2208.98]/D[null/XYZ 36.1346 453.929 null]>>/Item.226<</
 Rect[291.695 2462.3 299.997 2370.98]/D[null/XYZ 36.1346 434.416 null]>>/Item.227<</Rect[291.695 2656.3 299.997 2564.98]/D[null/XYZ 36.1346 411.049 null]>>/Item.228<</Rect[291.695 2839.3 299.997 2747.98]/D[null/XYZ 36.1346 389.006 null]>>/Item.229<</Rect[291.695 3005.3 299.997 2913.98]/D[null/XYZ 36.1346 369.012 null]>>/Item.230<</Rect[291.695 3171.3 299.997 3079.98]/D[null/XYZ 36.1346 349.017 null]>>/Item.231<</Rect[291.695 3337.3 299.997 3245.98]/D[null/XYZ 36.1346 329.022 null]>>/Item.232<</Rect[291.695 3503.3 299.997 3411.98]/D[null/XYZ 36.1346 309.028 null]>>/Item.233<</Rect[291.695 3669.3 299.997 3577.98]/D[null/XYZ 36.1346 289.033 null]>>/Item.234<</Rect[291.695 3835.3 299.997 3743.98]/D[null/XYZ 36.1346 269.038 null]>>/Item.235<</Rect[291.695 4001.3 299.997 3909.98]/D[null/XYZ 36.1346 249.043 null]>>/Item.236<</Rect[291.695 4167.3 299.997 4075.98]/D[null/XYZ 36.1346 229.049 null]>>/Item.237<</Rect[291.695 4333.3 299.997 4241.98]/D[null/XYZ 36.1346 209.054 null]>>/Item
 .238<</Rect[291.695 4499.3 299.997 4407.98]/D[null/XYZ 36.1346 189.059 null]>>/Item.239<</Rect[291.695 1532.3 299.997 1440.98]/D[null/XYZ 36.1346 546.435 null]>>/Item.240<</Rect[291.695 3316.3 299.997 3224.98]/D[null/XYZ 36.1346 331.552 null]>>/Item.241<</Rect[291.695 3580.3 299.997 3488.98]/D[null/XYZ 36.1346 299.753 null]>>/Item.242<</Rect[291.695 3844.3 299.997 3752.98]/D[null/XYZ 36.1346 267.954 null]>>/Item.243<</Rect[291.695 4436.3 299.997 4344.98]/D[null/XYZ 36.1346 196.648 null]>>/Item.244<</Rect[291.695 793.299 299.997 701.975]/D[null/XYZ 36.1346 635.447 null]>>/Item.245<</Rect[291.695 1072.3 299.997 980.975]/D[null/XYZ 36.1346 601.841 null]>>/Item.246<</Rect[291.695 1434.3 299.997 1342.98]/D[null/XYZ 36.1346 558.238 null]>>/Item.247<</Rect[291.695 2084.3 299.997 1992.98]/D[null/XYZ 36.1346 479.946 null]>>/Item.248<</Rect[291.695 2230.3 299.997 2138.98]/D[null/XYZ 36.1346 462.36 null]>>/Item.249<</Rect[291.695 2375.3 299.997 2283.98]/D[null/XYZ 36.1346 444.895 null]
 >>/subsection.4.6.1<</Rect[291.695 2093.3 299.997 2001.97]/D[null/XYZ 36.1346 478.862 null]>>/Item.250<</Rect[291.695 3606.3 299.997 3514.98]/D[null/XYZ 36.1346 296.621 null]>>/subsection.4.6.2<</Rect[291.695 2714.3 299.997 2622.98]/D[null/XYZ 36.1346 404.062 null]>>/Item.251<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.4.6.3<</Rect[291.695 4441.3 299.997 4349.98]/D[null/XYZ 36.1346 196.045 null]>>/Item.252<</Rect[291.695 635.301 299.997 543.977]/D[null/XYZ 36.1346 654.478 null]>>/subsection.4.6.4<</Rect[291.695 1315.3 299.997 1223.98]/D[null/XYZ 36.1346 572.572 null]>>/Item.253<</Rect[291.695 801.3 299.997 709.976]/D[null/XYZ 36.1346 634.483 null]>>/subsection.4.6.5<</Rect[291.695 2725.3 299.997 2633.98]/D[null/XYZ 36.1346 402.737 null]>>/Item.254<</Rect[291.695 4332.3 299.997 4240.98]/D[null/XYZ 36.1346 209.175 null]>>/subsection.4.6.6<</Rect[291.695 2984.3 299.997 2892.98]/D[null/XYZ 36.1346 371.541 null]>>/Item.255<</Rect[291.695 
 4686.3 299.997 4594.98]/D[null/XYZ 36.1346 166.535 null]>>/subsection.4.6.7<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.256<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/subsection.4.6.8<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/subsection.4.3.1<</Rect[291.695 3115.3 299.997 3023.98]/D[null/XYZ 36.1346 355.762 null]>>/Item.257<</Rect[291.695 801.3 299.997 709.976]/D[null/XYZ 36.1346 634.483 null]>>/subsection.4.6.9<</Rect[291.695 911.3 299.997 819.976]/D[null/XYZ 36.1346 621.234 null]>>/subsection.4.3.2<</Rect[291.695 4288.3 299.997 4196.98]/D[null/XYZ 36.1346 214.474 null]>>/Item.258<</Rect[291.695 1067.3 299.997 975.975]/D[null/XYZ 36.1346 602.444 null]>>/subsection.4.3.3<</Rect[291.695 1386.3 299.997 1294.98]/D[null/XYZ 36.1346 564.02 null]>>/Item.259<</Rect[291.695 4675.3 299.997 4583.98]/D[null/XYZ 36.1346 167.86 null]>>/subsection.4.3.4<</Rect[291.695 2438.3 299.997 2346.9
 7]/D[null/XYZ 36.1346 437.307 null]>>/subsection.4.3.5<</Rect[291.695 4559.3 299.997 4467.98]/D[null/XYZ 36.1346 181.832 null]>>/chapter*.1<</Rect[291.695 1824.3 299.997 1732.98]/D[null/XYZ 36.1346 511.263 null]>>/Item.260<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.261<</Rect[291.695 1039.3 299.997 947.977]/D[null/XYZ 36.1346 605.816 null]>>/Item.262<</Rect[291.695 1325.3 299.997 1233.98]/D[null/XYZ 36.1346 571.367 null]>>/Item.263<</Rect[291.695 1711.3 299.997 1619.98]/D[null/XYZ 36.1346 524.874 null]>>/Item.264<</Rect[291.695 2131.3 299.997 2039.98]/D[null/XYZ 36.1346 474.285 null]>>/Item.265<</Rect[291.695 2298.3 299.997 2206.97]/D[null/XYZ 36.1346 454.17 null]>>/Item.266<</Rect[291.695 2464.3 299.997 2372.98]/D[null/XYZ 36.1346 434.175 null]>>/Item.267<</Rect[291.695 2630.3 299.997 2538.98]/D[null/XYZ 36.1346 414.18 null]>>/Item.268<</Rect[291.695 4595.3 299.997 4503.98]/D[null/XYZ 36.1346 177.496 null]>>/Item.269<</Rect[291.695 4761.
 3 299.997 4669.98]/D[null/XYZ 36.1346 157.501 null]>>/page.vi<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.270<</Rect[291.695 4927.3 299.997 4835.98]/D[null/XYZ 36.1346 137.507 null]>>/Item.271<</Rect[291.695 779.302 299.997 687.977]/D[null/XYZ 36.1346 637.133 null]>>/Item.272<</Rect[291.695 4285.3 299.997 4193.98]/D[null/XYZ 36.1346 214.835 null]>>/Item.273<</Rect[291.695 4451.3 299.997 4359.98]/D[null/XYZ 36.1346 194.841 null]>>/Item.274<</Rect[291.695 4700.3 299.997 4608.98]/D[null/XYZ 36.1346 164.849 null]>>/Item.275<</Rect[291.695 2635.3 299.997 2543.98]/D[null/XYZ 36.1346 413.578 null]>>/Item.276<</Rect[291.695 2798.3 299.997 2706.97]/D[null/XYZ 36.1346 393.945 null]>>/Item.277<</Rect[291.695 3060.3 299.997 2968.98]/D[null/XYZ 36.1346 362.387 null]>>/Item.278<</Rect[291.695 3222.3 299.997 3130.98]/D[null/XYZ 36.1346 342.874 null]>>/Item.279<</Rect[291.695 3548.3 299.997 3456.98]/D[null/XYZ 36.1346 303.607 null]>>/Item.280<</Rect[291.6
 95 3709.3 299.997 3617.98]/D[null/XYZ 36.1346 284.215 null]>>/Item.281<</Rect[291.695 3971.3 299.997 3879.98]/D[null/XYZ 36.1346 252.657 null]>>/Item.282<</Rect[291.695 4551.3 299.997 4459.98]/D[null/XYZ 36.1346 182.796 null]>>/Item.283<</Rect[291.695 4719.3 299.997 4627.98]/D[null/XYZ 36.1346 162.56 null]>>/Item.284<</Rect[291.695 4981.3 299.997 4889.98]/D[null/XYZ 36.1346 131.002 null]>>/Item.285<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.286<</Rect[291.695 634.302 299.997 542.977]/D[null/XYZ 36.1346 654.598 null]>>/Item.287<</Rect[291.695 2765.3 299.997 2673.98]/D[null/XYZ 36.1346 397.919 null]>>/Item.288<</Rect[291.695 2930.3 299.997 2838.98]/D[null/XYZ 36.1346 378.045 null]>>/Item.289<</Rect[291.695 3091.3 299.997 2999.98]/D[null/XYZ 36.1346 358.653 null]>>/page.xi<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.xv<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.290<</Re
 ct[291.695 3256.3 299.997 3164.98]/D[null/XYZ 36.1346 338.779 null]>>/Item.291<</Rect[291.695 3922.3 299.997 3830.98]/D[null/XYZ 36.1346 258.559 null]>>/Item.292<</Rect[291.695 4756.3 299.997 4664.98]/D[null/XYZ 36.1346 158.104 null]>>/Item.293<</Rect[291.695 1153.3 299.997 1061.97]/D[null/XYZ 36.1346 592.085 null]>>/Item.294<</Rect[291.695 1418.3 299.997 1326.97]/D[null/XYZ 36.1346 560.166 null]>>/Item.295<</Rect[291.695 1584.3 299.997 1492.98]/D[null/XYZ 36.1346 540.171 null]>>/Item.296<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/Item.297<</Rect[291.695 832.3 299.997 740.975]/D[null/XYZ 36.1346 630.75 null]>>/Item.298<</Rect[291.695 3660.3 299.997 3568.98]/D[null/XYZ 36.1346 290.117 null]>>/Item.299<</Rect[291.695 3809.3 299.997 3717.98]/D[null/XYZ 36.1346 272.17 null]>>/page.800<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.801<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.8
 02<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.803<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.804<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.805<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.806<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.500<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.807<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.501<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.808<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.502<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.809<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.503<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693
 .501 null]>>/page.504<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.10<</Rect[291.695 3077.3 299.997 2985.98]/D[null/XYZ 36.1346 360.339 null]>>/page.505<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.11<</Rect[291.695 3304.3 299.997 3212.98]/D[null/XYZ 36.1346 332.997 null]>>/page.506<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.12<</Rect[291.695 3542.3 299.997 3450.98]/D[null/XYZ 36.1346 304.33 null]>>/page.507<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.200<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.13<</Rect[291.695 3874.3 299.997 3782.98]/D[null/XYZ 36.1346 264.34 null]>>/page.508<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.201<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.14<</Rect[291.695 4107.3 299.997 4015.98]/D[null/XYZ 36.1
 346 236.276 null]>>/page.509<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.202<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.15<</Rect[291.695 4334.3 299.997 4242.98]/D[null/XYZ 36.1346 208.933 null]>>/section.6.1<</Rect[291.695 3026.3 299.997 2934.98]/D[null/XYZ 36.1346 366.482 null]>>/page.203<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.16<</Rect[291.695 4555.3 299.997 4463.98]/D[null/XYZ 36.1346 182.314 null]>>/section.6.2<</Rect[291.695 1231.3 299.997 1139.98]/D[null/XYZ 36.1346 582.69 null]>>/page.204<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.17<</Rect[291.695 4799.3 299.997 4707.98]/D[null/XYZ 36.1346 152.924 null]>>/section.6.3<</Rect[291.695 1945.3 299.997 1853.98]/D[null/XYZ 36.1346 496.689 null]>>/page.205<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.18<</Rect[291.695 528.299 299.997 436.975
 ]/D[null/XYZ 36.1346 667.366 null]>>/section.6.4<</Rect[291.695 4337.3 299.997 4245.98]/D[null/XYZ 36.1346 208.572 null]>>/page.206<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.19<</Rect[291.695 899.302 299.997 807.977]/D[null/XYZ 36.1346 622.679 null]>>/page.207<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.208<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.209<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section.3.1<</Rect[291.695 2314.3 299.997 2222.98]/D[null/XYZ 36.1346 452.242 null]>>/section.3.2<</Rect[291.695 3706.3 299.997 3614.98]/D[null/XYZ 36.1346 284.576 null]>>/section.3.3<</Rect[291.695 2712.3 299.997 2620.98]/D[null/XYZ 36.1346 404.304 null]>>/section.3.4<</Rect[291.695 4132.3 299.997 4040.98]/D[null/XYZ 36.1346 233.265 null]>>/section.3.5<</Rect[291.695 932.3 299.997 840.975]/D[null/XYZ 36.1346 618.705 null]>>/section.3.6<</Rect
 [291.695 2048.3 299.997 1956.97]/D[null/XYZ 36.1346 484.282 null]>>/section.3.7<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.3.8<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section.3.9<</Rect[291.695 4428.3 299.997 4336.98]/D[null/XYZ 36.1346 197.611 null]>>/page.810<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.811<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.812<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.813<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.814<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.815<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.816<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.510<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.5
 01 null]>>/page.817<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.511<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.818<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.512<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.819<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.513<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.514<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.20<</Rect[291.695 1344.3 299.997 1252.98]/D[null/XYZ 36.1346 569.079 null]>>/page.515<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.21<</Rect[291.695 1573.3 299.997 1481.97]/D[null/XYZ 36.1346 541.496 null]>>/page.516<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.22<</Rect[291.695 1833.3 299.997 1741.97]/D[null/XYZ 
 36.1346 510.179 null]>>/page.517<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.210<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.23<</Rect[291.695 2085.3 299.997 1993.98]/D[null/XYZ 36.1346 479.826 null]>>/page.518<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.211<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.24<</Rect[291.695 2348.3 299.997 2256.97]/D[null/XYZ 36.1346 448.147 null]>>/page.519<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.212<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.25<</Rect[291.695 2705.3 299.997 2613.98]/D[null/XYZ 36.1346 405.147 null]>>/page.213<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.26<</Rect[291.695 2963.3 299.997 2871.97]/D[null/XYZ 36.1346 374.071 null]>>/page.214<</Rect[291.695 228.299 308.299 211.695]/
 D[null/XYZ 36.1346 693.501 null]>>/Item.27<</Rect[291.695 3215.3 299.997 3123.98]/D[null/XYZ 36.1346 343.717 null]>>/page.215<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.28<</Rect[291.695 3461.3 299.997 3369.98]/D[null/XYZ 36.1346 314.086 null]>>/page.216<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.29<</Rect[291.695 3730.3 299.997 3638.98]/D[null/XYZ 36.1346 281.685 null]>>/page.217<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.218<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.219<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.820<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.821<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.822<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.823<</Rect[291.695 228.299 308.
 299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.824<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.825<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.826<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.520<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.827<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.521<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.828<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.522<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.829<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.523<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.524<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.30<</Rect[29
 1.695 3893.3 299.997 3801.98]/D[null/XYZ 36.1346 262.052 null]>>/page.525<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.31<</Rect[291.695 4251.3 299.997 4159.98]/D[null/XYZ 36.1346 218.931 null]>>/page.526<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.32<</Rect[291.695 4707.3 299.997 4615.98]/D[null/XYZ 36.1346 164.006 null]>>/section*.700<</Rect[291.695 3591.3 299.997 3499.98]/D[null/XYZ 36.1346 298.428 null]>>/page.527<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.220<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.33<</Rect[291.695 4965.3 299.997 4873.98]/D[null/XYZ 36.1346 132.93 null]>>/section*.701<</Rect[291.695 2475.3 299.997 2383.98]/D[null/XYZ 36.1346 432.85 null]>>/page.528<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.221<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/It
 em.34<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.702<</Rect[291.695 3119.3 299.997 3027.98]/D[null/XYZ 36.1346 355.28 null]>>/page.529<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.222<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.35<</Rect[291.695 917.3 299.997 825.975]/D[null/XYZ 36.1346 620.511 null]>>/section*.703<</Rect[291.695 4722.3 299.997 4630.98]/D[null/XYZ 36.1346 162.199 null]>>/page.223<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.36<</Rect[291.695 1047.3 299.997 955.975]/D[null/XYZ 36.1346 604.853 null]>>/section*.704<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.224<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.37<</Rect[291.695 1278.3 299.997 1186.97]/D[null/XYZ 36.1346 577.029 null]>>/section*.705<</Rect[291.695 722.3 299.997 630.975]/D[null/XYZ 36.1
 346 643.999 null]>>/page.225<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.38<</Rect[291.695 3601.3 299.997 3509.98]/D[null/XYZ 36.1346 297.223 null]>>/section*.706<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.226<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.39<</Rect[291.695 4030.3 299.997 3938.98]/D[null/XYZ 36.1346 245.55 null]>>/section*.400<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.707<</Rect[291.695 2400.3 299.997 2308.98]/D[null/XYZ 36.1346 441.884 null]>>/page.227<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.401<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/section*.708<</Rect[291.695 4786.3 299.997 4694.98]/D[null/XYZ 36.1346 154.49 null]>>/page.228<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.402<</Rect[291.695 4830.3 2
 99.997 4738.98]/D[null/XYZ 36.1346 149.19 null]>>/section*.709<</Rect[291.695 3537.3 299.997 3445.98]/D[null/XYZ 36.1346 304.932 null]>>/page.229<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.403<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.404<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.405<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.406<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.100<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.407<</Rect[291.695 2167.3 299.997 2075.98]/D[null/XYZ 36.1346 469.949 null]>>/section*.101<</Rect[291.695 4804.3 299.997 4712.98]/D[null/XYZ 36.1346 152.322 null]>>/section*.408<</Rect[291.695 965.301 299.997 873.977]/D[null/XYZ 36.1346 614.729 null]>>/section*.102<</Rect[291.695 1244.3 299.997 1152.98]/D[null/XYZ 36.1346
  581.124 null]>>/section*.409<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.103<</Rect[291.695 2517.3 299.997 2425.98]/D[null/XYZ 36.1346 427.791 null]>>/page.xvi<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.104<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.105<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/page.830<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.106<</Rect[291.695 3401.3 299.997 3309.98]/D[null/XYZ 36.1346 321.313 null]>>/page.831<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.107<</Rect[291.695 3309.3 299.997 3217.98]/D[null/XYZ 36.1346 332.395 null]>>/page.832<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.108<</Rect[291.695 3299.3 299.997 3207.98]/D[null/XYZ 36.1346 333.599 null]>>/page.833<</Rect[291.695 22
 8.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.109<</Rect[291.695 1691.3 299.997 1599.98]/D[null/XYZ 36.1346 527.283 null]>>/page.834<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.835<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.836<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.530<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.837<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.531<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.838<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.532<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.839<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.533<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page
 .534<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.40<</Rect[291.695 4339.3 299.997 4247.98]/D[null/XYZ 36.1346 208.331 null]>>/page.535<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.41<</Rect[291.695 4487.3 299.997 4395.98]/D[null/XYZ 36.1346 190.505 null]>>/page.536<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.42<</Rect[291.695 4717.3 299.997 4625.98]/D[null/XYZ 36.1346 162.801 null]>>/section*.710<</Rect[291.695 4480.3 299.997 4388.98]/D[null/XYZ 36.1346 191.348 null]>>/page.537<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.230<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.43<</Rect[291.695 2590.3 299.997 2498.98]/D[null/XYZ 36.1346 418.998 null]>>/section*.711<</Rect[291.695 1700.3 299.997 1608.98]/D[null/XYZ 36.1346 526.199 null]>>/page.538<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693
 .501 null]>>/page.231<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.44<</Rect[291.695 2920.3 299.997 2828.98]/D[null/XYZ 36.1346 379.25 null]>>/section*.712<</Rect[291.695 2325.3 299.997 2233.98]/D[null/XYZ 36.1346 450.918 null]>>/page.539<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.232<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.45<</Rect[291.695 3648.3 299.997 3556.98]/D[null/XYZ 36.1346 291.562 null]>>/section*.713<</Rect[291.695 2870.3 299.997 2778.98]/D[null/XYZ 36.1346 385.272 null]>>/page.233<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.46<</Rect[291.695 3879.3 299.997 3787.98]/D[null/XYZ 36.1346 263.738 null]>>/section*.714<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/page.234<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.47<</Rect[291.695 4659.3 299.997 4567.98]/D[n
 ull/XYZ 36.1346 169.787 null]>>/subsection.3.11.1<</Rect[291.695 4031.3 299.997 3939.98]/D[null/XYZ 36.1346 245.43 null]>>/section*.715<</Rect[291.695 1241.3 299.997 1149.98]/D[null/XYZ 36.1346 581.485 null]>>/page.235<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.48<</Rect[291.695 4792.3 299.997 4700.98]/D[null/XYZ 36.1346 153.768 null]>>/subsection.3.11.2<</Rect[291.695 3182.3 299.997 3090.98]/D[null/XYZ 36.1346 347.692 null]>>/section*.716<</Rect[291.695 1931.3 299.997 1839.98]/D[null/XYZ 36.1346 498.375 null]>>/page.236<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.49<</Rect[291.695 1211.3 299.997 1119.98]/D[null/XYZ 36.1346 585.099 null]>>/section*.410<</Rect[291.695 1298.3 299.997 1206.97]/D[null/XYZ 36.1346 574.62 null]>>/section*.717<</Rect[291.695 2655.3 299.997 2563.98]/D[null/XYZ 36.1346 411.169 null]>>/page.237<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.41
 1<</Rect[291.695 1905.3 299.997 1813.98]/D[null/XYZ 36.1346 501.507 null]>>/section*.718<</Rect[291.695 4306.3 299.997 4214.98]/D[null/XYZ 36.1346 212.306 null]>>/page.238<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.412<</Rect[291.695 2450.3 299.997 2358.98]/D[null/XYZ 36.1346 435.861 null]>>/section*.719<</Rect[291.695 4929.3 299.997 4837.98]/D[null/XYZ 36.1346 137.266 null]>>/page.239<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.413<</Rect[291.695 721.3 299.997 629.976]/D[42 0 R/XYZ 36.1346 644.119 null]>>/section*.414<</Rect[291.695 1443.3 299.997 1351.97]/D[42 0 R/XYZ 36.1346 557.155 null]>>/section*.415<</Rect[291.695 2766.3 299.997 2674.98]/D[42 0 R/XYZ 36.1346 397.799 null]>>/section*.416<</Rect[291.695 3821.3 299.997 3729.98]/D[7 0 R/XYZ 36.1346 270.724 null]>>/section*.110<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.417<</Rect[291.695 1063.3 299.997
  971.975]/D[13 0 R/XYZ 36.1346 602.926 null]>>/section*.111<</Rect[291.695 1810.3 299.997 1718.98]/D[null/XYZ 36.1346 512.949 null]>>/section*.418<</Rect[291.695 654.302 299.997 562.977]/D[19 0 R/XYZ 36.1346 652.189 null]>>/section*.112<</Rect[291.695 2032.3 299.997 1940.98]/D[null/XYZ 36.1346 486.21 null]>>/section*.419<</Rect[291.695 1279.3 299.997 1187.98]/D[19 0 R/XYZ 36.1346 576.908 null]>>/section*.113<</Rect[291.695 2254.3 299.997 2162.98]/D[null/XYZ 36.1346 459.469 null]>>/section*.114<</Rect[291.695 1208.3 299.997 1116.97]/D[null/XYZ 36.1346 585.46 null]>>/section*.115<</Rect[291.695 3650.3 299.997 3558.98]/D[null/XYZ 36.1346 291.321 null]>>/page.840<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.116<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/page.841<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.117<</Rect[291.695 2406.3 299.997 2314.98]/D[null/XYZ 36.1346 441.1
 61 null]>>/page.842<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.118<</Rect[291.695 2506.3 299.997 2414.98]/D[null/XYZ 36.1346 429.116 null]>>/page.843<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.119<</Rect[291.695 1460.3 299.997 1368.98]/D[null/XYZ 36.1346 555.107 null]>>/page.844<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.845<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.846<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.540<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.847<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.541<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.848<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.542<</Rect[291.695 228.299 308.299 211.695]
 /D[null/XYZ 36.1346 693.501 null]>>/page.849<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.543<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.544<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.50<</Rect[291.695 1340.3 299.997 1248.98]/D[null/XYZ 36.1346 569.561 null]>>/page.545<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.51<</Rect[291.695 1470.3 299.997 1378.98]/D[null/XYZ 36.1346 553.902 null]>>/page.546<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.52<</Rect[291.695 3903.3 299.997 3811.98]/D[null/XYZ 36.1346 260.848 null]>>/section*.720<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.547<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.240<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.53<</Rect[291.695 4085.3 2
 99.997 3993.98]/D[null/XYZ 36.1346 238.925 null]>>/section*.721<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/page.548<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.241<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.54<</Rect[291.695 4549.3 299.997 4457.98]/D[null/XYZ 36.1346 183.037 null]>>/section*.722<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.549<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.242<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.55<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.723<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/page.243<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.56<</Rect[291.695 718.299 299.997 626.975]/D[null/XYZ 36.1346 644.481 null]>>/section*
 .724<</Rect[291.695 2992.3 299.997 2900.98]/D[null/XYZ 36.1346 370.578 null]>>/page.244<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.57<</Rect[291.695 1006.3 299.997 914.976]/D[null/XYZ 36.1346 609.791 null]>>/section*.725<</Rect[291.695 1045.3 299.997 953.977]/D[null/XYZ 36.1346 605.094 null]>>/page.245<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.58<</Rect[291.695 1172.3 299.997 1080.98]/D[null/XYZ 36.1346 589.797 null]>>/section*.726<</Rect[291.695 1853.3 299.997 1761.97]/D[null/XYZ 36.1346 507.77 null]>>/page.246<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.59<</Rect[291.695 1354.3 299.997 1262.98]/D[null/XYZ 36.1346 567.874 null]>>/section*.420<</Rect[291.695 1825.3 299.997 1733.98]/D[19 0 R/XYZ 36.1346 511.143 null]>>/section*.727<</Rect[291.695 4730.3 299.997 4638.98]/D[null/XYZ 36.1346 161.235 null]>>/page.247<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.
 1346 693.501 null]>>/section*.421<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.728<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.248<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.422<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.729<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.249<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.423<</Rect[291.695 2035.3 299.997 1943.98]/D[null/XYZ 36.1346 485.848 null]>>/section*.424<</Rect[291.695 4720.3 299.997 4628.98]/D[null/XYZ 36.1346 162.44 null]>>/section*.425<</Rect[291.695 2753.3 299.997 2661.97]/D[null/XYZ 36.1346 399.365 null]>>/section*.426<</Rect[291.695 4830.3 299.997 4738.98]/D[null/XYZ 36.1346 149.19 null]>>/section*.120<</Rect[291.695 641.3 299.997 549.976]/D[null/XYZ 36.1346 653.755 null]>>/section*.427<</Rect[
 291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.121<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.428<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/section*.122<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.429<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.123<</Rect[291.695 647.3 299.997 555.975]/D[null/XYZ 36.1346 653.033 null]>>/section*.124<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.125<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/page.850<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.126<</Rect[291.695 3612.3 299.997 3520.98]/D[null/XYZ 36.1346 295.899 null]>>/page.851<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.127<</Rect[291.695 658.299 299.997 566.975]/D[null/X
 YZ 36.1346 651.708 null]>>/subsection.3.8.1<</Rect[291.695 3724.3 299.997 3632.98]/D[null/XYZ 36.1346 282.408 null]>>/page.852<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.128<</Rect[291.695 1427.3 299.997 1335.98]/D[null/XYZ 36.1346 559.082 null]>>/subsection.3.8.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.853<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.129<</Rect[291.695 4361.3 299.997 4269.98]/D[null/XYZ 36.1346 205.681 null]>>/subsection.3.8.3<</Rect[291.695 3029.3 299.997 2937.98]/D[null/XYZ 36.1346 366.121 null]>>/page.854<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.8.4<</Rect[291.695 2463.3 299.997 2371.97]/D[null/XYZ 36.1346 434.296 null]>>/page.855<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.856<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/pag
 e.550<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.857<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.551<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.858<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.552<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.1<</Rect[291.695 4508.3 299.997 4416.98]/D[null/XYZ 36.1346 187.975 null]>>/page.859<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.553<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.2<</Rect[291.695 816.3 299.997 724.976]/D[null/XYZ 36.1346 632.677 null]>>/page.554<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.3<</Rect[291.695 1450.3 299.997 1358.98]/D[null/XYZ 36.1346 556.311 null]>>/Item.60<</Rect[291.695 4979.3 299.997 4887.98]/D
 [null/XYZ 36.1346 131.243 null]>>/page.555<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.4<</Rect[291.695 1022.3 299.997 930.975]/D[null/XYZ 36.1346 607.864 null]>>/Item.61<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.556<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.5<</Rect[291.695 2982.3 299.997 2890.98]/D[null/XYZ 36.1346 371.782 null]>>/Item.62<</Rect[291.695 634.302 299.997 542.977]/D[null/XYZ 36.1346 654.598 null]>>/section*.730<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.557<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.6<</Rect[291.695 4508.3 299.997 4416.98]/D[null/XYZ 36.1346 187.975 null]>>/page.250<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.63<</Rect[291.695 2903.3 299.997 2811.97]/D[null/XYZ 36.1346 381.298 null]>>/section*.731
 <</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.558<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.7<</Rect[291.695 2102.3 299.997 2010.98]/D[null/XYZ 36.1346 477.778 null]>>/page.251<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.64<</Rect[291.695 3263.3 299.997 3171.97]/D[null/XYZ 36.1346 337.936 null]>>/section*.732<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/page.559<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.5.8<</Rect[291.695 920.301 299.997 828.977]/D[null/XYZ 36.1346 620.15 null]>>/page.252<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.1<</Rect[291.695 2769.3 299.997 2677.98]/D[null/XYZ 36.1346 397.438 null]>>/Item.65<</Rect[291.695 3916.3 299.997 3824.98]/D[null/XYZ 36.1346 259.282 null]>>/section*.733<</Rect[291.695 2927.3 299.997 2835.98]/D[
 null/XYZ 36.1346 378.407 null]>>/subsection.3.5.9<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/page.253<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.2<</Rect[291.695 2806.3 299.997 2714.98]/D[null/XYZ 36.1346 392.981 null]>>/Item.66<</Rect[291.695 2325.3 299.997 2233.98]/D[null/XYZ 36.1346 450.918 null]>>/section*.734<</Rect[291.695 3966.3 299.997 3874.98]/D[null/XYZ 36.1346 253.259 null]>>/page.254<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.3<</Rect[291.695 2601.3 299.997 2509.98]/D[null/XYZ 36.1346 417.673 null]>>/Item.67<</Rect[291.695 2491.3 299.997 2399.98]/D[null/XYZ 36.1346 430.923 null]>>/section*.735<</Rect[291.695 4492.3 299.997 4400.98]/D[null/XYZ 36.1346 189.903 null]>>/page.255<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.4<</Rect[291.695 1071.3 299.997 979.976]/D[null/XYZ 36.1346 601.962 null]>>/I
 tem.68<</Rect[291.695 1483.3 299.997 1391.97]/D[null/XYZ 36.1346 552.337 null]>>/section*.736<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.256<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.5<</Rect[291.695 2998.3 299.997 2906.97]/D[null/XYZ 36.1346 369.855 null]>>/Item.69<</Rect[291.695 1610.3 299.997 1518.98]/D[null/XYZ 36.1346 537.039 null]>>/section*.430<</Rect[291.695 1343.3 299.997 1251.97]/D[null/XYZ 36.1346 569.2 null]>>/section*.737<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.257<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.6<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.431<</Rect[291.695 1869.3 299.997 1777.98]/D[null/XYZ 36.1346 505.843 null]>>/section*.738<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.258<</Rect[291.695 228.299 308.299 21
 1.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.7<</Rect[291.695 3382.3 299.997 3290.98]/D[null/XYZ 36.1346 323.602 null]>>/section*.432<</Rect[291.695 3059.3 299.997 2967.98]/D[null/XYZ 36.1346 362.507 null]>>/section*.739<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.259<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/subsection.3.2.8<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.433<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/subsection.3.2.9<</Rect[291.695 2864.3 299.997 2772.98]/D[null/XYZ 36.1346 385.995 null]>>/section*.434<</Rect[291.695 1965.3 299.997 1873.98]/D[null/XYZ 36.1346 494.28 null]>>/section*.435<</Rect[291.695 2804.3 299.997 2712.98]/D[null/XYZ 36.1346 393.222 null]>>/section*.436<</Rect[291.695 4041.3 299.997 3949.98]/D[null/XYZ 36.1346 244.225 null]>>/section*.130<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.
 1346 651.708 null]>>/section*.437<</Rect[291.695 4582.3 299.997 4490.98]/D[null/XYZ 36.1346 179.062 null]>>/section*.131<</Rect[291.695 4123.3 299.997 4031.98]/D[null/XYZ 36.1346 234.349 null]>>/section*.438<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.132<</Rect[291.695 3120.3 299.997 3028.98]/D[null/XYZ 36.1346 355.16 null]>>/section*.439<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.133<</Rect[291.695 3458.3 299.997 3366.98]/D[null/XYZ 36.1346 314.448 null]>>/section*.134<</Rect[291.695 3052.3 299.997 2960.98]/D[null/XYZ 36.1346 363.351 null]>>/section*.135<</Rect[291.695 3085.3 299.997 2993.98]/D[null/XYZ 36.1346 359.376 null]>>/page.860<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.136<</Rect[291.695 2841.3 299.997 2749.98]/D[null/XYZ 36.1346 388.765 null]>>/page.861<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.137<</Rect
 [291.695 945.301 299.997 853.977]/D[null/XYZ 36.1346 617.138 null]>>/page.862<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.138<</Rect[291.695 3746.3 299.997 3654.98]/D[null/XYZ 36.1346 279.758 null]>>/page.863<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.139<</Rect[291.695 4015.3 299.997 3923.98]/D[null/XYZ 36.1346 247.357 null]>>/page.864<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.865<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.866<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.560<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.867<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.561<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.868<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.50
 1 null]>>/page.562<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.869<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.563<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.564<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.70<</Rect[291.695 1743.3 299.997 1651.97]/D[null/XYZ 36.1346 521.02 null]>>/page.565<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.71<</Rect[291.695 1876.3 299.997 1784.98]/D[null/XYZ 36.1346 505.0 null]>>/page.566<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.72<</Rect[291.695 2523.3 299.997 2431.97]/D[null/XYZ 36.1346 427.069 null]>>/section*.740<</Rect[291.695 1935.3 299.997 1843.98]/D[null/XYZ 36.1346 497.893 null]>>/page.567<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.260<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 3
 6.1346 693.501 null]>>/Item.73<</Rect[291.695 2697.3 299.997 2605.98]/D[null/XYZ 36.1346 406.11 null]>>/section*.741<</Rect[291.695 2727.3 299.997 2635.98]/D[null/XYZ 36.1346 402.497 null]>>/page.568<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.261<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.74<</Rect[291.695 2854.3 299.997 2762.98]/D[null/XYZ 36.1346 387.199 null]>>/section*.742<</Rect[291.695 3667.3 299.997 3575.98]/D[null/XYZ 36.1346 289.274 null]>>/page.569<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.262<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.75<</Rect[291.695 3109.3 299.997 3017.98]/D[null/XYZ 36.1346 356.485 null]>>/section*.743<</Rect[291.695 4492.3 299.997 4400.98]/D[null/XYZ 36.1346 189.903 null]>>/page.263<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.76<</Rect[291.695 4466.3 299.997 43
 74.98]/D[null/XYZ 36.1346 193.034 null]>>/section*.744<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.264<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.77<</Rect[291.695 4732.3 299.997 4640.98]/D[null/XYZ 36.1346 160.995 null]>>/section*.745<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.265<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.78<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.746<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/page.266<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.79<</Rect[291.695 3086.3 299.997 2994.98]/D[null/XYZ 36.1346 359.255 null]>>/section*.440<</Rect[291.695 2434.3 299.997 2342.98]/D[null/XYZ 36.1346 437.788 null]>>/section*.747<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.267<</
 Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.441<</Rect[291.695 2725.3 299.997 2633.98]/D[null/XYZ 36.1346 402.737 null]>>/section*.748<</Rect[291.695 2035.3 299.997 1943.98]/D[null/XYZ 36.1346 485.848 null]>>/page.268<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.442<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.749<</Rect[291.695 2860.3 299.997 2768.98]/D[null/XYZ 36.1346 386.477 null]>>/page.269<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.443<</Rect[291.695 2892.3 299.997 2800.98]/D[null/XYZ 36.1346 382.622 null]>>/section*.444<</Rect[291.695 1264.3 299.997 1172.98]/D[null/XYZ 36.1346 578.715 null]>>/section*.445<</Rect[291.695 2620.3 299.997 2528.98]/D[null/XYZ 36.1346 415.385 null]>>/section*.446<</Rect[291.695 2773.3 299.997 2681.97]/D[null/XYZ 36.1346 396.956 null]>>/section*.140<</Rect[291.695 658.299 299.997 566.975
 ]/D[null/XYZ 36.1346 651.708 null]>>/section*.447<</Rect[291.695 4041.3 299.997 3949.98]/D[null/XYZ 36.1346 244.225 null]>>/section*.141<</Rect[291.695 2041.3 299.997 1949.98]/D[null/XYZ 36.1346 485.125 null]>>/section*.448<</Rect[291.695 4582.3 299.997 4490.98]/D[null/XYZ 36.1346 179.062 null]>>/section*.142<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.449<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.143<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.144<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/section*.145<</Rect[291.695 2008.3 299.997 1916.97]/D[null/XYZ 36.1346 489.1 null]>>/page.870<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.146<</Rect[291.695 3115.3 299.997 3023.98]/D[null/XYZ 36.1346 355.762 null]>>/page.871<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/s
 ection*.147<</Rect[291.695 4480.3 299.997 4388.98]/D[null/XYZ 36.1346 191.348 null]>>/page.872<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.148<</Rect[291.695 2904.3 299.997 2812.98]/D[null/XYZ 36.1346 381.177 null]>>/page.873<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.149<</Rect[291.695 1509.3 299.997 1417.98]/D[null/XYZ 36.1346 549.205 null]>>/page.874<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.875<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.876<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.570<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.877<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.571<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.878<</Rect[291.695 228.299 308.299 211.695]/D[null/X
 YZ 36.1346 693.501 null]>>/page.572<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.879<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.573<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.574<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.80<</Rect[291.695 3964.3 299.997 3872.98]/D[null/XYZ 36.1346 253.5 null]>>/page.575<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.81<</Rect[291.695 1766.3 299.997 1674.98]/D[null/XYZ 36.1346 518.249 null]>>/page.576<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.82<</Rect[291.695 2048.3 299.997 1956.97]/D[null/XYZ 36.1346 484.282 null]>>/section*.750<</Rect[291.695 1711.3 299.997 1619.98]/D[null/XYZ 36.1346 524.874 null]>>/page.577<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.270<</Rect[291.695 228.299 308.299 211
 .695]/D[null/XYZ 36.1346 693.501 null]>>/Item.83<</Rect[291.695 3442.3 299.997 3350.98]/D[null/XYZ 36.1346 316.375 null]>>/section*.751<</Rect[291.695 2237.3 299.997 2145.98]/D[null/XYZ 36.1346 461.517 null]>>/page.578<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.271<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.84<</Rect[291.695 3607.3 299.997 3515.98]/D[null/XYZ 36.1346 296.501 null]>>/section*.752<</Rect[291.695 2763.3 299.997 2671.97]/D[null/XYZ 36.1346 398.161 null]>>/page.579<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.272<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.85<</Rect[291.695 3773.3 299.997 3681.98]/D[null/XYZ 36.1346 276.506 null]>>/section*.753<</Rect[291.695 3308.3 299.997 3216.97]/D[null/XYZ 36.1346 332.515 null]>>/page.273<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.86<</Rect[291.69
 5 3921.3 299.997 3829.98]/D[null/XYZ 36.1346 258.679 null]>>/section*.754<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.274<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.87<</Rect[291.695 4103.3 299.997 4011.98]/D[null/XYZ 36.1346 236.758 null]>>/section*.755<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.275<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.88<</Rect[291.695 4269.3 299.997 4177.98]/D[null/XYZ 36.1346 216.763 null]>>/section*.756<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/page.276<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.89<</Rect[291.695 4434.3 299.997 4342.98]/D[null/XYZ 36.1346 196.888 null]>>/section*.450<</Rect[291.695 1242.3 299.997 1150.98]/D[null/XYZ 36.1346 581.365 null]>>/section*.757<</Rect[291.695 2594.3 299.997 2502.98]/D[null/XYZ 36.1346 418.516 null
 ]>>/page.277<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.451<</Rect[291.695 2132.3 299.997 2040.98]/D[null/XYZ 36.1346 474.164 null]>>/section*.758<</Rect[291.695 4364.3 299.997 4272.98]/D[null/XYZ 36.1346 205.32 null]>>/page.278<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.452<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.759<</Rect[291.695 4890.3 299.997 4798.98]/D[null/XYZ 36.1346 141.963 null]>>/page.279<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.453<</Rect[291.695 4453.3 299.997 4361.98]/D[null/XYZ 36.1346 194.6 null]>>/section*.454<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.455<</Rect[291.695 1279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/section*.456<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/section*.150<</Rect[291.695 3580.3 299
 .997 3488.98]/D[null/XYZ 36.1346 299.753 null]>>/section*.457<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.151<</Rect[291.695 2321.3 299.997 2229.98]/D[null/XYZ 36.1346 451.399 null]>>/section*.458<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.152<</Rect[291.695 1903.3 299.997 1811.97]/D[null/XYZ 36.1346 501.748 null]>>/section*.459<</Rect[291.695 2301.3 299.997 2209.98]/D[null/XYZ 36.1346 453.808 null]>>/section*.153<</Rect[291.695 1837.3 299.997 1745.98]/D[null/XYZ 36.1346 509.697 null]>>/section*.154<</Rect[291.695 4716.3 299.997 4624.98]/D[null/XYZ 36.1346 162.922 null]>>/section*.155<</Rect[291.695 3380.3 299.997 3288.98]/D[null/XYZ 36.1346 323.843 null]>>/page.880<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.156<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/page.881<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.
 501 null]>>/section*.157<</Rect[291.695 3687.3 299.997 3595.98]/D[null/XYZ 36.1346 286.865 null]>>/page.882<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.158<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/page.883<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.159<</Rect[291.695 2097.3 299.997 2005.98]/D[null/XYZ 36.1346 478.38 null]>>/page.884<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.885<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.886<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.580<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.887<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.581<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.888<</Rect[291.695 228.299 308.299 211.69
 5]/D[null/XYZ 36.1346 693.501 null]>>/page.582<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.889<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.583<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.584<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.90<</Rect[291.695 867.3 299.997 775.975]/D[null/XYZ 36.1346 626.534 null]>>/page.585<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.91<</Rect[291.695 1051.3 299.997 959.976]/D[null/XYZ 36.1346 604.371 null]>>/page.586<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.92<</Rect[291.695 4853.3 299.997 4761.98]/D[null/XYZ 36.1346 146.42 null]>>/section*.760<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.587<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.280<</Rect[291.695 228.299
  308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.93<</Rect[291.695 4969.3 299.997 4877.98]/D[null/XYZ 36.1346 132.448 null]>>/section*.761<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.588<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.281<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.94<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>/section*.762<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/page.589<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.282<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.95<</Rect[291.695 607.3 299.997 515.975]/D[null/XYZ 36.1346 657.851 null]>>/section*.763<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/page.283<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.96<</
 Rect[291.695 716.3 299.997 624.976]/D[null/XYZ 36.1346 644.722 null]>>/section*.764<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/page.284<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.97<</Rect[291.695 1691.3 299.997 1599.98]/D[null/XYZ 36.1346 527.283 null]>>/section*.765<</Rect[291.695 2395.3 299.997 2303.98]/D[null/XYZ 36.1346 442.486 null]>>/page.285<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.98<</Rect[291.695 2156.3 299.997 2064.98]/D[null/XYZ 36.1346 471.274 null]>>/section*.766<</Rect[291.695 3700.3 299.997 3608.98]/D[null/XYZ 36.1346 285.299 null]>>/page.286<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/Item.99<</Rect[291.695 3203.3 299.997 3111.97]/D[null/XYZ 36.1346 345.163 null]>>/section*.460<</Rect[291.695 3856.3 299.997 3764.98]/D[null/XYZ 36.1346 266.509 null]>>/section*.767<</Rect[291.695 4525.3 299.997 4433.98]/D[null/XYZ 36.1346 1
 85.927 null]>>/page.287<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.461<</Rect[291.695 2940.3 299.997 2848.98]/D[null/XYZ 36.1346 376.841 null]>>/section*.768<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.288<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.462<</Rect[291.695 3485.3 299.997 3393.98]/D[null/XYZ 36.1346 311.195 null]>>/section*.769<</Rect[291.695 1199.3 299.997 1107.98]/D[null/XYZ 36.1346 586.544 null]>>/page.289<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.463<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/section*.464<</Rect[291.695 1279.3 299.997 1187.98]/D[null/XYZ 36.1346 576.908 null]>>/section*.465<</Rect[291.695 1825.3 299.997 1733.98]/D[null/XYZ 36.1346 511.143 null]>>/section*.466<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.160<</Rect[291.6
 95 4026.3 299.997 3934.98]/D[null/XYZ 36.1346 246.032 null]>>/section*.467<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.161<</Rect[291.695 3560.3 299.997 3468.98]/D[null/XYZ 36.1346 302.162 null]>>/section*.468<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/section*.162<</Rect[291.695 4164.3 299.997 4072.98]/D[null/XYZ 36.1346 229.41 null]>>/section*.469<</Rect[291.695 3421.3 299.997 3329.98]/D[null/XYZ 36.1346 318.904 null]>>/section*.163<</Rect[291.695 2638.3 299.997 2546.97]/D[null/XYZ 36.1346 413.217 null]>>/section*.164<</Rect[291.695 3780.3 299.997 3688.98]/D[null/XYZ 36.1346 275.663 null]>>/section*.165<</Rect[291.695 2915.3 299.997 2823.98]/D[null/XYZ 36.1346 379.852 null]>>/page.890<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.166<</Rect[291.695 4205.3 299.997 4113.98]/D[null/XYZ 36.1346 224.471 null]>>/page.891<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 3
 6.1346 693.501 null]>>/section*.167<</Rect[291.695 2339.3 299.997 2247.98]/D[null/XYZ 36.1346 449.231 null]>>/page.892<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.168<</Rect[291.695 658.299 299.997 566.975]/D[null/XYZ 36.1346 651.708 null]>>/page.893<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.169<</Rect[291.695 2471.3 299.997 2379.98]/D[null/XYZ 36.1346 433.332 null]>>/page.894<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.895<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.896<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.590<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.897<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.591<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.898<</Rect[291.695 228.299 
 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.592<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.899<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.593<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.594<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.595<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.596<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.770<</Rect[291.695 2572.3 299.997 2480.98]/D[null/XYZ 36.1346 421.167 null]>>/page.597<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.290<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.771<</Rect[291.695 1231.3 299.997 1139.98]/D[null/XYZ 36.1346 582.69 null]>>/page.598<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.291
 <</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.772<</Rect[291.695 3038.3 299.997 2946.97]/D[null/XYZ 36.1346 365.037 null]>>/page.599<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/page.292<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.773<</Rect[291.695 654.302 299.997 562.977]/D[null/XYZ 36.1346 652.189 null]>>/page.293<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.774<</Rect[291.695 3725.3 299.997 3633.98]/D[null/XYZ 36.1346 282.288 null]>>/page.294<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.775<</Rect[291.695 1596.3 299.997 1504.98]/D[null/XYZ 36.1346 538.726 null]>>/page.295<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.776<</Rect[291.695 4280.3 299.997 4188.98]/D[null/XYZ 36.1346 215.438 null]>>/page.296<</Rect[291.695 228.299 308.299 211.695]/D[null/X
 YZ 36.1346 693.501 null]>>/section*.470<</Rect[291.695 4294.3 299.997 4202.98]/D[null/XYZ 36.1346 213.751 null]>>/page.297<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.471<</Rect[291.695 4919.3 299.997 4827.98]/D[null/XYZ 36.1346 138.47 null]>>/page.298<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.472<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/page.299<</Rect[291.695 228.299 308.299 211.695]/D[null/XYZ 36.1346 693.501 null]>>/section*.473<</Rect[291.695 699.302 299.997 607.977]/D[null/XYZ 36.1346 646.769 null]>>/section*.474<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.475<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/section*.476<</Rect[291.695 3823.3 299.997 3731.98]/D[null/XYZ 36.1346 270.484 null]>>/section*.170<</Rect[291.695 1725.3 299.997 1633.98]/D[null/XYZ 36.1346 523.187 null]>>/section*.477<
 </Rect[291.695 4497.3 299.997 4405.98]/D[null/XYZ 36.1346 189.3 null]>>/section*.171<</Rect[291.695 2174.3 299.997 2082.98]/D[null/XYZ 36.1346 469.105 null]>>/section*.478<</Rect[291.695 673.299 299.997 581.975]/D[null/XYZ 36.1346 649.901 null]>>/section*.172<</Rect[291.695 4295.3 299.997 4203.98]/D[null/XYZ 36.1346 213.631 null]>>/section*.479<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.173<</Rect[291.695 1022.3 299.997 930.975]/D[null/XYZ 36.1346 607.864 null]>>/section*.174<</Rect[291.695 2493.3 299.997 2401.97]/D[null/XYZ 36.1346 430.682 null]>>/section*.175<</Rect[291.695 641.3 299.997 549.976]/D[null/XYZ 36.1346 653.755 null]>>/section*.176<</Rect[291.695 2594.3 299.997 2502.98]/D[null/XYZ 36.1346 418.516 null]>>/section*.177<</Rect[291.695 4299.3 299.997 4207.98]/D[null/XYZ 36.1346 213.149 null]>>/section*.178<</Rect[291.695 4015.3 299.997 3923.98]/D[null/XYZ 36.1346 247.357 null]>>/section*.179<</Rect[291.695 3469.3 299.997 3377.
 98]/D[null/XYZ 36.1346 313.123 null]>>/section*.480<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.481<</Rect[291.695 1769.3 299.997 1677.98]/D[null/XYZ 36.1346 517.888 null]>>/section*.482<</Rect[291.695 2277.3 299.997 2185.98]/D[null/XYZ 36.1346 456.699 null]>>/section*.483<</Rect[291.695 3268.3 299.997 3176.97]/D[null/XYZ 36.1346 337.333 null]>>/section*.484<</Rect[291.695 3794.3 299.997 3702.98]/D[null/XYZ 36.1346 273.976 null]>>/section*.485<</Rect[291.695 4339.3 299.997 4247.98]/D[null/XYZ 36.1346 208.331 null]>>/section*.486<</Rect[291.695 721.3 299.997 629.976]/D[null/XYZ 36.1346 644.119 null]>>/section*.180<</Rect[291.695 2437.3 299.997 2345.98]/D[null/XYZ 36.1346 437.427 null]>>/section*.487<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.181<</Rect[291.695 3982.3 299.997 3890.98]/D[null/XYZ 36.1346 251.332 null]>>/section*.488<</Rect[291.695 2500.3 299.997 2408.98]/D[null/XYZ 36.1346 429.839 nu
 ll]>>/section*.182<</Rect[291.695 3112.3 299.997 3020.98]/D[null/XYZ 36.1346 356.124 null]>>/section*.489<</Rect[291.695 4022.3 299.997 3930.98]/D[null/XYZ 36.1346 246.514 null]>>/section*.183<</Rect[291.695 1135.3 299.997 1043.98]/D[null/XYZ 36.1346 594.253 null]>>/section*.184<</Rect[291.695 1228.3 299.997 1136.97]/D[null/XYZ 36.1346 583.051 null]>>/section*.185<</Rect[291.695 1044.3 299.997 952.977]/D[null/XYZ 36.1346 605.214 null]>>/section*.186<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/section*.187<</Rect[291.695 1433.3 299.997 1341.97]/D[null/XYZ 36.1346 558.359 null]>>/section*.188<</Rect[291.695 649.302 299.997 557.977]/D[null/XYZ 36.1346 652.792 null]>>/section*.189<</Rect[291.695 642.3 299.997 550.975]/D[null/XYZ 36.1346 653.635 null]>>/subsection.4.6.10<</Rect[291.695 1150.3 299.997 1058.98]/D[null/XYZ 36.1346 592.446 null]>>/section*.490<</Rect[291.695 3471.3 299.997 3379.98]/D[null/XYZ 36.1346 312.882 null]>>/section*.491<</Rect[29
 1.695 4115.3 299.997 4023.98]/D[null/XYZ 36.1346 235.312 null]>>/section*.492<</Rect[291.695 1577.3 299.997 1485.98]/D[null/XYZ 36.1346 541.014 null]>>/section*.493<</Rect[291.695 2122.3 299.997 2030.98]/D[null/XYZ 36.1346 475.369 null]>>/section*.494<</Rect[291.695 698.299 299.997 606.975]/D[null/XYZ 36.1346 646.89 null]>>/section*.495<</Rect[291.695 1243.3 299.997 1151.97]/D[null/XYZ 36.1346 581.245 null]>>/section*.496<</Rect[291.695 2500.3 299.997 2408.98]/D[null/XYZ 36.1346 429.839 null]>>/section*.190<</Rect[291.695 3657.3 299.997 3565.98]/D[null/XYZ 36.1346 290.478 null]>>/section*.497<</Rect[291.695 3956.3 299.997 3864.98]/D[null/XYZ 36.1346 254.464 null]>>/section*.191<</Rect[291.695 1460.3 299.997 1368.98]/D[null/XYZ 36.1346 555.107 null]>>/section*.498<</Rect[291.695 2573.3 299.997 2481.97]/D[null/XYZ 36.1346 421.046 null]>>/section*.192<</Rect[291.695 3487.3 299.997 3395.98]/D[null/XYZ 36.1346 310.955 null]>>/section*.499<</Rect[291.695 3218.3 299.997 3126.97]/D[
 null/XYZ 36.1346 343.356 null]>>/section*.193<</Rect[291.695 4707.3 299.997 4615.98]/D[null/XYZ 36.1346 164.006 null]>>/section*.194<</Rect[291.695 4480.3 299.997 4388.98]/D[null/XYZ 36.1346 191.348 null]>>/section*.195<</Rect[291.695 2878.3 299.997 2786.97]/D[null/XYZ 36.1346 384.309 null]>>/section*.196<</Rect[291.695 656.3 299.997 564.976]/D[null/XYZ 36.1346 651.949 null]>>/section*.197<</Rect[291.695 4047.3 299.997 3955.98]/D[null/XYZ 36.1346 243.503 null]>>/section*.198<</Rect[291.695 3057.3 299.997 2965.98]/D[null/XYZ 36.1346 362.748 null]>>/section*.199<</Rect[291.695 4452.3 299.997 4360.98]/D[null/XYZ 36.1346 194.721 null]>>/figure.5.1<</Rect[1236.69 3069.3 1253.3 3052.7]/D[null/XYZ 149.96 351.303 null]>>/figure.2.1<</Rect[1419.7 3317.3 1436.3 3300.7]/D[null/XYZ 172.002 321.431 null]>>/figure.2.2<</Rect[1724.7 4190.3 1741.3 4173.7]/D[null/XYZ 208.74 216.278 null]>>/subsection.2.7.1<</Rect[291.695 1001.3 299.997 909.976]/D[null/XYZ 36.1346 610.393 null]>>/figure.2.3<<
 /Rect[1885.7 3114.3 1902.3 3097.7]/D[null/XYZ 228.132 345.882 null]>>/subsection.2.7.2<</Rect[291.695 1826.3 299.997 1734.98]/D[null/XYZ 36.1346 511.022 null]>>/figure.2.4<</Rect[1223.7 2360.3 1240.3 2343.7]/D[null/XYZ 148.394 436.702 null]>>/subsection.2.7.3<</Rect[291.695 1853.3 299.997 1761.97]/D[null/XYZ 36.1346 507.77 null]>>/figure.2.5<</Rect[1795.7 1927.3 1812.3 1910.7]/D[null/XYZ 217.292 488.857 null]>>/figure.2.6<</Rect[1583.7 4327.3 1600.3 4310.7]/D[null/XYZ 191.756 199.777 null]>>/figure.2.7<</Rect[1554.7 3902.3 1571.3 3885.7]/D[null/XYZ 188.263 250.968 null]>>/subsection.2.4.1<</Rect[291.695 3845.3 299.997 3753.98]/D[null/XYZ 36.1346 267.833 null]>>/subsection.5.2.1<</Rect[291.695 3979.3 299.997 3887.98]/D[null/XYZ 36.1346 251.693 null]>>/subsection.5.2.2<</Rect[291.695 528.299 299.997 436.975]/D[null/XYZ 36.1346 667.366 null]>>>>
endobj
36 0 obj
<</Count 8/Type/Pages/Kids[42 0 R 1 0 R 4 0 R 7 0 R 10 0 R 13 0 R 16 0 R 19 0 R]>>
endobj
37 0 obj
<</Subtype/XML/Leng
 th 3776/Type/Metadata>>stream
++<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
++<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.0-c321 44.398116, Tue Aug 04 2009 14:24:30">
++   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
++      <rdf:Description rdf:about=""
++            xmlns:xap="http://ns.adobe.com/xap/1.0/">
++         <xap:CreateDate>2010-01-06T10:47:34Z</xap:CreateDate>
++         <xap:CreatorTool>LaTeX with hyperref package</xap:CreatorTool>
++         <xap:ModifyDate>2010-01-06T11:31:47-06:00</xap:ModifyDate>
++         <xap:MetadataDate>2010-01-06T11:31:47-06:00</xap:MetadataDate>
++      </rdf:Description>
++      <rdf:Description rdf:about=""
++            xmlns:dc="http://purl.org/dc/elements/1.1/">
++         <dc:format>application/pdf</dc:format>
++         <dc:description>
++            <rdf:Alt>
++               <rdf:li xml:lang="x-default"/>
++            </rdf:Alt>
++         </dc:description>
++         <dc:creator>
++            <rdf:Seq>
++               <rdf:li/>
++            </rdf:Seq>
++         </dc:creator>
++         <dc:title>
++            <rdf:Alt>
++               <rdf:li xml:lang="x-default"/>
++            </rdf:Alt>
++         </dc:title>
++      </rdf:Description>
++      <rdf:Description rdf:about=""
++            xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
++         <pdf:Keywords/>
++         <pdf:Producer>dvips + ESP Ghostscript 815.02</pdf:Producer>
++      </rdf:Description>
++      <rdf:Description rdf:about=""
++            xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/">
++         <xapMM:DocumentID>uuid:42d05dc9-de97-044c-9a6b-39d0943c7a5d</xapMM:DocumentID>
++         <xapMM:InstanceID>uuid:db8eb89d-613b-bc43-a136-17acfa2bab5b</xapMM:InstanceID>
++      </rdf:Description>
++   </rdf:RDF>
++</x:xmpmeta>
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                                                                                                    
++                           
++<?xpacket end="w"?>
endstream
endobj
38 0 obj
<</CreationDate(D:20100106104734Z)/Subject()/Author()/Creator(LaTeX with hyperref package)/Keywords()/Producer(dvips + ESP Ghostscript 815.02)/ModDate(D:20100106113147-06'00')/Title()>>
endobj
xref
0 39
0000000000 65535 f
++0000064236 00000 n
++0000064415 00000 n
++0000064448 00000 n
++0000069632 00000 n
++0000069811 00000 n
++0000069844 00000 n
++0000075805 00000 n
++0000075984 00000 n
++0000076017 00000 n
++0000081853 00000 n
++0000082035 00000 n
++0000082069 00000 n
++0000085988 00000 n
++0000086170 00000 n
++0000086204 00000 n
++0000089296 00000 n
++0000089478 00000 n
++0000089512 00000 n
++0000091597 00000 n
++0000091794 00000 n
++0000091961 00000 n
++0000091995 00000 n
++0000093758 00000 n
++0000093815 00000 n
++0000093872 00000 n
++0000093941 00000 n
++0000094010 00000 n
++0000094088 00000 n
++0000094182 00000 n
++0000094251 00000 n
++0000094308 00000 n
++0000094365 00000 n
++0000095557 00000 n
++0000095647 00000 n
++0000095724 00000 n
++0000298219 00000 n
++0000298318 00000 n
++0000302171 00000 n
++trailer
<</Size 39>>
startxref
116
%%EOF
+\ No newline at end of file
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/Globals.cpp b/src/condor_contrib/mgmt/qmf/daemons/Globals.cpp
+index 0a850ff..37a5873 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/Globals.cpp
++++ b/src/condor_contrib/mgmt/qmf/daemons/Globals.cpp
+@@ -20,4 +20,5 @@
+ 
+ JobCollectionType g_jobs;
+ SubmissionCollectionType g_submissions;
+-OwnerlessClusterType g_ownerless;
+\ No newline at end of file
++OwnerlessClusterType g_ownerless_clusters;
++OwnerlessSubmissionType g_ownerless_submissions;
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/Globals.h b/src/condor_contrib/mgmt/qmf/daemons/Globals.h
+index 989d7ac..8850a0c 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/Globals.h
++++ b/src/condor_contrib/mgmt/qmf/daemons/Globals.h
+@@ -33,10 +33,12 @@ using namespace std;
+ 
+ typedef map<const char *, Job *, cmpstr> JobCollectionType;
+ typedef map<const char *, SubmissionObject *, cmpstr> SubmissionCollectionType;
+-typedef map<int, const char *> OwnerlessClusterType;
++typedef map<int, string> OwnerlessClusterType;
++typedef map<int, SubmissionObject*> OwnerlessSubmissionType;
+ 
+ extern JobCollectionType g_jobs;
+ extern SubmissionCollectionType g_submissions;
+-extern OwnerlessClusterType g_ownerless;
++extern OwnerlessClusterType g_ownerless_clusters;
++extern OwnerlessSubmissionType g_ownerless_submissions;
+ 
+ #endif /* _GLOBALS_H */
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/Job.cpp b/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
+index 22ea98a..a7daf44 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
++++ b/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
+@@ -20,7 +20,7 @@
+ #include "condor_common.h"
+ #include "condor_debug.h"
+ #include "condor_attributes.h"
+-#include "condor_parser.h"
++#include "condor_classad.h"
+ #include "proc.h"
+ 
+ #include "stringSpace.h"
+@@ -247,7 +247,8 @@ LiveJobImpl::Set ( const char *_name, const char *_value )
+ 	// if we are in here, we don't have m_submission
+ 	PROC_ID id = getProcByString(m_job->GetKey());
+ 	std::string val = TrimQuotes( _value );
+-	g_ownerless[id.cluster] = strdup( val.c_str() );
++	g_ownerless_clusters[id.cluster] = val;
++	m_job->UpdateSubmission(id.cluster,val.c_str());
+     }
+ 
+     // parse the type
+@@ -372,7 +373,7 @@ HistoryJobImpl::HistoryJobImpl ( const HistoryEntry& _he):
+ 	m_he(_he)
+ {
+     m_job = NULL;
+-    g_ownerless[_he.cluster] = strdup(_he.owner.c_str());
++    g_ownerless_clusters[_he.cluster] = _he.owner;
+     dprintf ( D_FULLDEBUG, "HistoryJobImpl created for '%d.%d'\n", _he.cluster, _he.proc );
+ }
+ 
+@@ -585,18 +586,26 @@ void Job::DecrementSubmission() {
+ }
+ 
+ void
++Job::UpdateSubmission ( int cluster, const char* owner )
++{
++	OwnerlessSubmissionType::const_iterator it = g_ownerless_submissions.find ( cluster );
++	if ( g_ownerless_submissions.end() != it ) {
++		SubmissionObject* submission = (*it).second;
++		submission->SetOwner(owner);
++		g_ownerless_submissions.erase(cluster);
++	}
++}
++
++void
+ Job::SetSubmission ( const char* _subName, int cluster )
+ {
+ 	const char* owner = NULL;
+ 
+ 	// need to see if someone has left us an owner
+-	OwnerlessClusterType::const_iterator it = g_ownerless.find ( cluster );
+-	if ( g_ownerless.end() == it )
++	OwnerlessClusterType::const_iterator it = g_ownerless_clusters.find ( cluster );
++	if ( g_ownerless_clusters.end() != it )
+ 	{
+-		dprintf ( D_FULLDEBUG, "warning: unable to resolve owner for Job key '%s' and cluster '%d'\n", GetKey(), cluster );
+-	}
+-	else {
+-		owner = ( *it ).second ;
++		owner = ( *it ).second.c_str() ;
+ 	}
+ 
+ 	SubmissionCollectionType::const_iterator element = g_submissions.find ( _subName );
+@@ -617,7 +626,11 @@ Job::SetSubmission ( const char* _subName, int cluster )
+ 	if (owner) {
+ 		// ensure that the submission has an owner
+ 		m_submission->SetOwner ( owner );
+-		g_ownerless.erase ( cluster );
++		g_ownerless_clusters.erase ( cluster );
++	}
++	else {
++		// add it to our list to be updated for owner
++		g_ownerless_submissions[cluster] = m_submission;
+ 	}
+ 
+ }
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/Job.h b/src/condor_contrib/mgmt/qmf/daemons/Job.h
+index 2a640f5..147b10b 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/Job.h
++++ b/src/condor_contrib/mgmt/qmf/daemons/Job.h
+@@ -149,6 +149,7 @@ class Job
+         void Remove ( const char* );
+ 
+         void SetSubmission ( const char*, int );
++        void UpdateSubmission ( int, const char* );
+         void IncrementSubmission();
+         void DecrementSubmission();
+ 
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/JobServerJobLogConsumer.cpp b/src/condor_contrib/mgmt/qmf/daemons/JobServerJobLogConsumer.cpp
+index 62f22c2..4384e3a 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/JobServerJobLogConsumer.cpp
++++ b/src/condor_contrib/mgmt/qmf/daemons/JobServerJobLogConsumer.cpp
+@@ -19,10 +19,8 @@
+ 
+ #include "condor_common.h"
+ #include "condor_debug.h"
+-#include "condor_exprtype.h"
++#include "condor_classad.h"
+ #include "condor_attributes.h"
+-#include "condor_astbase.h"
+-#include "condor_parser.h"
+ #include "condor_qmgr.h"
+ 
+ #include "ClassAdLogReader.h"
+@@ -118,9 +116,7 @@ JobServerJobLogConsumer::NewClassAd(const char *_key,
+ 		JobCollectionType::const_iterator element = g_jobs.find(cluster_dup);
+         ClusterJobImpl* cluster_impl = NULL;
+ 
+-		// TODO this code assumes that we will always get the parent 
+-		// classad before its child from the job log...this is not strictly
+-		// guaranteed (e.g., compressed log?)
++		// either find an existing cluster parent or create a new one
+ 		if (g_jobs.end() == element) {
+ 			// didn't find an existing job so create a new one
+ 			Job* new_cluster_job = new Job(cluster_dup);
+@@ -136,13 +132,6 @@ JobServerJobLogConsumer::NewClassAd(const char *_key,
+         new_proc_job->SetImpl(new LiveJobImpl(key_dup, cluster_impl));
+         g_jobs[key_dup] = new_proc_job;
+ 
+-//		if (cluster_job) {
+-//			ClassAd ad;
+-//			cluster_job->GetFullAd(ad);
+-//			dprintf(D_FULLDEBUG, "JobServerJobLogConsumer::NewClassAd found a parent ClassAd from cluster...\n");
+-//			ad.dPrint(D_FULLDEBUG|D_NOHEADER);
+-//		}
+-
+ 	}
+ 
+ 	return true;
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/SubmissionObject.cpp b/src/condor_contrib/mgmt/qmf/daemons/SubmissionObject.cpp
+index 5741e43..6b7fee4 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/SubmissionObject.cpp
++++ b/src/condor_contrib/mgmt/qmf/daemons/SubmissionObject.cpp
+@@ -180,7 +180,7 @@ SubmissionObject::GetHeld()
+ void
+ SubmissionObject::SetOwner ( const char *owner )
+ {
+-    if ( !ownerSet )
++    if (owner && !ownerSet )
+     {
+         mgmtObject->set_Owner ( string(owner) );
+         ownerSet = true;
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/MgmtConversionMacros.h b/src/condor_contrib/mgmt/qmf/plugins/MgmtConversionMacros.h
+index 5eccb07..881acfc 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/MgmtConversionMacros.h
++++ b/src/condor_contrib/mgmt/qmf/plugins/MgmtConversionMacros.h
+@@ -71,6 +71,7 @@ if (ad.LookupString(#attr, &str)) {									\
+ }
+ 
+ #define INTEGER(attr) BASE(attr,Integer,num,(uint32_t) num,)
++#define INTEGER64(attr) BASE(attr,Float,flt,(uint64_t) flt,)
+ #define INTEGER2(src,dest) BASE2(src,dest,Integer,num,(uint32_t) num,)
+ #define OPT_INTEGER(attr) OPT_BASE(attr,Integer,num,(uint32_t) num,)
+ #define DOUBLE(attr) BASE(attr,Float,flt,(double) flt,)
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/NegotiatorObject.cpp b/src/condor_contrib/mgmt/qmf/plugins/NegotiatorObject.cpp
+index 78baa6c..48290df 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/NegotiatorObject.cpp
++++ b/src/condor_contrib/mgmt/qmf/plugins/NegotiatorObject.cpp
+@@ -188,7 +188,7 @@ NegotiatorObject::SetLimit(std::string &name, double max, std::string &text)
+ 		return STATUS_USER + 1;
+ 	}
+ 
+-	if (!IsValidGroupUserName(name,text)) {
++	if (!IsValidParamName(name,text)) {
+ 		return STATUS_USER + 2;
+ 	}
+ 
+@@ -233,7 +233,7 @@ NegotiatorObject::SetRawConfig(std::string &name, std::string &value, std::strin
+ 		return STATUS_USER + 1;
+ 	}
+ 
+-	if (!IsValidAttributeName(name,text)) {
++	if (!IsValidParamName(name,text)) {
+ 		return STATUS_USER + 2;
+ 	}
+ 
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/SchedulerObject.cpp b/src/condor_contrib/mgmt/qmf/plugins/SchedulerObject.cpp
+index 46f7e1c..02a96e3 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/SchedulerObject.cpp
++++ b/src/condor_contrib/mgmt/qmf/plugins/SchedulerObject.cpp
+@@ -102,6 +102,29 @@ SchedulerObject::update(const ClassAd &ad)
+ 	INTEGER(TotalRemovedJobs);
+ 	INTEGER(TotalRunningJobs);
+ 
++    INTEGER(WindowedStatWidth);
++    INTEGER(UpdateInterval);
++
++    INTEGER(JobsSubmitted);
++    DOUBLE(JobSubmissionRate);
++    INTEGER(JobsCompleted);
++    DOUBLE(JobCompletionRate);
++    INTEGER(JobsExited);
++    INTEGER(ShadowExceptions);
++    INTEGER(JobsSubmittedCum);
++    INTEGER(JobsCompletedCum);
++    INTEGER(JobsExitedCum);
++    INTEGER(ShadowExceptionsCum);
++    INTEGER(JobsStartedCum);
++    INTEGER(JobsStarted);
++    DOUBLE(JobStartRate);
++    DOUBLE(MeanTimeToStartCum);
++    DOUBLE(MeanRunningTimeCum);
++    INTEGER64(SumTimeToStartCum);
++    INTEGER64(SumRunningTimeCum);
++    DOUBLE(MeanTimeToStart);
++    DOUBLE(MeanRunningTime);
++
+ 	mgmtObject->set_System(mgmtObject->get_Machine());
+ 
+ 	// debug
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/SlotObject.cpp b/src/condor_contrib/mgmt/qmf/plugins/SlotObject.cpp
+index e41fe59..d1d43bf 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/SlotObject.cpp
++++ b/src/condor_contrib/mgmt/qmf/plugins/SlotObject.cpp
+@@ -23,7 +23,6 @@
+ 
+ #include "condor_debug.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ 
+ #include "Slot.h"
+ 
+@@ -223,4 +222,4 @@ SlotObject::ManagementMethod ( uint32_t methodId,
+     }
+ 
+     return STATUS_NOT_IMPLEMENTED;
+-}
+\ No newline at end of file
++}
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/Utils.cpp b/src/condor_contrib/mgmt/qmf/plugins/Utils.cpp
+index 8262f95..90e2c32 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/Utils.cpp
++++ b/src/condor_contrib/mgmt/qmf/plugins/Utils.cpp
+@@ -22,6 +22,8 @@
+ 
+ #include "condor_debug.h"
+ 
++#include "condor_config.h" // is_valid_param_name
++
+ #include "compat_classad_util.h"
+ 
+ 
+@@ -49,23 +51,37 @@ string TrimQuotes(const char* str) {
+ }
+ 
+ // validate that an incoming group/user name is
+-// alphanumeric, underscores, or a dot separator
++// alphanumeric, underscores, @ or a dot separator
+ bool IsValidGroupUserName(const std::string& _name, std::string& _text) {
+ 	const char* ptr = _name.c_str();
++
+ 	while( *ptr ) {
+ 		char c = *ptr++;
+ 		if (	('a' > c || c > 'z') &&
+ 			('A' > c || c > 'Z') &&
+ 			('0' > c || c > '9') &&
+ 			(c != '_' ) &&
++			(c != '@' ) &&
+ 			(c != '.' ) ) {
+-			_text = "Invalid name for group/user - alphanumeric, underscore and dot characters only";
++			_text = "Invalid name for group/user - alphanumeric, underscore, @ and dot characters only";
+ 			return false;
+ 		}
+ 	}
+ 	return true;
+ }
+ 
++// validate that an incoming group/user name is
++// alphanumeric, underscores, or a dot separator
++bool IsValidParamName(const std::string& _name, std::string& _text) {
++	const char* ptr = _name.c_str();
++
++	if (!is_valid_param_name(ptr)) {
++		_text = "Invalid name for group/user - alphanumeric, underscore, @ and dot characters only";
++		return false;
++	}
++	return true;
++}
++
+ // validate that an incoming attribute name is
+ // alphanumeric, or underscores
+ bool IsValidAttributeName(const std::string& _name, std::string& _text) {
+@@ -161,18 +177,14 @@ bool
+ PopulateVariantMapFromAd(compat_classad::ClassAd &ad, Variant::Map &_map)
+ {
+ 	ExprTree *expr;
+-    ClassAd::iterator iter;
+-
+-    ad.ResetExpr();
+-    _map.clear();
+-    iter = ad.begin();
+-    while (iter != ad.end()) {
+-            string name = iter->first;
+-            if (!AddAttribute(ad, name.c_str(), _map)) {
++	const char *name;
++	ad.ResetExpr();
++	_map.clear();
++	while (ad.NextExpr(name,expr)) {
++		if (!AddAttribute(ad, name, _map)) {
+                     return false;
+-            }
+-            iter++;
+-    }
++		}
++	}
+ 
+ 	// TODO: debug
+ //	if (DebugFlags & D_FULLDEBUG) {
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/Utils.h b/src/condor_contrib/mgmt/qmf/plugins/Utils.h
+index a248dab..670956a 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/Utils.h
++++ b/src/condor_contrib/mgmt/qmf/plugins/Utils.h
+@@ -27,6 +27,8 @@ bool AddAttribute(compat_classad::ClassAd &ad, const char *name, qpid::types::Va
+ 
+ bool IsValidGroupUserName(const std::string& _name, std::string& _text);
+ 
++bool IsValidParamName(const std::string& _name, std::string& _text);
++
+ bool IsValidAttributeName(const std::string& _name, std::string& _text);
+ 
+ bool CheckRequiredAttrs(compat_classad::ClassAd& ad, const char* attrs[], std::string& missing);
+diff --git a/src/condor_contrib/mgmt/qmf/plugins/condor-management-schema.xml b/src/condor_contrib/mgmt/qmf/plugins/condor-management-schema.xml
+index cf09744..b8a9bed 100644
+--- a/src/condor_contrib/mgmt/qmf/plugins/condor-management-schema.xml
++++ b/src/condor_contrib/mgmt/qmf/plugins/condor-management-schema.xml
+@@ -1,3 +1,4 @@
++<?xml version="1.0" encoding="utf-8"?>
+ <schema package="com.redhat.grid">
+ 
+ <!--
+@@ -38,6 +39,8 @@
+   <statistic name="MonitorSelfRegisteredSocketCount" type="uint32"/>
+   <statistic name="MonitorSelfResidentSetSize" type="uint32" unit="KiB"/>
+   <statistic name="MonitorSelfTime" type="absTime" unit="nanosecond"/>
++  <!-- DetectedMemory: detected machine RAM -->
++  <!-- DetectedCpus: detected machine cpus/cores -->
+ </group>
+ 
+ <group name="GridMethods">
+@@ -502,6 +505,52 @@ Set by Collector:
+     <statistic name="TotalRemovedJobs" type="uint32"/>
+     <statistic name="TotalRunningJobs" type="uint32"/>    
+ 
++    <property name="WindowedStatWidth" type="uint32" unit="seconds"
++	    desc="The stat window width, config param WINDOWED_STAT_WIDTH"/>
++    <statistic name="UpdateInterval" type="uint32" unit="seconds"
++	     desc="Seconds between current publish and previous"/>
++
++    <statistic name="JobsSubmitted" type="uint32"
++	     desc="Number of jobs submitted over most recent sampling window"/>
++    <statistic name="JobSubmissionRate" type="double"
++	     desc="Rate of job submissions (jobs per second) over most recent sampling window"/>
++    <statistic name="JobsCompleted" type="uint32"
++	     desc="Number of jobs completed (successfully, shadow code=100 or 115) over most recent sampling window"/>
++    <statistic name="JobCompletionRate" type="double"
++	     desc="Rate of job completions (jobs per second) over most recent sampling window"/>
++    <statistic name="JobsExited" type="uint32"
++	     desc="Number of jobs that exited over most recent sampling window"/>
++    <statistic name="ShadowExceptions" type="uint32"
++	     desc="Number of shadow excptions over most recent sampling window"/>
++    <!-- ExitCodeXXX: number of jobs exited with code XXX (100, 115, etc) over window -->
++    <statistic name="JobsSubmittedCum" type="uint32"
++	     desc="Number of jobs submitted over lifetime of the Scheduler"/>
++    <statistic name="JobsCompletedCum" type="uint32"
++	     desc="Number of jobs successfully completed over lifetime of the Scheduler"/>
++    <statistic name="JobsExitedCum" type="uint32"
++	     desc="Number of jobs exited over the lifetime of the Scheduler"/>
++    <statistic name="ShadowExceptionsCum" type="uint32"
++	     desc="Number of shadow exceptions over the lifetime of the Scheduler"/>
++    <!-- ExitCodeCumXXX: number of jobs exited with code XXX over schedd lifetime -->
++    <statistic name="JobsStartedCum" type="uint32"
++	     desc="Number of jobs started over the lifetime of the Scheduler"/>
++    <statistic name="JobsStarted" type="uint32"
++	     desc="Number of jobs started over the lifetime of the Scheduler"/>
++    <statistic name="JobStartRate" type="double"
++	     desc="Rate of job starts (jobs per second) over the most recent sampling window"/>
++    <statistic name="MeanTimeToStartCum" type="double" unit="seconds"
++	     desc="Mean time a job waits in the Scheduler until first start, over the lifetime of the Scheduler"/>
++    <statistic name="MeanRunningTimeCum" type="double" unit="seconds"
++	     desc="Mean running time (wall-clock) for jobs in the Scheduler, over the lifetime of the Scheduler"/>
++    <statistic name="SumTimeToStartCum" type="uint64" unit="seconds"
++	     desc="Sum of job wait times to first start, over the lifetime of the Scheduler"/>
++    <statistic name="SumRunningTimeCum" type="uint64" unit="seconds"
++	     desc="Sum of job running times, over the lifetime of the Scheduler"/>
++    <statistic name="MeanTimeToStart" type="double" unit="seconds"
++	     desc="Mean time a job waits in the Scheduler until first start, over most recent sampling window"/>
++    <statistic name="MeanRunningTime" type="double" unit="seconds"
++	     desc="Mean running time (wall-clock) time of jobs in the Scheduler, over most recent sampling window"/>
++
+     <method name="SubmitJob">
+       <arg name="Ad" dir="I" type="map"/>
+       <arg name="Id" dir="O" type="sstr"/>
+diff --git a/src/condor_contrib/mgmt/qmf/test/submit-vm.py b/src/condor_contrib/mgmt/qmf/test/submit-vm.py
+index 06155d0..8f83185 100755
+--- a/src/condor_contrib/mgmt/qmf/test/submit-vm.py
++++ b/src/condor_contrib/mgmt/qmf/test/submit-vm.py
+@@ -17,7 +17,7 @@
+ #
+ from qmf.console import Session
+ from sys import exit, argv
+-import time, pwd
++import time, pwd, os
+ 
+ uid = pwd.getpwuid(os.getuid())[0]
+ if not uid:
+diff --git a/src/condor_contrib/mgmt/qmf/test/submit.py b/src/condor_contrib/mgmt/qmf/test/submit.py
+index 7a57d4f..2969488 100755
+--- a/src/condor_contrib/mgmt/qmf/test/submit.py
++++ b/src/condor_contrib/mgmt/qmf/test/submit.py
+@@ -17,7 +17,7 @@
+ #
+ from qmf.console import Session
+ from sys import exit, argv
+-import time, pwd
++import time, pwd, os
+ 
+ uid = pwd.getpwuid(os.getuid())[0]
+ if not uid:
+diff --git a/src/condor_contrib/triggerd/src/TriggerConsole.cpp b/src/condor_contrib/triggerd/src/TriggerConsole.cpp
+index 75406e5..5801fea 100644
+--- a/src/condor_contrib/triggerd/src/TriggerConsole.cpp
++++ b/src/condor_contrib/triggerd/src/TriggerConsole.cpp
+@@ -102,15 +102,37 @@ TriggerConsole::config(std::string host, int port, std::string user, std::string
+    url << host << ":" << port;
+    options << "{reconnect:True"; 
+    if (!user.empty())
++   {
+       options << ", username:'" << user << "', password:'" << passwd << "'";
++   }
+    options << "}";
+ 
+-   qpidConnection = qpid::messaging::Connection(url.str(), options.str());
+-   qpidConnection.open();
++   try
++   {
++      qpidConnection = qpid::messaging::Connection(url.str(), options.str());
++      qpidConnection.open();
++   }
++   catch(...)
++   {
++      dprintf(D_ALWAYS, "Triggerd Error: Failed to contact AMQP broker on host '%s'.  Absent nodes detection disabled\n", host.c_str());
++      qpidConnection.close();
++   }
+ 
+-   qmf2Session = qmf::ConsoleSession(qpidConnection);
+-   qmf2Session.open();
+-   qmf2Session.setAgentFilter("[and, [eq, _vendor, [quote, 'com.redhat.grid']], [eq, _product, [quote, 'master']]]");
++   if (true == qpidConnection.isOpen())
++   {
++      try
++      {
++         qmf2Session = qmf::ConsoleSession(qpidConnection);
++         qmf2Session.open();
++         qmf2Session.setAgentFilter("[and, [eq, _vendor, [quote, 'com.redhat.grid']], [eq, _product, [quote, 'master']]]");
++      }
++      catch(...)
++      {
++         dprintf(D_ALWAYS, "Triggerd Error: Failed to setup QMF connections\n");
++         qpidConnection.close();
++         qmf2Session.close();
++      }
++   }
+ }
+ 
+ 
+@@ -124,6 +146,12 @@ TriggerConsole::findAbsentNodes()
+    std::list<std::string> missing_nodes;
+    uint64_t timeout(30);
+ 
++   // Only Perform the check if the qpid connection is valid
++   if (false == qpidConnection.isOpen())
++   {
++      return missing_nodes;
++   }
++
+    // Drain the queue of pending console events.
+    qmf::ConsoleEvent evt;
+    while (qmf2Session.nextEvent(evt, qpid::messaging::Duration::IMMEDIATE));
+diff --git a/src/condor_contrib/triggerd/src/Triggerd.cpp b/src/condor_contrib/triggerd/src/Triggerd.cpp
+index 85e65f9..21fa50d 100644
+--- a/src/condor_contrib/triggerd/src/Triggerd.cpp
++++ b/src/condor_contrib/triggerd/src/Triggerd.cpp
+@@ -221,22 +221,13 @@ Triggerd::init()
+    triggerCollection = new ClassAdCollection(trigger_log.c_str());
+    free(dataDir);
+ 
+-   // Initialize the triggers if any already exist
+-   triggerCollection->StartIterateAllClassAds();
+-   while(true == triggerCollection->IterateAllClassAds(ad, key))
+-   {
+-      key_value = atoll(key.value());
+-      if (triggers.end() == triggers.find(key_value))
+-      {
+-         if (STATUS_OK != AddTriggerToCollection(key_value, ad, error_text))
+-         {
+-            dprintf(D_ALWAYS, "Triggerd Error: '%s'.  Removing trigger\n", error_text.c_str());
+-            int_str << key_value;
+-            triggerCollection->DestroyClassAd(int_str.str().c_str());
+-         }
+-      }
+-   }
++   settings.host = std::string(host);
++   settings.port = port;
++   settings.username = std::string(username);
++   settings.password = std::string(password);
++   settings.mechanism = std::string(mechanism);
+ 
++   // Initialize the QMF agent
+    singleton = new ManagementAgent::Singleton();
+    ManagementAgent* agent = singleton->getInstance();
+ 
+@@ -244,17 +235,9 @@ Triggerd::init()
+    CondorTrigger::registerSelf(agent);
+    EventCondorTriggerNotify::registerSelf(agent);
+ 
+-   mgmtObject = new CondorTriggerService(agent, this);
+-
+-   settings.host = std::string(host);
+-   settings.port = port;
+-   settings.username = std::string(username);
+-   settings.password = std::string(password);
+-   settings.mechanism = std::string(mechanism);
+-
+-   // Initialize the QMF agent
+    agent->setName("com.redhat.grid","condortriggerservice", daemonName.c_str());
+    agent->init(settings, interval, true, storefile);
++   mgmtObject = new CondorTriggerService(agent, this);
+ 
+    // Initialize the QMF console, if desired
+    enable_console = param_boolean("ENABLE_ABSENT_NODES_DETECTION", false);
+@@ -269,8 +252,24 @@ Triggerd::init()
+    free(password);
+    free(mechanism);
+ 
+-   bool _lifetime = param_boolean("QMF_IS_PERSISTENT", true);
+-   agent->addObject(mgmtObject, daemonName.c_str(), _lifetime);
++   // Initialize the triggers if any already exist
++   triggerCollection->StartIterateAllClassAds();
++   while(true == triggerCollection->IterateAllClassAds(ad, key))
++   {
++      key_value = atoll(key.value());
++      if (triggers.end() == triggers.find(key_value))
++      {
++         if (STATUS_OK != AddTriggerToCollection(key_value, ad, error_text))
++         {
++            dprintf(D_ALWAYS, "Triggerd Error: '%s'.  Removing trigger\n", error_text.c_str());
++            int_str << key_value;
++            triggerCollection->DestroyClassAd(int_str.str().c_str());
++         }
++      }
++   }
++
++   bool lifetime = param_boolean("QMF_IS_PERSISTENT", true);
++   agent->addObject(mgmtObject, daemonName.c_str(), lifetime);
+ 
+    // Create a socket to handle management method calls
+    sock = new ReliSock;
+diff --git a/src/condor_contrib/triggerd/src/condor_trigger_config.py b/src/condor_contrib/triggerd/src/condor_trigger_config.py
+index 6b09ab7..8ac5e93 100644
+--- a/src/condor_contrib/triggerd/src/condor_trigger_config.py
++++ b/src/condor_contrib/triggerd/src/condor_trigger_config.py
+@@ -320,6 +320,9 @@ class TriggerConfigOptionParser(OptionParser):
+         self.add_option("-i", "--init", action="store_true", help="add default triggers")
+         self.add_option("-l", "--list", action="store_true", help="list installed triggers")
+         self.add_option("-s", "--test", action="store_true", help="test triggers")
++        self.add_option("-U", "--user", action="store", help="The username used to authenticate with the broker")
++        self.add_option("-P", "--password", action="store", help="The password used to authenticate with the broker")
++        self.add_option("-m", "--auth-mechanism", action="store", help="A comma separated list of authentication mechanisms to use when communicating with the broker.  Supported mechanisms are: ANONYMOUS, PLAIN, GSSAPI", default="ANONYMOUS,PLAIN,GSSAPI")
+ 
+     def is_valid(self, opts, args):
+         valid = False
+@@ -352,8 +355,13 @@ def main():
+     session = TriggerConfig(opts.test)
+ 
+     print "Connecting to broker '%s'..." % target
++    if opts.user != None and opts.password != None:
++       target = "%s/%s@%s" % (opts.user, opts.password, target)
++    elif opts.user != None:
++       target = "%s@%s" % (opts.user, target)
++
+     try:
+-        broker = session.addBroker(target)
++        broker = session.addBroker(target, mechanisms = opts.auth_mechanism.replace(',', ' '))
+     except Exception, e:
+         print e
+         sys.exit(1)
+diff --git a/src/condor_daemon_client/dc_collector.cpp b/src/condor_daemon_client/dc_collector.cpp
+index 6e75d2e..c353358 100644
+--- a/src/condor_daemon_client/dc_collector.cpp
++++ b/src/condor_daemon_client/dc_collector.cpp
+@@ -306,6 +306,17 @@ DCCollector::sendUpdate( int cmd, ClassAd* ad1, ClassAd* ad2, bool nonblocking )
+ 		ad2->CopyAttribute(ATTR_MY_ADDRESS,ad1);
+ 	}
+ 
++    // My initial plan was to publish these for schedd, however they will provide
++    // potentially useful context for performance/health assessment of any daemon 
++    if (ad1) {
++        ad1->Assign(ATTR_DETECTED_CPUS, param_integer("DETECTED_CORES", 0));
++        ad1->Assign(ATTR_DETECTED_MEMORY, param_integer("DETECTED_MEMORY", 0));
++    }
++    if (ad2) {
++        ad2->Assign(ATTR_DETECTED_CPUS, param_integer("DETECTED_CORES", 0));
++        ad2->Assign(ATTR_DETECTED_MEMORY, param_integer("DETECTED_MEMORY", 0));
++    }
++
+ 		// We never want to try sending an update to port 0.  If we're
+ 		// about to try that, and we're trying to talk to a local
+ 		// collector, we should try re-reading the address file and
+diff --git a/src/condor_daemon_core.V6/condor_daemon_core.h b/src/condor_daemon_core.V6/condor_daemon_core.h
+index 2801cd0..a4cf41a 100644
+--- a/src/condor_daemon_core.V6/condor_daemon_core.h
++++ b/src/condor_daemon_core.V6/condor_daemon_core.h
+@@ -176,6 +176,7 @@ struct FamilyInfo {
+ 	gid_t* group_ptr;
+ #endif
+ 	const char* glexec_proxy;
++	const char* cgroup;
+ 
+ 	FamilyInfo() {
+ 		max_snapshot_interval = -1;
+@@ -184,6 +185,7 @@ struct FamilyInfo {
+ 		group_ptr = NULL;
+ #endif
+ 		glexec_proxy = NULL;
++		cgroup = NULL;
+ 	}
+ };
+ 
+@@ -1510,6 +1512,7 @@ class DaemonCore : public Service
+ 	                     PidEnvID* penvid,
+ 	                     const char* login,
+ 	                     gid_t* group,
++			     const char* cgroup,
+ 	                     const char* glexec_proxy);
+ 
+ 	void CheckForTimeSkip(time_t time_before, time_t okay_delta);
+diff --git a/src/condor_daemon_core.V6/daemon_core.cpp b/src/condor_daemon_core.V6/daemon_core.cpp
+index 6db88ee..f93eedf 100644
+--- a/src/condor_daemon_core.V6/daemon_core.cpp
++++ b/src/condor_daemon_core.V6/daemon_core.cpp
+@@ -2633,9 +2633,9 @@ DaemonCore::reconfig(void) {
+ 	// by the time we get here, because it needs to be called early
+ 	// in the process.
+ 
+-#if !defined(WANT_OLD_CLASSADS)
++	// This is the compatibility layer on top of new ClassAds.
++	// A few configuration parameters control its behavior.
+ 	ClassAd::Reconfig();
+-#endif
+ 
+ 	m_dirty_sinful = true; // refresh our address in case config changes it
+ 
+@@ -6170,6 +6170,7 @@ DaemonCore::Register_Family(pid_t       child_pid,
+                             PidEnvID*   penvid,
+                             const char* login,
+                             gid_t*      group,
++			    const char* cgroup,
+                             const char* glexec_proxy)
+ {
+ 	bool success = false;
+@@ -6219,6 +6220,21 @@ DaemonCore::Register_Family(pid_t       child_pid,
+ 		           "group-based tracking unsupported on this platform");
+ #endif
+ 	}
++	if (cgroup != NULL) {
++#if defined(HAVE_EXT_LIBCGROUP)
++		if (!m_proc_family->track_family_via_cgroup(child_pid, cgroup))
++		{
++			dprintf(D_ALWAYS,
++				"Create_Process: error tracking family "
++				    "with root %u via cgroup %s\n",
++				child_pid, cgroup);
++			goto REGISTER_FAMILY_DONE;
++		}
++#else
++		EXCEPT("Internal error: "
++			    "cgroup-based tracking unsupported in this condor build");
++#endif
++	}
+ 	if (glexec_proxy != NULL) {
+ 		if (!m_proc_family->use_glexec_for_family(child_pid,
+ 		                                          glexec_proxy))
+@@ -6747,6 +6763,7 @@ void CreateProcessForkit::exec() {
+ 				                            penvid_ptr,
+ 				                            m_family_info->login,
+ 				                            tracking_gid_ptr,
++							    m_family_info->cgroup,
+ 				                            m_family_info->glexec_proxy);
+ 			if (!ok) {
+ 				errno = DaemonCore::ERRNO_REGISTRATION_FAILED;
+@@ -7908,6 +7925,7 @@ int DaemonCore::Create_Process(
+ 		                          NULL,
+ 		                          family_info->login,
+ 		                          NULL,
++					  family_info->cgroup,
+ 		                          family_info->glexec_proxy);
+ 		if (!ok) {
+ 			EXCEPT("error registering process family with procd");
+@@ -8355,6 +8373,7 @@ int DaemonCore::Create_Process(
+ 		                &pidtmp->penvid,
+ 		                family_info->login,
+ 		                NULL,
++				family_info->cgroup,
+ 		                family_info->glexec_proxy);
+ 	}
+ #endif
+diff --git a/src/condor_daemon_core.V6/soap_core.cpp b/src/condor_daemon_core.V6/soap_core.cpp
+index 0cf3a64..178dce7 100644
+--- a/src/condor_daemon_core.V6/soap_core.cpp
++++ b/src/condor_daemon_core.V6/soap_core.cpp
+@@ -518,6 +518,10 @@ int serve_file(struct soap *soap, const char *name, const char *type) {
+     web_root_realpath = strdup(buf);
+   }
+   free(web_root_dir);
++
++  if (!web_root_realpath) {
++    return 404;
++  } 
+   
+   char * full_name = dircat(web_root_realpath,name);
+   char * full_name_realpath = NULL;
+diff --git a/src/condor_examples/condor.boot.rpm b/src/condor_examples/condor.boot.rpm
+index c96d3b3..498e7da 100755
+--- a/src/condor_examples/condor.boot.rpm
++++ b/src/condor_examples/condor.boot.rpm
+@@ -500,7 +500,7 @@ find_masters() {
+ }
+ 
+ # To the best of its ability, finds the active condor_master's PID.
+-# echos the result, or an empty string if none was found.
++# Store the result in global variable MASTER_PIDS.
+ # You can call this repeatedly to check for updates.
+ # If we use the pid file the first time through, always use it --
+ #  if it disappears, means that the Condor went bye-bye
+@@ -560,7 +560,7 @@ wait_for_exit() {
+     condor_master_pids
+   done
+   
+-  if [ "`condor_master_pids`" = "" ]; then
++  if [ "$MASTER_PIDS" = "" ]; then
+     return 0
+   else
+     return 1
+@@ -684,8 +684,8 @@ xstop() {
+ # This can fail for any number of reasons, and we wouldn't
+ # detect it.
+ #
+-# As a possible improvement, we might send SIGHUP if `condor_master_pids`
+-# is non-empty, only falling back on condor_reconfig if it is.
++# As a possible improvement, we might send SIGHUP if condor_master_pids
++# finds nothing, only falling back on condor_reconfig if it is.
+ #
+ # Also, detect the return code from CONDOR_RECONFIG; non-zero
+ # indicates aproblem. (At the moment that never happens, but
+@@ -712,7 +712,8 @@ reload() {
+ # 3 not running
+ # 4 unknown
+ status() {
+-  master_pid=`condor_master_pids`
++  condor_master_pids
++  master_pid="$MASTER_PIDS"
+   if [ "$master_pid" != "" ]; then
+     echo "Condor is running (pid $master_pid)"
+     return 0
+@@ -768,7 +769,8 @@ case "$INIT_COMMAND" in
+     ;;
+ 
+   'try-restart')
+-    if [ "`condor_master_pids`" = "" ]; then exit 0; fi # Not running
++    condor_master_pids
++    if [ "$MASTER_PIDS" = "" ]; then exit 0; fi # Not running
+     xstop
+     start
+     ;;
+diff --git a/src/condor_examples/condor_config.generic b/src/condor_examples/condor_config.generic
+index 403a043..2cd617a 100644
+--- a/src/condor_examples/condor_config.generic
++++ b/src/condor_examples/condor_config.generic
+@@ -180,7 +180,7 @@ FLOCK_COLLECTOR_HOSTS = $(FLOCK_TO)
+ ##  machine(s) where whoever is the condor administrator(s) works
+ ##  (assuming you trust all the users who log into that/those
+ ##  machine(s), since this is machine-wide access you're granting).
+-ALLOW_ADMINISTRATOR = $(CONDOR_HOST)
++ALLOW_ADMINISTRATOR = $(CONDOR_HOST), $(IP_ADDRESS)
+ 
+ ##  If there are no machines that should have administrative access 
+ ##  to your pool (for example, there's no machine where only trusted
+@@ -239,11 +239,11 @@ ALLOW_WRITE = $(FULL_HOSTNAME), $(IP_ADDRESS)
+ 
+ ##  Negotiator access.  Machines listed here are trusted central
+ ##  managers.  You should normally not have to change this.
+-ALLOW_NEGOTIATOR = $(CONDOR_HOST)
++ALLOW_NEGOTIATOR = $(CONDOR_HOST), $(IP_ADDRESS)
+ ##  Now, with flocking we need to let the SCHEDD trust the other 
+ ##  negotiators we are flocking with as well.  You should normally 
+ ##  not have to change this either.
+-ALLOW_NEGOTIATOR_SCHEDD = $(CONDOR_HOST), $(FLOCK_NEGOTIATOR_HOSTS)
++ALLOW_NEGOTIATOR_SCHEDD = $(CONDOR_HOST), $(FLOCK_NEGOTIATOR_HOSTS), $(IP_ADDRESS)
+ 
+ ##  Config access.  Machines listed here can use the condor_config_val
+ ##  tool to modify all daemon configurations.  This level of host-wide
+@@ -1830,6 +1830,14 @@ GRIDMANAGER_LOCK = $(LOCK)/GridmanagerLock.$(USERNAME)
+ ##  Various other settings that the Condor-G can use. 
+ ##--------------------------------------------------------------------
+ 
++## The number of seconds between status update requests. You can make 
++## this short (5 seconds) if you want Condor to respond quickly to 
++## instances as they terminate, or you can make it long (300 seconds = 5 
++## minutes) if you know your instances will run for awhile and don't 
++## mind delay between when they stop and when Condor responds to them 
++## stopping.
++GRIDMANAGER_JOB_PROBE_INTERVAL = 300
++
+ ## For grid-type gt2 jobs (pre-WS GRAM), limit the number of jobmanager
+ ## processes the gridmanager will let run on the headnode. Letting too
+ ## many jobmanagers run causes severe load on the headnode.
+@@ -1888,7 +1896,7 @@ CONDOR_GAHP = $(SBIN)/condor_c-gahp
+ CONDOR_GAHP_WORKER = $(SBIN)/condor_c-gahp_worker_thread
+ 
+ ##
+-## The Condor GAHP server has it's own log.  Like the Gridmanager, the
++## The Condor GAHP server has its own log.  Like the Gridmanager, the
+ ## GAHP server is run as the User, not a Condor daemon, so all users must 
+ ## have write permssion to the directory used for the logfile. Our 
+ ## suggestion is to create a directory called GridLogs in $(LOG) with 
+@@ -1965,7 +1973,7 @@ CREAM_GAHP = $(SBIN)/cream_gahp
+ DELTACLOUD_GAHP = $(SBIN)/deltacloud_gahp
+ 
+ ##
+-## EC2: Universe = Grid, Grid_Resource = Amazon
++## EC2 (SOAP): Universe = Grid, Grid_Resource = Amazon
+ ##
+ 
+ ## The location of the amazon_gahp program, required
+@@ -1976,20 +1984,29 @@ AMAZON_GAHP = $(SBIN)/amazon_gahp
+ #AMAZON_GAHP_DEBUG = D_FULLDEBUG
+ AMAZON_GAHP_LOG = /tmp/AmazonGahpLog.$(USERNAME)
+ 
+-## The number of seconds between status update requests to EC2. You can
+-## make this short (5 seconds) if you want Condor to respond quickly to
+-## instances as they terminate, or you can make it long (300 seconds = 5
+-## minutes) if you know your instances will run for awhile and don't mind
+-## delay between when they stop and when Condor responds to them
+-## stopping.
+-GRIDMANAGER_JOB_PROBE_INTERVAL = 300
+-
+ ## As of this writing Amazon EC2 has a hard limit of 20 concurrently
+ ## running instances, so a limit of 20 is imposed so the GridManager
+ ## does not waste its time sending requests that will be rejected.
+ GRIDMANAGER_MAX_SUBMITTED_JOBS_PER_RESOURCE_AMAZON = 20
+ 
+ ##
++## EC2 (REST): Universe = Grid, Grid_Resource = ec2
++##
++
++## The location of the ec2_gahp program, required
++EC2_GAHP = $(SBIN)/ec2_gahp
++
++## Location of log files, useful for debugging, must be in
++## a directory writable by any user, such as /tmp
++#EC2_GAHP_DEBUG = D_FULLDEBUG
++EC2_GAHP_LOG = /tmp/EC2GahpLog.$(USERNAME)
++
++## As of this writing Amazon EC2 has a hard limit of 20 concurrently
++## running instances, so a limit of 20 is imposed so the GridManager
++## does not waste its time sending requests that will be rejected.
++GRIDMANAGER_MAX_SUBMITTED_JOBS_PER_RESOURCE_EC2 = 20
++
++##
+ ##--------------------------------------------------------------------
+ ##  condor_credd credential managment daemon
+ ##--------------------------------------------------------------------
+diff --git a/src/condor_gridmanager/amazonjob.cpp b/src/condor_gridmanager/amazonjob.cpp
+index 27a13b5..7ef0bed 100644
+--- a/src/condor_gridmanager/amazonjob.cpp
++++ b/src/condor_gridmanager/amazonjob.cpp
+@@ -144,6 +144,7 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ 	char *gahp_debug = NULL;
+ 	ArgList args;
+ 	std::string value;
++	char *buffer = NULL;
+ 	
+ 	remoteJobId = NULL;
+ 	remoteJobState = "";
+@@ -154,6 +155,12 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ 	numSubmitAttempts = 0;
+ 	myResource = NULL;
+ 	gahp = NULL;
++	m_public_key_file = NULL;
++	m_private_key_file = NULL;
++	m_user_data = NULL;
++	m_user_data_file = NULL;
++	m_group_names = NULL;
++	m_instance_type = NULL;
+ 	
+ 	// check the public_key_file
+ 	buff[0] = '\0';
+@@ -183,8 +190,6 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ 		// at the attribute in a better way.
+ 
+ 	memset(buff, 0, 16385);
+-	m_user_data = NULL;
+-	m_user_data_file = NULL;	
+ 	
+ 	// if user assigns both user_data and user_data_file, the two will
+ 	// be concatenated by the gahp
+@@ -197,21 +202,17 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ 	
+ 	// get VM instance type
+ 	memset(buff, 0, 16385);
+-	m_instance_type = NULL; // if clients don't assign this value in condor submit file,
+-							// we should set the default value to NULL and gahp_server
+-							// will start VM in Amazon using m1.small mode.
++	// if clients don't assign this value in condor submit file,
++	// we should set the default value to NULL and gahp_server
++	// will start VM in Amazon using m1.small mode.
+ 	if ( jobAd->LookupString( ATTR_AMAZON_INSTANCE_TYPE, buff ) ) {
+ 		m_instance_type = strdup(buff);	
+ 	}
+ 	
+-	m_group_names = NULL;
+ 	m_vm_check_times = 0;
+ 	m_keypair_check_times = 0;
+ 
+ 	// for SSH keypair output file
+-	{
+-	char* buffer = NULL;
+-	
+ 	// Notice:
+ 	// 	we can have two kinds of SSH keypair output file names or the place where the 
+ 	// output private file should be written to, 
+@@ -227,7 +228,6 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ 		m_key_pair_file = NULL_FILE;
+ 	}
+ 	free (buffer);
+-	}
+ 
+ 	// In GM_HOLD, we assume HoldReason to be set only if we set it, so make
+ 	// sure it's unset when we start (unless the job is already held).
+@@ -359,13 +359,13 @@ dprintf( D_ALWAYS, "================================>  AmazonJob::AmazonJob 1 \n
+ AmazonJob::~AmazonJob()
+ {
+ 	if ( myResource ) myResource->UnregisterJob( this );
+-	if ( remoteJobId ) free( remoteJobId );
++	free( remoteJobId );
+ 	
+-	if ( gahp != NULL ) delete gahp;
++	delete gahp;
+ 	free (m_public_key_file);
+ 	free (m_private_key_file);
+ 	free (m_user_data);
+-	if (m_group_names != NULL) delete m_group_names;
++	delete m_group_names;
+ 	free(m_user_data_file);
+ 	free(m_instance_type);
+ }
+diff --git a/src/condor_gridmanager/condorjob.cpp b/src/condor_gridmanager/condorjob.cpp
+index 5e1e009..be35b8c 100644
+--- a/src/condor_gridmanager/condorjob.cpp
++++ b/src/condor_gridmanager/condorjob.cpp
+@@ -1534,6 +1534,9 @@ ClassAd *CondorJob::buildSubmitAd()
+ 		submit_ad->Assign( ATTR_X509_USER_PROXY, jobProxy->proxy_filename );
+ 		submit_ad->Assign( ATTR_X509_USER_PROXY_SUBJECT,
+ 						   jobProxy->subject->subject_name );
++		if (jobProxy->subject->email)
++			submit_ad->Assign( ATTR_X509_USER_PROXY_EMAIL,
++						   jobProxy->subject->email );
+ 		if ( jobProxy->subject->has_voms_attrs ) {
+ 			submit_ad->Assign( ATTR_X509_USER_PROXY_FQAN,
+ 							   jobProxy->subject->fqan );
+diff --git a/src/condor_gridmanager/creamresource.cpp b/src/condor_gridmanager/creamresource.cpp
+index e82339d..3680ed4 100644
+--- a/src/condor_gridmanager/creamresource.cpp
++++ b/src/condor_gridmanager/creamresource.cpp
+@@ -175,7 +175,7 @@ dprintf(D_FULLDEBUG,"    deleting %s\n",next_deleg->deleg_uri?next_deleg->deleg_
+ 		free( serviceUri );
+ 	}
+ 
+-	ResourcesByName.remove( HashKey( HashName( resourceName, proxySubject ) ) );
++	ResourcesByName.remove( HashKey( HashName( resourceName, proxyFQAN ) ) );
+ 
+ 	daemonCore->Cancel_Timer( delegationTimerId );
+ 	if ( gahp != NULL ) {
+diff --git a/src/condor_gridmanager/ec2job.cpp b/src/condor_gridmanager/ec2job.cpp
+new file mode 100644
+index 0000000..6f1dd34
+--- /dev/null
++++ b/src/condor_gridmanager/ec2job.cpp
+@@ -0,0 +1,1338 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++  
++#include "condor_common.h"
++#include "condor_attributes.h"
++#include "condor_debug.h"
++#include "condor_string.h"	// for strnewp and friends
++#include "../condor_daemon_core.V6/condor_daemon_core.h"
++#include "basename.h"
++#include "nullfile.h"
++#include "filename_tools.h"
++
++#include "gridmanager.h"
++#include "ec2job.h"
++#include "condor_config.h"
++  
++#define GM_INIT							0
++#define GM_UNSUBMITTED					1
++#define GM_START_VM						2
++#define GM_SAVE_INSTANCE_ID				3
++#define GM_SUBMITTED					4
++#define GM_DONE_SAVE					5
++#define GM_CANCEL						6
++#define GM_FAILED						7
++#define GM_DELETE						8
++#define GM_CLEAR_REQUEST				9
++#define GM_HOLD							10
++#define GM_PROBE_JOB					11
++#define GM_START						12
++#define GM_CREATE_KEYPAIR				13
++#define GM_DESTROY_KEYPAIR				14
++#define GM_DESTROY_KEYPAIR_SUBMIT		15
++#define GM_SAVE_KEYPAIR_NAME			16
++#define GM_CHECK_VM						17
++
++static const char *GMStateNames[] = {
++	"GM_INIT",
++	"GM_UNSUBMITTED",
++	"GM_START_VM",
++	"GM_SAVE_INSTANCE_ID",
++	"GM_SUBMITTED",
++	"GM_DONE_SAVE",
++	"GM_CANCEL",
++	"GM_FAILED",
++	"GM_DELETE",
++	"GM_CLEAR_REQUEST",
++	"GM_HOLD",
++	"GM_PROBE_JOB",
++	"GM_START",
++	"GM_CREATE_KEYPAIR",
++	"GM_DESTROY_KEYPAIR",
++	"GM_DESTROY_KEYPAIR_SUBMIT",
++	"GM_SAVE_KEYPAIR_NAME",
++	"GM_CHECK_VM",
++};
++
++#define EC2_VM_STATE_RUNNING			"running"
++#define EC2_VM_STATE_PENDING			"pending"
++#define EC2_VM_STATE_SHUTTINGDOWN	"shutting-down"
++#define EC2_VM_STATE_TERMINATED		"terminated"
++
++
++// TODO: Let the maximum submit attempts be set in the job ad or, better yet,
++// evalute PeriodicHold expression in job ad.
++#define MAX_SUBMIT_ATTEMPTS	1
++
++void EC2JobInit()
++{
++}
++
++
++void EC2JobReconfig()
++{
++	// change interval time for 5 minute
++	int tmp_int = param_integer( "GRIDMANAGER_JOB_PROBE_INTERVAL", 60 * 5 ); 
++	EC2Job::setProbeInterval( tmp_int );
++		
++	// Tell all the resource objects to deal with their new config values
++	EC2Resource *next_resource;
++
++	EC2Resource::ResourcesByName.startIterations();
++
++	while ( EC2Resource::ResourcesByName.iterate( next_resource ) != 0 ) {
++		next_resource->Reconfig();
++	}	
++}
++
++
++bool EC2JobAdMatch( const ClassAd *job_ad )
++{
++	int universe;
++	std::string resource;
++	
++	job_ad->LookupInteger( ATTR_JOB_UNIVERSE, universe );
++	job_ad->LookupString( ATTR_GRID_RESOURCE, resource );
++
++	if ( (universe == CONDOR_UNIVERSE_GRID) && (strncasecmp( resource.c_str(), "ec2", 3 ) == 0) ) 
++	{
++		return true;
++	}
++	return false;
++}
++
++
++BaseJob* EC2JobCreate( ClassAd *jobad )
++{
++	return (BaseJob *)new EC2Job( jobad );
++}
++
++int EC2Job::gahpCallTimeout = 600;
++int EC2Job::probeInterval = 300;
++int EC2Job::submitInterval = 300;
++int EC2Job::maxConnectFailures = 3;
++int EC2Job::funcRetryInterval = 15;
++int EC2Job::pendingWaitTime = 15;
++int EC2Job::maxRetryTimes = 3;
++
++EC2Job::EC2Job( ClassAd *classad )
++	: BaseJob( classad )
++{
++dprintf( D_ALWAYS, "================================>  EC2Job::EC2Job 1 \n");
++	char buff[16385]; // user data can be 16K, this is 16K+1
++	std::string error_string = "";
++	char *gahp_path = NULL;
++	char *gahp_log = NULL;
++	int gahp_worker_cnt = 0;
++	char *gahp_debug = NULL;
++	ArgList args;
++	std::string value;
++	char* buffer = NULL;
++	
++	remoteJobId = NULL;
++	remoteJobState = "";
++	gmState = GM_INIT;
++	lastProbeTime = 0;
++	enteredCurrentGmState = time(NULL);
++	lastSubmitAttempt = 0;
++	numSubmitAttempts = 0;
++	myResource = NULL;
++	gahp = NULL;
++	m_public_key_file = NULL;
++	m_private_key_file = NULL;
++	m_user_data = NULL;
++	m_user_data_file = NULL;
++	m_group_names = NULL;
++	m_instance_type = NULL;
++	m_elastic_ip = NULL;
++	
++	// check the public_key_file
++	buff[0] = '\0';
++	jobAd->LookupString( ATTR_EC2_ACCESS_KEY_ID, buff );
++	m_public_key_file = strdup(buff);
++	
++	if ( strlen(m_public_key_file) == 0 ) {
++		error_string = "Public key file not defined";
++		goto error_exit;
++	}
++
++	// check the private_key_file
++	buff[0] = '\0';
++	jobAd->LookupString( ATTR_EC2_SECRET_ACCESS_KEY, buff );
++	m_private_key_file = strdup(buff);
++	
++	if ( strlen(m_private_key_file) == 0 ) {
++		error_string = "Private key file not defined";
++		goto error_exit;
++	}
++
++    // lookup the elastic IP
++    buff[0] = '\0';
++    jobAd->LookupString( ATTR_EC2_ELASTIC_IP, buff );
++    m_elastic_ip = strdup(buff);
++
++		// XXX: Buffer Overflow if the user_data is > 16K? This code
++		// should be unprivileged.
++
++		// XXX: It is bad to assume the buff is initialized to 0s,
++		// always use memset? All this code should be changed to get
++		// at the attribute in a better way.
++
++	memset(buff, 0, 16385);
++	
++	// if user assigns both user_data and user_data_file, the two will
++	// be concatenated by the gahp
++	if ( jobAd->LookupString( ATTR_EC2_USER_DATA_FILE, buff ) ) {
++		m_user_data_file = strdup(buff);	
++	}
++	if ( jobAd->LookupString( ATTR_EC2_USER_DATA, buff ) ) {
++		m_user_data = strdup(buff);
++	}
++	
++	// get VM instance type
++	memset(buff, 0, 16385);
++	// if clients don't assign this value in condor submit file,
++	// we should set the default value to NULL and gahp_server
++	// will start VM in EC2 using m1.small mode.
++	if ( jobAd->LookupString( ATTR_EC2_INSTANCE_TYPE, buff ) ) {
++		m_instance_type = strdup(buff);	
++	}
++	
++	m_vm_check_times = 0;
++	m_keypair_check_times = 0;
++
++	// for SSH keypair output file
++	// Notice:
++	// 	we can have two kinds of SSH keypair output file names or the place where the 
++	// output private file should be written to, 
++	// 	1. the name assigned by client in the condor submit file with attribute "EC2KeyPairFile"
++	// 	2. if there is no attribute "EC2KeyPairFile" in the condor submit file, we 
++	// 	   should discard this private file by writing to NULL_FILE
++	if ( jobAd->LookupString( ATTR_EC2_KEY_PAIR_FILE, &buffer ) ) {
++		// clinet define the location where this SSH keypair file will be written to
++		m_key_pair_file = buffer;
++	} else {
++		// If client doesn't assign keypair output file name, we should discard it by 
++		// writing this private file to /dev/null
++		m_key_pair_file = NULL_FILE;
++	}
++	free (buffer);
++
++	// In GM_HOLD, we assume HoldReason to be set only if we set it, so make
++	// sure it's unset when we start (unless the job is already held).
++	if ( condorState != HELD && jobAd->LookupString( ATTR_HOLD_REASON, NULL, 0 ) != 0 ) {
++		jobAd->AssignExpr( ATTR_HOLD_REASON, "Undefined" );
++	}
++
++	jobAd->LookupString( ATTR_GRID_RESOURCE, value );
++	if ( value.length() ) {
++		const char *token;
++
++		Tokenize( value );
++
++		token = GetNextToken( " ", false );
++		if ( !token || strcasecmp( token, "ec2" ) ) {
++			sprintf( error_string, "%s not of type ec2",
++								  ATTR_GRID_RESOURCE );
++			goto error_exit;
++		}
++
++		token = GetNextToken( " ", false );
++		if ( token && *token ) {
++			m_serviceUrl = token;
++		} else {
++			sprintf( error_string, "%s missing EC2 service URL",
++								  ATTR_GRID_RESOURCE );
++			goto error_exit;
++		}
++
++	} else {
++		sprintf( error_string, "%s is not set in the job ad",
++							  ATTR_GRID_RESOURCE );
++		goto error_exit;
++	}
++
++	gahp_path = param( "EC2_GAHP" );
++	if ( gahp_path == NULL ) {
++		error_string = "EC2_GAHP not defined";
++		goto error_exit;
++	}
++
++	gahp_log = param( "EC2_GAHP_LOG" );
++	if ( gahp_log == NULL ) {
++		dprintf(D_ALWAYS, "Warning: No EC2_GAHP_LOG defined\n");
++	} else {
++		args.AppendArg("-f");
++		args.AppendArg(gahp_log);
++		free(gahp_log);
++	}
++
++	args.AppendArg("-w");
++	gahp_worker_cnt = param_integer( "EC2_GAHP_WORKER_MIN_NUM", 1 );
++	args.AppendArg(gahp_worker_cnt);
++
++	args.AppendArg("-m");
++	gahp_worker_cnt = param_integer( "EC2_GAHP_WORKER_MAX_NUM", 5 );
++	args.AppendArg(gahp_worker_cnt);
++
++	args.AppendArg("-d");
++	gahp_debug = param( "EC2_GAHP_DEBUG" );
++	if (!gahp_debug) {
++		args.AppendArg("D_ALWAYS");
++	} else {
++		args.AppendArg(gahp_debug);
++		free(gahp_debug);
++	}
++
++	gahp = new GahpClient( EC2_RESOURCE_NAME, gahp_path, &args );
++	free(gahp_path);
++	gahp->setNotificationTimerId( evaluateStateTid );
++	gahp->setMode( GahpClient::normal );
++	gahp->setTimeout( gahpCallTimeout );
++
++	myResource = EC2Resource::FindOrCreateResource( m_serviceUrl.c_str(), m_public_key_file, m_private_key_file );
++	myResource->RegisterJob( this );
++
++	jobAd->LookupString( ATTR_GRID_JOB_ID, value );
++	if ( value.length() ) {
++		const char *token;
++
++		Tokenize( value );
++
++		token = GetNextToken( " ", false );
++		if ( !token || strcasecmp( token, "ec2" ) ) {
++			sprintf( error_string, "%s not of type ec2", ATTR_GRID_JOB_ID );
++			goto error_exit;
++		}
++
++			// Skip the service URL
++		GetNextToken( " ", false );
++
++		token = GetNextToken( " ", false );
++		if ( token ) {
++			m_key_pair = token;
++		}
++
++		token = GetNextToken( " ", false );
++		if ( token ) {
++			remoteJobId = strdup( token );
++		}
++	}
++
++	if ( !m_key_pair.empty() ) {
++		myResource->AlreadySubmitted( this );
++	}
++	
++	jobAd->LookupString( ATTR_GRID_JOB_STATUS, remoteJobState );
++
++	// JEF: Increment a GMSession attribute for use in letting the job
++	// ad crash the gridmanager on request
++	if ( jobAd->LookupExpr( "CrashGM" ) != NULL ) {
++		int session = 0;
++		jobAd->LookupInteger( "GMSession", session );
++		session++;
++		jobAd->Assign( "GMSession", session );
++	}
++
++	return;
++
++ error_exit:
++	gmState = GM_HOLD;
++	if ( !error_string.empty() ) {
++		jobAd->Assign( ATTR_HOLD_REASON, error_string.c_str() );
++	}
++	
++	return;
++}
++
++EC2Job::~EC2Job()
++{
++	if ( myResource ) myResource->UnregisterJob( this );
++	free( remoteJobId );
++	
++	delete gahp;
++	free (m_public_key_file);
++	free (m_private_key_file);
++	free (m_user_data);
++	delete m_group_names;
++	free(m_user_data_file);
++	free(m_instance_type);
++    free(m_elastic_ip);
++}
++
++
++void EC2Job::Reconfig()
++{
++	BaseJob::Reconfig();
++}
++
++
++void EC2Job::doEvaluateState()
++{
++	int old_gm_state;
++	bool reevaluate_state = true;
++	time_t now = time(NULL);
++
++	bool attr_exists;
++	bool attr_dirty;
++	int rc;
++
++	daemonCore->Reset_Timer( evaluateStateTid, TIMER_NEVER );
++
++    dprintf(D_ALWAYS, "(%d.%d) doEvaluateState called: gmState %s, condorState %d\n",
++			procID.cluster,procID.proc,GMStateNames[gmState],condorState);
++
++	if ( gahp ) {
++		if ( !resourceStateKnown || resourcePingPending || resourceDown ) {
++			gahp->setMode( GahpClient::results_only );
++		} else {
++			gahp->setMode( GahpClient::normal );
++		}
++	}
++	
++	do {
++		
++		char *gahp_error_code = NULL;
++
++		// JEF: Crash the gridmanager if requested by the job
++		int should_crash = 0;
++		jobAd->Assign( "GMState", gmState );
++		jobAd->SetDirtyFlag( "GMState", false );
++
++		if ( jobAd->EvalBool( "CrashGM", NULL, should_crash ) && should_crash ) {
++			EXCEPT( "Crashing gridmanager at the request of job %d.%d",
++					procID.cluster, procID.proc );
++		}
++
++		reevaluate_state = false;
++		old_gm_state = gmState;
++		
++		switch ( gmState ) 
++		{
++			case GM_INIT:
++				// This is the state all jobs start in when the EC2Job object
++				// is first created. Here, we do things that we didn't want to
++				// do in the constructor because they could block (the
++				// constructor is called while we're connected to the schedd).
++
++				// JEF: Save GMSession to the schedd if needed
++				jobAd->GetDirtyFlag( "GMSession", &attr_exists, &attr_dirty );
++				if ( attr_exists && attr_dirty ) {
++					requestScheddUpdate( this, true );
++					break;
++				}
++
++				if ( gahp->Startup() == false ) {
++					dprintf( D_ALWAYS, "(%d.%d) Error starting GAHP\n", procID.cluster, procID.proc );
++					jobAd->Assign( ATTR_HOLD_REASON, "Failed to start GAHP" );
++					gmState = GM_HOLD;
++					break;
++				}
++				
++				gmState = GM_START;
++				break;
++				
++			case GM_START:
++
++				errorString = "";
++				
++				if ( m_key_pair == "" ) {
++					gmState = GM_CLEAR_REQUEST;
++				} else if ( remoteJobId == NULL ) {
++					gmState = GM_CHECK_VM;
++				} else {
++					submitLogged = true;
++					if ( condorState == RUNNING || condorState == COMPLETED ) {
++						executeLogged = true;
++					}
++					gmState = GM_SUBMITTED;
++				}
++				
++				break;
++				
++			case GM_UNSUBMITTED:
++
++				if ( (condorState == REMOVED) || (condorState == HELD) ) {
++					gmState = GM_DELETE;
++				} else {
++					gmState = GM_SAVE_KEYPAIR_NAME;
++				}
++				
++				break;
++				
++			case GM_SAVE_KEYPAIR_NAME:
++				// Create a unique name for the ssh keypair for this job
++				// in EC2 and save it in GridJobId in the schedd. This
++				// will be our handle to the job until we get the instance
++				// id at the end of the submission process.
++
++				if ( (condorState == REMOVED) ||
++					 (condorState == HELD) ) {
++
++					gmState = GM_DELETE;
++				}
++
++				// Once RequestSubmit() is called at least once, you must
++				// CancelSubmit() once the submission process is complete
++				// or aborted.
++				if ( myResource->RequestSubmit( this ) == false ) {
++					break;
++				}
++
++				if ( m_key_pair == "" ) {
++					SetKeypairId( build_keypair().c_str() );
++				}
++				jobAd->GetDirtyFlag( ATTR_GRID_JOB_ID, &attr_exists, &attr_dirty );
++				if ( attr_exists && attr_dirty ) {
++						// The keypair name still needs to be saved to
++						//the schedd
++					requestScheddUpdate( this, true );
++					break;
++				}
++				gmState = GM_CREATE_KEYPAIR;
++				break;
++
++			case GM_START_VM:
++				
++				if ( numSubmitAttempts >= MAX_SUBMIT_ATTEMPTS ) {
++					gmState = GM_HOLD;
++					break;
++				}
++				
++							
++				// After a submit, wait at least submitInterval before trying another one.
++				if ( now >= lastSubmitAttempt + submitInterval ) {
++	
++					// Once RequestSubmit() is called at least once, you must
++					// CancelSubmit() once you're done with the request call
++					if ( myResource->RequestSubmit( this ) == false ) {
++						// If we haven't started the START_VM call yet,
++						// we can abort the submission here for held and
++						// removed jobs.
++						if ( (condorState == REMOVED) ||
++							 (condorState == HELD) ) {
++
++							myResource->CancelSubmit( this );
++							gmState = GM_DESTROY_KEYPAIR;
++						}
++						break;
++					}
++
++					// construct input parameters for ec2_vm_start()
++					char* instance_id = NULL;
++					
++					// For a given EC2 Job, in its life cycle, the attributes will not change 					
++					
++					
++					m_ami_id = build_ami_id();
++					if ( m_key_pair == "" ) {
++						m_key_pair = build_keypair();
++					}
++					if ( m_group_names == NULL )	m_group_names = build_groupnames();
++					
++					// ec2_vm_start() will check the input arguments
++					rc = gahp->ec2_vm_start( m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, 
++												m_ami_id.c_str(), m_key_pair.c_str(), 
++												m_user_data, m_user_data_file, m_instance_type, 
++												*m_group_names, instance_id, gahp_error_code);
++					
++					if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++						break;
++					}
++
++					lastSubmitAttempt = time(NULL);
++
++					if ( rc != 0 && strcmp( gahp_error_code, "NEED_CHECK_VM_START" ) == 0 ) {
++						// get an error code from gahp server said that we should check if 
++						// the VM has been started successfully in EC2
++						
++						// Maxmium retry times is 3, if exceeds this limitation, we fall through
++						if ( m_vm_check_times++ < maxRetryTimes ) {
++							gmState = GM_CHECK_VM;
++						}
++						break;
++					}
++
++					if ( rc == 0 ) {
++						
++						ASSERT( instance_id != NULL );
++						SetInstanceId( instance_id );
++						WriteGridSubmitEventToUserLog(jobAd);
++						free( instance_id );
++											
++						gmState = GM_SAVE_INSTANCE_ID;
++						
++					} else if ( strcmp( gahp_error_code, "InstanceLimitExceeded" ) == 0 ) {
++						// meet the resource limitation (maximum 20 instances)
++						// should retry this command later
++						myResource->CancelSubmit( this );
++						daemonCore->Reset_Timer( evaluateStateTid, submitInterval );
++					 } else {
++						errorString = gahp->getErrorString();
++						dprintf(D_ALWAYS,"(%d.%d) job submit failed: %s: %s\n",
++								procID.cluster, procID.proc, gahp_error_code,
++								errorString.c_str() );
++						gmState = GM_HOLD;
++					}
++					
++				} else {
++					if ( (condorState == REMOVED) || (condorState == HELD) ) {
++						gmState = GM_DESTROY_KEYPAIR;
++						break;
++					}
++
++					unsigned int delay = 0;
++					if ( (lastSubmitAttempt + submitInterval) > now ) {
++						delay = (lastSubmitAttempt + submitInterval) - now;
++					}				
++					daemonCore->Reset_Timer( evaluateStateTid, delay );
++				}
++
++				break;
++				
++			
++			case GM_CHECK_VM:
++				
++				{
++					
++				// check if the VM has been started successfully
++				StringList returnStatus;
++							
++				rc = gahp->ec2_vm_vm_keypair_all(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file,
++												    returnStatus, gahp_error_code);
++
++				if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++						break;
++				}
++
++				if (rc == 0) {
++
++					// now we should check, corresponding to a given SSH keypair, in EC2, is there
++					// existing any running VM instances? If these are some ones, we just return the
++					// first one we found.
++					bool is_running = false;
++					char* instance_id = NULL;
++					char* keypair_name = NULL;
++								
++					int size = returnStatus.number();
++					returnStatus.rewind();
++								
++					for (int i=0; i<size/2; i++) {
++									
++						instance_id = returnStatus.next();
++						keypair_name = returnStatus.next();
++
++						if (strcmp(m_key_pair.c_str(), keypair_name) == 0) {
++							is_running = true;
++							break;
++						}
++					}
++								
++					if ( is_running ) {
++
++						// there is a running VM instance corresponding to the given SSH keypair
++						gmState = GM_SAVE_INSTANCE_ID;
++						// save the instance ID which will be used when delete VM instance
++						SetInstanceId( instance_id );
++									
++					} else {
++						// we shoudl re-start the VM again with the corresponding SSH keypair
++						// TODO If we know we successfully created the
++						//   keypair during this instance, we can go
++						//   to GM_START_VM instead.
++						myResource->CancelSubmit( this );
++						gmState = GM_DESTROY_KEYPAIR_SUBMIT;
++					}
++				} else {
++					errorString = gahp->getErrorString();
++					dprintf(D_ALWAYS,"(%d.%d) VM check failed: %s: %s\n",
++							procID.cluster, procID.proc, gahp_error_code,
++							errorString.c_str() );
++					gmState = GM_HOLD;
++				}
++
++				}				
++				
++				break;			
++			
++			
++			case GM_SAVE_INSTANCE_ID:
++
++				jobAd->GetDirtyFlag( ATTR_GRID_JOB_ID, &attr_exists, &attr_dirty );
++				if ( attr_exists && attr_dirty ) {
++					// Wait for the instance id to be saved to the schedd
++					requestScheddUpdate( this, true );
++					break;
++				}					
++				gmState = GM_SUBMITTED;
++
++				break;
++				
++			
++			case GM_SUBMITTED:
++
++				if ( remoteJobState == EC2_VM_STATE_TERMINATED ) {
++					gmState = GM_DONE_SAVE;
++				} 
++
++				if ( condorState == REMOVED || condorState == HELD ) {
++					gmState = GM_CANCEL;
++				} 
++				else {
++					if ( lastProbeTime < enteredCurrentGmState ) {
++						lastProbeTime = enteredCurrentGmState;
++					}
++					
++					// if current state isn't "running", we should check its state
++					// every "funcRetryInterval" seconds. Otherwise the interval should
++					// be "probeInterval" seconds.  
++					int interval = probeInterval;
++					if ( remoteJobState != EC2_VM_STATE_RUNNING ) {
++						interval = funcRetryInterval;
++					}
++					
++					if ( now >= lastProbeTime + interval ) {
++						gmState = GM_PROBE_JOB;
++						break;
++					}
++					
++					unsigned int delay = 0;
++					if ( (lastProbeTime + interval) > now ) {
++						delay = (lastProbeTime + interval) - now;
++					}
++					daemonCore->Reset_Timer( evaluateStateTid, delay );
++				}			
++
++				break;
++				
++				
++			case GM_DONE_SAVE:
++
++				if ( condorState != HELD && condorState != REMOVED ) {
++					JobTerminated();
++					if ( condorState == COMPLETED ) {
++						jobAd->GetDirtyFlag( ATTR_JOB_STATUS, &attr_exists, &attr_dirty );
++						if ( attr_exists && attr_dirty ) {
++							requestScheddUpdate( this, true );
++							break;
++						}
++					}
++				}
++				
++				myResource->CancelSubmit( this );
++				if ( condorState == COMPLETED || condorState == REMOVED ) {
++					gmState = GM_DESTROY_KEYPAIR;
++				} else {
++					// Clear the contact string here because it may not get
++					// cleared in GM_CLEAR_REQUEST (it might go to GM_HOLD first).
++					if ( remoteJobId != NULL ) {
++						SetInstanceId( NULL );
++						SetKeypairId( NULL );
++					}
++					gmState = GM_CLEAR_REQUEST;
++				}
++			
++				break;
++						
++				
++			case GM_CLEAR_REQUEST:
++
++				// Remove all knowledge of any previous or present job
++				// submission, in both the gridmanager and the schedd.
++
++				// If we are doing a rematch, we are simply waiting around
++				// for the schedd to be updated and subsequently this globus job
++				// object to be destroyed.  So there is nothing to do.
++				if ( wantRematch ) {
++					break;
++				}
++
++				// For now, put problem jobs on hold instead of
++				// forgetting about current submission and trying again.
++				// TODO: Let our action here be dictated by the user preference
++				// expressed in the job ad.
++				if ( remoteJobId != NULL && condorState != REMOVED 
++					 && wantResubmit == 0 && doResubmit == 0 ) {
++					gmState = GM_HOLD;
++					break;
++				}
++
++				// Only allow a rematch *if* we are also going to perform a resubmit
++				if ( wantResubmit || doResubmit ) {
++					jobAd->EvalBool(ATTR_REMATCH_CHECK,NULL,wantRematch);
++				}
++
++				if ( wantResubmit ) {
++					wantResubmit = 0;
++					dprintf(D_ALWAYS, "(%d.%d) Resubmitting to Globus because %s==TRUE\n",
++						procID.cluster, procID.proc, ATTR_GLOBUS_RESUBMIT_CHECK );
++				}
++
++				if ( doResubmit ) {
++					doResubmit = 0;
++					dprintf(D_ALWAYS, "(%d.%d) Resubmitting to Globus (last submit failed)\n",
++						procID.cluster, procID.proc );
++				}
++
++				errorString = "";
++				myResource->CancelSubmit( this );
++				if ( remoteJobId != NULL ) {
++					SetInstanceId( NULL );
++					SetKeypairId( NULL );
++				}
++
++				JobIdle();
++
++				if ( submitLogged ) {
++					JobEvicted();
++					if ( !evictLogged ) {
++						WriteEvictEventToUserLog( jobAd );
++						evictLogged = true;
++					}
++				}
++
++				if ( wantRematch ) {
++					dprintf(D_ALWAYS, "(%d.%d) Requesting schedd to rematch job because %s==TRUE\n",
++						procID.cluster, procID.proc, ATTR_REMATCH_CHECK );
++
++					// Set ad attributes so the schedd finds a new match.
++					int dummy;
++					if ( jobAd->LookupBool( ATTR_JOB_MATCHED, dummy ) != 0 ) {
++						jobAd->Assign( ATTR_JOB_MATCHED, false );
++						jobAd->Assign( ATTR_CURRENT_HOSTS, 0 );
++					}
++
++					// If we are rematching, we need to forget about this job
++					// cuz we wanna pull a fresh new job ad, with a fresh new match,
++					// from the all-singing schedd.
++					gmState = GM_DELETE;
++					break;
++				}
++
++				// If there are no updates to be done when we first enter this
++				// state, requestScheddUpdate will return done immediately
++				// and not waste time with a needless connection to the
++				// schedd. If updates need to be made, they won't show up in
++				// schedd_actions after the first pass through this state
++				// because we modified our local variables the first time
++				// through. However, since we registered update events the
++				// first time, requestScheddUpdate won't return done until
++				// they've been committed to the schedd.
++				const char *name;
++				ExprTree *expr;
++				jobAd->ResetExpr();
++				if ( jobAd->NextDirtyExpr(name, expr) ) {
++					requestScheddUpdate( this, true );
++					break;
++				}
++
++				if ( remoteJobState != "" ) {
++					remoteJobState = "";
++					SetRemoteJobStatus( NULL );
++				}
++
++				submitLogged = false;
++				executeLogged = false;
++				submitFailedLogged = false;
++				terminateLogged = false;
++				abortLogged = false;
++				evictLogged = false;
++				gmState = GM_UNSUBMITTED;
++
++				break;				
++				
++			case GM_PROBE_JOB:
++
++				if ( condorState == REMOVED || condorState == HELD ) {
++					gmState = GM_CANCEL;
++				} else {
++					std::string new_status;
++					std::string public_dns;
++					StringList returnStatus;
++
++					// need to call ec2_vm_status(), ec2_vm_status() will check input arguments
++					// The VM status we need is saved in the second string of the returned status StringList
++					rc = gahp->ec2_vm_status(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, remoteJobId, returnStatus, gahp_error_code );
++					
++					if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++						break;
++					}
++					
++					// processing error code received
++					if ( rc != 0 ) {
++						// What to do about failure?
++						errorString = gahp->getErrorString();
++						dprintf( D_ALWAYS, "(%d.%d) job probe failed: %s: %s\n",
++								 procID.cluster, procID.proc, gahp_error_code,
++								 errorString.c_str() );
++						gmState = GM_HOLD;
++						break;
++					} else {
++						if ( returnStatus.number() == 0 ) {
++							// The instance has been purged, act like we
++							// got back 'terminated'
++							returnStatus.append( remoteJobId );
++							returnStatus.append( EC2_VM_STATE_TERMINATED );
++						}
++
++						// VM Status is the second value in the return string list
++						returnStatus.rewind();
++						if ( returnStatus.number() >= 2 ) {
++							// jump to the value I need
++							returnStatus.next();
++							new_status = returnStatus.next();
++						}
++
++						// if ec2 VM's state is "running" or beyond,
++						// change condor job status to Running.
++						if ( new_status != remoteJobState &&
++							 ( new_status == EC2_VM_STATE_RUNNING ||
++							   new_status == EC2_VM_STATE_SHUTTINGDOWN ||
++							   new_status == EC2_VM_STATE_TERMINATED ) ) {
++							JobRunning();
++                            
++                            // if we have an elastic ip now we associate with a live running instance
++                            if ( new_status == EC2_VM_STATE_RUNNING && strlen(m_elastic_ip) )
++                            {
++                                StringList returnStatus; 
++                                rc = gahp->ec2_associate_address(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, remoteJobId, m_elastic_ip, returnStatus, gahp_error_code );
++
++                                switch (rc)
++                                {
++                                    case 0:
++                                        break;
++                                    case GAHPCLIENT_COMMAND_PENDING:
++                                        break;
++                                    case GAHPCLIENT_COMMAND_NOT_SUBMITTED:
++                                        if ( (condorState == REMOVED) || (condorState == HELD) ) 
++                                            gmState = GM_DELETE;
++                                        break;
++                                    default:
++                                        dprintf(D_ALWAYS, "Failed Association returned %s\n", gahp_error_code);
++                                        break;
++                                }
++                            }
++
++						}
++												
++						remoteJobState = new_status;
++						SetRemoteJobStatus( new_status.c_str() );
++										
++						
++						returnStatus.rewind();
++						int size = returnStatus.number();
++						// only when status changed to running, can we have the public dns name
++						// at this situation, the number of return value is larger than 4
++						if (size >=4 ) {
++							for (int i=0; i<3; i++) {
++								returnStatus.next();							
++							}
++							public_dns = returnStatus.next();
++							SetRemoteVMName( public_dns.c_str() );
++						}
++					}
++
++					lastProbeTime = now;
++					gmState = GM_SUBMITTED;
++				}
++
++				break;				
++				
++			case GM_CANCEL:
++
++				// need to call ec2_vm_stop(), it will only return STOP operation is success or failed
++				// ec2_vm_stop() will check the input arguments
++				rc = gahp->ec2_vm_stop(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, remoteJobId, gahp_error_code);
++			
++				if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++					break;
++				} 
++				
++				if ( rc == 0 ) {
++					gmState = GM_DESTROY_KEYPAIR;
++				} else {
++					// What to do about a failed cancel?
++					errorString = gahp->getErrorString();
++					dprintf( D_ALWAYS, "(%d.%d) job cancel failed: %s: %s\n",
++							 procID.cluster, procID.proc, gahp_error_code,
++							 errorString.c_str() );
++					gmState = GM_HOLD;
++				}
++				
++				break;
++				
++
++			case GM_CREATE_KEYPAIR:
++				{
++				// Once RequestSubmit() is called at least once, you must
++				// CancelSubmit() once the submission process is complete
++				// or aborted.
++				if ( myResource->RequestSubmit( this ) == false ) {
++					// If we haven't started the CREATE_KEYPAIR call yet,
++					// we can abort the submission here for held and
++					// removed jobs.
++					if ( (condorState == REMOVED) ||
++						 (condorState == HELD) ) {
++
++						gmState = GM_DELETE;
++					}
++					break;
++				}
++
++				// now create and register this keypair by using ec2_vm_create_keypair()
++				rc = gahp->ec2_vm_create_keypair(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, 
++													m_key_pair.c_str(), m_key_pair_file.c_str(), gahp_error_code);
++
++				if ( rc == GAHPCLIENT_COMMAND_PENDING ) {
++					break;
++				} else if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED ) {
++					if ( (condorState == REMOVED) ||
++						 (condorState == HELD) ) {
++						gmState = GM_DELETE;
++					}
++					break;
++				}
++
++				if (rc == 0) {
++					if ( (condorState == REMOVED) ||
++						 (condorState == HELD) ) {
++
++						gmState = GM_DESTROY_KEYPAIR;
++					} else {
++						gmState = GM_START_VM;
++					}
++				} else {
++					if ( strcmp(gahp_error_code, "NEED_CHECK_SSHKEY" ) == 0 ) {
++						
++						// get an error code from gahp server said that we should check if 
++						// the SSH keypair has been registered successfully in EC2
++
++						// Maxmium retry times is 3, if exceeds this limitation, we will go to HOLD state
++						if ( m_keypair_check_times++ < maxRetryTimes ) {
++							gmState = GM_DESTROY_KEYPAIR_SUBMIT;
++							break;
++						}
++					}
++
++					errorString = gahp->getErrorString();
++					dprintf(D_ALWAYS,"(%d.%d) job create keypair failed: %s: %s\n",
++							procID.cluster, procID.proc, gahp_error_code,
++							errorString.c_str() );
++					gmState = GM_HOLD;
++					break;
++				}
++								
++				}				
++				
++				break;
++
++
++			case GM_DESTROY_KEYPAIR_SUBMIT:
++				{
++				// Something went wrong during the submit process and
++				// we need to destroy the keypair
++				rc = gahp->ec2_vm_destroy_keypair(m_serviceUrl.c_str(), m_public_key_file, m_private_key_file, m_key_pair.c_str(), gahp_error_code);
++
++				if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++					break;
++				}
++
++				if (rc == 0) {
++					// remove temporary keypair local output file
++					if ( !remove_keypair_file(m_key_pair_file.c_str()) ) {
++						dprintf(D_ALWAYS,"(%d.%d) job destroy temporary keypair local file failed.\n", procID.cluster, procID.proc);
++					}
++					if ( condorState == REMOVED || condorState == HELD ) {
++						SetInstanceId( NULL );
++						SetKeypairId( NULL );
++						gmState = GM_DELETE;
++					} else {
++						gmState = GM_CREATE_KEYPAIR;
++					}
++					
++				} else {
++					errorString = gahp->getErrorString();
++					dprintf( D_ALWAYS,"(%d.%d) job destroy keypair failed: %s: %s\n",
++							 procID.cluster, procID.proc, gahp_error_code,
++							 errorString.c_str() );
++					gmState = GM_HOLD;
++				}
++									
++				}
++
++				break; 	
++				
++
++			case GM_DESTROY_KEYPAIR:
++				{
++				// Yes, now let's destroy the temporary keypair 
++				rc = gahp->ec2_vm_destroy_keypair(m_serviceUrl.c_str(),m_public_key_file, m_private_key_file, m_key_pair.c_str(), gahp_error_code);
++
++				if ( rc == GAHPCLIENT_COMMAND_NOT_SUBMITTED || rc == GAHPCLIENT_COMMAND_PENDING ) {
++					break;
++				}
++
++				if (rc == 0) {
++					// remove temporary keypair local output file
++					if ( remove_keypair_file(m_key_pair_file.c_str()) ) {
++						gmState = GM_FAILED;
++					} else {
++						dprintf(D_ALWAYS,"(%d.%d) job destroy keypair local file failed.\n", procID.cluster, procID.proc);
++						gmState = GM_FAILED;
++					}
++					
++				} else {
++					errorString = gahp->getErrorString();
++					dprintf( D_ALWAYS,"(%d.%d) job destroy keypair failed: %s: %s\n",
++							 procID.cluster, procID.proc, gahp_error_code,
++							 errorString.c_str() );
++					gmState = GM_HOLD;
++				}
++									
++				}
++
++				break; 	
++				
++
++			case GM_HOLD:
++				// Put the job on hold in the schedd.
++				// If the condor state is already HELD, then someone already
++				// HELD it, so don't update anything else.
++				if ( condorState != HELD ) {
++
++					// Set the hold reason as best we can
++					// TODO: set the hold reason in a more robust way.
++					char holdReason[1024];
++					holdReason[0] = '\0';
++					holdReason[sizeof(holdReason)-1] = '\0';
++					jobAd->LookupString( ATTR_HOLD_REASON, holdReason, sizeof(holdReason) - 1 );
++					if ( holdReason[0] == '\0' && errorString != "" ) {
++						strncpy( holdReason, errorString.c_str(), sizeof(holdReason) - 1 );
++					} else if ( holdReason[0] == '\0' ) {
++						strncpy( holdReason, "Unspecified gridmanager error", sizeof(holdReason) - 1 );
++					}
++
++					JobHeld( holdReason );
++				}
++			
++				gmState = GM_DELETE;
++				
++				break;
++				
++				
++			case GM_FAILED:
++
++				myResource->CancelSubmit( this );
++				SetInstanceId( NULL );
++				SetKeypairId( NULL );
++
++				if ( (condorState == REMOVED) || (condorState == COMPLETED) ) {
++					gmState = GM_DELETE;
++				} else {
++					gmState = GM_CLEAR_REQUEST;
++				}
++
++				break;
++				
++				
++			case GM_DELETE:
++				
++				// We are done with the job. Propagate any remaining updates
++				// to the schedd, then delete this object.
++				DoneWithJob();
++				// This object will be deleted when the update occurs
++				break;							
++				
++			
++			default:
++				EXCEPT( "(%d.%d) Unknown gmState %d!", procID.cluster, procID.proc, gmState );
++				break;
++		} // end of switch_case
++		
++			// This string is used for gahp calls, but is never needed beyond
++			// this point. This should really be a MyString.
++		free( gahp_error_code );
++		gahp_error_code = NULL;
++
++		if ( gmState != old_gm_state ) {
++			reevaluate_state = true;
++			dprintf(D_FULLDEBUG, "(%d.%d) gm state change: %s -> %s\n",
++					procID.cluster, procID.proc, GMStateNames[old_gm_state], GMStateNames[gmState]);
++			enteredCurrentGmState = time(NULL);
++		}
++		
++	} // end of do_while
++	while ( reevaluate_state );	
++}
++
++
++BaseResource* EC2Job::GetResource()
++{
++	return (BaseResource *)myResource;
++}
++
++
++// steup the public name of ec2 remote VM, which can be used the clients 
++void EC2Job::SetRemoteVMName(const char * name)
++{
++	if ( name ) {
++		jobAd->Assign( ATTR_EC2_REMOTE_VM_NAME, name );
++	} else {
++		jobAd->AssignExpr( ATTR_EC2_REMOTE_VM_NAME, "Undefined" );
++	}
++	
++	requestScheddUpdate( this, false );
++}
++
++
++void EC2Job::SetKeypairId( const char *keypair_id )
++{
++	if ( keypair_id == NULL ) {
++		m_key_pair = "";
++	} else {
++		m_key_pair = keypair_id;
++	}
++	SetRemoteJobId( m_key_pair.c_str(), remoteJobId );
++}
++
++void EC2Job::SetInstanceId( const char *instance_id )
++{
++	free( remoteJobId );
++	if ( instance_id ) {
++		remoteJobId = strdup( instance_id );
++        jobAd->Assign( ATTR_EC2_INSTANCE_NAME, remoteJobId );
++	} else {
++		remoteJobId = NULL;
++	}
++	SetRemoteJobId( m_key_pair.c_str(), remoteJobId );
++}
++
++// SetRemoteJobId() is used to set the value of global variable "remoteJobID"
++void EC2Job::SetRemoteJobId( const char *keypair_id, const char *instance_id )
++{
++	std::string full_job_id;
++	if ( keypair_id && keypair_id[0] ) {
++		sprintf( full_job_id, "ec2 %s %s", m_serviceUrl.c_str(), keypair_id );
++		if ( instance_id && instance_id[0] ) {
++			sprintf_cat( full_job_id, " %s", instance_id );
++		}
++	}
++	BaseJob::SetRemoteJobId( full_job_id.c_str() );
++}
++
++
++// private functions to construct ami_id, keypair, keypair output file and groups info from ClassAd
++
++// if ami_id is empty, client must have assigned upload file name value
++// otherwise the condor_submit will report an error.
++std::string EC2Job::build_ami_id()
++{
++	std::string ami_id;
++	char* buffer = NULL;
++	
++	if ( jobAd->LookupString( ATTR_EC2_AMI_ID, &buffer ) ) {
++		ami_id = buffer;
++		free (buffer);
++	}
++	return ami_id;
++}
++
++
++std::string EC2Job::build_keypair()
++{
++	// Build a name for the ssh keypair that will be unique to this job.
++	// Our pattern is SSH_<collector name>_<GlobalJobId>
++
++	// get condor pool name
++	// In case there are multiple collectors, strip out the spaces
++	// If there's no collector, insert a dummy name
++	char* pool_name = param( "COLLECTOR_HOST" );
++	if ( pool_name ) {
++		StringList collectors( pool_name );
++		free( pool_name );
++		pool_name = collectors.print_to_string();
++	} else {
++		pool_name = strdup( "NoPool" );
++	}
++
++	// use "ATTR_GLOBAL_JOB_ID" to get unique global job id
++	std::string job_id;
++	jobAd->LookupString( ATTR_GLOBAL_JOB_ID, job_id );
++
++	std::string key_pair;
++	sprintf( key_pair, "SSH_%s_%s", pool_name, job_id.c_str() );
++
++	free( pool_name );
++	return key_pair;
++}
++
++StringList* EC2Job::build_groupnames()
++{
++	StringList* group_names = NULL;
++	char* buffer = NULL;
++	
++	// Notice:
++	// Based on the meeting in 04/01/2008, now we will not create any temporary security groups
++	// 1. clients assign ATTR_EC2_SECURITY_GROUPS in condor_submit file, then we will use those 
++	//    security group names.
++	// 2. clients don't assign ATTR_EC2_SECURITY_GROUPS in condor_submit file, then we will use
++	//    the default security group (by just keeping group_names is empty).
++	
++	if ( jobAd->LookupString( ATTR_EC2_SECURITY_GROUPS, &buffer ) ) {
++		group_names = new StringList( buffer, " " );
++	} else {
++		group_names = new StringList();
++	}
++	
++	free (buffer);
++	
++	return group_names;
++}
++
++
++// After keypair is destroyed, we need to call this function. In temporary keypair
++// scenario, we should delete the temporarily created keypair output file.
++bool EC2Job::remove_keypair_file(const char* filename)
++{
++	if (filename == NULL) {
++		// not create temporary keypair output file
++		// return success directly.
++		return true;
++	} else {
++		// check if the file name is what we should create
++		if ( strcmp(filename, NULL_FILE) == 0 ) {
++			// no need to delete it since it is /dev/null
++			return true;
++		} else {
++			if (remove(filename) == 0) 	
++				return true;
++			else 
++				return false;
++		}
++	}
++}
++
++
++// print out the error code received from grid_manager
++void EC2Job::print_error_code( const char* error_code,
++								  const char* function_name )
++{
++	dprintf( D_ALWAYS, "Receiving error code = %s from function %s !", error_code, function_name );	
++}
+diff --git a/src/condor_gridmanager/ec2job.h b/src/condor_gridmanager/ec2job.h
+new file mode 100644
+index 0000000..02ed445
+--- /dev/null
++++ b/src/condor_gridmanager/ec2job.h
+@@ -0,0 +1,112 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++  
++#ifndef EC2JOB_H
++#define EC2JOB_H
++
++#include "condor_common.h"
++#include "condor_classad.h"
++#include "classad_hashtable.h"
++
++#include "basejob.h"
++#include "ec2resource.h"
++#include "proxymanager.h"
++#include "gahp-client.h"
++#include "vm_univ_utils.h"
++
++void EC2JobInit();
++void EC2JobReconfig();
++BaseJob *EC2JobCreate( ClassAd *jobad );
++bool EC2JobAdMatch( const ClassAd *job_ad );
++
++class EC2Resource;
++
++class EC2Job : public BaseJob
++{
++public:
++
++	EC2Job( ClassAd *classad );
++	~EC2Job();
++
++	void Reconfig();
++	void doEvaluateState();
++	BaseResource *GetResource();
++	void SetKeypairId( const char *keypair_id );
++	void SetInstanceId( const char *instance_id );
++	void SetRemoteJobId( const char *keypair_id, const char *instance_id );
++	void SetRemoteVMName(const char * name);
++	
++	static int probeInterval;
++	static int submitInterval;
++	static int gahpCallTimeout;
++	static int maxConnectFailures;
++	static int funcRetryInterval;
++	static int pendingWaitTime;
++	static int maxRetryTimes;
++	
++	static void setProbeInterval( int new_interval ) 	{ probeInterval = new_interval; }
++	static void setSubmitInterval( int new_interval )	{ submitInterval = new_interval; }
++	static void setGahpCallTimeout( int new_timeout )	{ gahpCallTimeout = new_timeout; }
++	static void setConnectFailureRetry( int count )		{ maxConnectFailures = count; }
++
++	int gmState;
++	time_t lastProbeTime;
++	time_t enteredCurrentGmState;
++	time_t lastSubmitAttempt;
++	int numSubmitAttempts;
++
++	std::string errorString;
++	char *remoteJobId;
++	std::string remoteJobState;
++
++	EC2Resource *myResource;
++	GahpClient *gahp;
++
++private:
++	// create dynamic input parameters
++	std::string build_ami_id();
++	std::string build_keypair();
++	StringList* build_groupnames();
++
++	std::string m_serviceUrl;
++	
++	char * m_public_key_file;
++	char * m_private_key_file;
++	char * m_user_data;
++	char * m_user_data_file;
++	char * m_instance_type;
++    char * m_elastic_ip;
++	
++	int m_vm_check_times;
++	int m_keypair_check_times;
++	
++	std::string m_ami_id;
++	std::string m_key_pair;
++	std::string m_key_pair_file;
++	StringList* m_group_names;
++	
++	// remove created temporary keypair file
++	bool remove_keypair_file(const char* filename);
++
++	// print out error codes returned from grid_manager
++	void print_error_code( const char* error_code, const char* function_name );
++};
++
++#endif
+diff --git a/src/condor_gridmanager/ec2resource.cpp b/src/condor_gridmanager/ec2resource.cpp
+new file mode 100644
+index 0000000..abc7c16
+--- /dev/null
++++ b/src/condor_gridmanager/ec2resource.cpp
+@@ -0,0 +1,151 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++  
++#include "condor_common.h"
++#include "condor_config.h"
++#include "string_list.h"
++
++#include "ec2resource.h"
++#include "gridmanager.h"
++
++#define HASH_TABLE_SIZE	500
++
++HashTable <HashKey, EC2Resource *> 
++	EC2Resource::ResourcesByName( HASH_TABLE_SIZE, hashFunction );
++
++const char * EC2Resource::HashName( const char * resource_name,
++		const char * public_key_file, const char * private_key_file )
++{								 
++	static std::string hash_name;
++	sprintf( hash_name, "ec2 %s#%s#%s", resource_name, public_key_file, private_key_file );
++	return hash_name.c_str();
++}
++
++
++EC2Resource* EC2Resource::FindOrCreateResource(const char * resource_name, 
++	const char * public_key_file, const char * private_key_file )
++{
++	int rc;
++	EC2Resource *resource = NULL;
++
++	rc = ResourcesByName.lookup( HashKey( HashName( resource_name, public_key_file, private_key_file ) ), resource );
++	if ( rc != 0 ) {
++		resource = new EC2Resource( resource_name, public_key_file, private_key_file );
++		ASSERT(resource);
++		resource->Reconfig();
++		ResourcesByName.insert( HashKey( HashName( resource_name, public_key_file, private_key_file ) ), resource );
++	} else {
++		ASSERT(resource);
++	}
++
++	return resource;
++}
++
++
++EC2Resource::EC2Resource( const char *resource_name, 
++	const char * public_key_file, const char * private_key_file )
++	: BaseResource( resource_name )
++{
++	// although no one will use resource_name, we still keep it for base class constructor
++	
++	m_public_key_file = strdup(public_key_file);
++	m_private_key_file = strdup(private_key_file);
++	
++	gahp = NULL;
++
++	char * gahp_path = param( "EC2_GAHP" );
++	if ( gahp_path == NULL ) {
++		dprintf(D_ALWAYS, "EC2_GAHP not defined! \n");
++		return;
++	}
++	
++	ArgList args;
++	args.AppendArg("-f");
++
++	gahp = new GahpClient( EC2_RESOURCE_NAME, gahp_path, &args );
++	free(gahp_path);
++	gahp->setNotificationTimerId( pingTimerId );
++	gahp->setMode( GahpClient::normal );
++	gahp->setTimeout( EC2Job::gahpCallTimeout );
++}
++
++
++EC2Resource::~EC2Resource()
++{
++	ResourcesByName.remove( HashKey( HashName( resourceName, m_public_key_file,
++											   m_private_key_file ) ) );
++	if ( gahp ) delete gahp;
++	if (m_public_key_file) free(m_public_key_file);
++	if (m_private_key_file) free(m_private_key_file);
++}
++
++
++void EC2Resource::Reconfig()
++{
++	BaseResource::Reconfig();
++	gahp->setTimeout( EC2Job::gahpCallTimeout );
++}
++
++const char *EC2Resource::ResourceType()
++{
++	return "ec2";
++}
++
++const char *EC2Resource::GetHashName()
++{
++	return HashName( resourceName, m_public_key_file, m_private_key_file );
++}
++
++void EC2Resource::PublishResourceAd( ClassAd *resource_ad )
++{
++	BaseResource::PublishResourceAd( resource_ad );
++
++	resource_ad->Assign( ATTR_EC2_ACCESS_KEY_ID, m_public_key_file );
++	resource_ad->Assign( ATTR_EC2_SECRET_ACCESS_KEY, m_private_key_file );
++}
++
++// we will use ec2 command "status_all" to do the Ping work
++void EC2Resource::DoPing( time_t& ping_delay, bool& ping_complete, bool& ping_succeeded )
++{
++	// Since EC2 doesn't use proxy, we should use Startup() to replace isInitialized()
++	if ( gahp->isStarted() == false ) {
++		dprintf( D_ALWAYS,"gahp server not up yet, delaying ping\n" );
++		ping_delay = 5;
++		return;
++	}
++	
++	ping_delay = 0;
++	
++	int rc = gahp->ec2_ping( resourceName, m_public_key_file, m_private_key_file );
++
++	if ( rc == GAHPCLIENT_COMMAND_PENDING ) {
++		ping_complete = false;
++	} 
++	else if ( rc != 0 ) {
++		ping_complete = true;
++		ping_succeeded = false;
++	} 
++	else {
++		ping_complete = true;
++		ping_succeeded = true;
++	}
++
++	return;
++}
+diff --git a/src/condor_gridmanager/ec2resource.h b/src/condor_gridmanager/ec2resource.h
+new file mode 100644
+index 0000000..a471212
+--- /dev/null
++++ b/src/condor_gridmanager/ec2resource.h
+@@ -0,0 +1,74 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++  
++#ifndef EC2RESOURCE_H
++#define EC2RESOURCE_H
++    
++#include "condor_common.h"
++#include "../condor_daemon_core.V6/condor_daemon_core.h"
++
++#include "ec2job.h"
++#include "baseresource.h"
++#include "gahp-client.h"
++
++#define EC2_RESOURCE_NAME "ec2"
++  
++class EC2Job;
++class EC2Resource;
++
++class EC2Resource : public BaseResource
++{
++public:
++	void Reconfig();
++	
++	static const char *HashName( const char * resource_name, 
++								 const char * public_key_file, 
++								 const char * private_key_file );
++	
++	static EC2Resource* FindOrCreateResource( const char * resource_name, 
++											  const char * public_key_file, 
++											  const char * private_key_file );
++
++	GahpClient *gahp;
++
++	EC2Resource(const char * resource_name, 
++				const char * public_key_file, 
++				const char * private_key_file );
++	
++	~EC2Resource();	
++
++	static HashTable <HashKey, EC2Resource *> ResourcesByName;
++
++	const char *ResourceType();
++
++	const char *GetHashName();
++
++	void PublishResourceAd( ClassAd *resource_ad );
++
++private:
++	void DoPing(time_t & ping_delay, 
++				bool & ping_complete, 
++				bool & ping_succeeded  );
++	
++	char* m_public_key_file;
++	char* m_private_key_file;	
++};    
++  
++#endif
+diff --git a/src/condor_gridmanager/gahp-client.cpp b/src/condor_gridmanager/gahp-client.cpp
+index 202865d..8463c4c 100644
+--- a/src/condor_gridmanager/gahp-client.cpp
++++ b/src/condor_gridmanager/gahp-client.cpp
+@@ -6550,91 +6550,6 @@ int GahpClient::amazon_vm_stop( const char *service_url, const char * publickeyf
+ 	return GAHPCLIENT_COMMAND_PENDING;	
+ }							
+ 
+-#if 0
+-// Restart VM
+-int GahpClient::amazon_vm_reboot( const char * publickeyfile, const char * privatekeyfile, 
+-								  const char * instance_id, char* & error_code )		
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_REBOOT <req_id> <publickeyfile> <privatekeyfile> <instance-id>
+-	static const char* command = "AMAZON_VM_REBOOT";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (instance_id == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// Generate request line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(instance_id) );
+-	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// we expect the following return:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1 
+-	
+-	if ( result ) {
+-		// command completed. 
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) error_string = "";
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];				
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}	
+-#endif
+-
+ 
+ // Check VM status
+ int GahpClient::amazon_vm_status( const char *service_url, const char * publickeyfile, const char * privatekeyfile,
+@@ -6768,38 +6683,24 @@ int GahpClient::amazon_vm_status( const char *service_url, const char * publicke
+ }
+ 
+ 
+-#if 0
+-// List the status of all VMs
+-int GahpClient::amazon_vm_status_all( const char * publickeyfile, const char * privatekeyfile, 
+-									  StringList &returnStatus, char* & error_code )		
++// Ping to check if the server is alive
++int GahpClient::amazon_ping(const char *service_url, const char * publickeyfile, const char * privatekeyfile)
+ {
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_STATUS_ALL <req_id> <publickeyfile> <privatekeyfile>
++	// we can use "Status All" command to make sure Amazon Server is alive.
+ 	static const char* command = "AMAZON_VM_STATUS_ALL";
+ 	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+ 	// Generate request line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+ 	
+-	int x = sprintf(reqline, "%s %s", esc1, esc2 );
++	std::string reqline;
++	sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
++	const char *buf = reqline.c_str();
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
++	free( esc3 );
+ 		
+ 	// Check if this request is currently pending. If not, make it the pending request.
+ 	if ( !is_pending(command,buf) ) {
+@@ -6815,71 +6716,31 @@ int GahpClient::amazon_vm_status_all( const char * publickeyfile, const char * p
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+ 	
+-	// we expect the following return:
+-	//		seq_id 0 <instance_id> <status> <ami_id> <instance_id> <status> <ami_id> ... 
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-	// We use NULL to replace the empty items.
+-
+ 	if ( result ) {
+-		// command completed and the return value looks like:
+-		int rc = 0;
+-		
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 0) {
+-				EXCEPT("Bad %s Result",command);
+-				rc = 1;
+-			} else {
+-				error_string = "";
+-			}
+-		}
+-		else if (result->argc == 4) {
+-			rc = atoi( result->argv[1] );
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		}
+-		else if ( ((result->argc - 2)%3) != 0 ) {
+-			EXCEPT("Bad %s Result",command);
+-		}
+-		else {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				EXCEPT("Bad %s Result",command);
+-			}
+-			else {
+-				// get the status info
+-				for (int i=2; i<result->argc; i++) {
+-					returnStatus.append( strdup(result->argv[i]) );
+-				}
+-				returnStatus.rewind();
+-			}
+-		}
+-		
++		int rc = atoi(result->argv[1]);
+ 		delete result;
+ 		return rc;
+ 	}
+-
++	
+ 	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
++	if ( check_pending_timeout(command,buf) ) {
+ 		// pending command timed out.
+ 		sprintf( error_string, "%s timed out", command );
+ 		return GAHPCLIENT_COMMAND_TIMED_OUT;
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}		
++	return GAHPCLIENT_COMMAND_PENDING;
++}
+ 
+ 
+-// Create group
+-int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char * privatekeyfile,
+-									    const char * groupname, const char * group_description, char* & error_code )	
++// Create and register SSH keypair
++int GahpClient::amazon_vm_create_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile,
++								   	      const char * keyname, const char * outputfile, char* & error_code)
+ {
+ 	// command line looks like:
+-	// AMAZON_COMMAND_VM_CREATE_GROUP <req_id> <publickeyfile> <privatekeyfile> <groupname> <group description>
+-	static const char* command = "AMAZON_VM_CREATE_GROUP";
++	// AMAZON_COMMAND_VM_CREATE_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> <outputfile> 
++	static const char* command = "AMAZON_VM_CREATE_KEYPAIR";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -6887,28 +6748,31 @@ int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char *
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-		 (groupname == NULL) || (group_description == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) || (outputfile == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
+-	// Generate request line
++	// construct command line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(groupname) );
+-	char* esc4 = strdup( escapeGahpString(group_description) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(keyname) );
++	char* esc5 = strdup( escapeGahpString(outputfile) );
+ 	
+-	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4 );
++	int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5);
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+ 	free( esc4 );
++	free( esc5 );
++
+ 	ASSERT( x > 0 );
+ 	
+ 	const char *buf = reqline.c_str();
++		
+ 	// Check if this request is currently pending. If not, make it the pending request.
+ 	if ( !is_pending(command,buf) ) {
+ 		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+@@ -6922,12 +6786,12 @@ int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char *
+ 
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+-
+-	// we expect the following return:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1 
+ 	
++	// The result should look like:
++	//		seq_id 0
++	//		seq_id 1
++	//		seq_id error_code error_string
++		
+ 	if ( result ) {
+ 		// command completed
+ 		int rc = 0;
+@@ -6938,6 +6802,7 @@ int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char *
+ 			}
+ 		} 
+ 		else if ( result->argc == 4 ) {
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+ 			error_string = result->argv[3];
+ 		} else {
+@@ -6947,7 +6812,7 @@ int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char *
+ 		delete result;
+ 		return rc;
+ 	}
+-
++	
+ 	// Now check if pending command timed out.
+ 	if ( check_pending_timeout(command, buf) ) 
+ 	{
+@@ -6957,40 +6822,46 @@ int GahpClient::amazon_vm_create_group( const char * publickeyfile, const char *
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}		
++	return GAHPCLIENT_COMMAND_PENDING;	
++}	
++
+ 
+ 
+-// Delete given group
+-int GahpClient::amazon_vm_delete_group( const char * publickeyfile, const char * privatekeyfile, 
+-										const char * groupname, char* & error_code )		
++// The destroy keypair function will delete the name of keypair, it will not touch the output file of 
++// keypair. So in Amazon Job, we should delete keypair output file manually. We don't need to care about
++// the keypair name/output file in Amazon, it will be removed automatically.
++int GahpClient::amazon_vm_destroy_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile, 
++										   const char * keyname, char* & error_code )
+ {
+ 	// command line looks like:
+-	// AMAZON_COMMAND_VM_DELETE_GROUP <req_id> <publickeyfile> <privatekeyfile> <groupname>
+-	static const char* command = "AMAZON_VM_DELETE_GROUP";
+-
++	// AMAZON_COMMAND_VM_DESTROY_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> 
++	static const char* command = "AMAZON_VM_DESTROY_KEYPAIR";
++	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (groupname == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
+-	// Generate request line
++	// construct command line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(groupname) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(keyname) );
+ 	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
++	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4);
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
++	free( esc4 );
++
+ 	ASSERT( x > 0 );
+ 	
+ 	const char *buf = reqline.c_str();
+@@ -7008,11 +6879,11 @@ int GahpClient::amazon_vm_delete_group( const char * publickeyfile, const char *
+ 
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// we expect the following return:
++		
++	// The result should look like:
+ 	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1 
++	//		seq_id 1
++	//		seq_id error_code error_string
+ 		
+ 	if ( result ) {
+ 		// command completed
+@@ -7024,6 +6895,7 @@ int GahpClient::amazon_vm_delete_group( const char * publickeyfile, const char *
+ 			}
+ 		} 
+ 		else if ( result->argc == 4 ) {
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+ 			error_string = result->argv[3];
+ 		} else {
+@@ -7033,7 +6905,7 @@ int GahpClient::amazon_vm_delete_group( const char * publickeyfile, const char *
+ 		delete result;
+ 		return rc;
+ 	}
+-
++	
+ 	// Now check if pending command timed out.
+ 	if ( check_pending_timeout(command, buf) ) 
+ 	{
+@@ -7043,17 +6915,17 @@ int GahpClient::amazon_vm_delete_group( const char * publickeyfile, const char *
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
++	return GAHPCLIENT_COMMAND_PENDING;	
+ }
+ 
+ 
+-//  Show group names
+-int GahpClient::amazon_vm_group_names( const char * publickeyfile, const char * privatekeyfile, 
+-									   StringList &group_names, char* & error_code )
++// Check all the running VM instances and their corresponding keypair name
++int GahpClient::amazon_vm_vm_keypair_all( const char *service_url, const char* publickeyfile, const char* privatekeyfile,
++										  StringList & returnStatus, char* & error_code )
+ {
+ 	// command line looks like:
+-	// AMAZON_COMMAND_VM_GROUP_NAMES <req_id> <publickeyfile> <privatekeyfile>
+-	static const char* command = "AMAZON_VM_GROUP_NAMES";
++	// AMAZON_COMMAND_VM_KEYPAIR_ALL <req_id> <publickeyfile> <privatekeyfile>
++	static const char* command = "AMAZON_VM_RUNNING_KEYPAIR";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -7061,20 +6933,22 @@ int GahpClient::amazon_vm_group_names( const char * publickeyfile, const char *
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
+ 	// Generate request line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+ 	
+-	int x = sprintf(reqline, "%s %s", esc1, esc2 );
++	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
++	free( esc3 );
+ 	ASSERT( x > 0 );
+ 	
+ 	const char *buf = reqline.c_str();
+@@ -7094,147 +6968,43 @@ int GahpClient::amazon_vm_group_names( const char * publickeyfile, const char *
+ 	Gahp_Args* result = get_pending_result(command, buf);
+ 	
+ 	// we expect the following return:
+-	//		seq_id 0 + <groupname> <groupname> ...
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1 
+-		
++	//		seq_id 0 <instance_id> <keypair> <instance_id> <keypair> ... 
++	//		seq_id 1 <error_code> <error_string>
++	//		seq_id 1
++	
++	// Notice: the running VM instances without keypair name will not be ruturned by gahp_server
++
+ 	if ( result ) {
+-		// command completed
+-		int rc = 0;
++		// command completed and the return value looks like:
++		int rc = atoi(result->argv[1]);
+ 		
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
++		if (rc == 1) {
++			
++			if (result->argc == 2) {
+ 				error_string = "";
+-			} 
+-			else {
+-				// maybe there is no group existed in the Amazon VM ...
+-				// we cannot use EXCEPT() here
+-			}
+-		}
+-		else if ( result->argc >= 4 ) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) { // returned msg is error message
++			} else if (result->argc == 4) {
+ 				error_code = strdup(result->argv[2]);
+ 				error_string = result->argv[3];
+ 			} else {
+-				// get groups' names
+-				for (int i=2; i<result->argc; i++) {
+-					group_names.append( strdup(result->argv[i]) );
+-				}
+-				group_names.rewind();
++				EXCEPT("Bad %s Result",command);
+ 			}
+-		}
+-		else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// Show group rules
+-int GahpClient::amazon_vm_group_rules(const char * publickeyfile, const char * privatekeyfile, const char * groupname, 
+-									  StringList & returnStatus, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_GROUP_RULES <req_id> <publickeyfile> <privatekeyfile> <groupname>
+-	static const char* command = "AMAZON_VM_GROUP_RULES";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (groupname == NULL)) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// Generate request line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(groupname) );
+-	
+-	int x = sprintf( reqline, "%s %s %s", esc1, esc2, esc3 );
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-
+-	// we expect the following return:
+-	//		seq_id 0 { <protocol> + <start_port> + <end_port> + <ip_range> }
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-
+-	if ( result ) {
+-		// command completed. 
+-		int rc = 0;
+-		
+-		if ( result->argc == 2 ) {
+-			rc = atoi(result->argv[1]);
+-			if ( rc == 0 ) {
+-				EXCEPT( "Bad %s result", command );
+-				rc = 1;
++			
++		} else {	// rc == 0
++			
++			if ( ( (result->argc-2) % 2) != 0 ) {
++				EXCEPT("Bad %s Result",command);
+ 			} else {
+-				error_string = "";
+-			}			
+-		}
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		}
+-		else if ( (result->argc - 2)%4 != 0 ) {
+-			EXCEPT( "Bad %s result", command );
+-		} 
+-		else {
+-			rc = atoi(result->argv[1]);
+-			if ( rc == 1 ) {
+-				EXCEPT( "Bad %s result", command );
+-			}
+-			else {
++				// get the status info
+ 				for (int i=2; i<result->argc; i++) {
+-					 returnStatus.append( strdup(result->argv[i]) );
++					returnStatus.append( strdup(result->argv[i]) );
+ 				}
+ 				returnStatus.rewind();
+ 			}
+-		}
+-			
++		}		
++		
+ 		delete result;
+ 		return rc;
+-	}	
++	}
+ 
+ 	// Now check if pending command timed out.
+ 	if ( check_pending_timeout(command, buf) ) 
+@@ -7246,144 +7016,67 @@ int GahpClient::amazon_vm_group_rules(const char * publickeyfile, const char * p
+ 
+ 	// If we made it here, command is still pending...
+ 	return GAHPCLIENT_COMMAND_PENDING;	
++
+ }
+ 
+ 
+-// Add group rule
+-int GahpClient::amazon_vm_add_group_rule(const char * publickeyfile, const char * privatekeyfile, const char * groupname,
+-							 const char * protocol, const char * start_port, const char * end_port, const char * ip_range, char* & error_code )
++
++//  Start VM
++int GahpClient::ec2_vm_start( const char * service_url,
++							  const char * publickeyfile,
++							  const char * privatekeyfile,
++							  const char * ami_id, 
++							  const char * keypair,
++							  const char * user_data,
++							  const char * user_data_file,
++							  const char * instance_type,
++							  StringList & groupnames,
++							  char * &instance_id,
++							  char * &error_code)
+ {
+ 	// command line looks like:
+-	// AMAZON_COMMAND_VM_ADD_GROUP_RULE <req_id> <publickeyfile> <privatekeyfile> 
+-	// <groupname> <protocol> <start_port> <end_port> <ip_range>
+-	// Notice: "ip_range" is optional but since it is the last argument, it should be replaced by ""
+-	static const char* command = "AMAZON_VM_ADD_GROUP_RULE";
+-	
++	// EC2_COMMAND_VM_START <req_id> <publickeyfile> <privatekeyfile> <ami-id> <keypair> <groupname> <groupname> ...
++	static const char* command = "EC2_VM_START";
++
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (groupname == NULL) ||
+-		 (protocol == NULL) || (start_port == NULL) || (end_port == NULL) ) {
++
++	// check the input arguments
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (ami_id == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+-	
++
+ 	// Generate request line
+-	if ( !ip_range ) ip_range = "";
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(groupname) );
+-	char* esc4 = strdup( escapeGahpString(protocol) );
+-	char* esc5 = strdup( escapeGahpString(start_port) );
+-	char* esc6 = strdup( escapeGahpString(end_port) );
+-	char* esc7 = strdup( escapeGahpString(ip_range) );
+-	
+-	int x = sprintf(reqline, "%s %s %s %s %s %s %s", esc1, esc2, esc3, esc4, esc5, esc6, esc7);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	free( esc4 );
+-	free( esc5 );
+-	free( esc6 );
+-	free( esc7 );
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+ 
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// we expect the following return:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-	
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
++	// keypair/user_data/user_data_file is a required field. when empty, need to be replaced by "NULL"
++	if ( !keypair ) keypair = NULLSTRING;
++	if ( !user_data ) user_data = NULLSTRING;
++	if ( !user_data_file ) user_data_file = NULLSTRING;
++	if ( !instance_type ) instance_type = NULLSTRING;
+ 
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
++	// groupnames is optional, but since it is the last argument, don't need to set it as "NULL"
++	// XXX: You probably should specify a NULL for all "optional" parameters -matt
++						
++	std::string reqline;
+ 
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(ami_id) );
++	char* esc5 = strdup( escapeGahpString(keypair) );
++	char* esc6 = strdup( escapeGahpString(user_data) );
++	char* esc7 = strdup( escapeGahpString(user_data_file) );
+ 
++	// currently we support the following instance type:
++	// 1. m1.small
++	// 2. m1.large
++	// 3. m1.xlarge
++	char* esc8 = strdup( escapeGahpString(instance_type) );
++
++	int x = sprintf(reqline, "%s %s %s %s %s %s %s %s", esc1, esc2, esc3, esc4, esc5, esc6, esc7, esc8);
+ 
+-// Delete group rule 
+-int GahpClient::amazon_vm_del_group_rule(const char * publickeyfile, const char * privatekeyfile, const char * groupname,
+-							 const char * protocol, const char * start_port, const char * end_port, const char * ip_range, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_DEL_GROUP_RULE <req_id> <publickeyfile> <privatekeyfile> <groupname> 
+-	// + <protocol> <start_port> <end_port> <ip_range>
+-	// Notice: "ip_range" is optional but since it is the last argument, it should be replaced by ""
+-	static const char* command = "AMAZON_VM_DEL_GROUP_RULE";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (groupname == NULL) ||
+-		 (protocol == NULL) || (start_port == NULL) || (end_port == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// Generate request line
+-	if ( !ip_range ) ip_range = "";
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(groupname) );
+-	char* esc4 = strdup( escapeGahpString(protocol) );
+-	char* esc5 = strdup( escapeGahpString(start_port) );
+-	char* esc6 = strdup( escapeGahpString(end_port) );
+-	char* esc7 = strdup( escapeGahpString(ip_range) );
+-	
+-	int x = sprintf(reqline, "%s %s %s %s %s %s %s", esc1, esc2, esc3, esc4, esc5, esc6, esc7);
+-	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+@@ -7391,918 +7084,25 @@ int GahpClient::amazon_vm_del_group_rule(const char * publickeyfile, const char
+ 	free( esc5 );
+ 	free( esc6 );
+ 	free( esc7 );
++	free( esc8 );
+ 	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+ 
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
++	const char * group_name;
++	int cnt = 0;
++	char * esc_groupname;
+ 
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}
+-#endif
+-
+-// Ping to check if the server is alive
+-int GahpClient::amazon_ping(const char *service_url, const char * publickeyfile, const char * privatekeyfile)
+-{
+-	// we can use "Status All" command to make sure Amazon Server is alive.
+-	static const char* command = "AMAZON_VM_STATUS_ALL";
+-	
+-	// Generate request line
+-	char* esc1 = strdup( escapeGahpString(service_url) );
+-	char* esc2 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+-	
+-	std::string reqline;
+-	sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
+-	const char *buf = reqline.c_str();
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	if ( result ) {
+-		int rc = atoi(result->argv[1]);
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command,buf) ) {
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// Create and register SSH keypair
+-int GahpClient::amazon_vm_create_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile,
+-								   	      const char * keyname, const char * outputfile, char* & error_code)
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_CREATE_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> <outputfile> 
+-	static const char* command = "AMAZON_VM_CREATE_KEYPAIR";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) || (outputfile == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// construct command line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(service_url) );
+-	char* esc2 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc4 = strdup( escapeGahpString(keyname) );
+-	char* esc5 = strdup( escapeGahpString(outputfile) );
+-	
+-	int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	free( esc4 );
+-	free( esc5 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1
+-	//		seq_id error_code error_string
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			rc = atoi( result->argv[1] );
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}	
+-
+-
+-
+-// The destroy keypair function will delete the name of keypair, it will not touch the output file of 
+-// keypair. So in Amazon Job, we should delete keypair output file manually. We don't need to care about
+-// the keypair name/output file in Amazon, it will be removed automatically.
+-int GahpClient::amazon_vm_destroy_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile, 
+-										   const char * keyname, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_DESTROY_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> 
+-	static const char* command = "AMAZON_VM_DESTROY_KEYPAIR";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// construct command line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(service_url) );
+-	char* esc2 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc4 = strdup( escapeGahpString(keyname) );
+-	
+-	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	free( esc4 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-		
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1
+-	//		seq_id error_code error_string
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			rc = atoi( result->argv[1] );
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}
+-
+-
+-#if 0
+-//  List all existing SSH Keypair name
+-int GahpClient::amazon_vm_keypair_names( const char * publickeyfile, const char * privatekeyfile, 
+-										 StringList &keypair_names, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_VM_KEYPAIR_NAMES <req_id> <publickeyfile> <privatekeyfile> 
+-	static const char* command = "AMAZON_VM_KEYPAIR_NAMES";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// construct command line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	
+-	int x = sprintf(reqline, "%s %s", esc1, esc2);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-		
+-	// The result should look like:
+-	//		seq_id 0 <keypair_name> <keypair_name> <keypair_name> ...
+-	//		seq_id 1
+-	//		seq_id 1 error_code error_string
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-			else {
+-				// maybe there is no keypair existed in the Amazon ...
+-				// we cannot use EXCEPT() here
+-			}
+-		}
+-		else if ( result->argc >= 3 ) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_code = strdup(result->argv[2]);	
+-				error_string = result->argv[3];
+-			} else {
+-				// get keypairs' names
+-				for (int i=2; i<result->argc; i++) {
+-					keypair_names.append( strdup(result->argv[i]) );
+-				}
+-				keypair_names.rewind();
+-			}
+-		}
+-		else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;	
+-}
+-
+-
+-// List all S3 Bucket names
+-int GahpClient::amazon_vm_s3_all_buckets( const char * publickeyfile, const char * privatekeyfile, 
+-										  StringList & bucket_names, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_ALL_BUCKETS <req_id> <publickeyfile> <privatekeyfile>
+-	static const char* command = "AMAZON_S3_ALL_BUCKETS";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// construct command line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	
+-	int x = sprintf(reqline, "%s %s", esc1, esc2);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-		
+-	// The result should look like:
+-	//		seq_id 0 <bucket_name> <bucket_name> <bucket_name> ...
+-	//		seq_id 1
+-	//		seq_id 1 error_code error_string
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-			else {
+-				// maybe there is no keypair existed in the Amazon ...
+-				// we cannot use EXCEPT() here
+-			}
+-		}
+-		else if ( result->argc >= 3 ) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_code = strdup(result->argv[2]);	
+-				error_string = result->argv[3];
+-			} else {
+-				// get keypairs' names
+-				for (int i=2; i<result->argc; i++) {
+-					bucket_names.append( strdup(result->argv[i]) );
+-				}
+-				bucket_names.rewind();
+-			}
+-		}
+-		else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-
+-// Create Bucket in S3
+-int GahpClient::amazon_vm_s3_create_bucket( const char * publickeyfile, const char * privatekeyfile, 
+-											const char * bucketname, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_CREATE_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname>
+-	static const char* command = "AMAZON_S3_CREATE_BUCKET";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (bucketname == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(bucketname) );
+-	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// Delete Bucket in S3
+-int GahpClient::amazon_vm_s3_delete_bucket( const char * publickeyfile, const char * privatekeyfile, 
+-											const char * bucketname, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_DELETE_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname>
+-	// All the files saved in this bucket will be deleted by force.
+-	static const char* command = "AMAZON_S3_DELETE_BUCKET";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (bucketname == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(bucketname) );
+-	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// List all entries in a given Bucket
+-int GahpClient::amazon_vm_s3_list_bucket( const char * publickeyfile, const char * privatekeyfile, 
+-	                                      const char * bucketname, StringList & entry_names, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_LIST_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname> 
+-	static const char* command = "AMAZON_S3_LIST_BUCKET";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (bucketname == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// construct command line
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(bucketname) );
+-	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-		
+-	// The result should look like:
+-	//		seq_id 0 <bucket_name> <bucket_name> <bucket_name> ...
+-	//		seq_id 1
+-	//		seq_id 1 error_code error_string
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-			else {
+-				// maybe there is no keypair existed in the Amazon ...
+-				// we cannot use EXCEPT() here
+-			}
+-		}
+-		else if ( result->argc >= 3 ) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_code = strdup(result->argv[2]);	
+-				error_string = result->argv[3];
+-			} else {
+-				// get keypairs' names
+-				for (int i=2; i<result->argc; i++) {
+-					entry_names.append( strdup(result->argv[i]) );
+-				}
+-				entry_names.rewind();
+-			}
+-		}
+-		else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// Upload file into S3
+-int GahpClient::amazon_vm_s3_upload_file( const char * publickeyfile, const char * privatekeyfile, const char * filename,
+-							  const char * bucketname, const char * keyname, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_UPLOAD_FILE <req_id> <publickeyfile> <privatekeyfile> <bucketname> <filename> <keyname>
+-	static const char* command = "AMAZON_S3_UPLOAD_FILE";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-		 (bucketname == NULL) || (filename == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(filename) );
+-	char* esc4 = strdup( escapeGahpString(bucketname) );
+-	char* esc5;
+-	// keyname is optional. if client doesn't assign keyname, we
+-	// should assign filename to it
+-	if (keyname == NULL) {
+-		esc5 = strdup( escapeGahpString(filename) );
+-	} else {
+-		esc5 = strdup( escapeGahpString(keyname) );
+-	}
+-	
+-	int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	free( esc4 );
+-	free( esc5 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+-		
+-	// Check if this request is currently pending. If not, make it the pending request.
+-	if ( !is_pending(command,buf) ) {
+-		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+-		if ( m_mode == results_only ) {
+-			return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
+-		}
+-		now_pending(command, buf, deleg_proxy);
+-	}
+-	
+-	// If we made it here, command is pending.
+-
+-	// Check first if command completed.
+-	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+-	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
+-		delete result;
+-		return rc;
+-	}
+-	
+-	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
+-		// pending command timed out.
+-		sprintf( error_string, "%s timed out", command );
+-		return GAHPCLIENT_COMMAND_TIMED_OUT;
+-	}
+-
+-	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
+-
+-
+-// Download file from S3 to a local file
+-int GahpClient::amazon_vm_s3_download_file( const char * publickeyfile, const char * privatekeyfile, const char * bucketname,
+-								const char * keyname, const char * outputname, char* & error_code )
+-{
+-	// command line looks like:
+-	// AMAZON_COMMAND_S3_DOWNLOAD_FILE <req_id> <publickeyfile> <privatekeyfile> <bucketname> <keyname> <outputname>
+-	static const char* command = "AMAZON_S3_DOWNLOAD_FILE";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-		 (bucketname == NULL) || (keyname == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
+-	
+-	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(bucketname) );
+-	char* esc4 = strdup( escapeGahpString(keyname) );
+-	char* esc5;
+-	// outputname is optional. if client doesn't assign keyname, we
+-	// should assign keyname to it
+-	if (outputname == NULL) {
+-		esc5 = strdup( escapeGahpString(keyname) );
+-	} else {
+-		esc5 = strdup( escapeGahpString(outputname) );
+-	}
+-	
+-	int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5);
+-	
+-	free( esc1 );
+-	free( esc2 );
+-	free( esc3 );
+-	free( esc4 );
+-	free( esc5 );
+-
+-	ASSERT( x > 0 );
+-	
++	// get multiple group names from string list
++	groupnames.rewind();
++	if ( groupnames.number() > 0 ) {
++		while ( (group_name = groupnames.next()) ) {
++			esc_groupname = strdup( escapeGahpString(group_name) );
++			sprintf_cat(reqline, " %s", esc_groupname);
++			cnt++;
++			free( esc_groupname );
++		}
++	}
++	ASSERT( cnt == groupnames.number() );
+ 	const char *buf = reqline.c_str();
+-		
+ 	// Check if this request is currently pending. If not, make it the pending request.
+ 	if ( !is_pending(command,buf) ) {
+ 		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+@@ -8311,29 +7111,36 @@ int GahpClient::amazon_vm_s3_download_file( const char * publickeyfile, const ch
+ 		}
+ 		now_pending(command, buf, deleg_proxy);
+ 	}
+-	
++
+ 	// If we made it here, command is pending.
+ 
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+-	
+-	// The result should look like:
+-	//		seq_id 0
++
++	// we expect the following return:
++	//		seq_id 0 instance_id
+ 	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+-	if ( result ) {
+-		// command completed
++	//		seq_id 1 
++	
++	if ( result ) {	
++		// command completed. 
+ 		int rc = 0;
+-		if (result->argc == 2) {
++		if ( result->argc == 2 ) {
+ 			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
++			if ( rc == 0 ) {
++				EXCEPT( "Bad %s result", command );
++				rc = 1;
++			} else {
+ 				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
++			}			
++		} else if ( result->argc == 3 ) {
++			rc = atoi(result->argv[1]);
++			instance_id = strdup(result->argv[2]);
++		} else if ( result->argc == 4 ) {
++			// get the error code
++			rc = atoi( result->argv[1] );
++ 			error_code = strdup(result->argv[2]);	
++ 			error_string = result->argv[3];		
+ 		} else {
+ 			EXCEPT( "Bad %s result", command );
+ 		}
+@@ -8341,7 +7148,7 @@ int GahpClient::amazon_vm_s3_download_file( const char * publickeyfile, const ch
+ 		delete result;
+ 		return rc;
+ 	}
+-	
++
+ 	// Now check if pending command timed out.
+ 	if ( check_pending_timeout(command, buf) ) 
+ 	{
+@@ -8351,17 +7158,17 @@ int GahpClient::amazon_vm_s3_download_file( const char * publickeyfile, const ch
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
++	return GAHPCLIENT_COMMAND_PENDING;	
+ }
+ 
+ 
+-// Delete file from S3
+-int GahpClient::amazon_vm_s3_delete_file( const char * publickeyfile, const char * privatekeyfile,
+-									      const char * keyname, const char * bucketname, char* & error_code )
+-{
++// Stop VM
++int GahpClient::ec2_vm_stop( const char *service_url, const char * publickeyfile, const char * privatekeyfile, 
++								const char * instance_id, char* & error_code )
++{	
+ 	// command line looks like:
+-	//AMAZON_COMMAND_S3_DELETE_FILE <req_id> <publickeyfile> <privatekeyfile> <keyname> <bucketname>
+-	static const char* command = "AMAZON_S3_DELETE_FILE";
++	// EC2_COMMAND_VM_STOP <req_id> <publickeyfile> <privatekeyfile> <instance-id>
++	static const char* command = "EC2_VM_STOP";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -8369,25 +7176,24 @@ int GahpClient::amazon_vm_s3_delete_file( const char * publickeyfile, const char
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-		 (bucketname == NULL) || (keyname == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (instance_id == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
++	// Generate request line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(keyname) );
+-	char* esc4 = strdup( escapeGahpString(bucketname) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(instance_id) );
+ 	
+-	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4);
++	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4 );
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+ 	free( esc4 );
+-
+ 	ASSERT( x > 0 );
+ 	
+ 	const char *buf = reqline.c_str();
+@@ -8406,22 +7212,22 @@ int GahpClient::amazon_vm_s3_delete_file( const char * publickeyfile, const char
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+ 	
+-	// The result should look like:
++	// we expect the following return:
+ 	//		seq_id 0
+ 	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
++	//		seq_id 1 
++	
+ 	if ( result ) {
+-		// command completed
++		// command completed. 
+ 		int rc = 0;
+ 		if (result->argc == 2) {
+ 			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
++			if (rc == 1) error_string = "";
+ 		} else if ( result->argc == 4 ) {
++			// get the error code
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
++			error_string = result->argv[3];			
+ 		} else {
+ 			EXCEPT( "Bad %s result", command );
+ 		}
+@@ -8429,7 +7235,7 @@ int GahpClient::amazon_vm_s3_delete_file( const char * publickeyfile, const char
+ 		delete result;
+ 		return rc;
+ 	}
+-	
++
+ 	// Now check if pending command timed out.
+ 	if ( check_pending_timeout(command, buf) ) 
+ 	{
+@@ -8440,16 +7246,16 @@ int GahpClient::amazon_vm_s3_delete_file( const char * publickeyfile, const char
+ 
+ 	// If we made it here, command is still pending...
+ 	return GAHPCLIENT_COMMAND_PENDING;	
+-}
++}							
+ 
+ 
+-// Register EC2 Image
+-int GahpClient::amazon_vm_register_image( const char* publickeyfile, const char* privatekeyfile, 
+-										  const char* imagename, char* & ami_id, char* & error_code )
+-{
++// Check VM status
++int GahpClient::ec2_vm_status( const char *service_url, const char * publickeyfile, const char * privatekeyfile,
++							  const char * instance_id, StringList &returnStatus, char* & error_code )
++{	
+ 	// command line looks like:
+-	//AMAZON_COMMAND_VM_REGISTER_IMAGE <req_id> <publickeyfile> <privatekeyfile> <imagetname>
+-	static const char* command = "AMAZON_VM_REGISTER_IMAGE";
++	// EC2_COMMAND_VM_STATUS <return 0;"EC2_VM_STATUS";
++	static const char* command = "EC2_VM_STATUS";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -8457,22 +7263,24 @@ int GahpClient::amazon_vm_register_image( const char* publickeyfile, const char*
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (imagename == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (instance_id == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
++	// Generate request line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(imagename) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(instance_id) );
+ 	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3);
++	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4 );
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+-
++	free( esc4 );
+ 	ASSERT( x > 0 );
+ 	
+ 	const char *buf = reqline.c_str();
+@@ -8491,29 +7299,71 @@ int GahpClient::amazon_vm_register_image( const char* publickeyfile, const char*
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+ 	
+-	// The result should look like:
+-	//		seq_id 0 ami_id
++	// we expect the following return:
++	//		seq_id 0 <instance_id> <status> <ami_id> <public_dns> <private_dns> <keypairname> <group> <group> <group> ... 
++	//		seq_id 0
+ 	//		seq_id 1 error_code error_string
+ 	//		seq_id 1
++	// We use "NULL" to replace the empty items. and there at least has one group.
++	
+ 	if ( result ) {
+-		// command completed
++		// command completed.
+ 		int rc = 0;
++		
+ 		if (result->argc == 2) {
+ 			rc = atoi(result->argv[1]);
+ 			if (rc == 1) {
+ 				error_string = "";
+ 			}
+ 		} 
+-		else if ( result->argc == 3 ) {
+-			rc = atoi(result->argv[1]);
+-			ami_id = strdup(result->argv[2]);
+-		} else if ( result->argc == 4 ) {
++		else if (result->argc == 4) {
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+ 			error_string = result->argv[3];
+-		} else {
++		}
++		else if (result->argc == 5)
++		{
++			rc = atoi(result->argv[1]);
++			if (rc == 1) {
++				EXCEPT( "Bad %s result", command );
++			}
++			else {
++				if ( strcmp(result->argv[3], "running") == 0) {
++					rc = 1;
++				}
++				else
++				{
++					// get the status info
++					for (int i=2; i<result->argc; i++) {
++						returnStatus.append( strdup(result->argv[i]) );
++					}
++				}
++				returnStatus.rewind();
++			}				
++		} 
++		else if (result->argc < 9) {
+ 			EXCEPT( "Bad %s result", command );
++		} else {
++			rc = atoi(result->argv[1]);
++			if (rc == 1) {
++				EXCEPT( "Bad %s result", command );
++			}
++			else {
++				if ( (strcmp(result->argv[3], "pending")!=0) && 
++					 (strcmp(result->argv[3], "running")!=0) ) {
++					rc = 1;
++				}
++				else
++				{
++					// get the status info
++					for (int i=2; i<result->argc; i++) {
++						returnStatus.append( strdup(result->argv[i]) );
++					}
++				}
++				returnStatus.rewind();
++			}
+ 		}
+-
++		
+ 		delete result;
+ 		return rc;
+ 	}
+@@ -8531,39 +7381,25 @@ int GahpClient::amazon_vm_register_image( const char* publickeyfile, const char*
+ }
+ 
+ 
+-// Deregister EC2 Image
+-int GahpClient::amazon_vm_deregister_image( const char* publickeyfile, const char* privatekeyfile, 
+-											const char* ami_id, char* & error_code )
++
++// Ping to check if the server is alive
++int GahpClient::ec2_ping(const char *service_url, const char * publickeyfile, const char * privatekeyfile)
+ {
+-	// command line looks like:
+-	//AMAZON_COMMAND_VM_REGISTER_IMAGE <req_id> <publickeyfile> <privatekeyfile> <imagetname>
+-	static const char* command = "AMAZON_VM_DEREGISTER_IMAGE";
+-	
+-	// check if this command is supported
+-	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
++	// we can use "Status All" command to make sure EC2 Server is alive.
++	static const char* command = "EC2_VM_STATUS_ALL";
+ 	
+-	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || (ami_id == NULL) ) {
+-		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+-	}
++	// Generate request line
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
+ 	
+ 	std::string reqline;
+-	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(ami_id) );
+-	
+-	int x = sprintf(reqline, "%s %s %s", esc1, esc2, esc3);
++	sprintf(reqline, "%s %s %s", esc1, esc2, esc3 );
++	const char *buf = reqline.c_str();
+ 	
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+-
+-	ASSERT( x > 0 );
+-	
+-	const char *buf = reqline.c_str();
+ 		
+ 	// Check if this request is currently pending. If not, make it the pending request.
+ 	if ( !is_pending(command,buf) ) {
+@@ -8579,34 +7415,14 @@ int GahpClient::amazon_vm_deregister_image( const char* publickeyfile, const cha
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+ 	
+-	// The result should look like:
+-	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+-	//		seq_id 1
+-		
+ 	if ( result ) {
+-		// command completed
+-		int rc = 0;
+-		if (result->argc == 2) {
+-			rc = atoi(result->argv[1]);
+-			if (rc == 1) {
+-				error_string = "";
+-			}
+-		} 
+-		else if ( result->argc == 4 ) {
+-			error_code = strdup(result->argv[2]);
+-			error_string = result->argv[3];
+-		} else {
+-			EXCEPT( "Bad %s result", command );
+-		}
+-
++		int rc = atoi(result->argv[1]);
+ 		delete result;
+ 		return rc;
+ 	}
+ 	
+ 	// Now check if pending command timed out.
+-	if ( check_pending_timeout(command, buf) ) 
+-	{
++	if ( check_pending_timeout(command,buf) ) {
+ 		// pending command timed out.
+ 		sprintf( error_string, "%s timed out", command );
+ 		return GAHPCLIENT_COMMAND_TIMED_OUT;
+@@ -8617,43 +7433,45 @@ int GahpClient::amazon_vm_deregister_image( const char* publickeyfile, const cha
+ }
+ 
+ 
+-// Upload files in a directory to the S3
+-int GahpClient::amazon_vm_s3_upload_dir( const char* publickeyfile, const char* privatekeyfile, 
+-										 const char* dirname, const char* bucketname, char* & error_code )
++// Create and register SSH keypair
++int GahpClient::ec2_vm_create_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile,
++								   	      const char * keyname, const char * outputfile, char* & error_code)
+ {
+ 	// command line looks like:
+-	//AMAZON_COMMAND_S3_UPLOAD_DIR <req_id> <publickeyfile> <privatekeyfile> <dirname> <bucketname>
+-	static const char* command = "AMAZON_S3_UPLOAD_DIR";
+-
++	// EC2_COMMAND_VM_CREATE_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> <outputfile> 
++	static const char* command = "EC2_VM_CREATE_KEYPAIR";
++	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+-
++	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-		 (dirname == NULL) || (bucketname == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) || (outputfile == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+-
++	
++	// construct command line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(dirname) );
+-	char* esc4 = strdup( escapeGahpString(bucketname) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(keyname) );
++	char* esc5 = strdup( escapeGahpString(outputfile) );
++	
++	int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5);
+ 	
+-	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4);
+-
+ 	free( esc1 );
+ 	free( esc2 );
+ 	free( esc3 );
+ 	free( esc4 );
++	free( esc5 );
+ 
+ 	ASSERT( x > 0 );
+-
++	
+ 	const char *buf = reqline.c_str();
+-
++		
+ 	// Check if this request is currently pending. If not, make it the pending request.
+ 	if ( !is_pending(command,buf) ) {
+ 		// Command is not pending, so go ahead and submit a new one if our command mode permits.
+@@ -8667,11 +7485,11 @@ int GahpClient::amazon_vm_s3_upload_dir( const char* publickeyfile, const char*
+ 
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+-
++	
+ 	// The result should look like:
+ 	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+ 	//		seq_id 1
++	//		seq_id error_code error_string
+ 		
+ 	if ( result ) {
+ 		// command completed
+@@ -8683,6 +7501,7 @@ int GahpClient::amazon_vm_s3_upload_dir( const char* publickeyfile, const char*
+ 			}
+ 		} 
+ 		else if ( result->argc == 4 ) {
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+ 			error_string = result->argv[3];
+ 		} else {
+@@ -8702,17 +7521,20 @@ int GahpClient::amazon_vm_s3_upload_dir( const char* publickeyfile, const char*
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-}
++	return GAHPCLIENT_COMMAND_PENDING;	
++}	
++
+ 
+ 
+-//  Download all files in a bucket to the local disk
+-int GahpClient::amazon_vm_s3_download_bucket( const char* publickeyfile, const char* privatekeyfile,
+-											  const char* bucketname, const char* localdirname, char* & error_code )
++// The destroy keypair function will delete the name of keypair, it will not touch the output file of 
++// keypair. So in EC2 Job, we should delete keypair output file manually. We don't need to care about
++// the keypair name/output file in EC2, it will be removed automatically.
++int GahpClient::ec2_vm_destroy_keypair( const char *service_url, const char * publickeyfile, const char * privatekeyfile, 
++										   const char * keyname, char* & error_code )
+ {
+ 	// command line looks like:
+-	//AMAZON_COMMAND_S3_DOWNLOAD_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname> <localdirname>
+-	static const char* command = "AMAZON_S3_DOWNLOAD_BUCKET";
++	// EC2_COMMAND_VM_DESTROY_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <groupname> 
++	static const char* command = "EC2_VM_DESTROY_KEYPAIR";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -8720,17 +7542,17 @@ int GahpClient::amazon_vm_s3_download_bucket( const char* publickeyfile, const c
+ 	}
+ 	
+ 	// check input arguments
+-	if ( (publickeyfile == NULL) || (privatekeyfile == NULL) || 
+-	     (localdirname == NULL) || (bucketname == NULL) ) {
++	if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (keyname == NULL) ) {
+ 		return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
+ 	}
+ 	
++	// construct command line
+ 	std::string reqline;
+ 	
+-	char* esc1 = strdup( escapeGahpString(publickeyfile) );
+-	char* esc2 = strdup( escapeGahpString(privatekeyfile) );
+-	char* esc3 = strdup( escapeGahpString(bucketname) );
+-	char* esc4 = strdup( escapeGahpString(localdirname) );
++	char* esc1 = strdup( escapeGahpString(service_url) );
++	char* esc2 = strdup( escapeGahpString(publickeyfile) );
++	char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++	char* esc4 = strdup( escapeGahpString(keyname) );
+ 	
+ 	int x = sprintf(reqline, "%s %s %s %s", esc1, esc2, esc3, esc4);
+ 	
+@@ -8756,11 +7578,11 @@ int GahpClient::amazon_vm_s3_download_bucket( const char* publickeyfile, const c
+ 
+ 	// Check first if command completed.
+ 	Gahp_Args* result = get_pending_result(command, buf);
+-	
++		
+ 	// The result should look like:
+ 	//		seq_id 0
+-	//		seq_id 1 error_code error_string
+ 	//		seq_id 1
++	//		seq_id error_code error_string
+ 		
+ 	if ( result ) {
+ 		// command completed
+@@ -8772,6 +7594,7 @@ int GahpClient::amazon_vm_s3_download_bucket( const char* publickeyfile, const c
+ 			}
+ 		} 
+ 		else if ( result->argc == 4 ) {
++			rc = atoi( result->argv[1] );
+ 			error_code = strdup(result->argv[2]);
+ 			error_string = result->argv[3];
+ 		} else {
+@@ -8791,19 +7614,17 @@ int GahpClient::amazon_vm_s3_download_bucket( const char* publickeyfile, const c
+ 	}
+ 
+ 	// If we made it here, command is still pending...
+-	return GAHPCLIENT_COMMAND_PENDING;
+-	
++	return GAHPCLIENT_COMMAND_PENDING;	
+ }
+-#endif
+ 
+ 
+ // Check all the running VM instances and their corresponding keypair name
+-int GahpClient::amazon_vm_vm_keypair_all( const char *service_url, const char* publickeyfile, const char* privatekeyfile,
++int GahpClient::ec2_vm_vm_keypair_all( const char *service_url, const char* publickeyfile, const char* privatekeyfile,
+ 										  StringList & returnStatus, char* & error_code )
+ {
+ 	// command line looks like:
+-	// AMAZON_COMMAND_VM_KEYPAIR_ALL <req_id> <publickeyfile> <privatekeyfile>
+-	static const char* command = "AMAZON_VM_RUNNING_KEYPAIR";
++	// EC2_COMMAND_VM_KEYPAIR_ALL <req_id> <publickeyfile> <privatekeyfile>
++	static const char* command = "EC2_VM_RUNNING_KEYPAIR";
+ 	
+ 	// check if this command is supported
+ 	if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
+@@ -8896,7 +7717,101 @@ int GahpClient::amazon_vm_vm_keypair_all( const char *service_url, const char* p
+ 	return GAHPCLIENT_COMMAND_PENDING;	
+ 
+ }
+-	
++
++int GahpClient::ec2_associate_address(const char * service_url,
++                                      const char * publickeyfile,
++                                      const char * privatekeyfile,
++                                      const char * instance_id, 
++                                      const char * elastic_ip,
++                                      StringList & returnStatus,
++                                      char* & error_code )
++{
++// command line looks like:
++    // EC2_COMMAND_VM_STATUS <return 0;"EC2_VM_STATUS";
++    static const char* command = "EC2_VM_ASSOCIATE_ADDRESS";
++
++    int rc=0;
++    
++    // check if this command is supported
++    if  (server->m_commands_supported->contains_anycase(command)==FALSE) {
++        return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
++    }
++
++    // check input arguments
++    if ( (service_url == NULL) || (publickeyfile == NULL) || (privatekeyfile == NULL) || (instance_id == NULL) || (elastic_ip == NULL) ) {
++        return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
++    }
++
++    // Generate request line
++    std::string reqline;
++
++    char* esc1 = strdup( escapeGahpString(service_url) );
++    char* esc2 = strdup( escapeGahpString(publickeyfile) );
++    char* esc3 = strdup( escapeGahpString(privatekeyfile) );
++    char* esc4 = strdup( escapeGahpString(instance_id) );
++    char* esc5 = strdup( escapeGahpString(elastic_ip) );
++    
++    int x = sprintf(reqline, "%s %s %s %s %s", esc1, esc2, esc3, esc4, esc5 );
++    
++    free( esc1 );
++    free( esc2 );
++    free( esc3 );
++    free( esc4 );
++    free( esc5 );
++    ASSERT( x > 0 );
++    
++    const char *buf = reqline.c_str();
++        
++    // Check if this request is currently pending. If not, make it the pending request.
++    if ( !is_pending(command,buf) ) {
++        // Command is not pending, so go ahead and submit a new one if our command mode permits.
++        if ( m_mode == results_only ) {
++            return GAHPCLIENT_COMMAND_NOT_SUBMITTED;
++        }
++        now_pending(command, buf, deleg_proxy);
++    }
++    
++    // If we made it here, command is pending.
++
++    // Check first if command completed.
++    Gahp_Args* result = get_pending_result(command, buf);
++
++    if ( result ) {
++        // command completed and the return value looks like:
++        int rc = atoi(result->argv[1]);
++        
++        if (rc == 1) {
++            
++            if (result->argc == 2) {
++                error_string = "";
++            } else if (result->argc == 4) {
++                error_code = strdup(result->argv[2]);
++                error_string = result->argv[3];
++            } else {
++                EXCEPT("Bad %s Result",command);
++            }
++            
++        } else {    // rc == 0
++            
++            if ( ( (result->argc-2) % 2) != 0 ) {
++                EXCEPT("Bad %s Result",command);
++            } else {
++                // get the status info
++                for (int i=2; i<result->argc; i++) {
++                    returnStatus.append( strdup(result->argv[i]) );
++                }
++                returnStatus.rewind();
++            }
++        }       
++        
++        delete result;
++        
++    }
++    
++    return rc;
++
++}
++
+ int GahpClient::dcloud_submit( const char *service_url,
+ 							   const char *username,
+ 							   const char *password,
+diff --git a/src/condor_gridmanager/gahp-client.h b/src/condor_gridmanager/gahp-client.h
+index 1d363b9..6999590 100644
+--- a/src/condor_gridmanager/gahp-client.h
++++ b/src/condor_gridmanager/gahp-client.h
+@@ -625,15 +625,6 @@ class GahpClient : public Service {
+ 		int cream_set_lease(const char *service, const char *lease_id, time_t &lease_expiry);
+ 
+ 
+-		// 1. Start VM:
+-		// AMAZON_COMMAND_VM_START <req_id> <publickeyfile> <privatekeyfile> <ami-id> <keypair> <groupname> <groupname> ...
+-		// <keypair> and <groupname> are optional ones.
+-		// we support multiple groupnames 
+-		// return: seq_id + success/failed + instance id (string)
+-		// Should look like:
+-		//		seq_id 0 <instance_id>
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1 
+ 		int amazon_vm_start( const char * service_url,
+ 							 const char * publickeyfile,
+ 							 const char * privatekeyfile,
+@@ -646,51 +637,12 @@ class GahpClient : public Service {
+ 							 char* & instance_id,
+ 							 char* & error_code );
+ 		
+-		// 2. Stop VM:
+-		// AMAZON_COMMAND_VM_STOP <req_id> <publickeyfile> <privatekeyfile> <instance-id>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+ 		int amazon_vm_stop( const char * service_url,
+ 							const char * publickeyfile,
+ 							const char * privatekeyfile,
+ 							const char * instance_id,
+ 							char* & error_code );
+ 							
+-#if 0
+-		// 3. Reboot VM:
+-		// AMAZON_COMMAND_VM_REBOOT <req_id> <publickeyfile> <privatekeyfile> <instance-id>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1 	
+-		int amazon_vm_reboot( const char * publickeyfile,
+-							  const char * privatekeyfile,
+-							  const char * instance_id,
+-							  char* & error_code );		
+-#endif
+-		
+-		// 4. Status VM:
+-		// AMAZON_COMMAND_VM_STATUS <req_id> <publickeyfile> <privatekeyfile> <instance-id>
+-		// return: success/failed + return status
+-		// return status is "<instance_id> <status> <ami_id> <public_dns> <private_dns> <keypairname> <group> <group> <group> ...
+-		// Should look like:
+-		//		seq_id 0 <instance_id> <status> <ami_id> <public_dns> <private_dns> <keypairname> <group> <group> <group> ... 
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+-		// We use NULL to replace the empty items. and there at least has one group.		
+-		
+-		// status could be one of "running", "pending", "shutting-down", "terminated"
+-		/*
+-		** From gahp_server we can get a string including all the info we needed. What we should 
+-		** do is to parse this string (since all the items are splited by blank) and insert them
+-		** into a StringList. In the returnStatus, if some fields are empty, they will be replace
+-		** with "Null", so it means public_dns will always in position 4 and groupname will always 
+-		** start from position 7 
+-		*/
+ 		int amazon_vm_status( const char * service_url,
+ 							  const char * publickeyfile,
+ 							  const char * privatekeyfile,
+@@ -698,163 +650,10 @@ class GahpClient : public Service {
+ 							  StringList & returnStatus,
+ 							  char* & error_code );
+ 				
+-#if 0
+-		// 5. Status ALL VM:
+-		// AMAZON_COMMAND_VM_STATUS_ALL <req_id> <publickeyfile> <privatekeyfile>
+-		// return: success/failed + <instance_id> <status> <ami_id> <instance_id> <status> <ami_id>     NULL
+-		// Should look like:
+-		//		seq_id 0 <instance_id> <status> <ami_id>  <instance_id> <status> <ami_id> ... 
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+-		// We use NULL to replace the empty items.
+-		int amazon_vm_status_all( const char * publickeyfile,
+-								  const char * privatekeyfile,
+-								  StringList & returnStatus,
+-								  char* & error_code );		
+-		
+-		// 6. Create Group:
+-		// AMAZON_COMMAND_VM_CREATE_GROUP <req_id> <publickeyfile> <privatekeyfile> <groupname> <group description>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1 
+-		
+-		int amazon_vm_create_group( const char * publickeyfile, 
+-									const char * privatekeyfile,
+-									const char * groupname, 
+-									const char * group_description,
+-									char* & error_code );		
+-		
+-		// 7. Delete Group:
+-		// AMAZON_COMMAND_VM_DELETE_GROUP <req_id> <publickeyfile> <privatekeyfile> <groupname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1 
+-		int amazon_vm_delete_group( const char * publickeyfile,
+-									const char * privatekeyfile,
+-									const char * groupname,
+-									char* & error_code );		
+-		
+-		// 8. Show group Names
+-		// AMAZON_COMMAND_VM_GROUP_NAMES <req_id> <publickeyfile> <privatekeyfile>
+-		// return: success/failed + <groupname> <groupname> ... at least one group name
+-		// Should look like:
+-		//		seq_id 0 + <groupname> <groupname> ...
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1 
+-		int amazon_vm_group_names( const char * publickeyfile,
+-								   const char * privatekeyfile,
+-								   StringList & group_names,
+-								   char* & error_code );
+-		
+-		// 9. Show group rules
+-		// AMAZON_COMMAND_VM_GROUP_RULES <req_id> <publickeyfile> <privatekeyfile> <groupname>
+-		// return: success/failed + { <protocol> + <start_port> + <end_port> + <ip_range> }
+-		// Should look like:
+-		//		seq_id 0 { <protocol> + <start_port> + <end_port> + <ip_range> }
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+-		int amazon_vm_group_rules( const char * publickeyfile,
+-								   const char * privatekeyfile,
+-								   const char * groupname,
+-								   StringList & returnStatus,
+-								   char* & error_code );
+-		
+-		// 10. Add group rule
+-		// AMAZON_COMMAND_VM_ADD_GROUP_RULE <req_id> <publickeyfile> <privatekeyfile> <groupname> <protocol> <start_port> <end_port> <ip_range>
+-		// <ip_range> is optional one. When empty, will be replaced by "", but not "NULL"
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+-		int amazon_vm_add_group_rule( const char * publickeyfile,
+-								   	  const char * privatekeyfile,
+-								   	  const char * groupname,
+-								   	  const char * protocol,
+-								   	  const char * start_port,
+-								   	  const char * end_port,
+-								   	  const char * ip_range,
+-								   	  char* & error_code );
+-		
+-		// 11. Delete group rule 
+-		// AMAZON_COMMAND_VM_DEL_GROUP_RULE <req_id> <publickeyfile> <privatekeyfile> <groupname> <protocol> <start_port> <end_port> <ip_range>
+-		// <ip_range> is optional one. When empty, will be replaced by "", but not "NULL"
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+-		int amazon_vm_del_group_rule( const char * publickeyfile,
+-								   	  const char * privatekeyfile,
+-								   	  const char * groupname,
+-								   	  const char * protocol,
+-								   	  const char * start_port,
+-								   	  const char * end_port,
+-								   	  const char * ip_range,
+-								   	  char* & error_code );		
+-#endif
+-		
+-		// 12. Ping
+-		// we also need to define a ping function, which will be used by amazon_resource
+ 		int amazon_ping( const char * service_url,
+ 						 const char * publickeyfile,
+ 						 const char * privatekeyfile );
+ 		
+-		//**************************************************************//
+-		
+-		/* Phase II work for Amazon jobs (S3 Part)
+-		**
+-		** When clients use Condor to submit amazon EC2 jobs, Condor should have the following
+-		** abilities:
+-		** 1. if the client doesn't mention SSH key, Condor should create a temporary one for it
+-		** 2. if the client doesn't provide a security group, Condor should create a temporary one for it
+-		** 3. if the VM image file hasn't been uploaded into S3, Condor should do this job
+-		**
+-		** SSH Keypair:
+-		** 		When a SSH keypair is created, two things will be created, one is the string to identify
+-		** this keypair, the other the file where the keypair is saved. Both the client and Amazon Server
+-		** will save a independent copy of this keypair (this is why it is called keypair). When we destory
+-		** the keypair, the elimination work on Amazon should be automatical. But in local host, we should 
+-		** remove the string and the corresponding keypair file manually. Don't forget to delete the keypair
+-		** file!
+-		** 
+-		** Below are the steps Condor should do when submitting Amazon EC2 jobs:
+-		**
+-		** Start Scenario:
+-		** 1. if client doesn't assign a security group, Condor should create a temporary one
+-		** 2. if client doesn't assign a SSH keypair, Condor should create a temporary one
+-		** 3. if needed, upload/register VM image files to S3
+-		** 4. if needed, fill/register security group
+-		** 5. start VM
+-		** 6. calling status or status_all, if not done, try to restart VM again
+-		** 
+-		** Fail Scenario:
+-		** 1. if the VM image files are uploaded/registered by Condor, degister/remove them
+-		** 2. remove security group, if security group is temporary, delete this security group
+-		** 3. if SSH keypair is created by Condor, deregister/delete it and don't forget to delete
+-		**    temporary keypair file.
+-		** 
+-		** Recovery Scenario:
+-		** 1. if VM id is valid, goto status
+-		** 2. else if (security group in jobad and ec2)
+-		**         status all
+-		**         if (job with security group)
+-		**                 save VM id
+-		**                 goto status 
+-		**         goto fail scenario
+-		*/ 
+-		
+-		// 13. Create and register SSH Keypair
+-		// AMAZON_COMMAND_VM_CREATE_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <keyname> <outputfile>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+ 		int amazon_vm_create_keypair( const char * service_url,
+ 									  const char * publickeyfile,
+ 								   	  const char * privatekeyfile,
+@@ -862,188 +661,86 @@ class GahpClient : public Service {
+ 								   	  const char * outputfile,
+ 								   	  char* & error_code );
+ 		
+-		// 14. Deregister and destory SSH Keypair
+-		// AMAZON_COMMAND_VM_DESTORY_KEYPAIR <req_id> <publickeyfile> <privatekeyfile> <keyname>
+-		// Note: If the keypair is a temporary one, remember to delete the output file
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+ 		int amazon_vm_destroy_keypair( const char * service_url,
+ 									   const char * publickeyfile,
+ 								   	   const char * privatekeyfile,
+ 								   	   const char * keyname,
+ 								   	   char* & error_code );
+ 								   	   
+-#if 0
+-		// 15. List all existing SSH Keypair name
+-		// AMAZON_COMMAND_VM_KEYPAIR_NAMES <req_id> <publickeyfile> <privatekeyfile>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0 <keypair_name> <keypair_name> <keypair_name> ...
+-		//		seq_id 1 
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_keypair_names( const char * publickeyfile,
+-									 const char * privatekeyfile,
+-									 StringList & keypair_names,
+-									 char* & error_code );
+-												 
+-		// 16. List all S3 Bucket names
+-		// AMAZON_COMMAND_S3_ALL_BUCKETS <req_id> <publickeyfile> <privatekeyfile>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0 <bucket_name> <bucket_name> <bucket_name> ...
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_all_buckets( const char * publickeyfile,
+-									  const char * privatekeyfile,
+-									  StringList & bucket_names,
+-									  char* & error_code );
+-		
+-		// 17. Create Bucket in S3
+-		// AMAZON_COMMAND_S3_CREATE_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_create_bucket( const char * publickeyfile,
+-									    const char * privatekeyfile,
+-									    const char * bucketname,
+-									    char* & error_code );
+-		
+-		// 18. Delete Bucket in S3
+-		// AMAZON_COMMAND_S3_DELETE_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_delete_bucket( const char * publickeyfile,
+-									    const char * privatekeyfile,
+-									    const char * bucketname,
+-									    char* & error_code );
+-		
+-		// 19. List all entries in a given Bucket
+-		// AMAZON_COMMAND_S3_LIST_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname> 
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0 <entry_name> <entry_name> <entry_name> ...
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_list_bucket( const char * publickeyfile,
+-									  const char * privatekeyfile,
+-									  const char * bucketname,
+-									  StringList & entry_names,
+-									  char* & error_code );
+-									    
+-		// 20. Upload file into S3
+-		// AMAZON_COMMAND_S3_UPLOAD_FILE <req_id> <publickeyfile> <privatekeyfile> <filename> <bucketname> <keyname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_upload_file( const char * publickeyfile,
+-									  const char * privatekeyfile,
+-									  const char * filename,
+-									  const char * bucketname,
+-									  const char * keyname,
+-									  char* & error_code );
+-		
+-		// 21. Download file from S3 to a local file
+-		// AMAZON_COMMAND_S3_DOWNLOAD_FILE <req_id> <publickeyfile> <privatekeyfile> <bucketname> <keyname> <outputname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_download_file( const char * publickeyfile,
+-									    const char * privatekeyfile,
+-									    const char * bucketname,
+-									    const char * keyname,
+-									    const char * outputname,
+-									    char* & error_code );
+-		
+-		// 22. Delete file from S3
+-		// AMAZON_COMMAND_S3_DELETE_FILE <req_id> <publickeyfile> <privatekeyfile> <bucketname> <keyname> 
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_delete_file( const char * publickeyfile,
+-									  const char * privatekeyfile,
+-									  const char * keyname,
+-									  const char * bucketname,
+-									  char* & error_code );
+-									    
+-		// 23. Register EC2 Image
+-		// AMAZON_COMMAND_VM_REGISTER_IMAGE <req_id> <publickeyfile> <privatekeyfile> <imagename>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0 ami_id
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_register_image( const char* publickeyfile,
+-									  const char* privatekeyfile,
+-									  const char* imagename,
+-									  char * & ami_id,
+-									  char* & error_code );
+-									  
+-		// 24. Deregister EC2 Image
+-		// AMAZON_COMMAND_VM_DEREGISTER_IMAGE <req_id> <publickeyfile> <privatekeyfile> <ami_id>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_deregister_image( const char* publickeyfile,
+-										const char* privatekeyfile,
+-										const char* ami_id,
+-										char* & error_code );
+-										
+-		// 25. Upload files in a directory to the S3
+-		// AMAZON_COMMAND_S3_UPLOAD_DIR <req_id> <publickeyfile> <privatekeyfile> <dirname> <bucketname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_upload_dir( const char* publickeyfile,
+-									 const char* privatekeyfile,
+-									 const char* dirname,
+-									 const char* bucketname,
+-									 char* & error_code );		
+-		
+-		// 26. download all files in a bucket to the local disk
+-		// AMAZON_COMMAND_S3_DOWNLOAD_BUCKET <req_id> <publickeyfile> <privatekeyfile> <bucketname> <localdirname>
+-		// return: success/failed
+-		// Should look like:
+-		//		seq_id 0
+-		//		seq_id 1
+-		//		seq_id 1 <error_code> <error_string>
+-		int amazon_vm_s3_download_bucket( const char* publickeyfile,
+-										  const char* privatekeyfile,
+-										  const char* bucketname,
+-										  const char* localdirname,
+-										  char* & error_code );
+-#endif
+-		
+-		// 27. check all the running VM instances and their corresponding keypair name								  
+-		// AMAZON_COMMAND_VM_KEYPAIR_ALL <req_id> <publickeyfile> <privatekeyfile>
+-		// return: success/failed + <instance_id> <keypair_name> <instance_id> <keypair_name> ...
+-		// Should look like:
+-		//		seq_id 0 <instance_id> <keypair> <instance_id> <keypair> ... 
+-		//		seq_id 1 <error_code> <error_string>
+-		//		seq_id 1
+ 		int amazon_vm_vm_keypair_all( const char * service_url,
+ 									  const char* publickeyfile,
+ 									  const char* privatekeyfile,
+ 									  StringList & returnStatus,
+ 								  	  char* & error_code );
+-			
++
++		int ec2_vm_start( const char * service_url,
++						  const char * publickeyfile,
++						  const char * privatekeyfile,
++						  const char * ami_id,
++						  const char * keypair,
++						  const char * user_data,
++						  const char * user_data_file,
++						  const char * instance_type,
++						  StringList & groupnames,
++						  char* & instance_id,
++						  char* & error_code );
++
++		int ec2_vm_stop( const char * service_url,
++						 const char * publickeyfile,
++						 const char * privatekeyfile,
++						 const char * instance_id,
++						 char* & error_code );
++
++		int ec2_vm_status( const char * service_url,
++							  const char * publickeyfile,
++							  const char * privatekeyfile,
++							  const char * instance_id,
++							  StringList & returnStatus,
++							  char* & error_code );
++
++		int ec2_ping( const char * service_url,
++					  const char * publickeyfile,
++					  const char * privatekeyfile );
++
++		int ec2_vm_create_keypair( const char * service_url,
++								   const char * publickeyfile,
++								   const char * privatekeyfile,
++								   const char * keyname,
++								   const char * outputfile,
++								   char* & error_code );
++
++		int ec2_vm_destroy_keypair( const char * service_url,
++									const char * publickeyfile,
++									const char * privatekeyfile,
++									const char * keyname,
++									char* & error_code );
++
++		int ec2_vm_vm_keypair_all( const char * service_url,
++								   const char * publickeyfile,
++								   const char * privatekeyfile,
++								   StringList & returnStatus,
++								   char* & error_code );
++
++        /**
++         * Used to associate an elastic ip with a running instance
++         */
++        int ec2_associate_address(const char * service_url,
++                                  const char * publickeyfile,
++                                  const char * privatekeyfile,
++                                  const char * instance_id, 
++                                  const char * elastic_ip,
++                                  StringList & returnStatus,
++                                  char* & error_code );
++        /**
++         * Used to release an elastic ip from an instance
++         * leaving around in case we ever need this. 
++         * shutdown causes automatic disassociation
++        int ec2_disassociate_address( const char * service_url,
++                                      const char * publickeyfile,
++                                      const char * privatekeyfile,
++                                      const char * elastic_ip,
++                                      StringList & returnStatus,
++                                      char* & error_code ); */
+ 
+ 		int
+ 		dcloud_submit( const char *service_url,
+diff --git a/src/condor_gridmanager/gridmanager.cpp b/src/condor_gridmanager/gridmanager.cpp
+index 2df0bf0..bfeabf5 100644
+--- a/src/condor_gridmanager/gridmanager.cpp
++++ b/src/condor_gridmanager/gridmanager.cpp
+@@ -44,6 +44,7 @@
+ #include "condor_version.h"
+ 
+ #include "amazonjob.h"
++#include "ec2job.h"
+ #include "dcloudjob.h"
+ 
+ #if !defined(WIN32)
+@@ -357,6 +358,14 @@ Init()
+ 	jobTypes.Append( new_type );
+ 	
+ 	new_type = new JobType;
++	new_type->Name = strdup( "EC2" );
++	new_type->InitFunc = EC2JobInit;
++	new_type->ReconfigFunc = EC2JobReconfig;
++	new_type->AdMatchFunc = EC2JobAdMatch;
++	new_type->CreateFunc = EC2JobCreate;
++	jobTypes.Append( new_type );
++	
++	new_type = new JobType;
+ 	new_type->Name = strdup( "Deltacloud" );
+ 	new_type->InitFunc = DCloudJobInit;
+ 	new_type->ReconfigFunc = DCloudJobReconfig;
+diff --git a/src/condor_gridmanager/proxymanager.cpp b/src/condor_gridmanager/proxymanager.cpp
+index 30a16cb..7ef8425 100644
+--- a/src/condor_gridmanager/proxymanager.cpp
++++ b/src/condor_gridmanager/proxymanager.cpp
+@@ -177,6 +177,7 @@ AcquireProxy( const ClassAd *job_ad, std::string &error,
+ 	ProxySubject *proxy_subject = NULL;
+ 	char *subject_name = NULL;
+ 	char *fqan = NULL;
++	char *email = NULL;
+ 	std::string proxy_path;
+ 	std::string owner;
+ 	char *param_str = NULL;
+@@ -199,6 +200,7 @@ AcquireProxy( const ClassAd *job_ad, std::string &error,
+ 		// Special handling for "use best proxy"
+ 		job_ad->LookupString( ATTR_X509_USER_PROXY_FQAN, &fqan );
+ 		job_ad->LookupString( ATTR_X509_USER_PROXY_SUBJECT, &subject_name );
++		job_ad->LookupString( ATTR_X509_USER_PROXY_SUBJECT, &email );
+ 		if ( subject_name ) {
+ 			if ( fqan == NULL ) {
+ 				fqan = strdup( subject_name );
+@@ -211,6 +213,10 @@ AcquireProxy( const ClassAd *job_ad, std::string &error,
+ 				// create a new ProxySubject and fill it out
+ 				proxy_subject = new ProxySubject;
+ 				proxy_subject->subject_name = strdup( subject_name );
++				if (email)
++					proxy_subject->email = strdup( email );
++				else
++					proxy_subject->email = NULL;
+ 				proxy_subject->fqan = strdup( fqan );
+ 				proxy_subject->has_voms_attrs = has_voms_attrs;
+ 
+@@ -246,6 +252,8 @@ AcquireProxy( const ClassAd *job_ad, std::string &error,
+ 				}
+ 			}
+ 			free( subject_name );
++			if ( email )
++				free( email );
+ 			free( fqan );
+ 			return proxy;
+ 
+@@ -540,6 +548,8 @@ ReleaseProxy( Proxy *proxy, TimerHandlercpp func_ptr, Service *data )
+ 
+ 			SubjectsByName.remove( HashKey(proxy_subject->fqan) );
+ 			free( proxy_subject->subject_name );
++			if ( proxy_subject->email )
++				free( proxy_subject->email );
+ 			free( proxy_subject->fqan );
+ 			delete proxy_subject;
+ 		}
+diff --git a/src/condor_gridmanager/proxymanager.h b/src/condor_gridmanager/proxymanager.h
+index 2172d54..374178c 100644
+--- a/src/condor_gridmanager/proxymanager.h
++++ b/src/condor_gridmanager/proxymanager.h
+@@ -78,6 +78,7 @@ struct Proxy {
+ struct ProxySubject {
+ 	char *fqan;
+ 	char *subject_name;
++	char *email;
+ 	bool has_voms_attrs;
+ 	Proxy *master_proxy;
+ 	List<Proxy> proxies;
+diff --git a/src/condor_includes/condor_ast.h b/src/condor_includes/condor_ast.h
+deleted file mode 100644
+index 1d1c623..0000000
+--- a/src/condor_includes/condor_ast.h
++++ /dev/null
+@@ -1,522 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// ast.h
+-//
+-// Interface definition for the Abstract Syntax Tree (AST) module. This module
+-// has an interface to the ClassAd module. It provides the following methods:
+-//
+-//     int EvalTree(ClassAdList* list, EvalResult* result)
+-//     int EvalTree(ClassAd* classad,  EvalResult* result)
+-//
+-//         EvalTree() evaluates an expression tree either in a classad or in a
+-//         classad list. The result of the evaluation and the type of the result
+-//         is put into "result".
+-//
+-//     ExprTree* MinTree(ClassAdList* list)
+-//
+-//         If the result of the expression tree in a classad list is true, a new
+-//         expression tree which is the "minimum" part of the original
+-//         expression tree that contributed to the result of the evaluation is
+-//         returned.
+-//
+-//     void Diff(ClassAdList* list, VarTypeTable* table)
+-//
+-//         Diff() "subtracts" the resources required by the expression from
+-//         "list". "table" provides information on whether a variable is a range
+-//         type variable or a fixed-value type variable.
+-//
+-//     void AnalTree(FILE* f, AttrListList* list)
+-//
+-//         AnalTree() prints out parts of an expression which can not be
+-//         satisfied in "list". It also attempts to provide some alternatives
+-//         for these unsatisfiable parts in "list".
+-//
+-//     void SumTree(FILE* f, AttrListList* list)
+-//
+-//         SumTree() prints out parts of an expression which can not be
+-//         satisfied in any of the AttrLists in "list". It also attempts to
+-//         provide some alternatives for these unsatisfiable parts in the
+-//         AttrLists in "list". "table" provides statistical information about
+-//         the AttrLists in "list".
+-//
+-//******************************************************************************
+-
+-#ifndef _AST_H_
+-#define _AST_H_
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#include "condor_exprtype.h"
+-#include "condor_astbase.h"
+-
+-class ClassAd;
+-
+-/* This helper function calls expr->EvalTree( source, target, result )
+- * This function is meant to ease the transition to new ClassAds,
+- * whose ExprTree doesn't have EvalTree().
+- */
+-int EvalExprTree( ExprTree *expr, const AttrList *source, const AttrList *target,
+-				  EvalResult *result );
+-
+-/* This helper function unparses the given ExprTree and returns a
+- * pointer to the resulting string. The string is valid until the next
+- * call of this function.
+- * This function is meant to ease the transition to new ClassAds,
+- * whose ExprTree doesn't have PrintToStr() or PrintToNewStr().
+- */
+-const char *ExprTreeToString( ExprTree *expr );
+-
+-////////////////////////////////////////////////////////////////////////////////
+-// Class EvalResult is passed to ExprTree::EvalTree() to buffer the result of
+-// the evaluation. The result can be integer, floating point, string, boolean,
+-// null or error type. The type field specifies the type of the result.
+-////////////////////////////////////////////////////////////////////////////////
+-class EvalResult
+-{
+-    public :
+-
+-    EvalResult();
+-  	~EvalResult();
+-
+-		/// copy constructor
+-	EvalResult(const EvalResult & copyfrom);
+-		/// assignment operator
+-	EvalResult & operator=(const EvalResult & rhs);
+-
+-	void fPrintResult(FILE *); // for debugging
+-
+-		/// convert to LX_STRING
+-		/// if value is ERROR or UNDEFINED, do not convert unless force=true
+-	void toString(bool force=false);
+-
+-   	union
+-    	{
+-   	    int i;
+-   	    float f;
+-   	    char* s;
+-        };
+-  	LexemeType type;
+-
+-	bool debug;
+-
+-	private :
+-	void deepcopy(const EvalResult & copyfrom);
+-};
+-
+-class Variable : public VariableBase
+-{
+-	public :
+-  
+-		Variable(char*a_name) : VariableBase(a_name) {}
+-		virtual int         CalcPrintToStr(void);
+-		virtual void        PrintToStr(char*);
+-		virtual ExprTree*     DeepCopy(void) const;
+-
+-	protected:
+-
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*);
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-		virtual int         _EvalTreeRecursive(const char *name, const AttrList*, const AttrList*, EvalResult*, bool);
+-		virtual int         _EvalTreeSimple(const char *name, const AttrList*, const AttrList*, EvalResult*, bool);
+-};
+-
+-class Integer : public IntegerBase
+-{
+-    public :
+-
+-  	Integer(int i) : IntegerBase(i) {}
+-
+-	virtual	int	    operator >(ExprTree&);
+-	virtual	int	    operator >=(ExprTree&);
+-	virtual	int	    operator <(ExprTree&);
+-	virtual	int	    operator <=(ExprTree&);
+- 
+-	virtual int     CalcPrintToStr(void);
+-    virtual void    PrintToStr(char*);
+-	virtual ExprTree*  DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int     _EvalTree(const AttrList*, EvalResult*);
+-    virtual int     _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-
+-class Float: public FloatBase
+-{
+-    public :
+-
+-  	Float(float f) : FloatBase(f) {}
+-
+-	virtual	int	    operator >(ExprTree&);
+-	virtual	int	    operator >=(ExprTree&);
+-	virtual	int	    operator <(ExprTree&);
+-	virtual	int	    operator <=(ExprTree&);
+-	virtual int     CalcPrintToStr(void);
+-    virtual void    PrintToStr(char*);
+-	virtual ExprTree*  DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int     _EvalTree(const AttrList*, EvalResult*);
+-    virtual int     _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-
+-class String : public StringBase
+-{
+-    public :
+-
+-  	String(char* s) : StringBase(s) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree*     DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int         _EvalTree(const AttrList*, EvalResult*);
+-    virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-
+-class ISOTime : public ISOTimeBase
+-{
+-    public :
+-
+-  	ISOTime(char* s) : ISOTimeBase(s) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree*     DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int         _EvalTree(const AttrList*, EvalResult*);
+-    virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-class ClassadBoolean : public BooleanBase
+-{
+-    public :
+-
+-  	ClassadBoolean(int b) : BooleanBase(b) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree*   DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int         _EvalTree(const AttrList*, EvalResult*);
+-    virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-
+-class Undefined : public UndefinedBase
+-{
+-    public :
+-
+-	Undefined() : UndefinedBase() {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree*   DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int         _EvalTree(const AttrList*, EvalResult*);
+-    virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-class Error : public ErrorBase
+-{
+-    public :
+-
+-	Error() : ErrorBase() {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree*   DeepCopy(void) const;
+-
+-	protected:
+-
+-  	virtual int         _EvalTree(const AttrList*, EvalResult*);
+-    virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-};
+-
+-class BinaryOp: public BinaryOpBase
+-{
+-    public :
+-};
+-
+-class AddOp: public AddOpBase
+-{
+-    public :
+-  	AddOp(ExprTree* l, ExprTree* r) : AddOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class SubOp: public SubOpBase
+-{
+-    public :
+-  	SubOp(ExprTree* l, ExprTree* r) : SubOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class MultOp: public MultOpBase
+-{
+-    public :
+-  	MultOp(ExprTree* l, ExprTree* r) : MultOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class DivOp: public DivOpBase
+-{
+-    public :
+-  	DivOp(ExprTree* l, ExprTree* r) : DivOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class MetaEqOp: public MetaEqOpBase
+-{
+-    public :
+-  	MetaEqOp(ExprTree* l, ExprTree* r) : MetaEqOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class MetaNeqOp: public MetaNeqOpBase
+-{
+-    public :
+-  	MetaNeqOp(ExprTree* l, ExprTree* r) : MetaNeqOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-class EqOp: public EqOpBase
+-{
+-    public :
+-  	EqOp(ExprTree* l, ExprTree* r) : EqOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class NeqOp: public NeqOpBase
+-{
+-    public :
+-  	NeqOp(ExprTree* l, ExprTree* r) : NeqOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class GtOp: public GtOpBase
+-{
+-    public :
+-  	GtOp(ExprTree* l, ExprTree* r) : GtOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class GeOp: public GeOpBase
+-{
+-    public :
+-  	GeOp(ExprTree* l, ExprTree* r) : GeOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class LtOp: public LtOpBase
+-{
+-    public :
+-  	LtOp(ExprTree* l, ExprTree* r) : LtOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class LeOp: public LeOpBase
+-{
+-    public :
+-  	LeOp(ExprTree* l, ExprTree* r) : LeOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-class AndOp: public AndOpBase
+-{
+-    public :
+-  	AndOp(ExprTree* l, ExprTree* r) : AndOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-
+-class OrOp : public OrOpBase
+-{
+-    public :
+-  	OrOp(ExprTree* l, ExprTree* r) : OrOpBase(l, r) {}
+-    virtual void        PrintToStr(char*);
+-	virtual int         CalcPrintToStr(void);
+-	virtual ExprTree    *DeepCopy(void) const;
+-};
+-
+-class AssignOp: public AssignOpBase
+-{
+-    public :
+-  	AssignOp(ExprTree* l, ExprTree* r) : AssignOpBase(l, r) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-	friend		    class AttrList;
+-};
+-
+-class Function: public FunctionBase
+-{
+-    public:
+-	Function(char*a_name) : FunctionBase(a_name) {}
+-	virtual int         CalcPrintToStr(void);
+-    virtual void        PrintToStr(char*);
+-	virtual ExprTree    *DeepCopy(void) const;
+-
+-  	virtual int     _EvalTree(const AttrList*, EvalResult*);
+-    virtual int     _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-
+-	int EvaluateArgumentToString(ExprTree *arg, const AttrList *attrlist1, 	
+-						const AttrList *attrlist2, EvalResult *result) const;
+-
+-	int FunctionScript(int number_of_arguments, EvalResult *arguments, 
+-					   EvalResult *result);
+-#ifdef HAVE_DLOPEN
+-	int FunctionSharedLibrary(int number_of_arguments, EvalResult *arguments, 
+-					   EvalResult *result);
+-#endif
+-	int FunctionGetTime(int number_of_arguments, EvalResult *arguments, 
+-						EvalResult *result);
+-	int FunctionTime(int number_of_arguments, EvalResult *arguments, 
+-						EvalResult *result);
+-	int FunctionInterval(int number_of_arguments, EvalResult *arguments, 
+-						EvalResult *result);
+-    int FunctionRandom(int number_of_arguments, EvalResult *arguments, 
+-						EvalResult *result);
+-	int FunctionIsUndefined(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIsError(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIsString(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIsInteger(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIsReal(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIsBoolean(int number_of_args,	EvalResult *arguments,
+-						EvalResult *result);
+-	int FunctionIfThenElse(const AttrList *attrlist1,
+-						const AttrList *attrlist2, EvalResult *result);
+-    int FunctionClassadDebugFunction(int number_of_args, EvalResult *evaluated_args,
+-						EvalResult *result);
+-	int FunctionString(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionReal(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionInt(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionFloor(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionRound(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionCeiling(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStrcat(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionSubstr(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStrcmp(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStricmp(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionToUpper(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionToLower(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionSize(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistSize(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistSum(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistAvg(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistMin(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistMax(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistMember(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistIMember(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionStringlistRegexpMember(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionRegexp(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionRegexps(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-	int FunctionFormatTime(int number_of_args, EvalResult *evaluated_args, 
+-						EvalResult *result);
+-
+-	int FunctionEval(AttrList const *attrlist1, AttrList const *attrlist2,
+-					 int number_of_args, EvalResult *evaluated_args,
+-					 EvalResult *result);
+-};
+-
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _AST_H_ */
+diff --git a/src/condor_includes/condor_astbase.h b/src/condor_includes/condor_astbase.h
+deleted file mode 100644
+index 34cdea9..0000000
+--- a/src/condor_includes/condor_astbase.h
++++ /dev/null
+@@ -1,454 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// astbase.h
+-//
+-// Interface definition for the basic Abstract Syntax Tree (AST). There
+-// is no interface between this module and the classad module. The following
+-// operators are defined:
+-//
+-//     AddOpBase	+	Float and Integer
+-//     SubOpBase	-	Float and Integer
+-//     MultOpBase	*	Float and Integer
+-//     DivOpBase	/	Float and Integer
+-//     EqOpBase		==	Float, Integer, ClassadBoolean(TRUE/FALSE), and String
+-//     NeqOpBase	!=	Float, Integer, ClassadBoolean(TRUE/FALSE), and String
+-//     GtOpBase		>	Float, Integer
+-//     GeOpBase		>=	Float, Integer
+-//     LtOpBase		<	Float, Integer
+-//     LeOpBase		<=	Float, Integer
+-//     AndOpBase	&&	ClassadBoolean
+-//     OrOpBase		||	ClassadBoolean
+-//     AssignOpBase	=	Expression (left hand side must be a variable)
+-//
+-// The following methods are difined or inherited by all the classes defined in
+-// this module:
+-//
+-//     LexemeType MyType()
+-//         Return the lexeme type of the node from which this method is called.
+-//         The types are defined in "type.h".
+-//
+-//     ExprTree* LArg()
+-//         Return the left argument if the node from which this method is
+-//         called is a binary operator; NULL otherwise.
+-//
+-//     ExprTree* RArg()
+-//         Return the right argument or NULL.
+-//
+-//     void Display()
+-//         Display the expression on stdout.
+-//
+-//     operator ==(ExprTree& tree)
+-//     operator >(ExprTree& tree)
+-//     operator >=(ExprTree& tree)
+-//     operator <(ExprTree& tree)
+-//     operator <=(ExprTree& tree)
+-//         The comparison operators.
+-//
+-//******************************************************************************
+-
+-#ifndef _ASTBASE_H_
+-#define _ASTBASE_H_
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#include "condor_exprtype.h"
+-class StringList;
+-template <class Item> class List; // forward declaration
+-
+-class StringSpace;
+-
+-class AttrList;
+-class EvalResult;
+-class MyString;
+-
+-class ExprTree
+-{
+-    public :
+-
+-		ExprTree();
+-		virtual ~ExprTree();
+-		virtual int	    	operator ==(ExprTree&);
+-		virtual int	    	operator >(ExprTree&);
+-		virtual int	    	operator >=(ExprTree&);
+-		virtual int	    	operator <(ExprTree&);
+-		virtual int	    	operator <=(ExprTree&);
+-
+-        LexemeType			MyType() { return type; }
+-		virtual ExprTree*   LArg()   { return NULL; }
+-		virtual ExprTree*   RArg()   { return NULL; }
+-		virtual ExprTree*   DeepCopy(void) const = 0;
+-		ExprTree*           Copy() const { return DeepCopy(); }
+-        virtual void        Display();    // display the expression
+-		virtual int         CalcPrintToStr(void) {return 0;}
+-		virtual void        PrintToNewStr(char **str);
+-		virtual void        PrintToStr(char*) {} // print the expr to a string
+-		virtual void        PrintToStr(MyString &);
+-
+-		int         		EvalTree(const AttrList*, EvalResult*);
+-		int         		EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-		virtual void        GetReferences(const AttrList *base_attrlist,
+-										  StringList &internal_references,
+-										  StringList &external_references) const;
+-
+-		char                unit;         // unit of the expression
+-
+-		bool                invisible;    // true for MyType, MyTargetType
+-
+-    protected :
+-		virtual void        CopyBaseExprTree(class ExprTree *const recipient) const;
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-		LexemeType	    	type;         // lexeme type of the node
+-		bool				evalFlag;	  // to check for circular evaluation
+-
+-		static StringSpace  *string_space;
+-		static int          string_space_references;
+-
+-};
+-
+-class VariableBase : public ExprTree
+-{
+-    public :
+-  
+-	  	VariableBase(char*);
+-	    virtual ~VariableBase();
+-
+-		virtual int	    operator ==(ExprTree&);
+-
+-		virtual void	Display();
+-		char*	const	Name() const { return name; }
+-		virtual void    GetReferences(const AttrList *base_attrlist,
+-									  StringList &internal_references,
+-									  StringList &external_references) const;
+-
+-		friend	class	ExprTree;
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-        int                 stringSpaceIndex;
+-  		char*               name;
+-};
+-
+-class IntegerBase : public ExprTree
+-{
+-    public :
+-
+-  		IntegerBase(int);
+-
+-		virtual int	    operator ==(ExprTree&);
+-		virtual int	    operator >(ExprTree&);
+-		virtual int	    operator >=(ExprTree&);
+-		virtual int	    operator <(ExprTree&);
+-		virtual int	    operator <=(ExprTree&);
+-
+-		virtual void	Display();
+-		int		    	Value();
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-  		int	 	    value;
+-};
+-
+-class FloatBase : public ExprTree
+-{
+-    public :
+-
+-  	FloatBase(float);
+-
+-	virtual int	    operator ==(ExprTree&);
+-	virtual int	    operator >(ExprTree&);
+-	virtual int	    operator >=(ExprTree&);
+-	virtual int	    operator <(ExprTree&);
+-	virtual int	    operator <=(ExprTree&);
+-	
+-	virtual void    Display();
+-	float		    Value();
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-  	float	 	    value;
+-};
+-
+-class StringBase : public ExprTree
+-{
+-    public :
+-
+-	StringBase(char*);
+-	virtual ~StringBase();
+-
+-	virtual int	    operator ==(ExprTree&);
+-
+-	virtual void	Display();
+-	const	char*	Value();
+-
+-	friend	class	ExprTree;
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-        int                 stringSpaceIndex;
+-		char*           value;
+-};
+-
+-class ISOTimeBase : public ExprTree
+-{
+-    public :
+-
+-	ISOTimeBase(char*);
+-	virtual ~ISOTimeBase();
+-
+-	virtual int	    operator ==(ExprTree&);
+-
+-	virtual void	Display();
+-	const	char*	Value();
+-
+-	friend	class	ExprTree;
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-        int                 stringSpaceIndex;
+-		char                *time;
+-};
+-
+-class BooleanBase : public ExprTree
+-{
+-    public :
+-	  
+-  	BooleanBase(int);
+-	virtual int	    operator ==(ExprTree&);
+-
+-	virtual void        Display();
+-	int                 Value();
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-
+-   	int                 value;
+-};
+-
+-
+-class UndefinedBase : public ExprTree
+-{
+-    public :
+-
+-  	UndefinedBase();
+-	virtual void        Display();
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-};
+-
+-class ErrorBase : public ExprTree
+-{
+-    public :
+-
+-  	ErrorBase();
+-
+-	virtual void        Display();
+-
+-    protected :
+-		virtual int         _EvalTree(const class AttrList*, EvalResult*) = 0;
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*) = 0;
+-};
+-
+-class BinaryOpBase : public ExprTree
+-{
+-    public :
+-
+-		virtual ~BinaryOpBase();
+-		virtual int		      operator ==(ExprTree&);
+-		
+-		virtual ExprTree*     LArg()   { return lArg; }
+-		virtual ExprTree*     RArg()   { return rArg; }
+-
+-		virtual void            GetReferences(const AttrList *base_attrlist,
+-											  StringList &internal_references,
+-											  StringList &external_references) const;
+-		friend  class         ExprTree;
+-		friend	class	      AttrList;
+-		friend	class	      AggOp;
+-
+-    protected :
+-		virtual int         _EvalTree(const AttrList*, EvalResult*);
+-		virtual int         _EvalTree(const AttrList*, const AttrList*, EvalResult*);
+-
+-		ExprTree* 	      lArg;
+-        ExprTree* 	      rArg;
+-};
+-
+-class AddOpBase : public BinaryOpBase
+-{
+-    public :
+-  	AddOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class SubOpBase : public BinaryOpBase
+-{
+-    public :
+-  	SubOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class MultOpBase : public BinaryOpBase
+-{
+-    public :
+-  	MultOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class DivOpBase : public BinaryOpBase
+-{
+-    public :
+-  	DivOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class MetaEqOpBase : public BinaryOpBase
+-{
+-    public :
+-  	MetaEqOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class MetaNeqOpBase : public BinaryOpBase
+-{
+-    public :
+-  	MetaNeqOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class EqOpBase : public BinaryOpBase
+-{
+-    public :
+-  	EqOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class NeqOpBase : public BinaryOpBase
+-{
+-    public :
+-  	NeqOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class GtOpBase : public BinaryOpBase
+-{
+-    public :
+-  	GtOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class GeOpBase : public BinaryOpBase
+-{
+-    public :
+-  	GeOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class LtOpBase : public BinaryOpBase
+-{
+-    public :
+-  	LtOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class LeOpBase : public BinaryOpBase
+-{
+-    public :
+-  	LeOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class AndOpBase : public BinaryOpBase
+-{
+-    public :
+-  	AndOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class OrOpBase : public BinaryOpBase
+-{
+-    public :
+-  	OrOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-};
+-
+-class AssignOpBase : public BinaryOpBase
+-{
+-    public :
+-  	AssignOpBase(ExprTree*, ExprTree*);
+-  	virtual void        Display();
+-	virtual void        GetReferences(const AttrList *base_attlrlist,
+-									  StringList &internal_references,
+-									  StringList &external_references) const;
+-};
+-
+-class FunctionBase : public ExprTree
+-{
+-    public :
+-
+-		FunctionBase(char *);
+-		virtual         ~FunctionBase();
+-		virtual int	    operator==(ExprTree&);
+-		
+-		virtual void    GetReferences(const AttrList *base_attrlist,
+-									  StringList &internal_references,
+-									  StringList &external_references) const;
+-		friend  class   ExprTree;
+-		friend	class	AttrList;
+-
+-		void AppendArgument(ExprTree *argument);
+-		
+-		void EvaluateArgument(ExprTree *arg, const AttrList *attrlist1, 
+-			const AttrList *attrlist2, EvalResult *result) const;
+-
+-    protected :
+-
+-		List<ExprTree>     *arguments;
+-
+-        int                 stringSpaceIndex;
+-  		char*               name;
+-};
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _ASTBASE_H_ */
+diff --git a/src/condor_includes/condor_attributes.h b/src/condor_includes/condor_attributes.h
+index a03d626..44cb635 100644
+--- a/src/condor_includes/condor_attributes.h
++++ b/src/condor_includes/condor_attributes.h
+@@ -152,6 +152,8 @@ extern const char * const  ATTR_FILE_READ_COUNT;
+ extern const char * const  ATTR_FILE_READ_BYTES;
+ extern const char * const  ATTR_FILE_WRITE_COUNT;
+ extern const char * const  ATTR_FILE_WRITE_BYTES;
++extern const char * const  ATTR_BLOCK_READ_KBYTES;
++extern const char * const  ATTR_BLOCK_WRITE_KBYTES;
+ extern const char * const  ATTR_FILE_SEEK_COUNT;
+ extern const char * const  ATTR_FLOCKED_JOBS;
+ extern const char * const  ATTR_FLAVOR;
+@@ -170,6 +172,7 @@ extern const char * const  ATTR_GLOBUS_XML;
+ extern const char * const  ATTR_X509_USER_PROXY;
+ extern const char * const  ATTR_X509_USER_PROXY_EXPIRATION;
+ extern const char * const  ATTR_X509_USER_PROXY_SUBJECT;
++extern const char * const  ATTR_X509_USER_PROXY_EMAIL;
+ extern const char * const  ATTR_X509_USER_PROXY_VONAME;
+ extern const char * const  ATTR_X509_USER_PROXY_FIRST_FQAN;
+ extern const char * const  ATTR_X509_USER_PROXY_FQAN;
+@@ -240,6 +243,7 @@ extern const char * const  ATTR_JOB_ACTION;
+ extern const char * const  ATTR_JOB_ARGUMENTS1;
+ extern const char * const  ATTR_JOB_ARGUMENTS2;
+ extern const char * const  ATTR_JOB_CMD;
++extern const char * const  ATTR_STACK_SIZE;
+ extern const char * const  ATTR_JOB_CMD_HASH;
+ extern const char * const  ATTR_JOB_CMD_MD5;
+ extern const char * const  ATTR_ORIG_JOB_CMD;
+@@ -286,6 +290,10 @@ extern const char * const  ATTR_JOB_OUTPUT;
+ extern const char * const  ATTR_JOB_OUTPUT_ORIG;
+ extern const char * const  ATTR_JOB_OUTPUT_SIZE;
+ extern const char * const  ATTR_JOB_PID;
++extern const char * const  ATTR_PRE_JOB_PRIO1;
++extern const char * const  ATTR_PRE_JOB_PRIO2;
++extern const char * const  ATTR_POST_JOB_PRIO1;
++extern const char * const  ATTR_POST_JOB_PRIO2;
+ extern const char * const  ATTR_JOB_PRIO;
+ extern const char * const  ATTR_JOB_COMMITTED_TIME;
+ extern const char * const  ATTR_JOB_LANGUAGE;
+@@ -362,6 +370,8 @@ extern const char * const  ATTR_MAX_HOSTS;
+ extern const char * const  ATTR_MAX_JOB_RETIREMENT_TIME;
+ extern const char * const  ATTR_MAX_JOBS_RUNNING;
+ extern const char * const  ATTR_MEMORY;
++extern const char * const  ATTR_DETECTED_MEMORY;
++extern const char * const  ATTR_DETECTED_CPUS;
+ extern const char * const  ATTR_MIN_HOSTS;
+ extern const char * const  ATTR_MIPS;
+ extern const char * const  ATTR_MPI_IS_MASTER;
+@@ -530,6 +540,27 @@ extern const char * const  ATTR_TOTAL_LOCAL_RUNNING_JOBS;
+ extern const char * const  ATTR_TOTAL_LOCAL_IDLE_JOBS;
+ extern const char * const  ATTR_TOTAL_SCHEDULER_RUNNING_JOBS;
+ extern const char * const  ATTR_TOTAL_SCHEDULER_IDLE_JOBS;
++extern const char * const  ATTR_JOBS_SUBMITTED_CUMULATIVE;
++extern const char * const  ATTR_JOBS_STARTED_CUMULATIVE;
++extern const char * const  ATTR_JOBS_EXITED_CUMULATIVE;
++extern const char * const  ATTR_JOBS_COMPLETED_CUMULATIVE;
++extern const char * const  ATTR_SHADOW_EXCEPTIONS_CUMULATIVE;
++extern const char * const  ATTR_MEAN_TIME_TO_START_CUMULATIVE;
++extern const char * const  ATTR_SUM_TIME_TO_START_CUMULATIVE;
++extern const char * const  ATTR_MEAN_RUNNING_TIME_CUMULATIVE;
++extern const char * const  ATTR_SUM_RUNNING_TIME_CUMULATIVE;
++extern const char * const  ATTR_EXIT_CODE_CUMULATIVE;
++extern const char * const  ATTR_JOBS_SUBMITTED;
++extern const char * const  ATTR_JOBS_STARTED;
++extern const char * const  ATTR_JOB_START_RATE;
++extern const char * const  ATTR_JOB_SUBMISSION_RATE;
++extern const char * const  ATTR_JOBS_COMPLETED;
++extern const char * const  ATTR_JOB_COMPLETION_RATE;
++extern const char * const  ATTR_JOBS_EXITED;
++extern const char * const  ATTR_SHADOW_EXCEPTIONS;
++extern const char * const  ATTR_MEAN_TIME_TO_START;
++extern const char * const  ATTR_MEAN_RUNNING_TIME;
++extern const char * const  ATTR_EXIT_CODE;
+ extern const char * const  ATTR_TOTAL_SLOTS;
+ extern const char * const  ATTR_TOTAL_TIME_IN_CYCLE;
+ extern const char * const  ATTR_TOTAL_TIME_BACKFILL_BUSY;
+@@ -545,6 +576,8 @@ extern const char * const  ATTR_TOTAL_TIME_PREEMPTING_KILLING;
+ extern const char * const  ATTR_TOTAL_TIME_PREEMPTING_VACATING;
+ extern const char * const  ATTR_TOTAL_TIME_UNCLAIMED_BENCHMARKING;
+ extern const char * const  ATTR_TOTAL_TIME_UNCLAIMED_IDLE;
++extern const char * const  ATTR_WINDOWED_STAT_WIDTH;
++
+ // Deprecated (cruft) -- use: ATTR_TOTAL_SLOTS;
+ extern const char * const  ATTR_TOTAL_VIRTUAL_MACHINES;
+ extern const char * const  ATTR_TOTAL_VIRTUAL_MEMORY;
+@@ -758,6 +791,20 @@ extern const char * const ATTR_AMAZON_REMOTE_VM_NAME;
+ extern const char * const ATTR_AMAZON_INSTANCE_TYPE;
+ //************* End of changes for Amamzon Jobs *****************//
+ 
++//************* Added for EC2 Jobs ***************************//
++extern const char * const ATTR_EC2_ACCESS_KEY_ID;
++extern const char * const ATTR_EC2_SECRET_ACCESS_KEY;
++extern const char * const ATTR_EC2_AMI_ID;
++extern const char * const ATTR_EC2_KEY_PAIR_FILE;
++extern const char * const ATTR_EC2_SECURITY_GROUPS;
++extern const char * const ATTR_EC2_USER_DATA;
++extern const char * const ATTR_EC2_USER_DATA_FILE;
++extern const char * const ATTR_EC2_REMOTE_VM_NAME;
++extern const char * const ATTR_EC2_INSTANCE_TYPE;
++extern const char * const ATTR_EC2_INSTANCE_NAME;
++extern const char * const ATTR_EC2_ELASTIC_IP;
++//************* End of changes for EC2 Jobs *****************//
++
+ 
+ extern const char * const ATTR_REQUEST_CPUS;
+ extern const char * const ATTR_REQUEST_MEMORY;
+@@ -834,6 +881,8 @@ extern const char * const ATTR_HASH_NAME;
+ extern const char * const ATTR_AUTHENTICATED_IDENTITY;
+ extern const char * const ATTR_DELEGATE_JOB_GSI_CREDENTIALS_LIFETIME;
+ 
++extern const char * const ATTR_DOTNET_VERSIONS;
++
+ extern const char * const ATTR_TRANSFER_QUEUE_NUM_UPLOADING;
+ extern const char * const ATTR_TRANSFER_QUEUE_NUM_DOWNLOADING;
+ extern const char * const ATTR_TRANSFER_QUEUE_MAX_UPLOADING;
+diff --git a/src/condor_includes/condor_attrlist.h b/src/condor_includes/condor_attrlist.h
+deleted file mode 100644
+index af35a6f..0000000
+--- a/src/condor_includes/condor_attrlist.h
++++ /dev/null
+@@ -1,381 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// attrlist.h
+-//
+-// Definition of AttrList classes and AttrListList class.
+-//
+-//******************************************************************************
+-
+-#ifndef _ATTRLIST_H
+-#define _ATTRLIST_H
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#include "condor_exprtype.h"
+-#include "condor_astbase.h"
+-
+-// Forward definition of things
+-class Stream;
+-class MyString;
+-
+-#define		ATTRLIST_MAX_EXPRESSION		10240
+-
+-// Ugly hack for the schedd
+-void AttrList_setPublishServerTime( bool );
+-
+-template <class Key, class Value> class HashTable; // forward declaration
+-class YourString;
+-
+-enum							// various AttrLists
+-{
+-    ATTRLISTENTITY,
+-    ATTRLISTREP
+-};
+-enum {AGG_INSERT, AGG_REMOVE};	// operations on aggregate classes
+-
+-class AttrListElem
+-{
+-    public :
+-
+-        AttrListElem(ExprTree*);			// constructor
+-        AttrListElem(AttrListElem&);		// copy constructor
+-        ~AttrListElem() 
+-			{
+-				if (tree != NULL) {
+-				   	delete tree; 
+-					tree = NULL;
+-				}
+-			}
+-
+-		bool IsDirty(void)            { return dirty;              }
+-		void SetDirty(bool new_dirty) { dirty = new_dirty; return; }
+-
+-        friend class AttrList;
+-        friend class ClassAd;
+-        friend class AttrListList;
+-  
+-    private :
+-
+-        ExprTree*		tree;	// the tree pointed to by this element
+-	    bool			dirty;	// has this element been changed?
+-		char*			name;	// the name of the tree
+-        class AttrListElem*	next;	// next element in the list
+-};
+-
+-class AttrListAbstract
+-{
+-    public :
+-
+-		int		Type() { return type; }		// type of the AttrList
+-
+-		friend	class		AttrList;
+-		friend	class		AttrListList;
+-		friend	class		ClassAd;
+-		friend	class		ClassAdList;
+-
+-    protected :
+-
+-		AttrListAbstract(int);
+-		virtual ~AttrListAbstract() {}
+-
+-		int					type;		// type of this AttrList
+-		class AttrListList*	inList;		// I'm in this AttrList list
+-		class AttrListAbstract*	next;		// next AttrList in the list
+-		class AttrListAbstract*	prev;		// previous AttrList in the list
+-};
+-
+-class AttrListRep: public AttrListAbstract
+-{
+-    public:
+-
+-        AttrListRep(AttrList*, AttrListList*);	// constructor
+-
+-		const AttrList* GetOrigAttrList() { return attrList; }
+-
+-		friend	class		AttrList;
+-		friend	class		AttrListList;
+-
+-    private:
+-
+-        AttrList*		attrList;		// the original AttrList 
+-        AttrListRep*	nextRep;		// next copy of original AttrList 
+-};
+-
+-class AttrList : public AttrListAbstract
+-{
+-    public :
+-	    void ChainToAd( AttrList * );
+-		void Unchain( void );
+-		AttrList *GetChainedParentAd();
+-        void ChainCollapse();
+-
+-		// ctors/dtor
+-		AttrList();							// No associated AttrList list
+-        AttrList(AttrListList*);			// Associated with AttrList list
+-        AttrList(FILE*,char*,int&,int&,int&);// Constructor, read from file.
+-        AttrList(AttrList&);				// copy constructor
+-        virtual ~AttrList();				// destructor
+-
+-		AttrList& operator=(const AttrList& other);
+-
+-		// insert expressions into the ad
+-        int        	Insert(const char*, 
+-							bool check_for_dups=true);	// insert at the tail
+-
+-        int        	Insert(const char*,
+-						   ExprTree*, 
+-							bool check_for_dups=true);	// insert at the tail
+-
+- private:
+-        int        	Insert(ExprTree*, 
+-							bool check_for_dups=true);	// insert at the tail
+-
+- public:
+-		int			InsertOrUpdate(const char *expr) { return Insert(expr); }
+-
+-		// The Assign() functions are equivalent to Insert("variable = value"),
+-		// with string values getting wrapped in quotes.  Strings that happen
+-		// to contain quotes are handled correctly, as an added plus.
+-		// AssignExpr() is equivalent to Insert("variable = value") without
+-		// the value being wrapped in quotes.
+-		int AssignExpr(char const *variable,char const *value);
+-		int Assign(char const *variable, MyString const &value);
+-		int Assign(char const *variable,char const *value);
+-		int Assign(char const *variable,int value);
+-		int Assign(char const *variable,unsigned int value);
+-		int Assign(char const *variable,long value);
+-		int Assign(char const *variable,unsigned long value);
+-		int Assign(char const *variable,float value);
+-		int Assign(char const *variable,double value);
+-		int Assign(char const *variable,bool value);
+-
+-			// Copy value of source_attr in source_ad to target_attr
+-			// in this ad.  If source_ad is NULL, it defaults to this ad.
+-			// If source_attr is undefined, target_attr is deleted, if
+-			// it exists.
+-		void CopyAttribute(char const *target_attr, char const *source_attr, AttrList *source_ad=NULL );
+-
+-			// Copy value of source_attr in source_ad to an attribute
+-			// of the same name in this ad.  Shortcut for
+-			// CopyAttribute(target_attr,target_attr,source_ad).
+-		void CopyAttribute(char const *target_attr, AttrList *source_ad );
+-
+-			// Escape double quotes in a value so that it can be
+-			// safely turned into a ClassAd string by putting double
+-			// quotes around it.  This function does _not_ add the
+-			// surrounding double quotes.
+-			// Returns the escaped string.
+-		static char const * EscapeStringValue(char const *val,MyString &buf);
+-
+-		// Make an expression invisible when serializing the ClassAd.
+-		// This (hopefully temporary hack) is to prevent the special
+-		// attributes MyType and MyTargetType from being printed
+-		// multiple times, once from the hard-coded value, and once
+-		// from the attrlist itself.
+-		// Returns the old invisibility state.  If the attribute doesn't
+-		// exist, it returns the new invisibility state specified by
+-		// the caller, so a caller wishing to restore state can
+-		// optimize away the second call if desired, since this
+-		// function does nothing when the attribute does not exist.
+-		bool SetInvisible(char const *name,bool make_invisible=true);
+-
+-		// Returns invisibility state of the specified attribute.
+-		// (Always returns false if the attribute does not exist.)
+-		bool GetInvisible(char const *name);
+-
+-		// Returns true if given attribute is generally known to
+-		// contain data which is private to the user.  Currently,
+-		// this is just a hard-coded list global list of attribute
+-		// names.
+-		static bool ClassAdAttributeIsPrivate( char const *name );
+-
+-		// Calls SetInvisible() for each attribute that is generally
+-		// known to contain private data.  Invisible attributes are
+-		// excluded when serializing the ClassAd.
+-		void SetPrivateAttributesInvisible(bool make_invisible);
+-
+-		// deletion of expressions	
+-        int			Delete(const char*); 	// delete the expr with the name
+-
+-		// Set or clear the dirty flag for each expression.
+-		void        SetDirtyFlag(const char *name, bool dirty);
+-		void        GetDirtyFlag(const char *name, bool *exists, bool *dirty);
+-		void		ClearAllDirtyFlags();
+-
+-		// for iteration through expressions
+-		void		ResetExpr() { this->ptrExpr = exprList; this->ptrExprInChain = false; }
+- private:
+-		ExprTree*	NextExpr();					// next unvisited expression
+-		ExprTree*   NextDirtyExpr();
+- public:
+-		bool NextExpr( const char *&name, ExprTree *&value );
+-		bool NextDirtyExpr( const char *&name, ExprTree *&value );
+-
+-		// for iteration through names (i.e., lhs of the expressions)
+-		void		ResetName() { this->ptrName = exprList; this->ptrNameInChain = false; }
+-		char*		NextName();					// next unvisited name
+-		const char* NextNameOriginal();
+-		char*       NextDirtyName();
+-
+-		// lookup values in classads  (for simple assignments)
+- private:
+-		ExprTree*   Lookup(char *) const;  		// for convenience
+-        ExprTree*	Lookup(const char*) const;	// look up an expression
+-		ExprTree*	Lookup(const ExprTree*) const;
+- public:
+-		// This next method returns the value of the attribute
+-		// (i.e. the right-hand side of the assignment)
+-		ExprTree*	LookupExpr(const char*) const;
+- private:
+-		AttrListElem *LookupElem(const char *name) const;
+- public:
+-		int         LookupString(const char *, char *) const; 
+-		int         LookupString(const char *, char *, int) const; //uses strncpy
+-		int         LookupString (const char *name, char **value) const;
+-		int         LookupString (const char *name, MyString & value) const;
+-		int         LookupTime(const char *name, char **value) const;
+-		int         LookupTime(const char *name, struct tm *time, bool *is_utc) const;
+-        int         LookupInteger(const char *, int &) const;
+-        int         LookupFloat(const char *, float &) const;
+-        int         LookupBool(const char *, int &) const;
+-        bool        LookupBool(const char *, bool &) const;
+-
+-		// evaluate values in classads
+-		int         EvalString (const char *, const class AttrList *, char *) const;
+-        int         EvalString (const char *, const class AttrList *, char **value) const;
+-        int         EvalString (const char *, const class AttrList *, MyString & value) const;
+-		int         EvalInteger (const char *, const class AttrList *, int &) const;
+-		int         EvalFloat (const char *, const class AttrList *, float &) const;
+-		int         EvalBool  (const char *, const class AttrList *, int &) const;
+-
+-		int			IsInList(AttrListList*);	// am I in this AttrList list?
+-
+-		// output functions
+-		int			fPrintExpr(FILE*, char*);	// print an expression
+-		char*		sPrintExpr(char*, unsigned int, const char*); // print expression to buffer
+-        virtual int	fPrint(FILE*,StringList *attr_white_list=NULL);				// print the AttrList to a file
+-		int         sPrint(MyString &output);   // put the AttrList in a string. 
+-		void		dPrint( int );				// dprintf to given dprintf level
+-
+-        // shipping functions
+-        int putAttrList(Stream& s);
+-		int initAttrListFromStream(Stream& s);
+-
+-		/*
+-		 * @param str The newline-delimited string of attribute assignments
+-		 * @param err_msg Optional buffer for error messages.
+-		 * @return true on success
+-		 */
+-		bool initFromString(char const *str,MyString *err_msg);
+-
+-		void Clear( void );
+-
+-			// Create a list of all ClassAd attribute references made
+-			// by the value of the specified attribute.  Note that
+-			// the attribute itself will not be listed as one of the
+-			// references--only things that it refers to.
+-		void GetReferences(const char *attribute, 
+-						   StringList &internal_references, 
+-						   StringList &external_references) const;
+-			// Create a list of all ClassAd attribute references made
+-			// by the given expression.  Returns false if the expression
+-			// could not be parsed.
+-		bool GetExprReferences(const char *expr, 
+-							   StringList &internal_references, 
+-							   StringList &external_references) const;
+-		bool IsExternalReference(const char *name, char **simplified_name) const;
+-
+-		friend	class	AttrListRep;			// access "next" 
+-		friend	class	AttrListList;			// access "UpdateAgg()"
+-		friend	class	ClassAd;
+-
+-		static bool		IsValidAttrName(const char *);
+-		static bool		IsValidAttrValue(const char *);
+-
+-    protected :
+-		AttrList *chainedAd;
+-
+-		// update an aggregate expression if the AttrList list associated with
+-		// this AttrList is changed
+-      	int				UpdateAgg(ExprTree*, int);
+-        AttrListElem*	exprList;		// my collection of expressions
+-		AttrListList*	associatedList;	// the AttrList list I'm associated with
+-		AttrListElem*	tail;			// used by Insert
+-		AttrListElem*	ptrExpr;		// used by NextExpr and NextDirtyExpr
+-		bool			ptrExprInChain;		// used by NextExpr and NextDirtyExpr
+-		AttrListElem*	ptrName;		// used by NextName and NextDirtyName
+-		bool			ptrNameInChain;		// used by NextName and NextDirtyName
+-
+-		HashTable<YourString, AttrListElem *> *hash;
+-
+-private:
+-	bool inside_insert;
+-};
+-
+-class AttrListList
+-{
+-    public:
+-    
+-        AttrListList();					// constructor
+-        AttrListList(AttrListList&);	// copy constructor
+-        virtual ~AttrListList();		// destructor
+-
+-        void 	  	Open();				// set pointer to the head of the queue
+-        void 	  	Close();			// set pointer to NULL
+-        AttrList* 	Next();				// return AttrList pointed to by "ptr"
+-        ExprTree* 	Lookup(const char*, AttrList*&);	// look up an expression
+-      	ExprTree* 	Lookup(const char*);
+-
+-      	void 	  	Insert(AttrList*);	// insert at the tail of the list
+-      	int			Delete(AttrList*); 	// delete a AttrList
+-		int Remove(AttrList* at) { return Delete(at); }
+-
+-      	void  	  	fPrintAttrListList(FILE *, bool use_xml = false, StringList *attr_white_list=NULL );// print out the list
+-      	int 	  	MyLength() { return length; } 	// length of this list
+-      	ExprTree* 	BuildAgg(char*, LexemeType);	// build aggregate expr
+-
+-      	friend	  	class		AttrList;
+-      	friend	  	class		ClassAd;
+-  
+-    protected:
+-
+-        // update aggregate expressions in associated AttrLists
+-		void				UpdateAgg(ExprTree*, int);
+-
+-        AttrListAbstract*	head;			// head of the list
+-        AttrListAbstract*	tail;			// tail of the list
+-        AttrListAbstract*	ptr;			// used by NextAttrList
+-        class AttrListList*		associatedAttrLists;	// associated AttrLists
+-        int					length;			// length of the list
+-};
+-
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _ATTRLIST_H */
+diff --git a/src/condor_includes/condor_buildtable.h b/src/condor_includes/condor_buildtable.h
+deleted file mode 100644
+index bca1c55..0000000
+--- a/src/condor_includes/condor_buildtable.h
++++ /dev/null
+@@ -1,125 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-#ifndef _BUILD_TABLE_H_
+-#define _BUILD_TABLE_H_
+-
+-#define INTRANGE   0
+-#define FLOATRANGE 1
+-#define NONRANGE   2
+-
+-#include "condor_ast.h"
+-
+-/*
+-class EntryNode {
+-
+-    public:
+-
+-        EntryNode(ExprTree *expr) { value = expr; next = NULL; }
+-        ~EntryNode() { delete value; delete next; }
+-        friend class StatEntry;
+-        void PrintMe() { value->Display(); }
+-
+-    private:
+-
+-        ExprTree *value;
+-        class EntryNode *next;
+-};
+-
+-class StatEntry {
+- public:
+-  StatEntry(char *name)
+-    { strcpy(entryName, name); entryValue = NULL; next = NULL; }
+-  ~StatEntry() { delete entryValue; delete next; }
+-  friend class StatTable;
+-  int IsEntry(char *identifier) { return !strcmp(entryName, identifier); }
+-  void AddValue(Expression *);
+-  void DelValue() { delete entryValue; entryValue = NULL; }
+-  void PrintVal();
+-  int IntVal() { return ((Integer *)(entryValue->value))->value; }
+-  float FloatVal() { return ((Float *)(entryValue->value))->value; }
+-  int noValue() { return !entryValue; }
+-  lexeme_type MyType() { return entryValue->value->MyType(); }
+- private:
+-  char entryName[100];
+-  EntryNode *entryValue;
+-  class StatEntry *next;
+-};
+-
+-class StatTable {
+- public:
+-  StatTable() { entries = NULL; numOfEntries = 0; }
+-  ~StatTable() { delete entries; }
+-  StatEntry *FindEntry(char *);
+-  StatEntry *AddEntry(char *);
+-  lexeme_type EntryType(char *entry) { return FindEntry(entry)->MyType(); }
+-  void PrintEntry(char *entry) { FindEntry(entry)->PrintVal(); }
+-  void PrintTable();
+- private:
+-  int numOfEntries;
+-  StatEntry *entries;
+-};
+-
+-*/
+-
+-enum {RANGE, VTAB_FIXED};            // used by VarTypeTable and Sel_best_mach()
+-
+-class VTableEntry {
+-
+- public:
+-
+-  VTableEntry(char *varName, int varType)
+-  {
+-    var = new char[strlen(varName) + 1];
+-    strcpy(var, varName);
+-    type = varType;
+-    next = NULL;
+-  }
+-  ~VTableEntry() { delete var; delete next; }
+-  char *MyName() { return var; }
+-  int MyType() { return type; }
+-  friend class VarTypeTable;
+-
+- private:
+-  char *var;
+-  int type;
+-  class VTableEntry *next;
+-};
+-
+-class VarTypeTable {
+-
+- public:
+-
+-  VarTypeTable() { table = NULL; }
+-  ~VarTypeTable() { delete table; }
+-  int FindType(char *);
+-  void AddEntry(char *, int);
+-  void PrintTable(FILE *);
+-
+- private:
+-
+-  VTableEntry *table;
+-};
+-
+-/*
+-void Build_table(FILE *, StatTable *);
+-*/
+-void BuildVarTypeTable(FILE *, VarTypeTable *);
+-
+-#endif
+diff --git a/src/condor_includes/condor_classad.h b/src/condor_includes/condor_classad.h
+index 0a8f4c7..a3b0f12 100644
+--- a/src/condor_includes/condor_classad.h
++++ b/src/condor_includes/condor_classad.h
+@@ -26,132 +26,11 @@
+ #ifndef _CLASSAD_H
+ #define _CLASSAD_H
+ 
+-#if !defined(WANT_OLD_CLASSADS)
+ 
+ #include "compat_classad.h"
+ #include "compat_classad_list.h"
+ #include "compat_classad_util.h"
+ using namespace compat_classad;
+ 
+-#else
+-
+-
+-#include "condor_exprtype.h"
+-#include "condor_ast.h"
+-#include "condor_attrlist.h"
+-#include "condor_parser.h"
+-
+-#define		CLASSAD_MAX_ADTYPE			50
+-
+-// Forward definition of stream
+-class Stream;
+-
+-struct AdType                   // type of a ClassAd.
+-{
+-    int		number;             // type number, internal thing.
+-    char*	name;               // type name.
+-    
+-    AdType(const char * = NULL);      // constructor.
+-    ~AdType();                  // destructor.
+-};
+-
+-
+-class ClassAd : public AttrList
+-{
+-    public :
+-
+-		ClassAd();								// No associated AttrList list
+-        ClassAd(FILE*,char*,int&,int&,int&);	// Constructor, read from file.
+-		ClassAd(const ClassAd&);				// copy constructor
+-        virtual ~ClassAd();						// destructor
+-
+-		ClassAd& operator=(const ClassAd& other);
+-
+-		// Type operations
+-        void		SetMyTypeName(const char *); /// my type name set.
+-        const char*	GetMyTypeName() const;		// my type name returned.
+-        void 		SetTargetTypeName(const char *);// target type name set.
+-        const char*	GetTargetTypeName() const;	// target type name returned.
+-        int			GetMyTypeNumber() const;			// my type number returned.
+-        int			GetTargetTypeNumber() const;		// target type number returned.
+-
+-        // shipping functions
+-        int put(Stream& s);
+-		int initFromStream(Stream& s);
+-
+-		/*
+-		 * @param str The newline-delimited string of attribute assignments
+-		 * @param err_msg Optional buffer for error messages.
+-		 * @return true on success
+-		 */
+-		bool initFromString(char const *str,MyString *err_msg=NULL);
+-
+-		// misc
+-		class ClassAd*	FindNext();
+-			// When printing as_XML, the XML headers and footers
+-			// are NOT added.  This is so you can wrap a whole set
+-			// of classads in a single header.  
+-			// Callers will want to use something like the following:
+-			//
+-			// #include "condor_xml_classads.h"
+-			// ClassAdXMLUnparser unparser;
+-			// MyString out;
+-			// unparser.AddXMLFileHeader(out);
+-			// classad.sPrint(out);
+-			// unparser.AddXMLFileFooter(out);
+-        virtual int	fPrint(FILE*);				// print the AttrList to a file
+-        int	fPrintAsXML(FILE* F);
+-		int         sPrint(MyString &output);   
+-		int         sPrintAsXML(MyString &output,StringList *attr_white_list=NULL);
+-		void		dPrint( int );				// dprintf to given dprintf level
+-
+-		void		Clear( void );				// clear out all attributes
+-
+-    private :
+-
+-		AdType*		myType;						// my type field.
+-        AdType*		targetType;					// target type field.
+-		// (sequence number is stored in attrlist)
+-
+-		// This function is called to update myType and targetType
+-		// variables.  It should be called whenever the attributes that
+-		// these variables are "bound" to may have been updated.
+-		void updateBoundVariables();
+-};
+-
+-typedef int (*SortFunctionType)(AttrList*,AttrList*,void*);
+-
+-class ClassAdList : public AttrListList
+-{
+-  public:
+-	ClassAdList() : AttrListList() {}
+-
+-	ClassAd*	Next() { return (ClassAd*)AttrListList::Next(); }
+-	void		Rewind() { AttrListList::Open(); }
+-	int			Length() { return AttrListList::MyLength(); }
+-	void		Insert(ClassAd* ca) { AttrListList::Insert((AttrList*)ca); }
+-	int			Delete(ClassAd* ca){return AttrListList::Delete((AttrList*)ca);}
+-	int			Remove(ClassAd* ca){return AttrListList::Remove((AttrList*)ca);}
+-	ClassAd*	Lookup(const char* name);
+-
+-	// User supplied function should define the "<" relation and the list
+-	// is sorted in ascending order.  User supplied function should
+-	// return a "1" if relationship is less-than, else 0.
+-	// NOTE: Sort() is _not_ thread safe!
+-	void   Sort(SortFunctionType,void* =NULL);
+-
+-	// Count ads in list that meet constraint.
+-	int         Count( ExprTree *constraint );
+-
+-  private:
+-	void	Sort(SortFunctionType,void*,AttrListAbstract*&);
+-	static int SortCompare(const void*, const void*);
+-};
+-
+-bool IsAMatch( ClassAd *ad1, ClassAd *ad2 );
+-bool IsAHalfMatch( ClassAd *ad1, ClassAd *ad2 );
+-
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+ 
+ #endif /* _CLASSAD_H */
+diff --git a/src/condor_includes/condor_classad_util.h b/src/condor_includes/condor_classad_util.h
+deleted file mode 100644
+index 5bbef83..0000000
+--- a/src/condor_includes/condor_classad_util.h
++++ /dev/null
+@@ -1,45 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-
+-#ifndef CONDOR_CLASSAD_UTIL_H
+-#define CONDOR_CLASSAD_UTIL_H
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#include "condor_classad.h"
+-#include "string_list.h"
+-
+-bool EvalBool(ClassAd *ad, const char *constraint);
+-bool EvalBool(AttrList* ad, ExprTree *tree);
+-
+-bool ClassAdsAreSame( ClassAd* ad1, ClassAd* ad2, 
+-					  StringList* ignored_attrs=NULL, bool verbose=false );
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* CONDOR_CLASSAD_UTIL_H */
+diff --git a/src/condor_includes/condor_commands.h b/src/condor_includes/condor_commands.h
+index 7aa259b..5006571 100644
+--- a/src/condor_includes/condor_commands.h
++++ b/src/condor_includes/condor_commands.h
+@@ -324,6 +324,7 @@ const int SHARED_PORT_PASS_SOCK = 76;
+ #define DC_SIGPCKPT		104	// periodic checkpoint
+ #define DC_SIGREMOVE	105
+ #define DC_SIGHOLD		106
++#define DC_SIGSTATECHANGE	107
+ 
+ /*
+ *** Daemon Core Commands and Signals
+diff --git a/src/condor_includes/condor_config.h b/src/condor_includes/condor_config.h
+index eea5cac..4f9aae6 100644
+--- a/src/condor_includes/condor_config.h
++++ b/src/condor_includes/condor_config.h
+@@ -248,10 +248,37 @@ extern "C" {
+ 
+ 
+ 
+-	int get_var( register char *value, register char **leftp,
++	/** Find next $(MACRO) or $$(MACRO) in a string
++
++	The caller is expected to concatenate *leftp, the evaluated
++	*namep, then *rightp to get the expanded setting.
++
++	- value - The null-terminated string to scan. WILL BE MODIFIED!
++
++	- leftp - OUTPUT. *leftp will be set to value+search_pos.  It
++	  will be null terminated at the $ for the first $(MACRO) found.
++
++	- namep - OUTPUT. The name of the MACRO (the bit between the
++	  parenthesis).  Pointer into value.  Null terminated at the
++	  closing parenthesis.
++
++	- rightp - OUTPUT. Everything to the right of the $(MACRO).
++	  Pointer into value.
++
++	- self - Default to null. If non-null, only macros whose name is
++	  identical to self will be expanded. (Used for the special
++	  $(DOLLAR) case?)
++
++	- getdollardollar - Defaults false. If true, scans for $$(MACRO)
++	  and $$([expression]) instead of $(MACRO)
++
++	- search_pos - 0-indexed position in value to start scanning at.
++	  Defaults to 0.
++	*/
++	int find_config_macro( register char *value, register char **leftp,
+ 		register char **namep, register char **rightp,
+ 		const char *self=NULL, bool getdollardollar=false, int search_pos=0);
+-	int get_special_var( const char *prefix, bool only_id_chars,
++	int find_special_config_macro( const char *prefix, bool only_id_chars,
+ 		register char *value, register char **leftp,
+ 		register char **namep, register char **rightp);
+ }
+@@ -283,8 +310,8 @@ BEGIN_C_DECLS
+ 	char * macro_expand ( const char *name );
+ 	void init_config ( bool );
+ 	void clear_config ( void );
+-	void set_debug_flags( const char * );
+-	void config_insert( const char*, const char* );
++	void set_debug_flags( const char * strFlags);
++	void config_insert( const char* attrName, const char* attrValue);
+ 	int  param_boolean_int( const char *name, int default_value );
+ 	int  param_boolean_int_with_default( const char* name );
+ 	int  param_boolean_int_without_default( const char* name, int default_value );
+diff --git a/src/condor_includes/condor_debug.h b/src/condor_includes/condor_debug.h
+index 742ed59..48be699 100644
+--- a/src/condor_includes/condor_debug.h
++++ b/src/condor_includes/condor_debug.h
+@@ -76,6 +76,12 @@
+ extern "C" {
+ #endif
+ 
++#if _MSC_VER >= 1400 /* VC++ 2005 version */
++#define PREFAST_NORETURN __declspec(noreturn)
++#else
++#define PREFAST_NORETURN
++#endif
++
+ extern int DebugFlags;	/* Bits to look for in dprintf */
+ extern int Termlog;		/* Are we logging to a terminal? */
+ extern int DebugShouldLockToAppend; /* Should we lock the file before each write? */
+@@ -93,7 +99,7 @@ void dprintf ( int flags, const char *fmt, ... ) CHECK_PRINTF_FORMAT(2,3);
+ void dprintf_config( const char *subsys );
+ void _condor_dprintf_va ( int flags, const char* fmt, va_list args );
+ int _condor_open_lock_file(const char *filename,int flags, mode_t perm);
+-void _EXCEPT_ ( const char *fmt, ... ) CHECK_PRINTF_FORMAT(1,2);
++void PREFAST_NORETURN _EXCEPT_ ( const char *fmt, ... ) CHECK_PRINTF_FORMAT(1,2);
+ void Suicide(void);
+ void set_debug_flags( const char *strflags );
+ void _condor_fd_panic( int line, const char *file );
+@@ -156,7 +162,7 @@ extern int	_EXCEPT_Line;			/* Line number of the exception    */
+ extern const char	*_EXCEPT_File;		/* File name of the exception      */
+ extern int	_EXCEPT_Errno;			/* errno from most recent system call */
+ extern int (*_EXCEPT_Cleanup)(int,int,const char*);	/* Function to call to clean up (or NULL) */
+-extern void _EXCEPT_(const char*, ...) CHECK_PRINTF_FORMAT(1,2);
++extern PREFAST_NORETURN void _EXCEPT_(const char*, ...) CHECK_PRINTF_FORMAT(1,2);
+ 
+ #if defined(__cplusplus)
+ }
+diff --git a/src/condor_includes/condor_exprtype.h b/src/condor_includes/condor_exprtype.h
+deleted file mode 100644
+index 59ad3b7..0000000
+--- a/src/condor_includes/condor_exprtype.h
++++ /dev/null
+@@ -1,99 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// condor_exprtype.h
+-//
+-// Cai, Weiru
+-//
+-// condor literal types.
+-//
+-//******************************************************************************
+-
+-#ifndef _EXPRTYPE_H_
+-#define _EXPRTYPE_H_
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#ifndef TRUE
+-#define TRUE  1
+-#endif
+-#ifndef FALSE 
+-#define FALSE 0
+-#endif
+-
+-#define UNKNOWNVAR -1
+-
+-typedef enum
+-{
+-  // Literals
+-  LX_VARIABLE,
+-  LX_INTEGER,
+-  LX_FLOAT,
+-  LX_STRING,
+-  LX_BOOL,
+-  LX_NULL,
+-  LX_UNDEFINED,
+-  LX_ERROR,
+-
+-  // Operators
+-  LX_ASSIGN,
+-  LX_AGGADD,
+-  LX_AGGEQ,
+-  LX_AND,
+-  LX_OR,
+-  LX_LPAREN,
+-  LX_RPAREN,
+-  LX_MACRO,
+-  LX_META_EQ,
+-  LX_META_NEQ,
+-  LX_EQ,
+-  LX_NEQ,
+-  LX_LT,
+-  LX_LE,
+-  LX_GT,
+-  LX_GE,
+-  LX_ADD,
+-  LX_SUB,
+-  LX_MULT,
+-  LX_DIV,
+-  LX_EOF,
+-
+-  LX_EXPR,
+-
+-  LX_TIME,
+-
+-  LX_FUNCTION,
+-  LX_SEMICOLON,
+-  LX_COMMA,
+-
+-  NOT_KEYWORD
+-} LexemeType;
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _EXPRTYPE_H_ */
+diff --git a/src/condor_includes/condor_parser.h b/src/condor_includes/condor_parser.h
+deleted file mode 100644
+index 62e687c..0000000
+--- a/src/condor_includes/condor_parser.h
++++ /dev/null
+@@ -1,62 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-// parser.h
+-//
+-// Parse() converts a string expression into an expression tree. If an error
+-// is encountered, the partially parsed tree is preserved and the number of
+-// characters parsed is returned; Otherwise 0 is returned.
+-//
+-//******************************************************************************
+-
+-#ifndef _PARSER_H
+-#define _PARSER_H
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#include "condor_ast.h"
+-
+-// Parse an assignment expression, i.e. variable = expression
+-// On success, 0 is returned, name is set to the attribute name and tree
+-// is set to the ExprTree of the attribute value.
+-// On failure, non-0 is returned, tree is set to NULL, and if pos is
+-// non-NULL, the location it points to is set to the position at which
+-// the error occurred.
+-int Parse(const char*s, MyString&name, ExprTree*&tree, int *pos = NULL);
+-
+-// parse an rval (i.e. anything that could appear on the rhs of an assignment)
+-// On success, 0 is returned and tree is set to the resulting ExprTree.
+-// On failure, non-0 is returned, tree is set to NULL, and if pos is
+-// non-NULL, the location it points to is set to the position at which
+-// the error occurred.
+-int ParseClassAdRvalExpr(const char*s, ExprTree*&tree, int *pos = NULL);
+-
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _PARSER_H */
+diff --git a/src/condor_includes/condor_qmgr.h b/src/condor_includes/condor_qmgr.h
+index 72ac44a..5e5012e 100644
+--- a/src/condor_includes/condor_qmgr.h
++++ b/src/condor_includes/condor_qmgr.h
+@@ -335,5 +335,15 @@ bool Reschedule();
+ 
+ int QmgmtSetEffectiveOwner(char const *owner);
+ 
++/* Call this to begin iterating over jobs in the queue that match
++   a constraint.
++   Returns 0 on success, -1 on error*/
++int GetAllJobsByConstraint_Start( char const *constraint, char const *projection);
++/* Retrieve next job matching constraint specified in call to
++   GetAllJobsByCostraint_Start().
++   Returns 0 on success, -1 on error or no more ads (sets errno on error).
++*/
++int GetAllJobsByConstraint_Next( ClassAd &ad );
++int GetJobQueuedCount();
+ 
+ #endif
+diff --git a/src/condor_includes/condor_scanner.h b/src/condor_includes/condor_scanner.h
+deleted file mode 100644
+index 13961d1..0000000
+--- a/src/condor_includes/condor_scanner.h
++++ /dev/null
+@@ -1,78 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-//******************************************************************************
+-//
+-// scanner.h
+-//
+-//******************************************************************************
+-
+-#ifndef _SCANNER_H_
+-#define _SCANNER_H_
+-
+-#if !defined(WANT_OLD_CLASSADS)
+-
+-#include "compat_classad.h"
+-#include "compat_classad_list.h"
+-#include "compat_classad_util.h"
+-using namespace compat_classad;
+-
+-#else
+-
+-
+-#define MAXVARNAME 256
+-
+-#define USE_NEW_SCANNER
+-
+-#include "condor_attrlist.h"
+-
+-class Token
+-{
+-	public:
+-
+-		Token();
+-		~Token();
+-		void		reset();
+-		union
+-		{
+-			int		intVal;
+-			float	floatVal;
+-		};
+-		LexemeType	type; 
+-		int			length;	// error position in the string for the parser
+-#ifdef USE_NEW_SCANNER
+-		char        *strVal;
+-		int         strValLength;
+-#else
+-		char		strVal[ATTRLIST_MAX_EXPRESSION];
+-#endif
+-		friend	void	Scanner(const char *&input, Token &token);
+-
+-	private:
+-
+-		int		isString;
+-
+-};
+-
+-extern	void		Scanner(const char *&, Token&);
+-
+-
+-#endif /* !defined(WANT_OLD_CLASSADS) */
+-
+-#endif /* _SCANNER_H */
+diff --git a/src/condor_includes/condor_sys_bsd.h b/src/condor_includes/condor_sys_bsd.h
+index 5c687ea..7bb0d13 100644
+--- a/src/condor_includes/condor_sys_bsd.h
++++ b/src/condor_includes/condor_sys_bsd.h
+@@ -24,10 +24,16 @@
+ #define _XOPEN_SOURCE_EXTENDED
+ #define _PROTOTYPES */
+ 
++/* This is an obselete macro, but still used in various OSes */
+ #if defined(_POSIX_SOURCE)
+ #    undef  _POSIX_SOURCE
+ #endif
+ 
++/* This is the modern hip way to do _POSIX_SOURCE, we don't want it either. */
++#if defined(_POSIX_C_SOURCE)
++#    undef  _POSIX_C_SOURCE
++#endif
++
+ #include <sys/types.h>
+ 
+ #include <unistd.h>
+diff --git a/src/condor_includes/condor_sys_nt.h b/src/condor_includes/condor_sys_nt.h
+index 676793b..ed77f9d 100644
+--- a/src/condor_includes/condor_sys_nt.h
++++ b/src/condor_includes/condor_sys_nt.h
+@@ -144,7 +144,6 @@ DLL_IMPORT_MAGIC int access(const char *, int);
+ #include "file_lock.h"
+ #include "condor_fix_assert.h"
+ 
+-#define getwd(path) (int)_getcwd(path, _POSIX_PATH_MAX)
+ #define mkdir(path,mode) (int)_mkdir(path)
+ #define S_IRWXU 0
+ #define S_IRWXG 1
+@@ -241,6 +240,18 @@ END_C_DECLS
+ 
+ #endif
+ 
++// defeat prefast warnings
++_Check_return_ inline int isspace(_In_ char ch) {
++   return isspace(static_cast<int> (static_cast<unsigned char> (ch)));
++}
++_Check_return_ inline int isalnum(_In_ char ch) {
++   return isalnum(static_cast<int> (static_cast<unsigned char> (ch)));
++}
++_Check_return_ inline int isdigit(_In_ char ch) {
++   return isdigit(static_cast<int> (static_cast<unsigned char> (ch)));
++}
++
++
+ /* Define the PRIx64 macros */
+ 
+ // If no inttypes, try to define our own
+diff --git a/src/condor_includes/condor_system.h b/src/condor_includes/condor_system.h
+index d08d6dd..e8be2c1 100644
+--- a/src/condor_includes/condor_system.h
++++ b/src/condor_includes/condor_system.h
+@@ -1,6 +1,6 @@
+ /***************************************************************
+  *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+  * University of Wisconsin-Madison, WI.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -159,7 +159,6 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
+-#include <sys/utsname.h>		
+ #include <sys/resource.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -169,15 +168,11 @@
+ #include <time.h>
+ #include <sys/time.h>
+ #include <sys/times.h>
+-#include <rpc/types.h>
+ #if !defined(Darwin) && !defined(CONDOR_FREEBSD)
+ #include <values.h>
+ #endif
+ #include <math.h>
+ #include <utime.h>
+-#if !defined(Darwin)
+-#include <sys/poll.h>
+-#endif
+ 
+ /* select() on all our platforms takes an fd_set pointer, so we can
+    just define this here for everyone.  We don't really need it
+diff --git a/src/condor_includes/config.h.cmake b/src/condor_includes/config.h.cmake
+index 28d802f..2cf68d1 100644
+--- a/src/condor_includes/config.h.cmake
++++ b/src/condor_includes/config.h.cmake
+@@ -25,14 +25,6 @@
+ /// TODO: OS VARS, may be able to ax with some smart mods
+ /// the definitions
+ /// I may be able to do away with all of this.
+-///* Define if on FreeBSD4 */
+-//#cmakedefine CONDOR_FREEBSD4
+-///* Define if on FreeBSD5 */
+-//#cmakedefine CONDOR_FREEBSD5
+-///* Define if on FreeBSD6 */
+-//#cmakedefine CONDOR_FREEBSD6
+-///* Define if on FreeBSD7 */
+-//#cmakedefine CONDOR_FREEBSD7
+ ///* Define if on OS X 10.3 */
+ //#cmakedefine Darwin_10_3
+ ///* Define if on OS X 10.4 */
+@@ -44,6 +36,28 @@
+ //////////////////////////////////////////////////
+ 
+ //////////////////////////////////////////////////
++// Sadly, some of these are still in use
++/* Define if on FreeBSD 4 */
++#cmakedefine CONDOR_FREEBSD4
++/* Define if on FreeBSD 5 */
++#cmakedefine CONDOR_FREEBSD5
++/* Define if on FreeBSD 6 */
++#cmakedefine CONDOR_FREEBSD6
++/* Define if on FreeBSD 7 */
++#cmakedefine CONDOR_FREEBSD7
++///* Define if on FreeBSD 8 */
++#cmakedefine CONDOR_FREEBSD8
++///* Define if on FreeBSD */
++#cmakedefine CONDOR_FREEBSD
++///* Define release of FreeBSD (i.e. 7.4, 8.2) */
++#cmakedefine FREEBSD_RELEASE
++///* Define major release of FreeBSD */
++#cmakedefine FREEBSD_MAJOR
++///* Define minor release of FreeBSD */
++#cmakedefine FREEBSD_MINOR
++//////////////////////////////////////////////////
++
++//////////////////////////////////////////////////
+ /// Options which may be changed if standard universe
+ /// goes away
+ ///* Define if we can do checkpointing */
+@@ -304,6 +318,9 @@
+ ///* Do we have the zlib external */
+ #cmakedefine HAVE_EXT_ZLIB
+ 
++///* Do we have the libcgroup external */
++#cmakedefine HAVE_EXT_LIBCGROUP
++
+ /* Define to 1 if you have the 'fstat64' function. (USED)*/
+ #cmakedefine HAVE_FSTAT64 1
+ 
+@@ -313,9 +330,6 @@
+ /* Define to 1 if you have the 'getpagesize' function. (USED)*/
+ #cmakedefine HAVE_GETPAGESIZE 1
+ 
+-/* Define to 1 if you have the 'getwd' function. (USED)*/
+-#cmakedefine HAVE_GETWD 1
+-
+ /* Define to 1 if you have the 'gettimeofday' function. (USED)*/
+ #cmakedefine HAVE_GETTIMEOFDAY 1
+ 
+diff --git a/src/condor_includes/globus_utils.h b/src/condor_includes/globus_utils.h
+index 9f44709..739ed92 100644
+--- a/src/condor_includes/globus_utils.h
++++ b/src/condor_includes/globus_utils.h
+@@ -251,6 +251,8 @@ int check_x509_proxy( const char *proxy_file );
+ 
+ time_t x509_proxy_expiration_time( const char *proxy_file );
+ 
++char* x509_proxy_email( const char *proxy_file);
++
+ char* x509_proxy_subject_name( const char *proxy_file);
+ 
+ char* x509_proxy_identity_name( const char *proxy_file);
+diff --git a/src/condor_includes/stream.h b/src/condor_includes/stream.h
+index fac5f1f..5d22cc2 100644
+--- a/src/condor_includes/stream.h
++++ b/src/condor_includes/stream.h
+@@ -292,7 +292,6 @@ public:
+     ///
+ 	int code_array(gid_t *&array, int &len);
+     ///
+-	int code(struct utsname &);
+ #endif // !defined(WIN32)
+ 	///
+ 	int code(condor_mode_t &);
+@@ -361,7 +360,6 @@ public:
+ 	int code(struct utimbuf *x)		{ return code(*x); }
+     ///
+ 	int code(struct rlimit *x)		{ return code(*x); }
+-	int code(struct utsname *x)		{ return code(*x); }
+ #endif // !defined(WIN32)
+ 
+ #if HAS_64BIT_STRUCTS
+diff --git a/src/condor_includes/util_lib_proto.h b/src/condor_includes/util_lib_proto.h
+index 605ff57..ebd642a 100644
+--- a/src/condor_includes/util_lib_proto.h
++++ b/src/condor_includes/util_lib_proto.h
+@@ -63,10 +63,6 @@ void _EXCEPT_ ( const char *fmt, ... ) CHECK_PRINTF_FORMAT(1,2);
+ void condor_except_should_dump_core( int flag );
+ int getdtablesize ( void );
+ 
+-#ifndef WIN32	// on WIN32, it messes with our getwd macro in condor_sys_nt.h
+-char * getwd ( char *path );
+-#endif
+-
+ char * ltrunc ( register char *str );
+ int set_machine_status ( int status );
+ int get_machine_status ( void );
+diff --git a/src/condor_io/condor_crypt.cpp b/src/condor_io/condor_crypt.cpp
+index e8f1d40..2de4883 100644
+--- a/src/condor_io/condor_crypt.cpp
++++ b/src/condor_io/condor_crypt.cpp
+@@ -75,6 +75,7 @@ unsigned char * Condor_Crypt_Base :: randomKey(int length)
+     int size = 128;
+     if( ! already_seeded ) {
+         unsigned char * buf = (unsigned char *) malloc(size);
++        ASSERT(buf);
+ 		for (int i = 0; i < size; i++) {
+ 			buf[i] = get_random_int() & 0xFF;
+ 		}
+@@ -118,6 +119,6 @@ unsigned char * Condor_Crypt_Base :: oneWayHashKey(const char * initialKey)
+ #ifdef HAVE_EXT_OPENSSL
+     return Condor_MD_MAC::computeOnce((unsigned char *)initialKey, strlen(initialKey));
+ #else 
+-    return 0;
++    return NULL;
+ #endif
+ }
+diff --git a/src/condor_io/condor_ipverify.cpp b/src/condor_io/condor_ipverify.cpp
+index aa5b0bf..7aa3d07 100644
+--- a/src/condor_io/condor_ipverify.cpp
++++ b/src/condor_io/condor_ipverify.cpp
+@@ -101,13 +101,15 @@ IpVerify::~IpVerify()
+ int
+ IpVerify::Init()
+ {
+-	char *pAllow, *pDeny, *pOldAllow, *pOldDeny, *pNewAllow = NULL, *pNewDeny = NULL;
++	char *pAllow = NULL, *pDeny = NULL, *pOldAllow = NULL, *pOldDeny = NULL,
++		*pNewAllow = NULL, *pNewDeny = NULL;
+ 	DCpermission perm;
+-	
++	const char* const ssysname = get_mySubSystem()->getName();	
++
+ 	did_init = TRUE;
+ 
+-		// Make sure that perm_mask_t is big enough to hold all possible
+-		// results of allow_mask() and deny_mask().
++	// Make sure that perm_mask_t is big enough to hold all possible
++	// results of allow_mask() and deny_mask().
+ 	ASSERT( sizeof(perm_mask_t)*8 - 2 > LAST_PERM );
+ 
+ 	// Clear the Permission Hash Table in case re-initializing
+@@ -132,52 +134,50 @@ IpVerify::Init()
+ 		}
+ 	}
+ 
+-    // This is the new stuff
++	// This is the new stuff
+ 	for ( perm=FIRST_PERM; perm < LAST_PERM; perm=NEXT_PERM(perm) ) {
+-
+ 		PermTypeEntry* pentry = new PermTypeEntry();
+ 		ASSERT( pentry );
+ 		PermTypeArray[perm] = pentry;
+-
+ 		MyString allow_param, deny_param;
+ 
+-		pNewAllow = SecMan::getSecSetting("ALLOW_%s",perm,&allow_param,
+-										  get_mySubSystem()->getName() );
+-
+-        // This is the old stuff, eventually it will be gone
+-		pOldAllow = SecMan::getSecSetting("HOSTALLOW_%s",perm,&allow_param,
+-										  get_mySubSystem()->getName() );
+-
++		dprintf(D_SECURITY,"IPVERIFY: Subsystem %s\n",ssysname);
++		dprintf(D_SECURITY,"IPVERIFY: Permission %s\n",PermString(perm));
++		if(strcmp(ssysname,"TOOL")==0 || strcmp(ssysname,"SUBMIT")==0){
++			// to avoid unneccesary DNS activity, the TOOL and SUBMIT
++			// subsystems only load the CLIENT lists, since they have no
++			// command port and don't need the other authorization lists.
++			if(strcmp(PermString(perm),"CLIENT")==0){ 
++				pNewAllow = SecMan::getSecSetting("ALLOW_%s",perm,&allow_param, ssysname );
++				pOldAllow = SecMan::getSecSetting("HOSTALLOW_%s",perm,&allow_param, ssysname );
++				pNewDeny = SecMan::getSecSetting("DENY_%s",perm,&deny_param, ssysname );
++				pOldDeny = SecMan::getSecSetting("HOSTDENY_%s",perm,&deny_param, ssysname );
++			}
++		} else {
++			pNewAllow = SecMan::getSecSetting("ALLOW_%s",perm,&allow_param, ssysname );
++			pOldAllow = SecMan::getSecSetting("HOSTALLOW_%s",perm,&allow_param, ssysname );
++			pNewDeny = SecMan::getSecSetting("DENY_%s",perm,&deny_param, ssysname );
++			pOldDeny = SecMan::getSecSetting("HOSTDENY_%s",perm,&deny_param, ssysname );
++		}
+ 		// concat the two
+ 		pAllow = merge(pNewAllow, pOldAllow);
+-
+-		pNewDeny = SecMan::getSecSetting("DENY_%s",perm,&deny_param,
+-										 get_mySubSystem()->getName() );
+-
+-		pOldDeny = SecMan::getSecSetting("HOSTDENY_%s",perm,&deny_param,
+-										 get_mySubSystem()->getName() );
+-
+ 		// concat the two
+ 		pDeny = merge(pNewDeny, pOldDeny);
+-
+ 		if( pAllow ) {
+ 			dprintf ( D_SECURITY, "IPVERIFY: allow %s: %s (from config value %s)\n", PermString(perm),pAllow,allow_param.Value());
+ 		}
+ 		if( pDeny ) {
+ 			dprintf ( D_SECURITY, "IPVERIFY: deny %s: %s (from config value %s)\n", PermString(perm),pDeny,deny_param.Value());
+ 		}
+-
+-        // Treat a "*", "*/*" for ALLOW_XXX as if it's just undefined,
+-        // because that's the optimized default, except for
+-        // CONFIG_PERM which has a different default (see below).
++		// Treat a "*", "*/*" for ALLOW_XXX as if it's just undefined,
++		// because that's the optimized default, except for
++		// CONFIG_PERM which has a different default (see below).
+ 		if( perm != CONFIG_PERM ) {
+-			if(pAllow && (!strcmp(pAllow, "*") || !strcmp(pAllow, "*/*") ) )
+-			{
++			if(pAllow && (!strcmp(pAllow, "*") || !strcmp(pAllow, "*/*"))) {
+ 				free( pAllow );
+ 				pAllow = NULL;
+ 			}
+ 		}
+-
+ 		if ( !pAllow && !pDeny ) {
+ 			if (perm == CONFIG_PERM) { 	  // deny all CONFIG requests 
+ 				pentry->behavior = USERVERIFY_DENY; // by default
+@@ -195,38 +195,44 @@ IpVerify::Init()
+ 				pentry->behavior = USERVERIFY_USE_TABLE;
+ 			}
+ 			if ( pAllow ) {
+-                fill_table( pentry, pAllow, true );
++				fill_table( pentry, pAllow, true );
+ 				free(pAllow);
+-                pAllow = NULL;
++				pAllow = NULL;
+ 			}
+ 			if ( pDeny ) {
+ 				fill_table( pentry,	pDeny, false );
+ 				free(pDeny);
+-                pDeny = NULL;
++				pDeny = NULL;
+ 			}
+ 		}
+-        if (pOldAllow) {
+-            free(pOldAllow);
+-            pOldAllow = NULL;
+-        }
+-        if (pOldDeny) {
+-            free(pOldDeny);
+-            pOldDeny = NULL;
+-        }
+-        if (pNewAllow) {
+-            free(pNewAllow);
+-            pNewAllow = NULL;
+-        }
+-        if (pNewDeny) {
+-            free(pNewDeny);
+-            pNewDeny = NULL;
+-        }
+-    
+-    }
+-
++		if (pAllow) {
++			free(pAllow);
++			pAllow = NULL;
++		}
++		if (pDeny) {
++			free(pDeny);
++			pDeny = NULL;
++		}
++		if (pOldAllow) {
++			free(pOldAllow);
++			pOldAllow = NULL;
++		}
++		if (pOldDeny) {
++			free(pOldDeny);
++			pOldDeny = NULL;
++		}
++		if (pNewAllow) {
++			free(pNewAllow);
++			pNewAllow = NULL;
++		}
++		if (pNewDeny) {
++			free(pNewDeny);
++			pNewDeny = NULL;
++		}
++	}
+ 	dprintf(D_FULLDEBUG|D_SECURITY,"Initialized the following authorization table:\n");
+-	PrintAuthTable(D_FULLDEBUG|D_SECURITY);
+-
++	if(PermHashTable)	
++		PrintAuthTable(D_FULLDEBUG|D_SECURITY);
+ 	return TRUE;
+ }
+ 
+@@ -633,7 +639,6 @@ IpVerify::Verify( DCpermission perm, const struct sockaddr_in *sin, const char *
+ 	if( !did_init ) {
+ 		Init();
+ 	}
+-
+ 	/*
+ 	 * Be Warned:  careful about parameter "sin" being NULL.  It could be, in
+ 	 * which case we should return FALSE (unless perm is ALLOW)
+diff --git a/src/condor_io/condor_secman.cpp b/src/condor_io/condor_secman.cpp
+index 54579de..207fbba 100644
+--- a/src/condor_io/condor_secman.cpp
++++ b/src/condor_io/condor_secman.cpp
+@@ -2900,7 +2900,7 @@ SecMan::CreateNonNegotiatedSecuritySession(DCpermission auth_level, char const *
+ 	unsigned char* keybuf = Condor_Crypt_Base::oneWayHashKey(private_key);
+ 	if(!keybuf) {
+ 		dprintf(D_ALWAYS,"SECMAN: failed to create non-negotiated security session %s because"
+-				"oneWayHashKey() failed.\n",sesid);
++				" oneWayHashKey() failed.\n",sesid);
+ 		return false;
+ 	}
+ 	KeyInfo *keyinfo = new KeyInfo(keybuf,keylen,crypt_protocol);
+diff --git a/src/condor_io/shared_port_client.cpp b/src/condor_io/shared_port_client.cpp
+index 05a46ff..b9f26c2 100644
+--- a/src/condor_io/shared_port_client.cpp
++++ b/src/condor_io/shared_port_client.cpp
+@@ -193,12 +193,12 @@ SharedPortClient::PassSocket(Sock *sock_to_pass,char const *shared_port_id,char
+ 		return false;
+ 	}
+ 
+-	int bufferSize = sizeof(WSAPROTOCOL_INFO) + sizeof(int);
++	int bufferSize = sizeof(protocol_info) + sizeof(int);
+ 	char *buffer = new char[bufferSize];
+ 	ASSERT( buffer );
+ 	int cmd = SHARED_PORT_PASS_SOCK;
+ 	memcpy_s(buffer, sizeof(int), &cmd, sizeof(int));
+-	memcpy_s(buffer+sizeof(int), sizeof(WSAPROTOCOL_INFO), &protocol_info, sizeof(WSAPROTOCOL_INFO));
++	memcpy_s(buffer+sizeof(int), sizeof(protocol_info), &protocol_info, sizeof(protocol_info));
+ 	BOOL write_result = WriteFile(child_pipe, buffer, bufferSize, &read_bytes, 0);
+ 
+ 	delete [] buffer;
+diff --git a/src/condor_io/stream.cpp b/src/condor_io/stream.cpp
+index 22b7391..6e9f626 100644
+--- a/src/condor_io/stream.cpp
++++ b/src/condor_io/stream.cpp
+@@ -797,29 +797,6 @@ Stream::code_array(gid_t *&array, int &len)
+ 	return TRUE;
+ }
+ 
+-int
+-Stream::code(struct utsname &n)
+-{
+-	/* Every machine has these fields */
+-
+-	STREAM_ASSERT(code_bytes_bool(n.sysname,SYS_NMLN));
+-	STREAM_ASSERT(code_bytes_bool(n.nodename,SYS_NMLN));
+-	STREAM_ASSERT(code_bytes_bool(n.release,SYS_NMLN));
+-	STREAM_ASSERT(code_bytes_bool(n.version,SYS_NMLN));
+-	STREAM_ASSERT(code_bytes_bool(n.machine,SYS_NMLN));
+-
+-	/* Other fields we just kill to zero-length strings. */
+-	
+-	#if defined(LINUX)
+-		n.domainname[0] = 0;
+-	#elif defined(HPUX)
+-		n.__idnumber[0] = 0;
+-	#endif
+-
+-	return TRUE;
+-}
+-
+-
+ #endif // !defined(WIN32)
+ 
+ 
+diff --git a/src/condor_job_router/JobRouter.h b/src/condor_job_router/JobRouter.h
+index 7de6951..243f44c 100644
+--- a/src/condor_job_router/JobRouter.h
++++ b/src/condor_job_router/JobRouter.h
+@@ -26,7 +26,6 @@
+ #include "RoutedJob.h"
+ 
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ #if HAVE_JOB_HOOKS
+diff --git a/src/condor_job_router/JobRouterHookMgr.h b/src/condor_job_router/JobRouterHookMgr.h
+index 5084e81..e061d05 100644
+--- a/src/condor_job_router/JobRouterHookMgr.h
++++ b/src/condor_job_router/JobRouterHookMgr.h
+@@ -26,7 +26,6 @@
+ #include "RoutedJob.h"
+ 
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ 
+diff --git a/src/condor_job_router/NewClassAdJobLogConsumer.cpp b/src/condor_job_router/NewClassAdJobLogConsumer.cpp
+index 9ee3728..3d2fe1c 100644
+--- a/src/condor_job_router/NewClassAdJobLogConsumer.cpp
++++ b/src/condor_job_router/NewClassAdJobLogConsumer.cpp
+@@ -27,7 +27,6 @@
+ #include <string>
+ 
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ NewClassAdJobLogConsumer::NewClassAdJobLogConsumer() : m_reader(0) { }
+diff --git a/src/condor_job_router/NewClassAdJobLogConsumer.h b/src/condor_job_router/NewClassAdJobLogConsumer.h
+index 8b0c142..d4d6d12 100644
+--- a/src/condor_job_router/NewClassAdJobLogConsumer.h
++++ b/src/condor_job_router/NewClassAdJobLogConsumer.h
+@@ -27,7 +27,6 @@
+ #include <string>
+ 
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ class NewClassAdJobLogConsumer: public ClassAdLogConsumer
+diff --git a/src/condor_job_router/RoutedJob.h b/src/condor_job_router/RoutedJob.h
+index 6cb2432..7d27709 100644
+--- a/src/condor_job_router/RoutedJob.h
++++ b/src/condor_job_router/RoutedJob.h
+@@ -23,7 +23,6 @@
+ //#include "condor_common.h"
+ 
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ class JobRoute;
+diff --git a/src/condor_job_router/VanillaToGrid.cpp b/src/condor_job_router/VanillaToGrid.cpp
+index 429c478..fd4e8bd 100644
+--- a/src/condor_job_router/VanillaToGrid.cpp
++++ b/src/condor_job_router/VanillaToGrid.cpp
+@@ -29,7 +29,6 @@
+ #include "filename_tools.h"
+ #include "string_list.h"
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ 
+diff --git a/src/condor_job_router/VanillaToGrid_main.cpp b/src/condor_job_router/VanillaToGrid_main.cpp
+index 39f812e..56d6762 100644
+--- a/src/condor_job_router/VanillaToGrid_main.cpp
++++ b/src/condor_job_router/VanillaToGrid_main.cpp
+@@ -26,7 +26,6 @@
+ #include "condor_attributes.h"
+ #include "basename.h"
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ #include <libgen.h>
+diff --git a/src/condor_job_router/set_user_from_ad.cpp b/src/condor_job_router/set_user_from_ad.cpp
+index c44f966..f332ce0 100644
+--- a/src/condor_job_router/set_user_from_ad.cpp
++++ b/src/condor_job_router/set_user_from_ad.cpp
+@@ -27,7 +27,6 @@
+ #include "classad_newold.h"
+ #include "condor_uid.h"
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ void set_user_from_ad(classad::ClassAd const &ad)
+diff --git a/src/condor_job_router/submit_job.cpp b/src/condor_job_router/submit_job.cpp
+index 6aa544c..cd82c69 100644
+--- a/src/condor_job_router/submit_job.cpp
++++ b/src/condor_job_router/submit_job.cpp
+@@ -34,7 +34,6 @@
+ #include "format_time.h"
+ #include "set_user_priv_from_ad.h"
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ #include "set_user_from_ad.h"
+ #include "file_transfer.h"
+diff --git a/src/condor_kbdd/kbdd.cpp b/src/condor_kbdd/kbdd.cpp
+index be3f10d..3b6df9d 100644
+--- a/src/condor_kbdd/kbdd.cpp
++++ b/src/condor_kbdd/kbdd.cpp
+@@ -38,7 +38,6 @@
+ #include <utmp.h>
+ #include <sys/file.h>
+ #include <netinet/in.h>
+-#include <rpc/types.h>
+ #include <X11/Xlib.h>
+ 
+ XInterface *xinter = NULL;
+@@ -53,22 +52,20 @@ DECL_SUBSYSTEM( "KBDD", SUBSYSTEM_TYPE_DAEMON );
+ bool
+ update_startd()
+ {
+-    static SafeSock ssock;
+-	static bool first_time = true;
+-	static Daemon startd( DT_STARTD );
+-	if( first_time ) {
+-		if( ! startd.locate() ) {
+-			dprintf( D_ALWAYS, "Can't locate startd, aborting (%s)\n",
+-					 startd.error() );
+-			return false;
+-		}
+-		if( !ssock.connect(startd.addr(), 0) ) {
+-			dprintf( D_ALWAYS, "Can't connect to startd at: %s, "
+-					 "aborting\n", startd.addr() );
+-			return false;
+-		}
+-		first_time = false;
++    SafeSock ssock;
++	Daemon startd( DT_STARTD );
++
++	if( ! startd.locate() ) {
++		dprintf( D_ALWAYS, "Can't locate startd, aborting (%s)\n",
++			startd.error() );
++		return false;
+ 	}
++	if( !ssock.connect(startd.addr(), 0) ) {
++		dprintf( D_ALWAYS, "Can't connect to startd at: %s, "
++			"aborting\n", startd.addr() );
++		return false;
++	}
++
+ 	if( !startd.sendCommand(X_EVENT_NOTIFICATION, &ssock, 3) ) {
+ 		dprintf( D_ALWAYS, "Can't send X_EVENT_NOTIFICATION command "
+ 				 "to startd at: %s, aborting\n", startd.addr() );
+diff --git a/src/condor_negotiator.V6/matchmaker.cpp b/src/condor_negotiator.V6/matchmaker.cpp
+index e4d3a89..bf28766 100644
+--- a/src/condor_negotiator.V6/matchmaker.cpp
++++ b/src/condor_negotiator.V6/matchmaker.cpp
+@@ -26,7 +26,7 @@
+ #include "condor_config.h"
+ #include "condor_attributes.h"
+ #include "condor_api.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "condor_query.h"
+ #include "daemon.h"
+ #include "dc_startd.h"
+@@ -1272,7 +1272,7 @@ negotiationTime ()
+ 
+                     negotiateWithGroup(untrimmed_num_startds, untrimmedSlotWeightTotal, minSlotWeight,
+                                        startdAds, claimIds, *(group->submitterAds), 
+-                                       slots, group->usage, group->name.c_str());
++                                       slots, group->name.c_str());
+                 }
+ 
+                 // Halt when we have negotiated with full deltas
+@@ -1967,7 +1967,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 					 ClassAdListDoesNotDeleteAds& startdAds,
+ 					 ClaimIdHash& claimIds, 
+ 					 ClassAdListDoesNotDeleteAds& scheddAds, 
+-					 float groupQuota, float groupusage,const char* groupAccountingName)
++					 float groupQuota, const char* groupName)
+ {
+     time_t start_time_phase3 = time(NULL);
+ 	ClassAd		*schedd;
+@@ -2006,6 +2006,18 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 	do {
+ 		spin_pie++;
+ 
++        // On the first spin of the pie we tell the negotiate function to ignore the
++        // submitterLimit w/ respect to jobs which are strictly preferred by resource 
++        // offers (via startd rank).  However, if preemption is not being considered, 
++        // we respect submitter limits on all iterations.
++        const bool ignore_submitter_limit = ((spin_pie == 1) && ConsiderPreemption);
++
++        double groupusage = (NULL != groupName) ? accountant.GetWeightedResourcesUsed(groupName) : 0.0;
++        if (!ignore_submitter_limit && (NULL != groupName) && (groupusage >= groupQuota)) {
++            // If we've met the group quota, and if we are paying attention to submitter limits, halt now
++            dprintf(D_ALWAYS, "Group %s is using its quota %g - halting negotiation\n", groupName, groupQuota);
++            break;
++        }
+ 			// invalidate the MatchList cache, because even if it is valid
+ 			// for the next user+auto_cluster being considered, we might
+ 			// have thrown out matches due to SlotWeight being too high
+@@ -2028,7 +2040,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 
+ 		calculatePieLeft(
+ 			scheddAds,
+-			groupAccountingName,
++			groupName,
+ 			groupQuota,
+ 			groupusage,
+ 			maxPrioValue,
+@@ -2056,6 +2068,11 @@ negotiateWithGroup ( int untrimmed_num_startds,
+         // "schedd" seems to be used interchangeably with "submitter" here
+ 		while( (schedd = scheddAds.Next()) )
+ 		{
++            if (!ignore_submitter_limit && (NULL != groupName) && (accountant.GetWeightedResourcesUsed(groupName) >= groupQuota)) {
++                // If we met group quota, and if we're respecting submitter limits, halt.
++                // (output message at top of outer loop above)
++                break;
++            }
+ 			// get the name of the submitter and address of the schedd-daemon it came from
+ 			if( !schedd->LookupString( ATTR_NAME, scheddName ) ||
+ 				!schedd->LookupString( ATTR_SCHEDD_IP_ADDR, scheddAddr ) )
+@@ -2100,7 +2117,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 
+ 			calculateSubmitterLimit(
+ 				scheddName.Value(),
+-				groupAccountingName,
++				groupName,
+ 				groupQuota,
+ 				groupusage,
+ 				maxPrioValue,
+@@ -2184,11 +2201,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 				if ( (submitterLimit <= 0 || pieLeft < minSlotWeight) && spin_pie > 1 ) {
+ 					result = MM_RESUME;
+ 				} else {
+-					if ( spin_pie == 1 && ConsiderPreemption ) {
+-						ignore_schedd_limit = true;
+-					} else {
+-						ignore_schedd_limit = false;
+-					}
+ 					int numMatched = 0;
+ 					startTime = time(NULL);
+ 					double limitUsed = 0.0;
+@@ -2247,7 +2259,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 		scheddAds.Close();
+ 		dprintf( D_FULLDEBUG, " resources used scheddUsed= %f\n",scheddUsed);
+ 
+-		groupusage = scheddUsed;
+ 	} while ( ( pieLeft < pieLeftOrig || scheddAds.MyLength() < scheddAdsCountOrig )
+ 			  && (scheddAds.MyLength() > 0)
+ 			  && (startdAds.MyLength() > 0) );
+@@ -2570,6 +2581,25 @@ obtainAdsFromCollector (
+ 				// CRUFT: Before 7.3.2, submitter ads had a MyType of
+ 				//   "Scheduler". The only way to tell the difference
+ 				//   was that submitter ads didn't have ATTR_NUM_USERS.
++
++            MyString subname;
++            if (!ad->LookupString(ATTR_NAME, subname)) {
++                dprintf(D_ALWAYS, "WARNING: ignoring submitter ad with no name\n");
++                continue;
++            }
++
++            int numidle=0;
++            ad->LookupInteger(ATTR_IDLE_JOBS, numidle);
++            int numrunning=0;
++            ad->LookupInteger(ATTR_RUNNING_JOBS, numrunning);
++            int requested = numrunning + numidle;
++
++            // This will avoid some wasted effort in negotiation looping
++            if (requested <= 0) {
++                dprintf(D_FULLDEBUG, "Ignoring submitter %s with no requested jobs\n", subname.Value());
++                continue;
++            }
++
+     		ad->Assign(ATTR_TOTAL_TIME_IN_CYCLE, 0);
+ 			scheddAds.Insert(ad);
+ 		}
+@@ -2600,7 +2630,6 @@ obtainAdsFromCollector (
+ void
+ Matchmaker::OptimizeMachineAdForMatchmaking(ClassAd *ad)
+ {
+-#if !defined(WANT_OLD_CLASSADS)
+ 		// The machine ad will be passed as the RIGHT ad during
+ 		// matchmaking (i.e. in the call to IsAMatch()), so
+ 		// optimize it accordingly.
+@@ -2613,13 +2642,11 @@ Matchmaker::OptimizeMachineAdForMatchmaking(ClassAd *ad)
+ 			name.Value(),
+ 				error_msg.c_str());
+ 	}
+-#endif
+ }
+ 
+ void
+ Matchmaker::OptimizeJobAdForMatchmaking(ClassAd *ad)
+ {
+-#if !defined(WANT_OLD_CLASSADS)
+ 		// The job ad will be passed as the LEFT ad during
+ 		// matchmaking (i.e. in the call to IsAMatch()), so
+ 		// optimize it accordingly.
+@@ -2634,7 +2661,6 @@ Matchmaker::OptimizeJobAdForMatchmaking(ClassAd *ad)
+ 				proc_id,
+ 				error_msg.c_str());
+ 	}
+-#endif
+ }
+ 
+ void
+@@ -2921,7 +2947,7 @@ negotiate( char const *scheddName, const ClassAd *scheddAd, double priority, dou
+ 		request.Assign(ATTR_SUBMITTER_USER_PRIO , (float)priority );  
+ 		// next insert the submitter user usage attributes into the request
+ 		request.Assign(ATTR_SUBMITTER_USER_RESOURCES_IN_USE, 
+-					   accountant.GetResourcesUsed ( scheddName ));
++					   accountant.GetWeightedResourcesUsed ( scheddName ));
+ 		float temp_groupQuota, temp_groupUsage;
+ 		bool is_group = false;
+ 		if (getGroupInfoFromUserId(scheddName,temp_groupQuota,temp_groupUsage))
+@@ -3759,9 +3785,7 @@ matchmakingProtocol (ClassAd &request, ClassAd *offer,
+ 		claim_id = "null";
+ 	}
+ 
+-#if !defined(WANT_OLD_CLASSADS)
+ 	classad::MatchClassAd::UnoptimizeAdForMatchmaking( offer );
+-#endif
+ 
+ 	savedRequirements = NULL;
+ 	length = strlen("Saved") + strlen(ATTR_REQUIREMENTS) + 2;
+@@ -4090,7 +4114,7 @@ addRemoteUserPrios( ClassAd	*ad )
+ 		prio = (float) accountant.GetPriority( remoteUser.Value() );
+ 		ad->Assign(ATTR_REMOTE_USER_PRIO, prio);
+ 		ad->Assign(ATTR_REMOTE_USER_RESOURCES_IN_USE,
+-			accountant.GetResourcesUsed( remoteUser.Value() ));
++			accountant.GetWeightedResourcesUsed( remoteUser.Value() ));
+ 		if (getGroupInfoFromUserId(remoteUser.Value(),
+ 									temp_groupQuota,temp_groupUsage))
+ 		{
+@@ -4142,7 +4166,7 @@ addRemoteUserPrios( ClassAd	*ad )
+ 			buffer.sprintf("%s%s", slot_prefix.Value(), 
+ 					ATTR_REMOTE_USER_RESOURCES_IN_USE);
+ 			ad->Assign(buffer.Value(),
+-					accountant.GetResourcesUsed(remoteUser.Value()));
++					accountant.GetWeightedResourcesUsed(remoteUser.Value()));
+ 			if (getGroupInfoFromUserId(remoteUser.Value(),
+ 										temp_groupQuota,temp_groupUsage))
+ 			{
+diff --git a/src/condor_negotiator.V6/matchmaker.h b/src/condor_negotiator.V6/matchmaker.h
+index e0d647b..2b01ff5 100644
+--- a/src/condor_negotiator.V6/matchmaker.h
++++ b/src/condor_negotiator.V6/matchmaker.h
+@@ -175,7 +175,7 @@ class Matchmaker : public Service
+ 								 double minSlotWeight,
+ 			ClassAdListDoesNotDeleteAds& startdAds, 
+ 			ClaimIdHash& claimIds, ClassAdListDoesNotDeleteAds& scheddAds, 
+-			float groupQuota=INT_MAX, float groupusage=0, const char* groupAccountingName=NULL);
++			float groupQuota=INT_MAX, const char* groupName=NULL);
+ 
+ 		
+ 		ClassAd *matchmakingAlgorithm(const char*,const char*,ClassAd&,ClassAdListDoesNotDeleteAds&,
+diff --git a/src/condor_procapi/procapi.cpp b/src/condor_procapi/procapi.cpp
+index fcb28fa..bee8e36 100644
+--- a/src/condor_procapi/procapi.cpp
++++ b/src/condor_procapi/procapi.cpp
+@@ -492,12 +492,6 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+ 		// assume success
+ 	status = PROCAPI_OK;
+ 
+-		// clear the memory of procRaw
+-	initProcInfoRaw(procRaw);
+-
+-		// set the sample time
+-	procRaw.sample_time = secsSinceEpoch();
+-
+ 	// read the entry a certain number of times since it appears that linux
+ 	// often simply does something stupid while reading.
+ 	sprintf( path, "/proc/%d/stat", pid );
+@@ -508,7 +502,10 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+ 
+ 		// in case I must restart, assume that everything is ok again...
+ 		status = PROCAPI_OK;
++		// clear the memory of procRaw
+ 		initProcInfoRaw(procRaw);
++		// set the sample time
++		procRaw.sample_time = secsSinceEpoch();
+ 
+ 		if( (fp = safe_fopen_wrapper(path, "r")) == NULL ) {
+ 			if( errno == ENOENT ) {
+diff --git a/src/condor_procd/CMakeLists.txt b/src/condor_procd/CMakeLists.txt
+index df2d726..c2e0972 100644
+--- a/src/condor_procd/CMakeLists.txt
++++ b/src/condor_procd/CMakeLists.txt
+@@ -27,7 +27,7 @@ else(WINDOWS)
+     condor_selective_glob( "proc_family_client*;proc_family_io*;local_client.*;named_pipe_reader*;named_pipe_writer*;named_pipe_util*;named_pipe_watchdog*" ProcClientElements )
+ endif(WINDOWS)
+ 
+-condor_daemon(procd "${ProcdRmvElements}" "procapi;utils;${PROCD_WIN_LINK_LIBS}" "${C_SBIN}" OFF)
++condor_daemon(procd "${ProcdRmvElements}" "procapi;utils;${PROCD_WIN_LINK_LIBS};${LIBCGROUP_FOUND}" "${C_SBIN}" OFF)
+ 
+ if (LINUX AND WANT_FULL_DEPLOYMENT)
+ 	condor_exe( procd_ctl "procd_ctl.cpp" ${C_SBIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${COREDUMPER_FOUND}" OFF)
+diff --git a/src/condor_procd/cgroup_tracker.linux.cpp b/src/condor_procd/cgroup_tracker.linux.cpp
+new file mode 100644
+index 0000000..266acff
+--- /dev/null
++++ b/src/condor_procd/cgroup_tracker.linux.cpp
+@@ -0,0 +1,134 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++
++#include "condor_common.h"
++#include "cgroup_tracker.linux.h"
++#include "proc_family_monitor.h"
++
++#if defined(HAVE_EXT_LIBCGROUP)
++CGroupTracker::CGroupTracker(ProcFamilyMonitor* pfm) :
++	ProcFamilyTracker(pfm)
++{
++}
++
++bool
++CGroupTracker::add_mapping(ProcFamily* family, const char * cgroup)
++{
++	int err = family->set_cgroup(cgroup);
++	if (!err) {
++		m_cgroup_pool[cgroup] = family;
++		return true;
++	}
++	return false;
++}
++
++bool
++CGroupTracker::remove_mapping(ProcFamily* family)
++{
++	// O(n) iteration through the map
++	std::map<std::string, ProcFamily*>::const_iterator end = m_cgroup_pool.end();
++	for (std::map<std::string, ProcFamily*>::const_iterator it = m_cgroup_pool.begin(); it != end; ++it) {
++		if (it->second == family) {
++			m_cgroup_pool.erase(it->first);
++			return true;
++		}
++	}
++	return false;
++}
++
++bool
++CGroupTracker::check_process(procInfo* pi)
++{
++	// Really, the cgroup name should be part of the procInfo
++	// However, it is a string, and would lead to lots of allocation
++	// issues in the current code.
++	// The majority of this is code from the GroupTracker.
++
++	// prepare the pathname to open: /proc/<pid>/cgroup
++	//
++	char path[32];
++	int ret = snprintf(path, 32, "/proc/%u/cgroup", pi->pid);
++	if (ret < 0) {
++		dprintf(D_ALWAYS,
++			"GroupTracker (pid = %u): snprintf error: %s (%d)\n",
++			pi->pid,
++			strerror(errno),
++			errno);
++		return false;
++        }
++	if (ret >= 32) {
++		dprintf(D_ALWAYS,
++			"GroupTracker (pid = %u): error: path buffer too small\n",
++			pi->pid);
++		return false;
++	}
++
++	// do the fopen
++	//
++	FILE* fp = safe_fopen_wrapper(path, "r");
++	if (fp == NULL) {
++		dprintf(D_ALWAYS,
++			"GroupTracker (pid = %u): fopen error: %s (%d)\n",
++			pi->pid,
++			strerror(errno),
++			errno);
++		return false;
++	}
++
++	char buffer[1024];
++	bool found_cgroup = false;
++	std::map<std::string, ProcFamily*>::const_iterator end = m_cgroup_pool.end();
++	while (fgets(buffer, 1024, fp)) {
++		// Iterate through all our keys
++		for (std::map<std::string, ProcFamily*>::const_iterator it = m_cgroup_pool.begin(); it != end; ++it) {
++			if (strstr(buffer, it->first.c_str())) {
++				m_monitor->add_member_to_family(it->second, pi, "CGROUP");
++				found_cgroup = true;
++			}
++		}
++	}
++	if (!found_cgroup) {
++		if (!feof(fp)) {
++			dprintf(D_ALWAYS,
++				"CGroupTracker (pid = %u): "
++				"error reading from status file: %s (%d)\n",
++				pi->pid,
++				strerror(errno),
++				errno);
++		}
++		fclose(fp);
++		return false;
++	}
++	fclose(fp);
++
++	// make sure we didn't get a partial line
++	//
++	int line_len = strlen(buffer);
++	if (buffer[line_len - 1] != '\n') {
++		dprintf(D_ALWAYS,
++			"GroupTracker (pid = %u): "
++			"read partial line from status file\n",
++			pi->pid);
++		return false;
++	}
++	return true;
++}
++
++#endif
+diff --git a/src/condor_procd/cgroup_tracker.linux.h b/src/condor_procd/cgroup_tracker.linux.h
+new file mode 100644
+index 0000000..aab4b52
+--- /dev/null
++++ b/src/condor_procd/cgroup_tracker.linux.h
+@@ -0,0 +1,43 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ *
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _CGROUP_TRACKER_H
++#define _CGROUP_TRACKER_H
++
++#include <map>
++#include <string>
++
++#include "proc_family_tracker.h"
++
++class CGroupTracker : public ProcFamilyTracker {
++
++public:
++
++	CGroupTracker(ProcFamilyMonitor* pfm);
++
++	bool add_mapping(ProcFamily* family, const char * cgroup);
++	bool remove_mapping(ProcFamily* family);
++	bool check_process(procInfo* pi);
++
++private:
++
++	std::map<std::string, ProcFamily*> m_cgroup_pool;
++};
++
++#endif
+diff --git a/src/condor_procd/dprintf_lite.cpp b/src/condor_procd/dprintf_lite.cpp
+index f38da26..05740bd 100644
+--- a/src/condor_procd/dprintf_lite.cpp
++++ b/src/condor_procd/dprintf_lite.cpp
+@@ -90,7 +90,7 @@ _EXCEPT_(const char* format, ...)
+ 
+ 
+ extern "C" FILE *
+-open_debug_file(char flags[])
++open_debug_file(const char flags[])
+ {
+ 	FILE		*fp;
+ 	int save_errno;
+diff --git a/src/condor_procd/gidd_alloc.cpp b/src/condor_procd/gidd_alloc.cpp
+index c421509..787cccf 100644
+--- a/src/condor_procd/gidd_alloc.cpp
++++ b/src/condor_procd/gidd_alloc.cpp
+@@ -45,7 +45,7 @@
+ char err_str[ERR_STRLEN + 1];
+ 
+ void
+-err_sprintf(char* fmt, ...)
++err_sprintf(const char* fmt, ...)
+ {
+ 	va_list ap;
+ 	va_start(ap, fmt);
+diff --git a/src/condor_procd/group_tracker.linux.cpp b/src/condor_procd/group_tracker.linux.cpp
+index 9c0a14d..f46f4ed 100644
+--- a/src/condor_procd/group_tracker.linux.cpp
++++ b/src/condor_procd/group_tracker.linux.cpp
+@@ -27,9 +27,9 @@ GroupTracker::GroupTracker(ProcFamilyMonitor* pfm,
+                            gid_t max_gid,
+ 						   bool allocating) :
+ 	ProcFamilyTracker(pfm),
+-	m_gid_pool(min_gid, max_gid, allocating),
+ 	// A GroupTracker is fixated to either be allocating or associating
+ 	// concerning the gids and process families.
++	m_gid_pool(min_gid, max_gid, allocating),
+ 	m_allocating(allocating)
+ {
+ }
+diff --git a/src/condor_procd/proc_family.cpp b/src/condor_procd/proc_family.cpp
+index b4d59e5..90c4c08 100644
+--- a/src/condor_procd/proc_family.cpp
++++ b/src/condor_procd/proc_family.cpp
+@@ -27,6 +27,27 @@
+ #include "glexec_kill.unix.h"
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++#include "libcgroup.h"
++#define MEMORY_CONTROLLER "memory"
++#define CPUACCT_CONTROLLER "cpuacct"
++#define FREEZE_CONTROLLER "freezer"
++#define BLOCK_CONTROLLER "blkio"
++
++#define FROZEN "FROZEN"
++#define THAWED "THAWED"
++
++#define BLOCK_STATS_LINE_MAX 64
++
++bool ProcFamily::m_cgroup_initialized = false;
++bool ProcFamily::m_cgroup_freezer_mounted = false;
++bool ProcFamily::m_cgroup_cpuacct_mounted = false;
++bool ProcFamily::m_cgroup_memory_mounted = false;
++bool ProcFamily::m_cgroup_block_mounted = false;
++#include <unistd.h>
++long ProcFamily::clock_tick = sysconf( _SC_CLK_TCK );
++#endif
++
+ ProcFamily::ProcFamily(ProcFamilyMonitor* monitor,
+                        pid_t              root_pid,
+                        birthday_t         root_birthday,
+@@ -45,6 +66,11 @@ ProcFamily::ProcFamily(ProcFamilyMonitor* monitor,
+ #if !defined(WIN32)
+ 	m_proxy = NULL;
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	m_cgroup_string = NULL;
++	m_cgroup = NULL;
++	m_created_cgroup = false;
++#endif
+ }
+ 
+ ProcFamily::~ProcFamily()
+@@ -70,8 +96,654 @@ ProcFamily::~ProcFamily()
+ 		free(m_proxy);
+ 	}
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	if (m_cgroup && m_created_cgroup) {
++		delete_cgroup(m_cgroup_string);
++	}
++	if (m_cgroup != NULL) {
++		cgroup_free(&m_cgroup);
++	}
++	if (m_cgroup_string != NULL) {
++		free(m_cgroup_string);
++	}
++#endif
++}
++
++#if defined(HAVE_EXT_LIBCGROUP)
++
++void
++ProcFamily::delete_cgroup(const char * cg_string)
++{
++	int err;
++
++	struct cgroup* dcg = cgroup_new_cgroup(m_cgroup_string);
++	ASSERT (dcg != NULL);
++	if ((err = cgroup_get_cgroup(dcg))) {
++		dprintf(D_PROCFAMILY,
++			"Unable to read cgroup %s for deletion (ProcFamily %u): %u %s\n",
++			cg_string, m_root_pid, err, cgroup_strerror(err));
++	}
++	else if ((err = cgroup_delete_cgroup(dcg, CGFLAG_DELETE_RECURSIVE | CGFLAG_DELETE_IGNORE_MIGRATION))) {
++		dprintf(D_ALWAYS,
++			"Unable to completely remove cgroup %s for ProcFamily %u. %u %s\n",
++			cg_string, m_root_pid, err, cgroup_strerror(err)
++			);
++	} else {
++		dprintf(D_PROCFAMILY,
++			"Deleted cgroup %s for ProcFamily %u\n",
++			cg_string, m_root_pid);
++	}
++	cgroup_free(&dcg);
+ }
+ 
++int
++ProcFamily::migrate_to_cgroup(pid_t pid)
++{
++	// Attempt to migrate a given process to a cgroup.
++	// This can be done without regards to whether the
++	// process is already in the cgroup
++
++	// We want to make sure task migration is turned on for the
++	// associated memory controller.  So, we get to look up the original cgroup.
++	//
++	// If there is no memory controller present, we skip all this and just attempt a migrate
++	int err;
++	u_int64_t orig_migrate;
++	bool changed_orig = false;
++	char * orig_cgroup_string = NULL;
++	struct cgroup * orig_cgroup;
++	struct cgroup_controller * memory_controller;
++	if (m_cgroup_memory_mounted && (err = cgroup_get_current_controller_path(pid, MEMORY_CONTROLLER, &orig_cgroup_string))) {
++		dprintf(D_PROCFAMILY,
++			"Unable to determine current memory cgroup for PID %u (ProcFamily %u): %u %s\n",
++			pid, m_root_pid, err, cgroup_strerror(err));
++		return 1;
++	}
++	// We will migrate the PID to the new cgroup even if it is in the proper memory controller cgroup
++	// It is possible for the task to be in multiple cgroups.
++	if (m_cgroup_memory_mounted && (orig_cgroup_string != NULL) && (strcmp(m_cgroup_string, orig_cgroup_string))) {
++		// Yes, there are race conditions here - can't really avoid this.
++		// Throughout this block, we can assume memory controller exists.
++		// Get original value of migrate.
++		orig_cgroup = cgroup_new_cgroup(orig_cgroup_string);
++		ASSERT (orig_cgroup != NULL);
++		if ((err = cgroup_get_cgroup(orig_cgroup))) {
++			dprintf(D_PROCFAMILY,
++				"Unable to read original cgroup %s (ProcFamily %u): %u %s\n",
++				orig_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			goto after_migrate;
++		}
++		if ((memory_controller = cgroup_get_controller(orig_cgroup, MEMORY_CONTROLLER)) == NULL) {
++			cgroup_free(&orig_cgroup);
++			goto after_migrate;
++		}
++		if ((err = cgroup_get_value_uint64(memory_controller, "memory.move_charge_at_immigrate", &orig_migrate))) {
++			if (err == ECGROUPVALUENOTEXIST) {
++				// Older kernels don't have the ability to migrate memory accounting to the new cgroup.
++				dprintf(D_PROCFAMILY,
++					"This kernel does not support memory usage migration; cgroup %s memory statistics"
++					" will be slightly incorrect (ProcFamily %u)\n",
++					m_cgroup_string, m_root_pid);
++			} else {
++				dprintf(D_PROCFAMILY,
++					"Unable to read cgroup %s memory controller settings for "
++					"migration (ProcFamily %u): %u %s\n",
++					orig_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			}
++			cgroup_free(&orig_cgroup);
++			goto after_migrate;
++		}
++		if (orig_migrate != 3) {
++			orig_cgroup = cgroup_new_cgroup(orig_cgroup_string);
++			memory_controller = cgroup_add_controller(orig_cgroup, MEMORY_CONTROLLER);
++			ASSERT (memory_controller != NULL); // Memory controller must already exist
++			cgroup_add_value_uint64(memory_controller, "memory.move_charge_at_immigrate", 3);
++			if ((err = cgroup_modify_cgroup(orig_cgroup))) {
++				// Not allowed to change settings
++				dprintf(D_ALWAYS,
++					"Unable to change cgroup %s memory controller settings for migration. "
++					"Some memory accounting will be inaccurate (ProcFamily %u): %u %s\n",
++					orig_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			} else {
++				changed_orig = true;
++			}
++		}
++		cgroup_free(&orig_cgroup);
++	}
++
++after_migrate:
++
++	orig_cgroup = NULL;
++	ASSERT (m_cgroup_string != NULL)
++	err = cgroup_attach_task_pid(m_cgroup, pid);
++	if (err) {
++		dprintf(D_PROCFAMILY,
++			"Cannot attach pid %u to cgroup %s for ProcFamily %u: %u %s\n",
++			pid, m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++	}
++
++	if (changed_orig) {
++		if ((orig_cgroup = cgroup_new_cgroup(orig_cgroup_string))) {
++			goto after_restore;
++		}
++		if (((memory_controller = cgroup_add_controller(orig_cgroup, MEMORY_CONTROLLER)) != NULL) &&
++			(!cgroup_add_value_uint64(memory_controller, "memory.move_charge_at_immigrate", orig_migrate))) {
++			cgroup_modify_cgroup(orig_cgroup);
++		}
++		cgroup_free(&orig_cgroup);
++	}
++
++after_restore:
++	if (orig_cgroup_string != NULL) {
++		free(orig_cgroup_string);
++	}
++	return err;
++}
++
++int
++ProcFamily::set_cgroup(const char * cgroup)
++{
++	int err;
++	bool has_cgroup = true, changed_cgroup = false;
++
++	if (!strcmp(cgroup, "/")) {
++		dprintf(D_ALWAYS,
++			"Cowardly refusing to monitor the root cgroup out "
++			"of security concerns.\n");
++		return 1;
++	}
++
++	// Initialize library and data structures
++	if (m_cgroup_initialized == false) {
++		dprintf(D_PROCFAMILY, "Initializing cgroup library.\n");
++		m_cgroup_freezer_mounted = true;
++		m_cgroup_memory_mounted = true;
++		m_cgroup_cpuacct_mounted = true;
++		m_cgroup_block_mounted = true;
++		cgroup_init();
++		void *handle;
++		controller_data info;
++		int ret = cgroup_get_all_controller_begin(&handle, &info);
++		while (ret == 0) {
++			if ((strcmp(info.name, MEMORY_CONTROLLER) == 0) && (info.hierarchy == 0)) {
++				dprintf(D_ALWAYS, "Cgroup controller for memory accounting is not mounted; memory accounting will be inaccurate.\n");
++				m_cgroup_memory_mounted = false;
++			} else if ((strcmp(info.name, CPUACCT_CONTROLLER) == 0) && (info.hierarchy == 0)) {
++				dprintf(D_ALWAYS, "Cgroup controller for CPU accounting is not mounted; cpu accounting will be inaccurate.\n");
++				m_cgroup_cpuacct_mounted = false;
++			} else if ((strcmp(info.name, FREEZE_CONTROLLER) == 0) && (info.hierarchy == 0)) {
++				dprintf(D_ALWAYS, "Cgroup controller for process management is not mounted; process termination will be inaccurate.\n");
++				m_cgroup_freezer_mounted = false;
++			} else if ((strcmp(info.name, BLOCK_CONTROLLER) == 0) && (info.hierarchy == 0)) {
++				dprintf(D_ALWAYS, "Cgroup controller for I/O statistics is not mounted; accounting will be inaccurate.\n");
++				m_cgroup_block_mounted = false;
++			}
++			ret = cgroup_get_all_controller_next(&handle, &info);
++		}
++		if (ret != ECGEOF) {
++			dprintf(D_ALWAYS, "Error iterating through cgroups mount information: %s\n", cgroup_strerror(ret));
++		}
++		cgroup_get_all_controller_end(&handle);
++
++	}
++
++	// Ignore this command if we've done this before.
++	if ((m_cgroup_string != NULL) && !strcmp(m_cgroup_string, cgroup)) {
++		return 0;
++	}
++
++	dprintf(D_PROCFAMILY, "Setting cgroup to %s for ProcFamily %u.\n",
++		cgroup, m_root_pid);
++
++	if (m_cgroup_string) {
++		if (m_created_cgroup)
++			delete_cgroup(m_cgroup_string);
++		m_created_cgroup = false;
++		free(m_cgroup_string);
++	}
++	if (m_cgroup)
++		cgroup_free(&m_cgroup);
++
++	size_t cgroup_len = strlen(cgroup);
++	m_cgroup_string = (char *)malloc(sizeof(char)*(cgroup_len+1));
++	strcpy(m_cgroup_string, cgroup);
++	m_cgroup = cgroup_new_cgroup(m_cgroup_string);
++	ASSERT(m_cgroup != NULL);
++
++	if (ECGROUPNOTEXIST == cgroup_get_cgroup(m_cgroup)) {
++		has_cgroup = false;
++	}
++
++	// Record if we don't have a particular subsystem, but it's not fatal.
++	// Add the controller if the cgroup didn't exist or it is not yet present.
++	if (m_cgroup_cpuacct_mounted && ((has_cgroup == false) || (cgroup_get_controller(m_cgroup, CPUACCT_CONTROLLER) == NULL))) {
++		changed_cgroup = true;
++		if (cgroup_add_controller(m_cgroup, CPUACCT_CONTROLLER) == NULL) {
++			dprintf(D_PROCFAMILY,
++				"Unable to initialize cgroup CPU accounting subsystem"
++				" for %s.\n",
++				m_cgroup_string);
++		}
++	}
++	if (m_cgroup_memory_mounted && ((has_cgroup == false) || (cgroup_get_controller(m_cgroup, MEMORY_CONTROLLER) == NULL))) {
++		changed_cgroup = true;
++		if (cgroup_add_controller(m_cgroup, MEMORY_CONTROLLER) == NULL) {
++			dprintf(D_PROCFAMILY,
++				"Unable to initialize cgroup memory accounting subsystem"
++				" for %s.\n",
++				cgroup);
++		}
++	}
++	if (m_cgroup_freezer_mounted && ((has_cgroup == false) || (cgroup_get_controller(m_cgroup, FREEZE_CONTROLLER) == NULL))) {
++		changed_cgroup = true;
++		if (cgroup_add_controller(m_cgroup, FREEZE_CONTROLLER) == NULL) {
++			dprintf(D_PROCFAMILY,
++				"Unable to initialize cgroup subsystem for killing "
++				"processes for %s.\n",
++				m_cgroup_string);
++		}
++	}
++	if (m_cgroup_block_mounted && ((has_cgroup == false) || (cgroup_get_controller(m_cgroup, BLOCK_CONTROLLER) == NULL))) {
++		changed_cgroup = true;
++		if (cgroup_add_controller(m_cgroup, BLOCK_CONTROLLER) == NULL) {
++			dprintf(D_PROCFAMILY,
++			"Unable to initialize cgroup subsystem for bloock "
++			"statistics for %s.\n",
++			m_cgroup_string);
++		}
++	}
++	// We don't consider failures fatal, as anything is better than nothing.
++	if (has_cgroup == false) {
++		if ((err = cgroup_create_cgroup(m_cgroup, 0))) {
++			dprintf(D_PROCFAMILY,
++				"Unable to create cgroup %s for ProcFamily %u."
++				"  Cgroup functionality will not work: %s\n",
++				m_cgroup_string, m_root_pid, cgroup_strerror(err));
++		} else {
++			m_created_cgroup = true;
++		}
++	} else if ((has_cgroup == true) && (changed_cgroup == true) && (err = cgroup_modify_cgroup(m_cgroup))) {
++		dprintf(D_PROCFAMILY,
++			"Unable to modify cgroup %s for ProcFamily %u."
++			"  Some cgroup functionality may not work: %u %s\n",
++			m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++	}
++
++	// Make sure hierarchical memory accounting is turned on.
++	struct cgroup_controller * mem_controller = cgroup_get_controller(m_cgroup, MEMORY_CONTROLLER);
++	if (m_cgroup_memory_mounted && m_created_cgroup && (mem_controller != NULL)) {
++		if ((err = cgroup_add_value_bool(mem_controller, "memory.use_hierarchy", true))) {
++			dprintf(D_PROCFAMILY,
++				"Unable to set hierarchical memory settings for %s (ProcFamily) %u: %u %s\n",
++				m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++		} else {
++			if ((err = cgroup_modify_cgroup(m_cgroup))) {
++				dprintf(D_PROCFAMILY,
++					"Unable to enable hierarchical memory accounting for %s "
++					"(ProcFamily %u): %u %s\n",
++					m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			}
++		}
++	}
++
++	// Now that we have a cgroup, let's move all the existing processes to it
++	ProcFamilyMember* member = m_member_list;
++	while (member != NULL) {
++		migrate_to_cgroup(member->get_proc_info()->pid);
++		member = member->m_next;
++	}
++
++	return 0;
++}
++
++int
++ProcFamily::freezer_cgroup(const char * state)
++{
++	// According to kernel docs, freezer will either succeed
++	// or return EBUSY in the errno.
++	//
++	// This function either returns 0 (success), a positive value (fatal error)
++	// or -EBUSY.
++	int err = 0;
++	struct cgroup_controller* freezer;
++	struct cgroup *cgroup = cgroup_new_cgroup(m_cgroup_string);
++	ASSERT (cgroup != NULL);
++
++	if (!m_cgroup_freezer_mounted) {
++		err = 1;
++		goto ret;
++	}
++
++	freezer = cgroup_add_controller(cgroup, FREEZE_CONTROLLER);
++	if (NULL == freezer) {
++		dprintf(D_ALWAYS,
++			"Unable to access the freezer subsystem for ProcFamily %u "
++			"for cgroup %s\n",
++			m_root_pid, m_cgroup_string);
++		err = 2;
++		goto ret;
++	}
++
++	if ((err = cgroup_add_value_string(freezer, "freezer.state", state))) {
++		dprintf(D_ALWAYS,
++			"Unable to write %s to freezer for cgroup %s (ProcFamily %u). %u %s\n",
++			state, m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++		err = 3;
++		goto ret;
++	}
++	if ((err = cgroup_modify_cgroup(cgroup))) {
++		if (ECGROUPVALUENOTEXIST == err) {
++			dprintf(D_ALWAYS,
++				"Does not appear condor_procd is allowed to freeze"
++				" cgroup %s (ProcFamily %u).\n",
++				m_cgroup_string, m_root_pid);
++		} else if ((ECGOTHER == err) && (EBUSY == cgroup_get_last_errno())) {
++			dprintf(D_ALWAYS, "Kernel was unable to freeze cgroup %s "
++				"(ProcFamily %u) due to process state; signal delivery "
++				"won't be atomic\n", m_cgroup_string, m_root_pid);
++			err = -EBUSY;
++		} else {
++			dprintf(D_ALWAYS,
++				"Unable to commit freezer change %s for cgroup %s (ProcFamily %u). %u %s\n",
++				state, m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++		}
++		err = 4;
++		goto ret;
++	}
++
++	ret:
++	cgroup_free(&cgroup);
++	return err;
++}
++
++int
++ProcFamily::spree_cgroup(int sig)
++{
++	// The general idea here is we freeze the cgroup, give the signal,
++	// then thaw everything out.  This way, signals are given in an atomic manner.
++	//
++	// Note that if the FREEZE call could be attempted, but not 100% completed, we
++	// proceed anyway.
++
++	int err = freezer_cgroup(FROZEN);
++	if ((err != 0) && (err != -EBUSY)) {
++		return err;
++	}
++
++	ASSERT (m_cgroup != NULL);
++	cgroup_get_cgroup(m_cgroup);
++
++	void **handle = (void **)malloc(sizeof(void*));
++	ASSERT (handle != NULL);
++	pid_t pid;
++	ASSERT (m_cgroup_string != NULL);
++	err = cgroup_get_task_begin(m_cgroup_string, FREEZE_CONTROLLER, handle, &pid);
++	if ((err > 0) && (err != ECGEOF))
++		handle = NULL;
++	while (err != ECGEOF) {
++		if (err > 0) {
++			dprintf(D_ALWAYS,
++				"Unable to iterate through cgroup %s (ProcFamily %u): %u %s\n",
++				m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			goto release;
++		}
++		send_signal(pid, sig);
++		err = cgroup_get_task_next(handle, &pid);
++	}
++	err = 0;
++
++	release:
++	if (handle != NULL) {
++		cgroup_get_task_end(handle);
++		free(handle);
++	}
++
++	freezer_cgroup(THAWED);
++
++	return err;
++}
++
++int
++ProcFamily::count_tasks_cgroup()
++{
++	if (!m_cgroup_cpuacct_mounted)
++		return -1;
++
++	int tasks = 0, err = 0;
++	pid_t pid;
++	void **handle = (void **)malloc(sizeof(void*));
++	ASSERT (handle != NULL)
++	*handle = NULL;
++
++	ASSERT (m_cgroup_string != NULL);
++	err = cgroup_get_task_begin(m_cgroup_string, CPUACCT_CONTROLLER, handle, &pid);
++	while (err != ECGEOF) {
++		if (err > 0) {
++			dprintf(D_PROCFAMILY,
++				"Unable to read cgroup %s memory stats (ProcFamily %u): %u %s.\n",
++				m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			break;
++		}
++		tasks ++;
++		err = cgroup_get_task_next(handle, &pid);
++	}
++	// Reset err to 0
++	if (err == ECGEOF) {
++		err = 0;
++	}
++	if (*handle) {
++		cgroup_get_task_end(handle);
++	}
++	if (handle) {
++		free(handle);
++	}
++	if (err) {
++		return -err;
++	}
++	return tasks;
++
++}
++
++bool
++inline
++_check_stat_uint64(const struct cgroup_stat stats, const char* name, u_int64_t* result){
++	u_int64_t tmp;
++	if (0 == strcmp(name, stats.name)) {
++		errno = 0;
++		tmp = (u_int64_t)strtoll(stats.value, NULL, 0);
++		if (errno == 0) {
++			*result = tmp;
++			return true;
++		} else {
++			dprintf(D_PROCFAMILY,
++				"Invalid cgroup stat %s for %s.\n",
++				stats.value, name);
++			return false;
++		}
++	}
++	return false;
++}
++
++void
++ProcFamily::update_max_image_size_cgroup()
++{
++	if (!m_cgroup_memory_mounted) {
++		return;
++	}
++
++	int err;
++	u_int64_t max_image;
++	struct cgroup *memcg;
++	struct cgroup_controller *memct;
++	if ((memcg = cgroup_new_cgroup(m_cgroup_string)) == NULL) {
++		dprintf(D_PROCFAMILY,
++			"Unable to allocate cgroup %s (ProcFamily %u).\n",
++			m_cgroup_string, m_root_pid);
++		return;
++	}
++	if ((err = cgroup_get_cgroup(memcg))) {
++		dprintf(D_PROCFAMILY,
++			"Unable to load cgroup %s (ProcFamily %u).\n",
++			m_cgroup_string, m_root_pid);
++		cgroup_free(&memcg);
++		return;
++	}
++	if ((memct = cgroup_get_controller(memcg, MEMORY_CONTROLLER)) == NULL) {
++		dprintf(D_PROCFAMILY,
++			"Unable to load memory controller for cgroup %s (ProcFamily %u).\n",
++			m_cgroup_string, m_root_pid);
++		cgroup_free(&memcg);
++		return;
++	}
++	if ((err = cgroup_get_value_uint64(memct, "memory.memsw.max_usage_in_bytes", &max_image))) {
++		dprintf(D_PROCFAMILY,
++			"Unable to load max memory usage for cgroup %s (ProcFamily %u): %u %s\n",
++			m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++		cgroup_free(&memcg);
++		return;
++	}
++	m_max_image_size = max_image/1024;
++	cgroup_free(&memcg);
++}
++
++int
++ProcFamily::aggregate_usage_cgroup_blockio(ProcFamilyUsage* usage)
++{
++
++	if (!m_cgroup_block_mounted)
++		return 1;
++
++	int ret;
++	void *handle;
++	char line_contents[BLOCK_STATS_LINE_MAX], sep[]=" ", *tok_handle, *word, *info[3];
++	char blkio_stats_name[] = "blkio.io_service_bytes";
++	short ctr;
++	long int read_bytes=0, write_bytes=0;
++	ret = cgroup_read_value_begin(BLOCK_CONTROLLER, m_cgroup_string,
++	                              blkio_stats_name, &handle, line_contents, BLOCK_STATS_LINE_MAX);
++	while (ret == 0) {
++		ctr = 0;
++		word = strtok_r(line_contents, sep, &tok_handle);
++		while (word && ctr < 3) {
++			info[ctr++] = word;
++			word = strtok_r(NULL, sep, &tok_handle);
++		}
++		if (ctr == 3) {
++			errno = 0;
++			long ctrval = strtol(info[2], NULL, 10);
++			if (errno) {
++				dprintf(D_FULLDEBUG, "Error parsing kernel value to a long: %s; %s\n",
++					 info[2], strerror(errno));
++				break;
++			}
++			if (strcmp(info[1], "Read") == 0) {
++				read_bytes += ctrval;
++			} else if (strcmp(info[1], "Write") == 0) {
++				write_bytes += ctrval;
++			}
++		}
++		ret = cgroup_read_value_next(&handle, line_contents, BLOCK_STATS_LINE_MAX);
++	}
++	if (ret != ECGEOF) {
++		dprintf(D_ALWAYS, "Internal cgroup error when retrieving block statistics: %s\n", cgroup_strerror(ret));
++		return 1;
++	}
++
++	usage->block_read_bytes = read_bytes;
++	usage->block_write_bytes = write_bytes;
++
++	return 0;
++}
++
++int
++ProcFamily::aggregate_usage_cgroup(ProcFamilyUsage* usage)
++{
++	if (!m_cgroup_memory_mounted || !m_cgroup_cpuacct_mounted) {
++		return -1;
++	}
++
++	int err;
++	struct cgroup_stat stats;
++	void **handle;
++	u_int64_t tmp = 0, image = 0;
++	bool found_rss;
++
++	// Update memory
++	handle = (void **)malloc(sizeof(void*));
++	ASSERT (handle != NULL);
++	*handle = NULL;
++
++	err = cgroup_read_stats_begin(MEMORY_CONTROLLER, m_cgroup_string, handle, &stats);
++	while (err != ECGEOF) {
++		if (err > 0) {
++			dprintf(D_PROCFAMILY,
++				"Unable to read cgroup %s memory stats (ProcFamily %u): %u %s.\n",
++				m_cgroup_string, m_root_pid, err, cgroup_strerror(err));
++			break;
++		}
++		if (_check_stat_uint64(stats, "total_rss", &tmp)) {
++			image += tmp;
++			usage->total_resident_set_size = tmp/1024;
++			found_rss = true;
++		} else if (_check_stat_uint64(stats, "total_mapped_file", &tmp)) {
++			image += tmp;
++		} else if (_check_stat_uint64(stats, "total_swap", &tmp)) {
++			image += tmp;
++		}
++		err = cgroup_read_stats_next(handle, &stats);
++	}
++	if (*handle != NULL) {
++		cgroup_read_stats_end(handle);
++	}
++	if (found_rss) {
++		usage->total_image_size = image/1024;
++	} else {
++		dprintf(D_PROCFAMILY,
++			"Unable to find all necesary memory structures for cgroup %s"
++			" (ProcFamily %u)\n",
++			m_cgroup_string, m_root_pid);
++	}
++	// The poor man's way of updating the max image size.
++	if (image > m_max_image_size) {
++		m_max_image_size = image/1024;
++	}
++	// Try updating the max size using cgroups
++	update_max_image_size_cgroup();
++
++	// Update CPU
++	*handle = NULL;
++	err = cgroup_read_stats_begin(CPUACCT_CONTROLLER, m_cgroup_string, handle, &stats);
++	while (err != ECGEOF) {
++		if (err > 0) {
++			dprintf(D_PROCFAMILY,
++				"Unable to read cgroup %s cpuacct stats (ProcFamily %u): %s.\n",
++				m_cgroup_string, m_root_pid, cgroup_strerror(err));
++			break;
++		}
++		if (_check_stat_uint64(stats, "user", &tmp)) {
++			usage->user_cpu_time = tmp/clock_tick;
++		} else if (_check_stat_uint64(stats, "system", &tmp)) {
++			usage->sys_cpu_time = tmp/clock_tick;
++		}
++		err = cgroup_read_stats_next(handle, &stats);
++	}
++	if (*handle != NULL) {
++		cgroup_read_stats_end(handle);
++	}
++	free(handle);
++
++	aggregate_usage_cgroup_blockio(usage);
++
++	// Finally, update the list of tasks
++	if ((err = count_tasks_cgroup()) < 0) {
++		return -err;
++	} else {
++		usage->num_procs = err;
++	}
++	return 0;
++}
++#endif
++
+ unsigned long
+ ProcFamily::update_max_image_size(unsigned long children_imgsize)
+ {
+@@ -140,6 +812,13 @@ ProcFamily::aggregate_usage(ProcFamilyUsage* usage)
+ 	//
+ 	usage->user_cpu_time += m_exited_user_cpu_time;
+ 	usage->sys_cpu_time += m_exited_sys_cpu_time;
++
++#if defined(HAVE_EXT_LIBCGROUP)
++        if (m_cgroup != NULL) {
++		aggregate_usage_cgroup(usage);
++	}
++#endif
++
+ }
+ 
+ void
+@@ -157,6 +836,12 @@ ProcFamily::signal_root(int sig)
+ void
+ ProcFamily::spree(int sig)
+ {
++#if defined(HAVE_EXT_LIBCGROUP)
++	if ((NULL != m_cgroup_string) && (0 == spree_cgroup(sig))) {
++		return;
++	}
++#endif
++
+ 	ProcFamilyMember* member;
+ 	for (member = m_member_list; member != NULL; member = member->m_next) {
+ #if !defined(WIN32)
+@@ -188,6 +873,13 @@ ProcFamily::add_member(procInfo* pi)
+ 	}
+ 	m_member_list = member;
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// Add to the associated cgroup
++	if (m_cgroup_string != NULL) {
++		migrate_to_cgroup(pi->pid);
++	}
++#endif
++
+ 	// keep our monitor's hash table up to date!
+ 	m_monitor->add_member(member);
+ }
+diff --git a/src/condor_procd/proc_family.h b/src/condor_procd/proc_family.h
+index 23f802e..f648991 100644
+--- a/src/condor_procd/proc_family.h
++++ b/src/condor_procd/proc_family.h
+@@ -25,6 +25,10 @@
+ #include "proc_family_member.h"
+ #include "proc_family_io.h"
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++#include "libcgroup.h"
++#endif
++
+ class ProcFamilyMonitor;
+ 
+ class ProcFamily {
+@@ -113,6 +117,11 @@ public:
+ 	void set_proxy(char*);
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// Set the cgroup to use for this family
++	int set_cgroup(const char *);
++#endif
++
+ 	// dump info about all processes in this family
+ 	//
+ 	void dump(ProcFamilyDump& fam);
+@@ -166,6 +175,27 @@ private:
+ 	//
+ 	char* m_proxy;
+ #endif
++
++#if defined(HAVE_EXT_LIBCGROUP)
++	static bool m_cgroup_initialized;
++	static bool m_cgroup_freezer_mounted;
++	static bool m_cgroup_cpuacct_mounted;
++	static bool m_cgroup_memory_mounted;
++	static bool m_cgroup_block_mounted;
++	char* m_cgroup_string;
++	struct cgroup* m_cgroup;
++	bool m_created_cgroup;
++	static long clock_tick;
++
++	int count_tasks_cgroup();
++	int aggregate_usage_cgroup_blockio(ProcFamilyUsage*);
++	int aggregate_usage_cgroup(ProcFamilyUsage*);
++	int freezer_cgroup(const char *);
++	int spree_cgroup(int);
++	int migrate_to_cgroup(pid_t);
++	void delete_cgroup(const char *);
++	void update_max_image_size_cgroup();
++#endif
+ };
+ 
+ #endif
+diff --git a/src/condor_procd/proc_family_client.cpp b/src/condor_procd/proc_family_client.cpp
+index a41ca4f..97b2ebd 100644
+--- a/src/condor_procd/proc_family_client.cpp
++++ b/src/condor_procd/proc_family_client.cpp
+@@ -364,6 +364,66 @@ ProcFamilyClient::track_family_via_associated_supplementary_group(pid_t pid,
+ }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++bool
++ProcFamilyClient::track_family_via_cgroup(pid_t pid,
++                                          const char * cgroup,
++                                          bool& response)
++{
++	ASSERT(m_initialized);
++
++	dprintf(D_FULLDEBUG,
++		"About to tell ProcD to track family with root %u "
++		    "via cgroup %s\n",
++		pid,
++		cgroup);
++
++	size_t cgroup_len = strlen(cgroup);
++
++	int message_len = sizeof(proc_family_command_t) +
++			  sizeof(pid_t) +
++			  sizeof(size_t) +
++			  sizeof(char)*cgroup_len;
++	void* buffer = malloc(message_len);
++	ASSERT(buffer != NULL);
++	char* ptr = (char*)buffer;
++
++	*(proc_family_command_t*)ptr =
++		PROC_FAMILY_TRACK_FAMILY_VIA_CGROUP;
++	ptr += sizeof(proc_family_command_t);
++
++	*(pid_t*)ptr = pid;
++	ptr += sizeof(pid_t);
++
++	*(size_t*)ptr = cgroup_len;
++	ptr += sizeof(size_t);
++
++	memcpy((void *)ptr, (const void *)cgroup, sizeof(char)*cgroup_len);
++	ptr += cgroup_len*sizeof(char);
++
++	ASSERT(ptr - (char*)buffer == message_len);
++
++	if (!m_client->start_connection(buffer, message_len)) {
++		dprintf(D_ALWAYS,
++			"ProcFamilyClient: failed to start connection with ProcD\n");
++		free(buffer);
++		return false;
++        }
++	free(buffer);
++	proc_family_error_t err;
++	if (!m_client->read_data(&err, sizeof(proc_family_error_t))) {
++		dprintf(D_ALWAYS,
++			"ProcFamilyClient: failed to read response from ProcD\n");
++		return false;
++	}
++	m_client->end_connection();
++
++	log_exit("track_family_via_cgroup", err);
++	response = (err == PROC_FAMILY_ERROR_SUCCESS);
++	return true;
++}
++#endif
++
+ bool
+ ProcFamilyClient::use_glexec_for_family(pid_t pid,
+                                         const char* proxy,
+diff --git a/src/condor_procd/proc_family_client.h b/src/condor_procd/proc_family_client.h
+index e86de4d..11db171 100644
+--- a/src/condor_procd/proc_family_client.h
++++ b/src/condor_procd/proc_family_client.h
+@@ -70,6 +70,11 @@ public:
+ 		bool&);
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// Tell ProcD to track a given PID family by a cgroup.
++	bool track_family_via_cgroup(pid_t, const char *, bool&);
++#endif
++
+ 	// tell the ProcD it needs to use glexec (along with the given
+ 	// proxy) in order to signal the specified family
+ 	//
+diff --git a/src/condor_procd/proc_family_io.cpp b/src/condor_procd/proc_family_io.cpp
+index 5377978..29208f0 100644
+--- a/src/condor_procd/proc_family_io.cpp
++++ b/src/condor_procd/proc_family_io.cpp
+@@ -38,7 +38,8 @@ static const char* proc_family_error_strings[] = {
+ 	"ERROR: Bad login tracking information",
+ 	"ERROR: Bad information for using GLExec",
+ 	"ERROR: No group ID available for tracking",
+-	"ERROR: This ProcD is not able to use GLExec"
++	"ERROR: This ProcD is not able to use GLExec",
++	"ERROR: No cgroup available for tracking"
+ };
+ 
+ // helper for looking up error strings
+diff --git a/src/condor_procd/proc_family_io.h b/src/condor_procd/proc_family_io.h
+index 511af61..75b0b77 100644
+--- a/src/condor_procd/proc_family_io.h
++++ b/src/condor_procd/proc_family_io.h
+@@ -43,7 +43,8 @@ enum proc_family_command_t {
+ 	PROC_FAMILY_UNREGISTER_FAMILY,
+ 	PROC_FAMILY_TAKE_SNAPSHOT,
+ 	PROC_FAMILY_DUMP,
+-	PROC_FAMILY_QUIT
++	PROC_FAMILY_QUIT,
++	PROC_FAMILY_TRACK_FAMILY_VIA_CGROUP
+ };
+ 
+ // return codes for ProcD operations
+@@ -67,6 +68,7 @@ enum proc_family_error_t {
+ 	PROC_FAMILY_ERROR_BAD_GLEXEC_INFO,
+ 	PROC_FAMILY_ERROR_NO_GROUP_ID_AVAILABLE,
+ 	PROC_FAMILY_ERROR_NO_GLEXEC,
++	PROC_FAMILY_ERROR_NO_CGROUP_ID_AVAILABLE,
+ 	PROC_FAMILY_ERROR_MAX
+ };
+ 
+@@ -83,8 +85,11 @@ struct ProcFamilyUsage {
+ 	double        percent_cpu;
+ 	unsigned long max_image_size;
+ 	unsigned long total_image_size;
+-    unsigned long total_resident_set_size;
++	unsigned long total_resident_set_size;
+ 	int           num_procs;
++	// These are signed so a negative number indicates uninitialized
++	long          block_read_bytes;
++	long          block_write_bytes;
+ };
+ 
+ // structures for retrieving a state dump from the ProcD
+diff --git a/src/condor_procd/proc_family_monitor.cpp b/src/condor_procd/proc_family_monitor.cpp
+index fc342cb..c643472 100644
+--- a/src/condor_procd/proc_family_monitor.cpp
++++ b/src/condor_procd/proc_family_monitor.cpp
+@@ -33,6 +33,10 @@
+ #include "group_tracker.linux.h"
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++#include "cgroup_tracker.linux.h"
++#endif
++
+ ProcFamilyMonitor::ProcFamilyMonitor(pid_t pid,
+                                      birthday_t birthday,
+                                      int snapshot_interval,
+@@ -55,6 +59,9 @@ ProcFamilyMonitor::ProcFamilyMonitor(pid_t pid,
+ #if defined(LINUX)
+ 	m_group_tracker = NULL;
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	m_cgroup_tracker = NULL;
++#endif
+ 	m_login_tracker = new LoginTracker(this);
+ 	ASSERT(m_login_tracker != NULL);
+ 	m_environment_tracker = new EnvironmentTracker(this);
+@@ -117,6 +124,11 @@ ProcFamilyMonitor::~ProcFamilyMonitor()
+ 		delete m_group_tracker;
+ 	}
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	if (m_cgroup_tracker != NULL) {
++		delete m_cgroup_tracker;
++	}
++#endif
+ 	delete m_pid_tracker;
+ }
+ 
+@@ -135,6 +147,16 @@ ProcFamilyMonitor::enable_group_tracking(gid_t min_tracking_gid,
+ }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++void
++ProcFamilyMonitor::enable_cgroup_tracking()
++{
++	ASSERT(m_cgroup_tracker == NULL);
++	m_cgroup_tracker = new CGroupTracker(this);
++	ASSERT(m_cgroup_tracker != NULL);
++}
++#endif
++
+ proc_family_error_t
+ ProcFamilyMonitor::register_subfamily(pid_t root_pid,
+                                       pid_t watcher_pid,
+@@ -328,6 +350,32 @@ ProcFamilyMonitor::track_family_via_supplementary_group(pid_t pid, gid_t& gid)
+ }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++proc_family_error_t
++ProcFamilyMonitor::track_family_via_cgroup(pid_t pid, const char * cgroup)
++{
++	if (m_cgroup_tracker == NULL) {
++		return PROC_FAMILY_ERROR_NO_CGROUP_ID_AVAILABLE;
++	}
++
++	Tree<ProcFamily*>* tree = lookup_family(pid, true);
++	if (tree == NULL) {
++		dprintf(D_ALWAYS,
++			"track_family_via_cgroup failure: "
++				"family with root %u not found\n",
++			pid);
++		return PROC_FAMILY_ERROR_FAMILY_NOT_FOUND;
++	}
++
++	bool ok = m_cgroup_tracker->add_mapping(tree->get_data(), cgroup);
++	if (!ok) {
++		return PROC_FAMILY_ERROR_NO_CGROUP_ID_AVAILABLE;
++	}
++
++	return PROC_FAMILY_ERROR_SUCCESS;
++}
++#endif
++
+ proc_family_error_t
+ ProcFamilyMonitor::unregister_subfamily(pid_t pid)
+ {
+@@ -363,7 +411,7 @@ ProcFamilyMonitor::unregister_subfamily(pid_t pid)
+ proc_family_error_t
+ ProcFamilyMonitor::use_glexec_for_family(pid_t pid, char* proxy)
+ {
+-	// only allow this is the glexec_kill module has been
++	// only allow this if the glexec_kill module has been
+ 	// initialized
+ 	//
+ 	if (!glexec_kill_check()) {
+@@ -466,7 +514,10 @@ ProcFamilyMonitor::get_family_usage(pid_t pid, ProcFamilyUsage* usage)
+ 	usage->sys_cpu_time = 0;
+ 	usage->percent_cpu = 0.0;
+ 	usage->total_image_size = 0;
+-    usage->total_resident_set_size = 0;
++	usage->total_resident_set_size = 0;
++	// We initialize these to -1 to distinguish the "cannot record" and "no I/O" cases.
++	usage->block_read_bytes = -1;
++	usage->block_write_bytes = -1;
+ 	usage->num_procs = 0;
+ 	get_family_usage(tree, usage);
+ 
+@@ -572,6 +623,11 @@ ProcFamilyMonitor::snapshot()
+ 		m_group_tracker->find_processes(pi_list);
+ 	}
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	if (m_cgroup_tracker != NULL) {
++		m_cgroup_tracker->find_processes(pi_list);
++	}
++#endif
+ 	m_login_tracker->find_processes(pi_list);
+ 	m_environment_tracker->find_processes(pi_list);
+ 	m_parent_tracker->find_processes(pi_list);
+@@ -865,6 +921,11 @@ ProcFamilyMonitor::unregister_subfamily(Tree<ProcFamily*>* tree)
+ 		m_group_tracker->remove_mapping(tree->get_data());
+ 	}
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	if (m_cgroup_tracker != NULL) {
++		m_cgroup_tracker->remove_mapping(tree->get_data());
++	}
++#endif
+ 	m_login_tracker->remove_mapping(tree->get_data());
+ 	m_environment_tracker->remove_mapping(tree->get_data());
+ 
+diff --git a/src/condor_procd/proc_family_monitor.h b/src/condor_procd/proc_family_monitor.h
+index ae702ea..6c60500 100644
+--- a/src/condor_procd/proc_family_monitor.h
++++ b/src/condor_procd/proc_family_monitor.h
+@@ -32,6 +32,9 @@ class PIDTracker;
+ #if defined(LINUX)
+ class GroupTracker;
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++class CGroupTracker;
++#endif
+ class LoginTracker;
+ class EnvironmentTracker;
+ class ParentTracker;
+@@ -89,6 +92,14 @@ public:
+ 	proc_family_error_t use_glexec_for_family(pid_t, char* proxy);
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// Turn on the ability to track via a cgroup
++	void enable_cgroup_tracking();
++
++	// Associate a cgroup with a family
++	proc_family_error_t track_family_via_cgroup(pid_t, const char*);
++#endif
++
+ 	// for sending signals to a single process
+ 	//
+ 	proc_family_error_t signal_process(pid_t, int);
+@@ -167,6 +178,9 @@ private:
+ #if defined(LINUX)
+ 	GroupTracker*       m_group_tracker;
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	CGroupTracker*      m_cgroup_tracker;
++#endif
+ 	LoginTracker*       m_login_tracker;
+ 	EnvironmentTracker* m_environment_tracker;
+ 	ParentTracker*      m_parent_tracker;
+diff --git a/src/condor_procd/proc_family_server.cpp b/src/condor_procd/proc_family_server.cpp
+index c270544..6b5789e 100644
+--- a/src/condor_procd/proc_family_server.cpp
++++ b/src/condor_procd/proc_family_server.cpp
+@@ -193,6 +193,27 @@ ProcFamilyServer::track_family_via_associated_supplementary_group()
+ }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++void
++ProcFamilyServer::track_family_via_cgroup()
++{
++	pid_t pid;
++	read_from_client(&pid, sizeof(pid_t));
++
++	size_t cgroup_len;
++	read_from_client(&cgroup_len, sizeof(size_t));
++	char * cgroup = (char *)malloc(sizeof(char)*cgroup_len+1);
++	read_from_client(cgroup, sizeof(char)*cgroup_len);
++	// String sent over pipe is NOT null-terminated.
++	cgroup[cgroup_len] = '\0';
++
++	proc_family_error_t err = m_monitor.track_family_via_cgroup(pid, cgroup);
++	write_to_client(&err, sizeof(proc_family_error_t));
++
++	free(cgroup);
++}
++#endif
++
+ #if !defined(WIN32)
+ void
+ ProcFamilyServer::use_glexec_for_family()
+@@ -434,6 +455,14 @@ ProcFamilyServer::wait_loop()
+ 				break;
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++			case PROC_FAMILY_TRACK_FAMILY_VIA_CGROUP:
++				dprintf(D_ALWAYS,
++					"PROC_FAMILY_TRACK_FAMILY_VIA_CGROUP\n");
++				track_family_via_cgroup();
++				break;
++#endif
++
+ #if !defined(WIN32)
+ 			case PROC_FAMILY_USE_GLEXEC_FOR_FAMILY:
+ 				dprintf(D_ALWAYS,
+diff --git a/src/condor_procd/proc_family_server.h b/src/condor_procd/proc_family_server.h
+index 14601a7..d5792a2 100644
+--- a/src/condor_procd/proc_family_server.h
++++ b/src/condor_procd/proc_family_server.h
+@@ -65,6 +65,9 @@ private:
+ 	void track_family_via_allocated_supplementary_group();
+ 	void track_family_via_associated_supplementary_group();
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	void track_family_via_cgroup();
++#endif
+ #if !defined(WIN32)
+ 	void use_glexec_for_family();
+ #endif
+diff --git a/src/condor_procd/procd_ctl.cpp b/src/condor_procd/procd_ctl.cpp
+index 9ddf4b6..284aa38 100644
+--- a/src/condor_procd/procd_ctl.cpp
++++ b/src/condor_procd/procd_ctl.cpp
+@@ -25,6 +25,8 @@
+ static int register_family(ProcFamilyClient& pfc, int argc, char* argv[]);
+ static int track_by_associated_gid(ProcFamilyClient& pfc, int argc, 
+ 	char* argv[]);
++static int track_by_associated_cgroup(ProcFamilyClient& pfc, int argc,
++	char* argv[]);
+ static int get_usage(ProcFamilyClient& pfc, int argc, char* argv[]);
+ static int dump(ProcFamilyClient& pfc, int argc, char* argv[]);
+ static int list(ProcFamilyClient& pfc, int argc, char* argv[]);
+@@ -46,6 +48,7 @@ list_commands()
+ 	fprintf(stderr,
+ 		"    REGISTER_FAMILY <pid> <watcher_pid> <max_snapshot_interval>\n");
+ 	fprintf(stderr, "    TRACK_BY_ASSOCIATED_GID <gid> [<pid>]\n");
++	fprintf(stderr, "    TRACK_BY_ASSOCIATED_CGROUP <cgroup> [<pid>]\n");
+ 	fprintf(stderr, "    GET_USAGE [<pid>]\n");
+ 	fprintf(stderr, "    DUMP [<pid>]\n");
+ 	fprintf(stderr, "    LIST [<pid>]\n");
+@@ -107,7 +110,7 @@ main(int argc, char* argv[])
+ 		}
+ 
+ 		// This is the failure case if we manage to pass all checks above.
+-		fprintf(stderr, "error: Don't understand option %s\n", cmd_argv);
++		fprintf(stderr, "error: Don't understand option %s\n", cmd_argv[0]);
+ 		list_commands();
+ 		return 1;
+ 	}
+@@ -147,6 +150,9 @@ main(int argc, char* argv[])
+ 	else if (strcasecmp(cmd_argv[0], "TRACK_BY_ASSOCIATED_GID") == 0) {
+ 		return track_by_associated_gid(pfc, cmd_argc, cmd_argv);
+ 	}
++	else if (strcasecmp(cmd_argv[0], "TRACK_BY_ASSOCIATED_CGROUP") == 0) {
++		return track_by_associated_cgroup(pfc, cmd_argc, cmd_argv);
++	}
+ 	else if (strcasecmp(cmd_argv[0], "GET_USAGE") == 0) {
+ 		return get_usage(pfc, cmd_argc, cmd_argv);
+ 	}
+@@ -231,7 +237,7 @@ track_by_associated_gid(ProcFamilyClient& pfc, int argc, char* argv[])
+ 	pid_t pid = 0;
+ 	if (argc == 3) {
+ 		pid = atoi(argv[2]);
+-		if (pid == 0) {
++		if (pid <= 0) {
+ 			fprintf(stderr, "error: invalid pid: %s\n", argv[2]);
+ 			return 1;
+ 		}
+@@ -250,6 +256,46 @@ track_by_associated_gid(ProcFamilyClient& pfc, int argc, char* argv[])
+ 	return 0;
+ }
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++static int
++track_by_associated_cgroup(ProcFamilyClient& pfc, int argc, char* argv[])
++{
++	if ((argc != 2) && (argc != 3)) {
++		fprintf(stderr,
++			"error: argument synopsis for %s: <cgroup> [<pid>]\n",
++			argv[0]);
++		return 1;
++	}
++	const char * cgroup = argv[1];
++	pid_t pid = 0;
++	if (argc == 3) {
++		pid = atoi(argv[2]);
++		if (pid <= 0) {
++			fprintf(stderr, "error: invalid pid: %s\n", argv[2]);
++			return 1;
++		}
++	}
++	bool success;
++	if (!pfc.track_family_via_cgroup(pid, cgroup, success)) {
++		fprintf(stderr, "error: communication error with ProcD\n");
++		return 1;
++	}
++	if (!success) {
++		fprintf(stderr,
++			"error: %s command failed with ProcD\n",
++			argv[0]);
++		return 1;
++	}
++	return 0;
++}
++#else
++static int
++track_by_associated_cgroup(ProcFamilyClient&, int, char**) {
++	fprintf(stderr, "error: cgroups not supported not compiled into this client\n");
++	return 1;
++}
++#endif
++
+ static int
+ dump(ProcFamilyClient& pfc, int argc, char* argv[])
+ {
+@@ -380,6 +426,10 @@ get_usage(ProcFamilyClient& pfc, int argc, char* argv[])
+ 	printf("CPU Percentage (%%): %f\n", pfu.percent_cpu);
+ 	printf("Maximum Image Size (KB): %lu\n", pfu.max_image_size);
+ 	printf("Total Image Size(KB): %lu\n", pfu.total_image_size);
++	if (pfu.block_read_bytes >= 0)
++		printf("Bytes read from block devices (KB): %lu\n", pfu.block_read_bytes/1024);
++	if (pfu.block_write_bytes >= 0)
++		printf("Bytes written to block devices (KB): %lu\n", pfu.block_write_bytes/1024);
+ 	return 0;
+ }
+ 
+diff --git a/src/condor_procd/procd_main.cpp b/src/condor_procd/procd_main.cpp
+index 7c1372e..79e0634 100644
+--- a/src/condor_procd/procd_main.cpp
++++ b/src/condor_procd/procd_main.cpp
+@@ -320,11 +320,11 @@ get_parent_info(pid_t& parent_pid, birthday_t& parent_birthday)
+ 
+ 	int ignored;
+ 	if (ProcAPI::getProcInfo(getpid(), own_pi, ignored) != PROCAPI_SUCCESS) {
+-		fprintf(stderr, "error: getProcInfo failed on own PID");
++		fprintf(stderr, "error: getProcInfo failed on own PID\n");
+ 		exit(1);
+ 	}
+ 	if (ProcAPI::getProcInfo(own_pi->ppid, parent_pi, ignored) != PROCAPI_SUCCESS) {
+-		fprintf(stderr, "error: getProcInfo failed on parent PID");
++		fprintf(stderr, "error: getProcInfo failed on parent PID\n");
+ 		exit(1);
+ 	}
+ 
+@@ -338,7 +338,7 @@ get_parent_info(pid_t& parent_pid, birthday_t& parent_birthday)
+ 		an escalation of privileges granted to the authorized process, we 
+ 		exit if we determine that our parent is init. */
+ 	if (own_pi->ppid == 1) {
+-		fprintf(stderr, "error: Procd's ppid can't be 1!");
++		fprintf(stderr, "error: Procd's ppid can't be 1!\n");
+ 		exit(1);
+ 	}
+ #endif
+@@ -349,7 +349,7 @@ get_parent_info(pid_t& parent_pid, birthday_t& parent_birthday)
+ 		            PROCAPI_BIRTHDAY_FORMAT
+ 		            ") is later than our own ("
+ 		            PROCAPI_BIRTHDAY_FORMAT
+-		            ")",
++		            ")\n",
+ 		       parent_pi->birthday,
+ 		       own_pi->birthday);
+ 		exit(1);
+@@ -386,6 +386,12 @@ main(int argc, char* argv[])
+ 		int ignored;
+ 		int status = ProcAPI::getProcInfo(root_pid, pi, ignored);
+ 		if (status != PROCAPI_SUCCESS) {
++				if (pi != NULL) {
++					delete pi;
++				}
++				fprintf(stderr,
++					"getProcInfo failed on root PID %u\n",
++					 (unsigned)root_pid);
+ 				EXCEPT("getProcInfo failed on root PID %u",
+ 				(unsigned)root_pid);
+ 		}
+@@ -403,7 +409,7 @@ main(int argc, char* argv[])
+ 		debug_fp = safe_fopen_wrapper(log_file_name, "a");
+ 		if (debug_fp == NULL) {
+ 			fprintf(stderr,
+-			        "error: couldn't open file \"%s\" for logging: %s (%d)",
++			        "error: couldn't open file \"%s\" for logging: %s (%d)\n",
+ 					log_file_name,
+ 			        strerror(errno),
+ 			        errno);
+@@ -427,7 +433,7 @@ main(int argc, char* argv[])
+ 	//
+ 	if (max_snapshot_interval < -1) {
+ 		fprintf(stderr,
+-		        "error: maximum snapshot interval must be non-negative or -1");
++		        "error: maximum snapshot interval must be non-negative or -1\n");
+ 		exit(1);
+ 	}
+ 
+@@ -494,6 +500,10 @@ main(int argc, char* argv[])
+ 	}
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	monitor.enable_cgroup_tracking();
++#endif
++
+ 	// initialize the server for accepting requests from clients
+ 	//
+ 	ProcFamilyServer server(monitor, local_server_address);
+diff --git a/src/condor_q.V6/queue.cpp b/src/condor_q.V6/queue.cpp
+index 201305c..8316beb 100644
+--- a/src/condor_q.V6/queue.cpp
++++ b/src/condor_q.V6/queue.cpp
+@@ -22,7 +22,6 @@
+ #include "condor_config.h"
+ #include "condor_accountant.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ #include "condor_debug.h"
+ #include "condor_query.h"
+ #include "condor_q.h"
+@@ -233,6 +232,9 @@ char *dbName = NULL;
+ char *queryPassword = NULL;
+ 
+ StringList attrs(NULL, "\n");; // The list of attrs we want, "" for all
++
++bool g_stream_results = false;
++
+ static void freeConnectionStrings() {
+ 	if(quillName) {
+ 		free(quillName);
+@@ -398,7 +400,7 @@ int main (int argc, char **argv)
+            	// to the schedd time's out and the user gets nothing
+            	// useful printed out. Therefore, we use show_queue,
+            	// which fetches all of the ads, then analyzes them. 
+-			if ( verbose || better_analyze || jobads_file ) {
++			if ( (verbose || better_analyze || jobads_file) && !g_stream_results ) {
+ 				sqfp = show_queue;
+ 			} else {
+ 				sqfp = show_queue_buffered;
+@@ -690,7 +692,7 @@ int main (int argc, char **argv)
+         // to the schedd time's out and the user gets nothing
+         // useful printed out. Therefore, we use show_queue,
+         // which fetches all of the ads, then analyzes them. 
+-		if ( verbose || better_analyze ) {
++		if ( (verbose || better_analyze) && !g_stream_results ) {
+ 			sqfp = show_queue;
+ 		} else {
+ 			sqfp = show_queue_buffered;
+@@ -1295,6 +1297,10 @@ processCommandLineArguments (int argc, char *argv[])
+ 			printf( "%s\n%s\n", CondorVersion(), CondorPlatform() );
+ 			exit(0);
+         }
++		else
++		if (match_prefix (arg, "stream")) {
++			g_stream_results = true;
++		}
+ 		else {
+ 			fprintf( stderr, "Error: unrecognized argument -%s\n", arg );
+ 			usage(argv[0]);
+@@ -1861,6 +1867,7 @@ usage (const char *myName)
+ #else
+ 		"\t\t-direct <schedd>\tPerform a direct query to the schedd\n"
+ #endif
++		"\t\t-stream-results \tProduce output as ads are fetched\n"
+ 		"\t\t-version\t\tPrint the Condor Version and exit\n"
+ 		"\t\trestriction list\n"
+ 		"\twhere each restriction may be one of\n"
+@@ -1896,6 +1903,32 @@ output_sorter( const void * va, const void * vb ) {
+ 	return 0;
+ }
+ 
++void full_header(bool useDB,char const *quill_name,char const *db_ipAddr, char const *db_name,char const *lastUpdate, char const *scheddName, char const *scheddAddress,char const *scheddMachine)
++{
++	if (! customFormat && !verbose ) {
++		if (useDB) {
++			printf ("\n\n-- Quill: %s : %s : %s : %s\n", quill_name, 
++					db_ipAddr, db_name, lastUpdate);
++		} else if( querySchedds ) {
++			printf ("\n\n-- Schedd: %s : %s\n", scheddName, scheddAddress);
++		} else {
++			printf ("\n\n-- Submitter: %s : %s : %s\n", scheddName, 
++					scheddAddress, scheddMachine);	
++		}
++			// Print the output header
++		
++		short_header();
++	}
++	if( use_xml ) {
++			// keep this consistent with AttrListList::fPrintAttrListList()
++		ClassAdXMLUnparser  unparser;
++		MyString xml;
++		unparser.SetUseCompactSpacing(false);
++		unparser.AddXMLFileHeader(xml);
++		printf("%s\n", xml.Value());
++	}
++}
++
+ /* The parameters v1, v2, and v3 will be intepreted immediately on the top 
+    of the function based on the value of useDB. For more details, please 
+    refer to the prototype of this function on the top of this file 
+@@ -2016,6 +2049,10 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
+ 		g_cur_schedd_for_process_buffer_line = NULL;
+ 	}
+ 
++	if( g_stream_results ) {
++		full_header(useDB,quill_name,db_ipAddr,db_name,lastUpdate,scheddName,scheddAddress,scheddMachine);
++	}
++
+ 	CondorError errstack;
+ 
+ 		/* get the job ads from database if database can be queried */
+@@ -2077,32 +2114,13 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
+ 	// If this is a global, don't print anything if this schedd is empty.
+ 	// If this is NOT global, print out the header and footer to show that we
+ 	//    did something.
+-	if (!global || !output_buffer_empty) {
++	if (!global || !output_buffer_empty || g_stream_results) {
+ 		the_output = &(*output_buffer)[0];
+ 		qsort(the_output, output_buffer->getlast()+1, sizeof(clusterProcString*),
+ 			output_sorter);
+ 
+-		if (! customFormat ) {
+-			if (useDB) {
+-				printf ("\n\n-- Quill: %s : %s : %s : %s\n", quill_name, 
+-						db_ipAddr, db_name, lastUpdate);
+-			} else if( querySchedds ) {
+-				printf ("\n\n-- Schedd: %s : %s\n", scheddName, scheddAddress);
+-			} else {
+-				printf ("\n\n-- Submitter: %s : %s : %s\n", scheddName, 
+-						scheddAddress, scheddMachine);	
+-			}
+-			// Print the output header
+-		
+-			short_header();
+-		}
+-		if( use_xml ) {
+-				// keep this consistent with AttrListList::fPrintAttrListList()
+-			ClassAdXMLUnparser  unparser;
+-			MyString xml;
+-			unparser.SetUseCompactSpacing(false);
+-			unparser.AddXMLFileHeader(xml);
+-			printf("%s\n", xml.Value());
++		if( !g_stream_results ) {
++			full_header(useDB,quill_name,db_ipAddr,db_name,lastUpdate,scheddName,scheddAddress,scheddMachine);
+ 		}
+ 
+ 		if (!output_buffer_empty) {
+@@ -2158,7 +2176,7 @@ process_buffer_line( ClassAd *job )
+ 	int status = 0;
+ 
+ 	clusterProcString * tempCPS = new clusterProcString;
+-	(*output_buffer)[output_buffer->getlast()+1] = tempCPS;
++
+ 	job->LookupInteger( ATTR_CLUSTER_ID, tempCPS->cluster );
+ 	job->LookupInteger( ATTR_PROC_ID, tempCPS->proc );
+ 	job->LookupInteger( ATTR_JOB_STATUS, status );
+@@ -2223,6 +2241,12 @@ process_buffer_line( ClassAd *job )
+ 		StringList *attr_white_list = attrs.isEmpty() ? NULL : &attrs;
+ 		job->sPrintAsXML(s,attr_white_list);
+ 		tempCPS->string = strnewp( s.Value() );
++	} else if( verbose ) {
++		MyString s;
++		StringList *attr_white_list = attrs.isEmpty() ? NULL : &attrs;
++		job->sPrint(s,attr_white_list);
++		s += "\n";
++		tempCPS->string = strnewp( s.Value() );
+ 	} else if( better_analyze ) {
+ 		tempCPS->string = strnewp( doRunAnalysisToBuffer( job, g_cur_schedd_for_process_buffer_line ) );
+ 	} else if ( show_io ) {
+@@ -2236,7 +2260,15 @@ process_buffer_line( ClassAd *job )
+ 		tempCPS->string = strnewp( bufferJobShort( job ) );
+ 	}
+ 
+-	output_buffer_empty = false;
++	if( g_stream_results ) {
++		printf("%s",tempCPS->string);
++		delete tempCPS;
++		tempCPS = NULL;
++	}
++	else {
++		(*output_buffer)[output_buffer->getlast()+1] = tempCPS;
++		output_buffer_empty = false;
++	}
+ 
+ 	return true;
+ }
+diff --git a/src/condor_rmdir/bprint.h b/src/condor_rmdir/bprint.h
+index b7ae97d8..2bb4535 100644
+--- a/src/condor_rmdir/bprint.h
++++ b/src/condor_rmdir/bprint.h
+@@ -253,10 +253,10 @@ void bprint_Initialize(BPRINT_BUFFER & bp)
+    if (bp.cchMax <= 0)
+       bp.cchMax = 0x0FFFF;
+    if ( ! bp.psz)
+-      bp.psz = (LPTSTR) GlobalAllocPtr(GPTR, (bp.cchMax+1) * NUMBYTES(bp.psz[0]));
++      bp.psz = (LPTSTR) malloc((bp.cchMax+1) * NUMBYTES(bp.psz[0]));
+   #ifdef UNICODE
+    if ( ! bp.pszAscii)
+-      bp.pszAscii = (LPSTR) GlobalAllocPtr(GPTR, (bp.cchMax+1) * 2);
++      bp.pszAscii = (LPSTR) malloc((bp.cchMax+1) * 2);
+   #endif
+    bp.cch = 0;
+    bp.CodePage = CP_ACP;
+@@ -466,9 +466,9 @@ void bprint_Terminate(BPRINT_BUFFER & bp, bool fFlush)
+    if (fFlush)
+       bprint_EndLine(bp);
+    if (bp.psz)
+-      GlobalFreePtr(bp.psz);
++      free(bp.psz);
+    if (bp.pszAscii)
+-      GlobalFreePtr(bp.pszAscii);
++      free(bp.pszAscii);
+    if (bp.hOut && (bp.hOut != GetStdHandle(STD_OUTPUT_HANDLE)))
+       CloseHandle(bp.hOut);
+    ZeroStruct(&bp);
+diff --git a/src/condor_rmdir/harylist.h b/src/condor_rmdir/harylist.h
+index d31f71e..f62b326 100644
+--- a/src/condor_rmdir/harylist.h
++++ b/src/condor_rmdir/harylist.h
+@@ -118,13 +118,13 @@ HRESULT FNEXPORT HaryList_InsertList (
+ INLINE LPVOID HaryList_AllocItem(HARYLIST hlst, LONG cbItem) {
+ 	DASSERT(PCARYLIST_PTR(hlst)->cbItem == sizeof(void*));
+ 	DASSERT(PCARYLIST_PTR(hlst)->fdwOptions & ARYLIST_OPT_F_GPTRS);
+-	return (LPVOID)GlobalAllocPtr(GPTR, cbItem);
++	return (LPVOID)malloc(cbItem);
+ }
+ 
+ INLINE void HaryList_FreeItem(HARYLIST hlst, LPVOID pvItem) {
+ 	DASSERT(PCARYLIST_PTR(hlst)->cbItem == sizeof(void*));
+ 	DASSERT(PCARYLIST_PTR(hlst)->fdwOptions & ARYLIST_OPT_F_GPTRS);
+-	GlobalFreePtr(pvItem);
++	free(pvItem);
+ }
+ 
+ INLINE HRESULT HaryList_InsertItemCopy(HARYLIST hlst, LONG ix, LPCVOID pvItem) {
+@@ -384,7 +384,7 @@ HRESULT FNEXPORT HaryList_Create (
+ 	else
+ 	{
+ 		*phlst = NULL;
+-		plst = (PARYLIST)GlobalAllocPtr(GPTR, sizeof(*plst));
++		plst = (PARYLIST)malloc(sizeof(*plst));
+ 	}
+ 	if ( ! plst)
+ 		return E_OUTOFMEMORY;
+@@ -407,7 +407,7 @@ HRESULT FNEXPORT HaryList_Create (
+ 	plst->cGrowBy    = cGrowBy;
+ 
+     LONG cb = cAllocate * cbItem;
+-    plst->pvList = (void**)GlobalAllocPtr(GPTR, cb);
++    plst->pvList = (void**)malloc(cb);
+ 
+ 	if (fdwOptions & ARYLIST_OPT_F_EMBEDDED)
+ 	{
+@@ -417,7 +417,7 @@ HRESULT FNEXPORT HaryList_Create (
+     DASSERT(plst->pvList);
+     if ( ! plst->pvList)
+     {
+-        GlobalFreePtr(plst);
++        free(plst);
+         return E_OUTOFMEMORY;
+     }
+ 
+@@ -445,12 +445,12 @@ HRESULT FNEXPORT HaryList_Destroy (HARYLIST hlst)
+ 				LPVOID pv = ppv[plst->cItems-1];
+ 				ppv[plst->cItems-1] = NULL;
+ 				if (pv)
+-					GlobalFreePtr(pv);
++					free(pv);
+ 				--plst->cItems;
+ 			}
+ 		}
+ 
+-        GlobalFreePtr(plst->pvList);
++        free(plst->pvList);
+         plst->pvList = NULL;
+     }
+ 
+@@ -461,7 +461,7 @@ HRESULT FNEXPORT HaryList_Destroy (HARYLIST hlst)
+     }
+ 
+ 	if ( ! (plst->fdwOptions & ARYLIST_OPT_F_EMBEDDED))
+-		GlobalFreePtr(plst);
++		free(plst);
+     return S_OK;
+ }
+ 
+@@ -485,12 +485,7 @@ HRESULT HaryList_GrowAllocated (
+ 
+     LONG cbNewAlloc = (plst->cAllocated + cDelta) * plst->cbItem;
+ 
+-    // 
+-    // GlobalReAllocPtr can fail, will fail so we have to allocate
+-    // a whole new buffer and copy the new data to it.
+-    //pvNew = (LPVOID)GlobalReAllocPtr(plst->pvList, cb, GMEM_ZEROINIT);
+-
+-    void** pvNew = (void**)GlobalAllocPtr(GPTR, cbNewAlloc);
++    void** pvNew = (void**)malloc(cbNewAlloc);
+     if ( ! pvNew)
+     {
+         hr = E_OUTOFMEMORY;
+@@ -498,7 +493,7 @@ HRESULT HaryList_GrowAllocated (
+     }
+ 
+     RtlCopyMemory(pvNew, plst->pvList, plst->cAllocated * plst->cbItem);
+-    GlobalFreePtr(plst->pvList);
++    free(plst->pvList);
+ 
+     plst->pvList = pvNew;
+     plst->cAllocated += cDelta;
+diff --git a/src/condor_rmdir/main.cpp b/src/condor_rmdir/main.cpp
+index 19395a2..fc6c89a 100644
+--- a/src/condor_rmdir/main.cpp
++++ b/src/condor_rmdir/main.cpp
+@@ -745,7 +745,8 @@ HRESULT App_ExecuteCommandLine (
+          {
+          hr = App_ExecuteArgList (aArgs, ixFirst, cArgs - ixFirst);
+          }
+-      GlobalFreePtr (aArgs);
++
++      HeapFree(GetProcessHeap(), 0, aArgs);
+       }
+ 
+    return hr;
+@@ -761,6 +762,12 @@ const TCHAR * _pszModulePath; // global path name
+ void App_SetModuleInfo(void)
+ {
+    TCHAR * pszBase =(TCHAR*)malloc(sizeof(TCHAR) * (MAX_PATH+3));
++   if ( ! pszBase)
++      {
++	  _pszModulePath = _pszModuleName = TEXT("");
++	  return;
++      }
++
+    TCHAR * psz = pszBase;
+    *psz++ = 0; // so we have room for a "" path if the module filename has no path
+    int cch = GetModuleFileName(NULL, psz, MAX_PATH+1);
+@@ -798,13 +805,13 @@ void App_SetModuleInfo(void)
+       _pszModulePath = pszBase;
+    else
+       {
+-      if (_pszModuleName-1 > _pszModulePath)
++      if (_pszModuleName-2 >= _pszModulePath)
+          {
+          // we need to be careful not to delete \ folling a drive letter,
+          // if that happens, we have to move the name by 1 character
+          // so there is room for a null terminator after N:\ and before
+          // the name.
+-         if (_pszModuleName[-1] == ':' &&
++         if (_pszModuleName[-2] == ':' &&
+              _pszModuleName[-1] == '\\')
+             {
+             RtlMoveMemory((void*)(_pszModuleName+1), (void*)(_pszModuleName),
+diff --git a/src/condor_schedd.V6/dedicated_scheduler.cpp b/src/condor_schedd.V6/dedicated_scheduler.cpp
+index 4418557..526940f 100644
+--- a/src/condor_schedd.V6/dedicated_scheduler.cpp
++++ b/src/condor_schedd.V6/dedicated_scheduler.cpp
+@@ -4247,27 +4247,71 @@ clusterSortByPrioAndDate( const void *ptr1, const void* ptr2 )
+ {
+ 	int cluster1 = *((const int*)ptr1);
+ 	int cluster2 = *((const int*)ptr2);
+-	int qdate1, qdate2;
+-
+-	int prio1, prio2;
+-
+-	if( (GetAttributeInt(cluster1, 0, ATTR_Q_DATE, &qdate1) < 0) || 
+-		(GetAttributeInt(cluster2, 0, ATTR_Q_DATE, &qdate2) < 0) ||
+-		(GetAttributeInt(cluster1, 0, ATTR_JOB_PRIO, &prio1) < 0) ||
+-		(GetAttributeInt(cluster2, 0, ATTR_JOB_PRIO, &prio2) < 0)) {
++	int c1_qdate, c2_qdate;	
++	int c1_prio, c1_preprio1, c1_preprio2, c1_postprio1, c1_postprio2=0;	
++	int c2_prio, c2_preprio1, c2_preprio2, c2_postprio1, c2_postprio2=0;
++
++	if ((GetAttributeInt(cluster1, 0, ATTR_Q_DATE, &c1_qdate) < 0) || 
++	        (GetAttributeInt(cluster2, 0, ATTR_Q_DATE, &c2_qdate) < 0) ||
++	        (GetAttributeInt(cluster1, 0, ATTR_JOB_PRIO, &c1_prio) < 0) ||
++	        (GetAttributeInt(cluster2, 0, ATTR_JOB_PRIO, &c2_prio) < 0)) {
+ 		
+ 		return -1;
+ 	}
++	
++        if (GetAttributeInt(cluster1, 0, ATTR_PRE_JOB_PRIO1, &c1_preprio1) > -1 &&
++	       GetAttributeInt(cluster2, 0, ATTR_PRE_JOB_PRIO1, &c2_preprio1) > -1 ){
++	     if (c1_preprio1 < c2_preprio1) {
++		return 1;
++	     }
+ 
+-	if (prio1 < prio2) {
++	     if (c1_preprio1 > c2_preprio1) {
++		return -1;
++	     }
++        }
++	
++	if (GetAttributeInt(cluster1, 0, ATTR_PRE_JOB_PRIO2, &c1_preprio2) > -1 &&
++	       GetAttributeInt(cluster2, 0, ATTR_PRE_JOB_PRIO2, &c2_preprio2) > -1 ) {
++	     if (c1_preprio2 < c2_preprio2) {
++		return 1;
++	     }
++
++	     if (c1_preprio2 > c2_preprio2) {
++		return -1;
++	     }
++        }
++	
++	if (c1_prio < c2_prio) {
+ 		return 1;
+ 	}
+ 
+-	if (prio1 > prio2) {
++	if (c1_prio > c2_prio) {
+ 		return -1;
+ 	}
++	
++        if (GetAttributeInt(cluster1, 0, ATTR_POST_JOB_PRIO1, &c1_postprio1) > -1 &&
++	       GetAttributeInt(cluster2, 0, ATTR_POST_JOB_PRIO1, &c2_postprio1) > -1 ) { 
++	     if (c1_postprio1 < c2_postprio1) {
++		return 1;
++	     }
+ 
+-	return (qdate1 - qdate2);
++	     if (c1_postprio1 > c2_postprio1) {
++		return -1;
++	     }
++        }
++	
++	if (GetAttributeInt(cluster1, 0, ATTR_POST_JOB_PRIO2, &c1_postprio2) > -1 &&
++	       GetAttributeInt(cluster2, 0, ATTR_POST_JOB_PRIO2, &c2_postprio2) > -1 ) {
++	     if (c1_postprio2 < c2_postprio2) {
++		return 1;
++	     }
++
++	     if (c1_postprio2 > c2_postprio2) {
++		return -1;
++	     }
++        }
++	
++	return (c1_qdate - c2_qdate);
+ }
+ 
+ 
+diff --git a/src/condor_schedd.V6/prio_rec.h b/src/condor_schedd.V6/prio_rec.h
+index 5b690ab..b613f94 100644
+--- a/src/condor_schedd.V6/prio_rec.h
++++ b/src/condor_schedd.V6/prio_rec.h
+@@ -34,6 +34,10 @@ const 	int		INITIAL_MAX_PRIO_REC = 2048;
+ class prio_rec {
+ public:
+     PROC_ID     id;
++    int         pre_job_prio1;
++    int         pre_job_prio2;
++    int         post_job_prio1;
++    int         post_job_prio2;
+     int         job_prio;
+     int         status;
+     int         qdate;
+diff --git a/src/condor_schedd.V6/qmgmt.cpp b/src/condor_schedd.V6/qmgmt.cpp
+index c3fbafd..3fae82a 100644
+--- a/src/condor_schedd.V6/qmgmt.cpp
++++ b/src/condor_schedd.V6/qmgmt.cpp
+@@ -42,9 +42,8 @@
+ #include "condor_universe.h"
+ #include "globus_utils.h"
+ #include "env.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "condor_ver_info.h"
+-#include "condor_scanner.h"	// for Token, etc.
+ #include "condor_string.h" // for strnewp, etc.
+ #include "utc_time.h"
+ #include "condor_crontab.h"
+@@ -101,6 +100,7 @@ static time_t xact_start_time = 0;	// time at which the current transaction was
+ static int cluster_initial_val = 1;		// first cluster number to use
+ static int cluster_increment_val = 1;	// increment for cluster numbers of successive submissions 
+ static int cluster_maximum_val = 0;     // maximum cluster id (default is 0, or 'no max')
++static int job_queued_count = 0;
+ 
+ static void AddOwnerHistory(const MyString &user);
+ 
+@@ -1748,6 +1748,7 @@ NewProc(int cluster_id)
+ 	JobQueue->NewClassAd(key, JOB_ADTYPE, STARTD_ADTYPE);
+ 
+ 	IncrementClusterSize(cluster_id);
++    job_queued_count += 1;
+ 
+ 		// now that we have a real job ad with a valid proc id, then
+ 		// also insert the appropriate GlobalJobId while we're at it.
+@@ -2321,18 +2322,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+ 
+ 	if( round_param && *round_param && strcmp(round_param,"0") ) {
+ 		LexemeType attr_type = LX_EOF;
+-#ifdef WANT_OLD_CLASSADS
+-		Token token;
+-
+-			// See if attr_value is a scalar (int or float) by
+-			// invoking the ClassAd scanner.  We do it this way
+-			// to make certain we scan the value the same way that
+-			// the ClassAd library will (i.e. support exponential
+-			// notation, etc).
+-		char const *avalue = attr_value; // scanner will modify ptr, so save it
+-		Scanner(avalue,token);
+-		attr_type = token.type;
+-#else
+ 		ExprTree *tree = NULL;
+ 		classad::Value val;
+ 		if ( ParseClassAdRvalExpr(attr_value, tree) == 0 &&
+@@ -2345,7 +2334,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+ 			}
+ 		}
+ 		delete tree;
+-#endif
+ 
+ 		if ( attr_type == LX_INTEGER || attr_type == LX_FLOAT ) {
+ 			// first, store the actual value
+@@ -2366,18 +2354,10 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+ 			double fvalue;
+ 
+ 			if ( attr_type == LX_INTEGER ) {
+-#ifdef WANT_OLD_CLASSADS
+-				ivalue = token.intVal;
+-#else
+ 				val.IsIntegerValue( ivalue );
+-#endif
+ 				fvalue = ivalue;
+ 			} else {
+-#ifdef WANT_OLD_CLASSADS
+-				fvalue = token.floatVal;
+-#else
+ 				val.IsRealValue( fvalue );
+-#endif
+ 				ivalue = (int) fvalue;	// truncation conversion
+ 			}
+ 
+@@ -2862,6 +2842,7 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
+ 					rewriteSpooledJobAd(procad, cluster_id, proc_id, false);
+ 					JobQueue->CommitNondurableTransaction();
+ 					ScheduleJobQueueLogFlush();
++					SpooledJobFiles::createJobSpoolDirectory(procad,PRIV_UNKNOWN);
+ 				}
+ 
+ 				std::string version;
+@@ -2871,7 +2852,6 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
+ 					// they are responsible for writing the submit event
+ 					// to the user log.
+ 					if ( vers.built_since_version( 7, 5, 4 ) ) {
+-						SpooledJobFiles::createJobSpoolDirectory(procad,PRIV_UNKNOWN);
+ 						PROC_ID job_id;
+ 						job_id.cluster = cluster_id;
+ 						job_id.proc = proc_id;
+@@ -2947,9 +2927,13 @@ GetAttributeFloat(int cluster_id, int proc_id, const char *attr_name, float *val
+ 	IdToStr(cluster_id,proc_id,key);
+ 
+ 	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
+-		sscanf(attr_val, "%f", val);
++		ClassAd tmp_ad;
++		tmp_ad.AssignExpr(attr_name,attr_val);
+ 		free( attr_val );
+-		return 1;
++		if( tmp_ad.LookupFloat(attr_name, *val) == 1) {
++			return 1;
++		}
++		return -1;
+ 	}
+ 
+ 	if (!JobQueue->LookupClassAd(key, ad)) {
+@@ -2971,9 +2955,13 @@ GetAttributeInt(int cluster_id, int proc_id, const char *attr_name, int *val)
+ 	IdToStr(cluster_id,proc_id,key);
+ 
+ 	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
+-		sscanf(attr_val, "%d", val);
++		ClassAd tmp_ad;
++		tmp_ad.AssignExpr(attr_name,attr_val);
+ 		free( attr_val );
+-		return 1;
++		if( tmp_ad.LookupInteger(attr_name, *val) == 1) {
++			return 1;
++		}
++		return -1;
+ 	}
+ 
+ 	if (!JobQueue->LookupClassAd(key, ad)) {
+@@ -2995,9 +2983,13 @@ GetAttributeBool(int cluster_id, int proc_id, const char *attr_name, int *val)
+ 	IdToStr(cluster_id,proc_id,key);
+ 
+ 	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
+-		sscanf(attr_val, "%d", val);
++		ClassAd tmp_ad;
++		tmp_ad.AssignExpr(attr_name,attr_val);
+ 		free( attr_val );
+-		return 1;
++		if( tmp_ad.LookupBool(attr_name, *val) == 1) {
++			return 1;
++		}
++		return -1;
+ 	}
+ 
+ 	if (!JobQueue->LookupClassAd(key, ad)) {
+@@ -3025,15 +3017,13 @@ GetAttributeStringNew( int cluster_id, int proc_id, const char *attr_name,
+ 	IdToStr(cluster_id,proc_id,key);
+ 
+ 	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
+-		int attr_len = strlen( attr_val );
+-		if ( attr_val[0] != '"' || attr_val[attr_len-1] != '"' ) {
+-			free( attr_val );
+-			return -1;
+-		}
+-		attr_val[attr_len - 1] = '\0';
+-		*val = strdup(&attr_val[1]);
++		ClassAd tmp_ad;
++		tmp_ad.AssignExpr(attr_name,attr_val);
+ 		free( attr_val );
+-		return 1;
++		if( tmp_ad.LookupString(attr_name, val) == 1) {
++			return 1;
++		}
++		return -1;
+ 	}
+ 
+ 	if (!JobQueue->LookupClassAd(key, ad)) {
+@@ -3060,16 +3050,14 @@ GetAttributeString( int cluster_id, int proc_id, const char *attr_name,
+ 	IdToStr(cluster_id,proc_id,key);
+ 
+ 	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
+-		int attr_len = strlen( attr_val );
+-		if ( attr_val[0] != '"' || attr_val[attr_len-1] != '"' ) {
+-			free( attr_val );
+-			val = "";
+-			return -1;
+-		}
+-		attr_val[attr_len - 1] = '\0';
+-		val = attr_val + 1;
++		ClassAd tmp_ad;
++		tmp_ad.AssignExpr(attr_name,attr_val);
+ 		free( attr_val );
+-		return 1;
++		if( tmp_ad.LookupString(attr_name, val) == 1) {
++			return 1;
++		}
++		val = "";
++		return -1;
+ 	}
+ 
+ 	if (!JobQueue->LookupClassAd(key, ad)) {
+@@ -3372,7 +3360,7 @@ dollarDollarExpand(int cluster_id, int proc_id, ClassAd *ad, ClassAd *startd_ad,
+ 			bool expanded_something = false;
+ 			int search_pos = 0;
+ 			while( !attribute_not_found &&
+-					get_var(attribute_value,&left,&name,&right,NULL,true,search_pos) )
++					find_config_macro(attribute_value,&left,&name,&right,NULL,true,search_pos) )
+ 			{
+ 				expanded_something = true;
+ 				
+@@ -4245,16 +4233,20 @@ PrintQ()
+ // seperate. 
+ int get_job_prio(ClassAd *job)
+ {
+-    int job_prio;
+-    int job_status;
++    int     job_prio, 
++            pre_job_prio1, 
++            pre_job_prio2, 
++            post_job_prio1, 
++            post_job_prio2;
++    int     job_status;
+     PROC_ID id;
+     int     q_date;
+     char    buf[100];
+-	char	owner[100];
++    char    owner[100];
+     int     cur_hosts;
+     int     max_hosts;
+-	int 	niceUser;
+-	int		universe;
++    int     niceUser;
++    int     universe;
+ 
+ 	ASSERT(job);
+ 
+@@ -4290,9 +4282,24 @@ int get_job_prio(ClassAd *job)
+         return cur_hosts;
+ 	}
+ 
+-
+ 	// --- Insert this job into the PrioRec array ---
+-
++     	
++       // If pre/post prios are not defined as forced attributes, set them to INT_MIN
++	// to flag priocompare routine to not use them.
++	 
++    if (!job->LookupInteger(ATTR_PRE_JOB_PRIO1, pre_job_prio1)) {
++         pre_job_prio1 = INT_MIN;
++    }
++    if (!job->LookupInteger(ATTR_PRE_JOB_PRIO2, pre_job_prio2)) {
++         pre_job_prio2 = INT_MIN;
++    } 
++    if (!job->LookupInteger(ATTR_POST_JOB_PRIO1, post_job_prio1)) {
++         post_job_prio1 = INT_MIN;
++    }	 
++    if (!job->LookupInteger(ATTR_POST_JOB_PRIO2, post_job_prio2)) {
++         post_job_prio2 = INT_MIN;
++    }
++		   
+     job->LookupInteger(ATTR_JOB_PRIO, job_prio);
+     job->LookupInteger(ATTR_Q_DATE, q_date);
+ 	if( job->LookupInteger( ATTR_NICE_USER, niceUser ) && niceUser ) {
+@@ -4316,11 +4323,15 @@ int get_job_prio(ClassAd *job)
+     // Rather look at if it has all the hosts that it wanted.
+     if (cur_hosts>=max_hosts || job_status==HELD)
+         return cur_hosts;
+-
+-    PrioRec[N_PrioRecs].id       = id;
+-    PrioRec[N_PrioRecs].job_prio = job_prio;
+-    PrioRec[N_PrioRecs].status   = job_status;
+-    PrioRec[N_PrioRecs].qdate    = q_date;
++	     
++    PrioRec[N_PrioRecs].id             = id;
++    PrioRec[N_PrioRecs].job_prio       = job_prio;
++    PrioRec[N_PrioRecs].pre_job_prio1  = pre_job_prio1;
++    PrioRec[N_PrioRecs].pre_job_prio2  = pre_job_prio2;
++    PrioRec[N_PrioRecs].post_job_prio1 = post_job_prio1;
++    PrioRec[N_PrioRecs].post_job_prio2 = post_job_prio2;
++    PrioRec[N_PrioRecs].status         = job_status;
++    PrioRec[N_PrioRecs].qdate          = q_date;
+ 	if ( auto_id == -1 ) {
+ 		PrioRec[N_PrioRecs].auto_cluster_id = id.cluster;
+ 	} else {
+@@ -4914,3 +4925,7 @@ dirtyJobQueue()
+ {
+ 	JobQueueDirty = true;
+ }
++
++int GetJobQueuedCount() {
++    return job_queued_count;
++}
+diff --git a/src/condor_schedd.V6/qmgmt_send_stubs.cpp b/src/condor_schedd.V6/qmgmt_send_stubs.cpp
+index 0e01e05..74dca19 100644
+--- a/src/condor_schedd.V6/qmgmt_send_stubs.cpp
++++ b/src/condor_schedd.V6/qmgmt_send_stubs.cpp
+@@ -850,6 +850,44 @@ GetAllJobsByConstraint( char const *constraint, char const *projection, ClassAdL
+ 	GetAllJobsByConstraint_imp(constraint,projection,list);
+ }
+ 
++int
++GetAllJobsByConstraint_Start( char const *constraint, char const *projection)
++{
++	CurrentSysCall = CONDOR_GetAllJobsByConstraint;
++
++	qmgmt_sock->encode();
++	assert( qmgmt_sock->code(CurrentSysCall) );
++	assert( qmgmt_sock->put(constraint) );
++	assert( qmgmt_sock->put(projection) );
++	assert( qmgmt_sock->end_of_message() );
++
++	qmgmt_sock->decode();
++	return 0;
++}
++
++int
++GetAllJobsByConstraint_Next( ClassAd &ad )
++{
++	int rval = -1;
++
++	assert( CurrentSysCall == CONDOR_GetAllJobsByConstraint );
++
++	assert( qmgmt_sock->code(rval) );
++	if( rval < 0 ) {
++		assert( qmgmt_sock->code(terrno) );
++		assert( qmgmt_sock->end_of_message() );
++		errno = terrno;
++		return -1;
++	}
++
++	if ( ! (ad.initFromStream(*qmgmt_sock)) ) {
++		errno = ETIMEDOUT;
++		return -1;
++	}
++
++	return 0;
++}
++
+ ClassAd *
+ GetNextDirtyJobByConstraint( char const *constraint, int initScan )
+ {
+diff --git a/src/condor_schedd.V6/qmgr_job_updater.cpp b/src/condor_schedd.V6/qmgr_job_updater.cpp
+index 421af0c..15f76f0 100644
+--- a/src/condor_schedd.V6/qmgr_job_updater.cpp
++++ b/src/condor_schedd.V6/qmgr_job_updater.cpp
+@@ -120,6 +120,8 @@ QmgrJobUpdater::initJobQueueAttrLists( void )
+ 	common_job_queue_attrs->insert( ATTR_JOB_COMMITTED_TIME );
+ 	common_job_queue_attrs->insert( ATTR_COMMITTED_SLOT_TIME );
+ 	common_job_queue_attrs->insert( ATTR_DELEGATED_PROXY_EXPIRATION );
++	common_job_queue_attrs->insert( ATTR_BLOCK_WRITE_KBYTES );
++	common_job_queue_attrs->insert( ATTR_BLOCK_READ_KBYTES );
+ 
+ 	hold_job_queue_attrs = new StringList();
+ 	hold_job_queue_attrs->insert( ATTR_HOLD_REASON );
+diff --git a/src/condor_schedd.V6/schedd.cpp b/src/condor_schedd.V6/schedd.cpp
+index 0e977f9..ebc871e 100644
+--- a/src/condor_schedd.V6/schedd.cpp
++++ b/src/condor_schedd.V6/schedd.cpp
+@@ -30,7 +30,6 @@
+ #include "condor_attributes.h"
+ #include "condor_parameters.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ #include "classad_helpers.h"
+ #include "condor_adtypes.h"
+ #include "condor_string.h"
+@@ -419,6 +418,14 @@ Scheduler::Scheduler() :
+ 	SchedUniverseJobsRunning = 0;
+ 	LocalUniverseJobsIdle = 0;
+ 	LocalUniverseJobsRunning = 0;
++    ShadowExceptionsCumulative = 0;
++    JobsCompletedCumulative = 0;
++    JobsExitedCumulative = 0;
++    JobsStartedCumulative = 0;
++    TimeToStartCumulative = 0;
++    RunningTimeCumulative = 0;
++    LastJobsQueued = 0;
++    LastUpdateTime = time(NULL);
+ 	LocalUnivExecuteDir = NULL;
+ 	ReservedSwap = 0;
+ 	SwapSpace = 0;
+@@ -426,6 +433,27 @@ Scheduler::Scheduler() :
+ 	m_need_reschedule = false;
+ 	m_send_reschedule_timer = -1;
+ 
++    // This defines the universe of recognized exit codes, and initializes
++    // lifetime cumulative counts.
++    // It is also used in Init() to set ExitCodes timed queues.
++    ExitCodesCumulative[JOB_EXITED] = 0;
++    ExitCodesCumulative[JOB_CKPTED] = 0;
++    ExitCodesCumulative[JOB_KILLED] = 0;
++    ExitCodesCumulative[JOB_COREDUMPED] = 0;
++    ExitCodesCumulative[JOB_EXCEPTION] = 0;
++    ExitCodesCumulative[JOB_NO_MEM] = 0;
++    ExitCodesCumulative[JOB_SHADOW_USAGE] = 0;
++    ExitCodesCumulative[JOB_NOT_CKPTED] = 0;
++    ExitCodesCumulative[JOB_NOT_STARTED] = 0;
++    ExitCodesCumulative[JOB_BAD_STATUS] = 0;
++    ExitCodesCumulative[JOB_EXEC_FAILED] = 0;
++    ExitCodesCumulative[JOB_NO_CKPT_FILE] = 0;
++    ExitCodesCumulative[JOB_SHOULD_HOLD] = 0;
++    ExitCodesCumulative[JOB_SHOULD_REMOVE] = 0;
++    ExitCodesCumulative[JOB_MISSED_DEFERRAL_TIME] = 0;
++    ExitCodesCumulative[JOB_EXITED_AND_CLAIM_CLOSING] = 0;
++
++
+ 		//
+ 		// ClassAd attribute for evaluating whether to start
+ 		// a local universe job
+@@ -950,6 +978,60 @@ Scheduler::count_jobs()
+ 	m_ad->Assign(ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_DOWNLOAD,num_waiting_to_download);
+ 	m_ad->Assign(ATTR_TRANSFER_QUEUE_UPLOAD_WAIT_TIME,upload_wait_time);
+ 	m_ad->Assign(ATTR_TRANSFER_QUEUE_DOWNLOAD_WAIT_TIME,download_wait_time);
++    time_t curTime = time(NULL);
++    int updateInterval = max(int(curTime - LastUpdateTime), int(1));
++    LastUpdateTime = curTime;
++    m_ad->Assign(ATTR_UPDATE_INTERVAL, updateInterval);
++
++    // one last check for any newly-queued jobs
++    // this count in cumulative within the qmgmt package
++    int jobsQueued = GetJobQueuedCount();
++    update(JobsSubmittedTQ, jobsQueued - LastJobsQueued, curTime);
++    LastJobsQueued = jobsQueued;
++
++    // Update cumulative counts over schedd lifetime
++    m_ad->Assign(ATTR_JOBS_SUBMITTED_CUMULATIVE, jobsQueued);
++    m_ad->Assign(ATTR_JOBS_STARTED_CUMULATIVE, JobsStartedCumulative);
++    m_ad->Assign(ATTR_JOBS_EXITED_CUMULATIVE, JobsExitedCumulative);
++    m_ad->Assign(ATTR_JOBS_COMPLETED_CUMULATIVE, JobsCompletedCumulative);
++    m_ad->Assign(ATTR_SHADOW_EXCEPTIONS_CUMULATIVE, ShadowExceptionsCumulative);
++    m_ad->Assign(ATTR_MEAN_TIME_TO_START_CUMULATIVE, (JobsStartedCumulative > 0) ? double(TimeToStartCumulative)/double(JobsStartedCumulative) : 0.0);
++    m_ad->Assign(ATTR_SUM_TIME_TO_START_CUMULATIVE, TimeToStartCumulative);
++    m_ad->Assign(ATTR_MEAN_RUNNING_TIME_CUMULATIVE, (JobsCompletedCumulative > 0) ? double(RunningTimeCumulative)/double(JobsCompletedCumulative) : 0.0);
++    m_ad->Assign(ATTR_SUM_RUNNING_TIME_CUMULATIVE, RunningTimeCumulative);
++    for (map<int,int>::iterator jj(ExitCodesCumulative.begin());  jj != ExitCodesCumulative.end();  ++jj) {
++        string aname;
++        sprintf(aname, "%s%03d", ATTR_EXIT_CODE_CUMULATIVE, jj->first);
++        m_ad->Assign(aname.c_str(), jj->second);
++    }
++
++    // get the time-windowed stats
++    int jobsSubmitted = accumulate(JobsSubmittedTQ, curTime);
++    int jobsStarted = accumulate(JobsStartedTQ, curTime);
++    int jobsCompleted = accumulate(JobsCompletedTQ, curTime);
++    int jobsExited = accumulate(JobsExitedTQ, curTime);
++    int shadowExceptions = accumulate(ShadowExceptionsTQ, curTime);
++    double runningTimeSum = accumulate(RunningTimeTQ, curTime);
++    double timeToStartSum = accumulate(TimeToStartTQ, curTime);
++    double meanRunningTime = (jobsCompleted > 0) ? runningTimeSum / double(jobsCompleted) : 0.0;
++    double meanTimeToStart = (jobsStarted > 0) ? timeToStartSum / double(jobsStarted) : 0.0;
++    m_ad->Assign(ATTR_WINDOWED_STAT_WIDTH, (int)(JobsSubmittedTQ.max_time()));
++    m_ad->Assign(ATTR_JOBS_SUBMITTED, jobsSubmitted);
++    m_ad->Assign(ATTR_JOB_SUBMISSION_RATE, double(jobsSubmitted)/double(JobsSubmittedTQ.max_time()));
++    m_ad->Assign(ATTR_JOBS_STARTED, jobsStarted);
++    m_ad->Assign(ATTR_JOB_START_RATE, double(jobsStarted)/double(JobsStartedTQ.max_time()));
++    m_ad->Assign(ATTR_JOBS_COMPLETED, jobsCompleted);
++    m_ad->Assign(ATTR_JOB_COMPLETION_RATE, double(jobsCompleted)/double(JobsCompletedTQ.max_time()));
++    m_ad->Assign(ATTR_JOBS_EXITED, jobsExited);
++    m_ad->Assign(ATTR_SHADOW_EXCEPTIONS, shadowExceptions);
++    m_ad->Assign(ATTR_MEAN_TIME_TO_START, meanTimeToStart);
++    m_ad->Assign(ATTR_MEAN_RUNNING_TIME, meanRunningTime);
++    for (map<int,timed_queue<int> >::iterator jj(ExitCodesTQ.begin());  jj != ExitCodesTQ.end();  ++jj) {
++        string aname;
++        sprintf(aname, "%s%03d", ATTR_EXIT_CODE, jj->first);
++        int n = accumulate(jj->second, curTime);
++        m_ad->Assign(aname.c_str(), n);
++    }
+ 
+     daemonCore->publish(m_ad);
+     daemonCore->monitor_data.ExportData(m_ad);
+@@ -1020,6 +1102,35 @@ Scheduler::count_jobs()
+ 	m_ad->Delete (ATTR_TOTAL_SCHEDULER_IDLE_JOBS);
+ 	m_ad->Delete (ATTR_TOTAL_SCHEDULER_RUNNING_JOBS);
+ 
++    m_ad->Delete(ATTR_JOBS_SUBMITTED_CUMULATIVE);
++    m_ad->Delete(ATTR_JOBS_STARTED_CUMULATIVE);
++    m_ad->Delete(ATTR_JOBS_COMPLETED_CUMULATIVE);
++    m_ad->Delete(ATTR_JOBS_EXITED_CUMULATIVE);
++    m_ad->Delete(ATTR_SHADOW_EXCEPTIONS_CUMULATIVE);
++    m_ad->Delete(ATTR_MEAN_TIME_TO_START_CUMULATIVE);
++    m_ad->Delete(ATTR_SUM_TIME_TO_START_CUMULATIVE);
++    m_ad->Delete(ATTR_MEAN_RUNNING_TIME_CUMULATIVE);
++    m_ad->Delete(ATTR_SUM_RUNNING_TIME_CUMULATIVE);
++    for (map<int,int>::iterator jj(ExitCodesCumulative.begin());  jj != ExitCodesCumulative.end();  ++jj) {
++        sprintf(tmp, "%s%03d", ATTR_EXIT_CODE_CUMULATIVE, jj->first);
++        m_ad->Delete(tmp);
++    }
++    m_ad->Delete(ATTR_UPDATE_INTERVAL);
++    m_ad->Delete(ATTR_JOBS_SUBMITTED);
++    m_ad->Delete(ATTR_JOB_SUBMISSION_RATE);
++    m_ad->Delete(ATTR_JOBS_STARTED);
++    m_ad->Delete(ATTR_JOB_START_RATE);
++    m_ad->Delete(ATTR_JOBS_COMPLETED);
++    m_ad->Delete(ATTR_JOB_COMPLETION_RATE);
++    m_ad->Delete(ATTR_JOBS_EXITED);
++    m_ad->Delete(ATTR_SHADOW_EXCEPTIONS);
++    m_ad->Delete(ATTR_MEAN_TIME_TO_START);
++    m_ad->Delete(ATTR_MEAN_RUNNING_TIME);
++    for (map<int, timed_queue<int> >::iterator jj(ExitCodesTQ.begin());  jj != ExitCodesTQ.end();  ++jj) {
++        sprintf(tmp, "%s%03d", ATTR_EXIT_CODE, jj->first);
++        m_ad->Delete(tmp);
++    }
++
+ 	sprintf(tmp, "%s = \"%s\"", ATTR_SCHEDD_NAME, Name);
+ 	m_ad->InsertOrUpdate(tmp);
+ 
+@@ -7600,8 +7711,7 @@ Scheduler::add_shadow_rec( int pid, PROC_ID* job_id, int univ,
+ 	return new_rec;
+ }
+ 
+-static void
+-add_shadow_birthdate(int cluster, int proc, bool is_reconnect = false)
++void add_shadow_birthdate(int cluster, int proc, bool is_reconnect)
+ {
+ 	dprintf( D_ALWAYS, "Starting add_shadow_birthdate(%d.%d)\n",
+ 			 cluster, proc );
+@@ -7612,6 +7722,13 @@ add_shadow_birthdate(int cluster, int proc, bool is_reconnect = false)
+ 						ATTR_JOB_START_DATE, &job_start_date) < 0) {
+ 		// this is the first time the job has ever run, so set JobStartDate
+ 		SetAttributeInt(cluster, proc, ATTR_JOB_START_DATE, current_time);
++        
++        int qdate = 0;
++        GetAttributeInt(cluster, proc, ATTR_Q_DATE, &qdate);
++        scheduler.JobsStartedCumulative += 1;
++        scheduler.TimeToStartCumulative += current_time - qdate;
++        update(scheduler.TimeToStartTQ, current_time - qdate, current_time);
++        update(scheduler.JobsStartedTQ, 1, current_time);
+ 	}
+ 
+ 	// If we're reconnecting, the old ATTR_JOB_CURRENT_START_DATE is still
+@@ -7715,14 +7832,7 @@ Scheduler::InsertMachineAttrs( int cluster, int proc, ClassAd *machine_ad )
+ 
+ 	classad::ClassAdUnParser unparser;
+ 	classad::ClassAd *machine;
+-#if !defined (WANT_OLD_CLASSADS)
+ 	machine = machine_ad;
+-#else
+-	classad::ClassAd machine_buff;
+-	old_to_new(*machine_ad,machine_buff);
+-	machine = &machine_buff;
+-	unparser.SetOldClassAd(true);
+-#endif
+ 
+ 	ClassAd *job = GetJobAd( cluster, proc );
+ 
+@@ -9091,7 +9201,26 @@ Scheduler::jobExitCode( PROC_ID job_id, int exit_code )
+ 			return ret;
+ 		}
+ 	}
+-	
++
++    // update exit code statistics
++    int start_date = 0;
++    GetAttributeInt(job_id.cluster, job_id.proc, ATTR_JOB_START_DATE, &start_date);
++    time_t updateTime = time(NULL);
++    JobsExitedCumulative += 1;
++    update(JobsExitedTQ, 1, updateTime);
++    map<int,int>::iterator f(ExitCodesCumulative.find(exit_code));
++    if (f != ExitCodesCumulative.end()) {
++        f->second += 1;
++    }
++    map<int, timed_queue<int> >::iterator ff(ExitCodesTQ.find(exit_code));
++    if (ff != ExitCodesTQ.end()) {
++        update(ff->second, 1, updateTime);
++    }
++    // check up on submissions as long as we're updating stats
++    int jobsQueued = GetJobQueuedCount();
++    update(JobsSubmittedTQ, jobsQueued - LastJobsQueued, updateTime);
++    LastJobsQueued = jobsQueued;    
++
+ 		// We get the name of the daemon that had a problem for 
+ 		// nice log messages...
+ 	MyString daemon_name;
+@@ -9173,6 +9302,10 @@ Scheduler::jobExitCode( PROC_ID job_id, int exit_code )
+ 				// no break, fall through
+ 		case JOB_EXITED:
+ 			dprintf(D_FULLDEBUG, "Reaper: JOB_EXITED\n");
++            JobsCompletedCumulative += 1;
++            update(JobsCompletedTQ, 1, updateTime);
++            RunningTimeCumulative += updateTime - start_date;
++            update(RunningTimeTQ, updateTime - start_date, updateTime);
+ 				// no break, fall through and do the action
+ 
+ 		case JOB_COREDUMPED:
+@@ -9279,6 +9412,8 @@ Scheduler::jobExitCode( PROC_ID job_id, int exit_code )
+ 		// above, but we might need to do this in other cases in
+ 		// the future
+ 	if (reportException && srec != NULL) {
++        ShadowExceptionsCumulative += 1;
++        update(ShadowExceptionsTQ, 1, updateTime);
+ 			// Record the shadow exception in the job ad.
+ 		int num_excepts = 0;
+ 		GetAttributeInt(job_id.cluster, job_id.proc,
+@@ -10278,6 +10413,22 @@ Scheduler::Init()
+ 
+ 	m_job_machine_attrs_history_length = param_integer("SYSTEM_JOB_MACHINE_ATTRS_HISTORY_LENGTH",1,0);
+ 
++    // These are best done here in Init(), since the windows may change on reconfig, and
++    // it does not result in total loss of data, only some data if reconfiguring to smaller
++    // window, in which case it was because the user requested it.
++    int event_stat_window = param_integer("WINDOWED_STAT_WIDTH", 300, 1, MAXINT);
++    JobsSubmittedTQ.max_time(event_stat_window);
++    JobsStartedTQ.max_time(event_stat_window);
++    JobsCompletedTQ.max_time(event_stat_window);
++    JobsExitedTQ.max_time(event_stat_window);
++    ShadowExceptionsTQ.max_time(event_stat_window);
++    TimeToStartTQ.max_time(event_stat_window);
++    RunningTimeTQ.max_time(event_stat_window);
++    for (map<int,int>::iterator jj(ExitCodesCumulative.begin());  jj != ExitCodesCumulative.end();  ++jj) {
++        // Note, this also will create the entries, first time.
++        ExitCodesTQ[jj->first].max_time(event_stat_window);
++    }
++
+ 	first_time_in_init = false;
+ }
+ 
+@@ -10528,6 +10679,26 @@ extern "C" {
+ int
+ prio_compar(prio_rec* a, prio_rec* b)
+ {
++	 /* compare submitted job preprio's: higher values have more priority */
++	 /* Typically used to prioritize entire DAG jobs over other DAG jobs */
++	 if (a->pre_job_prio1 > INT_MIN && b->pre_job_prio1 > INT_MIN ) { 
++	      if( a->pre_job_prio1 < b->pre_job_prio1 ) {
++		  return 1;
++              }
++	      if( a->pre_job_prio1 > b->pre_job_prio1 ) {
++		  return -1;
++	      }
++	 }
++		 
++	 if( a->pre_job_prio2 > INT_MIN && b->pre_job_prio2 > INT_MIN ) {
++	      if( a->pre_job_prio2 < b->pre_job_prio2 ) {
++		  return 1;
++	      }
++	      if( a->pre_job_prio2 > b->pre_job_prio2 ) {
++		  return -1;
++	      }
++	 }
++	 
+ 	 /* compare job priorities: higher values have more priority */
+ 	 if( a->job_prio < b->job_prio ) {
+ 		  return 1;
+@@ -10535,7 +10706,27 @@ prio_compar(prio_rec* a, prio_rec* b)
+ 	 if( a->job_prio > b->job_prio ) {
+ 		  return -1;
+ 	 }
+-
++	 
++	 /* compare submitted job postprio's: higher values have more priority */
++	 /* Typically used to prioritize entire DAG jobs over other DAG jobs */
++	 if( a->post_job_prio1 > INT_MIN && b->post_job_prio1 > INT_MIN ) {
++	      if( a->post_job_prio1 < b->post_job_prio1 ) {
++		  return 1;
++	      }
++	      if( a->post_job_prio1 > b->post_job_prio1 ) {
++		  return -1;
++	      }
++	 }
++	 
++	 if( a->post_job_prio2 > INT_MIN && b->post_job_prio2 > INT_MIN ) {
++	      if( a->post_job_prio2 < b->post_job_prio2 ) {
++		  return 1;
++	      }
++	      if( a->post_job_prio2 > b->post_job_prio2 ) {
++		  return -1;
++	      }
++	 }
++	      
+ 	 /* here,updown priority and job_priority are both equal */
+ 
+ 	 /* check for job submit times */
+@@ -10884,7 +11075,6 @@ Scheduler::sendReschedule()
+ void
+ Scheduler::OptimizeMachineAdForMatchmaking(ClassAd *ad)
+ {
+-#if !defined(WANT_OLD_CLASSADS)
+ 		// The machine ad will be passed as the RIGHT ad during
+ 		// matchmaking (i.e. in the call to IsAMatch()), so
+ 		// optimize it accordingly.
+@@ -10897,7 +11087,6 @@ Scheduler::OptimizeMachineAdForMatchmaking(ClassAd *ad)
+ 			name.Value(),
+ 				error_msg.c_str());
+ 	}
+-#endif
+ }
+ 
+ 
+@@ -11801,12 +11990,11 @@ bool
+ moveStrAttr( PROC_ID job_id, const char* old_attr, const char* new_attr,
+ 			 bool verbose )
+ {
+-	char* value = NULL;
+-	MyString new_value;
++	MyString value;
+ 	int rval;
+ 
+-	if( GetAttributeStringNew(job_id.cluster, job_id.proc,
+-							  old_attr, &value) < 0 ) { 
++	if( GetAttributeString(job_id.cluster, job_id.proc,
++						   old_attr, value) < 0 ) { 
+ 		if( verbose ) {
+ 			dprintf( D_FULLDEBUG, "No %s found for job %d.%d\n",
+ 					 old_attr, job_id.cluster, job_id.proc );
+@@ -11814,14 +12002,8 @@ moveStrAttr( PROC_ID job_id, const char* old_attr, const char* new_attr,
+ 		return false;
+ 	}
+ 	
+-	new_value += '"';
+-	new_value += value;
+-	new_value += '"';
+-	free( value );
+-	value = NULL;
+-
+-	rval = SetAttribute( job_id.cluster, job_id.proc, new_attr,
+-						 new_value.Value() ); 
++	rval = SetAttributeString( job_id.cluster, job_id.proc, new_attr,
++							   value.Value() ); 
+ 
+ 	if( rval < 0 ) { 
+ 		if( verbose ) {
+diff --git a/src/condor_schedd.V6/schedd_files.h b/src/condor_schedd.V6/schedd_files.h
+index 204231e..075e698 100644
+--- a/src/condor_schedd.V6/schedd_files.h
++++ b/src/condor_schedd.V6/schedd_files.h
+@@ -21,7 +21,6 @@
+ #define SCHEDD_FILES_H
+ 
+ #include "condor_classad.h"
+-#include "condor_attrlist.h"
+ 
+ // procad: the class ad for the job
+ void schedd_files(ClassAd *procad);
+diff --git a/src/condor_schedd.V6/scheduler.h b/src/condor_schedd.V6/scheduler.h
+index 8d4a879..3926926 100644
+--- a/src/condor_schedd.V6/scheduler.h
++++ b/src/condor_schedd.V6/scheduler.h
+@@ -29,6 +29,8 @@
+ #ifndef _CONDOR_SCHED_H_
+ #define _CONDOR_SCHED_H_
+ 
++#include <map>
++
+ #include "dc_collector.h"
+ #include "daemon.h"
+ #include "daemon_list.h"
+@@ -54,6 +56,9 @@
+ #include "condor_timeslice.h"
+ #include "condor_claimid_parser.h"
+ #include "transfer_queue.h"
++#include "timed_queue.h"
++
++using std::map;
+ 
+ extern  int         STARTD_CONTACT_TIMEOUT;
+ const	int			NEGOTIATOR_CONTACT_TIMEOUT = 30;
+@@ -297,6 +302,7 @@ class Scheduler : public Service
+ 	friend	void	job_prio(ClassAd *);
+ 	friend  int		find_idle_local_jobs(ClassAd *);
+ 	friend	int		updateSchedDInterval( ClassAd* );
++    friend  void    add_shadow_birthdate(int cluster, int proc, bool is_reconnect = false);
+ 	void			display_shadow_recs();
+ 	int				actOnJobs(int, Stream *);
+ 	void            enqueueActOnJobMyself( PROC_ID job_id, JobAction action, bool notify );
+@@ -532,6 +538,23 @@ private:
+ 	int				SchedUniverseJobsRunning;
+ 	int				LocalUniverseJobsIdle;
+ 	int				LocalUniverseJobsRunning;
++    time_t          LastUpdateTime;
++    int             JobsStartedCumulative;
++    double          TimeToStartCumulative;
++    double          RunningTimeCumulative;
++    int             JobsCompletedCumulative;
++    int             JobsExitedCumulative;
++    int             ShadowExceptionsCumulative;
++    map<int,int>    ExitCodesCumulative;
++    int             LastJobsQueued;
++    timed_queue<int>  JobsSubmittedTQ;
++    timed_queue<int>  JobsStartedTQ;
++    timed_queue<int>  JobsCompletedTQ;
++    timed_queue<int>  JobsExitedTQ;
++    timed_queue<int>  ShadowExceptionsTQ;
++    map<int,timed_queue<int> >  ExitCodesTQ;
++    timed_queue<double>  TimeToStartTQ;
++    timed_queue<double>  RunningTimeTQ;
+ 	char*			LocalUnivExecuteDir;
+ 	int				BadCluster;
+ 	int				BadProc;
+diff --git a/src/condor_scripts/Condor.pm b/src/condor_scripts/Condor.pm
+index 26b0ca8..473ee44 100755
+--- a/src/condor_scripts/Condor.pm
++++ b/src/condor_scripts/Condor.pm
+@@ -703,7 +703,7 @@ sub Monitor
+ 	# if this line is for another cluster, ignore
+ 	if ( $line =~ /^\d+\s+\(0*(\d+)\./ && $1 != $cluster )
+ 	{
+-	    debug( "log line for cluster $1, not $cluster -- ignoring...\n" ,6);
++	    debug( "log line for cluster $1, not $cluster -- ignoring...\n" ,1);
+ 	    next LINE;
+ 	}
+ 	
+@@ -713,7 +713,7 @@ sub Monitor
+ 	    $info{'cluster'} = $1;
+ 	    $info{'job'} = $2;
+ 
+-	    debug( "Saw job evicted\n" ,5);
++	    debug( "Saw job ($1.$2) evicted\n" ,1);
+ 
+ 	    # execute callback if one is registered
+ 	    &$EvictedCallback( %info )
+@@ -738,7 +738,7 @@ sub Monitor
+ 
+ 	    if( $line =~ /^\s+\(0\) Job was not checkpointed\./ )
+ 	    {
+-		debug( "job was evicted without ckpt\n" ,5);
++		debug( "job was evicted without ckpt\n" ,1);
+ 		# execute callback if one is registered
+ 		&$EvictedWithoutCheckpointCallback( %info )
+ 		    if defined $EvictedWithoutCheckpointCallback;
+@@ -746,14 +746,14 @@ sub Monitor
+ 	    }
+ 	    elsif( $line =~ /^\s+\(1\) Job was checkpointed\./ )
+ 	    {
+-		debug( "job was evicted with ckpt\n" ,5);
++		debug( "job was evicted with ckpt\n" ,1);
+ 		# execute callback if one is registered
+ 		&$EvictedWithCheckpointCallback( %info )
+ 		    if defined $EvictedWithCheckpointCallback;
+ 	    }
+ 	    elsif( $line =~ /^\s+\(0\) Job terminated and was requeued.*$/ )
+ 	    {
+-		debug( "job was evicted and requeued\n" ,5);
++		debug( "job was evicted and requeued\n" ,1);
+ 		# execute callback if one is registered
+ 		&$EvictedWithRequeueCallback( %info )
+ 		    if defined $EvictedWithRequeueCallback;
+@@ -762,7 +762,7 @@ sub Monitor
+ 	    {
+ 		debug( "parse error on line $linenum of $info{'log'}:\n" .
+ 		       "   no checkpoint message found after eviction: " .
+-		       "continuing...\n" ,5);
++		       "continuing...\n" ,1);
+ 		# re-parse line so we don't miss whatever it said
+ 		goto PARSE;
+ 	    }
+@@ -775,7 +775,7 @@ sub Monitor
+ 	    $info{'cluster'} = $1;
+ 	    $info{'job'} = $2;
+ 
+-	    debug( "Saw job terminated\n" ,5);
++	    debug( "Saw job terminated\n" ,1);
+ 
+ 	    # decrement # of queued jobs so we will know when to exit monitor
+ 	    $num_active_jobs--;
+@@ -817,11 +817,11 @@ sub Monitor
+ 	    # abnormal termination
+ 	    elsif( $line =~ /^\s+\(0\) Abnormal termination \(signal (\d+)\)/ )
+ 	    {
+-		debug( "Loading $1 as info{'signal'}\n" ,5);
++		debug( "Loading $1 as info{'signal'}\n" ,1);
+ 		$info{'signal'} = $1;
+ 		#print "keys:".join(" ",keys %info)."\n";
+ 
+-		debug( "checking for core file...\n" ,5);
++		debug( "checking for core file...\n" ,1);
+ 
+ 		# read next line to find core file
+ 		$line = <SUBMIT_LOG>;
+@@ -860,7 +860,7 @@ sub Monitor
+ 	    {
+ 		debug( "parse error on line $linenum of $info{'log'}:\n" .
+ 		       "   no termination status message found after " .
+-		       "termination: continuing...\n" ,5);
++		       "termination: continuing...\n" ,1);
+ 		# re-parse line so we don't miss whatever it said
+ 		goto PARSE;
+ 	    }
+@@ -873,7 +873,7 @@ sub Monitor
+ 	    $info{'cluster'} = $1;
+ 	    $info{'job'} = $2;
+ 
+-	    debug( "Saw Shadow Exception\n" ,5);
++	    debug( "Saw Shadow Exception\n" ,1);
+ 
+ 		if(! defined $ShadowCallback)
+ 		{
+@@ -916,7 +916,7 @@ sub Monitor
+ 	    $info{'host'} = $3;
+ 	    $info{'sinful'} = "<$3>";
+ 	    
+-	    debug( "Saw job executing\n" ,5);
++	    debug( "Saw job executing\n" ,1);
+ 
+ 	    # execute callback if one is registered
+ 	    &$ExecuteCallback( %info )
+@@ -934,7 +934,7 @@ sub Monitor
+ 	    $info{'host'} = $3;
+ 	    $info{'sinful'} = "<$3>";
+ 
+-	    debug( "Saw job submitted\n" ,5);
++	    debug( "Saw job submitted\n" ,1);
+ 	    $submit_info{'cluster'} = $1; # squirrel it away for TimedWait
+ 
+ 	    # mark that we've seen a submit so we can start watching # of jobs
+@@ -955,7 +955,7 @@ sub Monitor
+ 	    $info{'cluster'} = $1;
+ 	    $info{'job'} = $2;
+ 
+-	    debug( "Saw job abort cluster $1 job $2\n" ,5);
++	    debug( "Saw job abort cluster $1 job $2\n" ,1);
+ 
+ 	    # decrement # of queued jobs so we will know when to exit monitor
+ 	    $num_active_jobs--;
+@@ -989,7 +989,7 @@ sub Monitor
+ 
+ 		$info{'holdreason'} = $line;
+ 
+-	    debug( "Saw job held\n" ,5);
++	    debug( "Saw job held\n" ,1);
+ 
+ 	    
+ 	    # execute callback if one is registered
+@@ -1005,7 +1005,7 @@ sub Monitor
+ 	    #$info{'host'} = $3;
+ 	    #$info{'sinful'} = "<$3:$4>";
+ 	    
+-	    debug( "Saw job released\n" ,5);
++	    debug( "Saw job released\n" ,1);
+ 
+ 	    
+ 	    # execute callback if one is registered
+diff --git a/src/condor_scripts/CondorUtils.pm b/src/condor_scripts/CondorUtils.pm
+index bdd74f4..a332152 100644
+--- a/src/condor_scripts/CondorUtils.pm
++++ b/src/condor_scripts/CondorUtils.pm
+@@ -257,7 +257,7 @@ sub runcmd {
+ 		}
+ 		$sz = $#errlines;
+ 		if($sz != -1) {
+-			PrintStdOut(\@errlines);
++			PrintStdErr(\@errlines);
+ 		}
+ 		PrintFooter();
+ 	}
+diff --git a/src/condor_scripts/batch_test.pl b/src/condor_scripts/batch_test.pl
+index d5c3967..7b962a9 100755
+--- a/src/condor_scripts/batch_test.pl
++++ b/src/condor_scripts/batch_test.pl
+@@ -113,11 +113,6 @@ Condor::DebugLevel(1);
+ #select(STDERR); $| = 1;
+ #select(STDOUT); $| = 1;
+ 
+-my $hostname = `hostname`; chomp $hostname;
+-if ( ! ($hostname =~ /\./ ) ) {
+-    warn "Warning: Host name '$hostname' is not an FQDN!!";
+-    sleep( 10 );
+-}
+ my $iswindows = CondorTest::IsThisWindows();
+ 
+ # configuration options
+@@ -377,7 +372,7 @@ if(!($wantcurrentdaemons)) {
+ 
+ }
+ 
+-my @myfig = `condor_config_val -config`;
++my @myfig = `condor_config_val -config 2>&1`;
+ debug("Current config settings are:\n",2);
+ foreach my $fig (@myfig) {
+ 	debug("$fig\n",2);
+@@ -617,33 +612,8 @@ foreach my $compiler (@compilers)
+ 					StartTestOutput($compiler,$test_program);
+ 
+ 					#print "Waiting on test\n";
+-					my $child;
+-	    			while( $child = wait() ) {
+-
+-	        			# if there are no more children, we're done
+-	        			last if $child == -1;
+-		
+-						# ignore spurious children
+-						if(! defined $test{$child}) {
+-							debug("Can't find jobname for child? <ignore>\n",2);
+-							next;
+-						} else {
+-							debug( "informed $child gone yeilding test $test{$child}\n",2);
+-						}
+-
+-						#finally
+-	        			(my $test_name) = $test{$child} =~ /(.*)\.run$/;
+-						debug( "Done Waiting on test($test_name)\n",3);
+-
+-	        			# record the child's return status
+-	        			my $status = $?;
+-
+-						CompleteTestOutput($compiler,$test_program,$child,$status);
+-						delete $test{$child};
+-						$hashsize = keys %test;
+-						debug("Tests remaining:<<$hashsize>>\n",3);
+-						last if $hashsize == 0;
+-					}
++					wait_for_test_children(\%test, $compiler,
++						suppress_start_test_output=>1);
+ 				} else {
+ 	        		# if we're the child, start test program
+ 					DoChild($test_program, $test_retirement);
+@@ -662,40 +632,17 @@ foreach my $compiler (@compilers)
+ 						debug( "current group: $currentgroup Limit: $groupsize\n",2);
+ 						if($currentgroup == $groupsize) {
+ 							debug( "wait for batch\n",2);
+-    						while( my $child = wait() ) {
+-        						# if there are no more children, we're done
+-        						last if $child == -1;
+-							
+-        						# record the child's return status
+-        						my $status = $?;
++							my $max_to_reap = 0; # unlimited;
++							if($currenttest <= $testspercompiler) {
++								$max_to_reap = 1;
++							}
++							my $reaped = wait_for_test_children(\%test, 
++								$compiler, max_to_reap => $max_to_reap);
++							debug( "wait returned test<$currentgroup>\n",2);
++							$currentgroup -= $reaped;
++							debug( "wait returned test new size<$currentgroup>\n",2);
++							debug("currenttest<$currenttest> testspercompiler<$testspercompiler>\n",2);
+ 
+-	
+-								if(! defined $test{$child}) {
+-									debug("Can't find jobname for child?<ignore>\n",2);
+-									next;
+-								} else {
+-									debug( "informed $child gone yeilding test $test{$child}\n",2);
+-								}
+-
+-								debug( "wait returned test<$currentgroup>\n",2);
+-								$currentgroup -= 1;
+-								debug( "wait returned test new size<$currentgroup>\n",2);
+-
+-        						(my $test_name) = $test{$child} =~ /(.*)\.run$/;
+-
+-								StartTestOutput($compiler,$test_name);
+-
+-								CompleteTestOutput($compiler,$test_name,$child,$status);
+-								delete $test{$child};
+-								$hashsize = keys %test;
+-								debug("Tests remaining:<<$hashsize>>\n",3);
+-								last if $hashsize == 0;
+-								# if we have more tests fire off another
+-								# and don't wait for the last one
+-								debug("currenttest<$currenttest> testspercompiler<$testspercompiler>\n",2);
+-								last if $currenttest <= $testspercompiler;
+-
+-    						} # end while
+ 							#next;
+ 						} else {
+ 							# batch size not met yet
+@@ -728,32 +675,8 @@ foreach my $compiler (@compilers)
+ 	debug("At end of compiler dir hash size <<$hashsize>>\n",2);
+ 	if(($kindwait == 0) && ($hashsize > 0)) {
+ 		debug("At end of compiler dir about to wait\n",2);
+-    	while( my $child = wait() ) {
+-        	# if there are no more children, we're done
+-        	last if $child == -1;
+-
+-        	# record the child's return status
+-        	my $status = $?;
+-
+-			$currentgroup -= 1;
+-	
+-			if(! defined $test{$child}) {
+-				debug("Can't find jobname for child?<ignore>\n",2);
+-				next;
+-			} else {
+-				debug( "informed $child gone yeilding test $test{$child}\n",2);
+-			}
+-
+-        	( my $test_name) = $test{$child} =~ /(.*)\.run$/;
+-
+-			StartTestOutput($compiler,$test_name);
+-
+-			CompleteTestOutput($compiler,$test_name,$child,$status);
+-			delete $test{$child};
+-			$hashsize = keys %test;
+-			debug("Tests remaining:<<$hashsize>>\n",2);
+-			last if $hashsize == 0;
+-    	} # end while
++		my $reaped = wait_for_test_children(\%test, $compiler);
++		$currentgroup -= $reaped;
+ 	}
+ 
+ 	if($hush == 0) {
+@@ -1286,7 +1209,8 @@ sub IsPersonalRunning
+ 			last;
+         }
+     }
+-    if ( close(CONFIG) && ($? != 13) ) {	# Ignore SIGPIPE
++        # TODO: Why would SIGPIPE cause close to return 13 (Perm denied?) $? should contain the exit status from condor_config_value
++    if ( (not close(CONFIG)) && ($? != 13) ) {	# Ignore SIGPIPE
+ 	warn "Error executing condor_config_val: '$?' '$!'"
+     }
+ 
+@@ -1520,4 +1444,80 @@ sub safe_copy {
+     }
+ }
+ 
++# Returns a string describing the exit status.  The general form will be
++# "exited with value 4", "exited with signal 7", or "exited with signal 11
++# leaving a core file" and thus is suitable for concatenating into larger
++# messages.
++sub describe_exit_status {
++	my($status) = @_;
++	my $msg = 'exited with ';
++	if($status & 127) {
++		$msg .= sprintf('signal %d%s', $status & 127,
++			($status & 128) ? 'leaving a core file': '');
++	} else {
++		$msg .= 'value '.($status >> 8);
++	}
++	return $msg;
++}
++
++# Wait for and reap child processes, taking particular note of children that 
++# are tests.
++#
++# arguments:
++#   $test - reference to the %test has mapping PIDs to test names.
++#           Reaped tests will be deleted from this hash.
++#   $compiler - the compiler name/string 
++#   %options - All elements are optional
++#      - suppress_start_test_output=>1 - don't call StartTestOutput on
++#                  each test as it exits.  Defaults to calling StartTestOutput
++#      - max_to_reap - Maximum tests to reap. If not specified or 0,
++#                  will reap until no children are left.
++sub wait_for_test_children {
++	my($test, $compiler, %options) = @_;
++
++	my($max_to_reap) = $options{'max_to_reap'};
++	my($suppress_start_test_output) = $options{'suppress_start_test_output'};
++
++	my $tests_reaped = 0;
++	while( my $child = wait() ) {
++
++		# if there are no more children, we're done
++		last if $child == -1;
++
++		# record the child's return status
++		my $status = $?;
++
++		my $debug_message = "Child PID $child ".describe_exit_status($status);
++
++		# ignore spurious children
++		if(! defined $test->{$child}) {
++			debug($debug_message.". It was not known. Ignoring.\n", 2);
++			next;
++		} else {
++			debug($debug_message.". Test: $test->{$child}.\n", 2);
++		}
++
++		$tests_reaped++;
++
++		#finally
++		(my $test_name) = $test->{$child} =~ /(.*)\.run$/;
++		debug( "Done waiting on test $test_name\n",3);
++
++		StartTestOutput($compiler, $test_name) 
++			unless $suppress_start_test_output;
++
++		CompleteTestOutput($compiler, $test_name, $child, $status);
++		delete $test->{$child};
++		$hashsize = keys %{$test};
++		debug("Tests remaining: $hashsize\n",2);
++		last if $hashsize == 0;
++
++		last if defined $max_to_reap 
++			and $max_to_reap != 0
++			and $max_to_reap <= $tests_reaped;
++	}
++
++	return $tests_reaped;
++}
++
+ 1;
+diff --git a/src/condor_shadow.V6.1/NTreceivers.cpp b/src/condor_shadow.V6.1/NTreceivers.cpp
+index d3ed7f9..7049f81 100644
+--- a/src/condor_shadow.V6.1/NTreceivers.cpp
++++ b/src/condor_shadow.V6.1/NTreceivers.cpp
+@@ -181,14 +181,25 @@ do_REMOTE_syscall()
+ 		err_msg += ':';
+ 		err_msg += syscall_sock->peer_port();
+ 		err_msg += '>';
++
++            // the socket is closed, there's no way to recover
++            // from this.  so, we have to cancel the socket
++            // handler in daemoncore and delete the relisock.
++		thisRemoteResource->closeClaimSock();
++
++            /* It is possible that we are failing to read the
++            syscall number because the starter went away
++            because we *asked* it to go away. Don't be shocked
++            and surprised if the startd/starter actually did
++            what we asked when we deactivated the claim */
++       if ( thisRemoteResource->wasClaimDeactivated() ) {
++           return 0;
++       }
++
+ 		if( Shadow->supportsReconnect() ) {
+ 				// instead of having to EXCEPT, we can now try to
+ 				// reconnect.  happy day! :)
+ 			dprintf( D_ALWAYS, "%s\n", err_msg.Value() );
+-				// the socket is closed, there's no way to recover
+-				// from this.  so, we have to cancel the socket
+-				// handler in daemoncore and delete the relisock.
+-			thisRemoteResource->closeClaimSock();
+ 
+ 			const char* txt = "Socket between submit and execute hosts "
+ 				"closed unexpectedly";
+diff --git a/src/condor_shadow.V6.1/baseshadow.cpp b/src/condor_shadow.V6.1/baseshadow.cpp
+index 5c3ab37..93b22f3 100644
+--- a/src/condor_shadow.V6.1/baseshadow.cpp
++++ b/src/condor_shadow.V6.1/baseshadow.cpp
+@@ -73,6 +73,7 @@ BaseShadow::BaseShadow() {
+ 	m_lazy_queue_update = true;
+ 	m_cleanup_retry_tid = -1;
+ 	m_cleanup_retry_delay = 30;
++	m_RunAsNobody = false;
+ }
+ 
+ BaseShadow::~BaseShadow() {
+@@ -163,9 +164,30 @@ BaseShadow::baseInit( ClassAd *job_ad, const char* schedd_addr, const char *xfer
+ 	// handle system calls with Owner's privilege
+ // XXX this belong here?  We'll see...
+ 	if ( !init_user_ids(owner.Value(), domain.Value())) {
+-		dprintf(D_ALWAYS, "init_user_ids() failed!\n");
++		dprintf(D_ALWAYS, "init_user_ids() failed as user %s\n",owner.Value() );
+ 		// uids.C will EXCEPT when we set_user_priv() now
+ 		// so there's not much we can do at this point
++		
++#if ! defined(WIN32)
++		if ( param_boolean( "SHADOW_RUN_UNKNOWN_USER_JOBS", false ) )
++		{
++			dprintf(D_ALWAYS, "trying init_user_ids() as user nobody\n" );
++			
++			owner="nobody";
++			domain=NULL;
++			if (!init_user_ids(owner.Value(), domain.Value()))
++			{
++				dprintf(D_ALWAYS, "init_user_ids() failed!\n");
++			}
++			else
++			{
++				jobAd->Assign( ATTR_JOB_RUNAS_OWNER, "FALSE" );
++				m_RunAsNobody=true;
++				dprintf(D_ALWAYS, "init_user_ids() now running as user nobody\n");
++			}
++		}
++#endif
++
+ 	}
+ 	set_user_priv();
+ 	daemonCore->Register_Priv_State( PRIV_USER );
+@@ -287,6 +309,15 @@ void BaseShadow::config()
+ 
+ 
+ int BaseShadow::cdToIwd() {
++	int iRet =0;
++	
++#if ! defined(WIN32)
++	priv_state p;
++	
++	if (m_RunAsNobody)
++		p = set_root_priv();
++#endif
++	
+ 	if (chdir(iwd.Value()) < 0) {
+ 		int chdir_errno = errno;
+ 		dprintf(D_ALWAYS, "\n\nPath does not exist.\n"
+@@ -297,9 +328,15 @@ int BaseShadow::cdToIwd() {
+ 		                    iwd.Value(), strerror(chdir_errno));
+ 		dprintf( D_ALWAYS, "%s\n",hold_reason.Value());
+ 		holdJob(hold_reason.Value(),CONDOR_HOLD_CODE_IwdError,chdir_errno);
+-		return -1;
++		iRet = -1;
+ 	}
+-	return 0;
++	
++#if ! defined(WIN32)
++	if ( m_RunAsNobody )
++		set_priv(p);
++#endif
++	
++	return iRet;
+ }
+ 
+ 
+@@ -614,6 +651,13 @@ BaseShadow::terminateJob( update_style_t kind ) // has a default argument of US_
+ 	// update the job ad in the queue with some important final
+ 	// attributes so we know what happened to the job when using
+ 	// condor_history...
++    if (m_num_cleanup_retries < 1 &&
++        param_boolean("SHADOW_TEST_JOB_CLEANUP_RETRY", false)) {
++		dprintf( D_ALWAYS,
++				 "Testing Failure to perform final update to job queue!\n");
++		retryJobCleanup();
++		return;
++    }
+ 	if( !updateJobInQueue(U_TERMINATE) ) {
+ 		dprintf( D_ALWAYS, 
+ 				 "Failed to perform final update to job queue!\n");
+@@ -773,7 +817,21 @@ void BaseShadow::initUserLog()
+ 
+ 	if ( getPathToUserLog(jobAd, logfilename) ) {
+ 		result = uLog.initialize (owner.Value(), domain.Value(), logfilename.Value(), cluster, proc, 0, gjid);
++		// It is important to NOT ignore a failure to initialize the user log,
++		// since if we fail to initialize here, then all event logging 
++		// in the shadow from this point forward are effectively ignored.
++		// So if we fail to initialize the user log, put this job on hold.
++		// Future work: it would be good to pass use the error stack to 
++		// figure out -why- the initialization failed, allowing the shadow
++		// to retry automatically -vs- go on hold depending upon the details
++		// of the failure.
+ 		if ( result == false ) {
++			MyString hold_reason;
++			hold_reason.sprintf(
++				"Failed to initialize user log to %s", logfilename.Value());
++			dprintf( D_ALWAYS, "%s\n",hold_reason.Value());
++			holdJob(hold_reason.Value(),CONDOR_HOLD_CODE_UnableToInitUserLog,0);
++			// holdJob() should not return, but just in case it does EXCEPT
+ 			EXCEPT("Failed to initialize user log to %s",logfilename.Value());
+ 		}
+ 		if (jobAd->LookupBool(ATTR_ULOG_USE_XML, use_xml)
+diff --git a/src/condor_shadow.V6.1/baseshadow.h b/src/condor_shadow.V6.1/baseshadow.h
+index f4053e9..3b5d769 100644
+--- a/src/condor_shadow.V6.1/baseshadow.h
++++ b/src/condor_shadow.V6.1/baseshadow.h
+@@ -428,6 +428,7 @@ class BaseShadow : public Service
+ 	char *uidDomain;
+ 	int reconnect_ceiling;
+ 	double reconnect_e_factor;
++	bool m_RunAsNobody;
+ 
+ 	// job parameters
+ 	int cluster;
+diff --git a/src/condor_shadow.V6.1/mpishadow.cpp b/src/condor_shadow.V6.1/mpishadow.cpp
+index 77c4503..78f2dbd 100644
+--- a/src/condor_shadow.V6.1/mpishadow.cpp
++++ b/src/condor_shadow.V6.1/mpishadow.cpp
+@@ -182,7 +182,6 @@ MPIShadow::getResources( void )
+     char *claim_id = NULL;
+     MpiResource *rr;
+ 	int job_cluster;
+-	char buf[_POSIX_PATH_MAX];
+ 
+     int numProcs=0;    // the # of procs to come
+     int numInProc=0;   // the # in a particular proc.
+@@ -277,11 +276,9 @@ MPIShadow::getResources( void )
+ 
+ 			replaceNode ( job_ad, nodenum );
+ 			rr->setNode( nodenum );
+-			sprintf( buf, "%s = %d", ATTR_NODE, nodenum );
+-			job_ad->InsertOrUpdate( buf );
+-			sprintf( buf, "%s = \"%s\"", ATTR_MY_ADDRESS,
+-					 daemonCore->InfoCommandSinfulString() );
+-			job_ad->InsertOrUpdate( buf );
++			job_ad->Assign( ATTR_NODE, nodenum );
++			job_ad->Assign( ATTR_MY_ADDRESS,
++							daemonCore->InfoCommandSinfulString()  );
+ 			rr->setJobAd( job_ad );
+ 			nodenum++;
+ 
+diff --git a/src/condor_shadow.V6.1/remoteresource.cpp b/src/condor_shadow.V6.1/remoteresource.cpp
+index 9618dc3..8a61041 100644
+--- a/src/condor_shadow.V6.1/remoteresource.cpp
++++ b/src/condor_shadow.V6.1/remoteresource.cpp
+@@ -1019,6 +1019,14 @@ RemoteResource::updateFromStarter( ClassAd* update_ad )
+ 	    jobAd->Assign(ATTR_RESIDENT_SET_SIZE, int_value);
+ 	}
+ 
++	if( update_ad->LookupInteger(ATTR_BLOCK_READ_KBYTES, int_value) ) {
++		jobAd->Assign(ATTR_BLOCK_READ_KBYTES, int_value);
++	}
++
++	if( update_ad->LookupInteger(ATTR_BLOCK_WRITE_KBYTES, int_value) ) {
++		jobAd->Assign(ATTR_BLOCK_WRITE_KBYTES, int_value);
++	}
++
+ 	if( update_ad->LookupInteger(ATTR_DISK_USAGE, int_value) ) {
+ 		if( int_value > disk_usage ) {
+ 			disk_usage = int_value;
+diff --git a/src/condor_shadow.V6.1/remoteresource.h b/src/condor_shadow.V6.1/remoteresource.h
+index a4871df..f22647e 100644
+--- a/src/condor_shadow.V6.1/remoteresource.h
++++ b/src/condor_shadow.V6.1/remoteresource.h
+@@ -336,6 +336,13 @@ class RemoteResource : public Service {
+ 		/// Did the job on this resource exit with a signal?
+ 	bool exitedBySignal( void ) { return exited_by_signal; };
+ 
++        /** Return true if we already asked the startd to deactivate
++            the claim (aka kill the starter), false if not.
++            @return true if claim deactivated, false if not
++         */
++    bool wasClaimDeactivated( void ) {
++       return already_killed_graceful || already_killed_fast; };
++
+ 		/** If the job on this resource exited with a signal, return
+ 			the signal.  If not, return -1. */
+ 	int exitSignal( void );
+diff --git a/src/condor_shadow.V6.1/shadow_v61_main.cpp b/src/condor_shadow.V6.1/shadow_v61_main.cpp
+index 68485b8..e18aa4c 100644
+--- a/src/condor_shadow.V6.1/shadow_v61_main.cpp
++++ b/src/condor_shadow.V6.1/shadow_v61_main.cpp
+@@ -82,7 +82,6 @@ void
+ parseArgs( int argc, char *argv[] )
+ {
+ 	char *opt;
+-	int args_handled = 0;
+ 
+ 	char** tmp = argv;
+ 	for( tmp++; *tmp; tmp++ ) {
+@@ -94,8 +93,6 @@ parseArgs( int argc, char *argv[] )
+ 						"ERROR: invalid cluster.proc specified: %s\n", opt);
+ 				usage(argc, argv);
+ 			}
+-				// great, it was a job id, we're done with this option
+-			args_handled++;
+ 			continue;
+ 		}
+ 		
+@@ -103,7 +100,6 @@ parseArgs( int argc, char *argv[] )
+ 				// might be the schedd's address
+ 			if( is_valid_sinful(opt)) {
+ 				schedd_addr = opt;
+-				args_handled++;
+ 				continue;
+ 			} else {
+ 				dprintf(D_ALWAYS, 
+@@ -114,7 +110,6 @@ parseArgs( int argc, char *argv[] )
+ 
+ 		if( !strcmp(opt, "--reconnect") || !strcmp(opt, "-reconnect") ) {
+ 			is_reconnect = true;
+-			args_handled++;
+ 			continue;
+ 		}
+ 
+@@ -122,7 +117,6 @@ parseArgs( int argc, char *argv[] )
+ 			char *ptr = strchr(opt, '<');
+ 			if (ptr && is_valid_sinful(ptr)) {
+ 				public_schedd_addr = ptr;
+-				args_handled++;
+ 				continue;
+ 			}
+ 			else {
+@@ -135,12 +129,10 @@ parseArgs( int argc, char *argv[] )
+ 
+ 		if (strncmp(opt, "--xfer-queue=", 13) == 0) {
+ 			xfer_queue_contact_info = opt+13;
+-			args_handled++;
+ 			continue;
+ 		}
+ 
+ 		if (strcmp(opt, "--no-schedd-updates") == 0) {
+-			args_handled++;
+ 			sendUpdatesToSchedd = false;
+ 			continue;
+ 		}
+@@ -154,12 +146,16 @@ parseArgs( int argc, char *argv[] )
+ 			usage(argc, argv);
+ 		}
+ 		job_ad_file = opt;
+-		args_handled++;
+-	}
+-	if( args_handled < 3 || args_handled != (argc-1) ) {
+-		dprintf( D_ALWAYS, "ERROR: missing command-line arguments!" );
+-		usage(argc, argv);
+ 	}
++
++		// A proper model of arguments should be presented here and
++		// used to validate the provided arguments. It would be
++		// something like:
++		// if no cluster/proc, who cares
++		// if no job_ad_file, fail
++		// And that might be it.
++		// The validation used to count arguments processed, which was
++		// easily fooled.
+ }
+ 
+ 
+diff --git a/src/condor_startd.V6/Reqexp.cpp b/src/condor_startd.V6/Reqexp.cpp
+index 069605d..04e8dc4 100644
+--- a/src/condor_startd.V6/Reqexp.cpp
++++ b/src/condor_startd.V6/Reqexp.cpp
+@@ -106,7 +106,7 @@ Reqexp::compute( amask_t how_much )
+ 			*/
+ 			const char *default_vcp_expr = 
+ 			"("
+-			  "((TARGET.JobUniverse == 1) == FALSE) || "
++			  "TARGET.JobUniverse =!= 1 || "
+ 			  "("
+ 			    "(MY.CheckpointPlatform =!= UNDEFINED) &&"
+ 			    "("
+diff --git a/src/condor_startd.V6/ResAttributes.cpp b/src/condor_startd.V6/ResAttributes.cpp
+index bd16f8c..cd992c5 100644
+--- a/src/condor_startd.V6/ResAttributes.cpp
++++ b/src/condor_startd.V6/ResAttributes.cpp
+@@ -22,8 +22,13 @@
+ #include "startd.h"
+ #include <math.h>
+ 
++#ifdef WIN32
++#include "winreg.windows.h"
++#endif
+ 
+ MachAttributes::MachAttributes()
++   : m_user_settings_init(false)
++   , m_user_specified(NULL, ";")
+ {
+ 	m_mips = -1;
+ 	m_kflops = -1;
+@@ -94,6 +99,7 @@ MachAttributes::MachAttributes()
+ 	}
+ 	m_local_credd = NULL;
+ 	m_last_credd_test = 0;
++    m_dot_Net_Versions = NULL;
+ #endif
+ }
+ 
+@@ -105,15 +111,182 @@ MachAttributes::~MachAttributes()
+ 	if( m_uid_domain ) free( m_uid_domain );
+ 	if( m_filesystem_domain ) free( m_filesystem_domain );
+ 	if( m_ckptpltfrm ) free( m_ckptpltfrm );
++
++    AttribValue *val = NULL;
++    m_lst_dynamic.Rewind();
++    while (val = m_lst_dynamic.Next() ) {
++       if (val) free (val);
++       m_lst_dynamic.DeleteCurrent();
++    }
++
++    m_lst_static.Rewind();
++    while (val = m_lst_static.Next() ) {
++       if (val) free (val);
++       m_lst_static.DeleteCurrent();
++    }
++    m_user_specified.clearAll();
+ #if defined(WIN32)
+ 	if( m_local_credd ) free( m_local_credd );
++    if( m_dot_Net_Versions ) free ( m_dot_Net_Versions );
++
++    release_all_WinPerf_results();
+ #endif
+ }
+ 
++void
++MachAttributes::init_user_settings()
++{
++	m_user_settings_init = true;
++
++	AttribValue *val = NULL;
++	m_lst_dynamic.Rewind();
++	while (val = m_lst_dynamic.Next())
++    {
++        if (val) free (val);
++	    m_lst_dynamic.DeleteCurrent();
++	}
++
++	m_lst_static.Rewind();
++	while (val = m_lst_static.Next())
++    {
++	    if (val) free (val);
++	    m_lst_static.DeleteCurrent();
++	}
++
++	m_user_specified.clearAll();
++	char * pszParam = NULL;
++   #ifdef WIN32
++	pszParam = param("STARTD_PUBLISH_WINREG");
++   #endif
++	if (pszParam)
++    {
++		m_user_specified.initializeFromString(pszParam);
++		free(pszParam);
++	}
++
++	m_user_specified.rewind();
++	while(char * pszItem = m_user_specified.next())
++    {
++		// if the reg_item is of the form attr_name=reg_path;
++		// then skip over the attr_name and '=' and trailing
++		// whitespace.  But if the = is after the first \, then
++		// it's a part of the reg_path, so ignore it.
++		//
++		const char * pkey = strchr(pszItem, '=');
++		const char * pbs  = strchr(pszItem, '\\');
++		if (pkey && ( ! pbs || pkey < pbs)) {
++			++pkey; // skip the '='
++		} else {
++			pkey = pszItem;
++		}
++
++		// skip any leading whitespace in the key
++		while (isspace(pkey[0]))
++			++pkey;
++
++       #ifdef WIN32
++		char * pszAttr = generate_reg_key_attr_name("WINREG_", pszItem);
++
++		// if the keyname begins with 32 or 64, use that to designate either
++		// the WOW64 or WOW32 view of the registry, but don't pass the
++		// leading number on to the lower level code.
++		int options = 0;
++		if (isdigit(pkey[0])) {
++			options = atoi(pkey);
++			while (isdigit(pkey[0])) {
++				++pkey;
++			}
++		}
++
++		int ixStart = 0;
++		int cch = lstrlen(pkey);
++		HKEY hkey = parse_hive_prefix(pkey, cch, &ixStart);
++		if (hkey == HKEY_PERFORMANCE_DATA)  // using dynamic data HIVE
++        {
++			// For dynamic data, we have to build a query
++			// for the Windows Performance registry which we
++			// will execute periodically to update the data.
++			// the specific query is added to the dynamic list, and
++			// the query Key (Memory, Processor, etc) is added
++			// to the WinPerf list.
++			//
++            AttribValue * pav = add_WinPerf_Query(pszAttr, pkey+ixStart+1);
++            if (pav)
++		        m_lst_dynamic.Append(pav);
++		}
++        else
++        {
++			// for static registry data, get the current value from the 
++			// registry and store it in an AttribValue in the static list.
++			//
++			char * value = get_windows_reg_value(pkey, NULL, options);
++            AttribValue * pav = AttribValue::Allocate(pszAttr, value);
++            if (pav)
++            {
++                pav->pquery = (void*)pkey;
++				m_lst_static.Append(pav);
++			}
++		}
++
++       #else
++		// ! Win32.
++
++       #endif // WIN32
++
++	} // end while(m_user_specified.next());
++
++#ifdef WIN32
++    // build and save off the string of .NET versions.
++    //
++    char* detected_versions = param("DOT_NET_VERSIONS");
++    if( ! detected_versions)
++    {
++        string s_dot_Net_Versions;
++
++        static const struct {
++            const char * pszKey;
++            const char * pszValue;
++            const char * pszVer;
++        } aNet[] = {
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v1.1.4322",  "Install", "1.1",
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727", "Install", "2.0",
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.0",       "Install", "3.0",
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5",       "Install", "3.5",
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Client", "Install", "4.0Client",
++           "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full",   "Install", "4.0Full",
++        };
++
++       for (int ii = 0; ii < NUM_ELEMENTS(aNet); ++ii)
++       {
++           char* pszVal = get_windows_reg_value(aNet[ii].pszKey, aNet[ii].pszValue, 0);
++           if (pszVal)
++           {
++               DWORD dw = atoi(pszVal);
++               if(dw)
++               {
++                   if( ! s_dot_Net_Versions.empty())
++                       s_dot_Net_Versions.append(",");
++                  s_dot_Net_Versions.append(aNet[ii].pszVer);
++               }
++               free(pszVal);
++           }
++       }
++
++       if ( ! s_dot_Net_Versions.empty())
++           detected_versions = _strdup(s_dot_Net_Versions.c_str());
++    }
++    if(m_dot_Net_Versions) free(m_dot_Net_Versions);
++    m_dot_Net_Versions = detected_versions;
++
++#endif //WIN32
++
++}
++
+ 
+ void
+ MachAttributes::init()
+ {
++	this->init_user_settings();
+ 	this->compute( A_ALL );
+ }
+ 
+@@ -121,6 +294,12 @@ MachAttributes::init()
+ void
+ MachAttributes::compute( amask_t how_much )
+ {
++	// the startd doesn't normally call the init() method (bug?),
++	// it just starts calling compute, so in order to gurantee that
++	// init happens, we put check here to see if user settings have been initialized
++	if ( ! m_user_settings_init)
++		init_user_settings();
++
+ 	if( IS_STATIC(how_much) && IS_SHARED(how_much) ) {
+ 
+ 			// Since we need real values for them as soon as a
+@@ -205,6 +384,25 @@ MachAttributes::compute( amask_t how_much )
+ 			m_last_keypress = my_timer;
+ 			m_seen_keypress = true;
+ 		}
++
++#ifdef WIN32
++        update_all_WinPerf_results();
++#endif
++
++        AttribValue *pav = NULL;
++        m_lst_dynamic.Rewind();
++        while (pav = m_lst_dynamic.Next() ) {
++           if (pav) {
++             #ifdef WIN32
++              if ( ! update_WinPerf_Value(pav))
++                 pav->vtype = AttribValue_DataType_Max; // undefined vtype
++             #else
++              if (pav->pquery) {
++                 // insert code to update pav from pav->pquery
++              }
++             #endif
++           }
++        }
+ 	}
+ 
+ 	if( IS_TIMEOUT(how_much) && IS_SUMMED(how_much) ) {
+@@ -228,454 +426,6 @@ MachAttributes::final_idle_dprintf()
+ 	}
+ }
+ 
+-//
+-// Add Windows registry keys to machine ClassAds
+-//
+-#ifdef WIN32 
+-
+-// parse the start of a string and return hive key if the start matches
+-// one of the known hive designators HKLM for HKEY_LOCAL_MACHINE, etc.
+-// if the caller passes pixPrefixSep, then this function will also return
+-// the index of the first character after the hive prefix, which should be
+-// \0, \ or /. 
+-static HKEY parse_hive_prefix(const char * psz, int cch, int * pixPrefixSep)
+-{
+-	HKEY hkey = NULL;
+-	char ach[5]	= {0};
+-	for (int ii = 0; ii <= cch && ii < NUM_ELEMENTS(ach); ++ii)
+-	{
+-		if (psz[ii] == '\\' || /*psz[ii] == '/' || */ psz[ii] == '\0')
+-		{
+-			static const struct {
+-				long id;
+-				HKEY key;
+-			} aMap[] = {
+-				'HKCR', HKEY_CLASSES_ROOT,
+-				'HKCU', HKEY_CURRENT_USER,
+-				'HKLM',	HKEY_LOCAL_MACHINE,
+-				'HKU\0',HKEY_USERS,
+-				'HKPD',	HKEY_PERFORMANCE_DATA,
+-				'HKPT',	HKEY_PERFORMANCE_TEXT,
+-				'HKPN',	HKEY_PERFORMANCE_NLSTEXT,
+-				'HKCC',	HKEY_CURRENT_CONFIG,
+-				'HKDD', HKEY_DYN_DATA,
+-			};
+-
+-			long id = htonl(*(long*)&ach);
+-			for (int ix = 0; ix < NUM_ELEMENTS(aMap); ++ix)
+-			{
+-				if (id == aMap[ix].id)
+-				{
+-					hkey = aMap[ix].key;
+-					break;
+-				}
+-			}
+-				
+-			if (hkey && pixPrefixSep)
+-				*pixPrefixSep = ii;
+-			break;
+-		}
+-		ach[ii] = toupper(psz[ii]);
+-	}
+-
+-	return hkey;
+-}
+-
+-// return a string name for one of the HKEY_xxx constants
+-// we use this for logging used for logging.
+-//
+-static const char * root_key_name(HKEY hroot)
+-{
+-	static const struct {
+-		const char * psz;
+-		HKEY key;
+-	} aMap[] = {
+-		"HKCR", HKEY_CLASSES_ROOT,
+-		"HKCU", HKEY_CURRENT_USER,
+-		"HKLM",	HKEY_LOCAL_MACHINE,
+-		"HKU",	HKEY_USERS,
+-		"HKPD",	HKEY_PERFORMANCE_DATA,
+-		"HKPT",	HKEY_PERFORMANCE_TEXT,
+-		"HKPN",	HKEY_PERFORMANCE_NLSTEXT,
+-		"HKCC",	HKEY_CURRENT_CONFIG,
+-		"HKDD", HKEY_DYN_DATA,
+-	};
+-
+-	for (int ix = 0; ix < NUM_ELEMENTS(aMap); ++ix)
+-	{
+-		if (hroot == aMap[ix].key)
+-		{
+-			return aMap[ix].psz;
+-		}
+-	}
+-	return NULL;
+-}
+-
+-// return the error message string
+-// for a given windows error code.  used for logging.  
+-//
+-static const char * GetLastErrMessage(int err, char * szMsg, int cchMsg)
+-{
+-	int cch = FormatMessage ( 
+-				FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+-				NULL, 
+-				err, 
+-				MAKELANGID ( LANG_NEUTRAL, SUBLANG_DEFAULT ), 
+-				szMsg, 
+-				cchMsg, 
+-				NULL );
+-	if (cch > 0)
+-	{
+-
+-		// remove trailing \r\n
+-		while (cch > 0 && (szMsg[cch-1] == '\r' || szMsg[cch-1] == '\n'))
+-			szMsg[--cch] = 0;
+-	}
+-	else
+-	{
+-		// no message found, print the last error code
+-		wsprintf(szMsg, "0x%X", err);
+-	}
+-
+-	return szMsg;
+-}
+-
+-
+-//
+-// returns a strdup'd string value for the given windows registry entry.
+-//
+-static char * get_windows_reg_value(
+-	const char * pszRegKey, 
+-	const char * pszValueName, 
+-	int          options = 0)
+-{
+-	char * value = NULL;   // return value from this function
+-	char * pszTemp = NULL; // in case we need to copy the keyname
+-	int cch = lstrlen(pszRegKey);
+-
+-	int ixStart = 0; 
+-	HKEY hroot = parse_hive_prefix(pszRegKey, cch, &ixStart);
+-	if (hroot)
+-	{
+-		pszRegKey += ixStart;
+-		if (pszRegKey[0] == '\\')
+-			++pszRegKey;
+-		// really short keys like HKCR\.bat can end up with an empty
+-		// keyname once we strip off the hive prefix, if that happens
+-		// use the valuename as the keyname and set the valuename to ""
+-		if ( ! pszRegKey[0] && pszValueName)
+-		{
+-			pszRegKey = pszValueName;
+-			pszValueName = "";
+-		}
+-	}
+-	else
+-	{
+-		hroot = HKEY_LOCAL_MACHINE;
+-	}
+-
+-	// check if the caller wanted to force the 32 bit or 64 bit registry
+-	//
+-	int force = 0;
+-	if ((options & 32) || (options & KEY_WOW64_32KEY))
+-		force = KEY_WOW64_32KEY;
+-	else if ((options & 64) || (options & KEY_WOW64_64KEY))
+-		force = KEY_WOW64_64KEY;
+-
+-	bool fAutoEnumValues = ((options & 1) != 0);
+-	bool fEnumSubkeys = ((options & 2) != 0);
+-	bool fEnumValues =	((options & 4) != 0);
+-
+-	// try and open the key
+-	//
+-	HKEY hkey = NULL;
+-	LONG lres = RegOpenKeyEx(hroot, pszRegKey, 0, KEY_READ | force, &hkey);
+-
+-	// if the key wasn't found, and the caller didn't pass a value name, perhaps
+-	// the last element of the registry path is really a value name, try opening
+-	// the parent of the passed in key. if that works, set the keyname to the
+-	// parent and the valuename to the child and continue on.
+-	//
+-	if ((ERROR_FILE_NOT_FOUND == lres) && ! pszValueName)
+-	{
+-		pszTemp = strdup(pszRegKey); // this gets free'd as we leave the function.
+-		char * pszName = strrchr(pszTemp, '\\');
+-		if (pszName)
+-		{
+-           *pszName++ = 0;
+-			lres = RegOpenKeyEx(hroot, pszTemp, 0, KEY_READ | force, &hkey);
+-			if (ERROR_SUCCESS == lres)
+-			{
+-				pszRegKey = pszTemp;
+-				pszValueName = pszName;
+-			}
+-		}
+-	}
+-
+-	// if we failed to open the base key, log the error and fall down
+-	// to return null. otherwise try and read the value indicated
+-	// by pszValueName.
+-	// 
+-	if (ERROR_SUCCESS != lres)
+-	{
+-		if (ERROR_FILE_NOT_FOUND == lres)
+-		{
+-			// the key did not exist.
+-			dprintf( D_FULLDEBUG, 
+- 				"The Registry Key \"%s\\%s\" does not exist\n",
+-					root_key_name(hroot), pszRegKey);
+-		}
+-		else
+-		{
+-			// there was some other error, probably an access violation.
+-			char szMsg[MAX_PATH];
+-			dprintf( D_ALWAYS, 
+-				"Failed to open Registry Key \"%s\\%s\"\nReason: %s\n",
+-					root_key_name(hroot), pszRegKey, 
+-					GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
+-		}
+-		ASSERT( ! value);
+-	}
+-	else
+-	{
+-		ULARGE_INTEGER uli; // in case we need to read a dword/qword value.
+-		DWORD vtype = REG_SZ, cbData = 0;
+-		const char * pszName = pszValueName; // so we can switch to NULL if we need to
+-		lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, NULL, &cbData);
+-
+-		// if the named value was not found, check to see if it's actually a subkey
+-		// if it is, open the subkey, set the valuename to null, and continue on
+-		// as if that was what the caller passed to begin with.
+-		//
+-		if ((ERROR_FILE_NOT_FOUND == lres) && pszName && pszName[0])
+-		{
+-			HKEY hkeyT = NULL;
+-			LONG lResT = RegOpenKeyEx(hkey, pszName, 0, KEY_READ | force, &hkeyT); 
+-			if (ERROR_SUCCESS == lResT)
+-			{
+-				// yep, it's a key, pretend that we opened it rather than its parent.
+-				RegCloseKey(hkey);
+-				hkey = hkeyT;  // so the code below will close this for us.
+-
+-				pszName = NULL;
+-				cbData = 0;
+-				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, NULL, &cbData);
+-			}
+-		}
+-
+-		// the value exists, but we did not retrieve it yet, we need to allocate
+-		// space and then queryvalue again. 
+-		//
+-		if (ERROR_MORE_DATA == lres || ERROR_SUCCESS == lres)
+-		{
+-			if (vtype == REG_MULTI_SZ || vtype == REG_SZ || vtype == REG_EXPAND_SZ || vtype == REG_LINK || vtype == REG_BINARY)
+-			{
+-				value = (char*)malloc(cbData+1);	
+-				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, (byte*)value, &cbData);
+-			}
+-			else
+-			{
+-				cbData = sizeof(uli);
+-				uli.QuadPart = 0; // in case we don't read the whole 8 bytes.
+-				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, (byte*)&uli, &cbData);
+-			}
+-		}
+-
+-		if (ERROR_FILE_NOT_FOUND == lres)
+-		{
+-			if (pszName && pszName[0])
+-			{
+-				// the named value does not exist
+-				//
+-				dprintf( D_FULLDEBUG, 
+- 					"The Registry Key \"%s\\%s\" does not have a value named \"%s\"\n",
+-						root_key_name(hroot), pszRegKey, pszName);
+-			}
+-			else
+-			{
+-				// the key exists, but it has no default value. This is common for keys
+-				// To distinquish between this case and 'the key does not exist'
+-				// we will return a "" string here.
+-				//
+-				value = strdup("");
+-				dprintf ( D_FULLDEBUG, "The Registry Key \"%s\\%s\\%s\" has no default value.\n", 
+-					root_key_name(hroot), pszRegKey, pszValueName);
+-				fEnumValues = fAutoEnumValues;
+-			}
+-		}
+-		else if (ERROR_SUCCESS != lres)
+-		{
+-			// there was some other error, probably an access violation.
+-			//
+-			char szMsg[MAX_PATH];
+-			dprintf( D_ALWAYS, 
+-				"Failed to read Registry Key \"%s\\%s\\%s\"\nReason: %s\n", 
+-					root_key_name(hroot), pszRegKey, pszValueName, 
+-					GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
+-		}
+-		else
+-		{
+-			// we got a value, now have to turn it into a string.
+-			//
+-			char sz[10] = "";
+-			switch (vtype)
+-			{
+-			case REG_LINK:
+-			case REG_SZ:
+-				break;
+-			case REG_EXPAND_SZ:
+-				// TJ: write this.
+-				break;
+-			case REG_MULTI_SZ:
+-				// TJ: write this.
+-				break;
+-
+-			case REG_DWORD_BIG_ENDIAN:
+-				uli.LowPart = htonl(uli.LowPart);
+-				// fall though
+-			case REG_DWORD:
+-				wsprintf(sz, "%u", uli.LowPart);
+-				break;
+-
+-			case REG_QWORD:
+-				wsprintf(sz, "%lu", uli.QuadPart);
+-				break;
+-
+-			case REG_BINARY:
+-				break;
+-			}
+-
+-			if ( ! value) 
+-				value = strdup(sz);
+-
+-			dprintf ( D_FULLDEBUG, "The Registry Key \"%s\\%s\\%s\" contains \"%s\"\n", 
+-				root_key_name(hroot), pszRegKey, pszValueName, value);
+-		}
+-
+-		// In fulldebug mode, enumerate the value names and subkey names
+-		// if requested.
+-		//
+-		if (DebugFlags & D_FULLDEBUG) 
+-		{
+-			if (fEnumValues)
+-			{
+-				int ii = 0;
+-				for (ii = 0; ii < 10000; ++ii)
+-				{
+-					TCHAR szName[MAX_PATH];
+-					DWORD cchName = NUM_ELEMENTS(szName), vt, cbData = 0;
+-					lres = RegEnumValue(hkey, ii, szName, &cchName, 0, &vt, NULL, &cbData);
+-					if (ERROR_NO_MORE_ITEMS == lres)
+-						break;
+-					if ( ! ii) dprintf ( D_FULLDEBUG, " Named values:\n");
+-					dprintf( D_FULLDEBUG, "  \"%s\" = %d bytes\n", szName, cbData);
+-				}
+-				if ( ! ii) dprintf ( D_FULLDEBUG, " No Named values\n");
+-			}
+-			if (fEnumSubkeys)
+-			{
+-				int ii = 0;
+-				for (ii = 0; ii < 10000; ++ii)
+-				{
+-					TCHAR szName[MAX_PATH]; 
+-					DWORD cchName = NUM_ELEMENTS(szName);
+-					lres = RegEnumKeyEx(hkey, ii, szName, &cchName, NULL, NULL, NULL, NULL);
+-					if (ERROR_NO_MORE_ITEMS == lres)
+-						break;
+-					if ( ! ii) dprintf ( D_FULLDEBUG, " Subkeys:\n");
+-					dprintf( D_FULLDEBUG, "  \"%s\"\n", szName);
+-				}
+-				if ( ! ii) dprintf ( D_FULLDEBUG, " No Subkeys\n");
+-			}
+-		}
+-
+-		RegCloseKey(hkey);
+-	}
+-	// free temp buffer that we may have used to crack the key
+-	if (pszTemp) free(pszTemp);
+-
+-	return value;
+-}
+-
+-// generate an ClassAd attribute name from a registry key name.
+-// we do this by first checking to see if the input is of the form attr=reg_path
+-// if it is, just extract attr, otherwise we extract the last N pieces of 
+-// the registry path and convert characters that aren't allowed in attribute names
+-// to _.  
+-// 
+-// returns an allocated string that is the concatinaton of prefix and attr
+-//
+-char * generate_reg_key_attr_name(const char * pszPrefix, const char * pszKeyName)
+-{
+-	int cchPrefix = pszPrefix ? strlen(pszPrefix) : 0;
+-
+-	// is the input of the form attr_name=reg_path?  if so, then
+-	// we want to return prefix + attr_name. 
+-	//
+-	const char * psz = strchr(pszKeyName, '=');
+-	const char * pbs = strchr(pszKeyName, '\\');
+-	if (psz && ( ! pbs || psz < pbs))
+-	{
+-		int    cch = (psz - pszKeyName);
+-		char * pszAttr = (char*)malloc(cchPrefix + cch +1);
+-		if (pszPrefix)
+-			strcpy(pszAttr, pszPrefix);
+-		memcpy(pszAttr + cchPrefix, pszKeyName, cch);
+-		pszAttr[cchPrefix + cch] = 0;
+-		while (cch > 0 && isspace(pszAttr[cchPrefix+cch-1]))
+-		{
+-			pszAttr[cchPrefix+cch-1] = 0;
+-		    --cch;
+-		}
+-		return pszAttr;
+-	}
+-	
+-	// no explicit attr_name, so generate it from the last N parts
+-	// of the keyname. we start by walking backward counting \ until
+-	// we hit N or the start of the input.
+-	//
+-	psz = pszKeyName + strlen(pszKeyName);
+-	int cSteps = 3;
+-	while (psz > pszKeyName && (psz[-1] != '\\' || --cSteps > 0))
+-		--psz;
+-
+-	// the identifier can't start with a digit, so back up one more
+-	// character if it does. (psz should end up pointing to a \)
+-	if ( ! cchPrefix && psz > pszKeyName && isdigit(*psz))
+-		--psz;
+-
+-	// allocate space for prefix + key_part and copy
+-	// both into the allocated buffer.
+-	//
+-	int cch = strlen(psz);
+-	char * pszAttr = (char *)malloc(cchPrefix + cch + 1);
+-    if (pszPrefix)
+-		strcpy(pszAttr, pszPrefix);
+-	memcpy(pszAttr + cchPrefix, psz, cch);
+-	pszAttr[cchPrefix + cch] = 0;
+-
+-	// a bit of a special case, if the keyname ends in a "\"
+-	// pretend that the last slash isn't there.
+-	//
+-	if (cch > 1 && pszAttr[cchPrefix + cch-1] == '\\')
+-		pszAttr[cchPrefix + cch-1] = 0;
+-
+-	// only A-Za-z0-9 are valid for identifiers
+-	// convert other characters into _
+-	//
+-	char * pszT = pszAttr;
+-	while (*pszT)
+-	{ 
+-		if ( ! isalnum(*pszT))
+-			pszT[0] = '_';
+-		++pszT;
+-	}
+-
+-	return pszAttr;
+-}
+-
+-#endif // WIN32
+-
+ void
+ MachAttributes::publish( ClassAd* cp, amask_t how_much) 
+ {
+@@ -719,9 +469,25 @@ MachAttributes::publish( ClassAd* cp, amask_t how_much)
+ 			}
+ 		}
+ 
+-		// publish values from the window's registry as specified
+-		// in the MACHINE_AD_REGISTRY_KEYS param.
++
++        /*
++        Publish .Net versions installed on current machine assuming
++        the option is turned on..
++        */
++        if(param_boolean("STARTD_PUBLISH_DOTNET", true))
++        {
++            if(m_dot_Net_Versions)
++                cp->Assign(ATTR_DOTNET_VERSIONS, m_dot_Net_Versions);
++        }
++
++        // publish values from the window's registry as specified
++		// in the STARTD_PUBLISH_WINREG param.
+ 		//
++		m_lst_static.Rewind();
++		while (AttribValue *pav = m_lst_static.Next()) {
++			if (pav) pav->AssignToClassAd(cp);
++		}
++        /*
+      	char * pubreg_param = param("STARTD_PUBLISH_WINREG");
+ 		if (pubreg_param) {
+ 			StringList reg_list(pubreg_param, ";");
+@@ -773,8 +539,8 @@ MachAttributes::publish( ClassAd* cp, amask_t how_much)
+ 
+ 			free (pubreg_param);
+ 		}
+-
+-#endif
++        */
++#endif // defined ( WIN32 )
+ 
+ 	}
+ 
+@@ -818,6 +584,11 @@ MachAttributes::publish( ClassAd* cp, amask_t how_much)
+ 		cp->Assign( ATTR_CLOCK_MIN, m_clock_min );
+ 
+ 		cp->Assign( ATTR_CLOCK_DAY, m_clock_day );
++
++		m_lst_dynamic.Rewind();
++		while (AttribValue *pav = m_lst_dynamic.Next() ) {
++			if (pav) pav->AssignToClassAd(cp);
++		}
+ 	}
+ 
+ }
+diff --git a/src/condor_startd.V6/ResAttributes.h b/src/condor_startd.V6/ResAttributes.h
+index dfbf095..0df6b27 100644
+--- a/src/condor_startd.V6/ResAttributes.h
++++ b/src/condor_startd.V6/ResAttributes.h
+@@ -83,6 +83,98 @@ const float AUTO_SHARE = 123;
+ // evenly between slots using AUTO_MEM.
+ const int AUTO_MEM = -123;
+ 
++// This is used with the AttribValue structure to identify the datatype
++// for the value (selects an entry in the union)
++enum {
++	AttribValue_DataType_String = 0,
++	AttribValue_DataType_Double,
++	AttribValue_DataType_Int,
++
++	AttribValue_DataType_Max // this should be last
++};
++
++// holds a single value to be written into a classad, note that
++// fields with names that begin with ix are offsets from the start
++// of the structure to the actual field data.  In use, one would 
++// normally allocate (sizeof(AttribValue) + size_of_strings + size_of_extra_data)
++// and then setup index fields to make it possible to locate the extra data.
++//
++typedef struct _AttribValue {
++	const char * pszAttr;	// Classad attrib name, may be a pointer to a constant
++                            // or a pointer into the allocation for this structure.
++
++	void * pquery;			// pointer to the original query used to get the data.
++                            // may be null. do not free from this structure.
++
++	int cb;                 // allocation size of this structure, may be larger than sizeof(AttribValue)
++	int vtype;              // an AttribValue_DataType_xxx value, the Attrib data type decodes the value union
++	union {                 // 0=string, 1=double, 2=int
++		struct {
++			int       ix;   // offset from the start of this structure to the string data
++			int       cb;   // size of the string data in bytes including terminating null.
++			} zstr;         // vtype == AttribValue_DataType_String
++		double    d;        // vtype == AttribValue_DataType_Double
++		int       i;        // vtype == AttribValue_DataType_Int
++		long long ll;       // vtype == AttribValue_DataType_Int64 (future)
++		//struct {
++		//	int       ix;
++		//	int		  cb;
++		//    } bin;          // vtype == AttribValue_DataType_Bin
++	} value;
++
++	// helper function to fetch the value of string type values.
++    // AttribValue is a packed structure, a single allocation with a header
++	//
++	const char * StringValue() const {
++        if ((this->vtype == AttribValue_DataType_String) &&
++            (this->value.zstr.ix >= (int)sizeof(*this)) &&
++            (this->value.zstr.ix < this->cb)) {
++			return (const char *)this + this->value.zstr.ix;
++        }
++        return NULL;
++    }
++
++    void AssignToClassAd(ClassAd* cp) const {
++        switch (this->vtype) {
++            case AttribValue_DataType_String:
++                cp->Assign(this->pszAttr, this->StringValue());
++                break;
++            case AttribValue_DataType_Double:
++                cp->Assign(this->pszAttr, this->value.d);
++                break;
++            case AttribValue_DataType_Int:
++                cp->Assign(this->pszAttr, this->value.i);
++                break;
++        }
++    }
++
++    // allocate an initialized packed attrib and value, this consists of a
++    // header (struct _AttribValue) followed by the attribute string, followed by
++    // the value string.
++    //
++    static struct _AttribValue * Allocate(const char * pszAttr, const char * value) {
++        int cchValue = value ? strlen(value)+1 : 1;
++        int cchAttr  = strlen(pszAttr) + 1;
++        int cb = sizeof(struct _AttribValue) + cchValue + cchAttr;
++        struct _AttribValue * pav = (struct _AttribValue *)malloc(cb);
++        if (pav) {
++            pav->cb = cb;
++            strcpy((char*)(pav+1), pszAttr);
++            pav->pszAttr = (char*)(pav+1);
++
++            pav->vtype = AttribValue_DataType_String;
++            pav->value.zstr.ix = sizeof(struct _AttribValue) + cchAttr;
++            pav->value.zstr.cb = cchValue;
++            if (value)
++               strcpy(const_cast<char*>(pav->StringValue()), value);
++            else
++               (const_cast<char*>(pav->StringValue()))[0] = 0;
++        }
++        return pav;
++    }
++
++} AttribValue;
++
+ // Machine-wide attributes.  
+ class MachAttributes
+ {
+@@ -91,6 +183,8 @@ public:
+ 	~MachAttributes();
+ 
+ 	void init();
++    void init_user_settings(); // read STARTD_PUBLISH_WINREG param and parse it
++                               // creating data structure needed in compute and publish
+ 
+ 	void publish( ClassAd*, amask_t );  // Publish desired info to given CA
+ 	void compute( amask_t );			  // Actually recompute desired stats
+@@ -136,6 +230,7 @@ private:
+ 	bool			m_seen_keypress;    // Have we seen our first keypress yet?
+ 	int				m_clock_day;
+ 	int				m_clock_min;
++	List<AttribValue> m_lst_dynamic;    // list of user specified dynamic Attributes
+ #if defined(WIN32)
+ 	char*			m_local_credd;
+ 	time_t			m_last_credd_test;
+@@ -150,10 +245,20 @@ private:
+ 	char*			m_filesystem_domain;
+ 	int				m_idle_interval; 	// for D_IDLE dprintf messages
+ 	char*			m_ckptpltfrm;
++	List<AttribValue> m_lst_static;     // list of user-specified static attributes
++
++	// this holds strings that m_lst_static and m_lst_dynamic point to
++	// it is initialized from the param STARTD_PUBLISH_WINREG and then parsed/modified and used
++	// to initialize m_lst_static and m_lst_dynamic.  these two lists
++	// continue to hold pointers into this.  do not free it unless you first empty those
++	// lists. -tj
++	StringList      m_user_specified;
++	int             m_user_settings_init;  // set to true when init_user_settings has been called at least once.
+ 
+ #if defined ( WIN32 )
+ 	int				m_got_windows_version_info;
+ 	OSVERSIONINFOEX	m_window_version_info;
++    char*           m_dot_Net_Versions;
+ #endif
+ 
+ };	
+diff --git a/src/condor_startd.V6/ResMgr.cpp b/src/condor_startd.V6/ResMgr.cpp
+index 655ecd4..b5a9867 100644
+--- a/src/condor_startd.V6/ResMgr.cpp
++++ b/src/condor_startd.V6/ResMgr.cpp
+@@ -426,7 +426,7 @@ ResMgr::init_resources( void )
+ 		// Now, we can finally allocate our resources array, and
+ 		// populate it.
+ 	for( i=0; i<num_res; i++ ) {
+-		addResource( new Resource( new_cpu_attrs[i], i+1 ) );
++		addResource( new Resource( new_cpu_attrs[i], i+1, num_res>1 ) );
+ 	}
+ 
+ 		// We can now seed our IdDispenser with the right slot id.
+@@ -1984,11 +1984,13 @@ ResMgr::processAllocList( void )
+ 
+ 		// We're done destroying, and there's something to allocate.
+ 
++	bool multiple_slots = (alloc_list.Number() + numSlots()) > 1;
++
+ 		// Create the new Resource objects.
+ 	CpuAttributes* cap;
+ 	alloc_list.Rewind();
+ 	while( alloc_list.Next(cap) ) {
+-		addResource( new Resource( cap, nextId() ) );
++		addResource( new Resource( cap, nextId(), multiple_slots ) );
+ 		alloc_list.DeleteCurrent();
+ 	}
+ 
+diff --git a/src/condor_startd.V6/ResState.cpp b/src/condor_startd.V6/ResState.cpp
+index f303099..8d2f2cc 100644
+--- a/src/condor_startd.V6/ResState.cpp
++++ b/src/condor_startd.V6/ResState.cpp
+@@ -412,6 +412,25 @@ ResState::eval( void )
+ 		break;	
+ 
+ 	case owner_state:
++			// If the dynamic slot is allocated in the owner state
++			// (e.g. because of START expression contains attributes
++			// of job ClassAd), it may never go back to Unclaimed 
++			// state. So we need to delete the dynmaic slot in owner
++			// state.
++		if( Resource::DYNAMIC_SLOT == rip->get_feature() ) {
++#if HAVE_JOB_HOOKS
++				// If we're currently fetching we can't delete
++				// ourselves. If we do when the hook returns we won't
++				// be around to handle the response.
++			if( rip->isCurrentlyFetching() ) {
++				dprintf(D_ALWAYS, "State change: Owner -> Deleted delayed for outstanding work fetch\n");
++				break;
++			}
++#endif
++			change( delete_state );
++			return TRUE; // XXX: change TRUE
++		}
++
+ 		if( ! rip->eval_is_owner() ) {
+ 			dprintf( D_ALWAYS, "State change: IS_OWNER is false\n" );
+ 			change( unclaimed_state );
+@@ -764,7 +783,7 @@ ResState::enter_action( State s, Activity a,
+ 				if( rip->preemptWasTrue() && rip->wants_hold() ) {
+ 					rip->hold_job();
+ 				}
+-				else if( ! rip->r_cur->starterKillSoft() ) {
++				else if( ! rip->r_cur->starterKillSoft(true) ) {
+ 					rip->r_cur->starterKillPg( SIGKILL );
+ 					dprintf( D_ALWAYS,
+ 							 "State change: Error sending signals to starter\n" );
+diff --git a/src/condor_startd.V6/Resource.cpp b/src/condor_startd.V6/Resource.cpp
+index c8c598e..d593b82 100644
+--- a/src/condor_startd.V6/Resource.cpp
++++ b/src/condor_startd.V6/Resource.cpp
+@@ -36,7 +36,7 @@
+ 
+ extern FILESQL *FILEObj;
+ 
+-Resource::Resource( CpuAttributes* cap, int rid, Resource* _parent )
++Resource::Resource( CpuAttributes* cap, int rid, bool multiple_slots, Resource* _parent )
+ {
+ 	MyString tmp;
+ 	char* tmpName;
+@@ -92,7 +92,7 @@ Resource::Resource( CpuAttributes* cap, int rid, Resource* _parent )
+ 	} else {
+ 		tmpName = my_full_hostname();
+ 	}
+-	if( resmgr->is_smp() ) {
++	if( multiple_slots || get_feature() == PARTITIONABLE_SLOT ) {
+ 		tmp.sprintf( "%s@%s", r_id_str, tmpName );
+ 		r_name = strdup( tmp.Value() );
+ 	} else {
+@@ -2527,4 +2527,19 @@ void Resource::disable()
+ }
+ 
+ 
++float
++Resource::compute_rank( ClassAd* req_classad ) {
++
++	float rank;
++
++	if( r_classad->EvalFloat( ATTR_RANK, req_classad, rank ) == 0 ) {
++		ExprTree *rank_expr = r_classad->LookupExpr("RANK");
++		dprintf( D_ALWAYS, "Error evaluating machine rank expression: %s\n", ExprTreeToString(rank_expr));
++		dprintf( D_ALWAYS, "Setting RANK to 0.0\n");
++		rank = 0.0;
++	}
++	return rank;
++}
++
++
+ #endif /* HAVE_JOB_HOOKS */
+diff --git a/src/condor_startd.V6/Resource.h b/src/condor_startd.V6/Resource.h
+index 000d208..85aa00f 100644
+--- a/src/condor_startd.V6/Resource.h
++++ b/src/condor_startd.V6/Resource.h
+@@ -34,7 +34,7 @@
+ class Resource : public Service
+ {
+ public:
+-	Resource( CpuAttributes*, int, Resource* _parent = NULL);
++	Resource( CpuAttributes*, int, bool multiple_slots, Resource* _parent = NULL);
+ 	~Resource();
+ 
+ 		// Public methods that can be called from command handlers
+@@ -189,6 +189,7 @@ public:
+ 	int		eval_start( void );			// returns -1 on undefined
+ 	int		eval_cpu_busy( void );		// returns FALSE on undefined
+ 	bool	willingToRun( ClassAd* request_ad );
++	float	compute_rank( ClassAd* req_classad );
+ 
+ #if HAVE_BACKFILL
+ 	int		eval_start_backfill( void ); 
+diff --git a/src/condor_startd.V6/StartdHookMgr.cpp b/src/condor_startd.V6/StartdHookMgr.cpp
+index 07b61fb..12ff7e8 100644
+--- a/src/condor_startd.V6/StartdHookMgr.cpp
++++ b/src/condor_startd.V6/StartdHookMgr.cpp
+@@ -184,7 +184,7 @@ StartdHookMgr::handleHookFetchWork(FetchClient* fetch_client)
+ 		willing = false;
+ 	}
+ 	else {
+-		rank = compute_rank(rip->r_classad, job_ad);
++		rank = rip->compute_rank(job_ad);
+ 		rip->dprintf(D_FULLDEBUG, "Rank of this fetched claim is: %f\n", rank);
+ 		if (rip->state() == claimed_state && !idle_fetch_claim) {
+ 				// Make sure it's got a high enough rank to preempt us.
+diff --git a/src/condor_startd.V6/Starter.cpp b/src/condor_startd.V6/Starter.cpp
+index 778306e..63ff70f 100644
+--- a/src/condor_startd.V6/Starter.cpp
++++ b/src/condor_startd.V6/Starter.cpp
+@@ -1211,11 +1211,14 @@ Starter::killHard( void )
+ 
+ 
+ bool
+-Starter::killSoft( void )
++Starter::killSoft( bool state_change )
+ {
+ 	if( ! active() ) {
+ 		return true;
+ 	}
++	if( state_change ) {
++		daemonCore->Send_Signal( s_pid, DC_SIGSTATECHANGE );
++	}
+ 	if( ! kill(DC_SIGSOFTKILL) ) {
+ 		killpg( SIGKILL );
+ 		return false;
+diff --git a/src/condor_startd.V6/Starter.h b/src/condor_startd.V6/Starter.h
+index 7d8dca1..e04a9b6 100644
+--- a/src/condor_startd.V6/Starter.h
++++ b/src/condor_startd.V6/Starter.h
+@@ -64,7 +64,7 @@ public:
+ 	char const *executeDir();
+ 
+ 	bool	killHard( void );
+-	bool	killSoft( void );
++	bool	killSoft( bool state_change = false );
+ 	bool	suspend( void );
+ 	bool	resume( void );
+ 
+diff --git a/src/condor_startd.V6/claim.cpp b/src/condor_startd.V6/claim.cpp
+index 1a373a8..921d188 100644
+--- a/src/condor_startd.V6/claim.cpp
++++ b/src/condor_startd.V6/claim.cpp
+@@ -1543,11 +1543,11 @@ Claim::starterKillPg( int sig )
+ 
+ 
+ bool
+-Claim::starterKillSoft( void )
++Claim::starterKillSoft( bool state_change )
+ {
+ 	if( c_starter ) {
+ 		changeState( CLAIM_VACATING );
+-		return c_starter->killSoft();
++		return c_starter->killSoft( state_change );
+ 	}
+ 		// if there's no starter, we don't need to kill anything, so
+ 		// it worked...  
+diff --git a/src/condor_startd.V6/claim.h b/src/condor_startd.V6/claim.h
+index bfc4e1e..819f8e9 100644
+--- a/src/condor_startd.V6/claim.h
++++ b/src/condor_startd.V6/claim.h
+@@ -241,7 +241,7 @@ public:
+ 	bool resumeClaim( void );
+ 	bool starterKill( int sig );
+ 	bool starterKillPg( int sig );
+-	bool starterKillSoft( void );
++	bool starterKillSoft( bool state_change = false );
+ 	bool starterKillHard( void );
+ 	void starterHoldJob( char const *hold_reason,int hold_code,int hold_subcode );
+ 	void makeStarterArgs( ArgList &args );
+diff --git a/src/condor_startd.V6/command.cpp b/src/condor_startd.V6/command.cpp
+index 13d3d31..76410bb 100644
+--- a/src/condor_startd.V6/command.cpp
++++ b/src/condor_startd.V6/command.cpp
+@@ -19,7 +19,7 @@
+ 
+ 
+ #include "condor_common.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "condor_mkstemp.h"
+ #include "startd.h"
+ #include "vm_common.h"
+@@ -1197,7 +1197,7 @@ request_claim( Resource* rip, Claim *claim, char* id, Stream* stream )
+ 	}
+ 
+ 		// Now, make sure it's got a high enough rank to preempt us.
+-	rank = compute_rank(rip->r_classad, req_classad);
++	rank = rip->compute_rank(req_classad);
+ 	rip->dprintf( D_FULLDEBUG, "Rank of this claim is: %f\n", rank );
+ 
+ 	if( rip->state() == claimed_state ) {
+@@ -1721,7 +1721,7 @@ activate_claim( Resource* rip, Stream* stream )
+ 	tmp_starter = NULL;
+ 
+ 		// update the current rank on this claim
+-	float rank = compute_rank( mach_classad, req_classad ); 
++	float rank = rip->compute_rank( req_classad ); 
+ 	rip->r_cur->setrank( rank );
+ 
+ 		// Grab the job ID, so we've got it.  Once we give the
+diff --git a/src/condor_startd.V6/util.cpp b/src/condor_startd.V6/util.cpp
+index b552dcc..d86fc43 100644
+--- a/src/condor_startd.V6/util.cpp
++++ b/src/condor_startd.V6/util.cpp
+@@ -356,20 +356,6 @@ cleanup_execute_dir(int pid, char const *exec_path)
+ #endif  /* UNIX */
+ }
+ 
+-
+-float
+-compute_rank( ClassAd* mach_classad, ClassAd* req_classad ) 
+-{
+-	float rank;
+-
+-	if( mach_classad->EvalFloat( ATTR_RANK, req_classad, rank ) == 0 ) {
+-		dprintf( D_ALWAYS, "Error evaluating rank.\n" );
+-		rank = 0;
+-	}
+-	return rank;
+-}
+-
+-
+ int
+ create_port( ReliSock* rsock )
+ {
+diff --git a/src/condor_startd.V6/util.h b/src/condor_startd.V6/util.h
+index 23fd420..0d5728b 100644
+--- a/src/condor_startd.V6/util.h
++++ b/src/condor_startd.V6/util.h
+@@ -31,7 +31,6 @@ class StringList;
+ void	cleanup_execute_dir(int pid, char const *exec_path);
+ void	cleanup_execute_dirs( StringList &list );
+ void	check_execute_dir_perms( StringList &list );
+-float	compute_rank( ClassAd*, ClassAd* );
+ int 	create_port( ReliSock* );
+ bool	reply( Stream*, int );
+ bool	refuse( Stream* );
+diff --git a/src/condor_startd.V6/winreg.windows.cpp b/src/condor_startd.V6/winreg.windows.cpp
+new file mode 100644
+index 0000000..e59a165
+--- /dev/null
++++ b/src/condor_startd.V6/winreg.windows.cpp
+@@ -0,0 +1,1835 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++/* 
++    This file contains code used to gather values
++    from the Windows registry and put them in a form that is convenient
++    to publish in a ClassAd
++
++   	Written 2010 by John (TJ) Knoeller <johnkn at cs.wisc.edu>
++*/
++
++#include "condor_common.h"
++#include "startd.h"
++#include <math.h>
++
++// for the performance registry, we need to compare 2 query results
++// separated by time to get a reading. this struct holds both query results
++//
++class WinPerf_Data;
++typedef struct _WinPerf_QueryResult {
++	DWORD                idObject; // ObjectNameIndex for the query (e.g. "Processor" is 238)
++	DWORD                cbAlloc;  // allocation size of the object data
++	const WinPerf_Data * pdata1;   // data_block for the older
++	const WinPerf_Data * pdata2;   // data_block for the newer query
++}   WinPerf_QueryResult;
++
++// a registry query into HKEY_PERFORMANCE_DATA bakes down into this
++// structure.  "HKPD\System\Processes" 
++// becomes idKey == 2  idCounter = 248 Processes 
++//
++struct WinPerf_Query
++{
++	DWORD idKey;    // identifies counter group (WinPerf_Object)
++	DWORD idCounter;// identifies counter (WinPerf_CounterDef)
++	DWORD idAlt[6]; // alternate counter ids because there are multiple ids that match a single string.
++	DWORD idInst;   // instance unique id (if available)
++    int   ixInst;   // offset into the original string of the instance name
++	int   cchInst;  // size of the instance name from the original string.
++};
++
++#include <hashtable.h>
++
++// This is a simple wrapper class to enable char *'s
++// that we don't manage to be put into HashTables
++
++// HashTable needs operator==, which we define to be
++// case-insensitive for ClassAds
++
++class YourString 
++{
++	public:
++		YourString() : s(0) {}
++		YourString(const char *str) : s(str) {}
++		bool operator==(const YourString &rhs) { return (lstrcmpi(s,rhs.s) == 0); }
++		const char *s; // Someone else owns this
++};
++
++// D_NORMAL can be set to D_ALWAYS to cause a LOT more output from the WinReg code
++#define D_NORMAL D_FULLDEBUG
++
++// these flags can be passes to some of the registry querying functions to get 
++// diagnostic output.  they would not normally be used in shipping code.
++//
++#define WINREG_OPT_F_AUTO_ENUM_VALUES 1
++#define WINREG_OPT_F_ENUM_SUBKEYS	  2
++#define WINREG_OPT_F_ENUM_VALUES      4
++#define WINREG_OPT_F_WOW32           32
++#define WINREG_OPT_F_WOW64           64
++
++
++// parse the start of a string and return hive key if the start matches
++// one of the known hive designators HKLM for HKEY_LOCAL_MACHINE, etc.
++// if the caller passes pixPrefixSep, then this function will also return
++// the index of the first character after the hive prefix, which should be
++// \0, \ or /. 
++HKEY parse_hive_prefix(const char * psz, int cch, int * pixPrefixSep)
++{
++	HKEY hkey = NULL;
++	char ach[5]	= {0};
++	for (int ii = 0; ii <= cch && ii < NUM_ELEMENTS(ach); ++ii)
++	{
++		if (psz[ii] == '\\' || /*psz[ii] == '/' || */ psz[ii] == '\0')
++		{
++			static const struct {
++				long id;
++				HKEY key;
++			} aMap[] = {
++				'HKLM',	HKEY_LOCAL_MACHINE,
++				'HKCC',	HKEY_CURRENT_CONFIG,
++				'HKCR', HKEY_CLASSES_ROOT,
++				'HKCU', HKEY_CURRENT_USER,
++				'HKU\0',HKEY_USERS,
++				'HKPD',	HKEY_PERFORMANCE_DATA,
++				//'HKPT',	HKEY_PERFORMANCE_TEXT,
++				//'HKPN',	HKEY_PERFORMANCE_NLSTEXT,
++				//Win9x only 'HKDD', HKEY_DYN_DATA,
++			};
++
++			long id = htonl(*(long*)&ach);
++			for (int ix = 0; ix < NUM_ELEMENTS(aMap); ++ix)
++			{
++				if (id == aMap[ix].id)
++				{
++					hkey = aMap[ix].key;
++					break;
++				}
++			}
++				
++			if (hkey && pixPrefixSep)
++				*pixPrefixSep = ii;
++			break;
++		}
++		ach[ii] = toupper(psz[ii]);
++	}
++
++	return hkey;
++}
++
++// return a string name for one of the HKEY_xxx constants
++// we use this for logging.
++//
++static const char * root_key_name(HKEY hroot)
++{
++	static const struct {
++		const char * psz;
++		HKEY key;
++	} aMap[] = {
++		"HKLM",	HKEY_LOCAL_MACHINE,
++		"HKCC",	HKEY_CURRENT_CONFIG,
++		"HKCU", HKEY_CURRENT_USER,
++		"HKCR", HKEY_CLASSES_ROOT,
++		"HKU\0",	HKEY_USERS,
++		"HKPD",	HKEY_PERFORMANCE_DATA,
++		//"HKPT",	HKEY_PERFORMANCE_TEXT,
++		//"HKPN",	HKEY_PERFORMANCE_NLSTEXT,
++		//Win9x only "HKDD", HKEY_DYN_DATA,
++	};
++
++	for (int ix = 0; ix < NUM_ELEMENTS(aMap); ++ix)
++	{
++		if (hroot == aMap[ix].key)
++		{
++			return aMap[ix].psz;
++		}
++	}
++	return NULL;
++}
++
++
++// return the error message string
++// for a given windows error code.  used for logging.  
++//
++static const char * GetLastErrMessage(int err, char * szMsg, int cchMsg)
++{
++	int cch = FormatMessage ( 
++				FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
++				NULL, 
++				err, 
++				MAKELANGID ( LANG_NEUTRAL, SUBLANG_DEFAULT ), 
++				szMsg, 
++				cchMsg, 
++				NULL );
++	if (cch > 0)
++	{
++
++		// remove trailing \r\n
++		while (cch > 0 && (szMsg[cch-1] == '\r' || szMsg[cch-1] == '\n'))
++			szMsg[--cch] = 0;
++	}
++	else
++	{
++		// no message found, print the last error code
++		wsprintf(szMsg, "0x%X", err);
++	}
++
++	return szMsg;
++}
++
++//
++// returns a strdup'd string value for the given windows registry entry.
++//
++char * get_windows_reg_value(
++	const char * pszRegKey, 
++	const char * pszValueName, 
++	int          options /* = 0*/)
++{
++	char * value = NULL;   // return value from this function
++	char * pszTemp = NULL; // in case we need to copy the keyname
++	int cch = lstrlen(pszRegKey);
++
++	int ixStart = 0; 
++	HKEY hroot = parse_hive_prefix(pszRegKey, cch, &ixStart);
++	if (hroot)
++	{
++		pszRegKey += ixStart;
++		if (pszRegKey[0] == '\\')
++			++pszRegKey;
++		// really short keys like HKCR\.bat can end up with an empty
++		// keyname once we strip off the hive prefix, if that happens
++		// use the valuename as the keyname and set the valuename to ""
++		if ( ! pszRegKey[0] && pszValueName)
++		{
++			pszRegKey = pszValueName;
++			pszValueName = "";
++		}
++	}
++	else
++	{
++		hroot = HKEY_LOCAL_MACHINE;
++	}
++
++	if (HKEY_PERFORMANCE_DATA == hroot ||
++		HKEY_PERFORMANCE_TEXT == hroot ||
++		HKEY_PERFORMANCE_NLSTEXT == hroot)
++	{
++		dprintf( D_FULLDEBUG, 
++ 				"get_windows_reg_value() does not support \"%s\\%s\"\n",
++				root_key_name(hroot), pszRegKey);
++		return NULL;
++	}
++
++	// check if the caller wanted to force the 32 bit or 64 bit registry
++	//
++	int force = 0;
++	if ((options & WINREG_OPT_F_WOW32) || (options & KEY_WOW64_32KEY))
++		force = KEY_WOW64_32KEY;
++	else if ((options & WINREG_OPT_F_WOW64) || (options & KEY_WOW64_64KEY))
++		force = KEY_WOW64_64KEY;
++
++	bool fAutoEnumValues = ((options & WINREG_OPT_F_AUTO_ENUM_VALUES) != 0);
++	bool fEnumSubkeys = ((options & WINREG_OPT_F_ENUM_SUBKEYS) != 0);
++	bool fEnumValues =	((options & WINREG_OPT_F_ENUM_VALUES) != 0);
++
++	// try and open the key
++	//
++	HKEY hkey = NULL;
++	LONG lres = RegOpenKeyEx(hroot, pszRegKey, 0, KEY_READ | force, &hkey);
++
++	// if the key wasn't found, and the caller didn't pass a value name, perhaps
++	// the last element of the registry path is really a value name, try opening
++	// the parent of the passed in key. if that works, set the keyname to the
++	// parent and the valuename to the child and continue on.
++	//
++	if ((ERROR_FILE_NOT_FOUND == lres) && ! pszValueName)
++	{
++		pszTemp = strdup(pszRegKey); // this gets free'd as we leave the function.
++		char * pszName = strrchr(pszTemp, '\\');
++		if (pszName)
++		{
++           *pszName++ = 0;
++			lres = RegOpenKeyEx(hroot, pszTemp, 0, KEY_READ | force, &hkey);
++			if (ERROR_SUCCESS == lres)
++			{
++				pszRegKey = pszTemp;
++				pszValueName = pszName;
++			}
++		}
++	}
++
++	// if we failed to open the base key, log the error and fall down
++	// to return null. otherwise try and read the value indicated
++	// by pszValueName.
++	// 
++	if (ERROR_SUCCESS != lres)
++	{
++		if (ERROR_FILE_NOT_FOUND == lres)
++		{
++			// the key did not exist.
++			dprintf( D_FULLDEBUG, 
++ 				"The Registry Key \"%s\\%s\" does not exist\n",
++					root_key_name(hroot), pszRegKey);
++		}
++		else
++		{
++			// there was some other error, probably an access violation.
++			char szMsg[MAX_PATH];
++			dprintf( D_ALWAYS, 
++				"Failed to open Registry Key \"%s\\%s\"\nReason: %s\n",
++					root_key_name(hroot), pszRegKey, 
++					GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
++		}
++		ASSERT( ! value);
++	}
++	else
++	{
++		ULARGE_INTEGER uli; // in case we need to read a dword/qword value.
++		DWORD vtype = REG_SZ, cbData = 0;
++		const char * pszName = pszValueName; // so we can switch to NULL if we need to
++		lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, NULL, &cbData);
++
++		// if the named value was not found, check to see if it's actually a subkey
++		// if it is, open the subkey, set the valuename to null, and continue on
++		// as if that was what the caller passed to begin with.
++		//
++		if ((ERROR_FILE_NOT_FOUND == lres) && pszName && pszName[0])
++		{
++			HKEY hkeyT = NULL;
++			LONG lResT = RegOpenKeyEx(hkey, pszName, 0, KEY_READ | force, &hkeyT); 
++			if (ERROR_SUCCESS == lResT)
++			{
++				// yep, it's a key, pretend that we opened it rather than its parent.
++				RegCloseKey(hkey);
++				hkey = hkeyT;  // so the code below will close this for us.
++
++				pszName = NULL;
++				cbData = 0;
++				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, NULL, &cbData);
++			}
++		}
++
++		// the value exists, but we did not retrieve it yet, we need to allocate
++		// space and then queryvalue again. 
++		//
++		if (ERROR_MORE_DATA == lres || ERROR_SUCCESS == lres)
++		{
++			if (vtype == REG_MULTI_SZ || vtype == REG_SZ || vtype == REG_EXPAND_SZ || vtype == REG_LINK || vtype == REG_BINARY)
++			{
++				value = (char*)malloc(cbData+1);	
++				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, (byte*)value, &cbData);
++			}
++			else
++			{
++				cbData = sizeof(uli);
++				uli.QuadPart = 0; // in case we don't read the whole 8 bytes.
++				lres = RegQueryValueEx(hkey, pszName, NULL, &vtype, (byte*)&uli, &cbData);
++			}
++		}
++
++		if (ERROR_FILE_NOT_FOUND == lres)
++		{
++			if (pszName && pszName[0])
++			{
++				// the named value does not exist
++				//
++				dprintf( D_FULLDEBUG, 
++ 					"The Registry Key \"%s\\%s\" does not have a value named \"%s\"\n",
++						root_key_name(hroot), pszRegKey, pszName);
++			}
++			else
++			{
++				// the key exists, but it has no default value. This is common for keys
++				// To distinquish between this case and 'the key does not exist'
++				// we will return a "" string here.
++				//
++				value = strdup("");
++				dprintf ( D_FULLDEBUG, "The Registry Key \"%s\\%s\\%s\" has no default value.\n", 
++					root_key_name(hroot), pszRegKey, pszValueName);
++				fEnumValues = fAutoEnumValues;
++			}
++		}
++		else if (ERROR_SUCCESS != lres)
++		{
++			// there was some other error, probably an access violation.
++			//
++			char szMsg[MAX_PATH];
++			dprintf( D_ALWAYS, 
++				"Failed to read Registry Key \"%s\\%s\\%s\"\nReason: %s\n", 
++					root_key_name(hroot), pszRegKey, pszValueName, 
++					GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
++		}
++		else
++		{
++			// we got a value, now have to turn it into a string.
++			//
++			char sz[10] = "";
++			switch (vtype)
++			{
++			case REG_LINK:
++			case REG_SZ:
++				break;
++			case REG_EXPAND_SZ:
++				// TJ: write this.
++				break;
++			case REG_MULTI_SZ:
++				// TJ: write this.
++				break;
++
++			case REG_DWORD_BIG_ENDIAN:
++				uli.LowPart = htonl(uli.LowPart);
++				// fall though
++			case REG_DWORD:
++				wsprintf(sz, "%u", uli.LowPart);
++				break;
++
++			case REG_QWORD:
++				wsprintf(sz, "%lu", uli.QuadPart);
++				break;
++
++			case REG_BINARY:
++				break;
++			}
++
++			if ( ! value) 
++				value = strdup(sz);
++
++			dprintf ( D_FULLDEBUG, "The Registry Key \"%s\\%s\\%s\" contains \"%s\"\n", 
++				root_key_name(hroot), pszRegKey, pszValueName, value);
++		}
++
++		// In fulldebug mode, enumerate the value names and subkey names
++		// if requested.
++		//
++		if (DebugFlags & (D_NORMAL | D_FULLDEBUG)) 
++		{
++			if (fEnumValues)
++			{
++				int ii = 0;
++				for (ii = 0; ii < 10000; ++ii)
++				{
++					TCHAR szName[MAX_PATH];
++					DWORD cchName = NUM_ELEMENTS(szName), vt, cbData = 0;
++					lres = RegEnumValue(hkey, ii, szName, &cchName, 0, &vt, NULL, &cbData);
++					if (ERROR_NO_MORE_ITEMS == lres)
++						break;
++					if ( ! ii) dprintf ( D_NORMAL | D_FULLDEBUG, " Named values:\n");
++					dprintf( D_FULLDEBUG, "  \"%s\" = %d bytes\n", szName, cbData);
++				}
++				if ( ! ii) dprintf ( D_NORMAL | D_FULLDEBUG, " No Named values\n");
++			}
++			if (fEnumSubkeys)
++			{
++				int ii = 0;
++				for (ii = 0; ii < 10000; ++ii)
++				{
++					TCHAR szName[MAX_PATH]; 
++					DWORD cchName = NUM_ELEMENTS(szName);
++					lres = RegEnumKeyEx(hkey, ii, szName, &cchName, NULL, NULL, NULL, NULL);
++					if (ERROR_NO_MORE_ITEMS == lres)
++						break;
++					if ( ! ii) dprintf ( D_NORMAL | D_FULLDEBUG, " Subkeys:\n");
++					dprintf( D_NORMAL | D_FULLDEBUG, "  \"%s\"\n", szName);
++				}
++				if ( ! ii) dprintf ( D_NORMAL | D_FULLDEBUG, " No Subkeys\n");
++			}
++		}
++
++		RegCloseKey(hkey);
++	}
++	// free temp buffer that we may have used to crack the key
++	if (pszTemp) free(pszTemp);
++
++	return value;
++}
++
++
++// generate an ClassAd attribute name from a registry key name.
++// we do this by first checking to see if the input is of the form attr=reg_path
++// if it is, just extract attr, otherwise we extract the last N pieces of 
++// the registry path and convert characters that aren't allowed in attribute names
++// to _.  
++// 
++// returns an allocated string that is the concatinaton of prefix and attr
++//
++char * generate_reg_key_attr_name(const char * pszPrefix, const char * pszKeyName)
++{
++	int cchPrefix = pszPrefix ? strlen(pszPrefix) : 0;
++
++	// is the input of the form attr_name=reg_path?  if so, then
++	// we want to return prefix + attr_name. 
++	//
++	const char * psz = strchr(pszKeyName, '=');
++	const char * pbs = strchr(pszKeyName, '\\');
++	if (psz && ( ! pbs || psz < pbs))
++	{
++		int    cch = (psz - pszKeyName);
++		char * pszAttr = (char*)malloc(cchPrefix + cch +1);
++		if (pszPrefix)
++			strcpy(pszAttr, pszPrefix);
++		memcpy(pszAttr + cchPrefix, pszKeyName, cch);
++		pszAttr[cchPrefix + cch] = 0;
++		while (cch > 0 && isspace(pszAttr[cchPrefix+cch-1]))
++		{
++			pszAttr[cchPrefix+cch-1] = 0;
++		    --cch;
++		}
++		return pszAttr;
++	}
++	
++	// no explicit attr_name, so generate it from the last N parts
++	// of the keyname. we start by walking backward counting \ until
++	// we hit N or the start of the input.
++	//
++	psz = pszKeyName + strlen(pszKeyName);
++	int cSteps = (strstr(pszKeyName, "HKPD\\") == pszKeyName) ? 2 : 3;
++	while (psz > pszKeyName && (psz[-1] != '\\' || --cSteps > 0))
++		--psz;
++
++	// the identifier can't start with a digit, so back up one more
++	// character if it does. (psz should end up pointing to a \)
++	if ( ! cchPrefix && psz > pszKeyName && isdigit(*psz))
++		--psz;
++
++	// allocate space for prefix + key_part and copy
++	// both into the allocated buffer.
++	//
++	int cch = strlen(psz);
++	bool fPercent = false;
++	if (strchr(psz, '%'))
++	{
++		cch += strlen("Percent");
++		fPercent = true;
++	}
++
++	bool fPerSec = false;
++	if (strstr(psz, "/sec"))
++	{
++		cch += strlen("_Per_");
++		fPerSec = true;
++	}
++
++	char * pszAttr = (char *)malloc(cchPrefix + cch + 1);
++    if (pszPrefix)
++		strcpy(pszAttr, pszPrefix);
++
++	// a bit of a special case, if the keyname ends in a "\"
++	// pretend that the last slash isn't there.
++	//
++	if (cch > 1 && pszAttr[cchPrefix + cch-1] == '\\')
++		pszAttr[cchPrefix + cch-1] = 0;
++
++	// only A-Za-z0-9 are valid for identifiers
++	// convert other characters into _
++	//
++	char * pszT = pszAttr + cchPrefix;
++	while (*pszT = *psz)
++	{ 
++		if (fPercent && *pszT == '%')
++		{
++			strcpy(pszT, "Percent");
++			pszT += strlen(pszT)-1;
++			fPercent = false;
++		}
++		else if (fPerSec && *pszT == '/' &&	strstr(psz, "sec") == psz+1)
++		{
++			strcpy(pszT, "_Per_S");
++			pszT += strlen(pszT)-1;
++			psz += 1;
++			fPerSec = false;
++		}
++		else if ( ! isalnum(*pszT))
++		{
++			// don't generate more than 1 consecutive _
++			if (pszT > pszAttr && pszT[-1] == '_')
++				--pszT;
++			pszT[0] = '_';
++		}
++		++pszT;
++		++psz;
++	}
++
++	// a bit of a special case, remove the last trailing _ from 
++	// the attribute name.  We do this so that if a the keyname ends in a \
++	// we don't end up with a trailing _ on the attrib name.
++	//
++	cch = strlen(pszAttr);
++	if (cch > 0 && pszAttr[cch-1] == '_')
++		pszAttr[cch-1] = 0;
++
++	return pszAttr;
++}
++
++
++
++
++// Chris Torek's world famous hashing function
++// Modified to be case-insensitive
++static unsigned int torekHash(const YourString &s) {
++	unsigned int hash = 0;
++
++	const char *p = s.s;
++	while (*p) {
++		hash = (hash<<5)+hash + (unsigned char)tolower(*p);
++		p++;
++	}
++
++	return hash;
++}
++
++static unsigned int
++DWORDHash( const DWORD & n )
++{
++	return n;
++}
++
++#if 1 // def TIMER_TYPE_NAME_TABLE
++static const struct {
++	DWORD type;
++	char * psz;
++} aPerfTimerTypeNames[] = {
++
++#define _TABLE_ITEM(a) a, #a 
++
++// 32-bit Counter.  Divide delta by delta time.  Display suffix: "/sec"
++_TABLE_ITEM(PERF_COUNTER_COUNTER),
++
++// 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
++_TABLE_ITEM(PERF_COUNTER_TIMER),
++// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_QUEUELEN_TYPE),
++// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_LARGE_QUEUELEN_TYPE),
++// Queue Length Space-Time Product using 100 Ns timebase.
++// Divide delta by delta time. No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_100NS_QUEUELEN_TYPE),
++// Queue Length Space-Time Product using Object specific timebase.
++// Divide delta by delta time. No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE),
++// 64-bit Counter.  Divide delta by delta time. Display Suffix: "/sec"
++_TABLE_ITEM(PERF_COUNTER_BULK_COUNT),
++// Indicates the counter is not a  counter but rather Unicode text Display as text.
++_TABLE_ITEM(PERF_COUNTER_TEXT),
++// Indicates the data is a counter  which should not be
++// time averaged on display (such as an error counter on a serial line),
++// Display as is.  No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_RAWCOUNT),
++// Same as _TABLE_ITEM(PERF_COUNTER_RAWCOUNT except its size is a large integer
++_TABLE_ITEM(PERF_COUNTER_LARGE_RAWCOUNT),
++// Special case for RAWCOUNT that want to be displayed in hex
++// Indicates the data is a counter  which should not be
++// time averaged on display (such as an error counter on a serial line),
++// Display as is.  No Display Suffix.
++_TABLE_ITEM(PERF_COUNTER_RAWCOUNT_HEX),
++// Same as _TABLE_ITEM(PERF_COUNTER_RAWCOUNT_HEX except its size is a large integer
++_TABLE_ITEM(PERF_COUNTER_LARGE_RAWCOUNT_HEX),
++
++// A count which is either 1 or 0 on each sampling interrupt (% busy),
++// Divide delta by delta base. Display Suffix: "%"
++_TABLE_ITEM(PERF_SAMPLE_FRACTION),
++// A count which is sampled on each sampling interrupt (queue length),
++// Divide delta by delta time. No Display Suffix.
++_TABLE_ITEM(PERF_SAMPLE_COUNTER),
++// A label: no data is associated with this counter (it has 0 length),
++// Do not display.
++_TABLE_ITEM(PERF_COUNTER_NODATA),
++// 64-bit Timer inverse (e.g., idle is measured, but display busy %),
++// Display 100 - delta divided by delta time.  Display suffix: "%"
++_TABLE_ITEM(PERF_COUNTER_TIMER_INV),
++// The divisor for a sample, used with the previous counter to form a
++// sampled %.  You must check for >0 before dividing by this!  This
++// counter will directly follow the  numerator counter.  It should not
++// be displayed to the user.
++_TABLE_ITEM(PERF_SAMPLE_BASE),
++
++// A timer which, when divided by an average base, produces a time
++// in seconds which is the average time of some operation.  This
++// timer times total operations, and  the base is the number of opera-
++// tions.  Display Suffix: "sec"
++_TABLE_ITEM(PERF_AVERAGE_TIMER),
++// Used as the denominator in the computation of time or count
++// averages.  Must directly follow the numerator counter.  Not dis-
++// played to the user.
++_TABLE_ITEM(PERF_AVERAGE_BASE),
++
++// A bulk count which, when divided (typically), by the number of
++// operations, gives (typically), the number of bytes per operation.
++// No Display Suffix.
++_TABLE_ITEM(PERF_AVERAGE_BULK),
++// 64-bit Timer in object specific units. Display delta divided by
++// delta time as returned in the object type header structure.  Display suffix: "%"
++_TABLE_ITEM(PERF_OBJ_TIME_TIMER),
++
++// 64-bit Timer in 100 nsec units. Display delta divided by
++// delta time.  Display suffix: "%"
++_TABLE_ITEM(PERF_100NSEC_TIMER),
++// 64-bit Timer inverse (e.g., idle is measured, but display busy %),
++// Display 100 - delta divided by delta time.  Display suffix: "%"
++_TABLE_ITEM(PERF_100NSEC_TIMER_INV),
++// 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
++// Timer for multiple instances, so result can exceed 100%.
++_TABLE_ITEM(PERF_COUNTER_MULTI_TIMER),
++// 64-bit Timer inverse (e.g., idle is measured, but display busy %),
++// Display 100 * _MULTI_BASE - delta divided by delta time.
++// Display suffix: "%" Timer for multiple instances, so result
++// can exceed 100%.  Followed by a counter of type _MULTI_BASE.
++_TABLE_ITEM(PERF_COUNTER_MULTI_TIMER_INV),
++// Number of instances to which the preceding _MULTI_..._INV counter
++// applies.  Used as a factor to get the percentage.
++_TABLE_ITEM(PERF_COUNTER_MULTI_BASE),
++// 64-bit Timer in 100 nsec units. Display delta divided by delta time.
++// Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
++_TABLE_ITEM(PERF_100NSEC_MULTI_TIMER),
++// 64-bit Timer inverse (e.g., idle is measured, but display busy %),
++// Display 100 * _MULTI_BASE - delta divided by delta time.
++// Display suffix: "%" Timer for multiple instances, so result
++// can exceed 100%.  Followed by a counter of type _MULTI_BASE.
++_TABLE_ITEM(PERF_100NSEC_MULTI_TIMER_INV),
++// Indicates the data is a fraction of the following counter  which
++// should not be time averaged on display (such as free space over
++// total space.), Display as is.  Display the quotient as "%".
++_TABLE_ITEM(PERF_RAW_FRACTION),
++_TABLE_ITEM(PERF_LARGE_RAW_FRACTION),
++// Indicates the data is a base for the preceding counter which should
++// not be time averaged on display (such as free space over total space.),
++_TABLE_ITEM(PERF_RAW_BASE),
++_TABLE_ITEM(PERF_LARGE_RAW_BASE),
++// The data collected in this counter is actually the start time of the
++// item being measured. For display, this data is subtracted from the
++// sample time to yield the elapsed time as the difference between the two.
++// In the definition below, the PerfTime field of the Object contains
++// the sample time as indicated by the _TABLE_ITEM(PERF_OBJECT_TIMER bit and the
++// difference is scaled by the PerfFreq of the Object to convert the time
++// units into seconds.
++_TABLE_ITEM(PERF_ELAPSED_TIME),
++//  The following counter type can be used with the preceding types to
++//  define a range of values to be displayed in a histogram.
++//
++
++_TABLE_ITEM(PERF_COUNTER_HISTOGRAM_TYPE),
++//
++//  This counter is used to display the difference from one sample
++//  to the next. The counter value is a constantly increasing number
++//  and the value displayed is the difference between the current
++//  value and the previous value. Negative numbers are not allowed
++//  which shouldn't be a problem as long as the counter value is
++//  increasing or unchanged.
++//
++_TABLE_ITEM(PERF_COUNTER_DELTA),
++_TABLE_ITEM(PERF_COUNTER_LARGE_DELTA),
++//  The precision counters are timers that consist of two counter values:
++//      1), the count of elapsed time of the event being monitored
++//      2), the "clock" time in the same units
++//
++//  the precition timers are used where the standard system timers are not
++//  precise enough for accurate readings. It's assumed that the service
++//  providing the data is also providing a timestamp at the same time which
++//  will eliminate any error that may occur since some small and variable
++//  time elapses between the time the system timestamp is captured and when
++//  the data is collected from the performance DLL. Only in extreme cases
++//  has this been observed to be problematic.
++//
++//  when using this type of timer, the definition of the
++//      _TABLE_ITEM(PERF_PRECISION_TIMESTAMP counter must immediately follow the
++//      definition of the _TABLE_ITEM(PERF_PRECISION_*_TIMER in the Object header
++//
++// The timer used has the same frequency as the System Performance Timer
++_TABLE_ITEM(PERF_PRECISION_SYSTEM_TIMER),
++// The timer used has the same frequency as the 100 NanoSecond Timer
++_TABLE_ITEM(PERF_PRECISION_100NS_TIMER),
++//
++// The timer used is of the frequency specified in the Object header's
++//  PerfFreq field (PerfTime is ignored),
++_TABLE_ITEM(PERF_PRECISION_OBJECT_TIMER),
++//
++// This is the timestamp to use in the computation of the timer specified
++// in the previous description block
++_TABLE_ITEM(PERF_PRECISION_TIMESTAMP),
++};
++
++static void dump_perf_timer_type_name_table() 
++{
++	dprintf(D_ALWAYS, "Perf Timer Type Names:\n");
++	for (int ii = 0; ii < NUM_ELEMENTS(aPerfTimerTypeNames); ++ii)
++	{
++		dprintf(D_ALWAYS, "0x%08X %s\n", aPerfTimerTypeNames[ii].type, aPerfTimerTypeNames[ii].psz);
++	}
++}
++static const char * perf_timer_type_name(DWORD type)
++{
++	for (int ii = 0; ii < NUM_ELEMENTS(aPerfTimerTypeNames); ++ii)
++	{
++		if (type == aPerfTimerTypeNames[ii].type)
++			return aPerfTimerTypeNames[ii].psz;
++	}
++	return "";
++}
++#endif //def TIMER_TYPE_NAME_TABLE
++
++/* unused.
++typedef struct _WinPerf_RawCounterData {
++	DWORD     type;   // CounterType
++	DWORD     more;   // second value for multi-data
++	ULONGLONG data;	  // counter data
++	LONGLONG  time;   // timestamp or base value
++	LONGLONG  freq;   // frequency
++}  WinPerf_RawCounterData;
++*/
++
++enum {
++	WinPerf_CT_Empty       = 0,  // there is no value
++	WinPerf_CT_Unsigned    = 1,  // use the 64 bit unsigned value
++	WinPerf_CT_Signed      = 2,  // use the 64 bit signed value
++	WinPerf_CT_Double      = 3,  // use the double value
++
++	WinPerf_CT_Decimal     = 0x00,  // print as decimal value
++	WinPerf_CT_Hex         = 0x10,  // print as hex value
++	WinPerf_CT_Bytes       = 0x20,  // value is in bytes (can be converted to MB)
++	WinPerf_CT_Short       = 0x40,  // value is only 32 bits
++
++	WinPerf_CT_Seconds     = 0x100, // append "sec" when printing
++	WinPerf_CT_PerSecond   = 0x200, // append "/sec" when printing
++	WinPerf_CT_Percent     = 0x300, // append "%" when printing
++	WinPerf_CT_UnitsMask   = 0xF00, // mask of the units(sec/persec/percent)
++};
++
++typedef int WinPerf_CounterValueType;
++
++typedef struct _WinPerf_CounterValue {
++	WinPerf_CounterValueType type;
++	int                      spare;
++	union {
++		int       i;
++		UINT      u;
++		LONGLONG  ll;
++		ULONGLONG ul;
++		double    d;
++	} value;
++	int Print(char * psz, int cch, bool fIncludeUnits) const;
++} WinPerf_CounterValue;
++
++typedef struct _WinPerf_TimerDeltas {
++	LONGLONG obj;	  // object timer delta
++	LONGLONG objabs;  // object absolute time
++	LONGLONG objfreq; // object timer frequency
++	LONGLONG head;    // head timer delta
++	LONGLONG headfreq;// head timer frequency
++	LONGLONG nanos;   // head 100ns timer delta
++} WinPerf_TimerDeltas;
++
++
++// global variables used by code that queries the windows performance counters
++//
++static struct {
++	// keep track of the set of name/index pairs that we get from querying
++	// the performance registry.  We keep that set of strings in pszzNames
++	// and we hash name->index and index->name in two hashtables. 
++	char * pszzNames; // holds all of the strings that the two hash tables refer to.
++	HashTable<YourString, const char *> * pPerfTable;
++	HashTable<DWORD, const char *> * pNameTable;
++    HashTable<DWORD, WinPerf_QueryResult> * pQueries;
++} rl = {0};
++
++// build a hashtable that maps all of the performance field names to their
++// index value and visa versa. 
++//
++static bool init_windows_performance_hashtable()
++{
++	if (rl.pPerfTable)
++		return true;
++
++	//dump_perf_timer_type_name_table();
++
++	DWORD cbData = 0;
++	DWORD vtype = REG_SZ; 
++	LONG lres = RegQueryValueEx(HKEY_PERFORMANCE_TEXT, "Counter", NULL, &vtype, NULL, &cbData);
++	if (ERROR_SUCCESS == lres)
++	{
++		rl.pszzNames = (char*)malloc(cbData);
++		lres = RegQueryValueEx(HKEY_PERFORMANCE_TEXT, "Counter", NULL, &vtype, (byte*)rl.pszzNames, &cbData);
++		if (ERROR_SUCCESS != lres)
++		{
++			if (rl.pszzNames) free (rl.pszzNames);
++			rl.pszzNames = NULL;
++		}
++	}
++	if (ERROR_SUCCESS != lres)
++	{
++		// there was some other error, probably an access violation.
++		char szMsg[MAX_PATH];
++		dprintf( D_ALWAYS, 
++			"Failed to read Performance Text! Reason: %s\n",
++				GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
++	}
++	else if (REG_MULTI_SZ == vtype)
++	{
++		rl.pQueries   = new HashTable<DWORD, WinPerf_QueryResult>(2, DWORDHash, updateDuplicateKeys);
++		rl.pPerfTable = new HashTable<YourString, const char *>(4000, torekHash, allowDuplicateKeys);
++		rl.pNameTable = new HashTable<DWORD, const char *>(4000, DWORDHash, rejectDuplicateKeys);
++		if (rl.pPerfTable)
++		{
++			char * psz = rl.pszzNames;
++			while (*psz)
++			{
++				char * pszIndex = psz;
++				char * pszName = psz + lstrlen(psz)+1;
++				if (*pszName) psz = pszName + lstrlen(pszName)+1;
++				rl.pPerfTable->insert(pszName, pszIndex);
++				if (rl.pNameTable)
++				{
++					DWORD ix = atoi(pszIndex);
++					rl.pNameTable->insert(ix, pszName);
++				}
++			}
++		}
++	}
++	return (rl.pPerfTable != NULL);
++}
++
++// these classes wrap the PERF_xxx structures that we get back from registry queries
++// on the HKEY_PERFORMANCE_DATA key, they expose methods that make traversal of the
++// structures a bit simpler.  Each registry query returns WinPerf_Data, which
++// contains one or more WinPerf_Object each of which contains one or more
++// WinPerf_CounterDef structures that describe the layout of the CounterData. 
++// each WinPerf_Object also has one or more sets of CounterData, either as a set
++// of WinPerf_ObjInst, each of which has an instance name and a set of CounterData
++// (for things like HKPD\Processes).  Or the WinPerf_Object has a single set of CounterData
++// (for things like HKPD\Memory).
++//
++
++class WinPerf_CounterDef : public PERF_COUNTER_DEFINITION
++{
++public:
++	DWORD NameIndex() const {
++		return this->CounterNameTitleIndex; 
++	}
++};
++
++class WinPerf_ObjInst : public PERF_INSTANCE_DEFINITION
++{
++public:
++	const WinPerf_ObjInst * Next() const { 
++		return (const WinPerf_ObjInst*)((BYTE*)this + this->ByteLength + CounterBytes());
++	}
++	const WCHAR *           Name() const { 
++		if (this->NameLength <= 0)
++			return NULL;
++		return (const WCHAR *)((BYTE*)this + this->NameOffset); 
++	}
++
++	// do case-insensitive comparison between the instance name, which is unicode
++	// and a supplied value which is ascii. no multi-byte character support.
++	// ignore () on the input, treat a closing ) on input as if it were a null.
++	// treat a * as 'match all of the rest' (characters after the * are ignored)
++	//
++	bool Matches(const char * psz) const {
++		if (psz && *psz == '*')
++			return true;
++		if (this->NameLength <= 0 || ! psz)
++			return false;
++		if (*psz == '(')
++			++psz;
++		const WCHAR * pwsz = (const WCHAR *)((BYTE*)this + this->NameOffset); 
++		if ( ! *pwsz)
++			return false;
++		while (*pwsz) {
++			if ( ! *psz || *psz == ')')
++				return false;
++			if (tolower(*psz) != tolower(*pwsz))
++				return false;
++			++psz;
++			++pwsz;
++			if (*psz == '*')
++				return true;
++		}
++		return (*psz == 0 || *psz == ')');
++	}
++	DWORD CounterBytes() const { 
++		const PERF_COUNTER_BLOCK* pBlock = (const PERF_COUNTER_BLOCK*)((BYTE*)this + this->ByteLength);
++		return pBlock->ByteLength;
++	}
++	// this returns the base address of the counter data (PERF_COUNTER_BLOCK) for this
++	// instance.
++	const BYTE * CounterData() const {
++		return (const BYTE*)((BYTE*)this + this->ByteLength);
++	}
++};
++
++
++class WinPerf_Object : public PERF_OBJECT_TYPE
++{
++public:
++	const WinPerf_Object * Next() const { return (const WinPerf_Object *)((BYTE*)this + this->TotalByteLength); }
++	DWORD            NameIndex() const { return this->ObjectNameTitleIndex; }
++
++	int              InstanceCount() const { return this->NumInstances; }
++
++	const WinPerf_ObjInst * FirstInstance() const { 
++		if (this->NumInstances <= 0)
++			return NULL;
++		return (const WinPerf_ObjInst *)((BYTE*)this + this->DefinitionLength);
++	}
++
++	// use this only if the object has only a single instance, or never has instances.
++	const WinPerf_CounterDef * Counter(int ix) const { 
++		if (ix < 0 || ix >= this->NumCounters)
++			return NULL;
++		const WinPerf_CounterDef * pCounter = (const WinPerf_CounterDef *)((BYTE*)this + this->HeaderLength);
++		return pCounter + ix;
++	}
++	// this returns the base address of the counter data (PERF_COUNTER_BLOCK) if there
++	// are no instances, if there are instances, each instance has its own counter block.
++	const BYTE * CounterData() const {
++		if (this->NumInstances > 0)
++			return NULL;
++		return (const BYTE*)((BYTE*)this + this->DefinitionLength);
++	}
++
++	const WinPerf_CounterDef * Default() const {
++		if (this->DefaultCounter >= 0 && this->DefaultCounter < this->NumCounters)
++			return this->Counter(this->DefaultCounter);
++		return NULL;
++	}
++
++	// return the counter with the given id, or the default counter if id == 0
++	const WinPerf_CounterDef * Select(const DWORD * pidCounters) const {
++		const WinPerf_CounterDef * pCounter = (const WinPerf_CounterDef *)((BYTE*)this + this->HeaderLength);
++		while (*pidCounters) {
++			for (UINT jj = 0; jj < this->NumCounters; ++jj) {
++				if ((pCounter+jj)->NameIndex() == *pidCounters)
++					return pCounter + jj;
++			}
++			++pidCounters;
++		}
++		if (this->DefaultCounter >= 0 && this->DefaultCounter < this->NumCounters)
++			return pCounter + this->DefaultCounter;
++		return NULL;
++	}
++	const
++
++
++	ULONGLONG GetRawValue(const WinPerf_CounterDef * pCounter, const BYTE * data) const {
++		ULARGE_INTEGER uli = {0};
++		if (pCounter->CounterSize == 4)
++			uli.LowPart = *(DWORD*)(data + pCounter->CounterOffset);
++		else if (pCounter->CounterSize >= 8)
++			uli.QuadPart = *(UNALIGNED ULONGLONG*)(data + pCounter->CounterOffset);
++		return uli.QuadPart;
++	}
++
++	char * PrintValue(const WinPerf_CounterDef * pCounter, 
++		              const WinPerf_TimerDeltas & time, 
++					  const BYTE * curr, 
++					  const BYTE * prev) const;
++
++	bool GetValue(WinPerf_CounterValue & value,
++		          const WinPerf_CounterDef * pCounter, 
++		          const WinPerf_TimerDeltas & time, 
++				  const BYTE * curr, 
++				  const BYTE * prev) const;
++};
++
++class WinPerf_Data : public PERF_DATA_BLOCK
++{
++public:
++	const WinPerf_Object * First() const { 
++		if (this->NumObjectTypes > 0)
++			return (const WinPerf_Object *)((BYTE*)this + this->HeaderLength); 
++		return NULL;
++	}
++	const WinPerf_Object * Find(DWORD idObject) const {
++		const WinPerf_Object * pObj = First();
++		for (UINT ii = 0; ii < this->NumObjectTypes; ++ii, pObj = pObj->Next()) {
++			if (pObj->ObjectNameTitleIndex == idObject)
++				return pObj;
++		}
++		return NULL;
++	}
++	int Length() const { 
++		return (int)this->NumObjectTypes; 
++	}
++	const WCHAR * SystemName() const { 
++		if (this->SystemNameLength > 0)
++			return (const WCHAR *)((BYTE*)this + this->SystemNameOffset); 
++		return NULL;
++	}
++};
++
++bool WinPerf_Object::GetValue(
++	WinPerf_CounterValue & ctval,
++	const WinPerf_CounterDef * pCounter, 
++	const WinPerf_TimerDeltas & time, 
++	const BYTE * curr, 
++	const BYTE * prev) const
++{
++	ctval.type = WinPerf_CT_Empty;
++	ctval.value.ul = 0;
++
++	const DWORD type = pCounter->CounterType;
++	if (type & PERF_DISPLAY_NOSHOW)
++		return false;
++
++	ctval.value.ul = GetRawValue(pCounter, curr);
++	if (type & PERF_DELTA_COUNTER) 
++	{
++		if ( !  prev)
++			return false;
++		ULONGLONG old = GetRawValue(pCounter, prev);
++		if (ctval.value.ul >= old)
++			ctval.value.ul = ctval.value.ul - old;
++		//else dprintf(D_FULLDEBUG, "  PrintValue: negative delta from winreg performance data.");
++	}
++
++	// number are easy, they can be decimal or hex
++	// but there is no scaling.  
++	//
++	if ((type & PERF_TYPE_ZERO) == PERF_TYPE_NUMBER)
++	{
++		ctval.type = WinPerf_CT_Unsigned;
++		if (type & PERF_NUMBER_DECIMAL)
++			ctval.type = ctval.type | WinPerf_CT_Decimal;
++		else 
++		{
++			ctval.type = WinPerf_CT_Hex;
++			if ( ! (type & PERF_SIZE_LARGE))
++				ctval.type = ctval.type | WinPerf_CT_Short;
++		}
++		return true;
++	}
++
++	// the only other type we support is type counter, if its of type
++	// text or type zero, just return false
++	//
++	if ((type & PERF_TYPE_ZERO) != PERF_TYPE_COUNTER)
++		return false;
++
++	// counters have a lot of subtypes, each with different
++	// scaling rules.
++	//
++    if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_VALUE)   // display counter value
++	{
++		ctval.type = WinPerf_CT_Unsigned;
++		if ( ! (type & PERF_SIZE_LARGE))
++			ctval.type |= WinPerf_CT_Short;
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_RATE) // divide ctr / delta time
++	{
++		LONGLONG val = ctval.value.ul;
++		ctval.type = WinPerf_CT_Double;
++		ctval.value.d = 0.0;
++
++		// determine whether we need to take into account
++		// the clock frequency (i.e. scale the delta time 1/seconds)
++		// note: there might be a bug here. MS sample code indicates
++		// that type PREF_COUNTER_MULTI_TIMER should be scaled by headfreq
++		// but that PREF_COUNTER_MULTI_TIMER_INV should not. but both
++		// are displayed as %, so freq will be set to 1 here for those
++		// counter types.  since there are no instances of these counters
++		//
++		LONGLONG freq = 1;
++		if ((type & PERF_DISPLAY_SECONDS) <= PERF_DISPLAY_PER_SEC) // if /sec or no units
++			freq = time.headfreq;
++
++		// special case to scale for percent so we can avoid some
++		// truncation error in the scaling.
++		LONG pct  = 1;
++		if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_PERCENT)
++			pct = 100;
++
++		// determine time scale (freq/delta-time)
++		// 
++		double   scale = 1.0;
++		if (type & PERF_TIMER_100NS) 
++		{
++			if (time.nanos) scale = (double)freq*pct/time.nanos;
++		}
++		else if (type & PERF_OBJECT_TIMER) 
++		{
++			if (time.obj) scale = (double)freq*pct/time.obj;
++		}
++		else
++		{
++			if (time.head) scale = (double)freq*pct/time.head;
++		}
++
++		// apply the rate and scale to the value
++		//
++		double value = 0.0;
++		if (type & PERF_MULTI_COUNTER)
++		{
++			DWORD multi = ((DWORD*)(curr + pCounter->CounterOffset))[2];
++			if (type & PERF_INVERSE_COUNTER)
++				ctval.value.d = (double)multi * pct - val * scale;
++			else if (multi)
++				ctval.value.d = (val * scale) / multi;
++		}
++		else if (type & PERF_INVERSE_COUNTER)
++		{
++			ctval.value.d = pct - (val * scale);
++		}
++		else
++		{
++			ctval.value.d = val * scale;
++		}
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_ELAPSED) // subtract ctr from abs obj time
++	{
++		ctval.value.d = (double)(time.objabs - ctval.value.ul);
++		if (time.objfreq)
++			ctval.value.d /= time.objfreq;
++		ctval.type = WinPerf_CT_Double;
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_FRACTION)
++	{
++		ULONGLONG val = ctval.value.ul;
++		// special case to scale for percent so we can avoid some
++		// truncation error in the scaling.
++		LONG pct  = 1;
++		if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_PERCENT)
++			pct = 100;
++
++		const WinPerf_CounterDef * pBase = pCounter+1;
++		double scale = 1.0;
++		if ((pBase->CounterType & PERF_COUNTER_PRECISION) == PERF_COUNTER_BASE)
++		{
++			ULONGLONG base = GetRawValue(pBase, curr);
++			if (type & PERF_DELTA_COUNTER)
++			{
++				ULONGLONG baseOld = GetRawValue(pBase, prev);
++				base -= baseOld;
++			}
++			if (base)
++				scale = pct/base;
++		}
++
++		// TJ: This looks like a special case to me. PERF_AVERAGE_TIMER
++		// does NOT have PERF_DELTA_COUNTER, but according to the example
++		// code it should be calculated as ((N1-N0)/TB) / (B1 - B0)
++		if (PERF_AVERAGE_TIMER == type)
++		{
++			ctval.type = WinPerf_CT_Double;
++			ctval.value.d = val / time.headfreq * scale;
++		}
++		else
++		{
++			ctval.type = WinPerf_CT_Double;
++			ctval.value.d = val * scale;
++		}
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_QUEUELEN)
++	{
++		EXCEPT( "WinReg perf counter type QUEUELEN is unimplemented." );
++	}
++
++	if (ctval.type != WinPerf_CT_Empty)
++	{
++		switch (type & PERF_DISPLAY_SECONDS)
++		{
++		case PERF_DISPLAY_PERCENT: ctval.type |= WinPerf_CT_Percent; break;
++		case PERF_DISPLAY_PER_SEC: ctval.type |= WinPerf_CT_PerSecond; break;
++		case PERF_DISPLAY_SECONDS: ctval.type |= WinPerf_CT_Seconds; break;
++		}
++	}
++
++	return true;
++}
++
++char * WinPerf_Object::PrintValue(
++	const WinPerf_CounterDef * pCounter, 
++	const WinPerf_TimerDeltas & time, 
++	const BYTE * curr, 
++	const BYTE * prev) const 
++{
++	ULONGLONG val = GetRawValue(pCounter, curr);
++	char sz[64];
++	sz[0] = 0;
++
++	const DWORD type = pCounter->CounterType;
++	if (type & PERF_DELTA_COUNTER) 
++	{
++		if ( !  prev)
++			return NULL;
++		ULONGLONG old = GetRawValue(pCounter, prev);
++		if (val >= old)
++			val = val - old;
++		else
++			dprintf(D_FULLDEBUG, "  PrintValue: negative delta from winreg performance data.");
++		//dprintf(D_FULLDEBUG, "  PrintValue: delta %I64d - %I64d = %I64d,  %I64d/%I64d %I64d/%I64d %I64d %I64d\n", 
++		//	val, old, val - old, time.head, time.headfreq, time.obj, time.objfreq, time.nanos, time.objabs);
++	}
++
++	if ((type & PERF_TYPE_ZERO) == PERF_TYPE_NUMBER || (type & PERF_COUNTER_PRECISION) == PERF_COUNTER_VALUE)
++	{
++		if (type & PERF_NUMBER_DECIMAL)
++			sprintf(sz, "%I64d     ", val);
++		else if (type & PERF_SIZE_LARGE)
++			sprintf(sz, "0x%I64X     ", val);
++		else
++			sprintf(sz, "0x%X     ", *(DWORD*)&val);
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_RATE) // divide ctr / delta time
++	{
++		double scale = 1;
++		double value = 0.0;
++		const char * pszUnits = "    ";
++		LONGLONG mult = 1;
++		if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_PERCENT)
++		{
++			mult = 100;
++			pszUnits = " %   ";
++		}
++		else if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_PER_SEC) // if /sec or no units
++		{
++			mult = time.headfreq;
++			pszUnits = " /sec";
++		}
++		else if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_NO_SUFFIX) // if /sec or no units
++		{
++			mult = time.headfreq;
++		}
++		else if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_SECONDS)
++		{
++			pszUnits = " sec ";
++		}
++
++		if (type & PERF_TIMER_100NS) 
++		{
++			if (time.nanos) scale = (double)mult/time.nanos;
++		}
++		else if (type & PERF_OBJECT_TIMER) 
++		{
++			if (time.obj) scale = (double)mult/time.obj;
++		}
++		else
++		{
++			if (time.head) scale = (double)mult/time.head;
++		}
++
++		if (type & PERF_MULTI_COUNTER)
++		{
++			DWORD multi = ((DWORD*)(curr + pCounter->CounterOffset))[2];
++			if (type & PERF_INVERSE_COUNTER)
++				value = 100.0 * multi - val * scale;
++			else if (multi)
++				value = (val * scale) / multi;
++		}
++		else if (type & PERF_INVERSE_COUNTER)
++		{
++			if ((type & PERF_DISPLAY_SECONDS) == PERF_DISPLAY_PERCENT)
++				value = 100.0 - (val * scale);
++			else
++				value = 1.0 - (val * scale);
++		}
++		else
++		{
++			//dprintf (D_FULLDEBUG, "    scaling %I64d by %f\n", val, scale);
++			value = (double)val * scale;
++		}
++		sprintf(sz, "%f%s", value, pszUnits);
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_ELAPSED) // subtract ctr from abs obj time
++	{
++		double value = (double)(time.objabs - val);
++		if (time.objfreq)
++			value /= time.objfreq;
++		sprintf(sz, "%f sec ", value);
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_FRACTION)
++	{
++		const WinPerf_CounterDef * pBase = pCounter+1;
++		ULONGLONG baseCurr = 0;
++		if ((pBase->CounterType & PERF_COUNTER_PRECISION) == PERF_COUNTER_BASE)
++		{
++			baseCurr = GetRawValue(pBase, curr);
++		}
++		double scale = 1.0;
++		if (baseCurr)
++			scale = 100.0/baseCurr;
++		double value = (double)val * scale;
++		sprintf(sz, "%f     ", value);
++	}
++	else if ((type & PERF_COUNTER_PRECISION) == PERF_COUNTER_QUEUELEN)
++	{
++		EXCEPT( "WinReg perf counter type QUEUELEN is unimplemented." );
++	}
++	if (sz[0])
++		return strdup(sz);
++	return NULL;
++}
++
++
++bool init_WinPerf_Query(
++	const char * pszRegKey, 
++	const char * pszValueName, 
++	WinPerf_Query & query)
++{
++	ZeroMemory(&query, sizeof(query));
++
++	char * pszTemp = NULL; // in case we need to copy the keyname
++
++	if (( ! pszValueName || ! pszValueName[0]) && strchr(pszRegKey, '\\'))
++	{
++		pszTemp = strdup(pszRegKey); // this gets free'd as we leave the function.
++		char * pszCounter = strchr(pszTemp, '\\');
++		if (pszCounter)
++		{
++           *pszCounter++ = 0;
++			pszRegKey = pszTemp;
++			pszValueName = pszCounter;
++		}
++		dprintf ( D_FULLDEBUG, "cracking key as key=\"%s\", counter=\"%s\"\n",
++			     pszRegKey, pszValueName);
++	}
++	if (strchr(pszRegKey, '('))
++	{
++		char * pszInst = NULL;
++		if ( ! pszTemp)
++			pszTemp = strdup(pszRegKey); // this gets free'd as we leave the function.
++		char * pszInstance = strchr(pszTemp, '(');
++		if (pszInstance)
++		{
++			*pszInstance++ = 0;
++			pszInst = pszInstance;
++			pszInstance = strchr(pszInstance, ')');
++			if (pszInstance)
++			{
++				*pszInstance = 0;
++				query.ixInst = (int)(pszInst - pszTemp);
++				query.cchInst = (int)(pszInstance - pszInst);
++				query.idInst = atoi(pszInst);
++			}
++			pszRegKey = pszTemp;
++		}
++		dprintf ( D_FULLDEBUG, "cracking key as key=\"%s\", inst=\"%s\"\n",
++			     pszRegKey, pszInst);
++	}
++
++	// if the regkey is a number, use it, otherwise, use the performance_hashtable
++	// to get the index from the given name.
++	//
++	if (isdigit(pszRegKey[0]))
++		query.idKey = atoi(pszRegKey);
++	else
++	{
++		init_windows_performance_hashtable();  // this is quick if we already init'd
++		const char * pszPerfIndex = NULL;
++		if (rl.pPerfTable && 
++			(rl.pPerfTable->lookup(pszRegKey, pszPerfIndex) >= 0))
++		{
++			query.idKey = atoi(pszPerfIndex);
++		}
++	}
++
++	if (pszValueName && pszValueName[0])
++	{
++		if (isdigit(pszValueName[0]))
++			query.idCounter = atoi(pszValueName);
++		else
++		{
++			init_windows_performance_hashtable();  // this is quick if we already init'd
++			const char * pszCounterIndex = NULL;
++			if (rl.pPerfTable)
++			{
++				//if (rl.pPerfTable->lookup(pszValueName, pszCounterIndex) >= 0)
++				//	query.idCounter = atoi(pszCounterIndex);
++				void * cur = NULL, *next = NULL;
++				int ix = 0;
++				while (rl.pPerfTable->getNext(pszValueName, cur, pszCounterIndex, next) >= 0)
++				{
++					((DWORD*)&query.idCounter)[ix++] = atoi(pszCounterIndex);
++					cur = next;
++				}
++				if (query.idAlt[NUM_ELEMENTS(query.idAlt)-1] != 0)
++				{
++					dprintf (D_ALWAYS, "Error: too many counter ids map to the same name!");
++					query.idAlt[NUM_ELEMENTS(query.idAlt)-1] = 0;
++				}
++			}
++		}
++	}
++
++	if (pszTemp)
++		free(pszTemp);
++
++	return (query.idKey != 0);
++}
++
++int WinPerf_CounterValue::Print(char * psz, int cchMax, bool fIncludeUnits) const
++{
++	int cch = 0;
++	psz[0] = 0;
++	if ((this->type & WinPerf_CT_Double) == WinPerf_CT_Double)
++	{
++		cch = sprintf(psz, "%f", value.d);
++	}
++	else
++	{
++		const char * pszFmt = "";
++		switch (this->type & ~WinPerf_CT_UnitsMask)
++		{
++		case WinPerf_CT_Unsigned | WinPerf_CT_Hex:     pszFmt = "%I64X"; break;
++		case WinPerf_CT_Signed   | WinPerf_CT_Decimal: pszFmt = "%I64d"; break;
++		case WinPerf_CT_Unsigned | WinPerf_CT_Decimal: pszFmt = "%I64u"; break;
++
++		case WinPerf_CT_Unsigned | WinPerf_CT_Hex | WinPerf_CT_Short:     pszFmt = "%X"; break;
++		case WinPerf_CT_Signed   | WinPerf_CT_Decimal | WinPerf_CT_Short: pszFmt = "%d"; break;
++		case WinPerf_CT_Unsigned | WinPerf_CT_Decimal | WinPerf_CT_Short: pszFmt = "%u"; break;
++		}
++		cch = sprintf(psz, pszFmt, value.ul);
++	}
++	
++	if (fIncludeUnits)
++	{
++		const char * pszUnits = NULL;
++		switch (this->type & WinPerf_CT_UnitsMask)
++		{
++		case WinPerf_CT_Seconds:   pszUnits = " sec";  break;
++		case WinPerf_CT_PerSecond: pszUnits = "/sec"; break;
++		case WinPerf_CT_Percent:   pszUnits = " %";	  break;
++		}
++		if (pszUnits)
++		{
++			//psz[cch++] = ' ';
++			strcpy(&psz[cch], pszUnits);
++			cch += strlen(pszUnits);
++		}
++	}
++
++	return cch;
++}
++
++static int free_query_data(WinPerf_QueryResult result) {
++	if (result.pdata1)
++		free((void*)result.pdata1);
++	if (result.pdata2)
++		free((void*)result.pdata2);
++	return true;
++}
++
++void release_all_WinPerf_results()
++{
++    if (rl.pQueries)
++    {
++        rl.pQueries->walk(free_query_data);
++        free (rl.pQueries);
++        rl.pQueries = NULL;
++    }
++}
++
++bool update_windows_performance_result(WinPerf_QueryResult & result)
++{
++	char szKeyID[12];
++	wsprintf(szKeyID, "%d", result.idObject);
++	DWORD cbData = result.cbAlloc;
++	DWORD vtype = REG_SZ; 
++
++	// the new data set becomes the old data set, and the (formerly) old
++	// data set will be overwritten. 
++	byte * pdata = (byte*)result.pdata1;
++	result.pdata1 = result.pdata2;
++	result.pdata2 = (const WinPerf_Data *)pdata;
++
++	// query for the data, if it fits, we get back success, note that it's
++	// safe to pass NULL for pdata here. 
++	LONG lres = RegQueryValueEx(HKEY_PERFORMANCE_DATA, szKeyID, NULL, &vtype, pdata, &cbData);
++	if (ERROR_SUCCESS == lres)
++	{
++		return true;
++	}
++
++	if (ERROR_SUCCESS != lres && ERROR_MORE_DATA != lres)
++	{
++		if (ERROR_FILE_NOT_FOUND == lres)
++		{
++			// the key did not exist.
++			dprintf( D_FULLDEBUG, 
++ 				"The Performance Key \"HKPD\\%s\" does not exist\n",
++					szKeyID);
++		}
++		else
++		{
++			// there was some other error, probably an access violation.
++			char szMsg[MAX_PATH];
++			dprintf( D_ALWAYS, 
++				"Failed to read Performance Key \"HKPD\\%s\"\nReason: %s\n",
++					szKeyID, 
++					GetLastErrMessage(GetLastError(), szMsg, NUM_ELEMENTS(szMsg)));
++		}
++		return false;
++	}
++	
++	// save off the old data set, we may need to copy it into a new buffer.
++	const byte * pdataOld = (const byte *)result.pdata1;
++	result.pdata1 = NULL;
++	result.pdata2 = NULL;
++
++	// keep querying with increasingly larger allocations until
++	// we get back an answer other than ERROR_MORE_DATA.
++	DWORD  cbAlloc = result.cbAlloc;
++	do 
++	{
++		if (cbAlloc < 0x10000) cbAlloc *= 2;
++		cbAlloc += max(cbAlloc, 0x200);
++
++		if (pdata) 
++			free(pdata);
++		pdata = (byte*)malloc(cbAlloc);
++		if ( ! pdata)
++			break;
++
++		//dprintf( D_FULLDEBUG, "Query %s with %d byte buffer\n", szKeyID, cbData);
++
++		cbData = cbAlloc;
++		lres = RegQueryValueEx(HKEY_PERFORMANCE_DATA, szKeyID, NULL, &vtype, pdata, &cbData);
++
++	} while (lres == ERROR_MORE_DATA);
++
++	if (lres != ERROR_SUCCESS)
++	{
++		if (pdataOld) free((void*)pdataOld);
++		if (pdata) free(pdata);
++		return false;
++	}
++
++	// if we have old data, we need to copy it into a buffer of size cbAlloc
++	//
++	if (pdataOld)
++	{
++		byte * pdataT = (byte*)malloc(cbAlloc);
++		if (pdataT)
++		{
++			CopyMemory(pdataT, pdataOld, result.cbAlloc);
++			free ((void*)pdataOld);
++			pdataOld = pdataT;
++		}
++	}
++
++	result.cbAlloc = cbAlloc;
++	result.pdata1 = (const WinPerf_Data *)pdataOld;
++	result.pdata2 = (const WinPerf_Data *)pdata;
++	return true;
++}
++
++void update_all_WinPerf_results()
++{
++    if (rl.pQueries)
++    {
++        rl.pQueries->startIterations();
++        WinPerf_QueryResult result;
++        while (rl.pQueries->iterate(result)) 
++        {
++            update_windows_performance_result(result);
++            rl.pQueries->insert(result.idObject, result);
++        }
++    }
++}
++
++static bool update_windows_performance_value(
++	const WinPerf_QueryResult & result, 
++	const WinPerf_Query & query, 
++	AttribValue *pav)
++{
++	if ( ! pav)
++		return false;
++
++	const WinPerf_Data * pHead = result.pdata2;
++	const WinPerf_Object * pObj = pHead->Find(query.idKey);
++	if ( ! pObj)
++		return false;
++
++	const WinPerf_CounterDef * pCounter = pObj->Select(&query.idCounter);
++	if ( ! pCounter)
++		return false;
++
++	const char *pszInst = NULL;
++	if (query.cchInst)
++	{
++		if ( ! query.ixInst)
++			pszInst = (const char*)((&query)+1);
++		else
++		{
++			// error, can't use a relative pszInst without
++			// the pszKey that it references.
++		}
++	}
++
++	const BYTE * pbData = pObj->CounterData();
++
++	// figure out which set of counter data to look at.
++	// use the object data if no instances, use the matching
++	// instance if there is a pszMatch, use the last instance
++	// if no match. _Total is usually the last instance.
++	// we start iterating at 1 because we want to compare only
++	// the first n-1 instances, the last instance will always match
++	const WinPerf_ObjInst * pInst = pObj->FirstInstance();
++	const WCHAR * pszDataName = NULL;
++	for (int ix = 1; ix < (int)pObj->NumInstances; ++ix, pInst = pInst->Next())
++	{
++		if (pszInst && pInst->Matches(pszInst))
++		{
++			pszDataName = pInst->Name();
++			break;
++		}
++	}
++	if (pInst)
++		pbData = pInst->CounterData();
++
++	if ( ! pbData)
++		return false;
++
++	WinPerf_CounterValue ctval;
++	WinPerf_TimerDeltas time;
++	time.obj      = pObj->PerfTime.QuadPart;
++	time.objabs   = pObj->PerfTime.QuadPart;
++	time.objfreq  = pObj->PerfFreq.QuadPart;
++	time.head     = pHead->PerfTime.QuadPart;
++	time.headfreq = pHead->PerfFreq.QuadPart;
++	time.nanos    = pHead->PerfTime100nSec.QuadPart;
++
++	const BYTE * pbDataPrev = NULL;
++	if (result.pdata1 && (pCounter->CounterType & PERF_DELTA_COUNTER))
++	{
++		const WinPerf_Object  * pObj1 = result.pdata1->Find(query.idKey);
++		const WinPerf_ObjInst * pInst1 = pObj1->FirstInstance();
++		pbDataPrev = pObj1->CounterData();
++		for (int ix = 1; ix < (int)pObj1->NumInstances; ++ix, pInst1 = pInst1->Next())
++		{
++			if (pszInst && pInst1->Matches(pszInst)
++				&& pInst->Name() && pszDataName
++				&& (0 == lstrcmpW(pInst->Name(), pszDataName)))
++				break;
++		}
++		if (pInst1)
++			pbDataPrev = pInst1->CounterData();
++
++		time.obj      -= pObj1->PerfTime.QuadPart;
++		time.head     -= result.pdata1->PerfTime.QuadPart;
++		time.nanos    -= result.pdata1->PerfTime100nSec.QuadPart;
++	}
++
++	if ( ! pObj->GetValue(ctval, pCounter, time, pbData, pbDataPrev))
++		return false;
++
++	pav->value.ll = ctval.value.ll;
++	pav->vtype = AttribValue_DataType_Int;
++	if ((ctval.type & WinPerf_CT_Double) == WinPerf_CT_Double)
++		pav->vtype = AttribValue_DataType_Double;
++																												 
++	// if the value is a 64bit integer, and it won't fit in a 32 bit integer
++	// convert it to a double.
++	//
++	if ((ctval.type & (WinPerf_CT_Double | WinPerf_CT_Short)) == WinPerf_CT_Signed)
++	{
++		if (ctval.value.ll > 0x7FFFFFFF || ctval.value.ll < 0x8000000)
++		{
++			pav->value.d = (double)ctval.value.ll;
++			pav->vtype = AttribValue_DataType_Double;
++		}
++	}
++	else if ((ctval.type & (WinPerf_CT_Double | WinPerf_CT_Short)) == WinPerf_CT_Unsigned)
++	{
++		if (ctval.value.ul > 0x7FFFFFFF)
++		{
++			pav->value.d = (double)ctval.value.ul;
++			pav->vtype = AttribValue_DataType_Double;
++		}
++	}
++
++	return true;
++}
++
++bool update_WinPerf_Value(AttribValue *pav)
++{
++    if ( ! pav)
++        return false;
++
++    WinPerf_Query * pquery = (WinPerf_Query *)pav->pquery;
++    if (pquery && rl.pQueries)
++    {
++        WinPerf_QueryResult result;
++        if (rl.pQueries->lookup(pquery->idKey, result) >= 0)
++            return update_windows_performance_value(result, *pquery, pav);
++    }
++
++    return false;
++}
++
++
++AttribValue * add_WinPerf_Query(
++    const char * pszAttr,
++    const char * pkey)
++{
++	WinPerf_Query query;
++	if ( ! init_WinPerf_Query(pkey, NULL, query)) 
++       return NULL;
++
++    // allocate an initialize an AttribValue, this consists
++    // of a header (AttribValue) the attrib string, the query
++    // and the query instance data all packed together into a single
++    // allocation, with the AttribValue at the start. 
++    //
++	int cbQuery  = sizeof(query) + query.cchInst+1;
++	int cchAttr  = strlen(pszAttr) + 1;
++	int cb = sizeof(AttribValue) + cbQuery + cchAttr;
++	AttribValue * pav = (AttribValue*)malloc(cb);
++	if (pav) 
++    {
++		pav->cb = cb;
++		strcpy((char*)(pav+1), pszAttr);
++		pav->pszAttr = (char*)(pav+1);
++
++		pav->vtype = AttribValue_DataType_Double;
++		pav->value.d = 0.0;
++		WinPerf_Query * pquery = (WinPerf_Query *)(pav->pszAttr + cchAttr);
++		*pquery = query;
++		pquery->ixInst = 0;
++		if (pquery->cchInst) 
++        {
++			strncpy((char*)(pquery+1), pkey + query.ixInst, query.cchInst);
++			((char*)(pquery+1))[query.cchInst] = 0;
++		}
++		pav->pquery = (void*)pquery;
++
++		// add this this key to the list of queries
++		WinPerf_QueryResult result = {query.idKey, 0, NULL, NULL};
++		rl.pQueries->insert(query.idKey, result);
++        /*
++        bool found = false;
++        lst_WinPerf.Rewind();
++        while (WinPerf_QueryResult * pres = lst_WinPerf.Next()) 
++        {
++            if (pres && (pres->idObject == query.idKey)) 
++            {
++                found = true;
++                break;
++            }
++        }
++
++        if ( ! found) 
++        {
++            WinPerf_QueryResult * pres = (WinPerf_QueryResult *)malloc (sizeof(*pres));
++            ASSERT(pres);
++            ZeroMemory(pres, sizeof(*pres));
++            pres->idObject = query.idKey;
++	        lst_WinPerf.InsertHead(pres);
++        }
++        */
++	}
++
++    return pav;
++}
+diff --git a/src/condor_startd.V6/winreg.windows.h b/src/condor_startd.V6/winreg.windows.h
+new file mode 100644
+index 0000000..a2eea7e
+--- /dev/null
++++ b/src/condor_startd.V6/winreg.windows.h
+@@ -0,0 +1,105 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++/* 
++    This file defines classes and structures use to gather values
++    from the Windows registry and put them in a form that is convenient
++    to publish in a ClassAd
++
++   	Written 2010 by John M. Knoeller <johnkn at cs.wisc.edu>
++*/
++
++#ifndef _WINREG_CONDOR_H
++#define _WINREG_CONDOR_H
++#ifndef WIN32
++#pragma error This module is Win32 specific
++#endif
++
++
++/*
++
++	//
++	int          qtype;    // the query type, used to decode the query union
++	union {
++		struct {
++			HKEY    hive;
++			const char * pszKey;
++		} reg;
++		struct {
++			DWORD   idKey;    // identifies counter group (WinPerf_Object)
++			DWORD   idCounter;// identifies counter (WinPerf_CounterDef)
++			DWORD   idAlt[6]; // alternate counter ids because there are multiple ids that match a single string.
++			DWORD   idInst;   // instance unique id (if available)
++			int     ixInstName;  // offset to string of the instance name
++			int     cchInstName; // size of the instance name in characters
++		} perf;
++	} query;
++
++	bool IsRegQuery() const { return (this->qtype == 0); }
++	bool IsPerfQuery() const { return (this->qtype == 1); }
++
++	const char * RegKeyName() const {
++		if (IsRegQuery() && query.reg.ixKeyName >= sizeof(this) && query.reg.ixKeyName < cb)
++			return (const char *)this + query.reg.ixKeyName;
++		return NULL;
++	}
++
++	const char * RegValueName() const {
++		if (IsRegQuery() && query.reg.ixValueName >= sizeof(this) && query.reg.ixValueName < cb)
++			return (const char *)this + query.reg.ixValueName;
++		return NULL;
++	}
++
++	const char * PerfInstance() const {
++		if (IsPerfQuery() && query.perf.ixInstName >= sizeof(this) && query.perf.ixInstName < cb)
++			return (const char *)this + query.perf.ixInstName;
++		return NULL;
++	}
++*/
++
++char * generate_reg_key_attr_name(
++    const char * pszPrefix, 
++    const char * pszKeyName);
++
++HKEY parse_hive_prefix(
++    const char * psz, 
++    int cch, 
++    int * pixPrefixSep);
++
++char * get_windows_reg_value(
++	const char * pszRegKey, 
++	const char * pszValueName, 
++	int          options = 0);
++
++void release_all_WinPerf_results();
++bool update_WinPerf_Value(struct _AttribValue *pav);
++void update_all_WinPerf_results();
++
++struct _AttribValue * add_WinPerf_Query(
++    const char * pszAttr,
++    const char * pkey);
++
++/*
++bool init_WinPerf_Query(
++	const char * pszRegKey, 
++	const char * pszValueName, 
++	WinPerf_Query & query);
++*/
++
++#endif /* _WINREG_CONDOR_H */
+diff --git a/src/condor_starter.V6.1/CondorJavaInfo.class b/src/condor_starter.V6.1/CondorJavaInfo.class
+index 2f28c3b..893d89c 100644
+Binary files a/src/condor_starter.V6.1/CondorJavaInfo.class and b/src/condor_starter.V6.1/CondorJavaInfo.class differ
+diff --git a/src/condor_starter.V6.1/CondorJavaInfo.java b/src/condor_starter.V6.1/CondorJavaInfo.java
+index 73153e2..71d6f94 100644
+--- a/src/condor_starter.V6.1/CondorJavaInfo.java
++++ b/src/condor_starter.V6.1/CondorJavaInfo.java
+@@ -98,7 +98,7 @@ public class CondorJavaInfo {
+ 			// deal with escaped double quotes very well. This might be
+ 			// revisited in the future.
+ 			System.out.print( UnDotString(name) + " = \"" + 
+-				value.replace('"', '\'') + "\"");
++				value.replace('"', '\'').replace('\n',' ').replace('\r', ' ') + "\"");
+ 
+ 			if( newmode ) {
+ 				System.out.println(";");
+diff --git a/src/condor_starter.V6.1/baseStarter.cpp b/src/condor_starter.V6.1/baseStarter.cpp
+index 7b2bb65..a740e91 100644
+--- a/src/condor_starter.V6.1/baseStarter.cpp
++++ b/src/condor_starter.V6.1/baseStarter.cpp
+@@ -78,6 +78,7 @@ CStarter::CStarter()
+ 	m_configured = false;
+ 	m_job_environment_is_ready = false;
+ 	m_all_jobs_done = false;
++	remote_state_change = false;
+ }
+ 
+ 
+@@ -168,6 +169,9 @@ CStarter::Init( JobInfoCommunicator* my_jic, const char* original_cwd,
+ 	daemonCore->Register_Signal(SIGUSR1, "SIGUSR1",
+ 		(SignalHandlercpp)&CStarter::RemoteRemove, "RemoteRemove",
+ 		this);
++	daemonCore->Register_Signal(DC_SIGSTATECHANGE, "DC_SIGSTATECHANGE",
++		(SignalHandlercpp)&CStarter::RemoteStateChange, "RemoteStateChange",
++		this);
+ 	daemonCore->Register_Signal(DC_SIGHOLD, "DC_SIGHOLD",
+ 		(SignalHandlercpp)&CStarter::RemoteHold, "RemoteHold",
+ 		this);
+@@ -215,15 +219,14 @@ CStarter::Init( JobInfoCommunicator* my_jic, const char* original_cwd,
+ 						  "START_SSHD",
+ 						  (CommandHandlercpp)&CStarter::startSSHD,
+ 						  "CStarter::startSSHD", this, READ );
+-
+-	sysapi_set_resource_limits();
+-
+ 		// initialize our JobInfoCommunicator
+ 	if( ! jic->init() ) {
+ 		dprintf( D_ALWAYS, 
+ 				 "Failed to initialize JobInfoCommunicator, aborting\n" );
+ 		return false;
+ 	}
++	if(jic) sysapi_set_resource_limits(jic->getStackSize());
++	else sysapi_set_resource_limits(1<<29); // 512 MB is default stack size.
+ 
+ 		// Now, ask our JobInfoCommunicator to setup the environment
+ 		// where our job is going to execute.  This might include
+@@ -270,7 +273,6 @@ CStarter::Config()
+ 			EXCEPT("Execute directory not specified in config file.");
+ 		}
+ 	}
+-
+ 	if (!m_configured) {
+ 		bool ps = privsep_enabled();
+ 		bool gl = param_boolean("GLEXEC_JOB", false);
+@@ -460,6 +462,19 @@ CStarter::RemoteRemove( int )
+ 	return ( false );
+ }
+ 
++void
++CStarter::RemoteStateChange( int )
++{
++dprintf(D_FULLDEBUG, "Notified of remote state change\n");
++	remote_state_change = true;
++}
++
++void
++CStarter::resetStateChanged( void )
++{
++	remote_state_change = false;
++}
++
+ /**
+  * Attempts to remove all the jobs from the job queue
+  * If a job has already been removed, that is if job->Remove() returns
+diff --git a/src/condor_starter.V6.1/condor_glexec_cleanup b/src/condor_starter.V6.1/condor_glexec_cleanup
+index c6061cf..dc986a4 100755
+--- a/src/condor_starter.V6.1/condor_glexec_cleanup
++++ b/src/condor_starter.V6.1/condor_glexec_cleanup
+@@ -17,11 +17,11 @@ SANDBOX="$3"
+ SH=`readlink -f /bin/sh`
+ GLEXEC_CLIENT_CERT="$SANDBOX.condor/$PROXY"
+ export GLEXEC_CLIENT_CERT
+-"$GLEXEC" "$SH" -c "rm \"$SANDBOX/$PROXY\" && \
++"$GLEXEC" "$SH" -c "rm -f \"$SANDBOX/$PROXY\" && \
+                         tar -C \"$SANDBOX\" -c . && \
+                         rm -rf \"$SANDBOX\"" | \
+     tar -C "$SANDBOX.condor" -x
+ 
+ # move the condor-owned sandbox back in place
+ #
+-mv "$SANDBOX.condor" "$SANDBOX"
++mv -f "$SANDBOX.condor" "$SANDBOX"
+diff --git a/src/condor_starter.V6.1/jic_local_schedd.cpp b/src/condor_starter.V6.1/jic_local_schedd.cpp
+index 44afe5e..b998092 100644
+--- a/src/condor_starter.V6.1/jic_local_schedd.cpp
++++ b/src/condor_starter.V6.1/jic_local_schedd.cpp
+@@ -24,7 +24,7 @@
+ #include "condor_string.h"
+ #include "condor_attributes.h"
+ #include "condor_email.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "exit.h"
+ #include "internet.h"
+ 
+diff --git a/src/condor_starter.V6.1/jic_shadow.cpp b/src/condor_starter.V6.1/jic_shadow.cpp
+index b17cd6c..04a3cb4 100644
+--- a/src/condor_starter.V6.1/jic_shadow.cpp
++++ b/src/condor_starter.V6.1/jic_shadow.cpp
+@@ -377,8 +377,10 @@ bool JICShadow::allJobsDone( void )
+ 
+ 	r1 = JobInfoCommunicator::allJobsDone();
+ 
+-	publishJobExitAd( &update_ad );
+-	r2 = updateShadow( &update_ad, true );
++	if (!m_did_transfer) {
++		publishJobExitAd( &update_ad );
++		r2 = updateShadow( &update_ad, true );
++	}
+ 
+ 	return r1;
+ }
+diff --git a/src/condor_starter.V6.1/job_info_communicator.cpp b/src/condor_starter.V6.1/job_info_communicator.cpp
+index c51f836..b6d9355 100644
+--- a/src/condor_starter.V6.1/job_info_communicator.cpp
++++ b/src/condor_starter.V6.1/job_info_communicator.cpp
+@@ -474,6 +474,14 @@ JobInfoCommunicator::initUserPrivNoOwner( void )
+ 	return true;
+ }
+ 
++int JobInfoCommunicator::getStackSize(void)
++{
++	int value=1<<29; // Take 512 MB to be default stack size
++	if(job_ad && !job_ad->LookupInteger(ATTR_STACK_SIZE,value))
++		value = 1<<29;
++	return value;
++}
++
+ bool
+ JobInfoCommunicator::allowRunAsOwner( bool default_allow, bool default_request )
+ {
+diff --git a/src/condor_starter.V6.1/job_info_communicator.h b/src/condor_starter.V6.1/job_info_communicator.h
+index bdb0003..51dcee2 100644
+--- a/src/condor_starter.V6.1/job_info_communicator.h
++++ b/src/condor_starter.V6.1/job_info_communicator.h
+@@ -74,7 +74,7 @@ public:
+ 	void setStdin( const char* path );
+ 	void setStdout( const char* path );
+ 	void setStderr( const char* path );
+-	
++	int getStackSize(void);	
+ 		// // // // // // // // // // // //
+ 		// Job Actions
+ 		// // // // // // // // // // // //
+diff --git a/src/condor_starter.V6.1/starter.h b/src/condor_starter.V6.1/starter.h
+index b36f38e..f8a427a 100644
+--- a/src/condor_starter.V6.1/starter.h
++++ b/src/condor_starter.V6.1/starter.h
+@@ -190,6 +190,8 @@ public:
+ 		*/
+ 	virtual bool cleanupJobs( void );
+ 
++	virtual void RemoteStateChange( int );
++
+ 		/** Return the Working dir */
+ 	const char *GetWorkingDir() const { return WorkingDir.Value(); }
+ 
+@@ -279,6 +281,8 @@ public:
+ 		return dynamic_cast<GLExecPrivSepHelper*>(m_privsep_helper);
+ 	}
+ #endif
++	bool remoteStateChanged( void ) { return remote_state_change; };
++	void resetStateChanged( void );
+ 
+ protected:
+ 	List<UserProc> m_job_list;
+@@ -375,6 +379,8 @@ private:
+ 
+ 		// true if allJobsDone() has been called
+ 	bool m_all_jobs_done;
++
++	bool remote_state_change;
+ };
+ 
+ #endif
+diff --git a/src/condor_starter.V6.1/vanilla_proc.cpp b/src/condor_starter.V6.1/vanilla_proc.cpp
+index b27af2a..f879393 100644
+--- a/src/condor_starter.V6.1/vanilla_proc.cpp
++++ b/src/condor_starter.V6.1/vanilla_proc.cpp
+@@ -208,9 +208,37 @@ VanillaProc::StartJob()
+ 	}
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// Determine the cgroup
++	char* cgroup_base = param("BASE_CGROUP"), *cgroup = NULL;
++	int cluster, proc, bufpos=0, buflen=0;
++	if (cgroup_base && JobAd->LookupInteger(ATTR_CLUSTER_ID, cluster) &&
++			JobAd->LookupInteger(ATTR_PROC_ID, proc)) {
++		cgroup = (char *)malloc(sizeof(char)*80);
++		ASSERT (cgroup != NULL);
++		int rc = sprintf_realloc(&cgroup,&bufpos,&buflen,"%s%c%s%d%c%d",
++			cgroup_base, DIR_DELIM_CHAR, "job_",
++			cluster, '_', proc);
++		if (rc < 0) {
++			EXCEPT("Unable to determine the cgroup to use.");
++		} else {
++			fi.cgroup = cgroup;
++			dprintf(D_FULLDEBUG, "Requesting cgroup %s for job %d.%d.\n",
++				cgroup, cluster, proc);
++		}
++	}
++#endif
++
+ 	// have OsProc start the job
+ 	//
+-	return OsProc::StartJob(&fi);
++	int retval = OsProc::StartJob(&fi);
++
++#if defined(HAVE_EXT_LIBCGROUP)
++	if (cgroup != NULL)
++		free(cgroup);
++#endif
++
++	return retval;
+ }
+ 
+ 
+@@ -244,6 +272,14 @@ VanillaProc::PublishUpdateAd( ClassAd* ad )
+ 	ad->InsertOrUpdate( buf );
+ 	sprintf( buf, "%s=%lu", ATTR_RESIDENT_SET_SIZE, usage->total_resident_set_size );
+ 	ad->InsertOrUpdate( buf );
++	if (usage->block_read_bytes >= 0) {
++		sprintf( buf, "%s=%lu", ATTR_BLOCK_READ_KBYTES, usage->block_read_bytes/1024 );
++		ad->InsertOrUpdate( buf );
++	}
++	if (usage->block_write_bytes >= 0) {
++		sprintf( buf, "%s=%lu", ATTR_BLOCK_WRITE_KBYTES, usage->block_write_bytes/1024 );
++		ad->InsertOrUpdate( buf );
++	}
+ 
+ 		// Update our knowledge of how many processes the job has
+ 	num_pids = usage->num_procs;
+@@ -342,7 +378,11 @@ VanillaProc::ShutdownGraceful()
+ 	//
+ 	OsProc::ShutdownGraceful();
+ #if !defined(WIN32)
+-	startEscalationTimer();
++	if (Starter->remoteStateChanged() == false)
++	{
++		startEscalationTimer();
++	}
++	Starter->resetStateChanged();
+ #endif
+ 	return false; // shutdown is pending (same as OsProc::ShutdownGraceful()
+ }
+diff --git a/src/condor_starter.std/starter_main.cpp b/src/condor_starter.std/starter_main.cpp
+index 557604b..a9e835d 100644
+--- a/src/condor_starter.std/starter_main.cpp
++++ b/src/condor_starter.std/starter_main.cpp
+@@ -164,7 +164,7 @@ init()
+ {
+ 	move_to_execute_directory();
+ 	init_environment_info();
+-	sysapi_set_resource_limits();
++	sysapi_set_resource_limits(1<<29);
+ 	close_unused_file_descriptors();
+ 
+ 	return DEFAULT;
+diff --git a/src/condor_submit.V6/submit.cpp b/src/condor_submit.V6/submit.cpp
+index 377ab61..0c744da 100644
+--- a/src/condor_submit.V6/submit.cpp
++++ b/src/condor_submit.V6/submit.cpp
+@@ -33,8 +33,6 @@
+ #include "condor_attributes.h"
+ #include "condor_adtypes.h"
+ #include "condor_io.h"
+-#include "condor_parser.h"
+-#include "condor_scanner.h"
+ #include "condor_distribution.h"
+ #include "condor_ver_info.h"
+ #if !defined(WIN32)
+@@ -44,6 +42,7 @@
+ // WINDOWS only
+ #include "store_cred.h"
+ #endif
++#include "internet.h"
+ #include "my_hostname.h"
+ #include "domain_tools.h"
+ #include "get_daemon_name.h"
+@@ -83,6 +82,8 @@
+ #include "vm_univ_utils.h"
+ #include "condor_md.h"
+ 
++#include <string>
++
+ // TODO: hashFunction() is case-insenstive, but when a MyString is the
+ //   hash key, the comparison in HashTable is case-sensitive. Therefore,
+ //   the case-insensitivity of hashFunction() doesn't complish anything.
+@@ -110,6 +111,7 @@ char	*OperatingSystem;
+ char	*Architecture;
+ char	*Spool;
+ char	*ScheddName = NULL;
++std::string ScheddAddr;
+ char	*PoolName = NULL;
+ DCSchedd* MySchedd = NULL;
+ char	*My_fs_domain;
+@@ -182,7 +184,7 @@ extern const int JOB_DEFERRAL_PREP_DEFAULT;
+ 
+ char* LogNotesVal = NULL;
+ char* UserNotesVal = NULL;
+-
++char* StackSizeVal = NULL;
+ List<char> extraLines;  // lines passed in via -a argument
+ 
+ #define PROCVARSIZE	32
+@@ -261,6 +263,7 @@ const char	*BufferFiles = "buffer_files";
+ const char	*BufferSize = "buffer_size";
+ const char	*BufferBlockSize = "buffer_block_size";
+ 
++const char	*StackSize = "stack_size";
+ const char	*FetchFiles = "fetch_files";
+ const char	*CompressFiles = "compress_files";
+ const char	*AppendFiles = "append_files";
+@@ -365,7 +368,7 @@ const char    *VM_Networking = "vm_networking";
+ const char    *VM_Networking_Type = "vm_networking_type";
+ 
+ //
+-// Amazon EC2 Parameters
++// Amazon EC2 SOAP Parameters
+ //
+ const char* AmazonPublicKey = "amazon_public_key";
+ const char* AmazonPrivateKey = "amazon_private_key";
+@@ -377,6 +380,19 @@ const char* AmazonKeyPairFile = "amazon_keypair_file";
+ const char* AmazonInstanceType = "amazon_instance_type";
+ 
+ //
++// EC2 Query Parameters
++//
++const char* EC2AccessKeyId = "ec2_access_key_id";
++const char* EC2SecretAccessKey = "ec2_secret_access_key";
++const char* EC2AmiID = "ec2_ami_id";
++const char* EC2UserData = "ec2_user_data";
++const char* EC2UserDataFile = "ec2_user_data_file";
++const char* EC2SecurityGroups = "ec2_security_groups";
++const char* EC2KeyPairFile = "ec2_keypair_file";
++const char* EC2InstanceType = "ec2_instance_type";
++const char* EC2ElasticIP = "ec2_elastic_ip";
++
++//
+ // Deltacloud Parameters
+ //
+ const char* DeltacloudUsername = "deltacloud_username";
+@@ -801,6 +817,19 @@ main( int argc, char *argv[] )
+ 			} else if ( match_prefix( ptr[0], "-spool" ) ) {
+ 				Remote++;
+ 				DisableFileChecks = 1;
++            // can't use match_prefix() here, since '-a' already has popular semantic
++            } else if ( 0 == strcmp(ptr[0], "-addr") ) {
++				if( !(--argc) || !(*(++ptr)) ) {
++					fprintf(stderr, "%s: -addr requires another argument\n", MyName);
++					exit(1);
++				}
++                if (!is_valid_sinful(*ptr)) {
++                    fprintf(stderr, "%s: \"%s\" is not a valid address\n", MyName, *ptr);
++                    fprintf(stderr, "Should be of the form <ip.address.here:port>\n");
++                    fprintf(stderr, "For example: <123.456.789.123:6789>\n");
++                    exit(1);
++                }
++                ScheddAddr = *ptr;
+ 			} else if ( match_prefix( ptr[0], "-remote" ) ) {
+ 				Remote++;
+ 				DisableFileChecks = 1;
+@@ -940,7 +969,11 @@ main( int argc, char *argv[] )
+ 	if ( !DumpClassAdToFile ) {
+ 		// Instantiate our DCSchedd so we can locate and communicate
+ 		// with our schedd.  
+-		MySchedd = new DCSchedd( ScheddName, PoolName );
++        if (!ScheddAddr.empty()) {
++            MySchedd = new DCSchedd(ScheddAddr.c_str());
++        } else {
++            MySchedd = new DCSchedd(ScheddName, PoolName);
++        }
+ 		if( ! MySchedd->locate() ) {
+ 			if( ScheddName ) {
+ 				fprintf( stderr, "\nERROR: Can't find address of schedd %s\n",
+@@ -1460,6 +1493,7 @@ SetExecutable()
+ 		 ( JobUniverse == CONDOR_UNIVERSE_GRID &&
+ 		   JobGridType != NULL &&
+ 		   ( strcasecmp( JobGridType, "amazon" ) == MATCH ||
++			 strcasecmp( JobGridType, "ec2" ) == MATCH ||
+ 			 strcasecmp( JobGridType, "deltacloud" ) == MATCH ) ) ) {
+ 		ignore_it = true;
+ 	}
+@@ -1741,7 +1775,7 @@ SetUniverse()
+ 			// Validate
+ 			// Valid values are (as of 7.5.1): nordugrid, globus,
+ 			//    gt2, gt5, gt4, infn, blah, pbs, lsf, nqs, naregi, condor,
+-			//    amazon, unicore, cream, deltacloud
++			//    amazon, unicore, cream, deltacloud, ec2
+ 
+ 			// CRUFT: grid-type 'blah' is deprecated. Now, the specific batch
+ 			//   system names should be used (pbs, lsf). Glite are the only
+@@ -1759,6 +1793,7 @@ SetUniverse()
+ 				(strcasecmp (JobGridType, "condor") == MATCH) ||
+ 				(strcasecmp (JobGridType, "nordugrid") == MATCH) ||
+ 				(strcasecmp (JobGridType, "amazon") == MATCH) ||	// added for amazon job
++				(strcasecmp (JobGridType, "ec2") == MATCH) ||
+ 				(strcasecmp (JobGridType, "deltacloud") == MATCH) ||
+ 				(strcasecmp (JobGridType, "unicore") == MATCH) ||
+ 				(strcasecmp (JobGridType, "cream") == MATCH)){
+@@ -1772,7 +1807,7 @@ SetUniverse()
+ 
+ 				fprintf( stderr, "\nERROR: Invalid value '%s' for grid type\n", JobGridType );
+ 				fprintf( stderr, "Must be one of: gt2, gt4, gt5, pbs, lsf, "
+-						 "nqs, condor, nordugrid, unicore, amazon, deltacloud, or cream\n" );
++						 "nqs, condor, nordugrid, unicore, amazon, ec2, deltacloud, or cream\n" );
+ 				exit( 1 );
+ 			}
+ 		}			
+@@ -3734,6 +3769,17 @@ SetUserNotes()
+ }
+ 
+ void
++SetStackSize()
++{
++	StackSizeVal = condor_param(StackSize,ATTR_STACK_SIZE);
++	MyString buffer;
++	if( StackSizeVal ) {
++		(void) buffer.sprintf( "%s = %s", ATTR_STACK_SIZE, StackSizeVal);
++		InsertJobExpr(buffer);
++	}
++}
++
++void
+ SetRemoteInitialDir()
+ {
+ 	char *who = condor_param( RemoteInitialDir, ATTR_JOB_REMOTE_IWD );
+@@ -4840,7 +4886,8 @@ SetGridParams()
+ 			InsertJobExpr (buffer);
+ 		}
+ 
+-		if ( strcasecmp( tmp, "amazon" ) == 0 ) {
++		if ( strcasecmp( tmp, "amazon" ) == 0 ||
++			 strcasecmp( tmp, "ec2" ) == 0 ) {
+ 			fprintf(stderr, "\nERROR: Amazon EC2 grid jobs require a "
+ 					"service URL\n");
+ 			DoCleanup( 0, 0, NULL );
+@@ -5034,16 +5081,11 @@ SetGridParams()
+ 		InsertJobExpr( buffer.Value() );
+ 	}
+ 	
+-	// AmazonUserData and AmazonUserDataFile cannot exist in the same submit file
+-	bool has_userdata = false;
+-	bool has_userdatafile = false;
+-	
+ 	// AmazonUserData is not a necessary parameter
+ 	if( (tmp = condor_param( AmazonUserData, ATTR_AMAZON_USER_DATA )) ) {
+ 		buffer.sprintf( "%s = \"%s\"", ATTR_AMAZON_USER_DATA, tmp);
+ 		free( tmp );
+ 		InsertJobExpr( buffer.Value() );
+-		has_userdata = true;
+ 	}	
+ 
+ 	// AmazonUserDataFile is not a necessary parameter
+@@ -5061,7 +5103,111 @@ SetGridParams()
+ 				full_path(tmp) );
+ 		free( tmp );
+ 		InsertJobExpr( buffer.Value() );
+-		has_userdatafile = true;
++	}
++
++
++	//
++	// EC2 grid-type submit attributes
++	//
++	if ( (tmp = condor_param( EC2AccessKeyId, ATTR_EC2_ACCESS_KEY_ID )) ) {
++		// check public key file can be opened
++		if ( !DisableFileChecks ) {
++			if( ( fp=safe_fopen_wrapper(full_path(tmp),"r") ) == NULL ) {
++				fprintf( stderr, "\nERROR: Failed to open public key file %s (%s)\n", 
++							 full_path(tmp), strerror(errno));
++				exit(1);
++			}
++			fclose(fp);
++		}
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_ACCESS_KEY_ID, full_path(tmp) );
++		InsertJobExpr( buffer.Value() );
++		free( tmp );
++	} else if ( JobGridType && strcasecmp( JobGridType, "ec2" ) == 0 ) {
++		fprintf(stderr, "\nERROR: EC2 jobs require a \"%s\" parameter\n", EC2AccessKeyId );
++		DoCleanup( 0, 0, NULL );
++		exit( 1 );
++	}
++	
++	if ( (tmp = condor_param( EC2SecretAccessKey, ATTR_EC2_SECRET_ACCESS_KEY )) ) {
++		// check private key file can be opened
++		if ( !DisableFileChecks ) {
++			if( ( fp=safe_fopen_wrapper(full_path(tmp),"r") ) == NULL ) {
++				fprintf( stderr, "\nERROR: Failed to open private key file %s (%s)\n", 
++							 full_path(tmp), strerror(errno));
++				exit(1);
++			}
++			fclose(fp);
++		}
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_SECRET_ACCESS_KEY, full_path(tmp) );
++		InsertJobExpr( buffer.Value() );
++		free( tmp );
++	} else if ( JobGridType && strcasecmp( JobGridType, "ec2" ) == 0 ) {
++		fprintf(stderr, "\nERROR: EC2 jobs require a \"%s\" parameter\n", EC2SecretAccessKey );
++		DoCleanup( 0, 0, NULL );
++		exit( 1 );
++	}
++	
++	// EC2KeyPairFile is not a necessary parameter
++	if( (tmp = condor_param( EC2KeyPairFile, ATTR_EC2_KEY_PAIR_FILE )) ) {
++		// for the relative path, the keypair output file will be written to the IWD
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_KEY_PAIR_FILE, full_path(tmp) );
++		free( tmp );
++		InsertJobExpr( buffer.Value() );
++	}
++	
++	// EC2GroupName is not a necessary parameter
++	if( (tmp = condor_param( EC2SecurityGroups, ATTR_EC2_SECURITY_GROUPS )) ) {
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_SECURITY_GROUPS, tmp );
++		free( tmp );
++		InsertJobExpr( buffer.Value() );
++	}
++	
++	if ( (tmp = condor_param( EC2AmiID, ATTR_EC2_AMI_ID )) ) {
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_AMI_ID, tmp );
++		InsertJobExpr( buffer.Value() );
++		free( tmp );
++	} else if ( JobGridType && strcasecmp( JobGridType, "ec2" ) == 0 ) {
++		fprintf(stderr, "\nERROR: EC2 jobs require a \"%s\" parameter\n", EC2AmiID );
++		DoCleanup( 0, 0, NULL );
++		exit( 1 );
++	}
++	
++	// EC2InstanceType is not a necessary parameter
++	if( (tmp = condor_param( EC2InstanceType, ATTR_EC2_INSTANCE_TYPE )) ) {
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_INSTANCE_TYPE, tmp );
++		free( tmp );
++		InsertJobExpr( buffer.Value() );
++	}
++	
++	// EC2ElasticIP is not a necessary parameter
++    if( (tmp = condor_param( EC2ElasticIP, ATTR_EC2_ELASTIC_IP )) ) {
++        buffer.sprintf( "%s = \"%s\"", ATTR_EC2_ELASTIC_IP, tmp );
++        free( tmp );
++        InsertJobExpr( buffer.Value() );
++    }
++	
++	// EC2UserData is not a necessary parameter
++	if( (tmp = condor_param( EC2UserData, ATTR_EC2_USER_DATA )) ) {
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_USER_DATA, tmp);
++		free( tmp );
++		InsertJobExpr( buffer.Value() );
++	}	
++
++	// EC2UserDataFile is not a necessary parameter
++	if( (tmp = condor_param( EC2UserDataFile, ATTR_EC2_USER_DATA_FILE )) ) {
++		// check user data file can be opened
++		if ( !DisableFileChecks ) {
++			if( ( fp=safe_fopen_wrapper(full_path(tmp),"r") ) == NULL ) {
++				fprintf( stderr, "\nERROR: Failed to open user data file %s (%s)\n", 
++								 full_path(tmp), strerror(errno));
++				exit(1);
++			}
++			fclose(fp);
++		}
++		buffer.sprintf( "%s = \"%s\"", ATTR_EC2_USER_DATA_FILE, 
++				full_path(tmp) );
++		free( tmp );
++		InsertJobExpr( buffer.Value() );
+ 	}
+ 	
+ 
+@@ -5254,6 +5400,15 @@ SetGSICredentials()
+ 			InsertJobExpr(buffer);	
+ 			free( proxy_subject );
+ 
++			/* Insert the proxy email into the ad */
++			char *proxy_email;
++			proxy_email = x509_proxy_email(proxy_file);
++
++			if ( proxy_email ) {
++				InsertJobExprString(ATTR_X509_USER_PROXY_EMAIL, proxy_email);
++				free( proxy_email );
++			}
++
+ 			/* Insert the VOMS attributes into the ad */
+ 			char *voname = NULL;
+ 			char *firstfqan = NULL;
+@@ -5927,6 +6082,7 @@ queue(int num)
+ 		SetVMParams();
+ 		SetLogNotes();
+ 		SetUserNotes();
++		SetStackSize();
+ 
+ 			// This must come after all things that modify the input file list
+ 		FixupTransferInputFiles();
+@@ -6560,6 +6716,7 @@ usage()
+ 	fprintf( stderr,
+ 			 "	-remote <name>\t\tsubmit to the specified remote schedd\n"
+ 			 "                \t\t(implies -spool)\n" );
++    fprintf( stderr, "\t-addr <ip:port>\t\tsubmit to schedd at given \"sinful string\"\n" );
+ 	fprintf( stderr,
+ 			 "	-append <line>\t\tadd line to submit file before processing\n"
+ 			 "                \t\t(overrides submit file; multiple -a lines ok)\n" );
+diff --git a/src/condor_sysapi/CMakeLists.txt b/src/condor_sysapi/CMakeLists.txt
+index 2f2fbcf..3690c59 100644
+--- a/src/condor_sysapi/CMakeLists.txt
++++ b/src/condor_sysapi/CMakeLists.txt
+@@ -16,6 +16,7 @@
+  # 
+  ############################################################### 
+ 
++set(BENCH_LINK_LIBS "${TOOL_LINK_LIBS}")
+ 
+ file( GLOB SysApiRmvElements *_t.cpp *.t.* dhry21b* *_main.cpp )
+ 
+@@ -26,5 +27,5 @@ condor_static_lib(sysapi "${SysapiHeaderFiles};${SysapiSourceFiles}")
+ 
+ # there was a test target which was never used.
+ # it makes the most sense to hook in a UT here instead of integ test
+-condor_exe(condor_kflops "kflops_main.cpp" "${C_LIBEXEC}" "sysapi;condorapi;${TOOL_LINK_LIBS}" OFF)
+-condor_exe(condor_mips "mips_main.cpp" "${C_LIBEXEC}" "sysapi;condorapi;${TOOL_LINK_LIBS}" OFF)
++condor_exe(condor_kflops "kflops_main.cpp" ${C_LIBEXEC} "sysapi;condorapi;${BENCH_LINK_LIBS}" OFF)
++condor_exe(condor_mips "mips_main.cpp" ${C_LIBEXEC} "sysapi;condorapi;${BENCH_LINK_LIBS}" OFF)
+diff --git a/src/condor_sysapi/arch.cpp b/src/condor_sysapi/arch.cpp
+index 3099315..9fc6ab4 100644
+--- a/src/condor_sysapi/arch.cpp
++++ b/src/condor_sysapi/arch.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "match_prefix.h"
+ #include "sysapi.h"
++#include "sysapi_externs.h"
+ 
+ #if defined(Darwin)
+ #include <sys/sysctl.h>
+diff --git a/src/condor_sysapi/resource_limits.cpp b/src/condor_sysapi/resource_limits.cpp
+index ffbd58d..870ccb9 100644
+--- a/src/condor_sysapi/resource_limits.cpp
++++ b/src/condor_sysapi/resource_limits.cpp
+@@ -25,27 +25,26 @@
+ 
+ #define SLOP 50
+ 
+-
+ #if defined( LINUX )
++#define MEG (1024 * 1024)
+ 
+ void
+-sysapi_set_resource_limits()
++sysapi_set_resource_limits(int stack_size)
+ {
+-    rlim_t lim;
+-    int free_blocks = sysapi_disk_space( "." );
++	rlim_t lim;
++	int free_blocks = sysapi_disk_space( "." );
+ 	unsigned long core_lim = (free_blocks - SLOP) * 1024;
++
+ 	if( core_lim > MAXINT ) {
+ 		lim = MAXINT;
+ 	} else {
+ 		lim = (int) core_lim;
+ 	}
+-
+-    limit( RLIMIT_CORE, lim, CONDOR_SOFT_LIMIT, "max core size" );
++	limit( RLIMIT_CORE, lim, CONDOR_SOFT_LIMIT, "max core size" );
+ 	limit( RLIMIT_CPU, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max cpu time" );
+ 	limit( RLIMIT_FSIZE, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max file size" );
+ 	limit( RLIMIT_DATA, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max data size" );
+-	limit( RLIMIT_STACK, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max stack size" );
+-
++	limit( RLIMIT_STACK, static_cast<rlim_t>(stack_size), CONDOR_SOFT_LIMIT, "max stack size" );
+ 	dprintf( D_ALWAYS, "Done setting resource limits\n" );
+ }
+ 
+@@ -54,7 +53,7 @@ sysapi_set_resource_limits()
+ #define MEG (1024 * 1024)
+ 
+ void
+-sysapi_set_resource_limits()
++sysapi_set_resource_limits(int)
+ {
+ 	limit( RLIMIT_CPU, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max cpu time" );
+ 	limit( RLIMIT_FSIZE, RLIM_INFINITY, CONDOR_SOFT_LIMIT, "max file size" );
+@@ -103,7 +102,7 @@ sysapi_set_resource_limits()
+ #elif defined( HPUX ) 
+ 
+ void
+-sysapi_set_resource_limits()
++sysapi_set_resource_limits(int)
+ {
+ 		/* These platforms do not support limit() */
+ 	dprintf( D_ALWAYS, "Setting resource limits not supported!\n" );
+@@ -112,7 +111,7 @@ sysapi_set_resource_limits()
+ #elif defined( WIN32 ) || defined( AIX ) || defined( Darwin ) || defined( CONDOR_FREEBSD )
+ 
+ void
+-sysapi_set_resource_limits()
++sysapi_set_resource_limits(int)
+ {
+ 		/* Not yet implemented on these platforms */
+ 	dprintf( D_ALWAYS, "Setting resource limits not implemented!\n" );
+diff --git a/src/condor_sysapi/sysapi.h b/src/condor_sysapi/sysapi.h
+index 3faf2c1..ac3f57e 100644
+--- a/src/condor_sysapi/sysapi.h
++++ b/src/condor_sysapi/sysapi.h
+@@ -107,7 +107,7 @@ const char *sysapi_translate_opsys( const char *sysname,
+ 									const char *version );
+ 
+ /* set appropriate resource limits on each platform */
+-void sysapi_set_resource_limits( void );
++void sysapi_set_resource_limits( int stack_size );
+ 
+ /* check the magic number of the given executable */
+ int sysapi_magic_check( char* executable );
+diff --git a/src/condor_sysapi/sysapi_externs.h b/src/condor_sysapi/sysapi_externs.h
+index c0fda97..709f734 100644
+--- a/src/condor_sysapi/sysapi_externs.h
++++ b/src/condor_sysapi/sysapi_externs.h
+@@ -21,6 +21,10 @@
+ #ifndef SYSAPI_EXTERNS_H
+ #define SYSAPI_EXTERNS_H
+ 
++#if !defined( WIN32 )
++#include <sys/utsname.h>
++#endif
++
+ /* this header file can be included by C and C++ files, so make sure it
+    understands that fact.
+ 
+diff --git a/src/condor_syscall_lib/CMakeLists.txt b/src/condor_syscall_lib/CMakeLists.txt
+index 2f96684..7208da6 100644
+--- a/src/condor_syscall_lib/CMakeLists.txt
++++ b/src/condor_syscall_lib/CMakeLists.txt
+@@ -104,6 +104,20 @@ if( STD_UNIVERSE )
+ 	# now create the glorious syscall lib from various refs.
+ 	# behold the birth of frankenstein.
+ 	condor_static_lib( condorsyscall "senders.cpp;switches.cpp;${SyscallHdrs};${SyscallSrcs};${STDU_OBJS};${CKPT_REFS};${UTIL_REFS};${IO_REFS};${STDIO_REF}")
++	if (DOES_COMPRESS_CKPT)
++		# For condorzsyscall, pull in all the same objects as
++		# condorsyscall except use ZCKPT_REFS in place of
++		# CKPT_REFS
++		src_target_ref( zckpt "^.*$" ZCKPT_REFS)
++
++		# We need to compile condor-malloc.c with special preprocessor
++		# definitions.
++		src_target_ref( zckpt "malloc-condor.c" MALLOC_CONDOR_REF)
++		set_property(SOURCE ${MALLOC_CONDOR_REF} APPEND PROPERTY COMPILE_DEFINITIONS "MORECORE=condor_morecore;HAVE_MMAP=0;malloc_getpagesize=8192")
++
++		condor_static_lib( condorzsyscall "senders.cpp;switches.cpp;${SyscallHdrs};${SyscallSrcs};${STDU_OBJS};${ZCKPT_REFS};${UTIL_REFS};${IO_REFS};${STDIO_REF}")
++	endif()
++
+ 	# local library which the daemons can link without glibc tainting.
+ 	condor_static_lib( std_local_ref "senders.cpp;receivers.cpp;${CKPT_LOCAL_REFS};${SYSCALL_LOCAL_REFS}" )
+ 
+@@ -111,7 +125,10 @@ if( STD_UNIVERSE )
+ 	# part 2:
+ 	# set dependencies to ensure build dep order for parallel builds
+ 	##################################################
+-	add_dependencies( condorsyscall ckpt utils cedar stdunivio stub_gen )
++	add_dependencies( condorsyscall stub_gen )
++	if (DOES_COMPRESS_CKPT)
++		add_dependencies( condorzsyscall stub_gen )
++	endif()
+ 	add_dependencies( switches syscall_numbers stub_gen )
+ 	add_dependencies( senders syscall_numbers stub_gen )
+ 	add_dependencies( receivers syscall_numbers stub_gen )
+@@ -120,6 +137,9 @@ if( STD_UNIVERSE )
+ 	#################################################
+ 	# here we begin the install target section
+ 	install ( TARGETS condorsyscall DESTINATION ${C_LIB} )
++	if (DOES_COMPRESS_CKPT)
++		install ( TARGETS condorzsyscall DESTINATION ${C_LIB} )
++	endif()
+ 	install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/condor_rt0.o DESTINATION ${C_LIB} )
+ 	install ( FILES ${LIBGCC} DESTINATION ${C_LIB} RENAME libcomp_libgcc.a )
+ 	install ( FILES ${LIBGCC_EH} DESTINATION ${C_LIB} RENAME libcomp_libgcc_eh.a )
+diff --git a/src/condor_tests/CMakeLists.txt b/src/condor_tests/CMakeLists.txt
+index 32e0264..9de25de 100644
+--- a/src/condor_tests/CMakeLists.txt
++++ b/src/condor_tests/CMakeLists.txt
+@@ -105,6 +105,7 @@ if (BUILD_TESTS)
+ 		condor_std_exe_test(job_ckpt_io-async_std "${CMAKE_C_COMPILER}" "job_ckpt_io-async_std.c" "${STDU_LDD_FLAGS}")
+ 		condor_std_exe_test(job_ckpt_io-buffer-async_std "${CMAKE_C_COMPILER}" "job_ckpt_io-buffer-async_std.c" "${STDU_LDD_FLAGS}")
+ 		condor_std_exe_test(job_ckpt_stack_std "${CMAKE_C_COMPILER}" "job_ckpt_stack_std.c" "${STDU_LDD_FLAGS}")
++		condor_std_exe_test(job_ckpt_standalone_std "${CMAKE_C_COMPILER}" "job_ckpt_standalone_std.c" "${STDU_LDD_FLAGS}")
+ 		condor_std_exe_test(job_ckpt_floats_std "${CMAKE_C_COMPILER}" "job_ckpt_floats_std.c" "${STDU_LDD_FLAGS}")
+ 		condor_std_exe_test(job_ckpt_floats-async_std "${CMAKE_C_COMPILER}" "job_ckpt_floats-async_std.c" "${STDU_LDD_FLAGS}")
+ 		condor_std_exe_test(job_ckpt_integers_std "${CMAKE_C_COMPILER}" "job_ckpt_integers_std.c" "${STDU_LDD_FLAGS}")
+@@ -130,6 +131,10 @@ if (BUILD_TESTS)
+ 		if ( NOT WITHOUT_AMAZON_TEST AND HAVE_EXT_GSOAP )
+ 			condor_pl_test(job_amazon_basic "Amazon EC2 test" "quick;full;quicknolink")
+ 		endif()
++
++        # AFAIK, this test isn't platform- or external- dependent.
++        condor_pl_test( job_ec2_basic "EC2 Query API test" "quick;full;quicknolink" )
++
+ 		condor_pl_test(lib_procapi_pidtracking-byenv "Slow Termination Child Cleanup Test" "core;quick;full;quicknolink")
+ 		#condor_pl_test(job_core_shadow-lessthan-memlimit_van "Make sure the shadow stays below memory limit" "core;quick;full;quicknolink")
+ 	endif()
+@@ -149,6 +154,8 @@ if (BUILD_TESTS)
+ 		#condor_pl_test(lib_auth_protocol-gsi "GSI authentication test" "core;quick;full;quicknolink")
+ 		condor_pl_test(job_dagman_large_dag "Test large DAG w/ recovery mode" "dagman;quick;full;quicknolink")
+ 		condor_pl_test(lib_shared_port_van "Test of shared port feature." "core;quick;full;quicknolink")
++		condor_pl_test(lib_shared_port-collector_van "Test of shared port feature with collector usage." "core;quick;full;quicknolink")
++		condor_pl_test(lib_shared_port-check-ports_van "Test of shared port feature with respect to open ports." "core;quick;full;quicknolink")
+ 	endif()
+ 
+ 	if (NOT AIX)
+@@ -160,19 +167,22 @@ if (BUILD_TESTS)
+ 	if (HAVE_VMWARE)
+ 		condor_pl_test(job_vmu_basic "VM Universe smoke test" "core;quick;full;quicknolink")
+ 		# cdrom xfer bits no longer supported. 
+-		# condor_pl_test(job_vmu_cdrom "VM Universe CD-ROM test" "core;quick;full;quicknolink")
+ 		# condor_pl_test(job_vmu_network "VM Universe networking test" "core;quick;full;quicknolink")
+ 		condor_pl_test(job_vmu_ckpt "VM Universe checkpoint test" "core;quick;full;quicknolink")
+ 	endif(HAVE_VMWARE)
+ 
+ 	if (WANT_LEASE_MANAGER)
+ 		condor_pl_test(lib_lease_manager-simple "Lease manager: Simple test" "core;quick;full")
++	
++	endif(WANT_LEASE_MANAGER)
++
++	if (WANT_LEASE_MANAGER_EXTRA_TESTS)
+ 		condor_pl_test(lib_lease_manager-get_rel_1 "Lease manager: get/relesae test 1" "core;quick;full")
+ 		condor_pl_test(lib_lease_manager-get_rel_2 "Lease manager: get/relesae test 2" "core;quick;full")
+ 		condor_pl_test(lib_lease_manager-get_rel_3 "Lease manager: get/relesae test 3" "core;quick;full")
+ 		condor_pl_test(lib_lease_manager-get_rel_4 "Lease manager: get/relesae test 4" "core;quick;full")
+ 		condor_pl_test(lib_lease_manager-get_rel_5 "Lease manager: get/relesae test 5" "core;quick;full")
+-	endif(WANT_LEASE_MANAGER)
++	endif(WANT_LEASE_MANAGER_EXTRA_TESTS)
+ 
+ 	if (STD_UNIVERSE)
+ 		# C-Tests
+@@ -206,6 +216,7 @@ if (BUILD_TESTS)
+ 		condor_pl_test(job_ckpt_io-async_std "file I/O during async ckpt signals" "stduniv;quick;full;ckpt")
+ 		condor_pl_test(job_ckpt_io-buffer-async_std "file buffing during async ckpt/restore" "stduniv;quick;full;ckpt")
+ 		condor_pl_test(job_ckpt_stack_std "ckpt/restore function call stack" "stduniv;framework;quick;full;ckpt")
++		condor_pl_test(job_ckpt_standalone_std "standalone ckpt/restore function call stack" "stduniv;framework;quick;full;ckpt")
+ 		condor_pl_test(job_ckpt_floats_std "ckpt/restore floating point registers" "stduniv;framework;quick;full;ckpt")
+ 		condor_pl_test(job_ckpt_floats-async_std "checks floating point ops with async ckpts" "stduniv;framework;quick;full;ckpt")
+ 		condor_pl_test(job_ckpt_integers_std "ckpt/restore integer registers" "stduniv;framework;quick;full;ckpt")
+@@ -244,6 +255,7 @@ if (BUILD_TESTS)
+ 	condor_pl_test(job_dagman_splice-N "Simple Dagman Splice N" "core;dagman;quick;full;quicknolink")
+ 	condor_pl_test(job_dagman_splice-O "Simple Dagman Splice O" "core;dagman;quick;full;quicknolink")
+ 	##### generic lib tests
++	condor_pl_test(lib_classads "Run Classad Unit Tests" "core;quick;full;quicknolink")
+ 	condor_pl_test(lib_unit_tests "Run Unit Tests Tests" "core;quick;full;quicknolink")
+ 	condor_pl_test(lib_auth_config "Run Authorization Config Tests" "core;quick;full;quicknolink")
+ 	condor_pl_test(lib_auth_protocol-fs "FS authentication test" "core;quick;full;quicknolink")
+@@ -318,12 +330,16 @@ if (BUILD_TESTS)
+ 	#condor_pl_test(job_stork_file-file "Basic stork Test" "core;quick;full;quicknolink")
+ 	#condor_pl_test(job_dagman_stork_file-file "Basic stork dag Test" "core;dagman;quick;full;quicknolink")
+ 	#condor_pl_test(job_dagman_stork-remove "Basic stork dag w/remove Test" "core;dagman;quick;full;quicknolink")
+-	condor_pl_test(job_core_err_java "Java Universe: basic error test" "core;quick;full;quicknolink;java")
+-	condor_pl_test(job_core_output_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
+-	condor_pl_test(job_core_hold_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
+-	condor_pl_test(job_core_initialdir_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
+-	condor_pl_test(job_core_input_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
+-	#condor_pl_test(job_core_plus_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++
++    if ( ENABLE_JAVA_TESTS )
++		condor_pl_test(job_core_err_java "Java Universe: basic error test" "core;quick;full;quicknolink;java")
++		condor_pl_test(job_core_output_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++		condor_pl_test(job_core_hold_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++		condor_pl_test(job_core_initialdir_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++		condor_pl_test(job_core_input_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++		#condor_pl_test(job_core_plus_java "Java Universe: basic output test" "core;quick;full;quicknolink;java")
++    endif ( ENABLE_JAVA_TESTS )
++
+ 	condor_pl_test(job_filexfer_streamout_van "Vanilla: test for streaming of output when both stream_output is true and false" "core;quick;full;quicknolink")
+ 	condor_pl_test(job_filexfer_streamerr_van "Vanilla: test for streaming of error when both stream_error is true and false" "core;quick;full;quicknolink")
+ 	#if !defined( IS_ALPHA_LINUX) && !defined(IS_HPUX10) && !defined(IS_HPUX11) && !defined(IS_IA64_LINUX_RHEL3) 
+diff --git a/src/condor_tests/job_ckpt_standalone_std.c b/src/condor_tests/job_ckpt_standalone_std.c
+new file mode 100644
+index 0000000..4c6a834
+--- /dev/null
++++ b/src/condor_tests/job_ckpt_standalone_std.c
+@@ -0,0 +1,252 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++/* This program was originally the job_ckpt_stack_std.c test program.
++	It was repurposed and extended to test standalone checkpointing.
++*/
++
++/* This program analyzes the stack at run time to see if it is ok(i.e.
++	checkpointed and restored at the right boundaries). It does
++	this by calling a recursive function which allocates some
++	memory on the stack, fills it with a known value, checks to see
++	if the previous values were all correct, and then recurses to
++	do the process over again. It continues until it accumulates a
++	target size of the runtime stack(counting only the memory it
++	allocates on the stack). During these calls, it checkpoints and
++	restarts all the way checking the integrity of the run time
++	stack. In fact, when the recursion finishes, it back checks the
++	runtime stack for each frame it falls backwards. */
++
++/* XXX Right now this program only checkpoints at the deepest level and
++	then backchecks all the way. It should checkpoint more often to make
++	sure everything is being saved/restored correctly, but it eats up
++	far too much time to do it ever stack level. I need to fix it so it 
++	does it evey N stack pushes/pops. */
++
++/* This might need adjustment per OS revision */
++#define STACKSIZETARGET (1024*384) /* 384K run time stack */
++
++#define STACKINCREMENT 1024 /* bytes per allocated stack array */
++#define FALSE 0
++#define TRUE 1
++
++#include "x_fake_ckpt.h"
++
++/* This represents an activation record on the run time stack. In fact, this
++	is kept on the runtime stack along with the data it points to to really
++	make this test depend on a working stack. */
++struct Frame
++{
++	/* This represents the number stored in the array */
++	int value;
++	/* This points to a stack allocated array */
++	int *data;
++	/* This size of the stack allocates array */
++	int size;
++	/* This is null at the root of the activation records */
++	struct Frame *previous;
++};
++
++void init_data(int *data, int size, int value);
++int deepen(struct Frame *pf, int old_value);
++int is_stack_valid(struct Frame *f, int value);
++int data_valid(int *data, int size, int value);
++
++/* size of the runtime stack at various intervals */
++int g_sum = 0;
++
++/* pointer to heap allocated just before checkpoint */
++int *g_heap1 = NULL;
++/* pointer to heap allocated just after checkpoint */
++int *g_heap2 = NULL;
++int g_heap_size = (1024 * 1024 * 1); /* actually 4 Megs cause an int type */
++
++int main(void)
++{
++	/* Need to start this process as close to the start of main() as I can */
++	int data[STACKINCREMENT];
++	struct Frame f;
++	int validity;
++	int a, b, c;
++
++	init_data(data, STACKINCREMENT, 0);
++	/* the stopping condition for is_stack_valid()'s search through the
++		previous pointers. It stops when f.value is zero and the data
++		array associated with it is zero. Otherwise during the recursion value
++		increases by one for each deeper stack frame */
++	f.value = 0; 
++	f.data = &data[0];
++	f.size = STACKINCREMENT;
++	f.previous = NULL;
++	g_sum += STACKINCREMENT; /* record the fact I added to the stack */
++
++	a = is_stack_valid(&f, 0);
++	printf("Deepness Level: %d\n", 0);
++	b = deepen(&f, 0);
++	printf("Backchecking %d\n", 0), 
++	c = is_stack_valid(&f, 0);
++	validity = a && b && c;
++	if (validity == FALSE) {
++		printf("Stack failure.\n");
++		printf("FAILED\n");
++		exit(EXIT_FAILURE);
++	}
++
++	printf("Checking allocated memory heaps.\n");
++	if (data_valid(g_heap1, g_heap_size, 0xdeadbeef) == FALSE) {
++		printf("Memory heap 1 failure.\n");
++		printf("FAILED\n");
++		exit(EXIT_FAILURE);
++	}
++	if (data_valid(g_heap2, g_heap_size, 0xbeefdead) == FALSE) {
++		printf("Memory heap 2 failure.\n");
++		printf("FAILED\n");
++		exit(EXIT_FAILURE);
++	}
++
++	free(g_heap1);
++	g_heap1 = NULL;
++	free(g_heap2);
++	g_heap2 = NULL;
++
++	printf("SUCCESS\n");
++	exit(EXIT_SUCCESS);
++}
++
++/* fill the data array with a known value */
++void init_data(int *data, int size, int value)
++{
++	int i;
++	
++	for (i = 0; i < size; i++)
++	{
++		data[i] = value;
++	}
++}
++
++/* keep recursing down until I use up the amount of run time stack space I've
++	been allocated */
++int deepen(struct Frame *pf, int old_value)
++{
++	int test;
++	int data[STACKINCREMENT];
++	struct Frame f;
++	int new_value = old_value + 1;
++	int a, b;
++
++	printf("Deepness Level: %d\n", new_value);
++	init_data(data, STACKINCREMENT, new_value);
++	f.value = new_value;
++	f.data = &data[0];
++	f.size = STACKINCREMENT;
++	f.previous = pf;
++	g_sum += STACKINCREMENT; /* record the fact I added to the stack */
++
++	test = is_stack_valid(&f, new_value);
++
++	if (test == TRUE)
++	{
++		if (g_sum < STACKSIZETARGET)
++		{
++			/* recurse deeper and backcheck the results */
++				a = deepen(&f, new_value);
++				printf("Backchecking %d\n", new_value), 
++				b = is_stack_valid(&f, new_value);
++
++				return a && b;
++		}
++
++		/* allocate a chunk of memory that better be good when I come back from
++			the checkpoint */
++		g_heap1 = malloc(sizeof(int) * g_heap_size);
++		if (g_heap1 == NULL) {
++			printf("Out of memory while allocating heap1! Exiting.\n");
++			exit(EXIT_FAILURE);
++		}
++		init_data(g_heap1, g_heap_size, 0xdeadbeef);
++
++		/* save the big run time stack in a checkpoint */
++		printf("About to checkpoint....\n");
++		fflush(NULL);
++		ckpt_and_exit();
++		fflush(NULL);
++
++		printf("Returning from checkpoint....\n");
++
++		/* This *should* be true because we just checked it earlier, however
++			if it is not, we'll catch the error here. */
++		test = is_stack_valid(&f, new_value);
++
++		/* allocate another chunk of memory that better be good when I come
++			back from the checkpoint */
++		g_heap2 = malloc(sizeof(int) * g_heap_size);
++		if (g_heap2 == NULL) {
++			printf("Out of memory while allocating heap2! Exiting.\n");
++			exit(EXIT_FAILURE);
++		}
++		init_data(g_heap2, g_heap_size, 0xbeefdead);
++
++		return test;
++	}
++
++	return FALSE;
++}
++
++/* check to see of the stack frame and all previous ones are correct given
++	a decrementing value for each previous stack frame */
++int is_stack_valid(struct Frame *f, int value)
++{
++	int check;
++
++	check = data_valid(f->data, f->size, value);
++
++	if (value == 0)
++	{
++		if (check == TRUE)
++		{
++			return TRUE;
++		}
++		return FALSE;
++	}
++
++	/* check until the value is zero */
++	return is_stack_valid(f->previous, value - 1);
++}
++
++
++/* Check the data with a known value */
++int data_valid(int *data, int size, int value)
++{
++	int i;
++	
++	for (i = 0; i < size; i++)
++	{
++		if (data[i] != value)
++		{
++			return FALSE;
++		}
++	}
++
++	return TRUE;
++}
++
++
+diff --git a/src/condor_tests/job_ckpt_standalone_std.run b/src/condor_tests/job_ckpt_standalone_std.run
+new file mode 100755
+index 0000000..94fad66
+--- /dev/null
++++ b/src/condor_tests/job_ckpt_standalone_std.run
+@@ -0,0 +1,131 @@
++#!/usr/bin/env perl
++##**************************************************************
++##
++## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## University of Wisconsin-Madison, WI.
++## 
++## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++## 
++## Unless required by applicable law or agreed to in writing, software
++## distributed under the License is distributed on an "AS IS" BASIS,
++## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++## See the License for the specific language governing permissions and
++## limitations under the License.
++##
++##**************************************************************
++
++# This program runs a standalone checkpointing job and ensures that it
++# both checkpointed and resumed correctly.
++
++use CondorUtils;
++use strict;
++use warnings;
++
++my $testdesc =  'Standalone Checkpointing Stack Test';
++my $testname = "job_ckpt_standalone_std.cndr.exe";
++my $ckptfile = "job_ckpt_standalone_std.cndr.exe.ckpt.$$";
++my $ret;
++my $last;
++
++# I need to do a little work to figure out the right arguments to pass to
++# setarch.
++my $pers = `uname -m`;
++my $pers_fix;
++my $pers_token;
++
++# We need to have the right base personality to run the stduniv program
++if ($pers =~ m/i\d86/) {
++	$pers_token = "i386";
++} else {
++	$pers_token = "x86_64";
++}
++
++# Now, we need to see if we're using a setarch that accepts the pile of
++# arguments we need, or an old crusty one which doesn't take any arguments.
++# This is a heuristic. We'll assume the most modern interface first.
++$pers_fix = "setarch $pers_token -L -B -R";
++
++# Sadly setarch just fails with no output and return value 1 when it can't
++# accept command line arguments it doesn't understand. So we test it with
++# something we KNOW to return true and if this fails, setarch is borken.
++$ret = system("$pers_fix /bin/true");
++
++if ($ret == -1 || $ret & 127) {
++	print "ERROR: Something went very wrong trying to figure out setarch.\n";
++	exit 1;
++}
++if (($ret >> 8) != 0) {
++	# use old style setarch instead
++	$pers_fix = "setarch $pers_token";
++}
++
++# Now that we're done with setarch detection, get to the test itself.
++
++print "Description: $testdesc\n";
++print "Running: $testname\n";
++
++# run the test, which will self checkpoint itself.
++
++# The program better exit with SIGUSR2!
++print "Starting standalone checkpointing test. Will checkpoint to $ckptfile.\n";
++$ret = runcmd("$pers_fix ./$testname -_condor_aggravate_bugs -_condor_D_CKPT " .
++			"-_condor_D_FULLDEBUG -_condor_D_ALWAYS " .
++			"-_condor_ckpt ./$ckptfile",
++		{expect_result => SIGNAL(12)});
++
++# Check the stderr, which contains the checkpoint debug output.
++$last = pop @{$ret->{'stderr'}};
++chomp $last;
++if ($last !~ m/Ckpt exit/) {
++	print "ERROR: The last line of the checkpointing job's stderr should " .
++		"have been 'Ckpt exit', but it wasn't! Fail.\n";
++	print "FAILURE\n";
++	exit 1;
++}
++
++# Check the stdout, which contains "About to checkpoint...."
++$last = pop @{$ret->{'stdout'}};
++chomp $last;
++if ($last !~ m/About to checkpoint\.\.\.\./) {
++	print "ERROR: The last line of the checkpointing job's stdout should " .
++		"have been 'About to checkpoint....', but it wasn't! Fail.\n";
++	print "FAILURE\n";
++	exit 1;
++}
++
++# The resuming program better exit with 0!
++print "Resuming standalone checkpointing test. Will resume from $ckptfile.\n";
++$ret = runcmd("$pers_fix ./$testname -_condor_aggravate_bugs -_condor_D_CKPT " .
++			"-_condor_D_FULLDEBUG -_condor_D_ALWAYS " .
++			"-_condor_restart ./$ckptfile");
++
++# Check the stderr, which contains the resumed job debug output.
++$last = pop @{$ret->{'stderr'}};
++chomp $last;
++if ($last !~ m/About to return to user code/) {
++	print "ERROR: The last line of the resuming job's stderr should have " .
++		"been 'About to return to user code', but it wasn't! Fail.\n";
++	print "FAILURE\n";
++	exit 1;
++}
++
++# Process the stdout which contains the output of the resumed job.
++$last = pop @{$ret->{'stdout'}};
++chomp $last;
++if ($last !~ m/SUCCESS/) {
++	print "ERROR: The last line of the resuming job should have " .
++		"been 'SUCCESS', but it wasn't!. Fail.\n";
++	print "FAILURE\n";
++	exit 1;
++}
++
++print "SUCCESS\n";
++
++exit 0;
++
++
++
+diff --git a/src/condor_tests/job_ec2_basic.accessKey b/src/condor_tests/job_ec2_basic.accessKey
+new file mode 100644
+index 0000000..d00491f
+--- /dev/null
++++ b/src/condor_tests/job_ec2_basic.accessKey
+@@ -0,0 +1 @@
++1
+diff --git a/src/condor_tests/job_ec2_basic.run b/src/condor_tests/job_ec2_basic.run
+new file mode 100755
+index 0000000..3385efc
+--- /dev/null
++++ b/src/condor_tests/job_ec2_basic.run
+@@ -0,0 +1,150 @@
++#! /usr/bin/env perl
++
++##*****************************************************************************
++##
++## Copyright (C) 2011, Condor Team, Computer Sciences Department,
++## University of Wisconsin-Madison, WI.
++## 
++## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++## 
++## Unless required by applicable law or agreed to in writing, software
++## distributed under the License is distributed on an "AS IS" BASIS,
++## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++## See the License for the specific language governing permissions and
++## limitations under the License.
++##
++##*****************************************************************************
++
++use strict;
++use warnings;
++
++use POSIX;
++use Cwd;
++
++use CondorTest;
++
++use Check::SimpleJob;
++use Check::CondorLog;
++
++#
++# Start up the simulator, which will print the port to which it binds.
++#
++my $pid = fork();
++if( $pid == 0 ) {
++    if( ! open( STDOUT, '>', 'simulator.out' ) ) {
++        die( "Unable to redirect output to 'simulator.out', aborting.\n" );
++    }
++
++    if( ! open( STDERR, '>', 'simulator.err' ) ) {
++        die( "Unable to redirect errors to 'simulator.err', aborting.\n" );
++    }
++
++    my $binary = cwd() . '/queryAPI-sim';
++    exec { $binary } ( $binary );
++    die( "Failed to exec { $binary } ( $binary ): '$!'\n" );
++}
++
++# Wait, arbitrarily, ten seconds to acquire a port.
++my $port = undef;
++for( my $i = 0; $i < 10; ++$i ) {
++    sleep( 1 );
++    
++    if( ! open( SIMULATOR_OUT, '<', 'simulator.out' ) ) { next; }
++    while( my $line = <SIMULATOR_OUT> ) {
++        if( $line =~ /^listen_port = (\d+)$/ ) {
++            $port = $1;
++            last;
++        }
++    }
++    close( SIMULATOR_OUT );
++
++    my $rv = waitpid( $pid, WNOHANG );
++    if( $rv == -1 || $rv == $pid ) {
++        die( "Simulator died before printing its port number (pid $pid), aborting.\n" );
++    } 
++}
++
++if( ! defined( $port ) ) {
++    kill( 'SIGTERM', $pid ); sleep( 1 ); kill( 'SIGKILL', $pid );
++    die( "Unable to determine simulator's port number, aborting.\n" );
++} else {
++    print( "Determined simulator's port number (pid $pid, port $port).\n" );
++}    
++
++#
++# Start up a personal condor.  Why I need to specify the last three
++# lines is something of a mystery.
++#
++my $append_condor_config = '
++    EC2_GAHP_LOG = $(LOG)/ec2_gahp_log
++    GRIDMANAGER_JOB_PROBE_INTERVAL = 5
++    DAEMON_LIST = MASTER, SCHEDD, COLLECTOR, NEGOTIATOR, STARTD
++';
++
++CondorTest::StartCondorWithParams(
++    append_condor_config => $append_condor_config
++);
++
++#
++# Make sure the ec2 job runs.  The test suite gets confused easily,
++# so make sure the job log doesn't exist.
++#
++my $appendSubmitCommands = qq/
++    ec2_ami_id = 7
++    ec2_instance_type = m1.small
++    ec2_access_key_id = job_ec2_basic.accessKey
++    ec2_secret_access_key = job_ec2_basic.secretKey
++    ec2_keypair_file = job_ec2_basic.keypair
++    ec2_user_data = job_ec2_basic.user-data
++    ec2_user_data_file = job_ec2_basic.userDataFile
++/;
++if( -e "job_ec2_basic.log" ) {
++    # Otherwise, the test framework gets terribly confused.
++    if( ! unlink( "job_ec2_basic.log" ) ) {
++        die( "Failed to delete job_ec2_basic.log, aborting.\n" );
++    }
++}
++SimpleJob::RunCheck(
++    user_log                => "job_ec2_basic.log",
++    universe                => "grid",
++    grid_resource           => "ec2 http://localhost:$port",
++    append_submit_commands  => $appendSubmitCommands
++);
++
++#
++# Verify that the gahp's logs are OK.
++#
++CondorLog::RunCheck(
++    daemon                  => "EC2_GAHP",
++    match_regexp            => "([Ff]ail(ed|ing))|([Uu]nable)|(Wrong number of arguments)",
++    fail_if_found           => 1
++);
++
++#
++# Verify that the simulator's logs are OK.
++#
++
++# FIXME: In the output, only /^No leaks detected\.$/ is a success.
++# FIXME: In the error, any message is a failure.
++
++#
++# Kill the simulator.
++#
++kill( 'TERM', $pid ); sleep( 1 ); kill( 'KILL', $pid );
++
++#
++# Apparently required by the framework.  '2' is a magic constant
++# defined in Condor.pm as "batch_test.pl".
++#
++CondorTest::debug( "job_ec2_basic SUCCESS\n", 2 );
++
++#
++# "This function ... should be the last thing that a test program does."
++# It shuts down "all personal condors" (which probably breaks other tests)
++# and does some magic for the framework w.r.t. to exiting.
++#
++CondorTest::EndTest();
+diff --git a/src/condor_tests/job_ec2_basic.secretKey b/src/condor_tests/job_ec2_basic.secretKey
+new file mode 100644
+index 0000000..c5a5d48
+--- /dev/null
++++ b/src/condor_tests/job_ec2_basic.secretKey
+@@ -0,0 +1 @@
++ThisFileIsCurrentlyMeaningless
+diff --git a/src/condor_tests/job_ec2_basic.userDataFile b/src/condor_tests/job_ec2_basic.userDataFile
+new file mode 100644
+index 0000000..3f61bd5
+--- /dev/null
++++ b/src/condor_tests/job_ec2_basic.userDataFile
+@@ -0,0 +1 @@
++userDataFileExampleData
+diff --git a/src/condor_tests/lib_classads.run b/src/condor_tests/lib_classads.run
+index f83ab78..9022428 100755
+--- a/src/condor_tests/lib_classads.run
++++ b/src/condor_tests/lib_classads.run
+@@ -1,7 +1,7 @@
+-#! /usr/bin/env perl
++#! /usr/bin/env perl 
+ ##**************************************************************
+ ##
+-## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
+ ## University of Wisconsin-Madison, WI.
+ ## 
+ ## Licensed under the Apache License, Version 2.0 (the "License"); you
+@@ -19,38 +19,22 @@
+ ##**************************************************************
+ 
+ 
+-my @got;
+-$testdesc =  'lib_classad - runs prebuilt classad tests';
+-$testname = "lib_classads";
+-$test = "./test_classads";
+-if ( ! -x $test ) {
+-	$test = "./test_old_classads";
+-}
++use strict;
+ 
+-print scalar localtime() . "\n";
++my $allTestsPassed = 0;
+ 
+-open(ELOG,"$test 2>&1 |") || die "Could not run test<<$test>>: $!\n";
++open(ELOG,"./classad_unit_tester 2>&1 |") || die "Could not run classad_unit_tester: $!\n";
+ while(<ELOG>) {
+-	push  @got, $_;
++	print $_;
++	if (/^Finished with no errors/) {
++		$allTestsPassed = 1;
++	}
+ }
+ close(ELOG);
+ 
+-my $lastsave = "";
+-foreach $line (@got) {
+-	chomp($line);
+-	$lastsave = $line;
+-	print "$line\n";
+-}
+-
+-
+-if($lastsave =~ /^(\d+)\s+of\s+(\d+)\s+tests\s+passed.*$/) {
+-	if($1 == $2){
+-		print "ClassAd Test passed with $1 successful tests!\n";
+-		exit(0);
+-	} else {
+-		die "Only $1 of $2 classad tests passed\n";
+-	}
++if ($allTestsPassed == 1) {
++	print "classad_unit_tester passed\n";
++	exit(0);
+ } else {
+-	die "$2 tests were expected to pass <$lastsave>\n";
++	die "classad_unit_tester failed\n";
+ }
+-
+diff --git a/src/condor_tests/lib_shared_port-check-ports_van.run b/src/condor_tests/lib_shared_port-check-ports_van.run
+new file mode 100644
+index 0000000..38376a5
+--- /dev/null
++++ b/src/condor_tests/lib_shared_port-check-ports_van.run
+@@ -0,0 +1,165 @@
++#! /usr/bin/env perl
++##**************************************************************
++##
++## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## University of Wisconsin-Madison, WI.
++## 
++## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++## 
++## Unless required by applicable law or agreed to in writing, software
++## distributed under the License is distributed on an "AS IS" BASIS,
++## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++## See the License for the specific language governing permissions and
++## limitations under the License.
++##
++##**************************************************************
++
++use CondorTest;
++use Check::CondorLog;
++
++$execute = sub {
++	# use netstat to find open ports
++	my $netstat_result = `netstat -tlpn | grep condor`;
++
++	# allow netstat to fail as some nmi platforms (macos_10.4) don't support it
++	if(length($netstat_result) == 0) {
++		CondorTest::debug("Warning: 'netstat -tlpn | grep condor' failed, skipping tcp port checks\n");
++		return;
++	}
++	CondorTest::debug("netstat -tlpn | grep condor\n$netstat_result\n", 1);
++	my @lines = split /\n/, $netstat_result;
++
++	# get the log directory for this test
++	my $logdir = `condor_config_val log`;
++	$logdir =~ s/\012+$//;
++	$logdir =~ s/\015+$//;
++
++	# get the pids associated with this personal condor
++	my $pid = $logdir . "/PIDS";
++	open(PID_FILE, "<$pid") || die "Can't open pid file $pid.";
++
++	# get just the pid from each line in file
++	my @pid_file_contents = <PID_FILE>;
++	my @pids;
++	foreach(@pid_file_contents) {
++		chomp;
++		my @temp = split(/[\ \n]/, $_);
++		push(@pids, @temp[0]);
++	}
++
++	# get the pid for the shadow
++    my $shadow_log_location = `condor_config_val SHADOW_log`;
++	open(SHADOW_LOG, "<$shadow_log_location") || die "Can't open shadow log ($shadow_log_location).";
++
++	my @shadow_log_contents = <SHADOW_LOG>;
++	foreach(@shadow_log_contents) {
++		chomp;
++		# get line with shadow's pid
++		if(index($_, "PID = ", 0) != -1) {
++			my $r = rindex($_, " ");
++			my $shadow_pid = substr($_, $r+1);
++			push(@pids, $shadow_pid);
++			last;
++		}
++	}
++
++	CondorTest::debug("pids - @pids\n", 1);
++
++	# check that only schedd, collector, shared_port have open listening tcp ports
++	my $match;
++	my $found_listening_daemon = 0;
++	my $unexpected_listening_daemon = 1;
++	foreach(@lines) {
++		$match = 0;
++		# go through all the pids
++		for($i = 0; $i < @pids && $match == 0; $i++) {
++			# check if this is a daemon we care about
++			if(index($_, @pids[$i] . '/', 0) != -1) {
++				$match = 1;
++				if(index($_, "condor_sch", 0) == -1 &&
++					index($_, "condor_shar", 0) == -1 &&
++					index($_, "condor_coll", 0) == -1)
++				{
++					$unexpected_listening_daemon = 0;
++					CondorTest::debug("Error: unexpected daemon has open listening tcp port ($_)\n", 1);
++				}
++				else
++				{
++					$found_listening_daemon = 1;
++				}
++			}
++		}
++	}
++
++   	CondorTest::RegisterResult( $found_listening_daemon,
++		(check_name => "Found expected daemon with open listening tcp port",
++		test_name => "lib_shared_port-check-ports_van") );
++	CondorTest::RegisterResult( $unexpected_listening_daemon, 
++		(check_name => "No unexpected daemons with open listening tcp ports",
++		test_name => "lib_shared_port-check-ports_van") );
++};
++
++$success = sub {
++	# verify connection requests made via shared port server for each daemon
++	CondorLog::RunCheck(
++		daemon => "SHARED_PORT",
++		match_regexp => "SharedPortServer: request from COLLECTOR"
++	);
++	CondorLog::RunCheck(
++		daemon => "SHARED_PORT",
++		match_regexp => "SharedPortServer: request from SCHEDD"
++	);
++	CondorLog::RunCheck(
++		daemon => "SHARED_PORT",
++		match_regexp => "SharedPortServer: request from NEGOTIATOR"
++	);
++	CondorLog::RunCheck(
++		daemon => "SHARED_PORT",
++		match_regexp => "SharedPortServer: request from STARTD"
++	);
++
++	CondorTest::EndTest();
++};
++
++my $append_condor_config = '
++  USE_SHARED_PORT = True
++  DAEMON_LIST = MASTER,SHARED_PORT,SCHEDD,COLLECTOR,NEGOTIATOR,STARTD
++
++  SHARED_PORT_DEBUG = D_COMMAND | D_FULLDEBUG
++
++  # named sockets cannot have very long paths (~100 chars), so put them
++  # in /tmp to avoid problems
++  DAEMON_SOCKET_DIR = /tmp/$(USERNAME)-condor-test-sock
++';
++
++CondorTest::StartCondorWithParams(
++    append_condor_config => $append_condor_config
++);
++
++my $testname = "lib_shared_port-check-ports_van";
++CondorTest::RegisterExecute($testname, $execute);
++CondorTest::RegisterExitedSuccess ($testname, $success);
++
++# submit file
++my $submit_fname = CondorTest::TempFileName("$testname.submit");
++open( SUBMIT, ">$submit_fname" ) || die "error writing to $submit_fname: $!\n";
++print SUBMIT "universe = vanilla\n";
++print SUBMIT "executable = x_sleep.pl\n";
++print SUBMIT "log = $testname.log\n";
++print SUBMIT "arguments = 10\n";
++print SUBMIT "notification = never\n";
++print SUBMIT "queue\n";
++close( SUBMIT );
++
++# run test
++if( CondorTest::RunTest($testname, $submit_fname, 0) ) {
++    CondorTest::debug("$testname: SUCCESS\n",1);
++    exit(0);
++} else {
++    die "$testname: CondorTest::RunTest() failed\n";
++}
++
+diff --git a/src/condor_tests/lib_shared_port-collector_van.run b/src/condor_tests/lib_shared_port-collector_van.run
+new file mode 100644
+index 0000000..24cede4
+--- /dev/null
++++ b/src/condor_tests/lib_shared_port-collector_van.run
+@@ -0,0 +1,74 @@
++#! /usr/bin/env perl
++##**************************************************************
++##
++## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++## University of Wisconsin-Madison, WI.
++## 
++## Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++## 
++## Unless required by applicable law or agreed to in writing, software
++## distributed under the License is distributed on an "AS IS" BASIS,
++## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++## See the License for the specific language governing permissions and
++## limitations under the License.
++##
++##**************************************************************
++
++use CondorTest;
++use Check::SimpleJob;
++use Check::CondorLog;
++
++my $append_condor_config = '
++  USE_SHARED_PORT = True
++  DAEMON_LIST = MASTER,SHARED_PORT,SCHEDD,COLLECTOR,NEGOTIATOR,STARTD
++
++  SHARED_PORT_DEBUG = D_COMMAND | D_FULLDEBUG
++
++  # set the collector to use the shared port
++  COLLECTOR_HOST = $(FULL_HOSTNAME):0?sock=collector
++
++  # named sockets cannot have very long paths (~100 chars), so put them
++  # in /tmp to avoid problems
++  DAEMON_SOCKET_DIR = /tmp/$(USERNAME)-condor-test-sock
++';
++
++CondorTest::StartCondorWithParams(
++    append_condor_config => $append_condor_config
++);
++
++# verify that a job runs
++SimpleJob::RunCheck();
++
++# verify connection requests made via shared port server for each daemon
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "SharedPortServer: request from COLLECTOR"
++);
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "SharedPortServer: request from MASTER"
++);
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "SharedPortServer: request from SCHEDD"
++);
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "SharedPortServer: request from NEGOTIATOR"
++);
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "SharedPortServer: request from STARTD"
++);
++
++# verify that connection requests for collector go through shared_port
++CondorLog::RunCheck(
++    daemon => "SHARED_PORT",
++    match_regexp => "to connect to collector"
++);
++
++CondorTest::EndTest();
+diff --git a/src/condor_tools/CMakeLists.txt b/src/condor_tools/CMakeLists.txt
+index f547ef1..a69679b 100644
+--- a/src/condor_tools/CMakeLists.txt
++++ b/src/condor_tools/CMakeLists.txt
+@@ -53,9 +53,6 @@ endif(WANT_FULL_DEPLOYMENT)
+ clone_install(condor "${C_BIN}" "condor_vacate;condor_reschedule" "${C_BIN}")
+ 
+ if (NOT WINDOWS)
+-    if (WANT_FULL_DEPLOYMENT)
+-        clone_install(condor "${C_BIN}" "condor_reconfig_schedd;condor_master_off" "${C_SBIN}") # legacy cruft?
+-    endif(WANT_FULL_DEPLOYMENT)
+ 	if (STD_UNIVERSE)
+ 		clone_install(condor "${C_BIN}" "condor_checkpoint" "${C_BIN}")
+ 		src_target_ref( ckpt "maps" CKPT_REFS)
+@@ -74,3 +71,4 @@ if( WINDOWS )
+ endif()
+ 
+ condor_exe_test(condor_test_auth "test_auth.cpp" "${TOOL_LINK_LIBS}")
++condor_exe(condor_test_match "condor_test_match.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF)
+diff --git a/src/condor_tools/condor_test_match.cpp b/src/condor_tools/condor_test_match.cpp
+new file mode 100644
+index 0000000..04d26dd
+--- /dev/null
++++ b/src/condor_tools/condor_test_match.cpp
+@@ -0,0 +1,526 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++
++#include "condor_common.h"
++#include "condor_config.h"
++#include "condor_classad.h"
++#include "match_prefix.h"
++#include "HashTable.h"
++#include "condor_attributes.h"
++
++static unsigned int ClassAdPtrHash(ClassAd * const &ptr);
++
++static void usage() {
++	fprintf(stderr,"USAGE: condor_match_test [OPTIONS] [command]\n");
++	fprintf(stderr,"\n");
++	fprintf(stderr,"OPTIONS:\n");
++	fprintf(stderr,"  -machine-ads <filename>\n");
++	fprintf(stderr,"  -job-ads <filename>\n");
++	fprintf(stderr,"  -job-constraint <expression>\n");
++	fprintf(stderr,"  -machine-constraint <expression>\n");
++    fprintf(stderr,"  -claimed <expression>   (machines that should be counted as already matched)\n");
++    fprintf(stderr,"  -show-unmatched-machines\n");
++    fprintf(stderr,"  -show-unmatched-jobs\n");
++    fprintf(stderr,"\nCOMMANDS:\n");
++    fprintf(stderr,"demand    -- estimate how many of the machines could be used by the jobs\n");
++	exit(2);
++}
++
++class MatchTest {
++public:
++    MatchTest();
++
++    // prints out the estimated demand
++    void ShowDemand(char const *jobads_fname,StringList &job_constraints,char const *machineads_fname,char const *machine_constraint,StringList &claimed);
++
++    bool analyze_demand(char const *jobads_fname, char const *job_constraint, char const *machineads_fname, char const *machine_constraint, char const *claimed);
++
++    unsigned int getMachinesMatched() { return m_machines_matched; }
++    unsigned int getMachinesUnmatched() { return m_machines_unmatched; }
++
++    float getMachinesMatchedFraction() {
++        if( m_machines_matched + m_machines_unmatched == 0 ) {
++            return 0;
++        }
++        return ((float)m_machines_matched) /
++            (m_machines_matched + m_machines_unmatched);
++    }
++
++    void setShowUnmatchedMachines() { m_show_unmatched_machines = true; }
++    void setShowUnmatchedJobs() { m_show_unmatched_jobs = true; }
++
++    void showJobAd(ClassAd *ad,char const *label);
++    void showMachineAd(ClassAd *ad,char const *label);
++
++private:
++    bool m_show_unmatched_machines;
++    bool m_show_unmatched_jobs;
++    unsigned int m_machines_matched;
++    unsigned int m_machines_unmatched;
++
++    ClassAdList m_machineads;
++    // hash of matched machines
++    HashTable<ClassAd*,bool> m_matched_machines;
++
++    char const *m_last_machineads_fname;
++    char const *m_last_machine_constraint;
++
++	bool read_classad_file(const char *filename, ExprTree *constraint_expr, bool (MatchTest::*work_func)(ClassAd *));
++
++    void matchExpr(ExprTree *claimed);
++    bool matchJobAd(ClassAd *jobad);
++    bool addMachineAd(ClassAd *machinead);
++    void unmatch();
++
++	void OptimizeMachineAdForMatchmaking(ClassAd *ad);
++	void OptimizeJobAdForMatchmaking(ClassAd *ad);
++};
++
++int main(int argc,char *argv[]) {
++	int i;
++	char const *machineads_fname = NULL;
++	char const *jobads_fname = NULL;
++    StringList job_constraints;
++    StringList claims; // must be one-to-one with job_constraints
++	char const *machine_constraint = NULL;
++    MatchTest match_test;
++    char const *command=NULL;
++
++	for( i=1; i<argc; i++ ) {
++		if( match_prefix( argv[i], "-help" ) ) {
++			usage();
++		}
++		else if( match_prefix( argv[i], "-machine-ads" ) ||
++                 match_prefix( argv[i], "-machineads" ) ) {
++			if( i+1 >= argc ) {
++				fprintf(stderr,"ERROR: missing argument to -machineads\n");
++				exit(1);
++			}
++			machineads_fname = argv[++i];
++		}
++		else if( match_prefix( argv[i], "-job-ads" ) ||
++                 match_prefix( argv[i], "-jobads" ) ) {
++			if( i+1 >= argc ) {
++				fprintf(stderr,"ERROR: missing argument to -jobads\n");
++				exit(1);
++			}
++			jobads_fname = argv[++i];
++		}
++		else if( match_prefix( argv[i], "-job-constraint" ) ) {
++			if( i+1 >= argc ) {
++				fprintf(stderr,"ERROR: missing argument to -job-constraint\n");
++				exit(1);
++			}
++            job_constraints.append( argv[++i] );
++		}
++		else if( match_prefix( argv[i], "-claimed" ) ) {
++			if( i+1 >= argc ) {
++				fprintf(stderr,"ERROR: missing argument to -claimed\n");
++				exit(1);
++			}
++            claims.append( argv[++i] );
++		}
++		else if( match_prefix( argv[i], "-machine-constraint" ) ) {
++			if( i+1 >= argc ) {
++				fprintf(stderr,"ERROR: missing argument to -machine-constraint\n");
++				exit(1);
++			}
++			machine_constraint = argv[++i];
++		}
++        else if( match_prefix( argv[i], "-show-unmatched-machines" ) ) {
++            match_test.setShowUnmatchedMachines();
++        }
++        else if( match_prefix( argv[i], "-show-unmatched-jobs" ) ) {
++            match_test.setShowUnmatchedJobs();
++        }
++        else if( argv[i][0] != '-' ) {
++            break;
++        }
++		else {
++			fprintf(stderr,"ERROR: unexpected argument: %s\n", argv[i]);
++			exit(2);
++		}
++	}
++
++    if( i != argc-1 ) {
++        fprintf(stderr,"ERROR: unrecognized or missing command\n");
++        exit(2);
++    }
++
++    command = argv[i++];
++    if( !strcasecmp(command,"demand") ) {
++
++        if( !jobads_fname || !machineads_fname ) {
++            fprintf(stderr,"ERROR: you must specify both -job-ads and -machine-ads\n");
++            exit(2);
++        }
++
++        if( job_constraints.number() == 0 ) {
++            job_constraints.append("");
++        }
++        if( claims.number() != 0 && claims.number() != job_constraints.number() )
++        {
++            fprintf(stderr,"ERROR: must provide same number of -claimed and -job-constraint arguments\n");
++            exit(2);
++        }
++
++        match_test.ShowDemand( jobads_fname,job_constraints,machineads_fname,machine_constraint, claims );
++    }
++    else {
++        fprintf(stderr,"ERROR: unrecognized command %s\n",command);
++        exit(2);
++    }
++
++    return 0;
++}
++
++
++unsigned int ClassAdPtrHash(ClassAd * const &ptr) {
++	intptr_t i = (intptr_t)ptr;
++
++#if (SIZEOF_VOIDPTR > 4)
++	return (unsigned int)( i ^ (i>>32) );
++#else
++	return (unsigned int) i;
++#endif
++}
++
++MatchTest::MatchTest():
++    m_show_unmatched_machines(false),
++    m_show_unmatched_jobs(false),
++    m_machines_matched(0),
++    m_machines_unmatched(0),
++	m_matched_machines(ClassAdPtrHash),
++    m_last_machineads_fname(NULL),
++    m_last_machine_constraint(NULL)
++{
++}
++
++void
++MatchTest::OptimizeMachineAdForMatchmaking(ClassAd *ad)
++{
++#if !defined(WANT_OLD_CLASSADS)
++		// The machine ad will be passed as the RIGHT ad during
++		// matchmaking (i.e. in the call to IsAMatch()), so
++		// optimize it accordingly.
++	std::string error_msg;
++	if( !classad::MatchClassAd::OptimizeRightAdForMatchmaking( ad, &error_msg ) ) {
++		MyString name;
++		ad->LookupString(ATTR_NAME,name);
++		dprintf(D_ALWAYS,
++				"Failed to optimize machine ad %s for matchmaking: %s\n",	
++			name.Value(),
++				error_msg.c_str());
++	}
++#endif
++}
++
++void
++MatchTest::OptimizeJobAdForMatchmaking(ClassAd *ad)
++{
++#if !defined(WANT_OLD_CLASSADS)
++		// The job ad will be passed as the LEFT ad during
++		// matchmaking (i.e. in the call to IsAMatch()), so
++		// optimize it accordingly.
++	std::string error_msg;
++	if( !classad::MatchClassAd::OptimizeLeftAdForMatchmaking( ad, &error_msg ) ) {
++		int cluster_id=-1,proc_id=-1;
++		ad->LookupInteger(ATTR_CLUSTER_ID,cluster_id);
++		ad->LookupInteger(ATTR_PROC_ID,proc_id);
++		dprintf(D_ALWAYS,
++				"Failed to optimize job ad %d.%d for matchmaking: %s\n",	
++				cluster_id,
++				proc_id,
++				error_msg.c_str());
++	}
++#endif
++}
++
++void
++MatchTest::showJobAd(ClassAd *ad,char const *label)
++{
++    MyString gid;
++    if( !ad->LookupString(ATTR_GLOBAL_JOB_ID,gid) ) {
++        int cluster = -1;
++        int proc = -1;
++        ad->LookupInteger(ATTR_CLUSTER_ID,cluster);
++        ad->LookupInteger(ATTR_PROC_ID,proc);
++        gid.sprintf("%d.%d",cluster,proc);
++    }
++
++    printf("%s: %s\n",label,gid.Value());
++}
++
++void
++MatchTest::showMachineAd(ClassAd *ad,char const *label)
++{
++    MyString name;
++    ad->LookupString(ATTR_NAME,name);
++
++    printf("%s: %s\n",label,name.Value());
++}
++
++void
++MatchTest::unmatch()
++{
++    m_matched_machines.clear();
++    m_machines_matched = 0;
++    m_machines_unmatched = 0;
++}
++
++void
++MatchTest::matchExpr(ExprTree *claimed)
++{
++    ClassAd *machinead;
++
++    m_machineads.Open();
++	while( (machinead=m_machineads.Next()) ) {
++		bool junk;
++		if( m_matched_machines.lookup(machinead,junk) == 0 ) {
++			continue; // already matched this machine
++		}
++		if( EvalBool(machinead, claimed) ) {
++			m_matched_machines.insert(machinead,true);
++		}
++	}
++}
++
++bool
++MatchTest::matchJobAd(ClassAd *jobad)
++{
++    ClassAd *machinead;
++	bool retval=true;
++
++	OptimizeJobAdForMatchmaking( jobad );
++
++    // Currently, there is no cleverness about how best to fill the pool.
++    // So if more of the pool could be filled by matching some job to
++    // a machine other than the first one we happen to find, this
++    // algorithm will not discover that fact.  No RANKs are taken
++    // into account either, only Requirements.
++
++    m_machineads.Open();
++	bool found_match = false;
++	while( (machinead=m_machineads.Next()) ) {
++		bool junk;
++		if( m_matched_machines.lookup(machinead,junk) == 0 ) {
++			continue; // already matched this machine
++		}
++		if( IsAMatch(jobad,machinead) ) {
++			m_matched_machines.insert(machinead,true);
++			found_match = true;
++			break;
++		}
++	}
++
++    unsigned int num_machines = m_machineads.MyLength();
++	if( (unsigned int)m_matched_machines.getNumElements() == num_machines ) {
++		retval=false; // all machines matched
++	}
++	if( m_show_unmatched_jobs && !found_match ) {
++		showJobAd( jobad, "UNMATCHED JOB" );
++	}
++
++	delete jobad;
++    return retval;
++}
++
++bool
++MatchTest::addMachineAd(ClassAd *machinead)
++{
++	OptimizeMachineAdForMatchmaking( machinead );
++	m_machineads.Insert(machinead);
++	return true;
++}
++
++void
++MatchTest::ShowDemand(char const *jobads_fname,StringList &job_constraints,char const *machineads_fname,char const *machine_constraint,StringList &claims)
++{
++    job_constraints.rewind();
++    claims.rewind();
++    char const *job_constraint;
++    while( (job_constraint = job_constraints.next()) ) {
++        char const *claimed = NULL;
++        if( claims.number() > 0 ) {
++            claimed = claims.next();
++        }
++        if( *job_constraint ) {
++            printf("\nEstimating total possible machine matches for jobs matching:\n   %s\n", job_constraint);
++        }
++        else {
++            printf("\nEstimating total possible machine maches for all jobs\n");
++        }
++        if( claimed && *claimed ) {
++            printf("plus machines already claimed:\n   %s\n", claimed);
++        }
++        if( !analyze_demand(jobads_fname,job_constraint,machineads_fname,machine_constraint,claimed) ) {
++            exit(1);
++        }
++
++        printf("\nFraction of machines matched: %.3f (%d of %d)\n",getMachinesMatchedFraction(),m_machines_matched,m_machines_matched+m_machines_unmatched);
++    }
++}
++
++bool
++MatchTest::analyze_demand(char const *jobads_fname,char const *job_constraint,char const *machineads_fname,char const *machine_constraint,char const *claimed)
++{
++    ExprTree *job_constraint_expr = NULL;
++    ExprTree *machine_constraint_expr = NULL;
++    ExprTree *claimed_expr = NULL;
++
++    if( job_constraint && *job_constraint && ParseClassAdRvalExpr( job_constraint, job_constraint_expr ) ) {
++        fprintf( stderr, "Error:  could not parse job-constraint %s\n", job_constraint );
++        return false;
++    }
++
++    if( claimed && *claimed && ParseClassAdRvalExpr( claimed, claimed_expr ) ) {
++        fprintf( stderr, "Error:  could not parse claimed expression %s\n", claimed );
++        return false;
++    }
++
++    // if we have already loaded the machine ads, skip this step
++    if( m_last_machineads_fname != machineads_fname ||
++        m_last_machine_constraint != machine_constraint )
++    {
++        if( machine_constraint && *machine_constraint && ParseClassAdRvalExpr( machine_constraint, machine_constraint_expr ) ) {
++            fprintf( stderr, "Error:  could not parse machine-constraint %s\n", machine_constraint );
++            return false;
++        }
++
++		m_machineads.Clear();
++
++        if( !read_classad_file(machineads_fname,machine_constraint_expr,&MatchTest::addMachineAd) ) {
++            return false;
++        }
++
++        m_last_machineads_fname = machineads_fname;
++        m_last_machine_constraint = machine_constraint;
++    }
++
++    unmatch(); // clear any old matches
++
++    if( claimed_expr ) {
++        matchExpr( claimed_expr );
++    }
++
++    // now iterate over the job ads and try matching them one by one
++    if( !read_classad_file(jobads_fname,job_constraint_expr,&MatchTest::matchJobAd) ) {
++        return false;
++    }
++
++    if( m_show_unmatched_machines ) {
++        ClassAd *machinead;
++        m_machineads.Open();
++        while( (machinead=m_machineads.Next()) ) {
++            bool junk;
++            if( m_matched_machines.lookup(machinead,junk) == 0 ) {
++                continue;
++            }
++            showMachineAd( machinead, "UNMATCHED MACHINE" );
++        }
++    }
++
++    unsigned int num_machines = m_machineads.MyLength();
++    m_machines_matched = m_matched_machines.getNumElements();
++    m_machines_unmatched = num_machines - m_machines_matched;
++
++    if( claimed_expr ) {
++        delete claimed_expr;
++    }
++    if( machine_constraint_expr ) {
++        delete machine_constraint_expr;
++    }
++    if( job_constraint_expr ) {
++        delete job_constraint_expr;
++    }
++	return true;
++}
++
++bool
++MatchTest::read_classad_file(const char *filename, ExprTree *constraint_expr, bool (MatchTest::*work_func)(ClassAd *))
++{
++    int is_eof, is_error, is_empty;
++    bool success;
++    ClassAd *classad;
++    FILE *file;
++    long ad_pos = 0;
++
++    file = safe_fopen_wrapper(filename, "r", O_LARGEFILE);
++    if (file == NULL) {
++        fprintf(stderr, "Can't open file of ClassAds: %s\n", filename);
++        return false;
++    }
++
++    do {
++        ad_pos = ftell(file);
++        classad = new ClassAd(file, "\n", is_eof, is_error, is_empty);
++        if (!is_error && !is_empty) {
++            if( !constraint_expr || EvalBool(classad, constraint_expr) )
++            {
++				if( ! (this->*work_func)(classad) ) {
++					break;
++				}
++            }
++            else {
++                delete classad;
++            }
++        }
++        else {
++            delete classad;
++        }
++        if( is_error ) {
++            // As a convenience, skip over errors caused by header lines
++            // from condor_q -long.
++
++            long new_pos = ftell(file);
++            // jump back to start of error using relative offset in
++            // case file size is larger than absolute offset can
++            // handle
++            if( fseek(file,ad_pos - new_pos,SEEK_CUR) != 0 ) {
++                break;
++            }
++            MyString line;
++            while( line.readLine(file) ) {
++                line.trim();
++                if( line.IsEmpty() ) {
++                    continue; // ignore blank lines
++                }
++                else if( line.find("--") == 0 ) {
++                    // this looks like a header line from the schedd
++                    is_error = 0;
++                    break;
++                }
++                else {
++                    fprintf(stderr, "Invalid ClassAd in %s beginning at position %ld, and with first line: %s\n",filename,ad_pos,line.Value());
++                    break;
++                }
++            }
++        }
++    } while (!is_eof && !is_error);
++
++    if (is_error) {
++        success = false;
++    } else {
++        success = true;
++    }
++
++    fclose(file);
++    return success;
++}
+diff --git a/src/condor_tools/config_val.cpp b/src/condor_tools/config_val.cpp
+index 92ee0ee..09b84ee 100644
+--- a/src/condor_tools/config_val.cpp
++++ b/src/condor_tools/config_val.cpp
+@@ -398,6 +398,12 @@ main( int argc, char* argv[] )
+ 				while (collectors->next (collector)) {
+ 					if (collector->locate() &&
+ 					    sock.connect((char*) collector->addr(), 0)) {
++						// Do something with the connection, 
++						// such that we won't end up with 
++						// noise in the collector log
++						collector->startCommand( DC_NOP, &sock, 30 );
++						sock.encode();
++						sock.end_of_message();
+ 						// If we can connect to the
+ 						// collector, then we accept
+ 						// it as valid
+diff --git a/src/condor_tools/give_interactive.cpp b/src/condor_tools/give_interactive.cpp
+index 5d56fe3..8b30f62 100644
+--- a/src/condor_tools/give_interactive.cpp
++++ b/src/condor_tools/give_interactive.cpp
+@@ -27,7 +27,7 @@
+ #include "condor_api.h"
+ #include "my_username.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "condor_adtypes.h"
+ #include "condor_string.h"
+ #include "condor_uid.h"
+diff --git a/src/condor_tools/test_auth.cpp b/src/condor_tools/test_auth.cpp
+index 1325284..d9dba86 100644
+--- a/src/condor_tools/test_auth.cpp
++++ b/src/condor_tools/test_auth.cpp
+@@ -44,7 +44,7 @@
+ #include "subsystem_info.h"
+ 
+ char	*MyName;
+-DECL_SUBSYSTEM( "TOOL", SUBSYSTEM_TYPE_TOOL );
++DECL_SUBSYSTEM( "DAEMON-TOOL", SUBSYSTEM_TYPE_TOOL );
+ 
+ void
+ usage()
+@@ -69,7 +69,7 @@ StringToDCpermission(char const *str) {
+ 	DCpermission perm;
+ 
+ 	for(perm = FIRST_PERM;perm!=LAST_PERM;perm=NEXT_PERM(perm)) {
+-		if( !strcasecmp(str,PermString(perm)) ) {
++		if(str && !strcasecmp(str,PermString(perm)) ) {
+ 			return perm;
+ 		}
+ 	}
+@@ -97,7 +97,7 @@ main( int argc, char* argv[] )
+ 		} else if( match_prefix( argv[i], "-debug" ) ) {
+ 				// dprintf to console
+ 			Termlog = 1;
+-			dprintf_config( "TOOL" );
++			dprintf_config( "DAEMON-TOOL" );
+ 			DebugFlags |= D_FULLDEBUG|D_SECURITY;
+ 		} else if( match_prefix( argv[i], "-" ) ) {
+ 			usage();
+@@ -106,10 +106,11 @@ main( int argc, char* argv[] )
+ 		}
+ 	}
+ 
+-		// If we didn't get told what subsystem we should use, set it
+-		// to "TOOL".
++	// If we didn't get told what subsystem we should use, set it
++	// to "TOOL".
++
+ 	if( !get_mySubSystem()->isNameValid() ) {
+-		get_mySubSystem()->setName( "TOOL" );
++		get_mySubSystem()->setName( "DAEMON-TOOL" );
+ 	}
+ 
+ 	config( 0, true );
+diff --git a/src/condor_unit_tests/OTEST_Directory.cpp b/src/condor_unit_tests/OTEST_Directory.cpp
+index eaab0ad..3843bad 100644
+--- a/src/condor_unit_tests/OTEST_Directory.cpp
++++ b/src/condor_unit_tests/OTEST_Directory.cpp
+@@ -167,8 +167,6 @@ static MyString
+ static const char
+ 	*readme = "README";
+ 
+-static time_t current_time;
+-
+ bool OTEST_Directory(void) {
+ 	emit_object("Directory");
+ 	emit_comment("Class to iterate filenames in a subdirectory.  Given a "
+@@ -417,10 +415,6 @@ static void setup() {
+ 
+ 	// Close FILE* that was written to
+ 	cut_assert_z( fclose(file_1) );
+-	
+-	// Get the current time
+-	current_time = time(NULL);
+-
+ }
+ 
+ static void cleanup() {
+@@ -1082,10 +1076,10 @@ static bool test_get_access_time_before() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	Directory dir(original_dir.Value());
+-	time_t ret_val = dir.GetAccessTime();
++	time_t atime = dir.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", atime);
++	if(atime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1101,10 +1095,10 @@ static bool test_get_access_time_empty() {
+ 	emit_retval("%d", 0);
+ 	Directory dir(empty_dir.Value());
+ 	dir.Next();
+-	time_t ret_val = dir.GetAccessTime();
++	time_t atime = dir.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", atime);
++	if(atime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1118,28 +1112,33 @@ static bool test_get_access_time_valid() {
+ 	Directory dir(original_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetAccessTime();
++	time_t atime = dir.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val == 0) {
++	emit_retval("%d", atime);
++	if(atime == 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_access_time_close() {
+-	emit_test("Test that GetAccessTime() returns a time close to the current "
+-		"time for a file that was just created.");
++	emit_test("Test that GetAccessTime() returns the same time as stat() for a "
++		"file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory", "%s", tmp_dir.Value());
+ 	Directory dir(tmp_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetAccessTime();
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, next);
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_atime);
++	time_t atime = dir.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - ret_val) > 10) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1153,10 +1152,10 @@ static bool test_get_modify_time_before() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	Directory dir(original_dir.Value());
+-	time_t ret_val = dir.GetModifyTime();
++	time_t mtime = dir.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", mtime);
++	if(mtime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1172,10 +1171,10 @@ static bool test_get_modify_time_empty() {
+ 	emit_retval("%d", 0);
+ 	Directory dir(empty_dir.Value());
+ 	dir.Next();
+-	time_t ret_val = dir.GetModifyTime();
++	time_t mtime = dir.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", mtime);
++	if(mtime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1189,10 +1188,10 @@ static bool test_get_modify_time_valid() {
+ 	Directory dir(original_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetModifyTime();
++	time_t mtime = dir.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val == 0) {
++	emit_retval("%d", mtime);
++	if(mtime == 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1206,11 +1205,16 @@ static bool test_get_modify_time_close() {
+ 	Directory dir(tmp_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetModifyTime();
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, next);
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_mtime);
++	time_t mtime = dir.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - ret_val) > 10) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1224,10 +1228,10 @@ static bool test_get_create_time_before() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	Directory dir(original_dir.Value());
+-	time_t ret_val = dir.GetCreateTime();
++	time_t ctime = dir.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", ctime);
++	if(ctime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1243,10 +1247,10 @@ static bool test_get_create_time_empty() {
+ 	emit_retval("%d", 0);
+ 	Directory dir(empty_dir.Value());
+ 	dir.Next();
+-	time_t ret_val = dir.GetCreateTime();
++	time_t ctime = dir.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val != 0) {
++	emit_retval("%d", ctime);
++	if(ctime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1260,10 +1264,10 @@ static bool test_get_create_time_valid() {
+ 	Directory dir(original_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetCreateTime();
++	time_t ctime = dir.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	if(ret_val == 0) {
++	emit_retval("%d", ctime);
++	if(ctime == 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1277,11 +1281,16 @@ static bool test_get_create_time_close() {
+ 	Directory dir(tmp_dir.Value());
+ 	const char* next = dir.Next();
+ 	emit_param("Current File", "%s", next);
+-	time_t ret_val = dir.GetCreateTime();
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, next);
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_ctime);
++	time_t ctime = dir.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", ret_val);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - ret_val) > 10) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+diff --git a/src/condor_unit_tests/OTEST_StatInfo.cpp b/src/condor_unit_tests/OTEST_StatInfo.cpp
+index 7f62e3a..5052829 100644
+--- a/src/condor_unit_tests/OTEST_StatInfo.cpp
++++ b/src/condor_unit_tests/OTEST_StatInfo.cpp
+@@ -133,8 +133,6 @@ static MyString
+ static const char
+ 	*readme = "README";
+ 
+-static time_t current_time;
+-
+ static int fd;
+ 
+ bool OTEST_StatInfo(void) {
+@@ -254,18 +252,18 @@ bool OTEST_StatInfo(void) {
+ static void setup() {
+ 	int tmp_fd;
+ 
+-	//Get the current working directory
++	// Get the current working directory
+ 	cut_assert_true( condor_getcwd(original_dir) );
+ 	original_dir += DIR_DELIM_CHAR;
+ 	
+-	//Directory strings
++	// Directory strings
+ 	cut_assert_true( tmp.sprintf("testtmp%d", getpid()) );
+ 	
+-	//Make a temporary directory to test
++	// Make a temporary directory to test
+ 	cut_assert_z( mkdir(tmp.Value(), 0700) );
+ 	cut_assert_z( chdir(tmp.Value()) );
+ 	
+-	//Store some directories
++	// Store some directories
+ 	cut_assert_true( condor_getcwd(tmp_dir) );
+ 	tmp_dir += DIR_DELIM_CHAR;
+ 	cut_assert_true( empty_dir.sprintf("%s%s%c", tmp_dir.Value(), "empty_dir",
+@@ -277,11 +275,11 @@ static void setup() {
+ 	cut_assert_true( file_dir.sprintf("%s%s%c", full_dir.Value(), "full_file",
+ 					 DIR_DELIM_CHAR) );
+ 	
+-	//Put some files/directories in there
++	// Put some files/directories in there
+ 	cut_assert_z( mkdir("empty_dir", 0700) );
+ 	cut_assert_z( mkdir("full_dir", 0700) );
+ 	
+-	//Create some symbolic links
++	// Create some symbolic links
+ #ifndef WIN32
+ 	MyString link;
+ 	cut_assert_true( link.sprintf("%s%s", full_dir.Value(), "full_file") );
+@@ -301,24 +299,21 @@ static void setup() {
+ 	cut_assert_z( mkdir("link_dir", 0700) );
+ 	fd = cut_assert_gez( safe_open_wrapper("empty_file", O_RDWR | O_CREAT) );
+ 
+-	//Add some text
++	// Add some text
+ 	FILE* file_1 = safe_fopen_wrapper("full_file", "w+");
+ 	cut_assert_not_null( file_1 );
+ 	cut_assert_gz( fprintf(file_1, "This is some text!") );
+ 	cut_assert_z( chdir("..") );
+ 	
+-	//Get back to original directory
++	// Get back to original directory
+ 	cut_assert_z( chdir("..") );
+ 
+-	//Close FILE* that were written to
++	// Close FILE* that were written to
+ 	cut_assert_z( fclose(file_1) );
+-	
+-	//Get the current time
+-	current_time = time(NULL);
+ }
+ 
+ static void cleanup() {
+-	//Remove the created files/directories/symlinks
++	// Remove the created files/directories/symlinks
+ 	cut_assert_z( chdir(tmp.Value()) );
+ 	cut_assert_z( rmdir("empty_dir") );
+ 	cut_assert_z( remove("symlink_file") );
+@@ -326,7 +321,7 @@ static void cleanup() {
+ 	cut_assert_z( chdir("full_dir") );
+ 	cut_assert_z( rmdir("link_dir") );
+ 	
+-	//Just in case any of these weren't removed...
++	// Just in case any of these weren't removed...
+ 	remove("empty_file");
+ 	remove("full_file");
+ 	remove("executable_file");
+@@ -863,27 +858,32 @@ static bool test_get_access_time_not_exist() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	StatInfo info("DoesNotExist", "DoesNotExist");
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != 0) {
++	emit_retval("%d", atime);
++	if(atime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_access_time_file() {
+-	emit_test("Test that GetAccessTime() returns a time close to the current "
+-		"time for a file that was just created.");
++	emit_test("Test that GetAccessTime() returns the same time as stat() for a "
++		"file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", full_dir.Value());
+ 	emit_param("File Name", "empty_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", full_dir.Value(), DIR_DELIM_CHAR, "empty_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_atime);
+ 	StatInfo info(full_dir.Value(), "empty_file");
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -902,61 +902,76 @@ static bool test_get_access_time_file_old() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", st.st_atime);
+ 	StatInfo info(original_dir.Value(), readme);
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != st.st_atime) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_access_time_dir() {
+-	emit_test("Test that GetAccessTime() returns a time close to the current "
+-		"time for a directory that was just created.");
++	emit_test("Test that GetAccessTime() returns the same time as stat() for a"
++		" directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "full_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "full_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_atime);
+ 	StatInfo info(tmp_dir.Value(), "full_dir");
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_access_time_symlink_file() {
+-	emit_test("Test that GetAccessTime() returns a time close to the current "
+-		"time for a symlink to a file that was just created.");
++	emit_test("Test that GetAccessTime() returns the same time as stat() for a "
++		"symlink to a file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_atime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_file");
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_access_time_symlink_dir() {
+-	emit_test("Test that GetAccessTime() returns a time close to the current "
+-		"time for a symlink to a directory that was just created.");
++	emit_test("Test that GetAccessTime() returns the same time as stat() for a "
++		"symlink to a directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_atime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_dir");
+-	time_t time = info.GetAccessTime();
++	time_t atime = info.GetAccessTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", atime);
++	if(atime != st.st_atime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -971,27 +986,32 @@ static bool test_get_modify_time_not_exist() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	StatInfo info("DoesNotExist", "DoesNotExist");
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != 0) {
++	emit_retval("%d", mtime);
++	if(mtime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_modify_time_file() {
+-	emit_test("Test that GetModifyTime() returns a time close to the current "
+-		"time for a file that was just created.");
++	emit_test("Test that GetModifyTime() returns the same time as stat() for a "
++		"file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", full_dir.Value());
+ 	emit_param("File Name", "empty_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", full_dir.Value(), DIR_DELIM_CHAR, "empty_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_mtime);
+ 	StatInfo info(full_dir.Value(), "empty_file");
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1010,61 +1030,76 @@ static bool test_get_modify_time_file_old() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", st.st_mtime);
+ 	StatInfo info(original_dir.Value(), readme);
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != st.st_mtime) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_modify_time_dir() {
+-	emit_test("Test that GetModifyTime() returns a time close to the current "
+-		"time for a directory that was just created.");
++	emit_test("Test that GetModifyTime() returns the same time as stat() for a "
++		"directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "full_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "full_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_mtime);
+ 	StatInfo info(tmp_dir.Value(), "full_dir");
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_modify_time_symlink_file() {
+-	emit_test("Test that GetModifyTime() returns a time close to the current "
+-		"time for a symlink to a file that was just created.");
++	emit_test("Test that GetModifyTime() returns the same time as stat() for a "
++		"symlink to a file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_mtime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_file");
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_modify_time_symlink_dir() {
+-	emit_test("Test that GetModifyTime() returns a time close to the current "
+-		"time for a symlink to a directory that was just created.");
++	emit_test("Test that GetModifyTime() returns the same time as stat() for a "
++		"symlink to a directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_mtime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_dir");
+-	time_t time = info.GetModifyTime();
++	time_t mtime = info.GetModifyTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", mtime);
++	if(mtime != st.st_mtime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1079,27 +1114,32 @@ static bool test_get_create_time_not_exist() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", 0);
+ 	StatInfo info("DoesNotExist", "DoesNotExist");
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != 0) {
++	emit_retval("%d", ctime);
++	if(ctime != 0) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_create_time_file() {
+-	emit_test("Test that GetCreateTime() returns a time close to the current "
+-		"time for a file that was just created.");
++	emit_test("Test that GetCreateTime() returns the same time as stat() for a "
++		"file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", full_dir.Value());
+ 	emit_param("File Name", "empty_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", full_dir.Value(), DIR_DELIM_CHAR, "empty_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_ctime);
+ 	StatInfo info(full_dir.Value(), "empty_file");
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+@@ -1118,61 +1158,76 @@ static bool test_get_create_time_file_old() {
+ 	emit_output_expected_header();
+ 	emit_retval("%d", st.st_ctime);
+ 	StatInfo info(original_dir.Value(), readme);
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	if(time != st.st_ctime) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_create_time_dir() {
+-	emit_test("Test that GetCreateTime() returns a time close to the current "
+-		"time for a directory that was just created.");
++	emit_test("Test that GetCreateTime() returns the same time as stat() for a "
++		"directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "full_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "full_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_ctime);
+ 	StatInfo info(tmp_dir.Value(), "full_dir");
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_create_time_symlink_file() {
+-	emit_test("Test that GetCreateTime() returns a time close to the current "
+-		"time for a symlink to a file that was just created.");
++	emit_test("Test that GetCreateTime() returns the same time as stat() for a "
++		"symlink to a file that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_file");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_file");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_ctime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_file");
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+ }
+ 
+ static bool test_get_create_time_symlink_dir() {
+-	emit_test("Test that GetCreateTime() returns a time close to the current "
+-		"time for a symlink to a directory that was just created.");
++	emit_test("Test that GetCreateTime() returns the same time as stat() for a "
++		"symlink to a directory that was just created.");
+ 	emit_input_header();
+ 	emit_param("Directory Path", "%s", tmp_dir.Value());
+ 	emit_param("File Name", "symlink_dir");
++	struct stat st;
++	MyString file;
++	file.sprintf("%s%c%s", tmp_dir.Value(), DIR_DELIM_CHAR, "symlink_dir");
++	stat(file.Value(), &st);
++	emit_output_expected_header();
++	emit_retval("%d", st.st_ctime);
+ 	StatInfo info(tmp_dir.Value(), "symlink_dir");
+-	time_t time = info.GetCreateTime();
++	time_t ctime = info.GetCreateTime();
+ 	emit_output_actual_header();
+-	emit_retval("%d", time);
+-	emit_param("Current Time", "%d", current_time);
+-	if(abs(current_time - time) > 10) {
++	emit_retval("%d", ctime);
++	if(ctime != st.st_ctime) {
+ 		FAIL;
+ 	}
+ 	PASS;
+diff --git a/src/condor_unit_tests/emit.cpp b/src/condor_unit_tests/emit.cpp
+index c79c0a2..9e6559e 100644
+--- a/src/condor_unit_tests/emit.cpp
++++ b/src/condor_unit_tests/emit.cpp
+@@ -55,6 +55,7 @@ void Emitter::init(bool failures_printed, bool successes_printed) {
+ 	set_debug_flags("D_ALWAYS");
+ 	set_debug_flags("D_NOHEADER");
+ 	config();
++	global_start = time(0);
+ }
+ 
+ /* Formats and prints a parameter and its value as a sub-point of input,
+@@ -78,7 +79,9 @@ void Emitter::emit_retval(const char* format, va_list args) {
+ /* Emits a heading and the function string.
+  */
+ void Emitter::emit_function(const char* function) {
+-	test_buf->sprintf("---------------------\nFUNCTION:  %s\n", function);
++	test_buf->sprintf("\n\n------------------------------------------------------"
++		"--------------------------\nFUNCTION:  %s\n---------------------------"
++		"-----------------------------------------------------\n", function);
+ 	if(print_failures && print_successes) {
+ 		dprintf(D_ALWAYS, "%s", test_buf->Value());
+ 		test_buf->setChar(0, '\0');
+@@ -88,7 +91,9 @@ void Emitter::emit_function(const char* function) {
+ /* Emits a heading and the object string.
+  */
+ void Emitter::emit_object(const char* object) {
+-	test_buf->sprintf("---------------------\nOBJECT:  %s\n", object);
++	test_buf->sprintf("\n------------------------------------------------------"
++		"--------------------------\nOBJECT:  %s\n-----------------------------"
++		"---------------------------------------------------\n", object);
+ 	if(print_failures && print_successes) {
+ 		dprintf(D_ALWAYS, "%s", test_buf->Value());
+ 		test_buf->setChar(0, '\0');
+@@ -146,7 +151,7 @@ void Emitter::emit_output_actual_header() {
+  * be called via the PASS macro."
+  */
+ void Emitter::emit_result_success(int line) {
+-	buf->sprintf_cat("RESULT:  SUCCESS, test passed at line %d (%ld seconds)\n", 
++	buf->sprintf_cat("RESULT:  SUCCESS, test passed at line %d (%ld seconds)\n",
+ 		line, time(0) - start);
+ 	print_now_if_possible();
+ 	if(print_successes && !print_failures) {
+@@ -210,14 +215,15 @@ void Emitter::emit_test_break() {
+ }
+ 
+ void Emitter::emit_summary() {
+-	dprintf(D_ALWAYS, "\n---------------------\nSUMMARY:\n");
+-	dprintf(D_ALWAYS, "========\n");
++	dprintf(D_ALWAYS, "\n========\nSUMMARY:\n========\n");
+ 	dprintf(D_ALWAYS, "    Total Tested Objects:  %d\n", object_tests);
+ 	dprintf(D_ALWAYS, "    Total Unit Tests:      %d\n", function_tests);
+ 	dprintf(D_ALWAYS, "    Passed Unit Tests:     %d\n", passed_tests);
+ 	dprintf(D_ALWAYS, "    Failed Unit Tests:     %d\n", failed_tests);
+ 	dprintf(D_ALWAYS, "    Aborted Unit Tests:    %d\n", aborted_tests);
+ 	dprintf(D_ALWAYS, "    Skipped Unit Tests:    %d\n", skipped_tests);
++	dprintf(D_ALWAYS, "    Total Time Taken:      %ld seconds\n",
++			time(0) - global_start);
+ }
+ 
+ void Emitter::print_result_failure() {
+diff --git a/src/condor_unit_tests/emit.h b/src/condor_unit_tests/emit.h
+index 193642f..514e843 100644
+--- a/src/condor_unit_tests/emit.h
++++ b/src/condor_unit_tests/emit.h
+@@ -52,7 +52,7 @@ private:
+ 
+ 	MyString *buf, *test_buf;
+ 
+-	time_t start;
++	time_t start, global_start;
+ 
+ 	void print_result_failure(void);
+ 	
+diff --git a/src/condor_unit_tests/unit_test_utils.h b/src/condor_unit_tests/unit_test_utils.h
+index 6dde910..3582913 100644
+--- a/src/condor_unit_tests/unit_test_utils.h
++++ b/src/condor_unit_tests/unit_test_utils.h
+@@ -210,4 +210,4 @@ struct timezone
+ };
+ 
+ int gettimeofday(struct timeval *tv, struct timezone *tz);
+-#endif
+\ No newline at end of file
++#endif 
+diff --git a/src/condor_utils/CMakeLists.txt b/src/condor_utils/CMakeLists.txt
+index a9b6322..8e94ea9 100644
+--- a/src/condor_utils/CMakeLists.txt
++++ b/src/condor_utils/CMakeLists.txt
+@@ -47,7 +47,7 @@ endif()
+ condor_static_lib( condorapi "${ApiSrcs}" )
+ add_dependencies( condorapi utils )
+ 
+-if (NOT WINDOWS)
++if (HAVE_LIBDL)
+ 	set(APILIBDEP dl)
+ endif()
+ 
+diff --git a/src/condor_utils/ClassAdLogParser.h b/src/condor_utils/ClassAdLogParser.h
+index c29057d..f0bc1b8 100644
+--- a/src/condor_utils/ClassAdLogParser.h
++++ b/src/condor_utils/ClassAdLogParser.h
+@@ -127,7 +127,7 @@ private:
+ 		//
+ 		// data
+ 		//	
+-	char	job_queue_name[_POSIX_PATH_MAX];//!< job queue log file path
++	char	job_queue_name[PATH_MAX];//!< job queue log file path
+ 	long	nextOffset;						//!< next offset
+ 
+ 	ClassAdLogEntry		curCALogEntry; 	//!< current ClassAd log entry
+diff --git a/src/condor_utils/ClassAdLogProber.h b/src/condor_utils/ClassAdLogProber.h
+index e9abe41..1830054 100644
+--- a/src/condor_utils/ClassAdLogProber.h
++++ b/src/condor_utils/ClassAdLogProber.h
+@@ -78,7 +78,7 @@ public:
+ 
+ private:
+ 		// information about a job_queue.log file and polling state
+-	char			job_queue_name[_POSIX_PATH_MAX]; //!< job queue file path
++	char			job_queue_name[PATH_MAX]; //!< job queue file path
+ 		// stored metadata in DB
+ 	long int		last_mod_time;	//!< last modification time
+ 	long int		last_size;	//!< last size
+diff --git a/src/condor_utils/HashTable.h b/src/condor_utils/HashTable.h
+index 935b8bc..c19257b 100644
+--- a/src/condor_utils/HashTable.h
++++ b/src/condor_utils/HashTable.h
+@@ -73,7 +73,7 @@ class HashTable {
+   int lookup(const Index &index, Value* &value) const;
+ 	  // returns 0 if exists, -1 otherwise
+   int exists(const Index &index) const;
+-  int getNext(Index &index, void *current, Value &value,
++  int getNext(const Index &index, void *current, Value &value,
+ 	      void *&next) const;
+   int remove(const Index &index);  
+   int getNumElements( ) const { return numElems; }
+@@ -421,7 +421,7 @@ int HashTable<Index,Value>::exists(const Index &index) const
+ 	no unit test written.
+ */
+ template <class Index, class Value>
+-int HashTable<Index,Value>::getNext(Index &index, void *current,
++int HashTable<Index,Value>::getNext(const Index &index, void *current,
+ 				    Value &value, void *&next) const
+ {
+   HashBucket<Index, Value> *bucket;
+diff --git a/src/condor_utils/access_desktop.WINDOWS.cpp b/src/condor_utils/access_desktop.WINDOWS.cpp
+index c192332..6b4a328 100644
+--- a/src/condor_utils/access_desktop.WINDOWS.cpp
++++ b/src/condor_utils/access_desktop.WINDOWS.cpp
+@@ -341,7 +341,7 @@ void RemoveSid(PSID *psid)
+ BOOL AddTheAceWindowStation(HWINSTA hwinsta, PSID psid)
+ {
+ 
+-	ACCESS_ALLOWED_ACE   *pace;
++	ACCESS_ALLOWED_ACE  *pace      = NULL;
+ 	ACL_SIZE_INFORMATION aclSizeInfo;
+ 	BOOL                 bDaclExist;
+ 	BOOL                 bDaclPresent;
+@@ -351,7 +351,7 @@ BOOL AddTheAceWindowStation(HWINSTA hwinsta, PSID psid)
+ 	DWORD                dwSidSize = 0;
+ 	DWORD                dwSdSizeNeeded;
+ 	PACL                 pacl;
+-	PACL                 pNewAcl;
++	PACL                 pNewAcl   = NULL;
+ 	PSECURITY_DESCRIPTOR psd       = NULL;
+ 	PSECURITY_DESCRIPTOR psdNew    = NULL;
+ 	PVOID                pTempAce;
+@@ -805,7 +805,7 @@ BOOL AddTheAceDesktop(HDESK hdesk, PSID psid)
+ 	DWORD                dwSidSize = 0;
+ 	DWORD                dwSdSizeNeeded;
+ 	PACL                 pacl;
+-	PACL                 pNewAcl;
++	PACL                 pNewAcl   = NULL;
+ 	PSECURITY_DESCRIPTOR psd       = NULL;
+ 	PSECURITY_DESCRIPTOR psdNew    = NULL;
+ 	PVOID                pTempAce;
+diff --git a/src/condor_utils/alarm.unix.cpp b/src/condor_utils/alarm.unix.cpp
+index badde49..6b05553 100644
+--- a/src/condor_utils/alarm.unix.cpp
++++ b/src/condor_utils/alarm.unix.cpp
+@@ -18,15 +18,10 @@
+  ***************************************************************/
+ 
+ 
+- 
+-
+-#define _POSIX_SOURCE
+-
+ #include "condor_common.h"
+ #include "condor_debug.h"
+ #include "alarm.unix.h"
+ 
+-
+ Alarm::Alarm() : saved( 0 ) { }
+ 
+ Alarm::~Alarm()
+diff --git a/src/condor_utils/classadHistory.cpp b/src/condor_utils/classadHistory.cpp
+index b5a14cd..548510b 100644
+--- a/src/condor_utils/classadHistory.cpp
++++ b/src/condor_utils/classadHistory.cpp
+@@ -19,7 +19,7 @@
+ 
+ #include "condor_common.h"
+ #include "condor_debug.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "MyString.h"
+ #include "condor_attributes.h"
+ #include "basename.h"
+diff --git a/src/condor_utils/classad_log.cpp b/src/condor_utils/classad_log.cpp
+index 90c4893..6872a63 100644
+--- a/src/condor_utils/classad_log.cpp
++++ b/src/condor_utils/classad_log.cpp
+@@ -28,11 +28,9 @@
+ #include "util_lib_proto.h"
+ #include "classad_merge.h"
+ 
+-#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN)
+ #include "ClassAdLogPlugin.h"
+ #endif
+-#endif
+ 
+ // explicitly instantiate the HashTable template
+ 
+@@ -721,11 +719,9 @@ LogNewClassAd::Play(void *data_structure)
+ 	ad->SetTargetTypeName(targettype);
+ 	result = table->insert(HashKey(key), ad);
+ 
+-#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN)
+ 	ClassAdLogPluginManager::NewClassAd(key);
+ #endif
+-#endif
+ 
+ 	return result;
+ }
+@@ -791,11 +787,9 @@ LogDestroyClassAd::Play(void *data_structure)
+ 		return -1;
+ 	}
+ 
+-#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN)
+ 	ClassAdLogPluginManager::DestroyClassAd(key);
+ #endif
+-#endif
+ 
+ 	delete ad;
+ 	return table->remove(hkey);
+@@ -841,11 +835,9 @@ LogSetAttribute::Play(void *data_structure)
+ 	rval = ad->AssignExpr(name, value);
+ 	ad->SetDirtyFlag(name, is_dirty);
+ 
+-#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN)
+ 	ClassAdLogPluginManager::SetAttribute(key, name, value);
+ #endif
+-#endif
+ 
+ 	return rval;
+ }
+@@ -940,11 +932,9 @@ LogDeleteAttribute::Play(void *data_structure)
+ 	if (table->lookup(HashKey(key), ad) < 0)
+ 		return -1;
+ 
+-#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN)
+ 	ClassAdLogPluginManager::DeleteAttribute(key, name);
+ #endif
+-#endif
+ 
+ 	return ad->Delete(name);
+ }
+diff --git a/src/condor_utils/classad_newold.cpp b/src/condor_utils/classad_newold.cpp
+index 7edd7fc..4f43e1c 100644
+--- a/src/condor_utils/classad_newold.cpp
++++ b/src/condor_utils/classad_newold.cpp
+@@ -23,7 +23,6 @@
+ #include "classad_newold.h"
+ #include "condor_new_classads.h"
+ #define WANT_CLASSAD_NAMESPACE
+-#undef open
+ #include "classad/classad_distribution.h"
+ 
+ bool new_to_old(classad::ClassAd & src, ClassAd & dst)
+diff --git a/src/condor_utils/command_strings.cpp b/src/condor_utils/command_strings.cpp
+index 4661eb6..024aa8c 100644
+--- a/src/condor_utils/command_strings.cpp
++++ b/src/condor_utils/command_strings.cpp
+@@ -140,6 +140,7 @@ const struct Translation DCTranslation[] = {
+ 	{ "DC_CONFIG_VAL", DC_CONFIG_VAL },
+ 	{ "DC_CHILDALIVE", DC_CHILDALIVE },
+ 	{ "DC_FETCH_LOG", DC_FETCH_LOG },
++	{ "DC_SIGSTATECHANGE", DC_SIGSTATECHANGE },
+ 	{ "DC_INVALIDATE_KEY", DC_INVALIDATE_KEY },
+ 	{ "FILETRANS_UPLOAD", FILETRANS_UPLOAD },
+ 	{ "FILETRANS_DOWNLOAD", FILETRANS_DOWNLOAD },
+diff --git a/src/condor_utils/compat_classad.cpp b/src/condor_utils/compat_classad.cpp
+index 203be06..e18a3b8 100644
+--- a/src/condor_utils/compat_classad.cpp
++++ b/src/condor_utils/compat_classad.cpp
+@@ -967,10 +967,9 @@ LookupInteger( const char *name, int &value ) const
+ {
+ 	bool    boolVal;
+ 	int     haveInteger;
+-	string  sName;
++	string  sName(name);
+ 	int		tmp_val;
+ 
+-	sName = string(name);
+ 	if( EvaluateAttrInt(sName, tmp_val ) ) {
+ 		value = tmp_val;
+ 		haveInteger = TRUE;
+@@ -2007,7 +2006,7 @@ CopyAttribute( char const *target_attr, char const *source_attr,
+ //////////////XML functions///////////
+ 
+ int ClassAd::
+-fPrintAsXML(FILE *fp)
++fPrintAsXML(FILE *fp, StringList *attr_white_list)
+ {
+     if(!fp)
+     {
+@@ -2015,7 +2014,7 @@ fPrintAsXML(FILE *fp)
+     }
+ 
+     MyString out;
+-    sPrintAsXML(out);
++    sPrintAsXML(out,attr_white_list);
+     fprintf(fp, "%s", out.Value());
+     return TRUE;
+ }
+@@ -2172,8 +2171,19 @@ _GetReferences(classad::ExprTree *tree,
+ 	classad::References ext_refs_set;
+ 	classad::References int_refs_set;
+ 	classad::References::iterator set_itr;
+-	GetExternalReferences(tree, ext_refs_set, true);
+-	GetInternalReferences(tree, int_refs_set, true);
++
++	bool ok = true;
++	if( !GetExternalReferences(tree, ext_refs_set, true) ) {
++		ok = false;
++	}
++	if( !GetInternalReferences(tree, int_refs_set, true) ) {
++		ok = false;
++	}
++	if( !ok ) {
++		dprintf(D_FULLDEBUG,"warning: failed to get all attribute references in ClassAd (perhaps caused by circular reference).\n");
++		dPrint(D_FULLDEBUG);
++		dprintf(D_FULLDEBUG,"End of offending ad.\n");
++	}
+ 
+ 		// We first process the references and save results in
+ 		// final_*_refs_set.  The processing may hit duplicates that
+diff --git a/src/condor_utils/compat_classad.h b/src/condor_utils/compat_classad.h
+index f66a0cb..f835b52 100644
+--- a/src/condor_utils/compat_classad.h
++++ b/src/condor_utils/compat_classad.h
+@@ -417,7 +417,7 @@ class ClassAd : public classad::ClassAd
+      * @param fp The file to be printed to.
+      * @return TRUE as long as the file existed.
+      */
+-    int fPrintAsXML(FILE *fp);
++    int fPrintAsXML(FILE *fp, StringList *attr_white_list = NULL);
+ 
+     /* Prints the current classad as XML to a string. fPrintAsXML calls this.
+      * @param output The MyString to have filled with the XML-ified classad.
+diff --git a/src/condor_utils/compat_classad_list.cpp b/src/condor_utils/compat_classad_list.cpp
+index 33715b2..8064f70 100644
+--- a/src/condor_utils/compat_classad_list.cpp
++++ b/src/condor_utils/compat_classad_list.cpp
+@@ -58,6 +58,18 @@ ClassAdListDoesNotDeleteAds::ClassAdListDoesNotDeleteAds():
+ 
+ ClassAdListDoesNotDeleteAds::~ClassAdListDoesNotDeleteAds()
+ {
++	Clear();
++	delete list_head;
++	list_head = NULL;
++}
++
++ClassAdList::~ClassAdList()
++{
++	Clear();
++}
++
++void ClassAdListDoesNotDeleteAds::Clear()
++{
+ 	for(list_cur=list_head->next;
+ 		list_cur!=list_head;
+ 		list_cur=list_head->next)
+@@ -65,12 +77,12 @@ ClassAdListDoesNotDeleteAds::~ClassAdListDoesNotDeleteAds()
+ 		list_head->next = list_cur->next;
+ 		delete list_cur;
+ 	}
+-	delete list_head;
+-	list_head = NULL;
+-	list_cur = NULL;
++	list_head->next = list_head;
++	list_head->prev = list_head;
++	list_cur = list_head;
+ }
+ 
+-ClassAdList::~ClassAdList()
++void ClassAdList::Clear()
+ {
+ 	for(list_cur=list_head->next;
+ 		list_cur!=list_head;
+@@ -79,6 +91,7 @@ ClassAdList::~ClassAdList()
+ 		delete list_cur->ad;
+ 		list_cur->ad = NULL;
+ 	}
++	ClassAdListDoesNotDeleteAds::Clear();
+ }
+ 
+ ClassAd* ClassAdListDoesNotDeleteAds::Next()
+diff --git a/src/condor_utils/compat_classad_list.h b/src/condor_utils/compat_classad_list.h
+index dde7f0f..694864f 100644
+--- a/src/condor_utils/compat_classad_list.h
++++ b/src/condor_utils/compat_classad_list.h
+@@ -89,7 +89,8 @@ protected:
+ 
+ public:
+ 	ClassAdListDoesNotDeleteAds();
+-	~ClassAdListDoesNotDeleteAds();
++	virtual ~ClassAdListDoesNotDeleteAds();
++	virtual void Clear();
+ 	ClassAd* Next();
+ 	void Open();
+ 		/*This Close() function is no longer really needed*/
+@@ -127,6 +128,7 @@ class ClassAdList: public ClassAdListDoesNotDeleteAds
+ 		 * fast.  No linear search through the list is required.
+ 		 */
+ 	int Delete(ClassAd* cad);
++	virtual void Clear();
+ };
+ 
+ typedef ClassAdList AttrListList;
+diff --git a/src/condor_utils/condor_attributes.cpp b/src/condor_utils/condor_attributes.cpp
+index a189a7b..54b006b 100644
+--- a/src/condor_utils/condor_attributes.cpp
++++ b/src/condor_utils/condor_attributes.cpp
+@@ -213,6 +213,8 @@ const char * const ATTR_FILE_READ_BYTES		= "FileReadBytes";
+ const char * const ATTR_FILE_WRITE_COUNT	= "FileWriteCount";
+ const char * const ATTR_FILE_WRITE_BYTES	= "FileWriteBytes";
+ const char * const ATTR_FILE_SEEK_COUNT		= "FileSeekCount";
++const char * const ATTR_BLOCK_READ_KBYTES       = "BlockReadKbytes";
++const char * const ATTR_BLOCK_WRITE_KBYTES      = "BlockWriteKbytes";
+ const char * const ATTR_FLOCKED_JOBS			 = "FlockedJobs";
+ const char * const ATTR_FLAVOR                   = "Flavor";
+ const char * const ATTR_FORCE					 = "Force";
+@@ -220,6 +222,7 @@ const char * const ATTR_GID						 = "Gid";
+ const char * const ATTR_GLOBAL_JOB_ID            = "GlobalJobId";
+ const char * const ATTR_GZIP					 = "GZIP";
+ const char * const ATTR_GLOBUS_DELEGATION_URI	 = "GlobusDelegationUri";
++const char * const ATTR_STACK_SIZE		 = "StackSize";
+ // Deprecated (cruft) -- no longer used
+ const char * const ATTR_GLOBUS_GRAM_VERSION		 = "GlobusGramVersion";
+ const char * const ATTR_GLOBUS_RESOURCE_UNAVAILABLE_TIME = "GlobusResourceUnavailableTime";
+@@ -229,6 +232,7 @@ const char * const ATTR_GLOBUS_STATUS			 = "GlobusStatus";
+ const char * const ATTR_GLOBUS_XML				 = "GlobusXML";
+ const char * const ATTR_X509_USER_PROXY          = "x509userproxy";
+ const char * const ATTR_X509_USER_PROXY_SUBJECT	 = "x509userproxysubject";
++const char * const ATTR_X509_USER_PROXY_EMAIL	 = "x509UserProxyEmail";
+ const char * const ATTR_X509_USER_PROXY_EXPIRATION	 = "x509UserProxyExpiration";
+ const char * const ATTR_X509_USER_PROXY_VONAME	 = "x509UserProxyVOName";
+ const char * const ATTR_X509_USER_PROXY_FIRST_FQAN	 = "x509UserProxyFirstFQAN";
+@@ -346,6 +350,10 @@ const char * const ATTR_JOB_OUTPUT				 = "Out";
+ const char * const ATTR_JOB_OUTPUT_ORIG			 = "OutOrig";
+ const char * const ATTR_JOB_OUTPUT_SIZE			 = "OutSize";
+ const char * const ATTR_JOB_PID                  = "JobPid";
++const char * const ATTR_PRE_JOB_PRIO1            = "PreJobPrio1";
++const char * const ATTR_PRE_JOB_PRIO2            = "PreJobPrio2";
++const char * const ATTR_POST_JOB_PRIO1           = "PostJobPrio1";
++const char * const ATTR_POST_JOB_PRIO2           = "PostJobPrio2";
+ const char * const ATTR_JOB_PRIO                 = "JobPrio";
+ const char * const ATTR_JOB_COMMITTED_TIME		 = "CommittedTime";
+ const char * const ATTR_JOB_LANGUAGE             = "JobLanguage";
+@@ -424,6 +432,8 @@ const char * const ATTR_MAX_HOSTS				 = "MaxHosts";
+ const char * const ATTR_MAX_JOB_RETIREMENT_TIME  = "MaxJobRetirementTime";
+ const char * const ATTR_MAX_JOBS_RUNNING         = "MaxJobsRunning";
+ const char * const ATTR_MEMORY                   = "Memory";
++const char * const ATTR_DETECTED_MEMORY          = "DetectedMemory";
++const char * const ATTR_DETECTED_CPUS            = "DetectedCpus";
+ const char * const ATTR_MIN_HOSTS				 = "MinHosts";
+ const char * const ATTR_MIPS                     = "Mips";
+ const char * const ATTR_MPI_IS_MASTER            = "MPIIsMaster";
+@@ -591,6 +601,27 @@ const char * const ATTR_TOTAL_LOCAL_RUNNING_JOBS = "TotalLocalJobsRunning";
+ const char * const ATTR_TOTAL_LOCAL_IDLE_JOBS	 = "TotalLocalJobsIdle";
+ const char * const ATTR_TOTAL_SCHEDULER_RUNNING_JOBS = "TotalSchedulerJobsRunning";
+ const char * const ATTR_TOTAL_SCHEDULER_IDLE_JOBS	 = "TotalSchedulerJobsIdle";
++const char * const ATTR_JOBS_SUBMITTED_CUMULATIVE = "JobsSubmittedCumulative";
++const char * const ATTR_JOBS_STARTED_CUMULATIVE = "JobsStartedCumulative";
++const char * const ATTR_JOBS_EXITED_CUMULATIVE = "JobsExitedCumulative";
++const char * const ATTR_JOBS_COMPLETED_CUMULATIVE = "JobsCompletedCumulative";
++const char * const ATTR_SHADOW_EXCEPTIONS_CUMULATIVE = "ShadowExceptionsCumulative";
++const char * const ATTR_MEAN_TIME_TO_START_CUMULATIVE = "MeanTimeToStartCumulative";
++const char * const ATTR_SUM_TIME_TO_START_CUMULATIVE = "SumTimeToStartCumulative";
++const char * const ATTR_MEAN_RUNNING_TIME_CUMULATIVE = "MeanRunningTimeCumulative";
++const char * const ATTR_SUM_RUNNING_TIME_CUMULATIVE = "SumRunningTimeCumulative";
++const char * const ATTR_EXIT_CODE_CUMULATIVE = "ExitCodeCumulative";
++const char * const ATTR_JOBS_SUBMITTED = "JobsSubmitted";
++const char * const ATTR_JOB_SUBMISSION_RATE = "JobSubmissionRate";
++const char * const ATTR_JOBS_STARTED = "JobsStarted";
++const char * const ATTR_JOB_START_RATE = "JobStartRate";
++const char * const ATTR_JOBS_COMPLETED = "JobsCompleted";
++const char * const ATTR_JOB_COMPLETION_RATE = "JobCompletionRate";
++const char * const ATTR_JOBS_EXITED = "JobsExited";
++const char * const ATTR_SHADOW_EXCEPTIONS = "ShadowExceptions";
++const char * const ATTR_MEAN_TIME_TO_START = "MeanTimeToStart";
++const char * const ATTR_MEAN_RUNNING_TIME = "MeanRunningTime";
++const char * const ATTR_EXIT_CODE = "ExitCode";
+ const char * const ATTR_TOTAL_SLOTS			 = "TotalSlots";
+ const char * const ATTR_TOTAL_TIME_IN_CYCLE		   = "TotalTimeInCycle";	
+ const char * const ATTR_TOTAL_TIME_BACKFILL_BUSY      = "TotalTimeBackfillBusy";
+@@ -606,6 +637,7 @@ const char * const ATTR_TOTAL_TIME_PREEMPTING_KILLING = "TotalTimePreemptingKill
+ const char * const ATTR_TOTAL_TIME_PREEMPTING_VACATING = "TotalTimePreemptingVacating";
+ const char * const ATTR_TOTAL_TIME_UNCLAIMED_BENCHMARKING = "TotalTimeUnclaimedBenchmarking";
+ const char * const ATTR_TOTAL_TIME_UNCLAIMED_IDLE     = "TotalTimeUnclaimedIdle";
++const char * const ATTR_WINDOWED_STAT_WIDTH = "WindowedStatWidth";
+ 
+ // Deprecated (cruft) -- use: ATTR_TOTAL_SLOTS;
+ const char * const ATTR_TOTAL_VIRTUAL_MACHINES	 = "TotalVirtualMachines";
+@@ -864,6 +896,19 @@ const char * const ATTR_AMAZON_REMOTE_VM_NAME = "AmazonRemoteVirtualMachineName"
+ const char * const ATTR_AMAZON_INSTANCE_TYPE = "AmazonInstanceType";
+ //************* End of changes for Amamzon Jobs *****************//
+ 
++//************* Added for EC2 Jobs ***************************//
++const char * const ATTR_EC2_ACCESS_KEY_ID = "EC2AccessKeyId";
++const char * const ATTR_EC2_SECRET_ACCESS_KEY = "EC2SecretAccessKey";
++const char * const ATTR_EC2_AMI_ID = "EC2AmiID";
++const char * const ATTR_EC2_SECURITY_GROUPS = "EC2SecurityGroups";
++const char * const ATTR_EC2_KEY_PAIR_FILE = "EC2KeyPairFile";
++const char * const ATTR_EC2_USER_DATA = "EC2UserData";
++const char * const ATTR_EC2_USER_DATA_FILE = "EC2UserDataFile";
++const char * const ATTR_EC2_REMOTE_VM_NAME = "EC2RemoteVirtualMachineName";
++const char * const ATTR_EC2_INSTANCE_TYPE = "EC2InstanceType";
++const char * const ATTR_EC2_INSTANCE_NAME = "EC2InstanceName";
++const char * const ATTR_EC2_ELASTIC_IP = "EC2ElasticIp";
++//************* End of changes for EC2 Jobs *****************//
+ 
+ //************* Added for Lease Manager *******************//
+ const char * const ATTR_LEASE_MANAGER_IP_ADDR = "LeaseManagerIpAddr";
+@@ -904,6 +949,9 @@ const char * const ATTR_HASH_NAME = "HashName";
+ const char * const ATTR_AUTHENTICATED_IDENTITY = "AuthenticatedIdentity";
+ const char * const ATTR_DELEGATE_JOB_GSI_CREDENTIALS_LIFETIME = "DelegateJobGSICredentialsLifetime";
+ 
++//.NET attributes
++const char * const ATTR_DOTNET_VERSIONS = "DotNetVersions";
++
+ const char * const ATTR_TRANSFER_QUEUE_NUM_UPLOADING = "TransferQueueNumUploading";
+ const char * const ATTR_TRANSFER_QUEUE_NUM_DOWNLOADING = "TransferQueueNumDownloading";
+ const char * const ATTR_TRANSFER_QUEUE_MAX_UPLOADING = "TransferQueueMaxUploading";
+@@ -912,3 +960,4 @@ const char * const ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_UPLOAD = "TransferQueueNum
+ const char * const ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_DOWNLOAD = "TransferQueueNumWaitingToDownload";
+ const char * const ATTR_TRANSFER_QUEUE_UPLOAD_WAIT_TIME = "TransferQueueUploadWaitTime";
+ const char * const ATTR_TRANSFER_QUEUE_DOWNLOAD_WAIT_TIME = "TransferQueueDownloadWaitTime";
++
+diff --git a/src/condor_utils/condor_config.cpp b/src/condor_utils/condor_config.cpp
+index 7517e66..13d0319 100644
+--- a/src/condor_utils/condor_config.cpp
++++ b/src/condor_utils/condor_config.cpp
+@@ -69,7 +69,6 @@
+ #	include <locale.h>
+ #endif
+ #include "directory.h"			// for StatInfo
+-#include "condor_scanner.h"		// for MAXVARNAME, etc
+ #include "condor_distribution.h"
+ #include "condor_environ.h"
+ #include "setenv.h"
+diff --git a/src/condor_utils/condor_event.h b/src/condor_utils/condor_event.h
+index 285c4d9..f9c142f 100644
+--- a/src/condor_utils/condor_event.h
++++ b/src/condor_utils/condor_event.h
+@@ -36,14 +36,10 @@
+ 	bringing in the full classad.h header file structure causing complications
+ 	to third parties using this API. -psilord 02/21/03
+ */
+-#ifdef WANT_OLD_CLASSADS
+-class ClassAd;
+-#else
+ namespace compat_classad {
+   class ClassAd;
+ }
+ using namespace compat_classad;
+-#endif
+ 
+ 
+ 
+diff --git a/src/condor_utils/condor_q.cpp b/src/condor_utils/condor_q.cpp
+index babf543..f13d0b9 100644
+--- a/src/condor_utils/condor_q.cpp
++++ b/src/condor_utils/condor_q.cpp
+@@ -26,7 +26,7 @@
+ #include "format_time.h"
+ #include "condor_config.h"
+ #include "CondorError.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "quill_enums.h"
+ 
+ #ifdef HAVE_EXT_POSTGRESQL
+@@ -538,17 +538,21 @@ CondorQ::getFilterAndProcessAds( const char *constraint,
+ 	ClassAd *ad;
+ 
+ 	if (useAll) {
+-	// The fast case with the new protocol
+-	ClassAdList list;
+-	char *attrs_str = attrs.print_to_delimed_string();
+-	GetAllJobsByConstraint(constraint, attrs_str, list);
+-	free(attrs_str);
+-	list.Rewind();
+-	while ((ad = list.Next())) {
+-		if ( ( *process_func )( ad ) ) {
+-			//delete(ad);
++			// The fast case with the new protocol
++		char *attrs_str = attrs.print_to_delimed_string();
++		GetAllJobsByConstraint_Start(constraint, attrs_str);
++		free(attrs_str);
++
++		while( true ) {
++			ClassAd *ad = new ClassAd;
++			if( GetAllJobsByConstraint_Next( *ad ) != 0 ) {
++				delete ad;
++				break;
++			}
++			if ( ( *process_func )( ad ) ) {
++				delete(ad);
++			}
+ 		}
+-	}
+ 	} else {
+ 
+ 	// slow case, using old protocol
+diff --git a/src/condor_utils/condor_query.cpp b/src/condor_utils/condor_query.cpp
+index e4427b9..c7f4cbd 100644
+--- a/src/condor_utils/condor_query.cpp
++++ b/src/condor_utils/condor_query.cpp
+@@ -24,10 +24,9 @@
+ #include "condor_config.h"
+ #include "condor_network.h"
+ #include "condor_io.h"
+-#include "condor_parser.h"
+ #include "condor_adtypes.h"
+ #include "condor_debug.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "internet.h"
+ #include "daemon.h"
+ #include "dc_collector.h"
+diff --git a/src/condor_utils/condor_xml_classads.cpp b/src/condor_utils/condor_xml_classads.cpp
+index 071808d..56ac6fc 100644
+--- a/src/condor_utils/condor_xml_classads.cpp
++++ b/src/condor_utils/condor_xml_classads.cpp
+@@ -657,77 +657,6 @@ ClassAdXMLUnparser::Unparse(ClassAd *classad, MyString &buffer, StringList *attr
+ void 
+ ClassAdXMLUnparser::Unparse(const char *name, ExprTree *expression, MyString &buffer)
+ {
+-#ifdef WANT_OLD_CLASSADS
+-	add_attribute_start_tag(buffer, name);
+-			
+-	MyString  number_string;
+-	char      *expr_string;
+-	int       int_number;
+-	double    double_number;
+-	MyString  fixed_string;
+-
+-	switch (expression->MyType()) {
+-	case LX_INTEGER:
+-		int_number = ((IntegerBase *)expression)->Value();
+-		if (expression->unit == 'k') {
+-			int_number *= 1024;
+-		}
+-		number_string.sprintf("%d", int_number);
+-		add_tag(buffer, tag_Integer, true);
+-		buffer += number_string;
+-		add_tag(buffer, tag_Integer, false);
+-		break;
+-	case LX_FLOAT:
+-		double_number = ((FloatBase *)expression)->Value();
+-		if (expression->unit == 'k') {
+-			double_number *= 1024;
+-		}
+-		number_string.sprintf("%1.15E", double_number);
+-		add_tag(buffer, tag_Real, true);
+-		buffer += number_string;
+-		add_tag(buffer, tag_Real, false);
+-		break;
+-	case LX_STRING:
+-		add_tag(buffer, tag_String, true);
+-		fix_characters(((StringBase *)expression)->Value(), 
+-					   fixed_string);
+-		buffer += fixed_string;
+-		fixed_string = "";
+-		add_tag(buffer, tag_String, false);
+-		break;
+-	case LX_TIME:
+-		add_tag(buffer, tag_Time, true);
+-		fix_characters(((ISOTimeBase *)expression)->Value(), 
+-					   fixed_string);
+-		buffer += fixed_string;
+-		fixed_string = "";
+-		add_tag(buffer, tag_Time, false);
+-		break;
+-	case LX_BOOL:
+-		add_bool_start_tag(buffer, ((BooleanBase *)expression)->Value());
+-		break;
+-	case LX_UNDEFINED:
+-		add_empty_tag(buffer, tag_Undefined);
+-		break;
+-	case LX_ERROR:
+-		add_empty_tag(buffer, tag_Error);
+-		break;
+-	default:
+-		add_tag(buffer, tag_Expr, true);
+-		expr_string = strdup( ExprTreeToString( expression ) );
+-		fix_characters(expr_string, fixed_string);
+-		free(expr_string);
+-		buffer += fixed_string;
+-		fixed_string = "";
+-		add_tag(buffer, tag_Expr, false);
+-		break;
+-	}
+-	add_tag(buffer, tag_Attribute, false);
+-	if (!_use_compact_spacing) {
+-		buffer += "\n";
+-	}
+-	return;
+-#else
+ 	add_attribute_start_tag(buffer, name);
+ 			
+ 	MyString  number_string;
+@@ -785,7 +714,6 @@ ClassAdXMLUnparser::Unparse(const char *name, ExprTree *expression, MyString &bu
+ 		buffer += "\n";
+ 	}
+ 	return;
+-#endif
+ }
+ 	
+ /**************************************************************************
+diff --git a/src/condor_utils/config.cpp b/src/condor_utils/config.cpp
+index abd4ef0..c6f2769 100644
+--- a/src/condor_utils/config.cpp
++++ b/src/condor_utils/config.cpp
+@@ -638,7 +638,7 @@ expand_macro( const char *value,
+ 	while( !all_done ) {		// loop until all done expanding
+ 		all_done = true;
+ 
+-		if( !self && get_special_var("$ENV",true,tmp, &left, &name, &right) ) 
++		if( !self && find_special_config_macro("$ENV",true,tmp, &left, &name, &right) ) 
+ 		{
+ 			all_done = false;
+ 			tvalue = getenv(name);
+@@ -653,7 +653,7 @@ expand_macro( const char *value,
+ 			tmp = rval;
+ 		}
+ 
+-		if( !self && get_special_var("$RANDOM_CHOICE",false,tmp, &left, &name, 
++		if( !self && find_special_config_macro("$RANDOM_CHOICE",false,tmp, &left, &name, 
+ 			&right) ) 
+ 		{
+ 			all_done = false;
+@@ -679,7 +679,7 @@ expand_macro( const char *value,
+ 			tmp = rval;
+ 		}
+ 
+-		if( !self && get_special_var("$RANDOM_INTEGER",false,tmp, &left, &name, 
++		if( !self && find_special_config_macro("$RANDOM_INTEGER",false,tmp, &left, &name, 
+ 			&right) ) 
+ 		{
+ 			all_done = false;
+@@ -730,7 +730,7 @@ expand_macro( const char *value,
+ 			tmp = rval;
+ 		}
+ 
+-		if( get_var(tmp, &left, &name, &right, self) ) {
++		if( find_config_macro(tmp, &left, &name, &right, self) ) {
+ 			all_done = false;
+ 			tvalue = lookup_macro( name, table, table_size );
+ 
+@@ -754,7 +754,7 @@ expand_macro( const char *value,
+ 
+ 	// Now, deal with the special $(DOLLAR) macro.
+ 	if (!self)
+-	while( get_var(tmp, &left, &name, &right, DOLLAR_ID) ) {
++	while( find_config_macro(tmp, &left, &name, &right, DOLLAR_ID) ) {
+ 		rval = (char *)MALLOC( (unsigned)(strlen(left) + 1 +
+ 										  strlen(right) + 1));
+ 		(void)sprintf( rval, "%s$%s", left, right );
+@@ -858,10 +858,10 @@ hash_iter_delete(HASHITER * iter)
+ 
+ 
+ /*
+-** Same as get_var() below, but finds special references like $ENV().
++** Same as find_config_macro() below, but finds special references like $ENV().
+ */
+ int
+-get_special_var( const char *prefix, bool only_id_chars, register char *value, 
++find_special_config_macro( const char *prefix, bool only_id_chars, register char *value, 
+ 		register char **leftp, register char **namep, register char **rightp )
+ {
+ 	char *left, *left_end, *name, *right;
+@@ -922,11 +922,9 @@ tryagain:
+ 	return( 1 );
+ }
+ 
+-/*
+-** If self is not NULL, then only look for the parameter specified by self.
+-*/
++/* Docs are in /src/condor_includes/condor_config.h */
+ int
+-get_var( register char *value, register char **leftp, 
++find_config_macro( register char *value, register char **leftp, 
+ 		 register char **namep, register char **rightp,
+ 		 const char *self,
+ 		 bool getdollardollar, int search_pos)
+@@ -979,7 +977,10 @@ tryagain:
+ 				// the terminating pattern, this $$ match fails, try again.
+ 
+ 				char * end_marker = strstr(value, "])");
+-				if( end_marker == NULL ) { goto tryagain; }
++				if( end_marker == NULL ) {
++					tvalue = value;
++					goto tryagain;
++				}
+ 
+ 				left_end = value - 2;
+ 				name = ++value;
+@@ -1026,7 +1027,7 @@ tryagain:
+ 							// $(DOLLAR) has special meaning; it is
+ 							// set to "$" and is _not_ recursively
+ 							// expanded.  To implement this, we have
+-							// get_var() ignore $(DOLLAR) and we then
++							// find_config_macro() ignore $(DOLLAR) and we then
+ 							// handle it in expand_macro().
+ 							// Note that $$(DOLLARDOLLAR) is handled a little
+ 							// differently.  Instead of skipping over it,
+diff --git a/src/condor_utils/cron_job_params.cpp b/src/condor_utils/cron_job_params.cpp
+index 9e19571..1aaad8b 100644
+--- a/src/condor_utils/cron_job_params.cpp
++++ b/src/condor_utils/cron_job_params.cpp
+@@ -140,9 +140,9 @@ CronJobParams::Initialize( void )
+ 
+ 
+ 	// Parse the environment.
+-	if ( !InitEnv( param_args ) ) {
++	if ( !InitEnv( param_env ) ) {
+ 		dprintf( D_ALWAYS,
+-				 "CronJobParams: Failed to initialize arguments for job %s\n",
++				 "CronJobParams: Failed to initialize environment for job %s\n",
+ 				 GetName() );
+ 		return false;
+ 	}
+diff --git a/src/condor_utils/dbms_utils.h b/src/condor_utils/dbms_utils.h
+index 8d5bdb0..8438d98 100644
+--- a/src/condor_utils/dbms_utils.h
++++ b/src/condor_utils/dbms_utils.h
+@@ -23,7 +23,7 @@
+ #include "quill_enums.h"
+ #include "MyString.h"
+ #include "jobqueuedatabase.h"
+-#include "condor_attrlist.h"
++#include "condor_classad.h"
+ 
+ #if defined( __cplusplus )
+ extern "C" {
+diff --git a/src/condor_utils/directory.WINDOWS.cpp b/src/condor_utils/directory.WINDOWS.cpp
+index e3e7058..6c9a54a 100644
+--- a/src/condor_utils/directory.WINDOWS.cpp
++++ b/src/condor_utils/directory.WINDOWS.cpp
+@@ -2300,7 +2300,7 @@ CreateUserDirectory ( HANDLE user_token, PCSTR directory ) {
+         }
+ 
+         if ( acl ) {
+-             GlobalFree ( acl );
++             delete[] acl;
+         }
+ 
+     }
+diff --git a/src/condor_utils/directory.cpp b/src/condor_utils/directory.cpp
+index f07e538..c6b08f9 100644
+--- a/src/condor_utils/directory.cpp
++++ b/src/condor_utils/directory.cpp
+@@ -50,6 +50,20 @@
+ 	return i;
+ // -----------------------------------------------
+ 
++DeleteFileLater::DeleteFileLater (const char * _name)
++{
++    filename = _name?strdup(_name):NULL;
++}
++
++DeleteFileLater::~DeleteFileLater ()
++{
++	if (filename) {
++        if (unlink(filename)) {  // conditional to defeat prefast warning.
++            dprintf(D_ALWAYS, "DeleteFileLater of %s failed err=%d", filename, errno);
++        }
++		free (filename);
++	}
++}
+ 
+ 
+ #ifndef WIN32
+@@ -616,8 +630,7 @@ Directory::setOwnerPriv( const char* path, si_error_t &err)
+ 			if (err == SINoFile) {
+ 				dprintf(D_FULLDEBUG, "Directory::setOwnerPriv() -- path %s does not exist (yet).\n", path);
+ 			} else {
+-				dprintf( D_ALWAYS, "Directory::setOwnerPriv() -- failed to "
+-					 "find owner of %s\n", path );
++				dprintf( D_ALWAYS, "Directory::setOwnerPriv() -- failed to find owner of %s\n", path );
+ 			}
+ 			return PRIV_UNKNOWN;
+ 		}
+diff --git a/src/condor_utils/directory.h b/src/condor_utils/directory.h
+index ddc46f3..8114ad2 100644
+--- a/src/condor_utils/directory.h
++++ b/src/condor_utils/directory.h
+@@ -255,16 +255,8 @@ private:
+ // when the class instance is deleted
+ class DeleteFileLater {
+  public:
+-	DeleteFileLater (const char * _name) {
+-		filename = _name?strdup(_name):NULL;
+-	}
+-
+-	~DeleteFileLater () {
+-		if (filename) {
+-			unlink(filename);
+-			free (filename);
+-		}
+-	}
++	DeleteFileLater (const char * _name);
++	~DeleteFileLater ();
+  protected:
+ 	char * filename;
+ };
+diff --git a/src/condor_utils/dprintf.cpp b/src/condor_utils/dprintf.cpp
+index fa9749e..a1bc148 100644
+--- a/src/condor_utils/dprintf.cpp
++++ b/src/condor_utils/dprintf.cpp
+@@ -1328,6 +1328,11 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
+ 	char *ptr = NULL;
+ 	char mutex_name[MAX_PATH];
+ 
++		// If we're trying to lock NUL, just return success early
++	if (strcasecmp(DebugLock, "NUL") == 0) {
++		return 0;
++	}
++
+ 	if ( use_kernel_mutex == FALSE ) {
+ 			// use a filesystem lock
+ 		return lock_file_plain(fd,type,do_block);
+@@ -1341,10 +1346,6 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
+ 		// starving to get the lock.  The Win32 mutex object,
+ 		// on the other hand, is FIFO --- thus starvation is avoided.
+ 
+-		// If we're trying to lock NUL, just return success early
+-	if (strcasecmp(DebugLock, "NUL") == 0) {
+-		return 0;
+-	}
+ 
+ 		// first, open a handle to the mutex if we haven't already
+ 	if ( debug_win32_mutex == NULL && DebugLock ) {
+diff --git a/src/condor_utils/dynuser.h b/src/condor_utils/dynuser.h
+index 751d7c8..abb7bd2 100644
+--- a/src/condor_utils/dynuser.h
++++ b/src/condor_utils/dynuser.h
+@@ -32,7 +32,7 @@ const int max_domain_length = 100;
+ 
+ #ifndef STATUS_SUCCESS 
+ #define STATUS_SUCCESS              ((NTSTATUS)0x00000000L) 
+-#define STATUS_INVALID_PARAMETER    ((NTSTATUS)0xC000000DL) 
++//#define STATUS_INVALID_PARAMETER    ((NTSTATUS)0xC000000DL) 
+ #endif 
+ 
+ #define ACCOUNT_PREFIX			"condor-run-"
+diff --git a/src/condor_utils/env.cpp b/src/condor_utils/env.cpp
+index 1f2e1de..a4e13f3 100644
+--- a/src/condor_utils/env.cpp
++++ b/src/condor_utils/env.cpp
+@@ -19,7 +19,7 @@
+ 
+ 
+ #include "condor_common.h"
+-#include "condor_attrlist.h"
++#include "condor_classad.h"
+ #include "condor_string.h"
+ #include "condor_attributes.h"
+ 
+diff --git a/src/condor_utils/file_lock.cpp b/src/condor_utils/file_lock.cpp
+index d2ac4ea..b2a013e 100644
+--- a/src/condor_utils/file_lock.cpp
++++ b/src/condor_utils/file_lock.cpp
+@@ -513,6 +513,7 @@ FileLock::obtain( LOCK_TYPE t )
+ // their current position.  The lesson here is don't use fseeks and lseeks
+ // interchangeably...
+ 	int		status = -1;
++	int saved_errno;
+ 
+ 	if ( m_use_kernel_mutex == -1 ) {
+ 		m_use_kernel_mutex = param_boolean_int("FILE_LOCK_VIA_MUTEX", TRUE);
+@@ -538,6 +539,7 @@ FileLock::obtain( LOCK_TYPE t )
+ 			// This will help narrow down where the delay is coming from.
+ 		time_t before = time(NULL);
+ 		status = lock_file( m_fd, t, m_blocking );
++		saved_errno = errno;
+ 		time_t after = time(NULL);
+ 		if ( (after - before) > 5 ) {
+ 			dprintf( D_FULLDEBUG,
+@@ -594,7 +596,7 @@ FileLock::obtain( LOCK_TYPE t )
+ 	}
+ 	if ( status != 0 ) {
+ 		dprintf( D_ALWAYS, "FileLock::obtain(%d) failed - errno %d (%s)\n",
+-	                t, errno, strerror(errno) );
++	                t, saved_errno, strerror(saved_errno) );
+ 	}
+ 	else {
+ 		UtcTime	now( true );
+@@ -688,8 +690,8 @@ FileLock::CreateHashName(const char *orig, bool useDefault)
+ 	char *temp_filename;
+ 	int c;
+ 	
+-#if defined(_POSIX_PATH_MAX) && !defined(WIN32)
+-	char *buffer = new char[_POSIX_PATH_MAX];
++#if defined(PATH_MAX) && !defined(WIN32)
++	char *buffer = new char[PATH_MAX];
+ 	temp_filename = realpath(orig, buffer);
+ 	if (temp_filename == NULL) {
+ 		temp_filename = new char[strlen(orig)+1];
+diff --git a/src/condor_utils/file_sql.h b/src/condor_utils/file_sql.h
+index ce5f9cd..cb0419c 100644
+--- a/src/condor_utils/file_sql.h
++++ b/src/condor_utils/file_sql.h
+@@ -21,7 +21,7 @@
+ #define FILESQL_H
+ 
+ #include "condor_common.h"
+-#include "condor_attrlist.h"
++#include "condor_classad.h"
+ 
+ class FileLock;
+ class MyString;
+diff --git a/src/condor_utils/file_transfer_db.h b/src/condor_utils/file_transfer_db.h
+index 6cac1b3..69ac2c9 100644
+--- a/src/condor_utils/file_transfer_db.h
++++ b/src/condor_utils/file_transfer_db.h
+@@ -21,7 +21,6 @@
+ #define FILE_TRANSFER_DB_H
+ 
+ #include "condor_classad.h"
+-#include "condor_attrlist.h"
+ #include "reli_sock.h"
+ 
+ typedef struct 
+diff --git a/src/condor_utils/generic_query.cpp b/src/condor_utils/generic_query.cpp
+index 9e050bd..43f6713 100644
+--- a/src/condor_utils/generic_query.cpp
++++ b/src/condor_utils/generic_query.cpp
+@@ -20,7 +20,7 @@
+ #include "condor_common.h"
+ #include "generic_query.h"
+ #include "condor_attributes.h"
+-#include "condor_parser.h"
++#include "condor_classad.h"
+ #include "MyString.h"
+ 
+ static char *new_strdup (const char *);
+diff --git a/src/condor_utils/getwd.unix.cpp b/src/condor_utils/getwd.unix.cpp
+deleted file mode 100644
+index 3ec1c1b..0000000
+--- a/src/condor_utils/getwd.unix.cpp
++++ /dev/null
+@@ -1,34 +0,0 @@
+-/***************************************************************
+- *
+- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
+- * University of Wisconsin-Madison, WI.
+- * 
+- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+- * 
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- *
+- ***************************************************************/
+-
+-
+-#include "config.h"
+-
+-#ifndef HAVE_GETWD
+-#include <sys/param.h>
+-
+-/*
+-** Compatibility routine for systems which use getcwd() instead.
+-*/
+-char * getwd(char	*path)
+-{
+-	return ((char *) getcwd( path, MAXPATHLEN ));
+-}
+-
+-#endif
+diff --git a/src/condor_utils/globus_utils.cpp b/src/condor_utils/globus_utils.cpp
+index 314af5c..3b2fcd9 100644
+--- a/src/condor_utils/globus_utils.cpp
++++ b/src/condor_utils/globus_utils.cpp
+@@ -25,10 +25,14 @@
+ 
+ #include "globus_utils.h"
+ 
++#if defined(HAVE_EXT_GLOBUS)
++// Note: this is from OpenSSL, but should be present if Globus is.
++// Only used if HAVE_EXT_GLOBUS.
++#     include "openssl/x509v3.h"
++#endif
+ 
+ #define DEFAULT_MIN_TIME_LEFT 8*60*60;
+ 
+-
+ static const char * _globus_error_message = NULL;
+ 
+ #define GRAM_STATUS_STR_LEN		8
+@@ -456,7 +460,6 @@ extract_VOMS_info_from_file( const char* proxy_file, int verify_type, char **von
+ 
+ 	globus_gsi_cred_handle_t         handle       = NULL;
+ 	globus_gsi_cred_handle_attrs_t   handle_attrs = NULL;
+-	char *subject_name = NULL;
+ 	char *my_proxy_file = NULL;
+ 	int error = 0;
+ 
+@@ -514,6 +517,134 @@ extract_VOMS_info_from_file( const char* proxy_file, int verify_type, char **von
+ }
+ #endif /* defined(HAVE_EXT_GLOBUS) */
+ 
++/* Return the email of a given proxy cert. 
++  On error, return NULL.
++  On success, return a pointer to a null-terminated string.
++  IT IS THE CALLER'S RESPONSBILITY TO DE-ALLOCATE THE STIRNG
++  WITH free().  
++ */             
++char *
++x509_proxy_email( const char *proxy_file )
++{
++#if !defined(HAVE_EXT_GLOBUS)
++	(void) proxy_file;
++	set_error_string( "This version of Condor doesn't support X509 credentials!" );
++	return NULL;
++#else
++
++	globus_gsi_cred_handle_t         handle       = NULL;
++	globus_gsi_cred_handle_attrs_t   handle_attrs = NULL;
++	X509_NAME *email_orig = NULL;
++        STACK_OF(X509) *cert_chain = NULL;
++	GENERAL_NAME *gen;
++	GENERAL_NAMES *gens;
++        X509 *cert = NULL;
++	char *email = NULL, *email2 = NULL;
++	char *my_proxy_file = NULL;
++	int i, j;
++
++	if ( activate_globus_gsi() != 0 ) {
++		return NULL;
++	}
++
++	if (globus_gsi_cred_handle_attrs_init(&handle_attrs)) {
++		set_error_string( "problem during internal initialization1" );
++		goto cleanup;
++	}
++
++	if (globus_gsi_cred_handle_init(&handle, handle_attrs)) {
++		set_error_string( "problem during internal initialization2" );
++		goto cleanup;
++	}
++
++	/* Check for proxy file */
++	if (proxy_file == NULL) {
++		my_proxy_file = get_x509_proxy_filename();
++		if (my_proxy_file == NULL) {
++			goto cleanup;
++		}
++		proxy_file = my_proxy_file;
++	}
++
++	// We should have a proxy file, now, try to read it
++	if (globus_gsi_cred_read_proxy(handle, proxy_file)) {
++		set_error_string( "unable to read proxy file" );
++		goto cleanup;
++	}
++
++	if (globus_gsi_cred_get_cert_chain(handle, &cert_chain)) {
++		cert = NULL;
++		set_error_string( "unable to find certificate in proxy" );
++		goto cleanup;
++	}
++
++	for(i = 0; i < sk_X509_num(cert_chain); ++i) {
++		if((cert = X509_dup(sk_X509_value(cert_chain, i))) == NULL) {
++			continue;
++		}
++		if ((email_orig = (X509_NAME *)X509_get_ext_d2i(cert, NID_pkcs9_emailAddress, 0, 0)) != NULL) {
++			if ((email2 = X509_NAME_oneline(email_orig, NULL, 0)) == NULL) {
++				continue;
++			} else {
++				// Return something that we can free().
++				email = strdup(email2);
++				OPENSSL_free(email2);
++				break;
++			}
++		}
++		gens = (GENERAL_NAMES *)X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0);
++		if (gens) {
++			for (j = 0; j < sk_GENERAL_NAME_num(gens); ++i) {
++				if ((gen = sk_GENERAL_NAME_value(gens, i)) == NULL) {
++					continue;
++				}
++				if (gen->type != GEN_EMAIL) {
++					continue;
++				}
++				ASN1_IA5STRING *email_ia5 = gen->d.ia5;
++				// Sanity checks.
++				if (email_ia5->type != V_ASN1_IA5STRING) goto cleanup;
++				if (!email_ia5->data || !email_ia5->length) goto cleanup;
++				email2 = BUF_strdup((char *)email_ia5->data);
++				// We want to return something we can free(), so make another copy.
++				if (email2) {
++					email = strdup(email2);
++					OPENSSL_free(email2);
++				}
++				break;
++			}
++		}
++	}
++
++	if (email == NULL) {
++		set_error_string( "unable to extract email" );
++		goto cleanup;
++	}
++
++ cleanup:
++	if (my_proxy_file) {
++		free(my_proxy_file);
++	}
++
++	if (cert_chain) {
++		sk_X509_free(cert_chain);
++	}
++
++	if (handle_attrs) {
++		globus_gsi_cred_handle_attrs_destroy(handle_attrs);
++	}
++
++	if (handle) {
++		globus_gsi_cred_handle_destroy(handle);
++	}
++
++	if (email_orig) {
++		X509_NAME_free(email_orig);
++	}
++
++	return email;
++#endif /* !defined(HAVE_EXT_GLOBUS) */
++}
+ 
+ /* Return the subject name of a given proxy cert. 
+   On error, return NULL.
+@@ -534,7 +665,6 @@ x509_proxy_subject_name( const char *proxy_file )
+ 	globus_gsi_cred_handle_attrs_t   handle_attrs = NULL;
+ 	char *subject_name = NULL;
+ 	char *my_proxy_file = NULL;
+-	int error = 0;
+ 
+ 	if ( activate_globus_gsi() != 0 ) {
+ 		return NULL;
+@@ -585,7 +715,7 @@ x509_proxy_subject_name( const char *proxy_file )
+ 
+ 	return subject_name;
+ 
+-#endif /* !defined(GSS_AUTHENTICATION) */
++#endif /* !defined(HAVE_EXT_GLOBUS) */
+ }
+ 
+ 
+@@ -612,7 +742,6 @@ x509_proxy_identity_name( const char *proxy_file )
+ 	globus_gsi_cred_handle_attrs_t   handle_attrs = NULL;
+ 	char *subject_name = NULL;
+ 	char *my_proxy_file = NULL;
+-	int error = 0;
+ 
+ 	if ( activate_globus_gsi() != 0 ) {
+ 		return NULL;
+diff --git a/src/condor_utils/history_utils.h b/src/condor_utils/history_utils.h
+index 0196175..41800c3 100644
+--- a/src/condor_utils/history_utils.h
++++ b/src/condor_utils/history_utils.h
+@@ -22,7 +22,7 @@
+ #define _HISTORY_UTILS_H_
+ 
+ #include "condor_common.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ #include "proc.h"
+ 
+ //------------------------------------------------------------------------
+diff --git a/src/condor_utils/historysnapshot.cpp b/src/condor_utils/historysnapshot.cpp
+index c94ffb4..a5eb738 100644
+--- a/src/condor_utils/historysnapshot.cpp
++++ b/src/condor_utils/historysnapshot.cpp
+@@ -24,7 +24,7 @@
+ #include "pgsqldatabase.h"
+ #include "historysnapshot.h"
+ #include "quill_enums.h"
+-#include "condor_classad_util.h"
++#include "condor_classad.h"
+ 
+ #ifdef HAVE_EXT_POSTGRESQL
+ 
+diff --git a/src/condor_utils/libcondorapi_stubs.cpp b/src/condor_utils/libcondorapi_stubs.cpp
+index a570671..0b87a9f 100644
+--- a/src/condor_utils/libcondorapi_stubs.cpp
++++ b/src/condor_utils/libcondorapi_stubs.cpp
+@@ -238,7 +238,6 @@ Stream::~Stream(){};
+ 	int Stream::code(struct utimbuf &){ return not_impl(); }
+ 	int Stream::code(struct rlimit &){ return not_impl(); }
+ 	int Stream::code_array(gid_t *&, int &){ return not_impl(); }
+-	int Stream::code(struct utsname &){ return not_impl(); }
+ #endif // !defined(WIN32)
+ #if HAS_64BIT_STRUCTS
+ 	int Stream::code(struct stat64 &){ return not_impl(); }
+diff --git a/src/condor_utils/lock_file.unix.cpp b/src/condor_utils/lock_file.unix.cpp
+index e38291a..d2c7b4a 100644
+--- a/src/condor_utils/lock_file.unix.cpp
++++ b/src/condor_utils/lock_file.unix.cpp
+@@ -21,6 +21,16 @@
+ #include "condor_config.h"
+ #include "condor_debug.h"
+ #include "file_lock.h"
++#include "condor_random_num.h"
++
++/* Declare some static variables here that are initialized by lock_file() and
++ * used by lock_file_plain(). We do this song and dance because we want to 
++ * initialize these variables by invoking various Condor library functions,
++ * like our randomization functions, and invoking those functions from
++ * lock_file_plain() is not permitted due to deadlock and/or threading reasons
++ */
++static unsigned int _lock_file_usleep_time = 0;
++static unsigned int _lock_file_num_retries = 0;
+ 
+ /*
+   Lock a file. This version is used for all unices. The windows version
+@@ -35,6 +45,8 @@ lock_file_plain( int fd, LOCK_TYPE type, int do_block )
+ {
+ 	struct flock	f;
+ 	int				cmd;
++	int rc, saved_errno;
++	unsigned int num_retries = 0;
+ 
+ 	if( do_block ) {
+ 		cmd = F_SETLKW;		/* blocking */
+@@ -64,33 +76,95 @@ lock_file_plain( int fd, LOCK_TYPE type, int do_block )
+ 		return -1;
+ 	}
+ 
+-		/* be signal safe */
+-	while( fcntl(fd,cmd,&f) < 0 ) {
+-		switch (errno) {
++		/* Call fcntl */
++	rc =  fcntl(fd,cmd,&f);
++	saved_errno = errno;
++
++		/* Deal with EINTR by retrying if in non-blocking mode */
++	while ( !do_block && rc < 0  && saved_errno == EINTR ) 
++	{
++		rc =  fcntl(fd,cmd,&f);
++		saved_errno = errno;
++	}
++
++		/* Deal w/ temporary errors by retrying if in blocking mode */
++	while ( do_block && rc < 0 && num_retries < _lock_file_num_retries ) 
++	{
++		struct timeval timer;
++		timer.tv_sec = 0;
++		timer.tv_usec = _lock_file_usleep_time;
++		switch (saved_errno) {
++				// for these errors, just retry the system call 
++				// immediately, don't increment number of retries.
+ 			case EINTR:
+-				// this just means we were interrupted, not
+-				// necessarily that we failed.
+ 				break;
++
++				// for these errors, retry the system call a limited
++				// number of times, and after waiting a 
++				// fraction of a second.
++			case ENOLCK:
++			case EACCES:
++			case EAGAIN:
++				num_retries++;
++				// do a platform independent usleep via select()
++				select(0,NULL,NULL,NULL,&timer);
++				break;
++
++				// anything else is not an errno indicative
++				// of a temporary condition, so break out of the 
++				// while loop.
+ 			default:
+-				return -1;
++				num_retries = _lock_file_num_retries;
++				continue;
+ 		}
++		
++		rc =  fcntl(fd,cmd,&f);
++		saved_errno = errno;
++	}
++
++	if ( rc < 0 ) {
++		errno = saved_errno;
++		return -1;
++	} else {
++		return 0;
+ 	}
+-	return 0;
+ }
+ 
+ int
+ lock_file( int fd, LOCK_TYPE type, int do_block )
+ {
+ 	int rc;
++	int saved_errno;
++	static bool initialized = false;
++
++	if ( !initialized ) {
++		initialized = true;
++		char *subsys = param("SUBSYSTEM");
++		if ( subsys && strcmp(subsys,"SCHEDD")==0 ) {
++			// If we are the schedd, retry early and often.
++			// usleep time averages to 1/20 of a second, and
++			// keep trying on average for 20 seconds.
++			_lock_file_usleep_time = get_random_uint() % 100000;
++			_lock_file_num_retries = 20 * 20;
++		} else {
++			// If we are not the schedd (eg we are the shadow), we
++			// can be less agressive. usleep an average of a second, try
++			// for 5 minutes.
++			_lock_file_usleep_time = get_random_uint() % 2000000;
++			_lock_file_num_retries = 60 * 5;
++		}
++		if (subsys) free(subsys);
++	}
+ 
+ 	rc = lock_file_plain( fd, type, do_block );
++	saved_errno = errno;
+ 
+ 	/* now, fcntl should work accross nfs.  but, due to bugs in some
+ 	   implementations (*cough* linux *cough*) it sometimes fails with
+ 	   errno 37 (ENOLCK).  if this happens we check the config to see
+ 	   if we should report this as an error.   -zmiller  07/15/02
+ 	   */
+-	if ( rc == -1 && errno == ENOLCK ) {
++	if ( rc == -1 && saved_errno == ENOLCK ) {
+ 		char* p = param("IGNORE_NFS_LOCK_ERRORS");
+ 		char  val = 'N';
+ 
+@@ -103,11 +177,20 @@ lock_file( int fd, LOCK_TYPE type, int do_block )
+ 				// pretend there was no error.
+ 			dprintf ( D_FULLDEBUG, "Ignoring error ENOLCK on fd %i\n", fd );
+ 			return 0;
+-		} else {
+-			errno = ENOLCK;
+-			return rc;
+ 		}
+ 	}
+ 
++	if ( rc == -1 )
++	{
++		dprintf( D_ALWAYS, "lock_file returning ERROR, errno=%d (%s)\n",
++				saved_errno, strerror(saved_errno) );
++#if 0  // in v7.6.0, we cannot risk EXCEPTing, but do so in v7.7.0
++		if (saved_errno == EDEADLK || saved_errno == EFAULT) {
++			EXCEPT("lock_file failed with errno %d, should never happen!",saved_errno);
++		}
++#endif
++		errno = saved_errno;
++	}
++
+ 	return rc;
+ }
+diff --git a/src/condor_utils/named_classad.cpp b/src/condor_utils/named_classad.cpp
+index da0ab96..d624b3d 100644
+--- a/src/condor_utils/named_classad.cpp
++++ b/src/condor_utils/named_classad.cpp
+@@ -22,7 +22,6 @@
+ #include "condor_debug.h"
+ #include "classad_merge.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ #include "named_classad.h"
+ 
+ // Instantiate the Named Class Ad list
+diff --git a/src/condor_utils/named_classad_list.cpp b/src/condor_utils/named_classad_list.cpp
+index b59a107..8099d04 100644
+--- a/src/condor_utils/named_classad_list.cpp
++++ b/src/condor_utils/named_classad_list.cpp
+@@ -22,7 +22,6 @@
+ #include "condor_debug.h"
+ #include "classad_merge.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ #include "named_classad.h"
+ #include "named_classad_list.h"
+ 
+diff --git a/src/condor_utils/param_info.in b/src/condor_utils/param_info.in
+index 6a0f573..f44956b 100644
+--- a/src/condor_utils/param_info.in
++++ b/src/condor_utils/param_info.in
+@@ -596,7 +596,7 @@ id=559
+ 
+ [GSI_DAEMON_DIRECTORY]
+ aliases=
+-default=/etc/grid-security/
++default=
+ version=0.0.0
+ range=.*
+ state=default
+@@ -3558,7 +3558,7 @@ id=189
+ 
+ [CREATE_CORE_FILES]
+ aliases=
+-default=false
++default=
+ version=0.0.0
+ range=.*
+ state=default
+@@ -9481,7 +9481,7 @@ id=555
+ 
+ [GRIDMAP]
+ aliases=
+-default=$(GSI_DAEMON_DIRECTORY)/grid-mapfile
++default=
+ version=0.0.0
+ range=.*
+ state=default
+@@ -9497,7 +9497,7 @@ id=555
+ 
+ [GSI_DAEMON_TRUSTED_CA_DIR]
+ aliases=
+-default=$(GSI_DAEMON_DIRECTORY)/certificates
++default=
+ version=0.0.0
+ range=.*
+ state=default
+@@ -10136,6 +10136,22 @@ url=
+ tags=
+ id=601
+ 
++[WINDOWED_STAT_WIDTH]
++aliases=
++default=300
++version=0.0.0
++range=1,1000000000
++state=default
++type=int
++is_macro=false
++reconfig=true
++customization=seldom
++friendly_name=Windowed Statistic Width
++usage=
++url=http://cs.wisc.edu/condor/manual/v7.3/3_3Configuration.html#SECTION
++tags=scheduler
++id=602
++
+ [SHADOW_CHECKPROXY_INTERVAL]
+ aliases=
+ default=600
+@@ -10151,3 +10167,20 @@ usage=
+ url=
+ tags=
+ id=601
++
++[SHADOW_RUN_UNKNOWN_USER_JOBS]
++aliases=
++default=false
++version=0.0.0
++range=.*
++state=default
++type=bool
++is_macro=false
++reconfig=false
++customization=seldom
++friendly_name=Shadow Run Unknown User Jobs
++usage=
++url=
++tags=shadow
++id=602
++
+diff --git a/src/condor_utils/perm.WINDOWS.cpp b/src/condor_utils/perm.WINDOWS.cpp
+index fd545ea..4dec99c 100644
+--- a/src/condor_utils/perm.WINDOWS.cpp
++++ b/src/condor_utils/perm.WINDOWS.cpp
+@@ -102,7 +102,7 @@ int perm::get_permissions( const char *file_name, ACCESS_MASK &AccessRights ) {
+ 		&pSD_length_needed			// address of required size of buffer
+ 		) ) {
+ 		dprintf(D_ALWAYS, "perm::GetFileSecurity(%s) failed (err=%d)\n", file_name, GetLastError());
+-		delete pSD;
++		delete[] pSD;
+ 		return -1;
+ 	}
+ 	
+@@ -114,7 +114,7 @@ int perm::get_permissions( const char *file_name, ACCESS_MASK &AccessRights ) {
+ 		&acl_defaulted					// address of flag for default disc. ACL
+ 		) ) {
+ 		dprintf(D_ALWAYS, "perm::GetSecurityDescriptorDacl failed (file=%s err=%d)\n", file_name, GetLastError());
+-		delete pSD;
++		delete[] pSD;
+ 		return -1;
+ 	}
+ 	
+@@ -134,7 +134,7 @@ int perm::get_permissions( const char *file_name, ACCESS_MASK &AccessRights ) {
+ 	// first get the number of ACEs in the ACL
+ 		if (! GetAclInformation( pacl,		// acl to get info from
+ 								acl_info,	// buffer to receive info
+-								24,			// size in bytes of buffer
++								sizeof(acl_info),  // size in bytes of buffer
+ 								AclSizeInformation // class of info to retrieve
+ 								) ) {
+ 			dprintf(D_ALWAYS, "Perm::GetAclInformation failed with error %d\n", GetLastError() );
+@@ -439,10 +439,8 @@ int perm::userInAce ( const LPVOID cur_ace, const char *account, const char *dom
+ 		char* builtin = getBuiltinDomainName();
+ 		char* nt_authority = getNTAuthorityDomainName();
+ 
+-		
+-		int success = GetComputerName( computerName, &nameLength );
+-		
+-		if (! success ) {
++		BOOL bSuccess = GetComputerName( computerName, &nameLength );
++		if ( ! bSuccess ) {
+ 			// this should never happen
+ 			dprintf(D_ALWAYS, "perm::GetComputerName failed: (Err: %d)", GetLastError());
+ 			result = -1; // failure
+diff --git a/src/condor_utils/proc_family_direct.h b/src/condor_utils/proc_family_direct.h
+index fe286e1..30c86f1 100644
+--- a/src/condor_utils/proc_family_direct.h
++++ b/src/condor_utils/proc_family_direct.h
+@@ -56,6 +56,11 @@ public:
+ 	bool track_family_via_allocated_supplementary_group(pid_t, gid_t&) { return false; }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	// This class doesn't support cgroups
++	bool track_family_via_cgroup(pid_t, const char*) { return false; }
++#endif
++
+ 	bool get_usage(pid_t, ProcFamilyUsage&, bool);
+ 
+ 	bool signal_process(pid_t, int);
+diff --git a/src/condor_utils/proc_family_interface.cpp b/src/condor_utils/proc_family_interface.cpp
+index b581109..09a3207 100644
+--- a/src/condor_utils/proc_family_interface.cpp
++++ b/src/condor_utils/proc_family_interface.cpp
+@@ -63,8 +63,9 @@ ProcFamilyInterface* ProcFamilyInterface::create(const char* subsys)
+ 		        "GLEXEC_JOB requires use of ProcD; "
+ 		            "ignoring USE_PROCD setting\n");
+ 		ptr = new ProcFamilyProxy;
+-	}
+-	else {
++	// Note: if CGROUPS is turned on and the startd has USE_PROCD=false,
++	// then we will respect the procd setting and not use cgroups.
++	} else {
+ 
+ 		ptr = new ProcFamilyDirect;
+ 	}
+diff --git a/src/condor_utils/proc_family_interface.h b/src/condor_utils/proc_family_interface.h
+index c6249d6..a3cab5a 100644
+--- a/src/condor_utils/proc_family_interface.h
++++ b/src/condor_utils/proc_family_interface.h
+@@ -54,6 +54,10 @@ public:
+ 	virtual bool track_family_via_allocated_supplementary_group(pid_t, gid_t&) = 0;
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++	virtual bool track_family_via_cgroup(pid_t, const char *) = 0;
++#endif
++
+ 	virtual bool get_usage(pid_t, ProcFamilyUsage&, bool) = 0;
+ 
+ 	virtual bool signal_process(pid_t, int) = 0;
+diff --git a/src/condor_utils/proc_family_proxy.cpp b/src/condor_utils/proc_family_proxy.cpp
+index 0b72cbf..5819a5c 100644
+--- a/src/condor_utils/proc_family_proxy.cpp
++++ b/src/condor_utils/proc_family_proxy.cpp
+@@ -230,6 +230,22 @@ ProcFamilyProxy::track_family_via_allocated_supplementary_group(pid_t pid, gid_t
+ }
+ #endif
+ 
++#if defined(HAVE_EXT_LIBCGROUP)
++bool
++ProcFamilyProxy::track_family_via_cgroup(pid_t pid, const char* cgroup)
++{
++	bool response;
++	dprintf(D_FULLDEBUG, "track_family_via_cgroup: Tracking PID %u via cgroup %s.\n",
++		pid, cgroup);
++	if (!m_client->track_family_via_cgroup(pid, cgroup, response)) {
++		dprintf(D_ALWAYS,
++			"track_family_via_cgroup: ProcD communication error\n");
++		return false;
++	}
++	return response;
++}
++#endif
++
+ bool
+ ProcFamilyProxy::get_usage(pid_t pid, ProcFamilyUsage& usage, bool)
+ {
+diff --git a/src/condor_utils/proc_family_proxy.h b/src/condor_utils/proc_family_proxy.h
+index 1f4d6bc..3afe814 100644
+--- a/src/condor_utils/proc_family_proxy.h
++++ b/src/condor_utils/proc_family_proxy.h
+@@ -57,6 +57,9 @@ public:
+ #if defined(LINUX)
+ 	bool track_family_via_allocated_supplementary_group(pid_t, gid_t&);
+ #endif
++#if defined(HAVE_EXT_LIBCGROUP)
++	bool track_family_via_cgroup(pid_t, const char*);
++#endif
+ 
+ 	// ask the procd for usage information about a process
+ 	// family
+diff --git a/src/condor_utils/soap_helpers.cpp b/src/condor_utils/soap_helpers.cpp
+index 44d8a28..7875705 100644
+--- a/src/condor_utils/soap_helpers.cpp
++++ b/src/condor_utils/soap_helpers.cpp
+@@ -135,73 +135,6 @@ convert_ad_to_adStruct(struct soap *s,
+ 		continue;
+ 	}
+ 
+-#ifdef WANT_OLD_CLASSADS
+-    skip_attr = false;
+-    switch ( tree->MyType() ) {
+-    case LX_STRING:
+-		if (isDeepCopy) {
+-			ad_struct->__ptr[attr_index].value =
+-				(char *) soap_malloc(s, strlen(((String *) tree)->Value()) + 1);
+-			strcpy(ad_struct->__ptr[attr_index].value,
+-				   ((String *) tree)->Value());
+-		} else {
+-			ad_struct->__ptr[attr_index].value = (char*)((String*)tree)->Value();
+-		}
+-      //dprintf(D_ALWAYS,"STRINGSPACE|%s|%p\n",ad_struct->__ptr[attr_index].value,ad_struct->__ptr[attr_index].value);
+-      ad_struct->__ptr[attr_index].type = STRING_ATTR;
+-      break;
+-    case LX_INTEGER:
+-      tmpint = ((Integer*)tree)->Value();
+-      ad_struct->__ptr[attr_index].value = (char*)soap_malloc(s,20);
+-      snprintf(ad_struct->__ptr[attr_index].value,20,"%d",tmpint);
+-      // ad_struct->__ptr[attr_index].valueInt = (int*)soap_malloc(s,sizeof(int));
+-      // *(ad_struct->__ptr[attr_index].valueInt) = tmpint;
+-      ad_struct->__ptr[attr_index].type = INTEGER_ATTR;
+-      break;
+-    case LX_FLOAT:
+-      tmpfloat = ((Float*)tree)->Value();
+-      ad_struct->__ptr[attr_index].value = (char*)soap_malloc(s,20);
+-      snprintf(ad_struct->__ptr[attr_index].value,20,"%f",tmpfloat);
+-      // ad_struct->__ptr[attr_index].valueFloat = (float*)soap_malloc(s,sizeof(float));
+-      // *(ad_struct->__ptr[attr_index].valueFloat) = tmpfloat;
+-      ad_struct->__ptr[attr_index].type = FLOAT_ATTR;
+-      break;
+-    case LX_BOOL:
+-      tmpbool = ((ClassadBoolean*)tree)->Value() ? true : false;
+-      if ( tmpbool ) {
+-        ad_struct->__ptr[attr_index].value = "TRUE";
+-      } else {
+-        ad_struct->__ptr[attr_index].value = "FALSE";
+-      }
+-      // ad_struct->__ptr[attr_index].valueBool = (bool*)soap_malloc(s,sizeof(bool));
+-      // *(ad_struct->__ptr[attr_index].valueBool) = tmpbool;
+-      ad_struct->__ptr[attr_index].type = BOOLEAN_ATTR;
+-      break;
+-    case LX_NULL:
+-    case LX_UNDEFINED:
+-    case LX_ERROR:
+-      // if we cannot deal with this type, skip this attribute
+-      skip_attr = true;
+-      break;
+-    default:
+-      // assume everything else is some sort of expression
+-      tmpstr = NULL;
+-      int buflen = strlen( ExprTreeToString( tree ) );
+-      tmpstr = (char*)soap_malloc(s,buflen + 1); // +1 for termination
+-      ASSERT(tmpstr);
+-      tmpstr[0] = '\0';
+-	  strcpy( tmpstr, ExprTreeToString( tree ) );
+-      if ( !(tmpstr[0]) ) {
+-        skip_attr = true;
+-      } else {
+-        ad_struct->__ptr[attr_index].value = tmpstr;
+-        // ad_struct->__ptr[attr_index].valueExpr = tmpstr;
+-        // soap_link(s,(void*)tmpstr,0,1,NULL);
+-        ad_struct->__ptr[attr_index].type = EXPRESSION_ATTR;
+-      }
+-      break;
+-    }
+-#else
+     skip_attr = false;
+ 	if ( tree->GetKind() == classad::ExprTree::LITERAL_NODE ) {
+ 		classad::Value val;
+@@ -255,7 +188,6 @@ convert_ad_to_adStruct(struct soap *s,
+ 			ad_struct->__ptr[attr_index].type = EXPRESSION_ATTR;
+ 		}
+ 	}
+-#endif
+     // skip this attr is requested to do so...
+     if ( skip_attr ) continue;
+ 
+diff --git a/src/condor_utils/stl_string_utils.cpp b/src/condor_utils/stl_string_utils.cpp
+index 230796a..237bb6d 100644
+--- a/src/condor_utils/stl_string_utils.cpp
++++ b/src/condor_utils/stl_string_utils.cpp
+@@ -44,7 +44,7 @@ bool operator>=(const MyString& L, const std::string& R) { return R <= L.Value()
+ bool operator>=(const std::string& L, const MyString& R) { return L >= R.Value(); }
+ 
+ 
+-int sprintf(std::string& s, const char* format, va_list pargs) {
++int vsprintf(std::string& s, const char* format, va_list pargs) {
+     char fixbuf[STL_STRING_UTILS_FIXBUF];
+     const int fixlen = sizeof(fixbuf)/sizeof(fixbuf[0]);
+ 	int n;
+@@ -105,7 +105,7 @@ int sprintf(std::string& s, const char* format, va_list pargs) {
+ int sprintf(std::string& s, const char* format, ...) {
+     va_list args;
+     va_start(args, format);
+-    int r = sprintf(s, format, args);
++    int r = vsprintf(s, format, args);
+     va_end(args);
+     return r;
+ }
+@@ -115,7 +115,7 @@ int sprintf(MyString& s, const char* format, ...) {
+     std::string t;
+     va_start(args, format);
+     // this gets me the sprintf-standard return value (# chars printed)
+-    int r = sprintf(t, format, args);
++    int r = vsprintf(t, format, args);
+     va_end(args);
+     assign(s, t);
+     return r;
+@@ -125,7 +125,7 @@ int sprintf_cat(std::string& s, const char* format, ...) {
+     va_list args;
+     std::string t;
+     va_start(args, format);
+-    int r = sprintf(t, format, args);
++    int r = vsprintf(t, format, args);
+     va_end(args);
+     s += t;
+     return r;
+@@ -135,7 +135,7 @@ int sprintf_cat(MyString& s, const char* format, ...) {
+     va_list args;
+     std::string t;
+     va_start(args, format);
+-    int r = sprintf(t, format, args);
++    int r = vsprintf(t, format, args);
+     va_end(args);
+     s += t.c_str();
+     return r;
+diff --git a/src/condor_utils/store_cred.cpp b/src/condor_utils/store_cred.cpp
+index 0bc7711..162d6ae 100644
+--- a/src/condor_utils/store_cred.cpp
++++ b/src/condor_utils/store_cred.cpp
+@@ -282,7 +282,7 @@ char* getStoredCredential(const char *username, const char *domain)
+ 		return NULL;
+ 	}
+ 
+-	if ( _snprintf(pw, 511, "%S", w_pw) < 0 ) {
++	if ( _snprintf(pw, sizeof(pw), "%S", w_pw) < 0 ) {
+ 		return NULL;
+ 	}
+ 
+@@ -922,7 +922,7 @@ read_from_keyboard(char* buf, int maxlength, bool echo) {
+ 	//Down convert the input into ASCII.
+ 	int converted = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, wbuffer, -1, buf, maxlength, NULL, NULL);
+ 
+-	delete wbuffer;
++	delete[] wbuffer;
+ #endif
+ 
+ 	return TRUE;
+diff --git a/src/condor_utils/test_old_classads.cpp b/src/condor_utils/test_old_classads.cpp
+index caddf53..c922c60 100644
+--- a/src/condor_utils/test_old_classads.cpp
++++ b/src/condor_utils/test_old_classads.cpp
+@@ -22,7 +22,6 @@
+ #include "condor_classad.h"
+ #include "condor_xml_classads.h"
+ #include "stringSpace.h"
+-#include "condor_scanner.h" 
+ #include "iso_dates.h"
+ #define HAVE_DLOPEN 1
+ #ifdef HAVE_DLOPEN // Used to be CLASSAD_FUNCTIONS
+diff --git a/src/condor_utils/timed_queue.h b/src/condor_utils/timed_queue.h
+new file mode 100644
+index 0000000..da2794d
+--- /dev/null
++++ b/src/condor_utils/timed_queue.h
+@@ -0,0 +1,127 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef _timed_queue_h_
++#define _timed_queue_h_ 1
++
++#include "time.h"
++#include <deque>
++#include "condor_debug.h"
++
++// A deque<> subclass that makes it convenient to time-stamp queue entries
++// and maintain the queue with a configurable time-window and maximum length.
++template <typename Data>
++struct timed_queue : public std::deque<std::pair<time_t, Data> > {
++    typedef std::deque<std::pair<time_t, Data> > base_type;
++
++    typedef typename base_type::size_type size_type;
++    typedef typename base_type::difference_type difference_type;
++    typedef typename base_type::value_type value_type;
++    typedef typename base_type::pointer pointer;
++    typedef typename base_type::reference reference;
++    typedef typename base_type::const_reference const_reference;
++
++    typedef typename base_type::iterator iterator;
++    typedef typename base_type::const_iterator const_iterator;
++    typedef typename base_type::reverse_iterator reverse_iterator;
++    typedef typename base_type::const_reverse_iterator const_reverse_iterator;
++
++    timed_queue() : base_type(), _max_time(0), _max_len(0) {}
++    virtual ~timed_queue() {}
++
++    timed_queue(const timed_queue& src) : base_type(src), _max_time(src._max_time), _max_len(src._max_len) {}
++
++    timed_queue& operator=(const timed_queue& src) {
++        if (this == &src) return *this;
++        base_type::operator=(src);
++        _max_time = src._max_time;
++        _max_len = src._max_len;
++        return *this;
++    }
++
++    void push_front(const Data& d) {
++        push_front(d, time(NULL));
++    }
++
++    void push_front(const Data& d, time_t t) {
++        if (!base_type::empty() && (t < base_type::front().first)) {
++            EXCEPT("timed_queue::push_front, timestamp %lu out of order", (unsigned long)(t));
++        }
++        base_type::push_front(value_type(t, d));
++        if (max_len() > 0) trim_len(max_len());
++        if (max_time() > 0) trim_time(base_type::front().first - max_time());
++    }
++
++    void max_time(size_type t) {
++        _max_time = t;
++        if (max_time() > 0) trim_time(base_type::front().first - max_time());
++    }
++    size_type max_time() const {
++        return _max_time;
++    }
++    void max_len(size_type l) {
++        _max_len = l;
++        if (max_len() > 0) trim_len(max_len());
++    }
++    size_type max_len() const {
++        return _max_len;
++    }
++
++    void trim_time(time_t tmin) {
++        while (!base_type::empty()) {
++            if (base_type::back().first >= tmin) break;
++            base_type::pop_back();
++        }
++    }
++
++    void trim_len(size_type lmax) {
++        while (base_type::size() > lmax) base_type::pop_back();        
++    }
++
++    protected:
++    size_type _max_time;
++    size_type _max_len;
++};
++
++
++// Utility function that will add (n) to the front of the queue if the
++// current time-stamp is the same, otherwise it will push a new entry.
++template <typename Num1, typename Num2>
++void update(timed_queue<Num1>& tq, Num2 n, time_t t) {
++    if (n <= 0) return;
++    if (!tq.empty() && (tq.front().first == t)) {
++        tq.front().second += n;
++    } else {
++        tq.push_front(Num1(n), t);
++    }
++}
++
++// Utility function that will trim the queue and then sum up the entries
++template <typename Num>
++Num accumulate(timed_queue<Num>& tq, time_t t) {
++    tq.trim_time(t - tq.max_time());
++    Num r = 0;
++    for (typename timed_queue<Num>::iterator j(tq.begin());  j != tq.end();  ++j) {
++        r += j->second;
++    }
++    return r;
++}
++
++
++#endif // _timed_queue_h_
+diff --git a/src/condor_utils/user_error_policy.dead.cpp b/src/condor_utils/user_error_policy.dead.cpp
+index aba3efd..d615683 100644
+--- a/src/condor_utils/user_error_policy.dead.cpp
++++ b/src/condor_utils/user_error_policy.dead.cpp
+@@ -19,7 +19,6 @@
+ 
+ #include "condor_common.h"
+ #include "condor_classad.h"
+-#include "condor_classad_util.h"
+ #include "condor_attributes.h"
+ #include "condor_config.h"
+ #include "user_error_policy.h"
+diff --git a/src/cream_gahp/cream_gahp_server.cpp b/src/cream_gahp/cream_gahp_server.cpp
+index a09186e..b35d914 100644
+--- a/src/cream_gahp/cream_gahp_server.cpp
++++ b/src/cream_gahp/cream_gahp_server.cpp
+@@ -1348,7 +1348,7 @@ int thread_cream_job_status( Request **reqlist )
+ 			 it != reqids.end(); it++ ) {
+ 
+ 			char *msg = escape_spaces(ex.what());
+-			enqueue_result( (*it) + " CREAM_Job_Start\\ Error:\\ " + msg );
++			enqueue_result( (*it) + " CREAM_Job_Status\\ Error:\\ " + msg );
+ 			free(msg);
+ 		}
+ 		return 1;
+diff --git a/src/ec2_gahp/CMakeLists.txt b/src/ec2_gahp/CMakeLists.txt
+new file mode 100644
+index 0000000..eaa7bd4
+--- /dev/null
++++ b/src/ec2_gahp/CMakeLists.txt
+@@ -0,0 +1,46 @@
++ ###############################################################
++ # 
++ # Copyright (C) 1990-2010, Redhat. 
++ # 
++ # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 
++ # 
++ # Unless required by applicable law or agreed to in writing, software 
++ # distributed under the License is distributed on an "AS IS" BASIS, 
++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ # See the License for the specific language governing permissions and 
++ # limitations under the License. 
++ # 
++ ############################################################### 
++
++if( HAVE_EXT_OPENSSL AND HAVE_EXT_CURL AND HAVE_EXT_PCRE AND HAVE_PTHREADS AND HAVE_EXT_EXPAT )
++
++	include_directories(${CMAKE_CURRENT_SOURCE_DIR})
++	include_directories(${CMAKE_CURRENT_BINARY_DIR})
++
++    condor_glob( HeaderFiles SourceFiles "queryAPI-sim.cpp" )
++
++    # Build the GAHP; curl requires libz on some systems.
++	condor_exe( ec2_gahp
++    	"${HeaderFiles};${SourceFiles}"	${C_SBIN}
++	    "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${CURL_FOUND};${ZLIB_FOUND}"
++    	OFF )
++
++    # Build an executable needed by the tests.
++	condor_exe_test( queryAPI-sim
++        "queryAPI-sim.cpp"
++        "" )
++
++    # Declare the test.
++    #
++    # FIXME: the cmake code is broken and dumps the list_* files into
++    # this directory instead of the condor_tests directory.  It's also
++    # broken and dumping them in the *source* directories, rather than
++    # the *object* directories, but that's a whole different failure.
++    #
++    # condor_pl_test( job_ec2_basic "EC2 Query API test" "quick;full;quicknolink" )
++
++endif()
+diff --git a/src/ec2_gahp/PipeBuffer.h b/src/ec2_gahp/PipeBuffer.h
+new file mode 100644
+index 0000000..798c719
+--- /dev/null
++++ b/src/ec2_gahp/PipeBuffer.h
+@@ -0,0 +1,70 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef PIPE_BUFFER_H
++#define PIPE_BUFFER_H
++
++#include "condor_common.h"
++#include <string>
++
++/**
++ *
++ * This class encapsulates a DaemonCore pipe and provides buffering.
++ * E.g. it allows you to hold a result read out of the pipe until
++ * a full line is read. The getNextLine() and Write() methods are
++ * designed to be used in read pipe and write pipe handlers,
++ * respectively. Note that an object of this type is to be used
++ * either strictly for reading (using getNextLine()) or strictly
++ * for writing (using Write()).
++ *
++ **/
++
++const int PIPE_BUFFER_READAHEAD_SIZE = 1024;
++
++class PipeBuffer {
++public:
++	PipeBuffer ();
++	PipeBuffer (int pipe_end);
++
++	std::string * GetNextLine();
++	int Write (const char * toWrite = NULL);
++
++	int getPipeEnd() { return pipe_end; }
++	void setPipeEnd(const int _pipe_end) { pipe_end = _pipe_end; }
++	const char * getBuffer() { return buffer.c_str(); }
++
++	int IsEmpty();
++	bool IsError() { return error; }
++	bool IsEOF() { return eof; }
++
++protected:
++	int pipe_end;
++	std::string buffer;
++
++	bool error;
++	bool eof;
++
++	bool last_char_was_escape;
++
++	char readahead_buffer[PIPE_BUFFER_READAHEAD_SIZE];
++	int readahead_length;
++	int readahead_index;
++};
++
++#endif
+diff --git a/src/ec2_gahp/PipeBuffer_no_dc.cpp b/src/ec2_gahp/PipeBuffer_no_dc.cpp
+new file mode 100644
+index 0000000..a25655e
+--- /dev/null
++++ b/src/ec2_gahp/PipeBuffer_no_dc.cpp
+@@ -0,0 +1,135 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "PipeBuffer.h"
++#include "thread_control.h"
++
++PipeBuffer::PipeBuffer (int _pipe_end) {
++	pipe_end = _pipe_end;
++ 	buffer.reserve (5000);
++	error = false;
++	eof = false;
++	last_char_was_escape = false;
++	readahead_length = 0;
++	readahead_index = 0;
++	readahead_buffer[0] = '\0';
++}
++
++PipeBuffer::PipeBuffer() {
++	pipe_end = -1;
++ 	buffer.reserve (5000);
++	error = false;
++	eof = false;
++	last_char_was_escape = false;
++	readahead_length = 0;
++	readahead_index = 0;
++	readahead_buffer[0] = '\0';
++}
++
++std::string *
++PipeBuffer::GetNextLine () {
++
++	if (readahead_length == 0) {
++
++		// our readahead buffer is spent; read a new one in.
++		// note: read could block here on I/O, so release mutex to let 
++		// other run.
++		amazon_gahp_release_big_mutex();
++		readahead_length = read(pipe_end, readahead_buffer, PIPE_BUFFER_READAHEAD_SIZE);
++		amazon_gahp_grab_big_mutex();
++		if (readahead_length < 0) {
++			error = true;
++			dprintf (D_ALWAYS, "error reading from pipe %d\n", pipe_end);
++			return NULL;
++		}
++		if (readahead_length == 0) {
++			eof = true;
++			dprintf(D_ALWAYS, "EOF reached on pipe %d\n", pipe_end);
++			return NULL;
++		}
++
++		// buffer has new data; reset the readahead index back to the beginning
++		readahead_index = 0;
++	}
++
++	while (readahead_index != readahead_length) {
++
++		char c = readahead_buffer[readahead_index++];
++
++		if (c == '\n' && !last_char_was_escape) {
++					// We got a completed line!
++			std::string* result = new std::string(buffer);
++			buffer = "";
++			return result;
++		} else if (c == '\r' && !last_char_was_escape) {
++				// Ignore \r
++		} else {
++			buffer += c;
++
++			if (c == '\\') {
++				last_char_was_escape = !last_char_was_escape;
++			}
++			else {
++				last_char_was_escape = false;
++			}
++		}
++	}
++
++	// we have used up our readahead buffer and have a partially completed line
++	readahead_length = 0;
++	return NULL;
++}
++
++int
++PipeBuffer::Write (const char * towrite) {
++	
++	if (towrite)
++		buffer += towrite;
++
++	int len = buffer.length();
++	if (len == 0)
++		return 0;
++
++		// write() could block, so let other threads run...
++	amazon_gahp_release_big_mutex();
++	int numwritten = write(pipe_end, buffer.c_str(), len);
++	amazon_gahp_grab_big_mutex();
++
++	if (numwritten > 0) {
++			// shorten the buffer
++		buffer = buffer.erase (0, numwritten);
++		return numwritten;
++	} else if ( numwritten == 0 ) {
++		return 0;
++	} else {
++		if (errno == EAGAIN || errno == EWOULDBLOCK)
++			return 0;
++
++		dprintf (D_ALWAYS, "Error %d writing to pipe %d\n", errno, pipe_end);
++		error = true;
++		return -1;
++	}
++}
++
++int
++PipeBuffer::IsEmpty() {
++	return (buffer.length() == 0);
++}
+diff --git a/src/ec2_gahp/amazonCommands.cpp b/src/ec2_gahp/amazonCommands.cpp
+new file mode 100644
+index 0000000..6f226ab
+--- /dev/null
++++ b/src/ec2_gahp/amazonCommands.cpp
+@@ -0,0 +1,1286 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "condor_config.h"
++#include "condor_string.h"
++#include "string_list.h"
++#include "condor_arglist.h"
++#include "MyString.h"
++#include "util_lib_proto.h"
++#include "internet.h"
++#include "my_popen.h"
++#include "basename.h"
++#include "vm_univ_utils.h"
++#include "amazongahp_common.h"
++#include "amazonCommands.h"
++
++#include "condor_base64.h"
++#include <sstream>
++#include "stat_wrapper.h"
++#include "Regex.h"
++#include <algorithm>
++#include <openssl/hmac.h>
++#include <curl/curl.h>
++#include "thread_control.h"
++#include <expat.h>
++
++#define NULLSTRING "NULL"
++
++//
++// This function should not be called for anything in query_parameters,
++// except for by AmazonQuery::SendRequest().
++//
++std::string amazonURLEncode( const std::string & input )
++{
++    /*
++     * See http://docs.amazonwebservices.com/AWSEC2/2010-11-15/DeveloperGuide/using-query-api.html
++     *
++     *
++     * Since the GAHP protocol is defined to be ASCII, we're going to ignore
++     * UTF-8, and hope it goes away.
++     *
++     */
++    std::string output;
++    for( unsigned i = 0; i < input.length(); ++i ) {
++        // "Do not URL encode ... A-Z, a-z, 0-9, hyphen ( - ),
++        // underscore ( _ ), period ( . ), and tilde ( ~ ).  Percent
++        // encode all other characters with %XY, where X and Y are hex
++        // characters 0-9 and uppercase A-F.  Percent encode extended
++        // UTF-8 characters in the form %XY%ZA..."
++        if( ('A' <= input[i] && input[i] <= 'Z')
++         || ('a' <= input[i] && input[i] <= 'z')
++         || ('0' <= input[i] && input[i] <= '9')
++         || input[i] == '-'
++         || input[i] == '_'
++         || input[i] == '.'
++         || input[i] == '~' ) {
++            char uglyHack[] = "X";
++            uglyHack[0] = input[i];
++            output.append( uglyHack );
++        } else {
++            char percentEncode[4];
++            int written = snprintf( percentEncode, 4, "%%%.2hhX", input[i] );
++            assert( written == 3 );
++            output.append( percentEncode );
++        }
++    }
++    
++    return output;
++}
++
++//
++// Utility function.
++//
++bool writeShortFile( const std::string & fileName, const std::string & contents ) {
++    int fd = safe_open_wrapper( fileName.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0600 );
++
++    if( fd < 0 ) {
++        dprintf( D_ALWAYS, "Failed to open file '%s' for writing: '%s' (%d).\n", fileName.c_str(), strerror( errno ), errno );
++        return false;
++    }
++    
++    unsigned long written = full_write( fd, contents.c_str(), contents.length() );
++    if( written != contents.length() ) {
++        dprintf( D_ALWAYS, "Failed to completely write file '%s'; wanted to write %lu but only put %lu.\n",
++            fileName.c_str(), contents.length(), written );
++        return false;
++    }
++    
++    return true;
++}
++
++//
++// Utility function; inefficient.
++//
++bool readShortFile( const std::string & fileName, std::string & contents ) {
++    int fd = safe_open_wrapper( fileName.c_str(), O_RDONLY, 0600 );
++
++    if( fd < 0 ) {
++        dprintf( D_ALWAYS, "Failed to open file '%s' for reading: '%s' (%d).\n", fileName.c_str(), strerror( errno ), errno );
++        return false;
++    }
++        
++    StatWrapper sw( fd );
++    unsigned long fileSize = sw.GetBuf()->st_size;
++        
++    char * rawBuffer = (char *)malloc( fileSize + 1 );
++    assert( rawBuffer != NULL );
++    unsigned long totalRead = full_read( fd, rawBuffer, fileSize );
++    if( totalRead != fileSize ) {
++        dprintf( D_ALWAYS, "Failed to completely read file '%s'; needed %lu but got %lu.\n",
++            fileName.c_str(), fileSize, totalRead );
++        free( rawBuffer );
++        return false;
++    }    
++    rawBuffer[ fileSize ] = '\0';
++    contents = rawBuffer;
++    free( rawBuffer );
++    
++    return true;
++}
++
++//
++// "This function gets called by libcurl as soon as there is data received
++//  that needs to be saved. The size of the data pointed to by ptr is size
++//  multiplied with nmemb, it will not be zero terminated. Return the number
++//  of bytes actually taken care of. If that amount differs from the amount
++//  passed to your function, it'll signal an error to the library. This will
++//  abort the transfer and return CURLE_WRITE_ERROR."
++//
++// We also make extensive use of this function in the XML parsing code,
++// for pretty much exactly the same reason.
++//
++size_t appendToString( void * ptr, size_t size, size_t nmemb, void * str ) {
++    if( size == 0 || nmemb == 0 ) { return 0; }
++    
++    char * ucptr = (char *)ptr;
++    char last = ucptr[ (size * nmemb) - 1 ];
++    ucptr[ (size * nmemb) - 1 ] = '\0';
++    std::string * ssptr = (std::string *)str;
++    ssptr->append( ucptr );
++    (*ssptr) += last;
++    ucptr[ (size * nmemb) - 1 ] = last;
++    
++    return (size * nmemb);
++}
++
++AmazonRequest::AmazonRequest() { }
++
++AmazonRequest::~AmazonRequest() { }
++
++bool AmazonRequest::SendRequest() {
++    //
++    // Every request must have the following parameters:
++    //
++    //      Action, Version, AWSAccessKeyId, Timestamp (or Expires),
++    //      Signature, SignatureMethod, and SignatureVersion.
++    //
++    
++    if( query_parameters.find( "Action" ) == query_parameters.end() ) {
++        this->errorCode = "E_INTERNAL";
++        this->errorMessage = "No action specified in request.";
++        dprintf( D_ALWAYS, "No action specified in request, failing.\n" );
++        return false;
++    }
++
++    //
++    // The AWSAccessKeyId is just the contents of this->accessKeyFile,
++    // and are (currently) 20 characters long.
++    //
++    std::string keyID;
++    if( ! readShortFile( this->accessKeyFile, keyID ) ) {
++        this->errorCode = "E_FILE_IO";
++        this->errorMessage = "Unable to read from accesskey file '" + this->accessKeyFile + "'.";
++        dprintf( D_ALWAYS, "Unable to read accesskey file '%s', failing.\n", this->accessKeyFile.c_str() );
++        return false;
++    }
++    if( keyID[ keyID.length() - 1 ] == '\n' ) { keyID.erase( keyID.length() - 1 ); }
++    query_parameters.insert( std::make_pair( "AWSAccessKeyId", keyID ) );
++
++    //
++    // This implementation computes signature version 2,
++    // using the "HmacSHA256" method.
++    // 
++    query_parameters.insert( std::make_pair( "SignatureVersion", "2" ) );
++    query_parameters.insert( std::make_pair( "SignatureMethod", "HmacSHA256" ) );
++    
++    //
++    // This implementation was written against the 2010-11-15 documentation.
++    //
++    query_parameters.insert( std::make_pair( "Version", "2010-11-15" ) );
++
++    //
++    // We're calculating the signature now. [YYYY-MM-DDThh:mm:ssZ]
++    //
++    time_t now; time( & now );
++    struct tm brokenDownTime; gmtime_r( & now, & brokenDownTime );
++    char iso8601[] = "YYYY-MM-DDThh:mm:ssZ";
++    strftime( iso8601, 20, "%Y-%m-%dT%H:%M:%SZ", & brokenDownTime );
++    query_parameters.insert( std::make_pair( "Timestamp", iso8601 ) );
++
++    /*
++     * The tricky party of sending a Query API request is calculating
++     * the signature.  See
++     *
++     * http://docs.amazonwebservices.com/AWSEC2/2010-11-15/DeveloperGuide/using-query-api.html
++     *
++     */
++        
++    // Step 1: Create the canonicalized query string.
++    std::string canonicalizedQueryString;
++    AttributeValueMap encodedParameters;
++    AttributeValueMap::const_iterator i;
++    for( i = query_parameters.begin(); i != query_parameters.end(); ++i ) {
++        // Step 1A: The map sorts the query parameters for us.
++        
++        // Step 1B: Encode the parameter names and values.
++        std::string name = amazonURLEncode( i->first );
++        std::string value = amazonURLEncode( i->second );
++        encodedParameters.insert( std::make_pair( name, value ) );
++        
++        // Step 1C: Separate parameter names from values with '='.
++        canonicalizedQueryString += name + '=' + value;
++        
++        // Step 1D: Separate name-value pairs with '&';
++        canonicalizedQueryString += '&';
++    }
++    // We'll always have a superflous trailing ampersand.
++    canonicalizedQueryString.erase( canonicalizedQueryString.end() - 1 );
++    
++    // Step 2: Create the string to sign.  We extract "the value of the Host
++    // header in lowercase" and the "HTTP Request URI" from the service URL.
++    // The service URL must be of the form 'http[s]://hostname[:port][/path]*'.
++    Regex r; int errCode = 0; const char * errString = 0;
++    bool patternOK = r.compile( "https?://([^/]+)(/.*)?", & errString, & errCode );
++    assert( patternOK );
++    ExtArray<MyString> groups(4);
++    bool matchFound = r.match( this->serviceURL.c_str(), & groups );
++    if( ! matchFound ) {
++        this->errorCode = "E_INVALID_SERVICE_URL";
++        this->errorMessage = "Failed to parse service URL.";
++        dprintf( D_ALWAYS, "Failed to match regex against service URL '%s'.\n", serviceURL.c_str() );
++        return false;
++    }
++    std::string valueOfHostHeaderInLowercase = groups[1];
++    std::transform( valueOfHostHeaderInLowercase.begin(),
++                    valueOfHostHeaderInLowercase.end(),
++                    valueOfHostHeaderInLowercase.begin(),
++                    & tolower );
++    std::string httpRequestURI = groups[2];
++    if( httpRequestURI.empty() ) { httpRequestURI = "/"; }
++    std::string stringToSign = "GET\n"
++                             + valueOfHostHeaderInLowercase + "\n"
++                             + httpRequestURI + "\n"
++                             + canonicalizedQueryString;
++    // dprintf( D_ALWAYS, "DEBUG: stringToSign is '%s'\n", stringToSign.c_str() );
++
++    // Step 3: "Calculate an RFC 2104-compliant HMAC with the string
++    // you just created, your Secret Access Key as the key, and SHA256
++    // or SHA1 as the hash algorithm."
++    std::string saKey;
++    if( ! readShortFile( this->secretKeyFile, saKey ) ) {
++        this->errorCode = "E_FILE_IO";
++        this->errorMessage = "Unable to read from secretkey file '" + this->secretKeyFile + "'.";
++        dprintf( D_ALWAYS, "Unable to read secretkey file '%s', failing.\n", this->secretKeyFile.c_str() );
++        return false;
++    }
++    // dprintf( D_ALWAYS, "DEBUG: '%s' (%d)\n", saKey.c_str(), saKey.length() );
++    if( saKey[ saKey.length() - 1 ] == '\n' ) { saKey.erase( saKey.length() - 1 ); }
++    // dprintf( D_ALWAYS, "DEBUG: '%s' (%d)\n", saKey.c_str(), saKey.length() );
++    
++    unsigned int mdLength = 0;
++    unsigned char messageDigest[EVP_MAX_MD_SIZE];
++    const unsigned char * hmac = HMAC( EVP_sha256(), saKey.c_str(), saKey.length(),
++        (unsigned char *)stringToSign.c_str(), stringToSign.length(), messageDigest, & mdLength );
++    if( hmac == NULL ) {
++        this->errorCode = "E_INTERNAL";
++        this->errorMessage = "Unable to calculate query signature (SHA256 HMAC).";
++        dprintf( D_ALWAYS, "Unable to calculate SHA256 HMAC to sign query, failing.\n" );
++        return false;
++    }
++    // dprintf( D_ALWAYS, "DEBUG: %d -> '%c'\n", mdLength, messageDigest[0] );
++    
++    // Step 4: "Convert the resulting value to base64."
++    char * base64Encoded = condor_base64_encode( messageDigest, mdLength );
++    std::string signatureInBase64 = base64Encoded;
++    free( base64Encoded );
++    
++    // Generate the final URI.
++    canonicalizedQueryString += "&Signature=" + amazonURLEncode( signatureInBase64 );
++    std::string finalURI = this->serviceURL + "?" + canonicalizedQueryString;
++    dprintf( D_FULLDEBUG, "Request URI is '%s'\n", finalURI.c_str() );
++    
++    // curl_global_init() is not thread-safe.  However, it's safe to call
++    // multiple times.  Therefore, we'll just call it before we drop the
++    // mutex, since we know that means only one thread is running.
++    CURLcode rv = curl_global_init( CURL_GLOBAL_ALL );
++    if( rv != 0 ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_global_init() failed.";
++        dprintf( D_ALWAYS, "curl_global_init() failed, failing.\n" );
++        return false;
++    }
++    
++    CURL * curl = curl_easy_init();
++    if( curl == NULL ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_init() failed.";
++        dprintf( D_ALWAYS, "curl_easy_init() failed, failing.\n" );
++        return false;
++    }
++
++    rv = curl_easy_setopt( curl, CURLOPT_URL, finalURI.c_str() );
++    if( rv != CURLE_OK ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_setopt( CURLOPT_URL ) failed.";
++        dprintf( D_ALWAYS, "curl_easy_setopt( CURLOPT_URL ) failed (%d): '%s', failing.\n",
++            rv, curl_easy_strerror( rv ) );
++        return false;
++    }
++
++    rv = curl_easy_setopt( curl, CURLOPT_NOPROGRESS, 1 );
++    if( rv != CURLE_OK ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_setopt( CURLOPT_NOPROGRESS ) failed.";
++        dprintf( D_ALWAYS, "curl_easy_setopt( CURLOPT_NOPROGRESS ) failed (%d): '%s', failing.\n",
++            rv, curl_easy_strerror( rv ) );
++        return false;
++    }
++    
++    rv = curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, & appendToString );
++    if( rv != CURLE_OK ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_setopt( CURLOPT_WRITEFUNCTION ) failed.";
++        dprintf( D_ALWAYS, "curl_easy_setopt( CURLOPT_WRITEFUNCTION ) failed (%d): '%s', failing.\n",
++            rv, curl_easy_strerror( rv ) );
++        return false;
++    }    
++
++    rv = curl_easy_setopt( curl, CURLOPT_WRITEDATA, & this->resultString );
++    if( rv != CURLE_OK ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_setopt( CURLOPT_WRITEDATA ) failed.";
++        dprintf( D_ALWAYS, "curl_easy_setopt( CURLOPT_WRITEDATA ) failed (%d): '%s', failing.\n",
++            rv, curl_easy_strerror( rv ) );
++        return false;
++    }
++    
++    amazon_gahp_release_big_mutex();
++    rv = curl_easy_perform( curl );
++    amazon_gahp_grab_big_mutex();
++    if( rv != 0 ) {
++        this->errorCode = "E_CURL_IO";
++        std::ostringstream error;
++        error << "curl_easy_perform() failed (" << rv << "): '" << curl_easy_strerror( rv ) << "'.";
++        this->errorMessage = error.str();
++        dprintf( D_ALWAYS, "%s\n", this->errorMessage.c_str() );
++        return false;
++    }
++
++    unsigned long responseCode = 0;
++    rv = curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, & responseCode );
++    if( rv != CURLE_OK ) {
++        this->errorCode = "E_CURL_LIB";
++        this->errorMessage = "curl_easy_getinfo() failed.";
++        dprintf( D_ALWAYS, "curl_easy_getinfo( CURLINFO_RESPONSE_CODE ) failed (%d): '%s', failing.\n",
++            rv, curl_easy_strerror( rv ) );
++        return false;
++    }
++            
++    curl_easy_cleanup( curl );
++    
++    if( responseCode != 200 ) {
++        this->errorCode = "E_HTTP_RESPONSE_NOT_200";
++        this->errorMessage = resultString;
++        dprintf( D_ALWAYS, "Query did not return 200 (%lu), failing.\n",
++            responseCode );
++        dprintf( D_ALWAYS, "Failure response text was '%s'.\n", resultString.c_str() );
++        return false;
++    }
++    
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++/*
++ * The *[ESH|CDH|EEH] functions are Expat callbacks for parsing the result
++ * of the corresponding query.  ('EntityStartHandler', 'CharacterDataHandler',
++ * and 'EntityEndHandler', respectively; referring to the opening tag, the
++ * enclosed data, and the closing tag.)  This method of XML parsing is
++ * extremely opaque and bug-prone, because you have to represent the structure
++ * of the XML in executable code (and the *UD ('UserData') datastructures).
++ *
++ * If the use of libxml2 is not contraindicated (it was at one point), then
++ * we can use XPath expressions (regex-like) instead of code to identify
++ * the character data of interest.  This will be particularly clarity-
++ * enhancing when parsing the results of DescribeInstances queries; see
++ * AmazonVMStatusAll.
++ *
++ * See 'http://xmlsoft.org/examples/xpath1.c', which looks a lot cleaner.
++ */
++
++AmazonVMStart::AmazonVMStart() { }
++
++AmazonVMStart::~AmazonVMStart() { }
++
++struct vmStartUD_t {
++    bool inInstanceId;
++    std::string & instanceID;
++
++    vmStartUD_t( std::string & iid ) : inInstanceId( false ), instanceID( iid ) { }
++};
++typedef struct vmStartUD_t vmStartUD;
++
++void vmStartESH( void * vUserData, const XML_Char * name, const XML_Char ** ) {
++    vmStartUD * vsud = (vmStartUD *)vUserData;
++    if( strcasecmp( (const char *)name, "instanceId" ) == 0 ) {
++        vsud->inInstanceId = true;
++    }
++}
++
++void vmStartCDH( void * vUserData, const XML_Char * cdata, int len ) {
++    vmStartUD * vsud = (vmStartUD *)vUserData;
++    if( vsud->inInstanceId ) {
++        appendToString( (void *)cdata, len, 1, (void *) & vsud->instanceID );
++    }
++}
++
++void vmStartEEH( void * vUserData, const XML_Char * name ) {
++    vmStartUD * vsud = (vmStartUD *)vUserData;
++    if( strcasecmp( (const char *)name, "instanceId" ) == 0 ) {
++        vsud->inInstanceId = false;
++    }
++}
++
++bool AmazonVMStart::SendRequest() {
++    bool result = AmazonRequest::SendRequest();
++    if ( result ) {
++        vmStartUD vsud( this->instanceID );
++        XML_Parser xp = XML_ParserCreate( NULL );
++        XML_SetElementHandler( xp, & vmStartESH, & vmStartEEH );
++        XML_SetCharacterDataHandler( xp, & vmStartCDH );
++        XML_SetUserData( xp, & vsud );
++        XML_Parse( xp, this->resultString.c_str(), this->resultString.length(), 1 );
++        XML_ParserFree( xp );
++    } else {
++        if( this->errorCode == "E_CURL_IO" ) {
++            // To be on the safe side, if the I/O failed, make the gridmanager
++            // check to see the VM was started or not.
++            this->errorCode = "NEED_CHECK_VM_START"; 
++            return false;
++        }
++    }
++    return result;
++}
++
++// Expecting: EC2_VM_START <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <ami-id> <keypair> <userdata> <userdatafile> <instancetype> <groupname> <groupname> ..
++// <groupname> are optional ones.
++// we support multiple groupnames
++bool AmazonVMStart::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_START" ) == 0 );
++
++    // Uses the Query API function 'RunInstances', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 10 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 10, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMStart vmStartRequest;
++    vmStartRequest.serviceURL = argv[2];
++    vmStartRequest.accessKeyFile = argv[3];
++    vmStartRequest.secretKeyFile = argv[4];
++    vmStartRequest.query_parameters[ "Action" ] = "RunInstances";
++    vmStartRequest.query_parameters[ "ImageId" ] = argv[5];
++    vmStartRequest.query_parameters[ "MinCount" ] = "1";
++    vmStartRequest.query_parameters[ "MaxCount" ] = "1";
++    
++    // Fill in optional parameters.
++    if( strcasecmp( argv[6], NULLSTRING ) ) {
++        vmStartRequest.query_parameters[ "KeyName" ] = argv[6];
++    }
++    
++    if( strcasecmp( argv[9], NULLSTRING ) ) {
++        vmStartRequest.query_parameters[ "InstanceType" ] = argv[9];
++    }
++
++    for( int i = 10; i < argc; ++i ) {
++        std::ostringstream groupName;
++        groupName << "SecurityGroup." << ( i - 10 + 1 );
++        vmStartRequest.query_parameters[ groupName.str() ] = argv[ i ];
++    }    
++
++    //
++    // Handle user data.
++    //
++    std::string buffer;
++    if( strcasecmp( argv[7], NULLSTRING ) ) {
++        buffer = argv[7];
++    }
++    if( strcasecmp( argv[8], NULLSTRING ) ) {
++        std::string udFileName = argv[8];
++        std::string udFileContents;
++        if( ! readShortFile( udFileName, udFileContents ) ) {
++            result_string = create_failure_result( requestID, "Failed to read userdata file.", "E_FILE_IO" );
++            dprintf( D_ALWAYS, "Failed to read userdata file '%s'.\n", udFileName.c_str() );
++            return false;
++            }
++        buffer += udFileContents;            
++    }
++    if( ! buffer.empty() ) {
++        char * base64Encoded = condor_base64_encode( (const unsigned char *)buffer.c_str(), buffer.length() );
++        vmStartRequest.query_parameters[ "UserData" ] = base64Encoded;
++        free( base64Encoded );
++    }
++    
++    // Send the request.
++    if( ! vmStartRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            vmStartRequest.errorMessage.c_str(),
++            vmStartRequest.errorCode.c_str() );
++    } else {
++        StringList resultList;
++        resultList.append( vmStartRequest.instanceID.c_str() );
++        result_string = create_success_result( requestID, & resultList );
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMStop::AmazonVMStop() { }
++
++AmazonVMStop::~AmazonVMStop() { }
++
++// Expecting:EC2_VM_STOP <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id>
++bool AmazonVMStop::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_STOP" ) == 0 );
++
++    // Uses the Query API function 'TerminateInstances', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-TerminateInstances.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 6 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 6, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMStop terminationRequest;
++    terminationRequest.serviceURL = argv[2];
++    terminationRequest.accessKeyFile = argv[3];
++    terminationRequest.secretKeyFile = argv[4];
++    terminationRequest.query_parameters[ "Action" ] = "TerminateInstances";
++    terminationRequest.query_parameters[ "InstanceId.1" ] = argv[5];
++
++    // Send the request.
++    if( ! terminationRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            terminationRequest.errorMessage.c_str(),
++            terminationRequest.errorCode.c_str() );
++    } else {
++        // AmazonVMStop::SendRequest() could parse its resultString
++        // to look for instance IDs (and current/previous states),
++        // but it doesn't presently look like it needs to so do.
++        result_string = create_success_result( requestID, NULL );
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMStatus::AmazonVMStatus() { }
++
++AmazonVMStatus::~AmazonVMStatus() { }
++
++const char * nullStringIfEmpty( const std::string & str ) {
++    if( str.empty() ) { return NULLSTRING; }
++    else { return str.c_str(); }
++}    
++
++// Expecting:EC2_VM_STATUS <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id>
++bool AmazonVMStatus::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_STATUS" ) == 0 );
++
++    // Uses the Query API function 'DescribeInstances', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 6 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 6, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMStatus sRequest;
++    sRequest.serviceURL = argv[2];
++    sRequest.accessKeyFile = argv[3];
++    sRequest.secretKeyFile = argv[4];
++    sRequest.query_parameters[ "Action" ] = "DescribeInstances";
++    // We should also be able to set the parameter InstanceId.1
++    // and only get one instance back, rather than filtering.
++    std::string instanceID = argv[5];
++    
++    // Send the request.
++    if( ! sRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            sRequest.errorMessage.c_str(),
++            sRequest.errorCode.c_str() );
++    } else {
++        if( sRequest.results.size() == 0 ) {
++            result_string = create_success_result( requestID, NULL );
++        } else {
++            StringList resultList;
++            for( unsigned i = 0; i < sRequest.results.size(); ++i ) {
++                AmazonStatusResult asr = sRequest.results[i];
++                if( asr.instance_id != instanceID ) { continue; }
++                
++                resultList.append( asr.instance_id.c_str() );
++                resultList.append( asr.status.c_str() );
++                resultList.append( asr.ami_id.c_str() );
++                
++                if( strcasecmp( asr.status.c_str(), AMAZON_STATUS_RUNNING ) == 0 ) {
++                    resultList.append( nullStringIfEmpty( asr.public_dns ) );
++                    resultList.append( nullStringIfEmpty( asr.private_dns ) );
++                    resultList.append( nullStringIfEmpty( asr.keyname ) );
++                    if( asr.securityGroups.size() == 0 ) {
++                        resultList.append( NULLSTRING );
++                    } else {                        
++                        for( unsigned j = 0; j < asr.securityGroups.size(); ++j ) {
++                            resultList.append( asr.securityGroups[j].c_str() );
++                        }
++                    }
++                }
++            }
++            result_string = create_success_result( requestID, & resultList );
++        }
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMStatusAll::AmazonVMStatusAll() { }
++
++AmazonVMStatusAll::~AmazonVMStatusAll() { }
++
++struct vmStatusUD_t {
++    enum vmStatusTags_t {
++        NONE,
++        INSTANCE_ID,
++        STATUS,
++        AMI_ID,
++        PUBLIC_DNS,
++        PRIVATE_DNS,
++        KEY_NAME,
++        INSTANCE_TYPE,
++        GROUP_ID
++    };
++    typedef enum vmStatusTags_t vmStatusTags;
++
++    bool inInstancesSet;
++    bool inInstance;
++    bool inInstanceState;
++    vmStatusTags inWhichTag;
++    AmazonStatusResult * currentResult;
++    std::vector< AmazonStatusResult > & results;
++
++    bool inGroupSet;
++    bool inGroup;
++    std::string currentSecurityGroup;
++    std::vector< std::string > currentSecurityGroups;
++    
++    vmStatusUD_t( std::vector< AmazonStatusResult > & asrList ) : 
++        inInstancesSet( false ), 
++        inInstance( false ),
++        inInstanceState( false ),
++        inWhichTag( vmStatusUD_t::NONE ), 
++        currentResult( NULL ), 
++        results( asrList ),
++        inGroupSet( false ),
++        inGroup( false ) { }
++};
++typedef struct vmStatusUD_t vmStatusUD;
++
++void vmStatusESH( void * vUserData, const XML_Char * name, const XML_Char ** ) {
++    vmStatusUD * vsud = (vmStatusUD *)vUserData;
++
++    if( strcasecmp( (const char *)name, "groupSet" ) == 0 ) {
++        vsud->currentSecurityGroups.clear();
++        vsud->inGroupSet = true;
++        return;
++    }
++
++    if( vsud->inGroupSet && strcasecmp( (const char *)name, "groupId" ) == 0 ) {
++        vsud->inGroup = true;
++        return;
++    }        
++
++    if( ! vsud->inInstancesSet ) {
++        if( strcasecmp( (const char *)name, "instancesSet" ) == 0 ) {
++            vsud->inInstancesSet = true;
++        }            
++        return;
++    } 
++    
++    if( ! vsud->inInstance ) {
++        if( strcasecmp( (const char *)name, "item" ) == 0 ) {
++            vsud->currentResult = new AmazonStatusResult();
++            assert( vsud->currentResult != NULL );
++            vsud->inInstance = true;
++        }
++        return;
++    }
++    
++    if( strcasecmp( (const char *)name, "instanceId" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::INSTANCE_ID;
++    } else if( strcasecmp( (const char *)name, "imageId" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::AMI_ID;
++    } else if( strcasecmp( (const char *)name, "privateDnsName" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::PRIVATE_DNS;
++    } else if( strcasecmp( (const char *)name, "dnsName" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::PUBLIC_DNS;
++    } else if( strcasecmp( (const char *)name, "keyName" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::KEY_NAME;
++    } else if( strcasecmp( (const char *)name, "instanceType" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::INSTANCE_TYPE;
++    } else if( strcasecmp( (const char *)name, "instanceState" ) == 0 ) {
++        vsud->inInstanceState = true;
++        vsud->inWhichTag = vmStatusUD::NONE;
++    } else if( vsud->inInstanceState && strcasecmp( (const char *)name, "name" ) == 0 ) {
++        vsud->inWhichTag = vmStatusUD::STATUS;
++    }
++}
++
++void vmStatusCDH( void * vUserData, const XML_Char * cdata, int len ) {
++    vmStatusUD * vsud = (vmStatusUD *)vUserData;
++
++    if( vsud->inGroup ) {
++        appendToString( (void *)cdata, len, 1, (void *) & vsud->currentSecurityGroup );
++        return;
++    }
++
++    if( vsud->currentResult == NULL ) {
++        return;
++    }
++
++    std::string * targetString = NULL;
++    switch( vsud->inWhichTag ) {
++        case vmStatusUD::NONE:
++            return;
++        
++        case vmStatusUD::INSTANCE_ID:
++            targetString = & vsud->currentResult->instance_id;
++            break;
++        
++        case vmStatusUD::STATUS:
++            targetString = & vsud->currentResult->status;
++            break;
++        
++        case vmStatusUD::AMI_ID:
++            targetString = & vsud->currentResult->ami_id;
++            break;
++        
++        case vmStatusUD::PRIVATE_DNS:
++            targetString = & vsud->currentResult->private_dns;
++            break;
++            
++        case vmStatusUD::PUBLIC_DNS:
++            targetString = & vsud->currentResult->public_dns;
++            break;
++
++        case vmStatusUD::KEY_NAME:
++            targetString = & vsud->currentResult->keyname;
++            break;
++        
++        case vmStatusUD::INSTANCE_TYPE:
++            targetString = & vsud->currentResult->instancetype;
++            break;
++
++        default:
++            /* This should never happen. */
++            return;
++    }
++
++    appendToString( (void *)cdata, len, 1, (void *)targetString );
++}
++
++void vmStatusEEH( void * vUserData, const XML_Char * name ) {
++    vmStatusUD * vsud = (vmStatusUD *)vUserData;
++
++    if( vsud->inGroupSet ) {
++        if( strcasecmp( (const char *)name, "groupId" ) == 0 ) {
++            // dprintf( D_ALWAYS, "DEBUG: adding '%s' to current security group list...\n", vsud->currentSecurityGroup.c_str() );
++            vsud->currentSecurityGroups.push_back( vsud->currentSecurityGroup );
++            vsud->currentSecurityGroup.erase();
++            vsud->inGroup = false;
++            return;
++        } else if( strcasecmp( (const char *)name, "groupSet" ) == 0 ) {
++            vsud->inGroupSet = false;
++            return;
++        }
++    }
++
++    if( vsud->inInstance && strcasecmp( (const char *)name, "item" ) == 0 ) {
++        // We assume that the security group list (GroupItemType groupSet)
++        // always appears in the XML stream (in the reservationInfoType
++        // reservationSet) before the corresponding instancesSet.
++        vsud->currentResult->securityGroups = vsud->currentSecurityGroups;
++        vsud->results.push_back( * vsud->currentResult );
++        delete vsud->currentResult;
++        vsud->currentResult = NULL;
++        vsud->inInstance = false;
++        return;
++    }
++    
++    if( vsud->inInstancesSet && strcasecmp( (const char *)name, "instancesSet" ) == 0 ) {
++        vsud->inInstancesSet = false;
++        return;
++    }
++
++    if( strcasecmp( (const char *)name, "instanceState" ) == 0 ) {
++        vsud->inInstanceState = false;
++        return;
++    }
++    
++    vsud->inWhichTag = vmStatusUD::NONE;
++} 
++
++bool AmazonVMStatusAll::SendRequest() {
++    bool result = AmazonRequest::SendRequest();
++    if( result ) {
++        vmStatusUD vsud( this->results );
++        XML_Parser xp = XML_ParserCreate( NULL );
++        XML_SetElementHandler( xp, & vmStatusESH, & vmStatusEEH );
++        XML_SetCharacterDataHandler( xp, & vmStatusCDH );
++        XML_SetUserData( xp, & vsud );
++        XML_Parse( xp, this->resultString.c_str(), this->resultString.length(), 1 );
++        XML_ParserFree( xp );
++    }
++    return result;
++}
++
++// Expecting:EC2_VM_STATUS_ALL <req_id> <serviceurl> <accesskeyfile> <secretkeyfile>
++bool AmazonVMStatusAll::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_STATUS_ALL" ) == 0 );
++
++    // Uses the Query API function 'DescribeInstances', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 5 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 5, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMStatusAll saRequest;
++    saRequest.serviceURL = argv[2];
++    saRequest.accessKeyFile = argv[3];
++    saRequest.secretKeyFile = argv[4];
++    saRequest.query_parameters[ "Action" ] = "DescribeInstances";
++    
++    // Send the request.
++    if( ! saRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            saRequest.errorMessage.c_str(),
++            saRequest.errorCode.c_str() );
++    } else {
++        if( saRequest.results.size() == 0 ) {
++            result_string = create_success_result( requestID, NULL );
++        } else {
++            StringList resultList;
++            for( unsigned i = 0; i < saRequest.results.size(); ++i ) {
++                AmazonStatusResult & asr = saRequest.results[i];
++                resultList.append( asr.instance_id.c_str() );
++                resultList.append( asr.status.c_str() );
++                resultList.append( asr.ami_id.c_str() );
++                
++//                dprintf( D_ALWAYS, "DEBUG: '%s' '%s' '%s' '%s' '%s' '%s' '%s'\n",
++//                    asr.instance_id.c_str(),
++//                    asr.status.c_str(),
++//                    asr.ami_id.c_str(),
++//                    asr.private_dns.c_str(),
++//                    asr.public_dns.c_str(),
++//                    asr.keyname.c_str(),
++//                    asr.instancetype.c_str() );
++
++//                std::string sgList;
++//                for( unsigned j = 0; j < asr.securityGroups.size(); ++j ) {
++//                    sgList += "'" + asr.securityGroups[j] + "' ";
++//                }
++//                dprintf( D_ALWAYS, "DEBUG: with security group(s): %s\n", sgList.c_str() );
++            }
++            result_string = create_success_result( requestID, & resultList );
++        }
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMRunningKeypair::AmazonVMRunningKeypair() { }
++
++AmazonVMRunningKeypair::~AmazonVMRunningKeypair() { }
++
++// Expecting:EC2_VM_RUNNING_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile>
++bool AmazonVMRunningKeypair::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_RUNNING_KEYPAIR" ) == 0 );
++
++    // Uses the Query API function 'DescribeInstances', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 5 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 5, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMRunningKeypair rkpRequest;
++    rkpRequest.serviceURL = argv[2];
++    rkpRequest.accessKeyFile = argv[3];
++    rkpRequest.secretKeyFile = argv[4];
++    rkpRequest.query_parameters[ "Action" ] = "DescribeInstances";
++    
++    // Send the request.
++    if( ! rkpRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            rkpRequest.errorMessage.c_str(),
++            rkpRequest.errorCode.c_str() );
++    } else {
++        if( rkpRequest.results.size() == 0 ) {
++            result_string = create_success_result( requestID, NULL );
++        } else {
++            StringList resultList;
++            for( unsigned i = 0; i < rkpRequest.results.size(); ++i ) {
++                AmazonStatusResult & asr = rkpRequest.results[i];
++
++                // The original SOAP-based GAHP didn't filter the 'running'
++                // key pairs based on their status, so we won't either.
++                if( ! asr.keyname.empty() ) {
++                    resultList.append( asr.instance_id.c_str() );
++                    resultList.append( asr.keyname.c_str() );
++                }
++            }
++            result_string = create_success_result( requestID, & resultList );
++        }            
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMCreateKeypair::AmazonVMCreateKeypair() { }
++
++AmazonVMCreateKeypair::~AmazonVMCreateKeypair() { }
++
++struct privateKeyUD_t {
++    bool inKeyMaterial;
++    std::string keyMaterial;
++    
++    privateKeyUD_t() : inKeyMaterial( false ) { }
++};
++typedef struct privateKeyUD_t privateKeyUD;
++
++void createKeypairESH( void * vUserData, const XML_Char * name, const XML_Char ** ) {
++    privateKeyUD * pkud = (privateKeyUD *)vUserData;
++    if( strcasecmp( (const char *)name, "keyMaterial" ) == 0 ) {
++        pkud->inKeyMaterial = true;
++    }
++}
++
++void createKeypairCDH( void * vUserData, const XML_Char * cdata, int len ) {
++    privateKeyUD * pkud = (privateKeyUD *)vUserData;
++    if( pkud->inKeyMaterial ) {
++        appendToString( (void *)cdata, len, 1, (void *) & pkud->keyMaterial );
++    }
++}
++
++void createKeypairEEH( void * vUserData, const XML_Char * name ) {
++    privateKeyUD * pkud = (privateKeyUD *)vUserData;
++    if( strcasecmp( (const char *)name, "keyMaterial" ) == 0 ) {
++        pkud->inKeyMaterial = false;
++    }    
++}
++
++bool AmazonVMCreateKeypair::SendRequest() {
++    bool result = AmazonRequest::SendRequest();
++    if( result ) {
++        privateKeyUD pkud;
++        XML_Parser xp = XML_ParserCreate( NULL );
++        XML_SetElementHandler( xp, & createKeypairESH, & createKeypairEEH );
++        XML_SetCharacterDataHandler( xp, & createKeypairCDH );
++        XML_SetUserData( xp, & pkud );
++        XML_Parse( xp, this->resultString.c_str(), this->resultString.length(), 1 );
++        XML_ParserFree( xp );
++
++        if( ! writeShortFile( this->privateKeyFileName, pkud.keyMaterial ) ) {
++            this->errorCode = "E_FILE_IO";
++            this->errorMessage = "Failed to write private key to file.";
++            dprintf( D_ALWAYS, "Failed to write private key material to '%s', failing.\n",
++                this->privateKeyFileName.c_str() );
++            return false;
++        }
++    } else {
++        if( this->errorCode == "E_CURL_IO" ) {
++            // To be on the safe side, if the I/O failed, make the gridmanager
++            // check to see the keys were created or not.
++            this->errorCode = "NEED_CHECK_SSHKEY";
++            return false;
++        }
++    }
++    return result;
++}
++
++// Expecting:EC2_VM_CREATE_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <keyname> <outputfile>
++bool AmazonVMCreateKeypair::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_CREATE_KEYPAIR" ) == 0 );
++
++    // Uses the Query API function 'CreateKeyPair', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateKeyPair.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 7 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 7, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMCreateKeypair ckpRequest;
++    ckpRequest.serviceURL = argv[2];
++    ckpRequest.accessKeyFile = argv[3];
++    ckpRequest.secretKeyFile = argv[4];
++    ckpRequest.query_parameters[ "Action" ] = "CreateKeyPair";
++    ckpRequest.query_parameters[ "KeyName" ] = argv[5];
++    ckpRequest.privateKeyFileName = argv[6];
++
++    // Send the request.
++    if( ! ckpRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            ckpRequest.errorMessage.c_str(),
++            ckpRequest.errorCode.c_str() );
++    } else {
++        result_string = create_success_result( requestID, NULL );
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMDestroyKeypair::AmazonVMDestroyKeypair() { }
++
++AmazonVMDestroyKeypair::~AmazonVMDestroyKeypair() { }
++
++// Expecting:EC2_VM_DESTROY_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <keyname>
++bool AmazonVMDestroyKeypair::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_DESTROY_KEYPAIR" ) == 0 );
++
++    // Uses the Query API function 'DeleteKeyPair', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteKeyPair.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 6 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 6, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMDestroyKeypair dkpRequest;
++    dkpRequest.serviceURL = argv[2];
++    dkpRequest.accessKeyFile = argv[3];
++    dkpRequest.secretKeyFile = argv[4];
++    dkpRequest.query_parameters[ "Action" ] = "DeleteKeyPair";
++    dkpRequest.query_parameters[ "KeyName" ] = argv[5];
++
++    // Send the request.
++    if( ! dkpRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            dkpRequest.errorMessage.c_str(),
++            dkpRequest.errorCode.c_str() );
++    } else {
++        result_string = create_success_result( requestID, NULL );
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonVMKeypairNames::AmazonVMKeypairNames() { }
++
++AmazonVMKeypairNames::~AmazonVMKeypairNames() { }
++
++struct keyNamesUD_t {
++    bool inKeyName;
++    std::string keyName;
++    StringList & keyNameList;
++    
++    keyNamesUD_t( StringList & slr ) : inKeyName( false ), keyName(), keyNameList( slr ) { }
++};
++typedef struct keyNamesUD_t keyNamesUD;
++
++//
++// Technically, all the const XML_Char * strings are encoded in UTF-8.
++// We'll ignore that for now and assume they're in ASCII.
++//
++
++// EntityStartHandler
++void keypairNamesESH( void * vUserData, const XML_Char * name, const XML_Char ** ) {
++    keyNamesUD * knud = (keyNamesUD *)vUserData;
++    if( strcasecmp( (const char *)name, "KeyName" ) == 0 ) {
++        knud->inKeyName = true;
++    }
++}
++
++// CharacterDataHandler
++void keypairNamesCDH( void * vUserData, const XML_Char * cdata, int len ) {
++    keyNamesUD * knud = (keyNamesUD *)vUserData;
++    if( knud->inKeyName ) {
++        appendToString( (void *)cdata, len, 1, (void *) & knud->keyName );
++    }
++}
++
++// EntityEndHandler
++void keypairNamesEEH( void * vUserData, const XML_Char * name ) {
++    keyNamesUD * knud = (keyNamesUD *)vUserData;
++    if( strcasecmp( (const char *)name, "KeyName" ) == 0 ) {
++        knud->inKeyName = false;
++        // dprintf( D_ALWAYS, "DEBUG: found end of name '%s'\n", knud->keyName.c_str() );
++        knud->keyNameList.append( knud->keyName.c_str() );
++        knud->keyName.clear();
++    }
++}
++
++bool AmazonVMKeypairNames::SendRequest() {
++    bool result = AmazonRequest::SendRequest();
++    if( result ) {
++        // dprintf( D_ALWAYS, "DEBUG: '%s'\n", this->resultString.c_str() );
++        keyNamesUD knud( this->keyNames );
++        XML_Parser xp = XML_ParserCreate( NULL );
++        XML_SetElementHandler( xp, & keypairNamesESH, & keypairNamesEEH );
++        XML_SetCharacterDataHandler( xp, & keypairNamesCDH );
++        XML_SetUserData( xp, & knud );
++        XML_Parse( xp, this->resultString.c_str(), this->resultString.length(), 1 );
++        XML_ParserFree( xp );
++    }
++    return result;
++}
++
++// Expecting:EC2_VM_KEYPAIR_NAMES <req_id> <serviceurl> <accesskeyfile> <secretkeyfile>
++bool AmazonVMKeypairNames::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_KEYPAIR_NAMES" ) == 0 );
++
++    // Uses the Query API function 'DescribeKeyPairs', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 5 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n",
++                 argc, 5, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonVMKeypairNames keypairRequest;
++    keypairRequest.serviceURL = argv[2];
++    keypairRequest.accessKeyFile = argv[3];
++    keypairRequest.secretKeyFile = argv[4];
++    keypairRequest.query_parameters[ "Action" ] = "DescribeKeyPairs";
++
++    // Send the request.
++    if( ! keypairRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            keypairRequest.errorMessage.c_str(),
++            keypairRequest.errorCode.c_str() );
++    } else {
++        result_string = create_success_result( requestID, & keypairRequest.keyNames );
++    }
++
++    return true;
++}
++
++// ---------------------------------------------------------------------------
++
++AmazonAssociateAddress::AmazonAssociateAddress() { }
++
++AmazonAssociateAddress::~AmazonAssociateAddress() { }
++
++// Expecting:EC2_VM_ASSOCIATE_ADDRESS <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id> <elastic-ip>
++bool AmazonAssociateAddress::workerFunction(char **argv, int argc, std::string &result_string) {
++    assert( strcmp( argv[0], "EC2_VM_ASSOCIATE_ADDRESS" ) == 0 );
++
++    // Uses the Query API function 'AssociateAddress', as documented at
++    // http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-AssociateAddress.html
++
++    int requestID;
++    get_int( argv[1], & requestID );
++    
++    if( ! verify_min_number_args( argc, 7 ) ) {
++        result_string = create_failure_result( requestID, "Wrong_Argument_Number" );
++        dprintf( D_ALWAYS, "Wrong number of arguments (%d should be >= %d) to %s\n", argc, 7, argv[0] );
++        return false;
++    }
++
++    // Fill in required attributes & parameters.
++    AmazonAssociateAddress asRequest;
++    asRequest.serviceURL = argv[2];
++    asRequest.accessKeyFile = argv[3];
++    asRequest.secretKeyFile = argv[4];
++    asRequest.query_parameters[ "Action" ] = "AssociateAddress";
++    asRequest.query_parameters[ "InstanceId" ] = argv[5];
++    asRequest.query_parameters[ "PublicIp" ] = argv[6];
++    //std::string instanceID = argv[5];
++    //std::string elasticIP = argv[6];
++
++    // Send the request.
++    if( ! asRequest.SendRequest() ) {
++        result_string = create_failure_result( requestID,
++            asRequest.errorMessage.c_str(),
++            asRequest.errorCode.c_str() );
++    } else {
++        result_string = create_success_result( requestID, NULL );
++    }
++
++    return true;
++}
++
+diff --git a/src/ec2_gahp/amazonCommands.h b/src/ec2_gahp/amazonCommands.h
+new file mode 100644
+index 0000000..f7c9d8d
+--- /dev/null
++++ b/src/ec2_gahp/amazonCommands.h
+@@ -0,0 +1,208 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef AMAZON_COMMANDS_H
++#define AMAZON_COMMANDS_H
++
++#include "condor_common.h"
++#include "condor_string.h"
++#include "MyString.h"
++#include "string_list.h"
++
++#include <map>
++
++// EC2 Commands
++#define AMAZON_COMMAND_VM_START             "EC2_VM_START"
++#define AMAZON_COMMAND_VM_STOP              "EC2_VM_STOP"
++#define AMAZON_COMMAND_VM_REBOOT            "EC2_VM_REBOOT"
++#define AMAZON_COMMAND_VM_STATUS            "EC2_VM_STATUS"
++#define AMAZON_COMMAND_VM_STATUS_ALL        "EC2_VM_STATUS_ALL"
++#define AMAZON_COMMAND_VM_RUNNING_KEYPAIR   "EC2_VM_RUNNING_KEYPAIR"
++#define AMAZON_COMMAND_VM_CREATE_GROUP      "EC2_VM_CREATE_GROUP"
++#define AMAZON_COMMAND_VM_DELETE_GROUP      "EC2_VM_DELETE_GROUP"
++#define AMAZON_COMMAND_VM_GROUP_NAMES       "EC2_VM_GROUP_NAMES"
++#define AMAZON_COMMAND_VM_GROUP_RULES       "EC2_VM_GROUP_RULES"
++#define AMAZON_COMMAND_VM_ADD_GROUP_RULE    "EC2_VM_ADD_GROUP_RULE"
++#define AMAZON_COMMAND_VM_DEL_GROUP_RULE    "EC2_VM_DEL_GROUP_RULE"
++#define AMAZON_COMMAND_VM_CREATE_KEYPAIR    "EC2_VM_CREATE_KEYPAIR"
++#define AMAZON_COMMAND_VM_DESTROY_KEYPAIR   "EC2_VM_DESTROY_KEYPAIR"
++#define AMAZON_COMMAND_VM_KEYPAIR_NAMES     "EC2_VM_KEYPAIR_NAMES"
++#define AMAZON_COMMAND_VM_REGISTER_IMAGE    "EC2_VM_REGISTER_IMAGE"
++#define AMAZON_COMMAND_VM_DEREGISTER_IMAGE  "EC2_VM_DEREGISTER_IMAGE"
++#define AMAZON_COMMAND_VM_ASSOCIATE_ADDRESS "EC2_VM_ASSOCIATE_ADDRESS"
++//#define AMAZON_COMMAND_VM_DISASSOCIATE_ADDRESS   "EC2_VM_DISASSOCIATE_ADDRESS"
++
++// S3 Commands
++#define AMAZON_COMMAND_S3_ALL_BUCKETS       "AMAZON_S3_ALL_BUCKETS"
++#define AMAZON_COMMAND_S3_CREATE_BUCKET     "AMAZON_S3_CREATE_BUCKET"
++#define AMAZON_COMMAND_S3_DELETE_BUCKET     "AMAZON_S3_DELETE_BUCKET"
++#define AMAZON_COMMAND_S3_LIST_BUCKET       "AMAZON_S3_LIST_BUCKET"
++#define AMAZON_COMMAND_S3_UPLOAD_FILE       "AMAZON_S3_UPLOAD_FILE"
++#define AMAZON_COMMAND_S3_UPLOAD_DIR        "AMAZON_S3_UPLOAD_DIR"
++#define AMAZON_COMMAND_S3_DELETE_FILE       "AMAZON_S3_DELETE_FILE"
++#define AMAZON_COMMAND_S3_DOWNLOAD_FILE     "AMAZON_S3_DOWNLOAD_FILE"
++#define AMAZON_COMMAND_S3_DOWNLOAD_BUCKET   "AMAZON_S3_DOWNLOAD_BUCKET"
++
++#define GENERAL_GAHP_ERROR_CODE             "GAHPERROR"
++#define GENERAL_GAHP_ERROR_MSG              "GAHP_ERROR"
++
++class AmazonRequest {
++	public:
++		AmazonRequest();
++		virtual ~AmazonRequest();
++
++        virtual bool SendRequest();
++
++    protected:
++        typedef std::map< std::string, std::string > AttributeValueMap;
++        AttributeValueMap query_parameters;
++        
++        std::string serviceURL;
++        std::string accessKeyFile;
++        std::string secretKeyFile;
++        
++        std::string errorMessage;
++        std::string errorCode;
++        
++        std::string resultString;
++};
++
++// EC2 Commands
++
++class AmazonVMStart : public AmazonRequest {
++	public:
++		AmazonVMStart();
++		virtual ~AmazonVMStart();
++
++        virtual bool SendRequest();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++
++    protected:
++        std::string instanceID;
++};
++
++class AmazonVMStop : public AmazonRequest {
++	public:
++		AmazonVMStop();
++		virtual ~AmazonVMStop();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++};
++
++#define AMAZON_STATUS_RUNNING "running"
++#define AMAZON_STATUS_PENDING "pending"
++#define AMAZON_STATUS_SHUTTING_DOWN "shutting-down"
++#define AMAZON_STATUS_TERMINATED "terminated"
++
++class AmazonStatusResult {
++	public:
++		std::string instance_id;
++		std::string status;
++		std::string ami_id;
++		std::string public_dns;
++		std::string private_dns;
++		std::string keyname;
++		std::string instancetype;
++
++        std::vector< std::string > securityGroups;
++};
++
++class AmazonVMStatusAll : public AmazonRequest {
++	public:
++		AmazonVMStatusAll();
++		virtual ~AmazonVMStatusAll();
++
++        virtual bool SendRequest();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++
++    protected:
++        std::vector< AmazonStatusResult > results;
++};
++
++class AmazonVMStatus : public AmazonVMStatusAll {
++	public:
++		AmazonVMStatus();
++		virtual ~AmazonVMStatus();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++};
++
++class AmazonVMRunningKeypair : public AmazonVMStatusAll {
++	public:
++		AmazonVMRunningKeypair();
++		virtual ~AmazonVMRunningKeypair();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++};
++
++class AmazonVMCreateKeypair : public AmazonRequest {
++	public:
++		AmazonVMCreateKeypair();
++		virtual ~AmazonVMCreateKeypair();
++
++        virtual bool SendRequest();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++
++    protected:
++    	std::string privateKeyFileName;
++};
++
++class AmazonVMDestroyKeypair : public AmazonRequest {
++	public:
++		AmazonVMDestroyKeypair();
++		virtual ~AmazonVMDestroyKeypair();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++};
++
++class AmazonVMKeypairNames : public AmazonRequest {
++	public:
++		AmazonVMKeypairNames();
++		virtual ~AmazonVMKeypairNames();
++
++        virtual bool SendRequest();
++
++		static bool ioCheck(char **argv, int argc);
++		static bool workerFunction(char **argv, int argc, std::string &result_string);
++
++    protected:
++        StringList keyNames;
++};
++
++class AmazonAssociateAddress : public AmazonRequest {
++    public:
++        AmazonAssociateAddress();
++        virtual ~AmazonAssociateAddress();
++
++        static bool ioCheck(char **argv, int argc);
++        static bool workerFunction(char **argv, int argc, std::string &result_string);
++};
++
++
++#endif
+diff --git a/src/ec2_gahp/amazon_io_checkfn.cpp b/src/ec2_gahp/amazon_io_checkfn.cpp
+new file mode 100644
+index 0000000..cd98fd5
+--- /dev/null
++++ b/src/ec2_gahp/amazon_io_checkfn.cpp
+@@ -0,0 +1,136 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "condor_config.h"
++#include "condor_string.h"
++#include "string_list.h"
++#include "condor_arglist.h"
++#include "util_lib_proto.h"
++#include "internet.h"
++#include "basename.h"
++#include "amazongahp_common.h"
++#include "amazonCommands.h"
++
++// Expecting:EC2_VM_START <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <ami-id> <keypair> <userdata> <userdatafile> <instancetype> <groupname> <groupname> ..
++// <groupname> are optional ones.
++// we support multiple groupnames
++bool AmazonVMStart::ioCheck(char **argv, int argc)
++{
++	return verify_min_number_args(argc, 10) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]) &&
++		verify_string_name(argv[5]) &&
++		verify_string_name(argv[6]) &&
++		verify_string_name(argv[7]) &&
++		verify_string_name(argv[8]) &&
++		verify_string_name(argv[9]);
++}
++
++// Expecting:EC2_VM_STOP <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id>
++bool AmazonVMStop::ioCheck(char **argv, int argc)
++{
++	return verify_number_args(argc, 6) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]) &&
++		verify_string_name(argv[5]);
++}
++
++// Expecting:EC2_VM_STATUS <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id>
++bool AmazonVMStatus::ioCheck(char **argv, int argc)
++{
++	return verify_number_args(argc, 6) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]) &&
++		verify_string_name(argv[5]);
++}
++
++// Expecting:EC2_VM_STATUS <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <instance-id> <elastic-ip>
++bool AmazonAssociateAddress::ioCheck(char **argv, int argc)
++{
++    return verify_number_args(argc, 7) &&
++        verify_request_id(argv[1]) &&
++        verify_string_name(argv[2]) &&
++        verify_string_name(argv[3]) &&
++        verify_string_name(argv[4]) &&
++        verify_string_name(argv[5]) && 
++        verify_string_name(argv[6]);
++}
++
++// Expecting:EC2_VM_STATUS_ALL <req_id> <serviceurl> <accesskeyfile> <secretkeyfile>
++bool AmazonVMStatusAll::ioCheck(char **argv, int argc)
++{
++	return verify_min_number_args(argc, 5) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]);
++}
++
++// Expecting:EC2_VM_RUNNING_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <Status>
++// <Status> is optional field. If <Status> is specified, the keypair which belongs to VM with the status will be listed.
++
++bool AmazonVMRunningKeypair::ioCheck(char **argv, int argc)
++{
++	return verify_min_number_args(argc, 5) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]);
++}
++
++// Expecting:EC2_VM_CREATE_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <keyname> <outputfile>
++bool AmazonVMCreateKeypair::ioCheck(char **argv, int argc)
++{
++	return verify_number_args(argc, 7) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]) &&
++		verify_string_name(argv[5]) &&
++		verify_string_name(argv[6]);
++}
++
++// Expecting:EC2_VM_DESTROY_KEYPAIR <req_id> <serviceurl> <accesskeyfile> <secretkeyfile> <keyname>
++bool AmazonVMDestroyKeypair::ioCheck(char **argv, int argc)
++{
++	return verify_number_args(argc, 6) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]) &&
++		verify_string_name(argv[5]);
++}
++
++// Expecting:EC2_VM_KEYPAIR_NAMES <req_id> <serviceurl> <accesskeyfile> <secretkeyfile>
++bool AmazonVMKeypairNames::ioCheck(char **argv, int argc)
++{
++	return verify_number_args(argc, 5) &&
++		verify_request_id(argv[1]) &&
++		verify_string_name(argv[2]) &&
++		verify_string_name(argv[3]) &&
++		verify_string_name(argv[4]);
++}
+diff --git a/src/ec2_gahp/amazongahp_common.cpp b/src/ec2_gahp/amazongahp_common.cpp
+new file mode 100644
+index 0000000..aea93ea
+--- /dev/null
++++ b/src/ec2_gahp/amazongahp_common.cpp
+@@ -0,0 +1,478 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "condor_config.h"
++#include "simplelist.h"
++#include "amazongahp_common.h"
++#include "amazonCommands.h"
++
++static std::string amazon_proxy_host;
++static int amazon_proxy_port;
++static std::string amazon_proxy_user;
++static std::string amazon_proxy_passwd;
++
++// List for all amazon commands
++static SimpleList<AmazonGahpCommand*> amazon_gahp_commands;
++
++static FILE *gahp_log_file = stderr;
++
++// This variable is defined in dprintf.c
++extern FILE *DebugFP;
++
++bool set_gahp_log_file(const char* logfile)
++{
++	static bool done_init = false;
++
++	DebugFP = stderr;
++	Termlog = 1;
++
++	if( !done_init ) {
++		dprintf_config("");
++		set_debug_flags( "D_ALWAYS" );
++		done_init = true;
++	}
++
++	if( !logfile ) {
++		return false;
++	}
++
++	if( gahp_log_file && ( gahp_log_file != stderr ) ) {
++		fclose(gahp_log_file);
++		gahp_log_file = stderr;
++	}
++
++	FILE *fp = NULL;
++	fp = safe_fopen_wrapper(logfile, "a", 0644);
++
++	if( !fp ) {
++		fprintf(stderr, "failed to safe_fopen_wrapper %s in append mode: "
++				"safe_fopen_wrapper returns %s\n", logfile, strerror(errno));
++		return false;
++	}
++
++	gahp_log_file = fp;
++	DebugFP = fp;
++
++	//DebugLock = ;
++	return true;
++}
++
++void set_amazon_proxy_server(const char* url) 
++{
++	if( !url ) {
++		return;
++	}
++
++	// Need to parse host name and port
++	if( !strncasecmp("http://", url, strlen("http://"))) {
++		amazon_proxy_host = url +  strlen("http://");
++		amazon_proxy_port = 80;
++	}else if( !strncasecmp("https://", url, strlen("https://")) ) { 
++		amazon_proxy_host = url +  strlen("https://");
++		amazon_proxy_port = 443;
++	}else {
++		amazon_proxy_host = url;
++		amazon_proxy_port = 80;
++	}
++	
++	/* sateesh added code to even handle proxy username and password */
++	/* This code cannot handle passwords containing @ ? */
++	/* Exact format of AMAZON_HTTP_PROXY is -- http://userid:password@host:port */
++    size_t pos = amazon_proxy_host.find('@');
++	if( std::string::npos != pos ) {
++	  amazon_proxy_user = amazon_proxy_host.substr(0, pos);
++	  
++	  amazon_proxy_host = amazon_proxy_host.substr(pos + 1,
++		  amazon_proxy_host.length());
++
++      pos = amazon_proxy_user.find(':');
++	  if( std::string::npos != pos ) {
++		amazon_proxy_passwd = amazon_proxy_user.substr(pos + 1,
++			amazon_proxy_user.length());
++		amazon_proxy_user = amazon_proxy_user.substr(0, pos);
++	  }
++	}
++
++    pos = amazon_proxy_host.find(':');
++	if( std::string::npos != pos ) {
++		int port =
++			atoi(amazon_proxy_host.substr(pos + 1,
++										  amazon_proxy_host.length()).c_str());
++
++		if( port > 0 ) {
++			amazon_proxy_port = port;
++		}
++
++		amazon_proxy_host = amazon_proxy_host.substr(0, pos);
++	}
++         
++	dprintf(D_ALWAYS, "Using proxy server, host=%s, port=%d user=%s\n", 
++		amazon_proxy_host.c_str(), amazon_proxy_port, 
++		amazon_proxy_user.c_str());
++}
++
++bool get_amazon_proxy_server(const char* &host_name, int& port, const char* &user_name, const char* &passwd )
++{
++	if( amazon_proxy_host.empty() == false ) {
++		host_name = amazon_proxy_host.c_str();
++		port = amazon_proxy_port;
++		user_name = amazon_proxy_user.c_str();
++		passwd = amazon_proxy_passwd.c_str();
++		return true;
++	}
++
++	return false;
++}
++
++AmazonGahpCommand::AmazonGahpCommand(const char* cmd, ioCheckfn iofunc, workerfn workerfunc)
++{
++	command = cmd;
++	iocheckfunction = iofunc;
++	workerfunction = workerfunc;
++}
++
++void
++registerAmazonGahpCommand(const char* command, ioCheckfn iofunc, workerfn workerfunc)
++{
++	if( !command ) {
++		return;
++	}
++
++	AmazonGahpCommand* newcommand = new AmazonGahpCommand(command, iofunc, workerfunc);
++	ASSERT(newcommand);
++
++	amazon_gahp_commands.Append(newcommand);
++}
++
++int
++numofAmazonCommands(void)
++{
++	return amazon_gahp_commands.Number();
++}
++
++int 
++allAmazonCommands(StringList &output)
++{
++	AmazonGahpCommand *one_cmd = NULL;
++
++	amazon_gahp_commands.Rewind();
++	while( amazon_gahp_commands.Next(one_cmd) ) {
++		output.append(one_cmd->command.c_str());
++	}
++
++	return amazon_gahp_commands.Number();
++}
++
++bool
++executeIOCheckFunc(const char* cmd, char **argv, int argc)
++{
++	if(!cmd) {
++		return false;
++	}
++
++	AmazonGahpCommand *one_cmd = NULL;
++
++	amazon_gahp_commands.Rewind();
++	while( amazon_gahp_commands.Next(one_cmd) ) {
++		if( !strcasecmp(one_cmd->command.c_str(), cmd) && 
++		 	one_cmd->iocheckfunction ) {
++			return one_cmd->iocheckfunction(argv, argc);
++		}
++	}
++
++	dprintf (D_ALWAYS, "Unknown command %s\n", cmd);
++	return false;
++}
++
++bool
++executeWorkerFunc(const char* cmd, char **argv, int argc, std::string &output_string)
++{
++	if(!cmd) {
++		return false;
++	}
++
++	AmazonGahpCommand *one_cmd = NULL;
++
++	amazon_gahp_commands.Rewind();
++	while( amazon_gahp_commands.Next(one_cmd) ) {
++		if( !strcasecmp(one_cmd->command.c_str(), cmd) && 
++			one_cmd->workerfunction ) {
++			return one_cmd->workerfunction(argv, argc, output_string);
++		}
++	}
++	dprintf (D_ALWAYS, "Unknown command %s\n", cmd);
++	return false;
++}
++
++int
++parse_gahp_command (const char* raw, Gahp_Args* args) {
++
++	if (!raw) {
++		dprintf(D_ALWAYS,"ERROR parse_gahp_command: empty command\n");
++		return FALSE;
++	}
++
++	args->reset();
++
++	int beginning = 0;
++
++	int len=strlen(raw);
++
++	char * buff = (char*)malloc(len+1);
++	int buff_len = 0;
++
++	for (int i = 0; i<len; i++) {
++
++		if ( raw[i] == '\\' ) {
++			i++; 			//skip this char
++			if (i<(len-1))
++				buff[buff_len++] = raw[i];
++			continue;
++		}
++
++		/* Check if charcater read was whitespace */
++		if ( raw[i]==' ' || raw[i]=='\t' || raw[i]=='\r' || raw[i] == '\n') {
++
++			/* Handle Transparency: we would only see these chars
++			if they WEREN'T escaped, so treat them as arg separators
++			*/
++			buff[buff_len++] = '\0';
++			args->add_arg( strdup(buff) );
++			buff_len = 0;	// re-set temporary buffer
++
++			beginning = i+1; // next char will be one after whitespace
++		}
++		else {
++			// It's just a regular character, save it
++			buff[buff_len++] = raw[i];
++		}
++	}
++
++	/* Copy the last portion */
++	buff[buff_len++] = '\0';
++	args->add_arg( strdup(buff) );
++
++	free (buff);
++	return TRUE;
++}
++
++bool
++check_read_access_file(const char *file)
++{
++	if( !file || file[0] == '\0' ) {
++		return false;
++	}
++
++	int ret = access(file, R_OK);
++
++	if(ret < 0 ) {
++		dprintf(D_ALWAYS, "File(%s) can't be read\n", file);
++		return false;
++	}
++
++	return true;
++}
++
++bool
++check_create_file(const char *file, mode_t mode)
++{
++	if( !file || file[0] == '\0' ) {
++		return false;
++	}
++
++	FILE *fp = NULL;
++
++	fp = safe_fopen_wrapper(file, "w", mode);
++	if( !fp ) {
++		dprintf(D_ALWAYS, "failed to safe_fopen_wrapper %s in write mode: "
++				"safe_fopen_wrapper returns %s\n", file, strerror(errno));
++		return false;
++	}
++
++	fclose(fp);
++	return true;
++}
++
++int
++verify_number_args (const int is, const int should_be) {
++	if (is != should_be) {
++		dprintf (D_ALWAYS, "Wrong # of args %d, should be %d\n", is, should_be);
++		return FALSE;
++	}
++	return TRUE;
++}
++
++int
++verify_min_number_args (const int is, const int minimum) {
++	if (is < minimum ) {
++		dprintf (D_ALWAYS, "Wrong # of args %d, should be more than or equal to %d\n", is, minimum);
++		return FALSE;
++	}
++	return TRUE;
++}
++
++int
++verify_request_id (const char * s) {
++    unsigned int i;
++	for (i=0; i<strlen(s); i++) {
++		if (!isdigit(s[i])) {
++			dprintf (D_ALWAYS, "Bad request id %s\n", s);
++			return FALSE;
++		}
++	}
++
++	return TRUE;
++}
++
++int
++verify_string_name(const char * s) {
++	if( !( (s != NULL) && (strlen(s) > 0) ) ) {
++		dprintf (D_ALWAYS, "NULL string\n");
++		return false;
++	}
++    return true;
++}
++
++int
++verify_number (const char * s) {
++	if (!s || !(*s)) {
++		dprintf (D_ALWAYS, "No digit number\n");
++		return FALSE;
++	}
++	
++	int i=0;
++   
++	do {
++		if (s[i]<'0' || s[i]>'9') {
++			dprintf (D_ALWAYS, "Bad digit number %s\n", s);
++			return FALSE;
++		}
++	} while (s[++i]);
++
++	return TRUE;
++}
++
++bool check_access_and_secret_key_file(const char* accesskeyfile, const char* secretkeyfile, std::string &err_msg)
++{
++	// check the accesskeyfile
++	if( !check_read_access_file(accesskeyfile) ) {
++		sprintf(err_msg, "Cannot_read_access_key_file(%s)", accesskeyfile? accesskeyfile:"");
++		dprintf (D_ALWAYS, "Error: %s\n", err_msg.c_str());
++		return false;
++	}
++
++	// check the accesskeyfile and secretkeyfile
++	if( !check_read_access_file(secretkeyfile) ) {
++		sprintf(err_msg, "Cannot_read_secret_key_file(%s)", secretkeyfile? secretkeyfile:"");
++		dprintf (D_ALWAYS, "Error: %s\n", err_msg.c_str());
++		return false;
++	}
++
++	return true;
++}
++
++// String -> int
++int
++get_int (const char * blah, int * s) {
++	*s = atoi(blah);
++	return TRUE;
++}
++
++int
++get_ulong (const char * blah, unsigned long * s) {
++	*s=(unsigned long)atol(blah);
++	return TRUE;
++}
++
++std::string
++create_output_string (int req_id, const char ** results, const int argc)
++{
++	std::string buffer;
++
++	sprintf( buffer, "%d", req_id );
++
++	for ( int i = 0; i < argc; i++ ) {
++		buffer += ' ';
++		if ( results[i] == NULL ) {
++			buffer += "NULL";
++		} else {
++			for ( int j = 0; results[i][j] != '\0'; j++ ) {
++				switch ( results[i][j] ) {
++				case ' ':
++				case '\\':
++				case '\r':
++				case '\n':
++					buffer += '\\';
++				default:
++					buffer += results[i][j];
++				}
++			}
++		}
++	}
++
++	buffer += '\n';
++	return buffer;
++}
++
++std::string
++create_success_result( int req_id, StringList *result_list)
++{
++	int index_count = 1;
++	if( !result_list || (result_list->number() == 0) ) {
++		index_count = 1;
++	}else {
++		index_count = result_list->number();
++	}
++
++	const char *tmp_result[index_count];
++
++	tmp_result[0] = AMAZON_COMMAND_SUCCESS_OUTPUT;
++
++	int i = 1;
++	if( result_list && (result_list->number() > 0) ) {
++		char *one_result = NULL;
++		result_list->rewind();
++		while((one_result = result_list->next()) != NULL ) {
++			tmp_result[i] = one_result;
++			i++;
++		}
++	}
++
++	return create_output_string (req_id, tmp_result, i);
++}
++
++std::string
++create_failure_result( int req_id, const char *err_msg, const char* err_code)
++{
++	const char *tmp_result[3];
++	tmp_result[0] = AMAZON_COMMAND_ERROR_OUTPUT;
++
++	if( !err_code ) {
++		err_code = GENERAL_GAHP_ERROR_CODE;
++	}
++	if( !err_msg ) {
++		err_msg = GENERAL_GAHP_ERROR_MSG;
++	}
++	tmp_result[1] = err_code;
++	tmp_result[2] = err_msg;
++
++	return create_output_string(req_id, tmp_result, 3);
++}
+diff --git a/src/ec2_gahp/amazongahp_common.h b/src/ec2_gahp/amazongahp_common.h
+new file mode 100644
+index 0000000..6ebea36
+--- /dev/null
++++ b/src/ec2_gahp/amazongahp_common.h
+@@ -0,0 +1,79 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef __AMAZONGAHP_COMMON_H__
++#define __AMAZONGAHP_COMMON_H__
++
++#include "gahp_common.h"
++#include <string>
++#include "string_list.h"
++#include "amazonCommands.h"
++
++#define AMAZON_SCRIPT_INTERPRETER "perl"
++#define AMAZON_SCRIPT_NAME "condor_amazon.pl"
++
++#define AMAZON_COMMAND_SUCCESS_OUTPUT	"0"
++#define AMAZON_COMMAND_ERROR_OUTPUT		"1"
++
++#define AMAZON_HTTP_PROXY   "AMAZON_HTTP_PROXY"
++
++typedef bool (*ioCheckfn)(char **argv, int argc);
++typedef bool (*workerfn)(char **argv, int argc, std::string &output_string);
++
++class AmazonGahpCommand 
++{
++	public:
++		AmazonGahpCommand(const char*, ioCheckfn, workerfn);
++		std::string command;
++		ioCheckfn iocheckfunction;
++		workerfn workerfunction;
++};
++
++void
++registerAmazonGahpCommand(const char* command, ioCheckfn iofunc, workerfn workerfunc);
++int numofAmazonCommands(void);
++int allAmazonCommands(StringList &output);
++bool executeIOCheckFunc(const char* cmd, char **argv, int argc);
++bool executeWorkerFunc(const char* cmd, char **argv, int argc, std::string &output_string);
++
++int parse_gahp_command (const char* raw, Gahp_Args* args);
++
++bool check_read_access_file(const char *file);
++bool check_create_file(const char *file, mode_t mode);
++
++int get_int (const char *, int *);
++int get_ulong (const char *, unsigned long *);
++
++int verify_number (const char*);
++int verify_request_id(const char *);
++int verify_string_name(const char *);
++int verify_number_args (const int, const int);
++int verify_min_number_args (const int, const int);
++
++bool check_access_and_secret_key_file(const char* accesskeyfile, const char* secretkeyfile, std::string &err_msg);
++
++std::string create_failure_result( int req_id, const char *err_msg, const char* err_code = NULL);
++std::string create_success_result( int req_id, StringList *result_list);
++
++bool set_gahp_log_file(const char* logfile);
++
++void set_amazon_proxy_server(const char* url);
++bool get_amazon_proxy_server(const char* &host_name, int& port, const char* &user_name, const char* &passwd );
++
++#endif
+diff --git a/src/ec2_gahp/io_loop_pthread.cpp b/src/ec2_gahp/io_loop_pthread.cpp
+new file mode 100644
+index 0000000..32151b8
+--- /dev/null
++++ b/src/ec2_gahp/io_loop_pthread.cpp
+@@ -0,0 +1,1080 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++
++#include <pthread.h>
++#include <signal.h>
++#include <time.h>
++
++#include "condor_debug.h"
++#include "string_list.h"
++#include "HashTable.h"
++#include "PipeBuffer.h"
++#include "my_getopt.h"
++#include "io_loop_pthread.h"
++#include "amazongahp_common.h"
++#include "amazonCommands.h"
++#include "subsystem_info.h"
++
++#define MIN_WORKER_NUM 1
++#define AMAZON_GAHP_VERSION	"0.0.2"
++
++int RESULT_OUTBOX = 1;	// stdout
++int REQUEST_INBOX = 0; // stdin
++
++const char * version = "$GahpVersion " AMAZON_GAHP_VERSION " Feb 15 2008 Condor\\ AMAZONGAHP $";
++
++DECL_SUBSYSTEM("AMAZON_GAHP", SUBSYSTEM_TYPE_GAHP);
++
++static IOProcess *ioprocess = NULL;
++
++// forwarding declaration
++static void gahp_output_return_error();
++static void gahp_output_return_success();
++static void gahp_output_return (const char ** results, const int count);
++static int verify_gahp_command(char ** argv, int argc);
++static void *worker_function( void *ptr );
++
++/* We use a big mutex to make certain only one thread is running at a time,
++ * except when that thread would be blocked on I/O or a signal.  We do
++ * this becase many data structures and methods used from utility libraries
++ * are not inheriently thread safe.  So we error on the side of correctness,
++ * and this isn't a big deal since we are only really concerned with the gahp
++ * blocking when we do network communication and SOAP/WS_SECURITY processing.
++ */
++pthread_mutex_t global_big_mutex = PTHREAD_MUTEX_INITIALIZER;
++#include "thread_control.h"
++
++static void io_process_exit(int exit_num)
++{
++	exit( exit_num );
++}
++
++void
++usage()
++{
++	dprintf( D_ALWAYS, "Usage: amazon_gahp -f logfile -d debuglevel -w min_worker_nums -m max_worker_nums\n");
++	exit(1);
++}
++
++static bool
++registerAllAmazonCommands(void)
++{
++	if( numofAmazonCommands() > 0 ) {
++		dprintf(D_ALWAYS, "There are already registered commands\n");
++		return false;
++	}
++
++	// EC2 Commands
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_START, 
++			AmazonVMStart::ioCheck, AmazonVMStart::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_STOP, 
++			AmazonVMStop::ioCheck, AmazonVMStop::workerFunction);
++
++	/*
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_REBOOT, 
++			AmazonVMReboot::ioCheck, AmazonVMReboot::workerFunction);
++	*/
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_STATUS, 
++			AmazonVMStatus::ioCheck, AmazonVMStatus::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_STATUS_ALL, 
++			AmazonVMStatusAll::ioCheck, AmazonVMStatusAll::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_RUNNING_KEYPAIR, 
++			AmazonVMRunningKeypair::ioCheck, AmazonVMRunningKeypair::workerFunction);
++
++	/*
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_CREATE_GROUP, 
++			AmazonVMCreateGroup::ioCheck, AmazonVMCreateGroup::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_DELETE_GROUP, 
++			AmazonVMDeleteGroup::ioCheck, AmazonVMDeleteGroup::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_GROUP_NAMES, 
++			AmazonVMGroupNames::ioCheck, AmazonVMGroupNames::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_GROUP_RULES, 
++			AmazonVMGroupRules::ioCheck, AmazonVMGroupRules::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_ADD_GROUP_RULE, 
++			AmazonVMAddGroupRule::ioCheck, AmazonVMAddGroupRule::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_DEL_GROUP_RULE, 
++			AmazonVMDelGroupRule::ioCheck, AmazonVMDelGroupRule::workerFunction);
++
++	*/
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_CREATE_KEYPAIR, 
++			AmazonVMCreateKeypair::ioCheck, AmazonVMCreateKeypair::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_DESTROY_KEYPAIR, 
++			AmazonVMDestroyKeypair::ioCheck, AmazonVMDestroyKeypair::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_KEYPAIR_NAMES, 
++			AmazonVMKeypairNames::ioCheck, AmazonVMKeypairNames::workerFunction);
++    
++    registerAmazonGahpCommand(AMAZON_COMMAND_VM_ASSOCIATE_ADDRESS, 
++            AmazonAssociateAddress::ioCheck, AmazonAssociateAddress::workerFunction);
++
++    //registerAmazonGahpCommand(AMAZON_COMMAND_VM_RELEASE_ADDRESS, 
++    //        AmazonReleaseAddress::ioCheck, AmazonReleaseAddress::workerFunction);
++
++	/*
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_REGISTER_IMAGE, 
++			AmazonVMRegisterImage::ioCheck, AmazonVMRegisterImage::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_VM_DEREGISTER_IMAGE, 
++			AmazonVMDeregisterImage::ioCheck, AmazonVMDeregisterImage::workerFunction);
++	*/
++
++
++	// S3 Commands
++	/*
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_ALL_BUCKETS,
++			AmazonS3AllBuckets::ioCheck, AmazonS3AllBuckets::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_CREATE_BUCKET,
++			AmazonS3CreateBucket::ioCheck, AmazonS3CreateBucket::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_DELETE_BUCKET,
++			AmazonS3DeleteBucket::ioCheck, AmazonS3DeleteBucket::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_LIST_BUCKET,
++			AmazonS3ListBucket::ioCheck, AmazonS3ListBucket::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_UPLOAD_FILE,
++			AmazonS3UploadFile::ioCheck, AmazonS3UploadFile::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_UPLOAD_DIR,
++			AmazonS3UploadDir::ioCheck, AmazonS3UploadDir::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_DELETE_FILE,
++			AmazonS3DeleteFile::ioCheck, AmazonS3DeleteFile::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_DOWNLOAD_FILE,
++			AmazonS3DownloadFile::ioCheck, AmazonS3DownloadFile::workerFunction);
++
++	registerAmazonGahpCommand(AMAZON_COMMAND_S3_DOWNLOAD_BUCKET,
++			AmazonS3DownloadBucket::ioCheck, AmazonS3DownloadBucket::workerFunction);
++	*/
++
++	return true;
++}
++
++void
++quit_on_signal(int sig)
++{
++	/* Posix says exit() is not signal safe, so call _exit() */
++	_exit(sig);
++}
++
++int
++main( int argc, char ** const argv )
++{
++	// All log should be printed to stderr
++	set_gahp_log_file(NULL);
++
++#ifndef WIN32
++	/* Add the signals we want unblocked into sigSet */
++	sigset_t sigSet;
++	struct sigaction act;
++
++	sigemptyset( &sigSet );
++	sigaddset(&sigSet,SIGTERM);
++	sigaddset(&sigSet,SIGQUIT);
++	sigaddset(&sigSet,SIGPIPE);
++
++	/* Set signal handlers */
++	sigemptyset(&act.sa_mask);  /* do not block anything in handler */
++	act.sa_flags = 0;
++
++	/* Signals which should cause us to exit with status = signum */
++	act.sa_handler = quit_on_signal;
++	sigaction(SIGTERM,&act,0);
++	sigaction(SIGQUIT,&act,0);
++	sigaction(SIGPIPE,&act,0);
++
++	/* Unblock signals in our set */
++	sigprocmask( SIG_UNBLOCK, &sigSet, NULL );
++#endif
++
++	// get env
++	const char *debug_string = getenv("DebugLevel");
++	if( debug_string && *debug_string ) {
++		set_debug_flags(debug_string);
++	}
++
++	int min_workers = MIN_NUMBER_WORKERS;
++	int max_workers = -1;
++
++	int c = 0;
++	while ( (c = my_getopt(argc, argv, "f:d:w:m:" )) != -1 ) {
++		switch(c) {
++			case 'f':
++				// Log file
++				if ( my_optarg ) {
++					if( !set_gahp_log_file(my_optarg) ) {
++						fprintf(stderr, "Can't create the log file(%s)\n", 
++								my_optarg);
++						exit(1);
++					}
++				}
++				break;
++			case 'd':
++				// Debug Level
++				if( my_optarg && *my_optarg ) {
++					set_debug_flags(my_optarg);
++				}
++
++				break;
++			case 'w':
++				// Minimum number of worker pools
++				min_workers = atoi(my_optarg);
++				if( min_workers < MIN_NUMBER_WORKERS ) {
++					min_workers = MIN_NUMBER_WORKERS;
++				}
++				break;
++			case 'm':
++				// Maximum number of worker pools
++				max_workers = atoi(my_optarg);
++				if( max_workers <= 0 ) {
++					max_workers = -1;
++				}
++				break;
++			default:
++				usage();
++		}
++	}
++
++	dprintf(D_FULLDEBUG, "Welcome to the AMAZON-GAHP\n");
++
++	const char *buff;
++
++	//Try to read env for amazon_http_proxy
++	buff = getenv(AMAZON_HTTP_PROXY);
++	if( buff && *buff ) {
++		set_amazon_proxy_server(buff);
++		dprintf(D_ALWAYS, "Using http proxy = %s\n", buff);
++	}
++
++	// Register all amazon commands
++	if( registerAllAmazonCommands() == false ) {
++		dprintf(D_ALWAYS, "Can't register Amazon Commands\n");
++		exit(1);
++	}
++	
++	// Create IOProcess class
++	ioprocess = new IOProcess;
++	ASSERT(ioprocess);
++
++	if( ioprocess->startUp(REQUEST_INBOX, min_workers, max_workers) == false ) {
++		dprintf(D_ALWAYS, "Failed to start IO Process\n");
++		delete ioprocess;
++		exit(1);
++	}
++
++	// Print out the GAHP version to the screen
++	// now we're ready to roll
++	printf ("%s\n", version);
++	fflush(stdout);
++
++	dprintf (D_FULLDEBUG, "AMAZON-GAHP initialized\n");
++
++		/* Our main thread should grab the mutex first.  We will then
++		 * release it and let other threads run when we would otherwise
++		 * block.
++		 */
++	amazon_gahp_grab_big_mutex();
++
++	for(;;) {
++		ioprocess->stdinPipeHandler();
++	}
++
++	return 0;
++}
++
++// Check the parameters to make sure the command
++// is syntactically correct
++static int
++verify_gahp_command(char ** argv, int argc) {
++	// Special Commands First
++	if (strcasecmp (argv[0], GAHP_COMMAND_RESULTS) == 0 ||
++			strcasecmp (argv[0], GAHP_COMMAND_VERSION) == 0 ||
++			strcasecmp (argv[0], GAHP_COMMAND_COMMANDS) == 0 ||
++			strcasecmp (argv[0], GAHP_COMMAND_QUIT) == 0 ||
++			strcasecmp (argv[0], GAHP_COMMAND_ASYNC_MODE_ON) == 0 ||
++			strcasecmp (argv[0], GAHP_COMMAND_ASYNC_MODE_OFF) == 0) {
++		// These are no-arg commands
++		return verify_number_args (argc, 1);
++	}
++
++	return executeIOCheckFunc(argv[0], argv, argc); 
++}
++
++void
++gahp_output_return (const char ** results, const int count) {
++//	amazon_gahp_io_lock();
++
++	int i=0;
++	for (i=0; i<count; i++) {
++		printf ("%s", results[i]);
++		if (i < (count - 1 )) {
++			printf (" ");
++		}
++	}
++
++	printf ("\n");
++	fflush(stdout);
++
++//	amazon_gahp_io_unlock();
++}
++
++static void
++gahp_output_return_success() {
++	const char* result[] = {GAHP_RESULT_SUCCESS};
++	gahp_output_return (result, 1);
++}
++
++static void
++gahp_output_return_error() {
++	const char* result[] = {GAHP_RESULT_ERROR};
++	gahp_output_return (result, 1);
++}
++
++Worker::Worker(int worker_id) 
++{
++	m_id = worker_id;
++	m_can_use = false;
++	m_is_doing = false;
++	m_is_waiting = false;
++	m_must_be_alive = false;
++
++//	pthread_mutex_init(&m_mutex, NULL);
++	pthread_cond_init(&m_cond, NULL);
++}
++
++Worker::~Worker() 
++{
++	Request *request = NULL;
++
++//	pthread_mutex_lock(&m_mutex);
++	m_request_list.Rewind();
++	while( m_request_list.Next(request) ) {
++		m_request_list.DeleteCurrent();
++		delete request;
++	}
++
++//	pthread_mutex_unlock(&m_mutex);
++
++	pthread_cond_destroy(&m_cond);
++//	pthread_mutex_destroy(&m_mutex);
++}
++
++bool
++Worker::removeRequest(int req_id)
++{
++	Request *request = NULL;
++
++//	pthread_mutex_lock(&m_mutex);
++	m_request_list.Rewind();
++	while( m_request_list.Next(request) ) {
++
++		if( request->m_reqid == req_id ) {
++			// remove this request from worker request queue
++			m_request_list.DeleteCurrent();
++			delete request;
++//			pthread_mutex_unlock(&m_mutex);
++			return true;
++		}	
++	}
++//	pthread_mutex_unlock(&m_mutex);
++
++	return false;
++}
++
++
++// Functions for IOProcess class
++IOProcess::IOProcess() 
++	: m_workers_list(20, &hashFuncInt)
++{
++	m_async_mode = false;
++	m_new_results_signaled = false;
++	
++	m_min_workers = MIN_NUMBER_WORKERS;
++	m_max_workers = -1;
++
++	m_next_worker_id = 0;
++	m_rotated_worker_ids = false;
++
++	m_avail_workers_num = 0;
++
++//	pthread_mutex_init(&m_result_mutex, NULL);
++//	pthread_mutex_init(&m_worker_list_mutex, NULL);
++//	pthread_mutex_init(&m_pending_req_list_mutex, NULL);
++}
++
++IOProcess::~IOProcess()
++{
++//	pthread_mutex_destroy(&m_result_mutex);
++//	pthread_mutex_destroy(&m_worker_list_mutex);
++//	pthread_mutex_destroy(&m_pending_req_list_mutex);
++}
++
++bool
++IOProcess::startUp(int stdin_pipe, int min_workers, int max_workers)
++{
++	m_min_workers = min_workers;
++	m_max_workers = max_workers;
++	m_stdin_buffer.setPipeEnd(stdin_pipe);
++
++	// Create initial worker processes
++	int i = 0;
++	for( i = 0; i < m_min_workers; i++ ) {
++		if( createNewWorker() == NULL ) {
++			dprintf(D_ALWAYS, "Failed to create initial workers\n");
++			dprintf(D_ALWAYS, "Exiting....\n");
++			io_process_exit(1);
++		}
++	}
++
++	return true;
++}
++
++int
++IOProcess::stdinPipeHandler() 
++{
++	std::string* line;
++	while ((line = m_stdin_buffer.GetNextLine()) != NULL) {
++
++		const char *command = line->c_str();
++
++		dprintf (D_FULLDEBUG, "got stdin: %s\n", command);
++
++		Gahp_Args args;
++
++		if (parse_gahp_command (command, &args) &&
++			verify_gahp_command (args.argv, args.argc)) {
++
++				// Catch "special commands first
++			if (strcasecmp (args.argv[0], GAHP_COMMAND_RESULTS) == 0) {
++				// Print each result line
++
++//				amazon_gahp_io_lock();
++//				pthread_mutex_lock(&m_result_mutex);
++
++				// Print number of results
++				printf("%s %d\n", GAHP_RESULT_SUCCESS, numOfResult());
++				fflush(stdout);
++
++				startResultIteration();
++
++				char* next = NULL;
++				while ((next = NextResult()) != NULL) {
++					printf ("%s", next);
++					fflush(stdout);
++					deleteCurrentResult();
++				}
++				m_new_results_signaled = false;
++
++//				pthread_mutex_unlock(&ioprocess->m_result_mutex);
++//				amazon_gahp_io_unlock();
++
++			} else if (strcasecmp (args.argv[0], GAHP_COMMAND_VERSION) == 0) {
++
++//				amazon_gahp_io_lock();
++				printf ("S %s\n", version);
++				fflush (stdout);
++//				amazon_gahp_io_unlock();
++
++			} else if (strcasecmp (args.argv[0], GAHP_COMMAND_QUIT) == 0) {
++				gahp_output_return_success();
++				io_process_exit(0);
++			} else if (strcasecmp (args.argv[0], GAHP_COMMAND_ASYNC_MODE_ON) == 0) {
++				m_async_mode = true;
++				m_new_results_signaled = false;
++				gahp_output_return_success();
++			} else if (strcasecmp (args.argv[0], GAHP_COMMAND_ASYNC_MODE_OFF) == 0) {
++				m_async_mode = false;
++				gahp_output_return_success();
++			} else if (strcasecmp (args.argv[0], GAHP_COMMAND_COMMANDS) == 0) {
++				StringList amazon_commands;
++				int num_commands = 0;
++
++				num_commands = allAmazonCommands(amazon_commands);
++				num_commands += 7;
++
++				const char *commands[num_commands];
++				int i = 0;
++				commands[i++] = GAHP_RESULT_SUCCESS;
++				commands[i++] = GAHP_COMMAND_ASYNC_MODE_ON;
++				commands[i++] = GAHP_COMMAND_ASYNC_MODE_OFF;
++				commands[i++] = GAHP_COMMAND_RESULTS;
++				commands[i++] = GAHP_COMMAND_QUIT;
++				commands[i++] = GAHP_COMMAND_VERSION;
++				commands[i++] = GAHP_COMMAND_COMMANDS;
++
++				amazon_commands.rewind();
++				char *one_amazon_command = NULL;
++
++				while( (one_amazon_command = amazon_commands.next() ) != NULL ) {
++					commands[i++] = one_amazon_command;
++				}
++
++				gahp_output_return (commands, i);
++			} else {
++				// got new command
++				if( !addNewRequest(command) ) {
++					gahp_output_return_error();
++				}else {
++					gahp_output_return_success(); 
++				}
++			}
++			
++		} else {
++			gahp_output_return_error();
++		}
++
++		delete line;
++	}
++
++	// check if GetNextLine() returned NULL because of an error or EOF
++	if (m_stdin_buffer.IsError() || m_stdin_buffer.IsEOF()) {
++		dprintf (D_ALWAYS, "stdin buffer closed, exiting\n");
++		io_process_exit(1);
++	}
++
++	return TRUE;
++}
++
++Worker*
++IOProcess::createNewWorker(void)
++{
++	Worker *new_worker = NULL;
++	new_worker = new Worker(newWorkerId());
++
++	dprintf (D_FULLDEBUG, "About to start a new thread\n");
++
++	// Set this worker is available
++	new_worker->m_can_use = true;
++
++	// Create pthread 
++	pthread_t thread;
++	if( pthread_create(&thread, NULL, 
++				worker_function, (void *)new_worker) !=  0 ) {
++		dprintf(D_ALWAYS, "Failed to create a new thread\n");
++
++		delete new_worker;
++		return NULL;
++	}
++
++	// Deatch this thread 
++	pthread_detach(thread);
++
++	// Insert a new worker to HashTable
++//	pthread_mutex_lock(&m_worker_list_mutex);
++	m_workers_list.insert(new_worker->m_id, new_worker);
++	m_avail_workers_num++;
++//	pthread_mutex_unlock(&m_worker_list_mutex);
++
++	dprintf(D_FULLDEBUG, "New Worker[id=%d] is created!\n", new_worker->m_id);
++	return new_worker;
++}
++
++Worker* 
++IOProcess::findFreeWorker(void)
++{
++	int currentkey = 0;
++	Worker *worker = NULL;
++
++//	pthread_mutex_lock(&m_worker_list_mutex);
++	m_workers_list.startIterations();
++	while( m_workers_list.iterate(currentkey, worker) != 0 ) {
++
++//		pthread_mutex_lock(&worker->m_mutex);
++
++		if( !worker->m_is_doing && worker->m_can_use ) { 
++			worker->m_must_be_alive = true;	
++
++//			pthread_mutex_unlock(&worker->m_mutex);
++//			pthread_mutex_unlock(&m_worker_list_mutex);
++
++			return worker;
++		}
++
++//		pthread_mutex_unlock(&worker->m_mutex);
++	}
++//	pthread_mutex_unlock(&m_worker_list_mutex);
++	return NULL;
++}
++
++Worker*
++IOProcess::findFirstAvailWorker(void)
++{
++	int currentkey = 0;
++	Worker *worker = NULL;
++
++//	pthread_mutex_lock(&m_worker_list_mutex);
++
++	m_workers_list.startIterations();
++	while( m_workers_list.iterate(currentkey, worker) != 0 ) {
++
++//		pthread_mutex_lock(&worker->m_mutex);
++
++		if( worker->m_can_use ) {
++			worker->m_must_be_alive = true;
++
++//			pthread_mutex_unlock(&worker->m_mutex);
++//			pthread_mutex_unlock(&m_worker_list_mutex);
++			return worker;
++		}
++
++//		pthread_mutex_unlock(&worker->m_mutex);
++	}
++//	pthread_mutex_unlock(&m_worker_list_mutex);
++
++	return NULL;
++}
++
++
++Worker* 
++IOProcess::findWorker(int id)
++{
++	Worker *worker = NULL;
++
++	m_workers_list.lookup(id, worker);
++	return worker;
++}
++
++bool 
++IOProcess::removeWorkerFromWorkerList(int id)
++{
++	Worker* worker = findWorker(id);
++	if( worker ) {
++		m_workers_list.remove(id);
++
++		delete worker;
++		return true;
++	}
++
++	return false;
++}
++
++void
++IOProcess::LockWorkerList(void)
++{
++//	pthread_mutex_lock(&m_worker_list_mutex);
++}
++
++void
++IOProcess::UnlockWorkerList(void)
++{
++//	pthread_mutex_unlock(&m_worker_list_mutex);
++}
++
++Request* 
++IOProcess::addNewRequest(const char *cmd)
++{
++	if( !cmd ) {
++		return NULL;
++	}
++
++	Request* new_req = new Request(cmd);
++	ASSERT(new_req);
++
++	// check if there is available worker process
++	Worker *worker = findFreeWorker();
++
++	if( !worker ) {
++		// There is no available worker
++
++		if( m_max_workers == -1 || m_avail_workers_num < m_max_workers ) {
++			worker = createNewWorker();
++		}
++	}
++
++	addRequestToWorker(new_req, worker);
++	return new_req;
++}
++
++void 
++IOProcess::addResult(const char *result)
++{
++	if( !result ) {
++		return;
++	}
++
++//	amazon_gahp_io_lock();
++//	pthread_mutex_lock(&m_result_mutex);
++
++	// Put this result into result buffer
++	m_result_list.append(result);
++
++	if (m_async_mode) {
++		if (!m_new_results_signaled) {
++			printf ("R\n");
++			fflush (stdout);
++		}
++		m_new_results_signaled = true;	// So that we only do it once
++	}
++
++//	pthread_mutex_unlock(&m_result_mutex);
++//	amazon_gahp_io_unlock();
++}
++
++int 
++IOProcess::newWorkerId(void)
++{
++	Worker* unused = NULL;
++	int starting_worker_id = m_next_worker_id++;
++
++	while( starting_worker_id != m_next_worker_id ) {
++		if( m_next_worker_id > 990000000 ) {
++			m_next_worker_id = 1;
++			m_rotated_worker_ids = true;
++		}
++
++		if( !m_rotated_worker_ids ) {
++			return m_next_worker_id;
++		}	
++
++//		pthread_mutex_lock(&m_worker_list_mutex);
++		// Make certain this worker_id is not already in use
++		if( m_workers_list.lookup(m_next_worker_id, unused) == -1 ) {
++			// not in use, we are done
++//			pthread_mutex_unlock(&m_worker_list_mutex);
++			return m_next_worker_id;
++		}
++//		pthread_mutex_unlock(&m_worker_list_mutex);
++
++		m_next_worker_id++;
++	}
++
++	// If we reached here, we are out of worker ids
++	dprintf(D_ALWAYS, "Gahp Server Error - out of worker ids !!!?!?!?\n");
++	return -1;
++}
++
++void
++IOProcess::addRequestToWorker(Request* request, Worker* worker)
++{
++	if( !request ) {
++		return;
++	}
++
++	if( worker ) { 
++		dprintf (D_FULLDEBUG, "Sending %s to worker %d\n", 
++				request->m_raw_cmd.c_str(), worker->m_id);
++
++//		pthread_mutex_lock(&worker->m_mutex);
++
++		request->m_worker = worker;
++		worker->m_request_list.Append(request);
++		worker->m_is_doing = true;
++
++		if( worker->m_is_waiting ) {
++			pthread_cond_signal(&worker->m_cond);
++		}
++
++//		pthread_mutex_unlock(&worker->m_mutex);
++	}else {
++		// There is no available worker.
++		// So we will insert this request to global pending request list
++		dprintf (D_FULLDEBUG, "Appending %s to global pending request list\n", 
++				request->m_raw_cmd.c_str());
++
++//		pthread_mutex_lock(&m_pending_req_list_mutex);
++		m_pending_req_list.Append(request);
++//		pthread_mutex_unlock(&m_pending_req_list_mutex);
++	}
++}
++
++int 
++IOProcess::numOfPendingRequest(void)
++{
++	int num = 0;
++//	pthread_mutex_lock(&m_pending_req_list_mutex);
++	num = m_pending_req_list.Number();
++//	pthread_mutex_unlock(&m_pending_req_list_mutex);
++
++	return num;
++}
++
++Request* 
++IOProcess::popPendingRequest(void)
++{
++	Request *new_request = NULL;
++
++//	pthread_mutex_lock(&m_pending_req_list_mutex);
++	m_pending_req_list.Rewind();
++	m_pending_req_list.Next(new_request);
++	if( new_request ) {
++		m_pending_req_list.DeleteCurrent();
++	}
++//	pthread_mutex_unlock(&m_pending_req_list_mutex);
++
++	return new_request;
++}
++
++Request* popRequest(Worker* worker)
++{
++	Request *new_request = NULL;
++	if( !worker ) {
++		return NULL;
++	}
++
++	worker->m_request_list.Rewind();
++	worker->m_request_list.Next(new_request);
++
++	if( new_request ) {
++		// Remove this request from worker request queue
++		worker->m_request_list.DeleteCurrent();
++	}else {
++		if( ioprocess ) {
++			new_request = ioprocess->popPendingRequest();
++
++			if( new_request ) {
++				new_request->m_worker = worker;
++
++				dprintf (D_FULLDEBUG, "Assigning %s to worker %d\n", 
++						new_request->m_raw_cmd.c_str(), worker->m_id);
++			}
++		}
++	}
++
++	return new_request;
++}
++
++static void
++enqueue_result(Request* request)
++{
++	if( !request || request->m_result.empty() 
++			|| !ioprocess ) {
++		return;
++	}
++
++	ioprocess->addResult(request->m_result.c_str());
++}
++
++static bool
++handle_gahp_command(Request* request)
++{
++	if( !request ) {
++		return false;
++	}
++	char ** argv = request->m_args.argv;
++	int argc = request->m_args.argc;
++
++	// Assume it's been verified
++	if( argc < 2 ) {
++		dprintf (D_ALWAYS, "Invalid request\n");
++		return false;
++	}
++
++	if( !verify_request_id(argv[1]) ) {
++		dprintf (D_ALWAYS, "Invalid request ID\n");
++		return false;
++	}
++
++	bool result = executeWorkerFunc(argv[0], argv, argc, request->m_result);
++
++	if( request->m_result.empty() == false ) {
++		enqueue_result(request);
++	}
++
++	return result;
++}
++
++static void worker_exit(Worker *worker, bool force)
++{
++	if( !worker ) {
++		return;
++	}
++
++	int worker_id = worker->m_id;
++
++	bool need_remove = force;
++	if( ioprocess ) {
++		ioprocess->LockWorkerList();
++
++		if( need_remove == false ) {
++			if( ioprocess->m_avail_workers_num > ioprocess->m_min_workers ) {
++				need_remove = true;
++			}
++		}
++
++		if( need_remove ) {
++			// worker will be deleted inside removeWorkerFromWorkerList
++			ioprocess->removeWorkerFromWorkerList(worker->m_id);
++			worker = NULL;
++			ioprocess->m_avail_workers_num--;
++
++		}
++		ioprocess->UnlockWorkerList();
++	}
++
++	if( need_remove ) {
++		dprintf(D_FULLDEBUG, "Thread(%d) is exiting...\n", worker_id); 
++
++		int retval = 0;
++		amazon_gahp_release_big_mutex();
++		pthread_exit(&retval);
++	}else {
++		//dprintf(D_FULLDEBUG, "Thread(%d) is going to be used again\n",
++		//		worker_id);
++
++		// We need to keep this thread running
++//		pthread_mutex_lock(&worker->m_mutex);
++
++		worker->m_can_use = true;
++
++		worker->m_is_doing = false;
++		worker->m_is_waiting = false;
++		worker->m_must_be_alive = false;
++
++//		pthread_mutex_unlock(&worker->m_mutex);
++	}
++}
++
++static void *worker_function( void *ptr ) 
++{
++	Worker *worker = (Worker *)ptr;
++
++		/* Our new thread should grab the big mutex before starting.
++		 * We will then
++		 * release it and let other threads run when we would otherwise
++		 * block.
++		 */
++	amazon_gahp_grab_big_mutex();
++
++	if( !worker ) {
++		dprintf (D_ALWAYS, "Ooops!! No input Data in worker thread\n");
++		amazon_gahp_release_big_mutex();
++		return NULL;
++	}
++
++	// Pop Request 
++	Request *new_request = NULL;
++	struct timespec ts;
++	struct timeval tp;
++
++	while(1) {
++
++//		pthread_mutex_lock(&worker->m_mutex);
++
++		worker->m_is_doing = false;
++		worker->m_is_waiting = false;
++
++		if( worker->m_can_use == false ) {
++			// Need to die
++//			pthread_mutex_unlock(&worker->m_mutex);
++			worker_exit(worker, true);
++		}
++
++		while( (new_request = popRequest(worker)) == NULL ) {
++
++			worker->m_is_waiting = true;
++
++			// Get Current Time
++			gettimeofday(&tp, NULL);
++
++			/* Convert from timeval to timespec */
++			ts.tv_sec = tp.tv_sec;
++			ts.tv_nsec = tp.tv_usec * 1000;
++			ts.tv_sec += WORKER_MANAGER_TIMER_INTERVAL;
++
++			if( ioprocess ) {
++				if( ioprocess->numOfPendingRequest() > 0 ) {
++					continue;
++				}
++			}
++
++			//dprintf(D_FULLDEBUG, "Thread(%d) is calling cond_wait\n", 
++			//		worker->m_id);
++
++			// The pthread_cond_timedwait will block until signalled
++			// with more work from our main thread; so we MUST release
++			// the big fat mutex here or we will deadlock.	
++//			amazon_gahp_release_big_mutex();
++			int retval = pthread_cond_timedwait(&worker->m_cond, 
++					&global_big_mutex, &ts);
++//			amazon_gahp_grab_big_mutex();
++
++			if( worker->m_can_use == false ) {
++				// Need to die
++				worker->m_is_waiting = false;	
++
++//				pthread_mutex_unlock(&worker->m_mutex);
++				worker_exit(worker, true);
++			}else {
++				// If timeout happends, need to check m_must_be_alive
++				if( retval == ETIMEDOUT ) {
++					//dprintf(D_FULLDEBUG, "Thread(%d) Wait timed out !\n", 
++					//		worker->m_id);
++
++					if( ioprocess ) {
++						if( ioprocess->numOfPendingRequest() > 0 ) {
++							continue;
++						}
++					}
++
++					if( !worker->m_must_be_alive ) {
++						// Need to die according to the min number of workers
++
++						worker->m_is_waiting = false;	
++						worker->m_can_use = false;
++
++//						pthread_mutex_unlock(&worker->m_mutex);
++						worker_exit(worker, false);
++					}else {
++						dprintf(D_FULLDEBUG, "Thread(%d) must be alive for "
++								"another request\n", worker->m_id);
++					}
++				}
++			}
++		}
++
++		worker->m_is_doing = true;
++		worker->m_is_waiting = false;
++		worker->m_must_be_alive = false;
++
++//		pthread_mutex_unlock(&worker->m_mutex);
++
++		if(!handle_gahp_command(new_request) ) {
++			dprintf(D_ALWAYS, "ERROR (io_loop) processing %s\n", 
++					new_request->m_raw_cmd.c_str());
++		}else {
++			dprintf(D_FULLDEBUG, "CMD(\"%s\") is done with result %s", 
++					new_request->m_raw_cmd.c_str(),
++					new_request->m_result.c_str());
++		}
++
++		// Now we processed one request 
++		delete new_request;
++		new_request = NULL;
++
++	}
++
++	amazon_gahp_release_big_mutex();
++	return NULL;
++}
+diff --git a/src/ec2_gahp/io_loop_pthread.h b/src/ec2_gahp/io_loop_pthread.h
+new file mode 100644
+index 0000000..4f54d3d
+--- /dev/null
++++ b/src/ec2_gahp/io_loop_pthread.h
+@@ -0,0 +1,118 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef IO_LOOP_H
++#define IO_LOOP_H
++
++#include <pthread.h>
++#include "condor_common.h"
++#include "gahp_common.h"
++#include "simplelist.h"
++#include "PipeBuffer.h"
++#include "request.h"
++
++#define GAHP_COMMAND_ASYNC_MODE_ON "ASYNC_MODE_ON"
++#define GAHP_COMMAND_ASYNC_MODE_OFF "ASYNC_MODE_OFF"
++#define GAHP_COMMAND_RESULTS "RESULTS"
++#define GAHP_COMMAND_QUIT "QUIT"
++#define GAHP_COMMAND_VERSION "VERSION"
++#define GAHP_COMMAND_COMMANDS "COMMANDS"
++
++#define GAHP_RESULT_SUCCESS "S"
++#define GAHP_RESULT_ERROR "E"
++#define GAHP_RESULT_FAILURE "F"
++
++class Worker {
++ public:
++	Worker(int worker_id);
++	~Worker();
++
++	bool removeRequest(int req_id);
++	int numOfRequest(void) { return m_request_list.Number(); }
++	
++	int m_id;
++
++	bool m_can_use;
++	bool m_is_doing;
++	bool m_must_be_alive;
++
++//	pthread_mutex_t m_mutex;
++	pthread_cond_t m_cond;
++	bool m_is_waiting;
++
++	SimpleList<Request*> m_request_list;
++};
++
++#define MIN_NUMBER_WORKERS 2
++#define WORKER_MANAGER_TIMER_INTERVAL	15
++
++class IOProcess {
++ public:
++	IOProcess();
++	~IOProcess();
++	 
++	bool startUp(int stdin_pipe, int min_workers, int max_workers);
++
++	int stdinPipeHandler();
++
++	Worker* createNewWorker(void);
++	Worker* findFreeWorker(void);
++	Worker* findFirstAvailWorker(void);
++	Worker* findWorker(int id);
++	bool removeWorkerFromWorkerList(int id);
++	void LockWorkerList(void);
++	void UnlockWorkerList(void); 
++
++	Request* addNewRequest(const char* cmd);	
++	void addResult(const char* result);
++
++	int numOfResult(void) { return m_result_list.number(); }
++	void startResultIteration(void) { m_result_list.rewind(); }
++	char* NextResult(void) { return m_result_list.next(); }
++	void deleteCurrentResult(void) { m_result_list.deleteCurrent(); }
++	Request* popPendingRequest(void);
++	int numOfPendingRequest(void);
++
++	bool m_async_mode;
++	bool m_new_results_signaled;
++	int m_min_workers;
++	int m_max_workers;
++
++	int m_avail_workers_num;
++
++ private: 
++	void addRequestToWorker(Request* request, Worker* worker);
++
++	int newWorkerId(void);
++	int m_next_worker_id;
++	int m_rotated_worker_ids;
++
++	PipeBuffer m_stdin_buffer;
++
++//	pthread_mutex_t m_result_mutex;
++	StringList m_result_list; // The list of results ready to be output to IO
++
++//	pthread_mutex_t m_worker_list_mutex;
++	HashTable<int, Worker*> m_workers_list;
++
++//	pthread_mutex_t m_pending_req_list_mutex;
++	SimpleList<Request*> m_pending_req_list;
++};
++
++#endif
+diff --git a/src/ec2_gahp/queryAPI-sim.cpp b/src/ec2_gahp/queryAPI-sim.cpp
+new file mode 100644
+index 0000000..e04446b
+--- /dev/null
++++ b/src/ec2_gahp/queryAPI-sim.cpp
+@@ -0,0 +1,941 @@
++#include <stdio.h>
++#include <stdlib.h>
++
++#include <errno.h>
++#include <string.h>
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/ip.h>
++
++#include <signal.h>
++
++#include <unistd.h>
++
++#include <string>
++#include <map>
++#include <sstream>
++
++#include <ext/hash_map>
++namespace ext = __gnu_cxx;
++
++typedef std::map< std::string, std::string > AttributeValueMap;
++typedef bool (*ActionHandler)( AttributeValueMap & avm, std::string & reply, unsigned requestNumber );
++typedef std::map< std::string, ActionHandler > ActionToHandlerMap;
++
++/*
++ * The GAHP uses the following functions from the Query API:
++ *
++ *      RunInstances
++ *      TerminateInstances
++ *      DescribeInstances
++ *      CreateKeyPair
++ *      DeleteKeyPair
++ *      DescribeKeyPairs
++ */
++
++/*
++ * Inexplicably, this isn't one of the standard specializations.
++ * Even less explicably, you can't use namespace aliases to open a namespace.
++ *
++ * However, by supplying this specialization, all of the ext::hash_maps using
++ * std::string as a key work without further ado.
++ */
++
++namespace __gnu_cxx {
++    template<> struct hash< std::string > {
++        size_t operator()( const std::string & s ) const {
++            return __stl_hash_string( s.c_str() );
++        }
++    };
++}
++
++std::string xmlTag( const char * tagName, const std::string & tagValue ) {
++    std::ostringstream os;
++    os << "<" << tagName << ">" << tagValue << "</" << tagName << ">";
++    return os.str();
++}
++
++typedef struct Group_t {
++    std::string groupID;
++    
++    Group_t() { }
++    Group_t( const std::string & gID ) : groupID( gID ) { }
++} Group;
++typedef ext::hash_map< std::string, Group > NameToGroupMap;
++
++typedef struct Keypair_t {
++    std::string keyName;
++    std::string fingerprint;
++    std::string privateKey;
++    
++    Keypair_t() { }
++    Keypair_t( const std::string & kn,
++               const std::string & fp,
++               const std::string & pk ) : keyName( kn ),
++               fingerprint( fp ), privateKey( pk ) { }
++} Keypair;
++typedef ext::hash_map< std::string, Keypair > NameToKeypairMap;
++
++std::ostream & operator << ( std::ostream & os, const Keypair & kp ) {
++    os << "<item>" << std::endl;
++    os << xmlTag( "keyName", kp.keyName ) << std::endl;
++    os << xmlTag( "keyFingerprint", kp.fingerprint ) << std::endl;    
++    os << "</item" << std::endl;
++    return os;
++}
++
++class InstanceState {
++    public:
++        enum InstanceStatus {
++            PENDING = 0,
++            RUNNING = 16,
++            SHUTTING_DOWN = 32,
++            TERMINATED = 48,
++            STOPPING = 64,
++            STOPPED = 80,
++            INVALID = -1
++        };
++
++        InstanceState() : statusCode( INVALID ) { }
++        InstanceState( InstanceStatus state ) : statusCode( state ) { }
++        InstanceState( const std::string & state ) {
++            if( state == "pending" ) { this->statusCode = PENDING; }
++            else if( state == "running" ) { this->statusCode = RUNNING; }
++            else if( state == "shutting-down" ) { this->statusCode = SHUTTING_DOWN; }
++            else if( state == "terminated" ) { this->statusCode = TERMINATED; }
++            else if( state == "stopping" ) { this->statusCode = STOPPING; }
++            else if( state == "stopped" ) { this->statusCode = STOPPED; }
++            else { this->statusCode = INVALID; }
++        }
++        
++        void progress() {
++            if( rand() % 2 ) {
++                switch( this->statusCode ) {
++                    case PENDING:
++                        this->statusCode = RUNNING;
++                        break;
++                    case RUNNING:
++                        this->statusCode = SHUTTING_DOWN;
++                        break;
++                    case SHUTTING_DOWN:
++                        this->statusCode = TERMINATED;
++                        break;
++                    case TERMINATED:
++                        this->statusCode = TERMINATED;
++                        break;
++                    case STOPPING:
++                        this->statusCode = STOPPED;                    
++                        break;
++                    case STOPPED:
++                        this->statusCode = STOPPED;                    
++                        break;
++                    case INVALID:
++                        fprintf( stderr, "Attempting to progress the INVALID state implies a bug.\n" );
++                        break;
++                }
++            }                
++        }
++        
++        InstanceStatus code() const { return this->statusCode; }
++        
++        std::string name() const {
++            switch( this->statusCode ) {
++                case PENDING:
++                    return "pending";
++                case RUNNING:
++                    return "running";
++                case SHUTTING_DOWN:
++                    return "shutting-down";
++                case TERMINATED:
++                    return "terminated";
++                case STOPPING:
++                    return "stopping";
++                case STOPPED:
++                    return "stopped";
++                case INVALID:
++                default:
++                    return "invalid";
++            }
++        }
++        
++    private:
++        InstanceStatus statusCode;
++};
++
++std::ostream & operator << ( std::ostream & os, const InstanceState & is ) {
++    os << "<code>" << is.code() << "</code>" << std::endl;
++    os << xmlTag( "name", is.name() ) << std::endl;
++    return os;
++}
++
++typedef struct Instance_t {
++    std::string instanceID;
++
++    std::string imageID;
++    std::string privateDNSName;
++    std::string publicDNSName;
++    std::string instanceType;
++    std::string keyName;
++
++    InstanceState instanceState;
++    std::vector< std::string > groupNames;
++
++    Instance_t() { }
++    Instance_t( const std::string & inID, const std::string & imID,
++                const std::string & piDN, const std::string & puDN,
++                const std::string & iT,   const std::string & iS,
++                const std::string & kN,
++                const std::vector< std::string > & gN ) : instanceID(inID),
++                imageID(imID), privateDNSName( piDN ), publicDNSName( puDN ),
++                instanceType( iT ), keyName( kN ), instanceState( iS ),
++                groupNames( gN ) { }
++} Instance;
++typedef ext::hash_map< std::string, Instance > InstanceIDToInstanceMap;
++
++std::ostream & operator << ( std::ostream & os, const Instance & i ) {
++    os << "<item>" << std::endl;
++        os << xmlTag( "instanceId", i.instanceID ) << std::endl;
++        os << xmlTag( "imageId", i.imageID ) << std::endl;
++        os << xmlTag( "privateDnsName", i.privateDNSName ) << std::endl;
++        os << xmlTag( "dnsName", i.publicDNSName ) << std::endl;
++        os << xmlTag( "instanceType", i.instanceType ) << std::endl;
++        os << "<instanceState>" << std::endl;
++            os << i.instanceState;
++        os << "</instanceState>" << std::endl;
++        if( ! i.keyName.empty() ) { os << xmlTag( "keyName", i.keyName ); }
++    os << "</item>" << std::endl;
++    return os;
++}
++
++typedef struct {
++    NameToKeypairMap keypairs;
++    NameToGroupMap groups;
++    InstanceIDToInstanceMap instances;    
++} User;
++typedef ext::hash_map< std::string, User > AccessKeyIDToUserMap;
++
++// Global.  Eww.
++AccessKeyIDToUserMap users;
++
++// Since we don't support CreateSecurityGroup, insert a few for testing.
++void registerTestUsers() {
++    users[ "1" ] = User();
++    users[ "1" ].groups[ "sg-name-1" ] = Group( "sg-name-1" );
++    users[ "1" ].groups[ "sg-name-2" ] = Group( "sg-name-2" );
++    users[ "1" ].groups[ "sg-name-3" ] = Group( "sg-name-3" );
++    
++    // The Amazon EC2 ID we actually use for testing.
++    users[ "1681MPTCV7E5BF6TWE02" ] = User();
++    
++    // The Magellan (Eucalyptus) ID we actually use for testing.
++    users[ "HOq1jQmeoswWXoJTq44DbTuD8jchkWfXmbsEg" ] = User();
++}
++
++// The compiler seems unwilling or unable to infer return types; GregT
++// speculated that this might be because templated functions are in their
++// own namespace, but getObject<>() doesn't infer the return type, either.
++template< class V, class T, class K > V getObject( const T & map, const K & key, bool & found ) {
++    class T::const_iterator ci = map.find( key );
++    if( map.end() == ci ) {
++        found = false;
++        return V();
++    }
++    found = true;
++    return ci->second;
++}
++
++template< class V, class T, class K > V & getReference( T & map, const K & key, bool & found ) {
++    static V dummyValue = V();
++
++    class T::iterator ci = map.find( key );
++    if( map.end() == ci ) {
++        found = false;
++        return dummyValue;
++    }
++    found = true;
++    return map[ key ];
++}
++
++User & validateAndAcquireUser( AttributeValueMap & avm, std::string & userID, std::string & reply, bool & found ) {
++    static User dummyUser = User();
++        
++    userID = getObject< std::string >( avm, "AWSAccessKeyId", found );
++    if( (! found) || userID.empty() ) {
++        fprintf( stderr, "Failed to find userID in query.\n" );
++        reply = "Required parameter 'AWSAccessKeyId' missing or empty.\n";
++        found = false;
++        return dummyUser;
++    }
++    
++    User & user = getReference< User >( users, userID, found );
++    if( ! found ) {
++        std::ostringstream os;
++        os << "Unknown AWSAccessKeyId '" << userID << "'." << std::endl;
++        reply = os.str();
++        fprintf( stderr, "%s", reply.c_str() );
++        found = false;
++        return dummyUser;
++    }
++    
++    found = true;
++    return user;
++}
++
++bool handleRunInstances( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleRunInstances()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++    
++    // Validate the ImageId, MinCount, and MaxCount parameters, as well
++    // as the optional parameters KeyName, InstanceType, SecurityGroup*,
++    // and UserData.
++    
++    // We presently assume all imageIDs are valid.
++    std::string imageID = getObject< std::string >( avm, "ImageId", found );
++    if( (! found) || imageID.empty() ) {
++        fprintf( stderr, "Failed to find imageID in query.\n" );
++        reply = "Required parameter ImageId missing or empty.\n";
++        return false;
++    }
++
++    std::string minCount = getObject< std::string >( avm, "MinCount", found );
++    if( (! found) || minCount.empty() ) {
++        fprintf( stderr, "Failed to find minCount in query.\n" );
++        reply = "Required parameter MinCount missing or empty.\n";
++        return false;
++    }
++    
++    std::string maxCount = getObject< std::string >( avm, "MaxCount", found );
++    if( (! found) || maxCount.empty() ) {
++        fprintf( stderr, "Failed to find maxCount in query.\n" );
++        reply = "Required parameter MaxCount missing or empty.\n";
++        return false;
++    }
++    
++    if( minCount != "1" || maxCount != "1" ) {
++        fprintf( stderr, "The simulator presently only supports starting one instance at a time.\n" );
++        reply = "Counts must be '1' at present.\n";
++        return false;
++    }   
++
++    std::string keyName = getObject< std::string >( avm, "KeyName", found );
++    if( ! keyName.empty() ) {
++        Keypair kp = getObject< Keypair >( user.keypairs, keyName, found );
++        if( ! found ) {
++            std::ostringstream error;
++            error << "The requested keypair, '" << keyName << "', does not exist." << std::endl;
++            reply = error.str();
++            fprintf( stderr, "%s", reply.c_str() );
++            return false;
++        }
++    }
++
++    // We presently assume all instanceTypes are valid.
++    std::string instanceType = getObject< std::string >( avm, "InstanceType", found );
++    if( instanceType.empty() ) {
++        instanceType = "m1.small";
++    }
++
++    std::string userData = getObject< std::string >( avm, "UserData", found );
++    if( ! userData.empty() ) {
++        // We should validate that the user data is properly Base64-encoded.
++    }
++
++    std::vector< std::string > groupNames;
++    for( int i = 1; ; ++i ) {
++        std::ostringstream sgParameterName;
++        sgParameterName << "SecurityGroup." << i;
++        std::string sgName = getObject< std::string >( avm, sgParameterName.str(), found );
++        if( ! found ) { break; }
++        if( sgName.empty() ) {
++            std::ostringstream error;
++            error << "Optional parameter " << sgName << " must not be empty." << std::endl;
++            reply = error.str();
++            fprintf( stderr, "%s", reply.c_str() );
++            return false;
++        }
++        
++        NameToGroupMap::const_iterator ci = user.groups.find( sgName );
++        if( ci != user.groups.end() ) {
++            groupNames.push_back( sgName );
++        } else {
++            std::ostringstream error;
++            error << "Group '" << sgName << "' does not exist.\n";
++            reply = error.str();
++            fprintf( stderr, "%s", reply.c_str() );
++            return false;
++        }
++    }
++    
++    if( groupNames.empty() ) {
++        groupNames.push_back( "default" );
++    }
++
++    // Create the (unique) corresponding Instance.
++    char edh[] = "12345678";
++    snprintf( edh, sizeof( edh ), "%.8x", (unsigned)user.instances.size() );
++    
++    std::string instanceID = "i-"; instanceID += edh;
++    std::string privateDNSName = "private.dns."; privateDNSName += edh;
++    std::string publicDNSName = "public.dns."; publicDNSName += edh;
++    std::string instanceState = "pending";
++    user.instances[ instanceID ] = Instance( instanceID, imageID, privateDNSName, publicDNSName, instanceType, instanceState, keyName, groupNames );
++    std::string reservationID = "r-"; reservationID += edh;
++    
++    // Construct the XML reply.
++    std::ostringstream xml;
++    xml << "<RunInstancesResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;
++    
++    xml << "<requestId>" << requestID << "</requestId>" << std::endl;
++    xml << "<reservationId>" << reservationID << "</reservationId>" << std::endl;
++    xml << "<ownerId>" << userID << "</ownerId>" << std::endl;
++    
++    xml << "<groupSet>" << std::endl;
++        for( unsigned i = 0; i < groupNames.size(); ++i ) {
++            xml << xmlTag( "item", xmlTag( "groupId", groupNames[i] ) ) << std::endl;
++        }
++    xml << "</groupSet>" << std::endl;
++
++    xml << "<instancesSet>" << std::endl;
++        xml << user.instances[instanceID];
++    xml << "</instancesSet>" << std::endl;
++
++    xml << "</RunInstancesResponse>" << std::endl;
++
++    reply = xml.str();
++    return true;
++}
++
++bool handleTerminateInstances( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleTerminateInstances()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++    
++    // The ec2_gahp will never request more than one.
++    std::string instanceID = getObject< std::string >( avm, "InstanceId.1", found );
++    if( (! found) || instanceID.empty() ) {
++        fprintf( stderr, "Failed to find instanceID in query.\n" );
++        reply = "Required parameter InstanceId.1 missing or empty.\n";
++        return false;
++    }
++    
++    Instance instance = getObject< Instance >( user.instances, instanceID, found );
++    if( ! found ) {
++        std::ostringstream error;
++        error << "Instance ID '" << instanceID << "' does not exist." << std::endl;
++        reply = error.str();
++        fprintf( stderr, "%s", reply.c_str() );
++        return false;
++    }        
++
++    // Change the state of the instance.
++    InstanceState oldInstanceState = instance.instanceState;
++    InstanceState newInstanceState = InstanceState( "terminated" );
++    user.instances[ instanceID ].instanceState = newInstanceState;
++
++    // Construct the XML reply.
++    std::ostringstream xml;
++    xml << "<TerminateInstancesResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;
++
++    xml << xmlTag( "requestId", rID ) << std::endl;
++    xml << "<instancesSet>" << std::endl;
++        xml << xmlTag( "instanceId", instanceID ) << std::endl;
++        xml << "<currentState>" << std::endl;
++            xml << newInstanceState;
++        xml << "</currentState>" << std::endl;
++        xml << "<previousState>" << std::endl;
++            xml << oldInstanceState;
++        xml << "</previousState>" << std::endl;
++    xml << "</instancesSet>" << std::endl;
++    xml << "</TerminateInstancesResponse>" << std::endl;
++    
++    reply = xml.str();
++    return true;
++}
++
++bool handleDescribeInstances( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleDescribeInstances()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++
++    std::ostringstream xml;
++    xml << "<DescribeInstancesResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;
++
++    // Progress the state all of VMs.
++    for( InstanceIDToInstanceMap::iterator i = user.instances.begin(); i != user.instances.end(); ++i ) {
++        user.instances[ i->first ].instanceState.progress();
++    }
++
++    // Because the ec2_gahp only requests a single VM at a time, we don't
++    // maintain reservation records; instead, each VM is in its own.
++    xml << xmlTag( "requestID", rID ) << std::endl;
++    xml << "<reservationSet>" << std::endl;
++    
++    for( InstanceIDToInstanceMap::iterator i = user.instances.begin(); i != user.instances.end(); ++i ) {
++        Instance currentInstance = i->second;
++        std::string reservationID = "r-" + currentInstance.instanceID.substr( 2, 8 );
++
++        xml << "<item>" << std::endl;
++        
++            xml << "<reservationId>" << reservationID << "</reservationId>" << std::endl;
++            xml << "<ownerId>" << userID << "</ownerId>" << std::endl;
++            
++            xml << "<groupSet>" << std::endl;
++                for( unsigned j = 0; j < currentInstance.groupNames.size(); ++j ) {
++                    xml << xmlTag( "item", xmlTag( "groupId", currentInstance.groupNames[j] ) ) << std::endl;
++                }
++            xml << "</groupSet>" << std::endl;
++
++            xml << "<instancesSet>" << std::endl;
++                xml << currentInstance;
++            xml << "</instancesSet>" << std::endl;
++        
++        xml << "</item>" << std::endl;
++    }        
++            
++    xml << "</reservationSet>" << std::endl;
++    xml << "</DescribeInstancesResponse>" << std::endl;
++    
++    reply = xml.str();
++    return true;
++}
++
++bool handleCreateKeyPair( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleCreateKeyPair()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++
++    std::string keyName = getObject< std::string >( avm, "KeyName", found );
++    if( (! found) || keyName.empty() ) {
++        fprintf( stderr, "Failed to find KeyName in query.\n" );
++        reply = "Required parameter KeyName missing or empty.\n";
++        return false;
++    }
++    
++    Keypair kp( keyName, "key-fingerprint", "private-key" );
++    user.keypairs[ keyName ] = kp;
++    
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;
++
++    std::ostringstream xml;
++    xml << "<CreateKeyPairResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++    xml << xmlTag( "requestId", rID ) << std::endl;
++    xml << xmlTag( "keyName", kp.keyName ) << std::endl;
++    xml << xmlTag( "keyFingerprint", kp.fingerprint ) << std::endl;
++    xml << xmlTag( "keyMaterial", kp.privateKey ) << std::endl;
++    xml << "/<CreateKeyPairResponse>" << std::endl;
++    
++    reply = xml.str();
++    return true;
++}
++
++bool handleDeleteKeyPair( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleDeleteKeyPair()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++
++    std::string keyName = getObject< std::string >( avm, "KeyName", found );
++    if( (! found) || keyName.empty() ) {
++        fprintf( stderr, "Failed to find KeyName in query.\n" );
++        reply = "Required parameter KeyName missing or empty.\n";
++        return false;
++    }
++    
++    Keypair kp = getObject< Keypair >( user.keypairs, keyName, found );
++    if( found ) {
++        user.keypairs.erase( keyName );
++    } else {
++        // Amazon's EC2 blithely succeeds when this happen, but we'll
++        // let the developer(s) know that something's probably amiss.
++        std::ostringstream error;
++        error << "Keypair named '" << keyName << "' does not exist." << std::endl;
++        reply = error.str();
++        fprintf( stderr, "%s", reply.c_str() );
++    }        
++    
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;    
++    
++    std::ostringstream xml;
++    xml << "<DeleteKeyPairsResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++    xml << xmlTag( "requestId", requestID ) << std::endl;
++    xml << xmlTag( "return", "true" ) << std::endl;
++    xml << "</DeleteKeyPairsResponse>" << std::endl;
++    
++    reply = xml.str();
++    return true;
++}
++
++bool handleDescribeKeyPairs( AttributeValueMap & avm, std::string & reply, unsigned requestNumber ) {
++    // fprintf( stdout, "handleDescribeKeyPairs()\n" );
++
++    bool found = false;
++    std::string userID;
++    User & user = validateAndAcquireUser( avm, userID, reply, found );
++    if( ! found ) { return false; }
++
++    char rID[] = "1234";
++    snprintf( rID, sizeof( rID ), "%.4x", requestNumber );
++    std::string requestID = rID;    
++    
++    std::ostringstream xml;
++    
++    xml << "<DescribeKeyPairsResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-11-15/\">" << std::endl;
++    xml << "<keySet>" << std::endl;
++        for( NameToKeypairMap::const_iterator i = user.keypairs.begin(); i != user.keypairs.end(); ++i ) {
++            xml << i->second;
++        }
++    xml << "</keySet>" << std::endl;
++    xml << "</DescribeKeyPairsResponse>" << std::endl;
++    
++    reply = xml.str();
++    return true;
++}
++
++// Global.  Eww.
++ActionToHandlerMap simulatorActions;
++
++void registerAllHandlers() {
++    simulatorActions[ "RunInstances" ] = & handleRunInstances;
++    simulatorActions[ "TerminateInstances" ] = & handleTerminateInstances;
++    simulatorActions[ "DescribeInstances" ] = & handleDescribeInstances;
++    simulatorActions[ "CreateKeyPair" ] = & handleCreateKeyPair;
++    simulatorActions[ "DeleteKeyPair" ] = & handleDeleteKeyPair;
++    simulatorActions[ "DescribeKeyPairs" ] = & handleDescribeKeyPairs;
++}
++
++// m/^Host: <host>\r\n/
++bool extractHost( const std::string & request, std::string & host ) {
++    std::string::size_type i = request.find( "\r\nHost: " );
++    if( std::string::npos == i ) {
++        fprintf( stderr, "Malformed request '%s': contains no Host header; failing.\n", request.c_str() );
++        return false;
++    }
++
++    std::string::size_type j = request.find( "\r\n", i + 2 );
++    if( std::string::npos == j ) {
++        fprintf( stderr, "Malformed request '%s': Host field not CR/LF terminated; failing.\n", request.c_str() );
++        return false;
++    }
++
++    host = request.substr( i + 8, j - (i + 8)  );
++    return true;
++}
++
++// m/^GET <URL> HTTP/
++bool extractURL( const std::string & request, std::string & URL ) {
++    if( request.find( "GET " ) != 0 ) {
++        fprintf( stderr, "Malformed request '%s': did not begin with 'GET '; failing.\n", request.c_str() );
++        return false;
++    }
++    
++    URL = request.substr( 4, request.find( "HTTP" ) - 5 );
++    return true;
++}
++
++/*
++ * The most fragile part of the EC2 GAHP is the query signing, so
++ * we'd like to validate it.  See the comments in amazonCommands.cpp
++ * for more details.
++ *
++ * This function is presently a stub because I haven't solved the
++ * problem of key distribution between the tester and the simulator.
++ *
++ * Validates parameters:
++ *      Signature,
++ *      SignatureVersion
++ *      SignatureMethod
++ *      Timestamp
++ *      Version
++ * 
++ */
++bool validateSignature( std::string & /* method */,
++                        const std::string & /* host */,
++                        const std::string & /* URL */,
++                        const AttributeValueMap & /* queryParameters */ ) {
++    return true;
++}
++
++std::string constructReply( const std::string & statusLine, const std::string & response ) {
++    std::ostringstream reply;
++
++    // The ec2_gahp doesn't ever look at the headers.
++    reply << statusLine << "\r\n";
++    reply << "Content-Length: " << response.size() << "\r\n";
++    reply << "\r\n";
++    reply << response;
++    reply << "\r\n";
++
++    return reply.str();
++}
++
++std::string handleRequest( const std::string & request ) {
++    static unsigned requestCount = -1; ++requestCount;
++
++    std::string URL;
++    if( ! extractURL( request, URL ) ) {
++        return constructReply( "HTTP/1.1 400 Bad Request", "" );
++    }
++    
++    std::string host;
++    if( ! extractHost( request, host ) ) {
++        return constructReply( "HTTP/1.1 400 Bad Request", "" );
++    }
++    std::transform( host.begin(), host.end(), host.begin(), & tolower );
++    
++    // fprintf( stderr, "DEBUG: found 'http://%s%s'\n", host.c_str(), URL.c_str() );
++    
++    AttributeValueMap queryParameters;
++    std::string::size_type i = URL.find( "?" );
++    while( i < URL.size() ) {
++        // Properly encoded URLs will only have ampersands between
++        // the key-value pairs, and equals between keys and values.
++        std::string::size_type equalsIdx = URL.find( "=", i + 1 );
++        if( std::string::npos == equalsIdx ) {
++            std::ostringstream error;
++            error << "Malformed URL '" << URL << "': attribute without value; failing" << std::endl;
++            fprintf( stderr, error.str().c_str() );
++            return constructReply( "HTTP/1.1 400 Bad Request", error.str() );
++        }        
++        std::string::size_type ampersandIdx = URL.find( "&", i + 1 );
++        if( std::string::npos == ampersandIdx ) {
++            ampersandIdx = URL.size();
++        }
++
++        std::string key = URL.substr( i + 1, equalsIdx - (i + 1) );
++        std::string value = URL.substr( equalsIdx + 1, ampersandIdx - (equalsIdx + 1 ) );
++        // fprintf( stderr, "DEBUG: key = '%s', value = '%s'\n", key.c_str(), value.c_str() );
++        queryParameters[ key ] = value;
++        
++        i = ampersandIdx;
++    }
++
++    std::string method = "GET";
++    if( ! validateSignature( method, host, URL, queryParameters ) ) {
++        return constructReply( "HTTP/1.1 401 Unauthorized", "Failed signature validation." );
++    }
++
++    std::string action = queryParameters[ "Action" ];
++    if( action.empty() ) {
++        return constructReply( "HTTP/1.1 400 Bad Request", "No action specified." );
++    }
++    
++    std::string response;
++    ActionToHandlerMap::const_iterator ci = simulatorActions.find( action );
++    if( simulatorActions.end() == ci ) {
++        std::ostringstream error;
++        error << "Action '" << action << "' not found." << std::endl;
++        fprintf( stderr, error.str().c_str() );
++        return constructReply( "HTTP/1.1 404 Not Found", error.str() );
++    }
++    
++    if( (*(ci->second))( queryParameters, response, requestCount ) ) {
++        return constructReply( "HTTP/1.1 200 OK", response );
++    } else {
++        return constructReply( "HTTP/1.1 406 Not Acceptable", response );
++    }
++}
++
++void handleConnection( int sockfd ) {
++    ssize_t bytesRead;
++    char buffer[1024+1];
++    std::string request;
++
++    while( 1 ) {
++        bytesRead = read( sockfd, (void *) buffer, 1024 );
++        
++        if( bytesRead == -1 ) {
++            if( errno == EINTR ) {
++                // fprintf( stdout, "read() interrupted, retrying.\n" );
++                continue;
++            }
++            fprintf( stderr, "read() failed (%d): '%s'\n", errno, strerror( errno ) );
++            return;
++        }
++        
++        if( bytesRead == 0 ) {
++            close( sockfd );
++            return;
++        }
++        
++        buffer[bytesRead] = '\0';
++        request += buffer;
++        // fprintf( stderr, "DEBUG: request is now '%s'.\n", request.c_str() );
++        
++        // A given HTTP request is terminated by a blank line.
++        std::string::size_type index = request.find( "\r\n\r\n" );
++        while( index != std::string::npos ) {
++            std::string firstRequest = request.substr( 0, index + 4 );
++            request = request.substr( index + 4 );
++            // if( ! request.empty() ) { fprintf( stderr, "DEBUG: request remainder '%s'\n", request.c_str() ); }
++            
++            // fprintf( stderr, "DEBUG: handling request '%s'\n", firstRequest.c_str() );
++            std::string reply = handleRequest( firstRequest );
++            if( ! reply.empty() ) {
++                // fprintf( stderr, "DEBUG: writing reply '%s'\n", reply.c_str() );
++                ssize_t totalBytesWritten = 0;
++                ssize_t bytesToWrite = reply.size();
++                const char * outBuf = reply.c_str();
++                while( totalBytesWritten != bytesToWrite ) {
++                    ssize_t bytesWritten = write( sockfd,
++                        outBuf + totalBytesWritten,
++                        bytesToWrite - totalBytesWritten );
++                    if( bytesWritten == -1 ) {
++                        fprintf( stderr, "write() failed (%d), '%s'; aborting reply.\n", errno, strerror( errno ) );
++                        close( sockfd );
++                        return;
++                    }
++                    totalBytesWritten += bytesWritten;
++                }
++            }
++            
++            index = request.find( "\r\n\r\n" );            
++        }
++    }
++}
++
++int printLeakSummary() {
++    int rv = 0;
++    
++    AccessKeyIDToUserMap::const_iterator u = users.begin();
++    for( ; u != users.end(); ++u ) {
++        // You can leak keys...
++        if( ! u->second.keypairs.empty() ) {
++            fprintf( stdout, "User '%s' leaked keys.\n", u->first.c_str() );
++            rv = 6;
++        }
++        
++        // But since the ec2_gahp doesn't manage groups, you can't leak them.
++        
++        // We never garbage-collect terminated instances (since EC2 leaves
++        // them around for some time as well), but we should verify that
++        // they're all terminated.
++        InstanceIDToInstanceMap::const_iterator i = u->second.instances.begin();
++        for( ; i != u->second.instances.end(); ++i ) {
++            if( i->second.instanceState.code() != InstanceState::TERMINATED ) {
++                fprintf( stdout, "Instance '%s' in in state '%s', not terminated.\n", i->second.instanceID.c_str(), i->second.instanceState.name().c_str() );
++                rv = 6;
++            }
++        }
++    }
++
++    if( rv == 0 ) { fprintf( stdout, "No leaks detected.\n" ); }
++    return rv;
++}
++
++void sigterm( int sig ) {
++    fprintf( stdout, "Caught signal %d, exiting.\n", sig );
++    exit( printLeakSummary() );
++}
++
++int main( int /* argc */, char ** /* argv */ ) {
++
++    struct sigaction sa;
++    sa.sa_handler = & sigterm;
++    sigemptyset( &sa.sa_mask );
++    sa.sa_flags = 0;
++
++    int rv = sigaction( SIGTERM, & sa, NULL );
++    if( rv != 0 ) {
++        fprintf( stderr, "sigaction() failed (%d): '%s', aborting.\n", errno, strerror( errno ) );
++        exit( 5 );
++    }
++
++    rv = sigaction( SIGINT, & sa, NULL );
++    if( rv != 0 ) {
++        fprintf( stderr, "sigaction() failed (%d): '%s', aborting.\n", errno, strerror( errno ) );
++        exit( 5 );
++    }
++
++    int listenSocket = socket( PF_INET, SOCK_STREAM, 0 );
++    if( listenSocket == -1 ) {
++        fprintf( stderr, "socket() failed (%d): '%s'; aborting.\n", errno, strerror( errno ) );
++        exit( 1 );
++    }
++
++/*
++ * listen()ing to an unbound port selects a random free port automagically.
++ *
++    struct sockaddr_in listenAddr;
++    listenAddr.sin_family = AF_INET;
++    listenAddr.sin_port = htons( 21737 );
++    listenAddr.sin_addr.s_addr = INADDR_ANY;
++    rv = bind( listenSocket, (struct sockaddr *)(& listenAddr), sizeof( listenAddr ) );
++    if( rv != 0 ) {
++        fprintf( stderr, "bind() failed (%d): '%s'; aborting.\n", errno, strerror( errno ) );
++        exit( 2 );
++    }
++*/
++
++    rv = listen( listenSocket, 0 );
++    if( rv != 0 ) {
++        fprintf( stderr, "listen() failed (%d): '%s'; aborting.\n", errno, strerror( errno ) );
++        exit( 3 );
++    }
++
++    struct sockaddr_in listenAddr;
++    socklen_t listenAddrLen = sizeof( struct sockaddr_in );
++    rv = getsockname( listenSocket, (struct sockaddr *)(& listenAddr), & listenAddrLen );
++    if( rv != 0 ) {
++        fprintf( stderr, "getsockname() failed (%d): '%s'; aborting.\n", errno, strerror( errno ) );
++        exit( 5 );
++    }
++    if( listenAddrLen != sizeof( struct sockaddr_in ) ) {
++        fprintf( stderr, "getsockname() returned bogus address, aborting.\n" );
++        exit( 6 );
++    }
++    fprintf( stdout, "listen_port = %d\n", ntohs( listenAddr.sin_port ) );
++    rv = fflush( stdout );
++    if( rv != 0 ) {
++        fprintf( stderr, "fflush( stdout ) failed (%d): '%s'; aborting.\n", errno, strerror( errno ) );
++        exit( 7 );
++    }
++
++    registerAllHandlers();
++    registerTestUsers();
++
++    while( 1 ) {
++        struct sockaddr_in remoteAddr;
++        socklen_t raSize = sizeof( remoteAddr );
++        int remoteSocket = accept( listenSocket, (struct sockaddr *)(& remoteAddr), & raSize );
++        if( remoteSocket == -1 ) {
++            fprintf( stderr, "accept() failed(%d): '%s'; aborting.\n", errno, strerror( errno ) );
++            exit( 4 );
++        }
++        
++        handleConnection( remoteSocket );
++    }
++    
++    return 0;
++} // end main()
+diff --git a/src/ec2_gahp/request.cpp b/src/ec2_gahp/request.cpp
+new file mode 100644
+index 0000000..2e386cb
+--- /dev/null
++++ b/src/ec2_gahp/request.cpp
+@@ -0,0 +1,34 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#include "condor_common.h"
++#include "condor_debug.h"
++#include "amazongahp_common.h"
++#include "request.h"
++
++Request::Request (const char *cmd)
++{   
++	m_worker = NULL;
++	m_raw_cmd = cmd;
++
++	if ( parse_gahp_command(cmd, &m_args) )
++		m_reqid = (int)strtol(m_args.argv[1], (char **)NULL, 10);
++	else
++		m_reqid = -1;
++}
+diff --git a/src/ec2_gahp/request.h b/src/ec2_gahp/request.h
+new file mode 100644
+index 0000000..e7e0d93
+--- /dev/null
++++ b/src/ec2_gahp/request.h
+@@ -0,0 +1,40 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef AMAZON_REQUEST_H
++#define AMAZON_REQUEST_H
++
++#include "condor_common.h"
++#include <string>
++#include "amazongahp_common.h"
++
++class Worker;
++class Request {
++	public:
++		Request(const char* cmd);
++
++		int m_reqid;
++		Worker* m_worker;
++
++		std::string m_raw_cmd;
++		Gahp_Args m_args;
++		std::string m_result;
++};
++
++#endif
+diff --git a/src/ec2_gahp/test-sim.sh b/src/ec2_gahp/test-sim.sh
+new file mode 100755
+index 0000000..2f8169d
+--- /dev/null
++++ b/src/ec2_gahp/test-sim.sh
+@@ -0,0 +1,40 @@
++#!/bin/bash
++
++PORT=$1; shift;
++EC2_URL=http://localhost:${PORT}
++
++# CreateKeyPair.
++curl -i ${EC2_URL}'/?Action=CreateKeyPair&AWSAccessKeyId=1&KeyName=kn-1'; echo
++
++# DescribeKeyPairs.
++curl -i ${EC2_URL}'/?Action=DescribeKeyPairs&AWSAccessKeyId=1'; echo
++
++# Minimal RunInstances command.
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1'; echo
++
++# Individual options.
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1&KeyName=kn-1'; echo
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1&InstanceType=mx.example'; echo
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1&SecurityGroup.1=sg-name-1'; echo
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1&SecurityGroup.1=sg-name-2&SecurityGroup.2=sg-name-3'; echo
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1&UserData=somethingbase64encoded'; echo
++
++# All options.
++curl -i ${EC2_URL}'/?Action=RunInstances&AWSAccessKeyId=1&MaxCount=1&MinCount=1&ImageId=1'; echo
++
++# DescribeInstances.
++curl -i ${EC2_URL}'/?Action=DescribeInstances&AWSAccessKeyId=1'; echo
++
++# TerminateInstances.
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000000'; echo
++
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000001'; echo
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000002'; echo
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000003'; echo
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000004'; echo
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000005'; echo
++
++curl -i ${EC2_URL}'/?Action=TerminateInstances&AWSAccessKeyId=1&InstanceId.1=i-00000006'; echo
++
++# DeleteKeyPair
++curl -i ${EC2_URL}'/?Action=DeleteKeyPair&AWSAccessKeyId=1&KeyName=kn-1'; echo
+diff --git a/src/ec2_gahp/thread_control.h b/src/ec2_gahp/thread_control.h
+new file mode 100644
+index 0000000..e96804b
+--- /dev/null
++++ b/src/ec2_gahp/thread_control.h
+@@ -0,0 +1,40 @@
++/***************************************************************
++ *
++ * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
++ * University of Wisconsin-Madison, WI.
++ * 
++ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ ***************************************************************/
++
++#ifndef THREAD_CONTROL_H
++#define THREAD_CONTROL_H
++
++#include <pthread.h>
++
++	/* We use a big mutex to make certain only one thread is running at a time,
++	 * except when that thread would be blocked on I/O or a signal.  We do
++	 * this becase many data structures and methods used from utility libraries
++	 * are not inheriently thread safe.  So we error on the side of correctness,
++	 * and this isn't a big deal since we are only really concerned with the gahp
++	 * blocking when we do network communication and SOAP/WS_SECURITY processing.
++	 */
++
++extern pthread_mutex_t global_big_mutex;
++
++#define amazon_gahp_grab_big_mutex()	\
++	pthread_mutex_lock(&global_big_mutex)
++#define amazon_gahp_release_big_mutex()	\
++	pthread_mutex_unlock(&global_big_mutex)
++
++#endif
diff --git a/condor.spec b/condor.spec
index 5f984c7..71e9531 100644
--- a/condor.spec
+++ b/condor.spec
@@ -2,7 +2,7 @@
 
 Summary: Condor: High Throughput Computing
 Name: condor
-Version: 7.6.1
+Version: 7.7.0
 Release: 0.1%{?dist}
 License: ASL 2.0
 Group: Applications/System
@@ -34,7 +34,7 @@ Source0: condor-7.6.0-327697-RH.tar.gz
 Source1: generate-tarball.sh
 Patch0: condor_config.generic.patch
 Patch3: chkconfig_off.patch
-Patch4: 7.6.1-catch_up.patch
+Patch4: 7.7.0-catch_up.patch
 
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -205,9 +205,9 @@ exit 0
 %prep
 %setup -q -n %{name}-%{tarball_version}
 
-%patch0 -p1
 %patch3 -p1
 %patch4 -p1
+%patch0 -p1
 
 # fix errant execute permissions
 find src -perm /a+x -type f -name "*.[Cch]" -exec chmod a-x {} \;
@@ -491,6 +491,7 @@ rm -rf %{buildroot}
 %_bindir/condor_ssh_to_job
 %_bindir/condor_power
 %_bindir/condor_gather_info
+%_bindir/condor_test_match
 # sbin/condor is a link for master_off, off, on, reconfig,
 # reconfig_schedd, restart
 %_sbindir/condor_advertise
@@ -517,7 +518,7 @@ rm -rf %{buildroot}
 %_sbindir/condor_store_cred
 %_sbindir/condor_transferd
 %_sbindir/condor_updates_stats
-#%_sbindir/amazon_gahp
+%_sbindir/ec2_gahp
 %_sbindir/condor_gridmanager
 #%_sbindir/condor_credd
 %config(noreplace) %_var/lib/condor/condor_config.local
@@ -678,6 +679,11 @@ fi
 
 
 %changelog
+* Fri May 13 2011 <matt at redhat> - 7.7.0-0.1
+- Fast forward to 7.7.0 pre-release at 79952d6b
+- Introduced ec2_gahp
+- 79952d6b brings schema expectations inline with Cumin
+
 * Tue May 10 2011 <matt at redhat> - 7.6.1-0.1
 - Upgrade to 7.6.0 release, pre-release of 7.6.1 at 5617a464
 - Upstreamed patch: log_lock_run.patch
diff --git a/condor_config.generic.patch b/condor_config.generic.patch
index 4bd6014..8318a82 100644
--- a/condor_config.generic.patch
+++ b/condor_config.generic.patch
@@ -1,5 +1,7 @@
---- a/src/condor_examples/condor_config.generic	2011-04-16 05:09:12.000000000 -0400
-+++ b/src/condor_examples/condor_config.generic	2011-04-27 13:49:41.633979435 -0400
+diff --git a/src/condor_examples/condor_config.generic b/src/condor_examples/condor_config.generic
+index 3375e11..b921459 100644
+--- a/src/condor_examples/condor_config.generic
++++ b/src/condor_examples/condor_config.generic
 @@ -1,12 +1,31 @@
  ######################################################################
 +######################################################################
@@ -36,7 +38,7 @@
  ##
  ##  The file is divided into four main parts:
  ##  Part 1:  Settings you likely want to customize 
-@@ -53,7 +72,7 @@
+@@ -53,7 +72,7 @@ CONDOR_HOST	= central-manager-hostname.your.domain
  ##  Pathnames:
  ##--------------------------------------------------------------------
  ##  Where have you installed the bin, sbin and lib condor directories?   
@@ -45,7 +47,7 @@
  
  ##  Where is the local condor directory for each host?  
  ##  This is where the local config file(s), logs and
-@@ -61,17 +80,20 @@
+@@ -61,17 +80,20 @@ RELEASE_DIR		= /usr/local/condor
  LOCAL_DIR		= $(TILDE)
  #LOCAL_DIR		= $(RELEASE_DIR)/hosts/$(HOSTNAME)
  
@@ -72,12 +74,12 @@
  
  ## If the local config file is not present, is it an error?
  ## WARNING: This is a potential security issue. 
-@@ -409,7 +431,22 @@
+@@ -409,7 +431,22 @@ ALLOW_READ_STARTD     = $(ALLOW_READ), $(FLOCK_FROM)
  ##  condor account, it's probably condor.  Otherwise, it's whatever
  ##  you've set in the CONDOR_IDS environment variable.  See the Admin
  ##  manual for details on this.
 -LOCK		= $(LOG)
-+LOCK = /var/lock/condor
++LOCK		= /var/lock/condor
 +
 +# Condor allows for creating surrogate lock files that always live on
 +# local disk. This is useful for the times when Condor would otherwise
@@ -96,7 +98,7 @@
  
  ##  If you don't use a fully qualified name in your /etc/hosts file
  ##  (or NIS, etc.) for either your official hostname or as an alias,
-@@ -475,7 +512,8 @@
+@@ -475,7 +512,8 @@ GLIDEIN_SERVER_URLS = \
  ##  the execute machine and just make sure the two strings match.  The
  ##  default for this setting is False, since it is more secure this
  ##  way.
@@ -106,7 +108,7 @@
  
  ## If you would like to be informed in near real-time via condor_q when
  ## a vanilla/standard/java job is in a suspension state, set this attribute to
-@@ -514,8 +552,9 @@
+@@ -514,8 +552,9 @@ GLIDEIN_SERVER_URLS = \
  ## just disable it).
  #NEGOTIATOR_IGNORE_USER_PRIORITIES = False
  
@@ -118,7 +120,7 @@
  
  ## This setting tells Condor whether to delegate or copy GSI X509
  ## credentials when sending them over the wire between daemons.
-@@ -605,6 +644,9 @@
+@@ -605,6 +644,9 @@ SHARED_PORT_DEBUG       =
  MAX_HDFS_LOG            = 1000000
  HDFS_DEBUG              =
  
@@ -128,29 +130,29 @@
  # High Availability Logs
  MAX_HAD_LOG		= 1000000
  HAD_DEBUG		=
-@@ -927,14 +969,18 @@
+@@ -927,14 +969,18 @@ TESTINGMODE_CLAIM_WORKLIFE = 1200
  ######################################################################
  
  ##  Pathnames
 -LOG		= $(LOCAL_DIR)/log
-+LOG         = /var/log/condor
++LOG		= /var/log/condor
  SPOOL		= $(LOCAL_DIR)/spool
  EXECUTE		= $(LOCAL_DIR)/execute
  BIN		= $(RELEASE_DIR)/bin
  LIB		= $(RELEASE_DIR)/lib
 -INCLUDE		= $(RELEASE_DIR)/include
-+INCLUDE     = $(RELEASE_DIR)/include/condor
++INCLUDE		= $(RELEASE_DIR)/include/condor
  SBIN		= $(RELEASE_DIR)/sbin
 -LIBEXEC		= $(RELEASE_DIR)/libexec
-+SHARE   = $(RELEASE_DIR)/share/condor
-+RUN     = /var/run/condor
++SHARE		= $(RELEASE_DIR)/share/condor
++RUN		= /var/run/condor
 +DATA		= $(SPOOL)
-+ETC     = /etc/condor
++ETC		= /etc/condor
 +LIBEXEC		= $(RELEASE_DIR)/libexec/condor
  
  ## If you leave HISTORY undefined (comment it out), no history file
  ## will be created. 
-@@ -958,6 +1004,7 @@
+@@ -958,6 +1004,7 @@ HAD_LOG		= $(LOG)/HADLog
  REPLICATION_LOG	= $(LOG)/ReplicationLog
  TRANSFERER_LOG	= $(LOG)/TransfererLog
  HDFS_LOG	= $(LOG)/HDFSLog
@@ -158,7 +160,7 @@
  
  ##  Lock files
  SHADOW_LOCK	= $(LOCK)/ShadowLock
-@@ -1078,7 +1125,7 @@
+@@ -1078,7 +1125,7 @@ DAEMON_LIST			= MASTER, STARTD, SCHEDD
  #DC_DAEMON_LIST = \
  #MASTER, STARTD, SCHEDD, KBDD, COLLECTOR, NEGOTIATOR, EVENTD, \
  #VIEW_SERVER, CONDOR_VIEW, VIEW_COLLECTOR, HAWKEYE, CREDD, HAD, \
@@ -167,7 +169,7 @@
  
  
  ##  Where are the binaries for these daemons?
-@@ -1094,6 +1141,7 @@
+@@ -1094,6 +1141,7 @@ ROOSTER                         = $(LIBEXEC)/condor_rooster
  HDFS				= $(SBIN)/condor_hdfs
  SHARED_PORT			= $(LIBEXEC)/condor_shared_port
  TRANSFERER			= $(LIBEXEC)/condor_transferer
@@ -175,7 +177,7 @@
  
  ##  When the master starts up, it can place it's address (IP and port)
  ##  into a file.  This way, tools running on the local machine don't
-@@ -1170,11 +1218,13 @@
+@@ -1170,11 +1218,13 @@ PREEN_ARGS			= -m -r
  ##--------------------------------------------------------------------
  ## Address to which Condor will send a weekly e-mail with output of
  ## condor_status.
@@ -191,7 +193,7 @@
  
  
  ##--------------------------------------------------------------------
-@@ -1183,6 +1233,7 @@
+@@ -1183,6 +1233,7 @@ PREEN_ARGS			= -m -r
  ## Determine if the Negotiator will honor SlotWeight attributes, which
  ## may be used to give a slot greater weight when calculating usage.
  #NEGOTIATOR_USE_SLOT_WEIGHTS = True
@@ -199,7 +201,7 @@
  
  
  ## How often the Negotaitor starts a negotiation cycle, defined in
-@@ -1620,7 +1671,7 @@
+@@ -1620,7 +1671,7 @@ QUEUE_SUPER_USERS	= root, condor
  ##--------------------------------------------------------------------
  ##  condor_starter
  ##--------------------------------------------------------------------
@@ -208,7 +210,7 @@
  ##  jobs on your execute machines.  If you want this, uncomment the
  ##  following entry and set it to how "nice" you want the user
  ##  jobs. (1-19)  The larger the number, the lower priority the
-@@ -1673,7 +1724,7 @@
+@@ -1661,7 +1712,7 @@ PROCD = $(SBIN)/condor_procd
  #     UNIX); the name will be something like:
  #         \\.\pipe\condor_procd
  #
@@ -217,7 +219,7 @@
  
  # The procd currently uses a very simplistic logging system. Since this
  # log will not be rotated like other Condor logs, it is only recommended
-@@ -1774,7 +1825,7 @@
+@@ -1770,7 +1821,7 @@ JAVA_MAXHEAP_ARGUMENT = -Xmx
  ## them here.  However, do not remove the existing entries, as Condor
  ## needs them.
  
@@ -226,78 +228,7 @@
  
  ##  JAVA_CLASSPATH_ARGUMENT describes the command-line parameter
  ##  used to introduce a new classpath:
-@@ -1830,6 +1881,14 @@
- ##  Various other settings that the Condor-G can use. 
- ##--------------------------------------------------------------------
- 
-+## The number of seconds between status update requests. You can make 
-+## this short (5 seconds) if you want Condor to respond quickly to 
-+## instances as they terminate, or you can make it long (300 seconds = 5 
-+## minutes) if you know your instances will run for awhile and don't 
-+## mind delay between when they stop and when Condor responds to them 
-+## stopping.
-+GRIDMANAGER_JOB_PROBE_INTERVAL = 300
-+
- ## For grid-type gt2 jobs (pre-WS GRAM), limit the number of jobmanager
- ## processes the gridmanager will let run on the headnode. Letting too
- ## many jobmanagers run causes severe load on the headnode.
-@@ -1888,7 +1947,7 @@
- CONDOR_GAHP_WORKER = $(SBIN)/condor_c-gahp_worker_thread
- 
- ##
--## The Condor GAHP server has it's own log.  Like the Gridmanager, the
-+## The Condor GAHP server has its own log.  Like the Gridmanager, the
- ## GAHP server is run as the User, not a Condor daemon, so all users must 
- ## have write permssion to the directory used for the logfile. Our 
- ## suggestion is to create a directory called GridLogs in $(LOG) with 
-@@ -1965,7 +2024,7 @@
- DELTACLOUD_GAHP = $(SBIN)/deltacloud_gahp
- 
- ##
--## EC2: Universe = Grid, Grid_Resource = Amazon
-+## EC2 (SOAP): Universe = Grid, Grid_Resource = Amazon
- ##
- 
- ## The location of the amazon_gahp program, required
-@@ -1976,20 +2035,29 @@
- #AMAZON_GAHP_DEBUG = D_FULLDEBUG
- AMAZON_GAHP_LOG = /tmp/AmazonGahpLog.$(USERNAME)
- 
--## The number of seconds between status update requests to EC2. You can
--## make this short (5 seconds) if you want Condor to respond quickly to
--## instances as they terminate, or you can make it long (300 seconds = 5
--## minutes) if you know your instances will run for awhile and don't mind
--## delay between when they stop and when Condor responds to them
--## stopping.
--GRIDMANAGER_JOB_PROBE_INTERVAL = 300
--
- ## As of this writing Amazon EC2 has a hard limit of 20 concurrently
- ## running instances, so a limit of 20 is imposed so the GridManager
- ## does not waste its time sending requests that will be rejected.
- GRIDMANAGER_MAX_SUBMITTED_JOBS_PER_RESOURCE_AMAZON = 20
- 
- ##
-+## EC2 (REST): Universe = Grid, Grid_Resource = ec2
-+##
-+
-+## The location of the ec2_gahp program, required
-+EC2_GAHP = $(SBIN)/ec2_gahp
-+
-+## Location of log files, useful for debugging, must be in
-+## a directory writable by any user, such as /tmp
-+#EC2_GAHP_DEBUG = D_FULLDEBUG
-+EC2_GAHP_LOG = /tmp/EC2GahpLog.$(USERNAME)
-+
-+## As of this writing Amazon EC2 has a hard limit of 20 concurrently
-+## running instances, so a limit of 20 is imposed so the GridManager
-+## does not waste its time sending requests that will be rejected.
-+GRIDMANAGER_MAX_SUBMITTED_JOBS_PER_RESOURCE_EC2 = 20
-+
-+##
- ##--------------------------------------------------------------------
- ##  condor_credd credential managment daemon
- ##--------------------------------------------------------------------
-@@ -2250,8 +2318,8 @@
+@@ -2246,8 +2297,8 @@ MAX_VM_GAHP_LOG	= 1000000
  
  ## What kind of virtual machine program will be used for 
  ## the VM universe?
@@ -308,7 +239,7 @@
  
  ## How much memory can be used for the VM universe? (Required)
  ## This value is the maximum amount of memory that can be used by the 
-@@ -2482,7 +2550,7 @@
+@@ -2478,7 +2529,7 @@ KBDD_ADDRESS_FILE = $(LOG)/.kbdd_address
  #SSH_TO_JOB_SSHD_ARGS = "-i -e -f %f"
  
  # sshd configuration template used by condor_ssh_to_job_sshd_setup.


More information about the scm-commits mailing list