Index: branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java
===================================================================
--- branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java	(revision 5085)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java	(revision 5229)
@@ -1,3 +1,5 @@
 package at.hl.okb.wsclient;
+
+import static at.hl.okb.wsclient.Utilities.createNameFilter;
 
 import java.util.ArrayList;
@@ -5,5 +7,9 @@
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+import com.google.common.collect.Iterables;
 
 import at.hl.wsclient.okb.Algorithm;
@@ -15,77 +21,89 @@
 import at.hl.wsclient.okb.IOKBService;
 import at.hl.wsclient.okb.OKBService;
+import at.hl.wsclient.okb.ObjectFactory;
 import at.hl.wsclient.okb.Platform;
 import at.hl.wsclient.okb.Problem;
 
 public class OKBServiceClient {
-	OKBService srv = null;
-	IOKBService port = null;
+    OKBService srv = null;
+    IOKBService port = null;
 
-	public OKBServiceClient() {
-		this.srv = new OKBService();
-		this.port = srv.getWSHttpBindingIOKBService1();
-	}  
+    public OKBServiceClient() {
+	this.srv = new OKBService();
+	this.port = srv.getWSHttpBindingIOKBService();
+    }
+
+    public Long getPlatformId(String platformName) {
+	Platform returnValue = Iterables.find(
+		port.getPlatforms().getPlatform(),
+		createNameFilter(platformName));
+	if (returnValue == null)
+	    createPlatform(platformName);
+
+	returnValue = Iterables.find(port.getPlatforms().getPlatform(),
+		createNameFilter(platformName));
+	return returnValue.getId();
+
+    }
+
+    private void createPlatform(String name) {
 	
-	public Long getPlatformId(String platformName) {
-		Long platformId = null;
-		
-		ArrayOfPlatform allPlatforms = port.getPlatforms();
-		for (Platform platform:allPlatforms.getPlatform()) {
-			if (platform.getName().getValue()==platformName) {
-				platformId = platform.getId();
-			}
-		}
-		return platformId;
+	ObjectFactory factory = new ObjectFactory();
+	Platform platform = factory.createPlatform();
+	
+	platform.setName(factory.createNamedOKBItemName(name));
+	port.addPlatform(platform);
+    }
+
+    public Long getAlgorithmId(String algorithmName) {
+	Long algorithmId = null;
+
+	ArrayOfAlgorithm allAlgorithms = port.getAlgorithms();
+	for (Algorithm algo : allAlgorithms.getAlgorithm()) {
+	    if (algo.getName().getValue() == algorithmName) {
+		algorithmId = algo.getId();
+	    }
+	}
+	return algorithmId;
+    }
+
+    public Long getProblemId(String problemName) {
+	Long problemId = null;
+
+	ArrayOfProblem allProblems = port.getProblems();
+	for (Problem problem : allProblems.getProblem()) {
+	    if (problem.getName().getValue() == problemName) {
+		problemId = problem.getId();
+	    }
+	}
+	return problemId;
+    }
+
+    public void checkAlgoParamsExists(Long algorithmId,
+	    Map<String, Object> ecjAlgoParams) {
+
+	List<String> missingParams = new ArrayList<String>();
+
+	ArrayOfAlgorithmParameter hlAlgoParams = port
+		.getAlgorithmParameters(algorithmId);
+	Map<String, Object> hlAlgoParamMap = new HashMap<String, Object>();
+
+	for (AlgorithmParameter algoParam : hlAlgoParams
+		.getAlgorithmParameter()) {
+	    hlAlgoParamMap.put(algoParam.getName().getValue(), null); // value
+								      // hangs
+								      // on
+								      // Experiments
 	}
 
-	public Long getAlgorithmId(String algorithmName) {
-		Long algorithmId = null;
-		
-		ArrayOfAlgorithm allAlgorithms = port.getAlgorithms();
-		for (Algorithm algo:allAlgorithms.getAlgorithm()) {
-			if (algo.getName().getValue()==algorithmName) {
-				algorithmId = algo.getId();
-			}
-		}
-		return algorithmId;
-	}
-	
-	public Long getProblemId(String problemName) {
-		Long problemId = null;
-		
-		ArrayOfProblem allProblems = port.getProblems();
-		for (Problem problem:allProblems.getProblem()) {
-			if (problem.getName().getValue()==problemName) {
-				problemId = problem.getId();
-			}
-		}
-		return problemId;
+	String[] ecjparamNames = (String[]) ecjAlgoParams.keySet().toArray();
+
+	for (int i = 0; i < ecjparamNames.length; i++) {
+	    if (!hlAlgoParamMap.containsKey(ecjparamNames[i])) {
+		missingParams.add(new String(ecjparamNames[i]));
+	    }
 	}
 
-	public void checkAlgoParamsExists(Long algorithmId,
-			Map<String, Object> ecjAlgoParams) {
-		
-		List<String> missingParams = new ArrayList<String>();
-		
-		ArrayOfAlgorithmParameter hlAlgoParams = port.getAlgorithmParameters(algorithmId);
-		Map<String, Object> hlAlgoParamMap = new HashMap<String, Object>();
-		
-		for (AlgorithmParameter algoParam:hlAlgoParams.getAlgorithmParameter()) {
-			hlAlgoParamMap.put(algoParam.getName().getValue(), null); //value hangs on Experiments
-		}
-		
-		
-		String[] ecjparamNames = (String[]) ecjAlgoParams.keySet().toArray();
-		
-		for (int i=0;i<ecjparamNames.length;i++) {
-			if (!hlAlgoParamMap.containsKey(ecjparamNames[i])) {
-				missingParams.add(new String(ecjparamNames[i]));
-			}
-		}
-		
-		
-	}
-
-
+    }
 
 }
Index: branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/Utilities.java
===================================================================
--- branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/Utilities.java	(revision 5229)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/Utilities.java	(revision 5229)
@@ -0,0 +1,35 @@
+package at.hl.okb.wsclient;
+
+import at.hl.wsclient.okb.NamedOKBItem;
+
+import com.google.common.base.Predicate;
+
+class Utilities {
+	
+	private static class NameFilter implements Predicate<NamedOKBItem>
+	{
+		private final String name;
+		
+		public NameFilter(String name)
+		{
+			this.name = name;
+		}
+		
+		@Override
+		public boolean apply(NamedOKBItem arg0) {
+			return arg0.getName().getValue().equals(name);		
+		}
+	}
+	
+	public static Predicate<NamedOKBItem> createNameFilter(String name)
+	{
+		return new NameFilter(name);
+	}
+	
+	private Utilities()
+	{
+		
+	}
+	
+	
+}
Index: branches/OKBJavaConnector/HLOKBWebClient/src/test/at/hl/wsclient/okb/AllTests.java
===================================================================
--- branches/OKBJavaConnector/HLOKBWebClient/src/test/at/hl/wsclient/okb/AllTests.java	(revision 5085)
+++ 	(revision )
@@ -1,16 +1,0 @@
-package at.hl.wsclient.okb;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
-	public static Test suite() {
-		TestSuite suite = new TestSuite(AllTests.class.getName());
-		//$JUnit-BEGIN$
-
-		//$JUnit-END$
-		return suite;
-	}
-
-}
Index: branches/OKBJavaConnector/HLOKBWebClient/src/test/at/hl/wsclient/okb/OKBClientTest.java
===================================================================
--- branches/OKBJavaConnector/HLOKBWebClient/src/test/at/hl/wsclient/okb/OKBClientTest.java	(revision 5085)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/test/at/hl/wsclient/okb/OKBClientTest.java	(revision 5229)
@@ -12,4 +12,5 @@
 import org.junit.Test;
 
+import at.hl.okb.wsclient.OKBServiceClient;
 import at.hl.okb.wsclient.Exception.OKBWebServiceFailedException;
 
@@ -20,95 +21,10 @@
 public class OKBClientTest {
 	
-	OKBService srv = null;
-	IOKBService port = null;  
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	@BeforeClass
-	public static void setUpBeforeClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	@AfterClass
-	public static void tearDownAfterClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	@Before
-	public void setUp() throws Exception {
-		this.srv = new OKBService();
-		this.port = srv.getWSHttpBindingIOKBService1();
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	@After
-	public void tearDown() throws Exception {
-	}
-	
+    
+    	OKBServiceClient client = new OKBServiceClient();
 	@Test
-	public void AddAlgorithmTest() throws Exception	 {
-		
-        ObjectFactory fac = new ObjectFactory();
-        AddAlgorithm addA = fac.createAddAlgorithm();
-        addA.setDto(fac.createAddAlgorithmDto(fac.createAlgorithm()));
-        Long retval = 0L;
-
-        Algorithm a = fac.createAlgorithm();
-        a.setAlgorithmClassId(1L);
-        a.setDescription(fac.createNamedOKBItemDescription("a new Algo"));
-        a.setId(2L);
-        a.setName(fac.createNamedOKBItemName("Algorithm Name 6"));
-        a.setPlatformId(1L);
-        try {
-        retval = port.addAlgorithm(a);
-        } catch (Exception e) {
-        	throw new OKBWebServiceFailedException(e.getMessage());
-        }
-        assertTrue("Algortihm wasn't added", retval>0);
-	}
-	
-	@Test
-	public void GetAlgorithms() {
-		
-		ArrayOfAlgorithm algos = port.getAlgorithms();
-		
-		for (Algorithm algo:algos.getAlgorithm()) {
-			System.out.println("algo ClassId:="+algo.getAlgorithmClassId());
-			System.out.println("algo Id:="+algo.getId());
-			System.out.println("algo PlattformId:="+algo.getPlatformId());
-			System.out.println("algo Class:="+algo.getClass());
-			System.out.println("algo Description:="+algo.getDescription().getValue());
-			System.out.println("algo Name:="+algo.getName().getValue());
-		}
-		assertTrue("No Algorithms found!", algos.getAlgorithm().size()>0);
-	}
-	
-	@Test
-	public void GetDataTypes() {
-		
-		ArrayOfDataType dataTypes = port.getDataTypes();
-		
-		for (DataType dataType:dataTypes.getDataType()) {
-			System.out.println("algo Id:="+dataType.getId());
-			System.out.println("algo platformId:="+dataType.getPlatformId());
-			System.out.println("algo Name:="+dataType.getName());
-			System.out.println("algo Class:="+dataType.getClass());
-			System.out.println("algo SQLName:="+dataType.getSqlName().getValue());
-		}
-		assertTrue("No dataTypes found!", dataTypes.getDataType().size()>0);
-	}	
-	
-	
-	
-	@Test
-	public void GetIds(){
-		
+    	public void testGetPlatform()
+	{
+	    client.getPlatformId("ECJ");
 	}
 
Index: branches/OKBJavaConnector/HLOKBWebClient/src/test/java/at/hl/okb/wsclient/OKBClientTest.java
===================================================================
--- branches/OKBJavaConnector/HLOKBWebClient/src/test/java/at/hl/okb/wsclient/OKBClientTest.java	(revision 5229)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/test/java/at/hl/okb/wsclient/OKBClientTest.java	(revision 5229)
@@ -0,0 +1,20 @@
+package at.hl.okb.wsclient;
+
+
+import org.junit.Test;
+
+/**
+ * @author HolperM
+ *
+ */
+public class OKBClientTest {
+	
+    
+    	OKBServiceClient client = new OKBServiceClient();
+	@Test
+    	public void testGetPlatform()
+	{
+	    client.getPlatformId("ECJ");
+	}
+
+}
