Index: fedd/fedd/access.py
===================================================================
--- fedd/fedd/access.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/access.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -10,5 +10,4 @@
 from threading import *
 
-from fedd_services import *
 from util import *
 from allocate_project import allocate_project_local, allocate_project_remote
@@ -45,13 +44,6 @@
     id_list_attrs = ("restricted",)
 
-    proxy_RequestAccess= \
-	    service_caller('RequestAccess', 'getfeddPortType', 
-		    feddServiceLocator, RequestAccessRequestMessage,
-		    'RequestAccessRequestBody')
-
-    proxy_ReleaseAccess= \
-	    service_caller('ReleaseAccess', 'getfeddPortType', 
-		    feddServiceLocator, ReleaseAccessRequestMessage,
-		    'ReleaseAccessRequestBody')
+    proxy_RequestAccess= service_caller('RequestAccess')
+    proxy_ReleaseAccess= service_caller('ReleaseAccess')
 
     def __init__(self, config=None, auth=None):
@@ -154,18 +146,12 @@
 
 	self.soap_services = {\
-	    'RequestAccess': soap_handler(\
-		RequestAccessRequestMessage.typecode,\
-		self.RequestAccess, RequestAccessResponseMessage,\
-		"RequestAccessResponseBody"), \
-	    'ReleaseAccess': soap_handler(\
-		ReleaseAccessRequestMessage.typecode,\
-		self.ReleaseAccess, ReleaseAccessResponseMessage,\
-		"ReleaseAccessResponseBody")\
+	    'RequestAccess': soap_handler("RequestAccess", self.RequestAccess),
+	    'ReleaseAccess': soap_handler("ReleaseAccess", self.ReleaseAccess),
 	    }
 	self.xmlrpc_services =  {\
-	    'RequestAccess': xmlrpc_handler(\
-		self.RequestAccess, "RequestAccessResponseBody"),\
-	    'ReleaseAccess': xmlrpc_handler(\
-		self.ReleaseAccess, "ReleaseAccessResponseBody")\
+	    'RequestAccess': xmlrpc_handler('RequestAccess',
+		self.RequestAccess),
+	    'ReleaseAccess': xmlrpc_handler('ReleaseAccess',
+		self.ReleaseAccess),
 	    }
 
@@ -518,8 +504,7 @@
 
 	Build the dictionary description of the response and use
-	fedd_utils.pack_soap to create the soap message.  NB that alloc_id is
-	a fedd_services_types.IDType_Holder pulled from the incoming message.
-	ap is the allocate project message returned from a remote project
-	allocation (even if that allocation was done locally).
+	fedd_utils.pack_soap to create the soap message.  ap is the allocate
+	project message returned from a remote project allocation (even if that
+	allocation was done locally).
 	"""
 	# Because alloc_id is already a fedd_services_types.IDType_Holder,
Index: fedd/fedd/allocate_project.py
===================================================================
--- fedd/fedd/allocate_project.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/allocate_project.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -8,6 +8,4 @@
 import tempfile
 
-from fedd_services import *
-from fedd_internal_services import *
 from util import *
 from fedid import fedid
@@ -92,16 +90,10 @@
 	# Internal services are SOAP only
 	self.soap_services = {\
-		"AllocateProject": soap_handler(\
-		AllocateProjectRequestMessage.typecode,\
-		self.dynamic_project, AllocateProjectResponseMessage,\
-		"AllocateProjectResponseBody"), 
-		"StaticProject": soap_handler(\
-		StaticProjectRequestMessage.typecode,\
-		self.static_project, StaticProjectResponseMessage,\
-		"StaticProjectResponseBody"),\
-		"ReleaseProject": soap_handler(\
-		ReleaseProjectRequestMessage.typecode,\
-		self.release_project, ReleaseProjectResponseMessage,\
-		"ReleaseProjectResponseBody")\
+		"AllocateProject": soap_handler("AllocateProject", 
+		    self.dynamic_project),
+		"StaticProject": soap_handler("StaticProject", 
+		    self.static_project),
+		"ReleaseProject": soap_handler("ReleaseProject", 
+		    self.release_project),
 		}
 	self.xmlrpc_services = { }
@@ -388,8 +380,6 @@
 	"""
 
-	def __init__(self, url, cert_file, cert_pwd, trusted_certs, 
-		method, req_name, req_alloc, resp_name):
-	    service_caller.__init__(self, method, 'getfeddInternalPortType',
-		    feddInternalServiceLocator, req_alloc, req_name)
+	def __init__(self, url, cert_file, cert_pwd, trusted_certs, method):
+	    service_caller.__init__(self, method)
 	    self.url = url
 	    self.cert_file = cert_file
