Index: fedd/fedd_internal_bindings.wsdl
===================================================================
--- fedd/fedd_internal_bindings.wsdl	(revision abb87eb839715255ee71e4387e61c07d5d7dd470)
+++ fedd/fedd_internal_bindings.wsdl	(revision 4700b3b0b1232a00e97f0335d74b51400160f7db)
@@ -37,4 +37,25 @@
 	</fault>
       </operation>
+      <operation name="Ns2Split">
+	<documentation>
+	  The bindings of this operation are straightforward SOAP RPC 1.1.
+	</documentation>
+	<soap:operation soapAction="Ns2Split"/> 
+	<input>
+	  <soap:body use="encoded" parts="tns:Ns2SplitRequestBody"
+	    namespace="http://www.isi.edu/faber/fedd_internal.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</input>
+	<output>
+	  <soap:body use="encoded" parts="tns:Ns2SplitResponseBody"
+	    namespace="http://www.isi.edu/faber/fedd_internal.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</output>
+	<fault>
+	  <soap:fault use="encoded"  name="tns:Ns2SplitFault"
+	    namespace="http://www.isi.edu/faber/fedd_internal.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</fault>
+      </operation>
     </binding>
 
Index: fedd/fedd_internal_messages.wsdl
===================================================================
--- fedd/fedd_internal_messages.wsdl	(revision abb87eb839715255ee71e4387e61c07d5d7dd470)
+++ fedd/fedd_internal_messages.wsdl	(revision 4700b3b0b1232a00e97f0335d74b51400160f7db)
@@ -4,4 +4,5 @@
   xmlns:tns="http://www.isi.edu/faber/fedd_internal_messages"
   xmlns:xsd1="http://www.isi.edu/faber/fedd_types"
+  xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns="http://schemas.xmlsoap.org/wsdl/">
@@ -20,10 +21,22 @@
   </message>
 
+  <message name="Ns2SplitRequestMessage">
+    <part name="Ns2SplitRequestBody" type="xsd1:ns2SplitRequestType"/>
+  </message>
+
+  <message name="Ns2SplitResponseMessage">
+    <part name="Ns2SplitResponseBody" type="xsd1:ns2SplitResponseType"/>
+  </message>
+
   <portType name="feddInternalPortType">
     <operation name="AllocateProject">
       <input message="tns:AllocateProjectRequestMessage"/>
       <output message="tns:AllocateProjectResponseMessage"/>
-      <fault name="AllocateProjectFault" 
-	message="tns:FaultMessage"/>
+      <fault name="AllocateProjectFault" message="tns:FaultMessage"/>
+    </operation>
+    <operation name="Ns2Split">
+      <input message="tns:Ns2SplitRequestMessage"/>
+      <output message="tns:Ns2SplitResponseMessage"/>
+      <fault name="Ns2SplitFault" message="tns:FaultMessage"/>
     </operation>
   </portType>
