diff --git a/.gitignore b/.gitignore
index e9d5d9a..e931f1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -164,6 +164,7 @@
 /lib/erl/.eunit
 /lib/erl/ebin
 /lib/erl/deps/
+/lib/haxe/test/bin
 /lib/hs/dist
 /lib/java/build
 /lib/js/test/build
diff --git a/compiler/cpp/src/generate/t_haxe_generator.cc b/compiler/cpp/src/generate/t_haxe_generator.cc
index 24457e5..3c2207f 100644
--- a/compiler/cpp/src/generate/t_haxe_generator.cc
+++ b/compiler/cpp/src/generate/t_haxe_generator.cc
@@ -719,6 +719,7 @@
                                                        bool is_exception,
                                                        bool in_class,
                                                        bool is_result) {
+  (void) in_class;
   generate_haxe_doc(out, tstruct);
 
   string clsname = get_cap_name( tstruct->get_name());
@@ -759,7 +760,7 @@
   out << endl;
 
   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
-    indent(out) << "inline static var " << upcase_string((*m_iter)->get_name()) << " : Int = " << (*m_iter)->get_key() << ";" << endl;
+    indent(out) << "inline static var " << upcase_string((*m_iter)->get_name()) << "_FIELD_ID : Int = " << (*m_iter)->get_key() << ";" << endl;
   }
   
   out << endl;
@@ -869,7 +870,7 @@
       // Generate deserialization code for known cases
       for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
         indent(out) <<
-          "case " << upcase_string((*f_iter)->get_name()) << ":" << endl;
+          "case " << upcase_string((*f_iter)->get_name()) << "_FIELD_ID:" << endl;
         indent_up();
         indent(out) <<
           "if (field.type == " << type_to_enum((*f_iter)->get_type()) << ") {" << endl;