@@ -471,14 +461,8 @@
 	# The specializations of the proxy functions
 	self.dynamic_project = self.proxy(self.url, self.cert_file, 
-		self.cert_pwd, self.trusted_certs, "AllocateProject",
-		"AllocateProjectRequestBody", AllocateProjectRequestMessage,
-		"AllocateProjectResponseBody")
+		self.cert_pwd, self.trusted_certs, "AllocateProject")
 	self.static_project = self.proxy(self.url, self.cert_file, 
-		self.cert_pwd, self.trusted_certs, "StaticProject",
-		"StaticProjectRequestBody", StaticProjectRequestMessage,
-		"StaticProjectResponseBody")
+		self.cert_pwd, self.trusted_certs, "StaticProject")
 	self.release_project = self.proxy(self.url, self.cert_file,
-		self.cert_pwd, self.trusted_certs, "ReleaseProject",
-		"ReleaseProjectRequestBody", ReleaseProjectRequestMessage,
-		"ReleaseProjectResponseBody")
-
+		self.cert_pwd, self.trusted_certs, "ReleaseProject")
+
Index: fedd/fedd/experiment_control.py
===================================================================
--- fedd/fedd/experiment_control.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/experiment_control.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -19,6 +19,4 @@
 from subprocess import *
 
-from fedd_services import *
-from fedd_internal_services import *
 from util import *
 from fedid import fedid, generate_fedid
@@ -140,15 +138,7 @@
 		self.pdata.terminate()
 
-    call_RequestAccess = service_caller('RequestAccess',
-	    'getfeddPortType', feddServiceLocator, 
-	    RequestAccessRequestMessage, 'RequestAccessRequestBody')
-
-    call_ReleaseAccess = service_caller('ReleaseAccess',
-	    'getfeddPortType', feddServiceLocator, 
-	    ReleaseAccessRequestMessage, 'ReleaseAccessRequestBody')
-
-    call_Ns2Split = service_caller('Ns2Split',
-	    'getfeddInternalPortType', feddInternalServiceLocator, 
-	    Ns2SplitRequestMessage, 'Ns2SplitRequestBody')
+    call_RequestAccess = service_caller('RequestAccess')
+    call_ReleaseAccess = service_caller('ReleaseAccess')
+    call_Ns2Split = service_caller('Ns2Split')
 
     def __init__(self, config=None, auth=None):
@@ -275,47 +265,19 @@
 	# Dispatch tables
 	self.soap_services = {\
-		'Create': soap_handler(\
-			CreateRequestMessage.typecode,
-			getattr(self, "create_experiment"), 
-			CreateResponseMessage,
-			"CreateResponseBody"),
-		'Vtopo': soap_handler(\
-			VtopoRequestMessage.typecode,
-			getattr(self, "get_vtopo"),
-			VtopoResponseMessage,
-			"VtopoResponseBody"),
-		'Vis': soap_handler(\
-			VisRequestMessage.typecode,
-			getattr(self, "get_vis"),
-			VisResponseMessage,
-			"VisResponseBody"),
-		'Info': soap_handler(\
-			InfoRequestMessage.typecode,
-			getattr(self, "get_info"),
-			InfoResponseMessage,
-			"InfoResponseBody"),
-		'Terminate': soap_handler(\
-			TerminateRequestMessage.typecode,
-			getattr(self, "terminate_experiment"),
-			TerminateResponseMessage,
-			"TerminateResponseBody"),
+		'Create': soap_handler('Create', self.create_experiment),
+		'Vtopo': soap_handler('Vtopo', self.get_vtopo),
+		'Vis': soap_handler('Vis', self.get_vis),
+		'Info': soap_handler('Info', self.get_info),
+		'Terminate': soap_handler('Terminate', 
+		    self.terminate_experiment),
 	}
 
 	self.xmlrpc_services = {\
-		'Create': xmlrpc_handler(\
-			getattr(self, "create_experiment"), 
-			"CreateResponseBody"),
-		'Vtopo': xmlrpc_handler(\
-			getattr(self, "get_vtopo"),
-			"VtopoResponseBody"),
-		'Vis': xmlrpc_handler(\
-			getattr(self, "get_vis"),
-			"VisResponseBody"),
-		'Info': xmlrpc_handler(\
-			getattr(self, "get_info"),
-			"InfoResponseBody"),
-		'Terminate': xmlrpc_handler(\
-			getattr(self, "terminate_experiment"),
-			"TerminateResponseBody"),
+		'Create': xmlrpc_handler('Create', self.create_experiment),
+		'Vtopo': xmlrpc_handler('Vtopo', self.get_vtopo),
+		'Vis': xmlrpc_handler('Vis', self.get_vis),
+		'Info': xmlrpc_handler('Info', self.get_info),
+		'Terminate': xmlrpc_handler('Terminate',
+		    self.terminate_experiment),
 	}
 
