Index: fedd/fedd_proj.py
===================================================================
--- fedd/fedd_proj.py	(revision 6ff0b91afedbb5c0b726a21c0c6cb3f24c66cebc)
+++ fedd/fedd_proj.py	(revision 8922e1bf2738bf949cdbb10d0f5c3a6bc19c1035)
@@ -118,10 +118,9 @@
     def get_users(self, obj):
 	"""
-	Return a list of the IDs of the users in obj (accessed using get_id)
-	"""
-	if obj.get_element_user() != None:
-	    return [ self.get_id(u.get_element_userID()) \
-		    for u in obj.get_element_user() \
-			if u.get_element_userID() != None]
+	Return a list of the IDs of the users in dict
+	"""
+	if obj.has_key('user'):
+	    return [ unpack_id(u['userID']) \
+		    for u in obj['user'] if u.has_key('userID') ]
 	else:
 	    return None
@@ -246,11 +245,17 @@
 	# Reconstruct the full request message
 	msg = RequestAccessRequestMessage()
-	msg.set_element_RequestAccessRequestBody(req)
-
+	msg.set_element_RequestAccessRequestBody(
+		pack_soap(msg, "RequestAccessRequestBody", req))
 	try:
 	    resp = port.RequestAccess(msg)
 	except ZSI.FaultException, e:
 	    raise e.fault
-	return resp
+
+	r = unpack_soap(resp)
+
+	if r.has_key('RequestAccessResponseBody'):
+	    return r['RequestAccessResponseBody']
+	else:
+	    raise Fault(Fault.Server, "Bad proxy response")
 
     def permute_wildcards(self, a, p):
@@ -308,8 +313,8 @@
 	if principal_type == "testbed": tb = fid
 
-	p = req.get_element_project()
-	if p != None:
-	    if p.get_element_name() != None: 
-		project = self.get_id(p.get_element_name())
+	if req.has_key('project'):
+	    p = req['project']
+	    if p.has_key('name'):
+		project = unpack_id(p['name'])
 	    user = self.get_users(p)
 	else:
@@ -368,5 +373,5 @@
 	return found, (dyn_user, dyn_proj)
 
-    def build_response(self, resp, alloc_id, ap, ssh):
+    def build_response(self, alloc_id, ap, ssh):
 	"""
 	Create the SOAP response.
@@ -400,22 +405,34 @@
 		[ { 'attribute': x, 'value' : y } \
 			for x,y in self.attrs.iteritems()]
+	return msg
+
+
+    def soap_RequestAccess(self, ps, fid):
+	req = ps.Parse(RequestAccessRequestMessage.typecode)
+
+
+	#if req == None: raise Fault(Fault.Client, "No request??")
+	#req = req.get_element_RequestAccessRequestBody()
+	# if req == None: raise Fault(Fault.Client, "No request body??")
+
+	msg = self.RequestAccess(unpack_soap(req), fedid)
+	resp = RequestAccessResponseMessage()
 
 	resp.set_element_RequestAccessResponseBody(
 		pack_soap(resp, "RequestAccessResponseBody", msg))
-
-    def soap_RequestAccess(self, ps, fid):
-	req = ps.Parse(RequestAccessRequestMessage.typecode)
-	resp = RequestAccessResponseMessage()
-
-
-	if req == None: raise Fault(Fault.Client, "No request??")
-	req = req.get_element_RequestAccessRequestBody()
-	if req == None: raise Fault(Fault.Client, "No request body??")
-
-
-	dt = req.get_element_destinationTestbed()
-
-	if dt != None: dt = dt.get_element_uri()
+	return resp
+
+    def RequestAccess(self, req, fid):
+
+	if req.has_key('RequestAccessRequestBody'):
+	    req = req['RequestAccessRequestBody']
+	else:
+	    raise Fault(Fault.Client, "No request!?")
+
+	if req.has_key('destinationTestbed'):
+	    dt = unpack_id(req['destinationTestbed'])
 	
+	print dt
+
 	if dt == None or dt == self.testbed:
 	    # Request for this fedd
@@ -423,11 +440,9 @@
 
 	    # Check for access to restricted nodes
-	    if req.get_element_resources() != None and \
-		    req.get_element_resources().get_element_node() != None:
-
-		resources = req.get_element_resources()
-		inaccessible = [ t for n in resources.get_element_node()\
-				if n.get_element_hardware() != None \
-				    for t in n.get_element_hardware()
+	    if req.has_key('resources') and req['resources'].has_key('node'):
+		resources = req['resources']
+		inaccessible = [ t for n in resources['node'] \
+				if n.has_key('hardware') != None \
+				    for t in n['hardware'] \
 					if t in self.restricted and \
 						t not in found[0].node_types]
@@ -437,7 +452,6 @@
 			    str(', ').join(inaccessible))
 
-	    ssh = [ x.get_element_sshPubkey() \
-		    for x in req.get_element_access() \
-			if x.get_element_sshPubkey() != None]
+	    ssh = [ x['sshPubkey'] \
+		    for x in req['access'] if x.has_key('sshPubkey')]
 
 	    if len(ssh) > 0: 
@@ -447,10 +461,9 @@
 		raise Fault(Fault.Client, "SSH access parameters required")
 
-	    self.build_response(resp, req.get_element_allocID(), found, ssh)
+	    resp = self.build_response(req['allocID'], found, ssh)
 	    return resp
 	else:
 	    # Proxy the request
 	    return self.proxy_request(dt, req)
-
 
     def read_trust(self, trust):
