Index: axis/Create.java
===================================================================
--- axis/Create.java	(revision 56baf92411943b863e8c3c3b105b2cc0d9cedc8c)
+++ axis/Create.java	(revision 10f5e84700de2d25154bb97749e2bc1b11ae223f)
@@ -3,6 +3,42 @@
 import java.net.URL;
 import net.deterlab.isi.XTrustProvider;
+import java.io.*;
+import java.util.*;
+
+import org.apache.axis.AxisFault;
+
+import javax.net.*;
+import javax.net.ssl.*;
+import java.security.GeneralSecurityException;
+
+import net.deterlab.abac.*;
 
 class Create extends FeddCommand {
+
+    static public byte[] readNsFile(File f) throws IOException {
+	final int bsize = 4096;
+	byte[] buf = new byte[bsize];
+	byte[] rv = new byte[0];
+	int r = 0;
+	FileInputStream fs = new FileInputStream(f);
+
+	while ((r = fs.read(buf)) != -1 ) {
+	    byte[] newRv = new byte[rv.length + r];
+	    System.arraycopy(rv, 0, newRv, 0, rv.length);
+	    System.arraycopy(buf, 0, newRv, rv.length, r);
+	    rv = newRv;
+	}
+	fs.close();
+	return rv;
+    }
+
+    static public Credential delegate(Identity id, String dest) 
+	    throws IOException,GeneralSecurityException {
+	Credential c = new Credential(new Role(id.getKeyID()+".acting_for"),
+		new Role(dest));
+	c.make_cert(id);
+	return c;
+    }
+
     /**
      * Dummy program to test an AXIS fedd implementation generated from the
@@ -21,5 +57,13 @@
 	 */
 	FeddPortType port = getPort("https://users.isi.deterlab.net:23235");
-	setUpSecurity();
+	Identity AbacID = null;
+	byte[] nsContents = null;
+	try {
+	    nsContents = readNsFile(new File(args[1]));
+	}
+	catch (IOException e) {
+	    System.err.println("Cannot read " + args[1] + ": " + e);
+	    System.exit(20);
+	}
 
 	/*
@@ -27,35 +71,64 @@
 	 */
 
-	NewResponseType resp = null;
-
-	/* This magic turns off certificate chain checking. */
-	XTrustProvider.install();
-
-	/* This tells the SSL system where to find client certificate
-	 * information. */
-	String keyStore = "./keystore";
-	String keyStorePassword = "importkey";
-
-	System.setProperty("javax.net.ssl.keyStore", keyStore);
-	System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
-	IDType id = new IDType();
-
-	NewRequestType req = new NewRequestType(null, 
+	NewRequestType newReq = new NewRequestType(null, 
 		new IDType(null, null, null, args[0], null), 
 		null);
+	NewResponseType newResp = null;
 
 
 	try {
-	    /* Build the message and make the call */
-	    resp = port._new(req);
+	    // Build the message and make the call
+	    newResp = port._new(newReq);
 	}
-	catch (FaultType f) {
+	catch (Exception f) {
 	    System.err.println("Error in New: " + f);
 	    System.exit(20);
 	}
 	ExperimentLabels newLabels = 
-	    new ExperimentLabels(resp.getExperimentID());
+	    new ExperimentLabels(newResp.getExperimentID());
 	System.out.println("New success: " + newLabels.getLocalname() + "(" +
 	    newLabels.getFedid() + ")");
+
+	CreateRequestType createReq = new CreateRequestType(null, 
+		new ExperimentDescriptionType(nsContents, null),
+		null,
+		//new IDType(null, null, null, newLabels.getLocalname(), null),
+		new IDType(null, null, null, args[0], null),
+		null);
+	CreateResponseType createResp = null;
+	port = getPort("https://users.isi.deterlab.net:23235");
+
+	Credential c = null;
+	byte[][] ca = new byte[1][];
+	try {
+	    AbacID = new Identity(new File("./emulab.pem"));
+	    c = delegate(AbacID, newLabels.getFedid());
+	    ca[0] = c.cert().getEncoded();
+	    createReq.setCredential(ca);
+	    System.err.println(AbacID);
+	    System.err.println(c);
+	}
+	catch (GeneralSecurityException e) { System.err.println(e); }
+	catch (IOException e) { System.err.println("IOException?!!" +e); }
+
+	try {
+	    /* Build the message and make the call */
+	    createResp = port.create(createReq);
+	}
+	catch (AxisFault f) {
+	    System.err.println(f.getClass().getName());
+	    System.err.println("AxisFault Error in Create: " + f);
+	    System.exit(20);
+	}
+	catch (Exception f) {
+	    System.err.println(f.getClass().getName());
+	    System.err.println("Error in Create: " + f);
+	    System.exit(20);
+	}
+	ExperimentLabels createLabels = 
+	    new ExperimentLabels(createResp.getExperimentID());
+	System.out.println("New success: " + createLabels.getLocalname()
+		+ "(" + createLabels.getFedid() + ") "
+		+ createResp.getExperimentStatus().getValue());
     }
 }
Index: axis/FeddCommand.java
===================================================================
--- axis/FeddCommand.java	(revision 56baf92411943b863e8c3c3b105b2cc0d9cedc8c)
+++ axis/FeddCommand.java	(revision 10f5e84700de2d25154bb97749e2bc1b11ae223f)
@@ -1,9 +1,15 @@
 import edu.isi.www.fedd_types.*;
 import edu.isi.www.fedd_wsdl.*;
-import java.net.URL;
+import java.net.*;
+import java.util.*;
+
 import net.deterlab.isi.XTrustProvider;
 import net.deterlab.isi.Fedid;
 
-class FeddCommand {
+import javax.net.ssl.*;
+
+public class FeddCommand {
+
+    static { setUpSecurity(); }
 
     static class ExperimentLabels {
@@ -43,4 +49,19 @@
 	System.setProperty("javax.net.ssl.keyStore", keyStore);
 	System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
+
+    }
+
+    static public void clearSSLSessionCache() {
+	try { 
+	    SSLContext sctxt = SSLContext.getDefault();
+	    SSLSessionContext ssctxt = sctxt.getClientSessionContext();
+	    Enumeration<byte[]> e = ssctxt.getIds();
+	    while (e.hasMoreElements()) {
+		SSLSession s = ssctxt.getSession(e.nextElement());
+		s.invalidate();
+		System.err.println("invalidated " + s);
+	    }
+	}
+	catch (Exception e) { System.err.println(e); }
     }
 
@@ -50,4 +71,5 @@
 	 * Boilerplate web services access stuff.
 	 */
+	clearSSLSessionCache();
 	FeddServiceLocator service = new FeddServiceLocator();
 	FeddPortType port = service.getfeddPort(new URL(server));
Index: axis/MultiStatus.java
===================================================================
--- axis/MultiStatus.java	(revision 56baf92411943b863e8c3c3b105b2cc0d9cedc8c)
+++ axis/MultiStatus.java	(revision 10f5e84700de2d25154bb97749e2bc1b11ae223f)
@@ -20,5 +20,4 @@
 	
 	FeddPortType port = getPort("https://users.isi.deterlab.net:23235");
-	setUpSecurity();
 	/*
 	 * The various parts of the MultiInfo message and response
@@ -32,5 +31,5 @@
 	    resp = port.multiInfo(req);
 	}
-	catch (FaultType e) {
+	catch (Exception e) {
 	    System.out.println(e);
 	    System.exit(0);
