Index: /work/xfire/branches/xfire-1.2.4/xfire-core/src/test/org/codehaus/xfire/client/LocalClientTest.java
===================================================================
--- /work/xfire/branches/xfire-1.2.4/xfire-core/src/test/org/codehaus/xfire/client/LocalClientTest.java	(revision 2088)
+++ /work/xfire/branches/xfire-1.2.4/xfire-core/src/test/org/codehaus/xfire/client/LocalClientTest.java	(working copy)
@@ -1,5 +1,6 @@
 package org.codehaus.xfire.client;
 
+import org.codehaus.xfire.DefaultXFire;
 import org.codehaus.xfire.fault.XFireFault;
 import org.codehaus.xfire.service.BadEcho;
 import org.codehaus.xfire.service.Echo;
@@ -74,4 +75,77 @@
         {
         }
     }
+    
+    public void testMultiThreadingClient() 
+    		throws Exception
+    {
+        ClientThread ct = new ClientThread(15);
+        Thread t = new Thread(ct);
+        t.setName("ClientThread-1");
+
+        ClientThread ct2 = new ClientThread(15);
+        Thread t2 = new Thread(ct2);
+        t2.setName("ClientThread-2");
+        
+        ClientThread ct3 = new ClientThread(15);
+        Thread t3 = new Thread(ct3);
+        t3.setName("ClientThread-3");
+        
+        t.start();
+        t2.start();
+        t3.start();
+        
+        while (t.isAlive() || t2.isAlive() || t3.isAlive()) {
+        	Thread.sleep(100);
+        }
+        
+        assertTrue(ct.isSuccess());
+        assertTrue(ct2.isSuccess());
+        assertTrue(ct3.isSuccess());
+        
+        System.out.println("Done!");
+        
+        
+    }
+    
+    protected class ClientThread implements Runnable {
+    	protected int repeat;
+    	boolean success=true;
+    	
+    	public ClientThread(int repeat){
+    		this.repeat=repeat;
+
+    		
+    	}
+		public void run() {
+	        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, EchoImpl.class);
+
+	        Element root = new Element("root", "a", "urn:a");
+	        root.addContent("hello");
+
+	        Client client = new Client(transport, service, "xfire.local://Echo", "xfire.local://Client");
+	        client.setXFire(getXFire());
+	        
+	        OperationInfo op = service.getServiceInfo().getOperation("echo");
+	        for (int i=0;i<repeat;i++) {
+		        Object[] response =null;
+		        try {
+		         response = client.invoke(op, new Object[] {root});
+		        
+		        } catch (Exception e) {
+		        	
+		        } finally {
+		        	if (response == null) {
+		        		success = false;
+		        		break;
+		        	}
+		        }
+	        	
+	        }
+		}
+		public boolean isSuccess() {
+			return success;
+		}
+    	
+    }
 }