Index: fedd/fedd_split.py
===================================================================
--- fedd/fedd_split.py	(revision 4700b3b0b1232a00e97f0335d74b51400160f7db)
+++ fedd/fedd_split.py	(revision 4700b3b0b1232a00e97f0335d74b51400160f7db)
@@ -0,0 +1,132 @@
+#!/usr/local/bin/python
+
+import os,sys
+
+from ZSI import *
+from M2Crypto import SSL
+from M2Crypto.SSL.SSLServer import SSLServer
+import M2Crypto.httpslib
+
+import xml.parsers.expat
+
+import re
+import random
+import string
+import subprocess
+import tempfile
+import copy
+import pickle
+
+import traceback
+
+from threading import *
+
+from subprocess import *
+
+from fedd_services import *
+from fedd_internal_services import *
+from fedd_util import *
+import parse_detail
+from service_error import *
+
+import logging
+
+class nullHandler(logging.Handler):
+    def emit(self, record): pass
+
+fl = logging.getLogger("fedd.experiment_control")
+fl.addHandler(nullHandler())
+
+class fedd_split_local:
+    def __init__(self, config=None):
+	"""
+	Intialize the various attributes, most from the config object
+	"""
+	self.debug = config.create_debug
+	self.log = logging.getLogger("fedd.splitter")
+	self.tclsh = "/usr/local/bin/otclsh"
+	self.tcl_splitter = "/usr/testbed/lib/ns2ir/parse.tcl"
+	self.trace_file = sys.stderr
+
+	# Dispatch tables
+	self.soap_services = {\
+		'Ns2Split': make_soap_handler(\
+			Ns2SplitRequestMessage.typecode,
+			getattr(self, "run_splitter"), 
+			Ns2SplitResponseMessage,
+			"Ns2SplitResponseBody"),
+	}
+
+	self.xmlrpc_services = {\
+		'Ns2Split': make_xmlrpc_handler(\
+			getattr(self, "run_splitter"), 
+			"Ns2SplitResponseBody"),
+	}
+
+    def run_splitter(self, req, fid):
+	"""
+	The external interface to experiment creation called from the
+	dispatcher.
+
+	Creates a working directory, splits the incoming description using the
+	splitter script and parses out the avrious subsections using the
+	lcasses above.  Once each sub-experiment is created, use pooled threads
+	to instantiate them and start it all up.
+	"""
+	try:
+	    tmpdir = tempfile.mkdtemp(prefix="split-")
+	except IOError:
+	    raise service_error(service_error.internal, "Cannot create tmp dir")
+
+	tclfile = tmpdir + "/experiment.tcl"
+	pid = "dummy"
+	gid = "dummy"
+
+	req = req.get('Ns2SplitRequestBody', None)
+	if not req:
+	    raise service_error(service_error.req,
+		    "Bad request format (no Ns2SplitRequestBody)")
+	# The tcl parser needs to read a file so put the content into that file
+	descr=req.get('experimentdescription', None)
+	if descr:
+	    file_content=descr.get('ns2description', None)
+	    if file_content:
+		try:
+		    f = open(tclfile, 'w')
+		    f.write(file_content)
+		    f.close()
+		except IOError:
+		    raise service_error(service_error.internal,
+			    "Cannot write temp experiment description")
+	    else:
+		raise service_error(service_error.req, 
+			"Only ns2descriptions supported")
+	else:
+	    raise service_error(service_error.req, "No experiment description")
+
+	master = req.get('master', None)
+	if master == None:
+	    raise service_error(service_error.req, "No master testbed label")
+	
+	
+	tclcmd = [self.tclsh, self.tcl_splitter, '-s', '-x', 
+	    str(self.muxmax), '-m', master, pid, gid, eid, tclfile]
+	tclparser = Popen(tclcmd, stdout=PIPE)
+
+	# Package up the split data
+	for line in tclparser.stdout:
+	    out += line
+
+	# Walk up tmpdir, deleting as we go
+	for path, dirs, files in os.walk(tmpdir, topdown=False):
+	    for f in files:
+		os.remove(os.path.join(path, f))
+	    for d in dirs:
+		os.rmdir(os.path.join(path, d))
+	os.rmdir(tmpdir)
+
+	resp = { 'output' : out }
+
+	return resp
+
+
Index: fedd/fedd_types.xsd
===================================================================
--- fedd/fedd_types.xsd	(revision abb87eb839715255ee71e4387e61c07d5d7dd470)
+++ fedd/fedd_types.xsd	(revision 4700b3b0b1232a00e97f0335d74b51400160f7db)
@@ -289,5 +289,4 @@
     </xsd:choice>
   </xsd:complexType>
-
 
   <xsd:complexType name="requestType">
@@ -469,4 +468,27 @@
     <xsd:sequence>
       <xsd:element name="experiment" type="tns:IDType"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="ns2SplitRequestType">
+    <xsd:annotation>
+      <xsd:documentation>
+	Request to run splitter remotely
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="description" type="tns:experimentDescriptionType"/>
+      <xsd:element name="master" type="xsd:string"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="ns2SplitResponseType">
+    <xsd:annotation>
+      <xsd:documentation>
+	Remote splitter output
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="output" type="xsd:base64Binary"/>
     </xsd:sequence>
   </xsd:complexType>
