Index: source/ariba/communication/EndpointDescriptor.cpp
===================================================================
--- source/ariba/communication/EndpointDescriptor.cpp	(revision 4762)
+++ source/ariba/communication/EndpointDescriptor.cpp	(revision 4836)
@@ -63,4 +63,34 @@
 }
 
+EndpointDescriptor::EndpointDescriptor(const string str) {
+	using namespace boost::xpressive;
+	using namespace ariba::utility::string_format;
+	using namespace ariba::utility::Helper;
+	using namespace std;
+
+	locator = NULL;
+	isUnspec = true;
+
+	smatch match;
+	if (regex_search(str, match, robjects)) {
+		regex_nav nav = match;
+		for (int i=0; i<nav.size(); i++) {
+			string type = nav[i][robject_id].str();
+			if (type=="ip") {
+				string ip = nav[i][robject_data].str();
+				ip = ip.substr(1,ip.size()-2);
+				this->locator = new IPv4Locator();
+				this->locator->setIP(ip);
+				this->isUnspec = false;
+			} else
+			if (type=="tcp") {
+				string port = nav[i][robject_data][rfields][1].str();
+				port = port.substr(1,port.size()-2);
+				this->locator->setPort(stoi(port));
+			}
+		}
+	}
+}
+
 EndpointDescriptor::~EndpointDescriptor() {
 }
@@ -80,31 +110,5 @@
 
 EndpointDescriptor* EndpointDescriptor::fromString( string str ) {
-	using namespace boost::xpressive;
-	using namespace ariba::utility::string_format;
-	using namespace ariba::utility::Helper;
-	using namespace std;
-
-	EndpointDescriptor* ep = NULL;
-	smatch match;
-	if (regex_search(str, match, robjects)) {
-		regex_nav nav = match;
-		for (int i=0; i<nav.size(); i++) {
-			string type = nav[i][robject_id].str();
-			if (type=="ip") {
-				string ip = nav[i][robject_data].str();
-				ip = ip.substr(1,ip.size()-2);
-				ep = new EndpointDescriptor();
-				ep->locator = new IPv4Locator();
-				ep->locator->setIP(ip);
-				ep->isUnspec = false;
-			} else
-			if (type=="tcp") {
-				string port = nav[i][robject_data][rfields][1].str();
-				port = port.substr(1,port.size()-2);
-				ep->locator->setPort(stoi(port));
-			}
-		}
-	}
-	return ep;
+	return new EndpointDescriptor( str );
 }
 
Index: source/ariba/communication/EndpointDescriptor.h
===================================================================
--- source/ariba/communication/EndpointDescriptor.h	(revision 4762)
+++ source/ariba/communication/EndpointDescriptor.h	(revision 4836)
@@ -69,4 +69,5 @@
 	EndpointDescriptor(const EndpointDescriptor& rh);
 	EndpointDescriptor(const Locator* _locator);
+	EndpointDescriptor(const string str);
 
 	/**