Index: fedd/fedd/remote_service.py
===================================================================
--- fedd/fedd/remote_service.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/remote_service.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -11,7 +11,9 @@
 from ZSI import ParseException, FaultException, SoapWriter
 
-from service_error import *
+from service_error import service_error
 from xmlrpclib import ServerProxy, dumps, loads, Fault, Error, Binary
 
+import fedd_services
+import fedd_internal_services
 from util import fedd_ssl_context
 from fedid import fedid
@@ -181,9 +183,37 @@
     created constructors will result in None being returned.
     """
-    def __init__(self, typecode, method, constructor, body_name):
-	self.typecode = typecode
+    def __init__(self, service_name, method, typecode=None,
+	    constructor=None, body_name=None):
 	self.method = method
-	self.constructor = constructor
-	self.body_name = body_name
+
+	response_class_name = "%sResponseMessage" % service_name
+	request_class_name = "%sRequestMessage" % service_name
+
+	if body_name: self.body_name = body_name
+	else: self.body_name = "%sResponseBody" % service_name
+
+	if constructor: self.constructor = constructor
+	else:
+	    self.constructor = self.get_class(response_class_name)
+	    if not self.constructor:
+		raise service_error(service_error.internal,
+			"Cannot find class for %s" % response_class_name)
+
+	if typecode: self.typecode = typecode
+	else: 
+	    req = self.get_class(request_class_name)
+	    if req:
+		self.typecode = req.typecode
+	    else:
+		raise service_error(service_error.internal,
+			"Cannot find class for %s" % request_class_name)
+
+	    if not self.typecode:
+		raise service_error(service_error.internal,
+			"Cannot get typecode for %s" % class_name)
+
+    def get_class(self, class_name):
+	return getattr(fedd_services, class_name, None) or \
+		getattr(fedd_internal_services, class_name, None)
 
     def __call__(self, ps, fid):
@@ -197,4 +227,5 @@
 	resp = self.constructor()
 	set_element = getattr(resp, "set_element_%s" % self.body_name, None)
+	print "set_element_%s" % self.body_name
 	if set_element and callable(set_element):
 	    try:
@@ -220,7 +251,7 @@
     to fedid objects on input and encapsulated as Binaries on output.
     """
-    def __init__(self, method, body_name):
+    def __init__(self, service_name, method):
 	self.method = method
-	self.body_name = body_name
+	self.body_name = "%sResponseBody" % service_name
 
     def __call__(self, params, fid):
@@ -239,11 +270,29 @@
 
 class service_caller(remote_service_base):
-    def __init__(self, service_name, port_name, locator, request_message, 
-	    request_body_name, tracefile=None):
+    def __init__(self, service_name, request_message=None, 
+	    request_body_name=None, tracefile=None):
 	self.service_name = service_name
-	self.port_name = port_name
-	self.locator = locator
-	self.request_message = request_message
-	self.request_body_name = request_body_name
+
+	if getattr(fedd_services.feddBindingSOAP, service_name, None):
+	    self.locator = fedd_services.feddServiceLocator
+	    self.port_name = 'getfeddPortType'
+	elif getattr(fedd_internal_services.feddInternalBindingSOAP, 
+		service_name, None):
+	    self.locator = fedd_internal_services.feddInternalServiceLocator
+	    self.port_name = 'getfeddInternalPortType'
+
+	if request_message: self.request_message = request_message
+	else:
+	    request_message_name = "%sRequestMessage" % service_name
+	    self.request_message = \
+		    getattr(fedd_services, request_message_name, None) or \
+		    getattr(fedd_internal_services, request_message_name, None)
+	    if not self.request_message:
+		raise service_error(service_error.internal,
+			"Cannot find class for %s" % request_message_name)
+
+	if request_body_name: self.request_body_name = request_body_name
+	else: self.request_body_name = "%sRequestBody" % service_name
+
 	self.tracefile = tracefile
 	self.__call__ = self.call_service
Index: fedd/fedd/split.py
===================================================================
--- fedd/fedd/split.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/split.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -6,6 +6,4 @@
 import logging
 
-from fedd_services import *
-from fedd_internal_services import *
 from util import *
 from fedid import fedid