@@ -1079,7 +1080,7 @@
 void t_haxe_generator::generate_reflection_getters(ostringstream& out, t_type* type, string field_name, string cap_name) {
   (void) type;
   (void) cap_name;
-  indent(out) << "case " << upcase_string(field_name) << ":" << endl;
+  indent(out) << "case " << upcase_string(field_name) << "_FIELD_ID:" << endl;
   indent_up();
   indent(out) << "return this." << field_name << ";" << endl;
   indent_down();
@@ -1088,7 +1089,7 @@
 void t_haxe_generator::generate_reflection_setters(ostringstream& out, t_type* type, string field_name, string cap_name) {
   (void) type;
   (void) cap_name;
-  indent(out) << "case " << upcase_string(field_name) << ":" << endl;
+  indent(out) << "case " << upcase_string(field_name) << "_FIELD_ID:" << endl;
   indent_up();
   indent(out) << "if (value == null) {" << endl;
   indent(out) << "  unset" << get_cap_name(field_name) << "();" << endl;
@@ -1170,7 +1171,7 @@
 
     for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
       t_field* field = *f_iter;
-      indent(out) << "case " << upcase_string(field->get_name()) << ":" << endl;
+      indent(out) << "case " << upcase_string(field->get_name()) << "_FIELD_ID:" << endl;
       indent_up();
       indent(out) << "return " << generate_isset_check(field) << ";" << endl;
       indent_down();
@@ -1347,7 +1348,7 @@
     for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
       t_field* field = *f_iter;
       std::string field_name = field->get_name();
-      indent(out) << "metaDataMap[" << upcase_string(field_name) << "] = new FieldMetaData(\"" << field_name << "\", ";
+      indent(out) << "metaDataMap[" << upcase_string(field_name) << "_FIELD_ID] = new FieldMetaData(\"" << field_name << "\", ";
 
       // Set field requirement type (required, optional, etc.)
       if (field->get_req() == t_field::T_REQUIRED) {
@@ -2937,7 +2938,7 @@
 std::string t_haxe_generator::get_enum_class_name(t_type* type) {
   string package = "";
   t_program* program = type->get_program();
-  if (program != NULL && program != program_) {
+  if (program != NULL /*&& program != program_*/) {
     package = program->get_namespace("haxe") + ".";
   }
   return package + type->get_name();
diff --git a/configure.ac b/configure.ac
index 9f104fa..04107be 100755
--- a/configure.ac
+++ b/configure.ac
@@ -652,6 +652,7 @@
   lib/erl/Makefile
   lib/go/Makefile
   lib/go/test/Makefile
+  lib/haxe/test/Makefile
   lib/hs/Makefile
   lib/java/Makefile
   lib/js/test/Makefile
diff --git a/lib/haxe/README.md b/lib/haxe/README.md
index 3335b43..82525d4 100644
--- a/lib/haxe/README.md
+++ b/lib/haxe/README.md
@@ -32,17 +32,17 @@
 Current status
 ========================
 - tested with Haxe C++ target
-- transports: socket 
-- protocols: binary, JSON
+- transports: Socket, HTTP (client only), Stream
+- protocols: Binary, JSON
 - tutorial client and server available
 - cross-test client and server available 
 
 
 Further developments
 ========================
-- add HTTP transport, update tutorial and tests accordingly
 - improve to work with C#, Java and JavaScript Haxe/OpenFL targets
 - improve to work with more (ideally all) Haxe/OpenFL targets
+- add HTTP server, update tutorial and tests accordingly
 
 
 Dependencies
@@ -53,9 +53,9 @@
 after installing Haxe itself. For example, if you plan to target C#, Java and C++,
 enter the following commands after installing Haxe:
 
-  haxelib install hxcpp
-  haxelib install hxjava
-  haxelib install hxcs
+    haxelib install hxcpp
+    haxelib install hxjava
+    haxelib install hxcs
 
 For other targets, please consult the Haxe documentation whether or not any additional
 target libraries need to be installed and how to achieve this.
diff --git a/lib/haxe/src/org/apache/thrift/protocol/TJSONProtocol.hx b/lib/haxe/src/org/apache/thrift/protocol/TJSONProtocol.hx
index edd5e12..1a93332 100644
--- a/lib/haxe/src/org/apache/thrift/protocol/TJSONProtocol.hx
+++ b/lib/haxe/src/org/apache/thrift/protocol/TJSONProtocol.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
@@ -58,6 +58,9 @@
 	// Reader that manages a 1-byte buffer
 	private var reader : LookaheadReader;
 
+	// whether the underlying system holds Strings as UTF-8
+	// http://old.haxe.org/manual/encoding
+	private static var utf8Strings = haxe.Utf8.validate("Ç-ß-Æ-Ю-Ш");
 
 	// TJSONProtocol Constructor
 	public function new( trans : TTransport)
@@ -74,7 +77,7 @@
 	public function writeMessageBegin(message:TMessage) : Void {
 		WriteJSONArrayStart();
 		WriteJSONInteger( JSONConstants.VERSION);
-		WriteJSONString( Utf8Encode(message.name));
+		WriteJSONString( BytesFromString(message.name));
 		WriteJSONInteger( message.type);
 		WriteJSONInteger( message.seqid);
 	}
@@ -94,7 +97,7 @@
 	public function writeFieldBegin(field:TField) : Void {
 		WriteJSONInteger( field.id );
 		WriteJSONObjectStart();
-		WriteJSONString( Utf8Encode( JSONConstants.GetTypeNameForTypeID( field.type)));
+		WriteJSONString( BytesFromString( JSONConstants.GetTypeNameForTypeID( field.type)));
 	}
 
 	public function writeFieldEnd() : Void {
@@ -105,8 +108,8 @@
 
 	public function writeMapBegin(map:TMap) : Void {
 		WriteJSONArrayStart();
-		WriteJSONString( Utf8Encode( JSONConstants.GetTypeNameForTypeID( map.keyType)));
-		WriteJSONString( Utf8Encode( JSONConstants.GetTypeNameForTypeID( map.valueType)));
+		WriteJSONString( BytesFromString( JSONConstants.GetTypeNameForTypeID( map.keyType)));
+		WriteJSONString( BytesFromString( JSONConstants.GetTypeNameForTypeID( map.valueType)));
 		WriteJSONInteger( map.size);
 		WriteJSONObjectStart();
 	}
@@ -118,7 +121,7 @@
 
 	public function writeListBegin(list:TList) : Void {
 		WriteJSONArrayStart();
-		WriteJSONString( Utf8Encode( JSONConstants.GetTypeNameForTypeID( list.elemType )));
+		WriteJSONString( BytesFromString( JSONConstants.GetTypeNameForTypeID( list.elemType )));
 		WriteJSONInteger( list.size);
 	}
 
@@ -128,7 +131,7 @@
 
 	public function writeSetBegin(set:TSet) : Void {
 		WriteJSONArrayStart();
-		WriteJSONString( Utf8Encode( JSONConstants.GetTypeNameForTypeID( set.elemType)));
+		WriteJSONString( BytesFromString( JSONConstants.GetTypeNameForTypeID( set.elemType)));
 		WriteJSONInteger( set.size);
 	}
 
@@ -164,7 +167,7 @@
 	}
 
 	public function writeString(str : String) : Void {
-		WriteJSONString( Utf8Encode(str));
+		WriteJSONString( BytesFromString(str));
 	}
 
 	public function writeBinary(bin:Bytes) : Void {
@@ -180,8 +183,7 @@
 										 "Message contained bad version.");
 		}
 
-        var buf = ReadJSONString(false);
-		message.name = Utf8Decode(buf);
+		message.name = ReadJSONString(false);
 		message.type = ReadJSONInteger();
 		message.seqid = ReadJSONInteger();
 		return message;
@@ -211,7 +213,7 @@
 		{
 			field.id = ReadJSONInteger();
 			ReadJSONObjectStart();
-			field.type = JSONConstants.GetTypeIDForTypeName( Utf8Decode( ReadJSONString(false)));
+			field.type = JSONConstants.GetTypeIDForTypeName( ReadJSONString(false));
 		}
 		return field;
 	}
@@ -222,8 +224,8 @@
 
 	public function readMapBegin() : TMap {
 		ReadJSONArrayStart();
-		var KeyType = JSONConstants.GetTypeIDForTypeName( Utf8Decode( ReadJSONString(false)));
-		var ValueType = JSONConstants.GetTypeIDForTypeName( Utf8Decode( ReadJSONString(false)));
+		var KeyType = JSONConstants.GetTypeIDForTypeName( ReadJSONString(false));
+		var ValueType = JSONConstants.GetTypeIDForTypeName( ReadJSONString(false));
 		var Count : Int = ReadJSONInteger();
 		ReadJSONObjectStart();
 
@@ -238,7 +240,7 @@
 
 	public function readListBegin():TList {
 		ReadJSONArrayStart();
-		var ElementType = JSONConstants.GetTypeIDForTypeName( Utf8Decode( ReadJSONString(false)));
+		var ElementType = JSONConstants.GetTypeIDForTypeName( ReadJSONString(false));
 		var Count : Int = ReadJSONInteger();
 
 		var list = new TList( ElementType, Count);
@@ -251,7 +253,7 @@
 
 	public function readSetBegin() : TSet {
 		ReadJSONArrayStart();
-		var ElementType = JSONConstants.GetTypeIDForTypeName( Utf8Decode( ReadJSONString(false)));
+		var ElementType = JSONConstants.GetTypeIDForTypeName( ReadJSONString(false));
 		var Count : Int = ReadJSONInteger();
 
 		var set = new TSet( ElementType, Count);
@@ -263,7 +265,7 @@
 	}
 
 	public function readBool() : Bool {
-		return (ReadJSONInteger() == 0 ? false : true);
+		return (ReadJSONInteger() != 0);
 	}
 
 	public function readByte() : Int {
@@ -287,8 +289,7 @@
 	}
 
 	public function readString() : String {
-        var buf = ReadJSONString(false);
-		return Utf8Decode(buf);
+        return ReadJSONString(false);
 	}
 
 	public function readBinary() : Bytes {
@@ -402,7 +403,6 @@
 			str += JSONConstants.QUOTE;
 		}
 
-trace('WriteJSONInt64($str)');
 		var tmp = BytesFromString( str);
 		trans.write( tmp, 0, tmp.length);
 	}
@@ -502,7 +502,7 @@
 
 	// Read in a JSON string, unescaping as appropriate.
     // Skip Reading from the context if skipContext is true.
-	private function ReadJSONString(skipContext : Bool) : Bytes
+	private function ReadJSONString(skipContext : Bool) : String
 	{
 		if (!skipContext)
 		{
@@ -560,7 +560,7 @@
 			buffer.addString( String.fromCharCode(charcode));
 		}
 
-		return buffer.getBytes();
+		return StringFromBytes( buffer.getBytes());
 	}
 
 	// Return true if the given byte could be a valid part of a JSON number.
@@ -642,8 +642,6 @@
 			ReadJSONSyntaxChar( JSONConstants.QUOTE);
 		}
 
-trace('ReadJSONInt64() = $str');
-		
 	    // process sign
 		var bMinus = false;
 		var startAt = 0;
@@ -689,7 +687,7 @@
 		
 		var str : String = "";
 		if (StringFromBytes(reader.Peek()) == JSONConstants.QUOTE) {
-			str = StringFromBytes( ReadJSONString(true));
+			str = ReadJSONString(true);
 			
 			// special cases
 			if( str == JSONConstants.FLOAT_IS_NAN) {
@@ -729,7 +727,7 @@
 	// Read in a JSON string containing base-64 encoded data and decode it.
 	private function ReadJSONBase64() : Bytes
 	{
-		var str = StringFromBytes( ReadJSONString(false));
+		var str = ReadJSONString(false);
 		return Base64.decode( str);
 	}
 
@@ -758,21 +756,22 @@
 
 	public static function BytesFromString( str : String) : Bytes {
 		var buf = new BytesBuffer();
-		buf.addString( str);
+		if( utf8Strings)
+			buf.addString( str);  // no need to encode on UTF8 targets, the string is just fine
+		else
+			buf.addString( Utf8.encode( str));
 		return buf.getBytes();
 	}
 
 	public static function StringFromBytes( buf : Bytes) : String {
 		var inp = new BytesInput( buf);
-		return inp.readString( buf.length);
-	}
-
-	public static function Utf8Encode(str : String) : Bytes {
-		return BytesFromString( Utf8.encode( str));
-	}
-
-	public static function Utf8Decode( buf : Bytes) : String {
-		return Utf8.decode( StringFromBytes( buf));
+		if( buf.length == 0)
+			return "";  // readString() would return null in that case, which is wrong
+		var str = inp.readString( buf.length);
+		if( utf8Strings)
+			return str;  // no need to decode on UTF8 targets, the string is just fine
+		else
+			return Utf8.decode( str);
 	}
 
 	// Convert a byte containing a hex char ('0'-'9' or 'a'-'f') into its corresponding hex value
diff --git a/lib/haxe/src/org/apache/thrift/server/TServer.hx b/lib/haxe/src/org/apache/thrift/server/TServer.hx
index 9b235f69..37105bd 100644
--- a/lib/haxe/src/org/apache/thrift/server/TServer.hx
+++ b/lib/haxe/src/org/apache/thrift/server/TServer.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
diff --git a/lib/haxe/src/org/apache/thrift/server/TServerEventHandler.hx b/lib/haxe/src/org/apache/thrift/server/TServerEventHandler.hx
index 08f48b2..83bff95 100644
--- a/lib/haxe/src/org/apache/thrift/server/TServerEventHandler.hx
+++ b/lib/haxe/src/org/apache/thrift/server/TServerEventHandler.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
diff --git a/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx b/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
index 20a7195..c516b78 100644
--- a/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
+++ b/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
diff --git a/lib/haxe/src/org/apache/thrift/transport/TFileStream.hx b/lib/haxe/src/org/apache/thrift/transport/TFileStream.hx
new file mode 100644
index 0000000..03e031f
--- /dev/null
+++ b/lib/haxe/src/org/apache/thrift/transport/TFileStream.hx
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.thrift.transport;
+
+import haxe.io.Bytes;
+import haxe.io.BytesBuffer;
+import haxe.io.Input;
+import haxe.io.Output;
+
+
+enum TFileMode {
+	CreateNew;
+	Append;
+	Read;
+}
+	
+
+class TFileStream implements TStream {
+
+	public var FileName(default,null) : String;
+	
+	private var Input  : sys.io.FileInput;
+	private var Output : sys.io.FileOutput;
+	
+	
+	public function new( fname : String, mode : TFileMode) {
+		FileName = fname;	
+		switch ( mode)
+		{
+			case TFileMode.CreateNew:
+				Output = sys.io.File.write( fname, true);
+
+			case TFileMode.Append:
+				Output = sys.io.File.append( fname, true);
+
+			case TFileMode.Read:
+				Input = sys.io.File.read( fname, true);
+
+			default:
+				throw new TTransportException( TTransportException.UNKNOWN,
+											   "Unsupported mode");
+		}
+
+	}
+	
+	public function Close() : Void {
+		if( Input != null) {
+			Input.close();
+			Input = null;
+		}
+		if( Output != null) { 
+			Output.close();
+			Output = null;
+		}
+	}
+	
+	public function Peek() : Bool {
+		if( Input == null)
+			throw new TTransportException( TTransportException.NOT_OPEN, "File not open for input");
+
+		return (! Input.eof());
+	}
+	
+	public function Read( buf : Bytes, offset : Int, count : Int) : Int {
+		if( Input == null)
+			throw new TTransportException( TTransportException.NOT_OPEN, "File not open for input");
+
+		return Input.readBytes( buf, offset, count);
+	}
+	
+	public function Write( buf : Bytes, offset : Int, count : Int) : Void {
+		if( Output == null)
+			throw new TTransportException( TTransportException.NOT_OPEN, "File not open for output");
+		
+		Output.writeBytes( buf, offset, count);			
+	}
+
+	public function Flush() : Void {
+		if( Output != null) 
+			Output.flush();
+	}
+	
+}
diff --git a/lib/haxe/src/org/apache/thrift/transport/TFramedTransport.hx b/lib/haxe/src/org/apache/thrift/transport/TFramedTransport.hx
index 5d77140..77335e7 100644
--- a/lib/haxe/src/org/apache/thrift/transport/TFramedTransport.hx
+++ b/lib/haxe/src/org/apache/thrift/transport/TFramedTransport.hx
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
  *
- *   http : //www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
diff --git a/lib/haxe/src/org/apache/thrift/transport/TFramedTransportFactory.hx b/lib/haxe/src/org/apache/thrift/transport/TFramedTransportFactory.hx
index 00127bf..3cca1f8 100644
--- a/lib/haxe/src/org/apache/thrift/transport/TFramedTransportFactory.hx
+++ b/lib/haxe/src/org/apache/thrift/transport/TFramedTransportFactory.hx
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
  *
- *   http : //www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
diff --git a/lib/haxe/src/org/apache/thrift/transport/THttpClient.hx b/lib/haxe/src/org/apache/thrift/transport/THttpClient.hx
index d2fda79..52a9d26 100644
--- a/lib/haxe/src/org/apache/thrift/transport/THttpClient.hx
+++ b/lib/haxe/src/org/apache/thrift/transport/THttpClient.hx
@@ -25,30 +25,7 @@
 import haxe.io.BytesOutput;
 import haxe.io.BytesInput;
 
-#if openfl
-// OpenFL all targets
-import openfl.errors.EOFError;
-import openfl.events.Event;
-import openfl.events.IOErrorEvent;
-import openfl.events.SecurityErrorEvent;
-import openfl.net.URLLoader;
-import openfl.net.URLLoaderDataFormat;
-import openfl.net.URLRequest;
-import openfl.net.URLRequestMethod;
-#elseif flash  
-// Haxe flash, no OpenFL
-import flash.errors.EOFError;
-import flash.events.Event;
-import flash.events.IOErrorEvent;
-import flash.events.SecurityErrorEvent;
-import flash.net.URLLoader;
-import flash.net.URLLoaderDataFormat;
-import flash.net.URLRequest;
-import flash.net.URLRequestMethod;
-#else
-// bare Haxe 
 import haxe.Http;
-#end
 
 
 	
@@ -62,29 +39,15 @@
     private var requestBuffer_  : BytesOutput = new BytesOutput();
     private var responseBuffer_ : BytesInput = null;
 
-	#if (flash || openfl)
-	private var request_        : URLRequest = null;
-    #else
 	private var request_        : Http = null;
-    #end
 
     
-	#if (flash || openfl)
-
-	public function new( request : URLRequest) : Void {
-		request.contentType = "application/x-thrift";
-		request_ = request;
-    }
-	
-	#else
-
 	public function new( requestUrl : String) : Void {
 	  	request_ = new Http(requestUrl);
 		request_.addHeader( "contentType", "application/x-thrift");
     }
     
-	#end
-    
+   
     public override function open() : Void {
     }
 
@@ -100,24 +63,10 @@
         	throw new TTransportException(TTransportException.UNKNOWN, "Response buffer is empty, no request.");
 		}
 		
-		#if flash
-        try {
-			var data = Bytes.alloc(len);
-            responseBuffer_.readBytes(data, off, len);
-            buf.addBytes(data,0,len);
-			return len;
-        } catch (e : EOFError) {
-            throw new TTransportException(TTransportException.UNKNOWN, "No more data available.");
-        }
-			
-		#else
-			
         var data =Bytes.alloc(len);
 		len = responseBuffer_.readBytes(data, off, len);
 		buf.addBytes(data,0,len);
 		return len;
-		
-		#end
     }
 
     public override function write(buf:Bytes, off : Int, len : Int) : Void {
@@ -125,59 +74,30 @@
     }
 
 	
-	#if (flash || openfl)
-		
-    public override function flush(callback:Error->Void = null) : Void {
-		var loader : URLLoader = new URLLoader();
-		
-		if (callback != null) {
-			loader.addEventListener(Event.COMPLETE, function(event:Event) : Void {
-				responseBuffer_ = new URLLoader(event.target).data;
-				callback(null);
-			});
-			loader.addEventListener(IOErrorEvent.IO_ERROR, function(event:IOErrorEvent) : Void {
-				callback(new TTransportException(TTransportException.UNKNOWN, "IOError: " + event.text));
-				responseBuffer_ = null;
-			});
-			loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(event:SecurityErrorEvent) : Void {
-				callback(new TTransportException(TTransportException.UNKNOWN, "SecurityError: " + event.text));
-				responseBuffer_ = null;
-			});
-		}
-			
-		request_.method = URLRequestMethod.POST;
-		loader.dataFormat = URLLoaderDataFormat.BINARY;
-		//requestBuffer_.position = 0;
-		request_.data = requestBuffer_;
-		loader.load(request_);
-    }
-
-	#else 
-		
     public override function flush(callback:Dynamic->Void = null) : Void {
-		
 		var buffer = requestBuffer_;
 		requestBuffer_ = new BytesOutput();
 		responseBuffer_ = null;
 			
 		request_.onData = function(data : String) { 
-			responseBuffer_ = new BytesInput(buffer.getBytes());
-			callback(null);
-		};
-		request_.onError = function(msg : String) {
-			callback(new TTransportException(TTransportException.UNKNOWN, "IOError: " + msg));
+			var tmp = new BytesBuffer();
+			tmp.addString(data);
+			responseBuffer_ = new BytesInput(tmp.getBytes());
+			if( callback != null) {
+				callback(null);
+			}
 		};
 		
-		#if js
+		request_.onError = function(msg : String) {
+			if( callback != null) {
+				callback(new TTransportException(TTransportException.UNKNOWN, "IOError: " + msg));
+			}
+		};
+		
 		request_.setPostData(buffer.getBytes().toString());
 		request_.request(true/*POST*/);
-		#else
-		request_.customRequest( true/*POST*/, buffer);
-		#end
     }
 		
-	#end
-
 }
 
 	
\ No newline at end of file
diff --git a/lib/haxe/src/org/apache/thrift/transport/TServerSocket.hx b/lib/haxe/src/org/apache/thrift/transport/TServerSocket.hx
index 1953244..0eae931 100644
--- a/lib/haxe/src/org/apache/thrift/transport/TServerSocket.hx
+++ b/lib/haxe/src/org/apache/thrift/transport/TServerSocket.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
diff --git a/lib/haxe/src/org/apache/thrift/transport/TServerTransport.hx b/lib/haxe/src/org/apache/thrift/transport/TServerTransport.hx
index e0ce697..5819803 100644
--- a/lib/haxe/src/org/apache/thrift/transport/TServerTransport.hx
+++ b/lib/haxe/src/org/apache/thrift/transport/TServerTransport.hx
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
diff --git a/lib/haxe/src/org/apache/thrift/transport/TStream.hx b/lib/haxe/src/org/apache/thrift/transport/TStream.hx
new file mode 100644
index 0000000..0e1b52d
--- /dev/null
+++ b/lib/haxe/src/org/apache/thrift/transport/TStream.hx
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.thrift.transport;
+
+import haxe.io.Bytes;
+import haxe.io.BytesBuffer;
+
+
+interface TStream {
+	function Close() : Void;
+	function Peek() : Bool;
+	function Read( buf : Bytes, offset : Int, count : Int) : Int;
+	function Write( buf : Bytes, offset : Int, count : Int) : Void;
+	function Flush() : Void;
+}
diff --git a/lib/haxe/src/org/apache/thrift/transport/TStreamTransport.hx b/lib/haxe/src/org/apache/thrift/transport/TStreamTransport.hx
new file mode 100644
index 0000000..99203b4
--- /dev/null
+++ b/lib/haxe/src/org/apache/thrift/transport/TStreamTransport.hx
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.thrift.transport;
+
+import org.apache.thrift.transport.*;
+import org.apache.thrift.helper.*;
+
+import haxe.io.Bytes;
+import haxe.io.BytesBuffer;
+import haxe.io.BytesOutput;
+import haxe.io.BytesInput;
+
+
+class TStreamTransport extends TTransport {
+	
+	public var InputStream(default,null) : TStream;
+	public var OutputStream(default,null) : TStream;
+
+
+	public function new( input : TStream, output : TStream) {
+		this.InputStream = input;
+		this.OutputStream = output;
+	}
+	
+	public override function isOpen() : Bool {
+		return true;
+	}
+	
+    public override function peek() : Bool {
+		return (InputStream != null);
+	}
+
+    public override function open() : Void {
+	}
+
+	public override function close() : Void {
+		if (InputStream != null)
+		{
+			InputStream.Close();
+			InputStream = null;
+		}
+		if (OutputStream != null)
+		{
+			OutputStream.Close();
+			OutputStream = null;
+		}
+	}
+
+	public override function read( buf : BytesBuffer, off : Int, len : Int) : Int {
+		if (InputStream == null)
+		{
+			throw new TTransportException( TTransportException.NOT_OPEN, 
+								  		   "Cannot read from null InputStream");
+		}
+
+		var data : Bytes =  Bytes.alloc(len);
+		var size = InputStream.Read( data, off, len);
+		buf.addBytes( data, 0, size);
+		return size;
+	}
+
+    public override function write(buf:Bytes, off : Int, len : Int) : Void {
+		if (OutputStream == null)
+		{
+			throw new TTransportException( TTransportException.NOT_OPEN, 
+										   "Cannot write to null OutputStream");
+		}
+
+		OutputStream.Write(buf, off, len);
+	}
+
+    public override function flush(callback:Dynamic->Void =null) : Void {
+		if (OutputStream == null)
+		{
+			var err = new TTransportException( TTransportException.NOT_OPEN,
+											   "Cannot flush null OutputStream");
+	    	if(callback != null)
+				callback(err);
+			else
+				throw err;
+		}
+
+		OutputStream.Flush();
+	}
+
+}
diff --git a/lib/haxe/test/Makefile.am b/lib/haxe/test/Makefile.am
new file mode 100644
index 0000000..5e92f98
--- /dev/null
+++ b/lib/haxe/test/Makefile.am
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+THRIFT = $(top_srcdir)/compiler/cpp/thrift
+THRIFTCMD = $(THRIFT) --gen haxe -r
+THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
+
+BIN_CPP = bin/Main-debug
+
+gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
+	$(THRIFTCMD) $(THRIFTTEST)
+
+all-local: $(BIN_CPP)
+
+$(BIN_CPP):    gen-haxe/thrift/test/ThriftTest.hx
+	$(HAXE) --cwd .  cpp.hxml
+
+
+#TODO: other haxe targets
+#    $(HAXE)  --cwd .  csharp
+#    $(HAXE)  --cwd .  flash
+#    $(HAXE)  --cwd .  java
+#    $(HAXE)  --cwd .  javascript
+#    $(HAXE)  --cwd .  neko
+#    $(HAXE)  --cwd .  php
+#    $(HAXE)  --cwd .  python  # needs Haxe 3.1.4
+
+
+clean-local:
+	$(RM) -r gen-haxe bin
+
+check: $(BIN_CPP)
+	$(BIN_CPP)
+
diff --git a/lib/haxe/test/cpp.hxml b/lib/haxe/test/cpp.hxml
new file mode 100644
index 0000000..73848a8
--- /dev/null
+++ b/lib/haxe/test/cpp.hxml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#CPP target
+-cpp bin
+
+#To produce 64 bit binaries the file should define the HXCPP_M64 compile variable:
+#-D HXCPP_M64
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/csharp.hxml b/lib/haxe/test/csharp.hxml
new file mode 100644
index 0000000..4c34b0d
--- /dev/null
+++ b/lib/haxe/test/csharp.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#CSHARP target
+-cs bin/Test.exe
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/flash.hxml b/lib/haxe/test/flash.hxml
new file mode 100644
index 0000000..8b17631
--- /dev/null
+++ b/lib/haxe/test/flash.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#Flash target
+-swf bin/Test.swf
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/java.hxml b/lib/haxe/test/java.hxml
new file mode 100644
index 0000000..c947159
--- /dev/null
+++ b/lib/haxe/test/java.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#Java target
+-java bin/Test.jar
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/javascript.hxml b/lib/haxe/test/javascript.hxml
new file mode 100644
index 0000000..18d9964
--- /dev/null
+++ b/lib/haxe/test/javascript.hxml
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#JavaScript target
+-js bin/Test.js
+
+#You can use -D source-map-content (requires Haxe 3.1+) to have the .hx 
+#files directly embedded into the map file, this way you only have to 
+#upload it, and it will be always in sync with the compiled .js even if 
+#you modify your .hx files.
+-D source-map-content
+
+#Generate source map and add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/make_all.bat b/lib/haxe/test/make_all.bat
new file mode 100644
index 0000000..ee18f10
--- /dev/null
+++ b/lib/haxe/test/make_all.bat
@@ -0,0 +1,68 @@
+@echo off
+rem /*
+rem  * Licensed to the Apache Software Foundation (ASF) under one
+rem  * or more contributor license agreements. See the NOTICE file
+rem  * distributed with this work for additional information
+rem  * regarding copyright ownership. The ASF licenses this file
+rem  * to you under the Apache License, Version 2.0 (the
+rem  * "License"); you may not use this file except in compliance
+rem  * with the License. You may obtain a copy of the License at
+rem  *
+rem  *   http://www.apache.org/licenses/LICENSE-2.0
+rem  *
+rem  * Unless required by applicable law or agreed to in writing,
+rem  * software distributed under the License is distributed on an
+rem  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem  * KIND, either express or implied. See the License for the
+rem  * specific language governing permissions and limitations
+rem  * under the License.
+rem  */
+
+setlocal
+if "%HOMEDRIVE%"=="" goto MISSINGVARS
+if "%HOMEPATH%"=="" goto MISSINGVARS
+if "%HAXEPATH%"=="" goto NOTINSTALLED
+
+set path=%HAXEPATH%;%HAXEPATH%\..\neko;%path%
+
+rem # invoke Thrift comnpiler
+thrift -r -gen haxe   ..\..\..\test\ThriftTest.thrift
+if errorlevel 1 goto STOP
+
+rem # invoke Haxe compiler for all targets
+for %%a in (*.hxml) do (
+	rem * filter Python, as it is not supported by Haxe 3.1.3 (but will be in 3.1.4)
+	if not "%%a"=="python.hxml" (
+		echo --------------------------
+		echo Building %%a ...
+		echo --------------------------
+		haxe  --cwd .  %%a
+	)
+)
+
+
+echo.
+echo done.
+pause
+goto eof
+
+:NOTINSTALLED
+echo FATAL: Either Haxe is not installed, or the HAXEPATH variable is not set.
+pause
+goto eof
+
+:MISSINGVARS
+echo FATAL: Unable to locate home folder.
+echo.
+echo Both HOMEDRIVE and HOMEPATH need to be set to point to your Home folder.
+echo The current values are:
+echo HOMEDRIVE=%HOMEDRIVE%
+echo HOMEPATH=%HOMEPATH%
+pause
+goto eof
+
+:STOP
+pause
+goto eof
+
+:eof
diff --git a/lib/haxe/test/make_all.sh b/lib/haxe/test/make_all.sh
new file mode 100644
index 0000000..13b5754
--- /dev/null
+++ b/lib/haxe/test/make_all.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# invoke Thrift comnpiler
+thrift -r -gen haxe  ../../../test/ThriftTest.thrift
+
+# output folder
+if [ ! -d bin ]; then
+  mkdir  bin
+fi
+
+# invoke Haxe compiler
+for target in *.hxml; do 
+  echo --------------------------
+  echo Building ${target} ...
+  echo --------------------------
+  if [ ! -d bin/${target} ]; then
+    mkdir  bin/${target}
+  fi
+  haxe  --cwd .  ${target} 
+done
+
+
+#eof
diff --git a/lib/haxe/test/neko.hxml b/lib/haxe/test/neko.hxml
new file mode 100644
index 0000000..2db70c8
--- /dev/null
+++ b/lib/haxe/test/neko.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#neko target
+-neko bin/Test.n
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/php.hxml b/lib/haxe/test/php.hxml
new file mode 100644
index 0000000..b86e64c
--- /dev/null
+++ b/lib/haxe/test/php.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#PHP target
+-php bin/Test.php
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/project.hide b/lib/haxe/test/project.hide
new file mode 100644
index 0000000..16ef98e
--- /dev/null
+++ b/lib/haxe/test/project.hide
@@ -0,0 +1,67 @@
+{
+     "type" : 0
+    ,"target" : 4
+    ,"name" : "Test"
+    ,"main" : null
+    ,"projectPackage" : ""
+    ,"company" : ""
+    ,"license" : ""
+    ,"url" : ""
+    ,"targetData" : [
+         {
+             "pathToHxml" : "flash.hxml"
+            ,"runActionType" : 1
+            ,"runActionText" : "bin/Test.swf"
+        }
+        ,{
+             "pathToHxml" : "javascript.hxml"
+            ,"runActionType" : 1
+            ,"runActionText" : "bin\\index.html"
+        }
+        ,{
+             "pathToHxml" : "neko.hxml"
+            ,"runActionType" : 2
+            ,"runActionText" : "neko bin/Test.n"
+        }
+        ,{
+             "pathToHxml" : "php.hxml"
+        }
+        ,{
+             "pathToHxml" : "cpp.hxml"
+            ,"runActionType" : 2
+            ,"runActionText" : "bin/Main-debug.exe"
+        }
+        ,{
+             "pathToHxml" : "java.hxml"
+        }
+        ,{
+             "pathToHxml" : "csharp.hxml"
+        }
+        ,{
+             "pathToHxml" : "python.hxml"
+            ,"runActionType" : 2
+            ,"runActionText" : "python bin/Test.py"
+        }
+    ]
+    ,"files" : [
+         {
+             "path" : "src\\Main.hx"
+            ,"useTabs" : true
+            ,"indentSize" : 4
+            ,"foldedRegions" : [
+
+            ]
+            ,"activeLine" : 13
+        }
+    ]
+    ,"activeFile" : "src\\Main.hx"
+    ,"openFLTarget" : null
+    ,"openFLBuildMode" : "Debug"
+    ,"runActionType" : null
+    ,"runActionText" : null
+    ,"buildActionCommand" : null
+    ,"hiddenItems" : [
+
+    ]
+    ,"showHiddenItems" : false
+}
\ No newline at end of file
diff --git a/lib/haxe/test/python.hxml b/lib/haxe/test/python.hxml
new file mode 100644
index 0000000..4d6a133
--- /dev/null
+++ b/lib/haxe/test/python.hxml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+ 
+#integrate files to classpath
+-cp src
+-cp ../src
+-cp gen-haxe
+
+#this class wil be used as entry point for your app.
+-main Main
+
+#Python target
+-python bin/Test.py
+
+#Add debug information
+-debug
+
+#dead code elimination : remove unused code
+#"-dce no" : do not remove unused code
+#"-dce std" : remove unused code in the std lib (default)
+#"-dce full" : remove all unused code
+-dce full
\ No newline at end of file
diff --git a/lib/haxe/test/src/Main.hx b/lib/haxe/test/src/Main.hx
new file mode 100644
index 0000000..fff8be5
--- /dev/null
+++ b/lib/haxe/test/src/Main.hx
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+class Main
+{
+    static public function main()
+    {
+		try
+		{
+        	StreamTest.Run();
+			
+			trace("All tests completed.");
+		}
+		catch( e: Dynamic)
+		{
+			trace('$e');
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/haxe/test/src/StreamTest.hx b/lib/haxe/test/src/StreamTest.hx
new file mode 100644
index 0000000..b28c8e9
--- /dev/null
+++ b/lib/haxe/test/src/StreamTest.hx
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import haxe.Int64;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+
+class StreamTest extends TestBase {
+	
+
+	private inline static var tmpfile : String = "bin/data.tmp";
+	
+
+	private static function Expect( expr : Bool, info : String, ?pos : haxe.PosInfos) : Void {
+		if( ! expr) {
+			throw ('Test "$info" failed at '+pos.methodName+' in '+pos.fileName+':'+pos.lineNumber);
+		}			
+	}
+	
+	private static function MakeTestData() : Xtruct {
+		var data : Xtruct = new Xtruct();
+		data.string_thing = "Streamtest";
+		data.byte_thing = -128;
+		data.i32_thing = 4711;
+		data.i64_thing = Int64.make(0x12345678,0x9ABCDEF0);
+		return data;
+	}
+	
+	public static function WriteData() : Xtruct
+	{
+		var stream : TStream = new TFileStream( tmpfile, CreateNew);
+		var trans : TTransport = new TStreamTransport( null, stream);
+		var prot = new TJSONProtocol( trans);
+
+		var data = MakeTestData();	
+		data.write(prot);
+		trans.close();
+		
+		return data;
+	}
+	
+	public static function ReadData() : Xtruct
+	{
+		var stream : TStream = new TFileStream( tmpfile, Read);
+		var trans : TTransport = new TStreamTransport( stream, null);
+		var prot = new TJSONProtocol( trans);
+
+		var data : Xtruct = new Xtruct();
+		data.read(prot);
+		trans.close();
+		
+		return data;
+	}
+	
+	public static override function Run() : Void
+	{
+		var written = WriteData();
+		var read = ReadData();
+
+		Expect( read.string_thing == written.string_thing, "string data");
+		Expect( read.byte_thing == written.byte_thing, "byte data");
+		Expect( read.i32_thing == written.i32_thing, "i32 data");
+		Expect( Int64.compare( read.i64_thing, written.i64_thing) == 0, "i64 data");
+	}
+
+}
+
+
diff --git a/lib/haxe/test/src/TestBase.hx b/lib/haxe/test/src/TestBase.hx
new file mode 100644
index 0000000..03b66dd
--- /dev/null
+++ b/lib/haxe/test/src/TestBase.hx
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+class TestBase {
+	
+	private function new() {
+		// override, if necessary
+	}
+	
+	public static function Run() : Void {
+      	throw new AbstractMethodError();
+	}	
+}
diff --git a/test/haxe/Makefile.am b/test/haxe/Makefile.am
index 08c0369..127c45d 100644
--- a/test/haxe/Makefile.am
+++ b/test/haxe/Makefile.am
@@ -23,23 +23,23 @@
 
 BIN_CPP = bin/Main-debug
 
-gen-haxe/ThriftTest/ThriftTest.hx: $(THRIFTTEST)
+gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
 	$(THRIFTCMD) $(THRIFTTEST)
-	
+
 all-local: $(BIN_CPP)
-	
-$(BIN_CPP):	gen-haxe/ThriftTest/ThriftTest.hx
+
+$(BIN_CPP):    gen-haxe/thrift/test/ThriftTest.hx
 	$(HAXE) --cwd .  cpp.hxml
 
-	
+
 #TODO: other haxe targets
-#	$(HAXE)  --cwd .  csharp
-#	$(HAXE)  --cwd .  flash
-#	$(HAXE)  --cwd .  java
-#	$(HAXE)  --cwd .  javascript
-#	$(HAXE)  --cwd .  neko
-#	$(HAXE)  --cwd .  php
-#	$(HAXE)  --cwd .  python  # needs Haxe 3.1.4
+#    $(HAXE)  --cwd .  csharp
+#    $(HAXE)  --cwd .  flash
+#    $(HAXE)  --cwd .  java
+#    $(HAXE)  --cwd .  javascript
+#    $(HAXE)  --cwd .  neko
+#    $(HAXE)  --cwd .  php
+#    $(HAXE)  --cwd .  python  # needs Haxe 3.1.4
 
 
 clean-local:
diff --git a/test/haxe/project.hide b/test/haxe/project.hide
index f09030b..a1c09ba 100644
--- a/test/haxe/project.hide
+++ b/test/haxe/project.hide
@@ -29,7 +29,7 @@
         ,{
              "pathToHxml" : "cpp.hxml"
             ,"runActionType" : 2
-            ,"runActionText" : "bin/Main-debug.exe  client --json"
+            ,"runActionText" : "bin/Main-debug.exe  client --protocol json"
         }
         ,{
              "pathToHxml" : "java.hxml"
@@ -45,34 +45,25 @@
     ]
     ,"files" : [
          {
-             "path" : "src\\Arguments.hx"
-            ,"useTabs" : true
-            ,"indentSize" : 4
-            ,"foldedRegions" : [
-
-            ]
-            ,"activeLine" : 159
-        }
-        ,{
-             "path" : "..\\..\\lib\\haxe\\src\\org\\apache\\thrift\\protocol\\TJSONProtocol.hx"
-            ,"useTabs" : true
-            ,"indentSize" : 4
-            ,"foldedRegions" : [
-
-            ]
-            ,"activeLine" : 665
-        }
-        ,{
              "path" : "src\\TestClient.hx"
             ,"useTabs" : true
             ,"indentSize" : 4
             ,"foldedRegions" : [
 
             ]
-            ,"activeLine" : 325
+            ,"activeLine" : 188
+        }
+        ,{
+             "path" : "src\\TestServer.hx"
+            ,"useTabs" : true
+            ,"indentSize" : 4
+            ,"foldedRegions" : [
+
+            ]
+            ,"activeLine" : 88
         }
     ]
-    ,"activeFile" : "..\\..\\lib\\haxe\\src\\org\\apache\\thrift\\protocol\\TJSONProtocol.hx"
+    ,"activeFile" : "src\\TestClient.hx"
     ,"openFLTarget" : null
     ,"openFLBuildMode" : "Debug"
     ,"runActionType" : null
diff --git a/test/haxe/src/Arguments.hx b/test/haxe/src/Arguments.hx
index bcf3793..ae23fa1 100644
--- a/test/haxe/src/Arguments.hx
+++ b/test/haxe/src/Arguments.hx
@@ -24,34 +24,49 @@
 import org.apache.thrift.transport.*;
 import org.apache.thrift.server.*;
 import org.apache.thrift.meta_data.*;
+import haxe.io.Path;
 
 using StringTools;
 
 
-enum Prot {
+enum ProtocolType {
 	binary;
 	json;
 }
 
-enum Trns {
+enum EndpointTransport {
 	socket;
-	http;
+	http;	
+}
+
+enum ServerType {
+	simple;
+	/*
+	threadpool;	
+	threaded;
+	nonblocking;
+	*/
 }
 
 
 class Arguments
 {
+	public var printHelpOnly(default,null) : Bool = false;
+
 	public var server(default,null) : Bool = false;
-	public var framed(default,null) : Bool = false;
-	public var buffered(default,null) : Bool = false;
-	public var protocol(default,null) : Prot = binary;
-	public var transport(default,null) : Trns = socket;
-	
+	public var servertype(default,null) : ServerType = simple;
+
 	public var host(default,null) : String = "localhost";
 	public var port(default,null) : Int = 9090;
+	
+	public var protocol(default,null) : ProtocolType = binary;
+	public var transport(default,null) : EndpointTransport = socket;
+	public var framed(default,null) : Bool = false;
+	public var buffered(default,null) : Bool = false;
 
 	public var numIterations(default,null) : Int = 1;
 	public var numThreads(default,null) : Int = 1;
+	public var skipSpeedTest(default,null) : Bool = false;
 	
 	
 	public function new() {
@@ -70,112 +85,244 @@
 	#if sys
 		
 	private static function GetHelp() : String {
+		var sProg = Path.withoutDirectory( Sys.executablePath());
 		return "\n"
-			+Sys.executablePath()+"  [client|server]  [options]\n"
+			+sProg+"  [client|server]  [options]\n"
+			+"\n"
 			+"Modus: Either client or server, the default is client.\n"
 			+"\n"
-			+"Options:\n"
-			+"  -f, --framed         framed transport (supersedes buffered)\n"
-			+"  -b, --buffered       buffered transport\n"
-			+"  --json               JSON protocol\n"
-			+"  --protocol=<prot>    Choose protocol: json, binary (default binary).\n"
-			+"  --port=<port>        Port number for socket transport, default 9090\n"
+			+"Common options:\n"
+			+"  -h [ --help ]               produce help message\n"
+			+"  --port arg (=9090)          Port number to listen / connect to\n"
+			/* not supported yet
+			+"  --domain-socket arg         Unix Domain Socket (e.g. /tmp/ThriftTest.thrift)\n"
+            +"  --named-pipe arg            Windows Named Pipe (e.g. MyThriftPipe)\n"
+			*/
+			+"  --protocol arg (=binary)    protocol: binary, compact, json\n"
+			/* not supported yet
+			+"  --ssl                       Encrypted Transport using SSL\n"
+			*/
+			+"\n"
+			+"Server only options:\n"
+            +"  --transport arg (=sockets)  Transport: buffered, framed, http, anonpipe\n"
+			/* not supported yet
+			+"  --processor-events          processor-events\n"
+			+"  --server-type arg (=simple) type of server, \"simple\", \"thread-pool\", \n"
+			+"                              \"threaded\", or \"nonblocking\"\n"
+			+"  -n [ --workers ] arg (=4)   Number of thread pools workers. Only valid for \n"
+			+"                              thread-pool server type\n"
+			*/
 			+"\n"
 			+"Client only options:\n"
-			+"  --host=<host>        Host name, IP or URL, default localhost\n"
-			+"  -n=<iterations>      Number of test iterations\n"
-			+"  -t=<threads>         Number of test threads\n"
-			+"  -u=<url>             Target Host/URL (same as --host)\n"
+            +"  --host arg (=localhost)     Host to connect\n"
+            +"  --transport arg (=sockets)  Transport: buffered, framed, http, evhttp\n"
+			/* not supported yet
+            +"  --anon-pipes hRead hWrite   Windows Anonymous Pipes pair (handles)\n"
+			*/
+            +"  -n [ --testloops ] arg (=1) Number of Tests\n"
+            +"  -t [ --threads ] arg (=1)   Number of Test threads\n"
+            +"  --skip-speed-test           Skip the speed test\n"
 			+"\n"
-			+"All arguments are optional.\n";
+			+"All arguments are optional.\n"
+			;
 	}
 	
 
 	private function ParseArgs() : Void {
-		var step = 0;
-		for (arg in Sys.args()) {
+		
+		var args = Sys.args().copy();
+		if( (args == null) || (args.length <= 0)) {
+			server = false;
+			numThreads = 1;
+			return;
+		}
+		
+		var arg = args.shift();
+		if ( arg == "client") {
+			server = false;
+			numThreads = 1;
+		} 
+		else if ( arg == "server") {
+			server = true;
+			numThreads = 4;
+		} 
+		else if ( (arg == "-h") || (arg == "--help")) {
+			// -h [ --help ]               produce help message
+			Sys.println( GetHelp());
+			printHelpOnly = true;
+			return;
+		} 
+		else {
+			throw "First argument must be 'server' or 'client'";
+		}
+
 			
-			// server|client
-			switch(step) {
-			case 0:
-				++step;
-				if ( arg == "client") 
-					server = false;
-				else if ( arg == "server") 
-					server = true;
-				else
-					throw "First argument must be 'server' or 'client'";
-					
-			case 1:					
-				if ( (arg == "-f") || (arg == "--framed")) {
-					framed = true;
-				} else if (( arg == "-b") || ( arg == "--buffered")) {
-					buffered = true;
-				} else if (( arg == "--json") || (arg == "--protocol=json")){
-					protocol = json;
-				} else if (( arg == "--protocol=binary")){
-					protocol = binary;
-				} else if (arg.startsWith("--host=")) {
-					ClientOnlyOption(arg);
-					host = arg.substr(arg.indexOf("=") + 1);
-				} else if (arg.startsWith("--port=")) {
-					var tmp = Std.parseInt(arg.substr(arg.indexOf("=")+1));
-					if( tmp != null)
-						port = tmp;
-					else
-						throw "Invalid port number "+arg;
-				} else if (arg == "-n") {
-					ClientOnlyOption(arg);
-					step = 2;
-				} else if (arg == "-t") {
-					ClientOnlyOption(arg);
-					step = 3;
-				} else if (arg == "-u") {
-					ClientOnlyOption(arg);
-					step = 4;
+		while( args.length > 0) {
+			arg = args.shift();
+			
+			if ( (arg == "-h") || (arg == "--help")) {
+				// -h [ --help ]               produce help message
+			    Sys.println( GetHelp());
+				printHelpOnly = true;
+				return;
+			} 
+			else if (arg == "--port") {		
+				// --port arg (=9090)          Port number to listen
+				arg = args.shift();
+				var tmp = Std.parseInt(arg);
+				if( tmp != null) {
+					port = tmp;
 				} else {
-					throw "Unexpected argument "+arg;
-				}					
-					
-			case 2:  // num iterations
-				step = 1;
-				var tmp = Std.parseInt(arg);
-				if( tmp != null)
-					numIterations = tmp;
-				else
-					throw "Invalid numeric value "+arg;
-					
-			case 3: // num threads
-				step = 1;
-				var tmp = Std.parseInt(arg);
-				if( tmp != null)
-					numThreads = tmp;
-				else
-					throw "Invalid numeric value "+arg;
-					
-			case 4:  // url
-				step = 1;
-				host = arg;
-					
-			default:
-				throw "Unexpected state";
+					throw "Invalid port number "+arg;
+				}  
+			} 
+			else if (arg == "--domain-socket") {		
+				//   --domain-socket arg         Unix Domain Socket (e.g. /tmp/ThriftTest.thrift)
+				throw "domain sockets not supported yet";
+			} 
+			else if (arg == "--named-pipe") {		
+				//   --named-pipe arg            Windows Named Pipe (e.g. MyThriftPipe)
+				throw "named pipes not supported yet";
+			} 
+			else if (arg == "--protocol") {		
+				// --protocol arg (=binary)    protocol: binary, compact, json
+				arg = args.shift();
+				if( arg == "binary") {
+					protocol = binary;
+				} else if( arg == "compact") {
+					throw "Compact protocol not supported yet";
+				} else if( arg == "json") {
+					protocol = json;
+				} else {
+					InvalidArg(arg);
+				}
+			}  
+			else if (arg == "--ssl") {		
+				// --ssl                       Encrypted Transport using SSL
+				throw "SSL not supported yet";
+			} 
+			else {
+                //Server only options:
+				if( server) {
+					ParseServerArgument( arg, args);
+				} else {
+					ParseClientArgument( arg, args);
+				}
 			}
+		}
+	}
+	
 
-			
-			if ( framed && buffered)
-			{
-				trace("WN: framed supersedes buffered transport");
-			}
+	private function ParseServerArgument( arg : String, args : Array<String>) : Void {
+		if (arg == "--transport") {
+			//  --transport arg (=sockets)  Transport: buffered, framed, http, anonpipe
+			arg = args.shift();
+			if( arg == "buffered") {
+				buffered = true;
+			} else if( arg == "framed") {
+				framed = true;
+			} else if( arg == "http") {
+				transport = http;
+			} else if( arg == "anonpipe") {
+				throw "Anon pipes transport not supported yet";
+			} else {
+				InvalidArg(arg);
+			}  
+		}
+		else if (arg == "--processor-events") {
+			throw "Processor events not supported yet";
+		}
+		else if (arg == "--server-type") {
+			//  --server-type arg (=simple) type of server, 
+			// one of "simple", "thread-pool", "threaded", "nonblocking"
+			arg = args.shift();
+			if( arg == "simple") {
+				servertype = simple;
+			} else if( arg == "thread-pool") {
+				throw arg+" server not supported yet";
+			} else if( arg == "threaded") {
+				throw arg+" server not supported yet";
+			} else if( arg == "nonblocking") {
+				throw arg+" server not supported yet";
+			} else {
+				InvalidArg(arg);
+			}  
+		}
+		else if ((arg == "-n") || (arg == "--workers")) {
+			//  -n [ --workers ] arg (=4)   Number of thread pools workers. Only valid for 
+			//                              thread-pool server type
+			arg = args.shift();
+			var tmp = Std.parseInt(arg);
+			if( tmp != null) {
+				numThreads = tmp;
+			} else{
+				throw "Invalid number "+arg;
+			} 
+		}
+		else {
+			InvalidArg(arg);
+		}
+	}
+	
 
+	private function ParseClientArgument( arg : String, args : Array<String>) : Void {
+		if (arg == "--host") {
+            //  --host arg (=localhost)     Host to connect
+			host = args.shift();
+		}
+		else if (arg == "--transport") {
+            //  --transport arg (=sockets)  Transport: buffered, framed, http, evhttp
+			arg = args.shift();
+			if( arg == "buffered") {
+				buffered = true;
+			} else if( arg == "framed") {
+				framed = true;
+			} else if( arg == "http") {
+				transport = http;
+			} else if( arg == "evhttp") {
+				throw "evhttp transport not supported yet";
+			} else {
+				InvalidArg(arg);
+			}  
+		}
+		else if (arg == "--anon-pipes") {
+			//  --anon-pipes hRead hWrite   Windows Anonymous Pipes pair (handles)
+			throw "Anon pipes transport not supported yet";
+		}
+		else if ((arg == "-n") || (arg == "--testloops")) {
+			//  -n [ --testloops ] arg (=1) Number of Tests
+			arg = args.shift();
+			var tmp = Std.parseInt(arg);
+			if( tmp != null) {
+				numIterations = tmp;
+			} else {
+				throw "Invalid number "+arg;
+			}  
+		}
+		else if ((arg == "-t") || (arg == "--threads")) {
+			//  -t [ --threads ] arg (=1)   Number of Test threads
+			arg = args.shift();
+			var tmp = Std.parseInt(arg);
+			if( tmp != null) {
+				numThreads = tmp;
+			} else {
+				throw "Invalid number "+arg;
+			}  
+		}
+		else if (arg == "--skip-speed-test") {
+			//  --skip-speed-test  			Skip the speed test
+			skipSpeedTest = true;
+		}			
+		else {
+			InvalidArg(arg);
 		}
 	}
 
+	
 	#end
 		
 		
-	private function ClientOnlyOption( arg : String) {
-		if( server) {
-			throw "Unexpected argument in client mode: "+arg;
-		}
+	private function InvalidArg( arg : String) : Void {
+		throw 'Invalid argument $arg';
 	}
 }
diff --git a/test/haxe/src/Main.hx b/test/haxe/src/Main.hx
index a8ad147..6d80c21 100644
--- a/test/haxe/src/Main.hx
+++ b/test/haxe/src/Main.hx
@@ -34,6 +34,9 @@
 		try {
 			var args = new Arguments();
 			
+			if( args.printHelpOnly) 
+				return;
+			
 			if (args.server)
 				TestServer.Execute(args);
 			else 
diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx
index 8698220..3c98e6a 100644
--- a/test/haxe/src/TestClient.hx
+++ b/test/haxe/src/TestClient.hx
@@ -47,16 +47,36 @@
 	private var errorCnt : Int = 0;
 	private var failedTests : String = "";
 	private var print_direct : Bool = false;
+	
+	public static var EXITCODE_SUCCESS            = 0x00;  // no errors bits set
+	//
+	public static var EXITCODE_FAILBIT_BASETYPES  = 0x01;
+	public static var EXITCODE_FAILBIT_STRUCTS    = 0x02;
+	public static var EXITCODE_FAILBIT_CONTAINERS = 0x04;
+	public static var EXITCODE_FAILBIT_EXCEPTIONS = 0x08;
+	//
+	public static var EXITCODE_ALL_FAILBITS 	  = 0x0F;
+	//
+	private var testsExecuted : Int = 0;
+	private var testsFailed : Int = 0;
+	private var currentTest : Int = 0;
 
+	
 	public function new(direct : Bool) {
 		print_direct = direct;
 	}
 	
+	public function StartTestGroup( groupBit : Int) : Void {
+		currentTest = groupBit;
+		testsExecuted |= groupBit;
+	}
+	
 	public function Expect( expr : Bool, msg : String) : Void {
 		if ( expr) {
 			++successCnt;
 		} else {
 			++errorCnt;
+			testsFailed |= currentTest;
 			failedTests += "\n  " + msg;
 			if( print_direct) {
 				trace('FAIL: $msg');
@@ -64,6 +84,10 @@
 		}
 	}
 
+	public function CalculateExitCode() : Int {
+		var notExecuted : Int = EXITCODE_ALL_FAILBITS & (~testsExecuted);
+		return testsFailed | notExecuted;
+	}
 
 	public function PrintSummary() : Void {
 		var total = successCnt + errorCnt;
@@ -88,57 +112,67 @@
 
 	public static function Execute(args : Arguments) :  Void
 	{
+		var exitCode = 0xFF;
 		try
 		{
 			var difft = Timer.stamp();
-			
+	
 			if( args.numThreads > 1) {
 				var threads = new List<Thread>();
 				for( test in 0 ... args.numThreads) {
 					threads.add( StartThread( args));
 				} 
+				exitCode = 0;
 				for( thread in threads) {
-					Thread.readMessage(true);
+					exitCode |= Thread.readMessage(true);
 				}
 			} else {
 				var rslt = new TestResults(true);
 				RunClient(args,rslt);
 				rslt.PrintSummary();
+				exitCode = rslt.CalculateExitCode();
 			}
 
-    		difft = Timer.stamp() - difft;
+			difft = Timer.stamp() - difft;
 			trace('total test time: $difft seconds');
 		}
 		catch (e : TException)
 		{
 			trace('$e');
+			exitCode = 0xFF;
 		}
 		catch (e : Dynamic)
 		{
 			trace('$e');
+			exitCode = 0xFF;
 		}
+	
+		#if sys
+		Sys.exit( exitCode);
+		#end
 	}
 
 	
 	private static function StartThread(args : Arguments) : Thread {
 		var thread = Thread.create(
 			function() : Void {
+				var rslt = new TestResults(false);
 				var main : Thread = Thread.readMessage(true);
 				try 
 				{
-					var rslt = new TestResults(false);
 					RunClient(args,rslt);
-					// TODO: promote rslt values to main thread
 				}
 				catch (e : TException)
 				{
+					rslt.Expect( false, '$e');
 					trace('$e');
 				}
 				catch (e : Dynamic)
 				{
+					rslt.Expect( false, '$e');
 					trace('$e');
 				}					
-				main.sendMessage("done");
+				main.sendMessage( rslt.CalculateExitCode());
 			});
 		
 		thread.sendMessage(Thread.current());
@@ -154,8 +188,7 @@
 			case socket:
 				transport = new TSocket(args.host, args.port);
 			case http:
-				throw "http transport not supported yet";
-				//transport = new THttpClient(args.host);
+				transport = new THttpClient(args.host);
 			default:
 				throw "Unhandled transport";
 		}
@@ -164,7 +197,8 @@
 		if ( args.framed) {
 			trace("- framed transport");
 			transport = new TFramedTransport(transport);
-		} else if ( args.buffered) {
+		} 
+		if ( args.buffered) {
 			trace("- buffered transport");
 			throw "TBufferedTransport not implemented yet";
 			//transport = new TBufferedTransport(transport);
@@ -186,16 +220,18 @@
 
 
 		// run the test code
-		HaxeBasicsTest( rslt);
-		ClientTest( transport, protocol, rslt);
-					
+		HaxeBasicsTest( args, rslt);
+		for( i in 0 ... args.numIterations) {
+			ClientTest( transport, protocol, args, rslt);
+		}
 	}
 
 
-	public static function HaxeBasicsTest( rslt : TestResults) : Void
+	public static function HaxeBasicsTest( args : Arguments, rslt : TestResults) : Void
 	{
 		// We need to test a few basic things used in the ClientTest
 		// Anything else beyond this scope should go into /lib/haxe/ instead
+		rslt.StartTestGroup( 0);
 		
 		var map32 = new IntMap<Int32>();
 		var map64 = new Int64Map<Int32>();
@@ -272,7 +308,8 @@
 	}
 
 
-	public static function ClientTest( transport : TTransport, protocol : TProtocol, rslt : TestResults) : Void
+	public static function ClientTest( transport : TTransport, protocol : TProtocol, 
+									   args : Arguments, rslt : TestResults) : Void
 	{
 		var client = new ThriftTestImpl(protocol,protocol);
 		try
@@ -295,6 +332,54 @@
 
 		var start = Date.now();
 
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_EXCEPTIONS);
+	
+		// if arg == "Xception" throw Xception with errorCode = 1001 and message = arg
+		trace('testException("Xception")');
+		try {
+			client.testException("Xception");
+			rslt.Expect( false, 'testException("Xception") should throw');
+		}
+		catch (e : Xception)
+		{
+			rslt.Expect( e.message == "Xception", 'testException("Xception")  -  e.message == "Xception"');
+			rslt.Expect( e.errorCode == 1001, 'testException("Xception")  -  e.errorCode == 1001');
+		}
+		catch (e : Dynamic)
+		{
+			rslt.Expect( false, 'testException("Xception")  -  $e');
+		} 
+	
+		// if arg == "TException" throw TException
+		trace('testException("TException")');
+		try {
+			client.testException("TException");
+			rslt.Expect( false, 'testException("TException") should throw');
+		}
+		catch (e : TException)
+		{
+			rslt.Expect( true, 'testException("TException")  -  $e');
+		}
+		catch (e : Dynamic)
+		{
+			rslt.Expect( false, 'testException("TException")  -  $e');
+		} 
+	
+		// else do not throw anything
+		trace('testException("bla")');
+		try {
+			client.testException("bla");
+			rslt.Expect( true, 'testException("bla") should not throw');
+		}
+		catch (e : Dynamic)
+		{
+			rslt.Expect( false, 'testException("bla")  -  $e');
+		} 
+			
+		
+
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_BASETYPES);
+		
 		trace('testVoid()');
 		client.testVoid();
 		trace(' = void');
@@ -333,6 +418,9 @@
 		trace(' = $dub');
 		rslt.Expect(dub == 5.325098235, '$dub == 5.325098235');
 
+		
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_STRUCTS);
+		
 		trace('testStruct({"Zero", 1, -3, -5})');
 		var o = new Xtruct();
 		o.string_thing = "Zero";
@@ -341,7 +429,7 @@
 		o.i64_thing = Int64.make(0,-5);
 		var i = client.testStruct(o);
 		trace(' = {"' + i.string_thing + '", ' + i.byte_thing +', ' 
-                      + i.i32_thing +', '+ Int64.toStr(i.i64_thing) + '}');
+					  + i.i32_thing +', '+ Int64.toStr(i.i64_thing) + '}');
 		rslt.Expect( i.string_thing == o.string_thing, "i.string_thing == o.string_thing");
 		rslt.Expect( i.byte_thing == o.byte_thing, "i.byte_thing == o.byte_thing");
 		rslt.Expect( i.i32_thing == o.i32_thing, "i.i64_thing == o.i64_thing");
@@ -364,6 +452,9 @@
 		rslt.Expect( i.i32_thing == o.i32_thing, "i.i32_thing == o.i32_thing");
 		rslt.Expect( Int64.compare( i.i64_thing, o.i64_thing) == 0, "i.i64_thing == o.i64_thing");
 
+		
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_CONTAINERS);
+		
 		var mapout = new IntMap< haxe.Int32>();
 		for ( j in 0 ... 5)
 		{
@@ -497,6 +588,8 @@
 		rslt.Expect(setin.size == setout.size, "setin.length == setout.length");
 	
 
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_BASETYPES);
+
 		trace("testEnum(ONE)");
 		var ret = client.testEnum(Numberz.ONE);
 		trace(" = " + ret);
@@ -528,6 +621,9 @@
 		rslt.Expect( Int64.compare( uid, Int64.make( 0x119D0, 0x7E08671B)) == 0,
 		             Int64.toStr(uid)+" == "+Int64.toStr(Int64.make( 0x119D0, 0x7E08671B)));
 
+
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_CONTAINERS);
+
 		trace("testMapMap(1)");
 		var mm = client.testMapMap(1);
 		trace(" = {");
@@ -551,6 +647,9 @@
 			rslt.Expect( neg.get(-i) == -i, 'neg.get(-$i) == -$i');
 	 	}
 
+			
+		rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_STRUCTS);
+
 		var insane = new Insanity();
 		insane.userMap = new IntMap< Int64>();
 		insane.userMap.set( Numberz.FIVE, Int64.make(0,5000));
@@ -614,6 +713,7 @@
 		}
 		trace("}");
 
+
 		var first_map = whoa.get(Int64.make(0,1));
 		var second_map = whoa.get(Int64.make(0,2));
 		rslt.Expect( (first_map != null) && (second_map != null), "(first_map != null) && (second_map != null)");
@@ -682,15 +782,19 @@
 		rslt.Expect( Int64.compare( multiResponse.i64_thing, arg2) == 0, 'multiResponse.I64_thing == arg2');
 
 
+		rslt.StartTestGroup( 0);
+
 		trace("Test Oneway(1)");
 		client.testOneway(1);
 
-		trace("Test Calltime()");
-		var difft = Timer.stamp();
-		for ( k in 0 ... 1000) {
-			client.testVoid();
+		if( ! args.skipSpeedTest) {
+			trace("Test Calltime()");
+			var difft = Timer.stamp();
+			for ( k in 0 ... 1000) {
+				client.testVoid();
+			}
+			difft = Timer.stamp() - difft;
+			trace('$difft ms per testVoid() call');
 		}
-		difft = Timer.stamp() - difft;
-		trace('$difft ms per testVoid() call');
 	}
 }
diff --git a/test/haxe/src/TestServer.hx b/test/haxe/src/TestServer.hx
index 66b06e0..92fab01 100644
--- a/test/haxe/src/TestServer.hx
+++ b/test/haxe/src/TestServer.hx
@@ -53,7 +53,8 @@
 			if ( args.framed) {
 				trace("- framed transport");
 				transfactory = new TFramedTransportFactory();
-			} else if ( args.buffered) {
+			} 
+			if ( args.buffered) {
 				trace("- buffered transport");
 				throw "TBufferedTransport not implemented yet";
 				//transfactory = new TBufferedTransportFactory();
@@ -79,14 +80,23 @@
 			var processor = new ThriftTestProcessor(handler);
 
 			// Simple Server
-			var server = new TSimpleServer( processor, transport, transfactory, protfactory);
+			var server : TServer = null; 
+			switch( args.servertype)
+			{
+			case simple:
+				server = new TSimpleServer( processor, transport, transfactory, protfactory);
+			default:
+				throw "Unhandled server type";
+			}
 				
 
 			/*
 			// Server event handler
-			var events = new TestServerEventHandler();
-			server.setEventHandler(serverEvents);
-			handler.server = serverEngine;
+			if( args.serverEvents) {
+				var events = new TestServerEventHandler();
+				server.setEventHandler(serverEvents);
+				handler.server = serverEngine;
+			}
 			*/
 
 			// Run it
diff --git a/tutorial/haxe/Makefile.am b/tutorial/haxe/Makefile.am
index d98be0a..8212648 100644
--- a/tutorial/haxe/Makefile.am
+++ b/tutorial/haxe/Makefile.am
@@ -26,14 +26,14 @@
 
 check: gen-haxe/tutorial/calculator.hx
 
-bin/Main-debug:	gen-haxe/tutorial/calculator.hx
+bin/Main-debug:    gen-haxe/tutorial/calculator.hx
 	$(HAXE) --cwd .  cpp.hxml
-	
+
 tutorialserver: all
 	bin/Main-debug server
 
 tutorialclient: all
-	bin/Main-debug 
+	bin/Main-debug
 
 tutorialsecureserver: all
 	bin/Main-debug server secure
@@ -46,5 +46,5 @@
 
 EXTRA_DIST = \
 	src/Main.hx \
-	src/CalculatorHandler.hx 
+	src/CalculatorHandler.hx
 
diff --git a/tutorial/haxe/project.hide b/tutorial/haxe/project.hide
index 46c0a50..8d5d4ec 100644
--- a/tutorial/haxe/project.hide
+++ b/tutorial/haxe/project.hide
@@ -89,7 +89,7 @@
             ,"foldedRegions" : [
 
             ]
-            ,"activeLine" : 276
+            ,"activeLine" : 0
         }
     ]
     ,"activeFile" : "src\\Main.hx"
diff --git a/tutorial/haxe/src/Main.hx b/tutorial/haxe/src/Main.hx
index 5c9345e..41d8945 100644
--- a/tutorial/haxe/src/Main.hx
+++ b/tutorial/haxe/src/Main.hx
@@ -154,12 +154,8 @@
 		 	trace('- socket transport $targetHost:$targetPort');
 			transport = new TSocket( targetHost, targetPort);
         case http:
-		 	trace("- http transport $targetHost");
-			#if flash
-		 	transport = new THttpClient( new flash.net.URLRequest(targetHost));
-			#else
+		 	trace('- HTTP transport $targetHost');
 			transport = new THttpClient( targetHost);
-			#end
 		default:
 			throw "Unhandled transport";
 		}