@@ -45,15 +43,9 @@
 	# Dispatch tables
 	self.soap_services = {\
-		'Ns2Split': soap_handler(\
-			Ns2SplitRequestMessage.typecode,
-			getattr(self, "run_splitter"), 
-			Ns2SplitResponseMessage,
-			"Ns2SplitResponseBody"),
+		'Ns2Split': soap_handler("Ns2Split", self.run_splitter),
 	}
 
 	self.xmlrpc_services = {\
-		'Ns2Split': xmlrpc_handler(\
-			getattr(self, "run_splitter"), 
-			"Ns2SplitResponseBody"),
+		'Ns2Split': xmlrpc_handler('Ns2Split', self.run_splitter),
 	}
 
Index: fedd/fedd/util.py
===================================================================
--- fedd/fedd/util.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd/util.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -35,6 +35,12 @@
 	else:
 	    self.load_cert(my_cert)
-	if trusted_certs != None: self.load_verify_locations(trusted_certs)
-	self.set_verify(SSL.verify_peer, 10)
+
+	# If no trusted certificates are specified, allow unknown CAs.
+	if trusted_certs: 
+	    self.load_verify_locations(trusted_certs)
+	    self.set_verify(SSL.verify_peer, 10)
+	else:
+	    self.set_verify(SSL.verify_peer, 10, 
+		callback=SSL.cb.ssl_verify_callback_allow_unknown_ca)
 
 def pack_id(id):
Index: fedd/fedd_client.py
===================================================================
--- fedd/fedd_client.py	(revision edbc841c6485717fb44c4354cce2ed7ac9a57551)
+++ fedd/fedd_client.py	(revision f069052f9a49bb6b76fa34414f58e4bdb34371a9)
@@ -4,7 +4,4 @@
 import os
 import pwd
-
-from fedd.fedd_services import *
-from fedd.fedd_internal_services import *
 
 from fedd import fedid, service_error
@@ -177,22 +174,9 @@
 	Specialize the class for the pre method
 	"""
-	self.RequestMessage = globals()["%sRequestMessage" % pre]
-	self.ResponseMessage = globals()["%sResponseMessage" % pre]
 	self.RequestBody="%sRequestBody" % pre
 	self.ResponseBody="%sResponseBody" % pre
 	self.method = pre
 
-	method_call = getattr(feddServiceLocator().getfeddPortType(),
-		self.method, None)
-	if method_call:
-	    # The pre method is a fedd external service
-	    self.caller = service_caller(self.method, 'getfeddPortType', 
-		    feddServiceLocator, self.RequestMessage, self.RequestBody)
-	else:
-	    # The pre method is a fedd internal service
-	    self.caller = service_caller(self.method, 
-		    'getfeddInternalPortType', feddInternalServiceLocator,
-		    self.RequestMessage, self.RequestBody)
-
+	self.caller = service_caller(self.method)
 	self.RPCException = fedd_rpc.RPCException
 
@@ -255,5 +239,5 @@
 	    try:
 		context = fedd_ssl_context(cert, trusted)
-	    except SSL.SSLError, e:
+	    except Exception, e:
 		# Yes, doing this on message type is not ideal.  The string
 		# comes from OpenSSL, so check there is this stops working.
@@ -343,9 +327,7 @@
 	(opts, args) = parser.parse_args()
 
-	if opts.trusted != None:
+	if opts.trusted:
 	    if ( not os.access(opts.trusted, os.R_OK) ) :
 		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-	else:
-	    parser.error("--trusted is required")
 
 	if opts.debug > 0: opts.tracefile=sys.stderr
@@ -411,9 +393,7 @@
 	(opts, args) = parser.parse_args()
 
-	if opts.trusted != None:
+	if opts.trusted:
 	    if ( not os.access(opts.trusted, os.R_OK) ) :
 		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-	else:
-	    parser.error("--trusted is required")
 
 	if opts.debug > 0: opts.tracefile=sys.stderr
@@ -471,9 +451,7 @@
 	(opts, args) = parser.parse_args()
 
-	if opts.trusted != None:
+	if opts.trusted:
 	    if ( not os.access(opts.trusted, os.R_OK) ) :
 		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-	else:
-	    parser.error("--trusted is required")
 
 	if not opts.project :
@@ -568,9 +546,7 @@
 	(opts, args) = parser.parse_args()
 
-	if opts.trusted != None:
+	if opts.trusted:
 	    if ( not os.access(opts.trusted, os.R_OK) ) :
 		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-	else:
-	    parser.error("--trusted is required")
 
 	if opts.debug > 0: opts.tracefile=sys.stderr
@@ -674,9 +650,7 @@
 	    parser.error("--testbed is required")
 
-	if opts.trusted != None:
+	if opts.trusted:
 	    if ( not os.access(opts.trusted, os.R_OK) ) :
 		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-	else:
-	    parser.error("--trusted is required")
 
 	if opts.debug > 0: opts.tracefile=sys.stderr
