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 5234)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java	(revision 5242)
@@ -3,26 +3,15 @@
 import static at.hl.okb.wsclient.Utilities.createNameFilter;
 
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
+import java.util.Iterator;
 
 import at.hl.wsclient.okb.Algorithm;
-import at.hl.wsclient.okb.AlgorithmParameter;
-import at.hl.wsclient.okb.ArrayOfAlgorithm;
-import at.hl.wsclient.okb.ArrayOfAlgorithmParameter;
-import at.hl.wsclient.okb.ArrayOfProblem;
+import at.hl.wsclient.okb.AlgorithmClass;
 import at.hl.wsclient.okb.IOKBService;
+import at.hl.wsclient.okb.NamedOKBItem;
 import at.hl.wsclient.okb.OKBService;
 import at.hl.wsclient.okb.ObjectFactory;
 import at.hl.wsclient.okb.Platform;
 import at.hl.wsclient.okb.Problem;
+import at.hl.wsclient.okb.ProblemClass;
 
 import com.google.common.collect.Iterables;
@@ -31,35 +20,5 @@
     OKBService srv = null;
     IOKBService port = null;
-
-    // hack for allowing self signed certificates
-    static {
-	// Create a trust manager that does not validate certificate chains
-	TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
-	    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
-		return new java.security.cert.X509Certificate[] {};
-	    }
-
-	    public void checkClientTrusted(
-		    java.security.cert.X509Certificate[] certs, String authType) {
-	    }
-
-	    public void checkServerTrusted(
-		    java.security.cert.X509Certificate[] certs, String authType) {
-	    }
-	} };
-
-	SSLContext sc;
-	try {
-	    sc = SSLContext.getInstance("SSL");
-	    sc.init(null, trustAllCerts, new java.security.SecureRandom());
-	    HttpsURLConnection
-		    .setDefaultSSLSocketFactory(sc.getSocketFactory());
-	} catch (NoSuchAlgorithmException e) {
-	    throw new RuntimeException(e);
-	} catch (KeyManagementException e) {
-	    throw new RuntimeException(e);
-	}
-
-    }
+    ObjectFactory factory = new ObjectFactory();
 
     public OKBServiceClient() {
@@ -71,73 +30,75 @@
 	Platform returnValue = Iterables.find(
 		port.getPlatforms().getPlatform(),
-		createNameFilter(platformName));
-	if (returnValue == null)
-	    createPlatform(platformName);
+		createNameFilter(platformName), null);
 
-	returnValue = Iterables.find(port.getPlatforms().getPlatform(),
-		createNameFilter(platformName));
+	return returnValue.getId();
+    }
+
+    public Long getProblemClassId(String problemClass) {
+	ProblemClass returnValue = Iterables.find(port.getProblemClasses()
+		.getProblemClass(), createNameFilter(problemClass), null);
+
 	return returnValue.getId();
 
     }
 
-    private void createPlatform(String name) {
+    public Long getAlgorithmClassId(String algorithmClassName) {
+	AlgorithmClass returnValue = Iterables.find(port.getAlgorithmClasses()
+		.getAlgorithmClass(), createNameFilter(algorithmClassName),
+		null);
 
-	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
-	}
-
-	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]));
-	    }
-	}
+	return returnValue.getId();
 
     }
 
+    public Long getProblem(String problemName, Long problemClassId,
+	    Long platformId) {
+	Problem problem = null;
+	Iterator<Problem> it = port.getProblems().getProblem().iterator();
+	
+	while (it.hasNext() && problem == null) {
+	    Problem tmpProblem = it.next();
+	    if (platformId.equals(tmpProblem.getPlatformId())
+		    && problemName.equals(tmpProblem.getName().getValue())
+		    && problemClassId.equals(tmpProblem.getProblemClassId())) {
+		
+		
+		
+		problem = tmpProblem;
+	    }
+	}
+	return problem.getId();
+    }
+
+    
+    public Long getAlgorithm(String algorithmName, Long algorithmClassId,
+	    Long platformId) {
+	Algorithm algorithm = null;
+	Iterator<Algorithm> it = port.getAlgorithms().getAlgorithm().iterator();
+	
+	while (it.hasNext() && algorithm == null) {
+	    Algorithm tmpAlgo = it.next();
+	    if (platformId.equals(tmpAlgo.getPlatformId())
+		    && algorithmName.equals(tmpAlgo.getName().getValue())
+		    && algorithmClassId.equals(tmpAlgo.getAlgorithmClassId())) {
+		algorithm = tmpAlgo;
+	    }
+	}
+	return algorithm.getId();
+    }
+
+    
+    private <T extends NamedOKBItem> T createNamedOKBItem(Class<T> clazz,
+	    String name) {
+	try {
+	    T instance = clazz.newInstance();
+	    instance.setName(factory.createNamedOKBItemName(name));
+	    return instance;
+	} catch (IllegalAccessException ex) {
+	    throw new IllegalArgumentException(ex);
+	} catch (InstantiationException ex) {
+	    throw new IllegalArgumentException(ex);
+	}
+    }
+
 }
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 5234)
+++ branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/Utilities.java	(revision 5242)
@@ -2,4 +2,5 @@
 
 import at.hl.wsclient.okb.NamedOKBItem;
+import at.hl.wsclient.okb.Problem;
 
 import com.google.common.base.Predicate;
@@ -22,4 +23,24 @@
 	}
 	
+	
+	private static class ProblemFilter implements Predicate<Problem>
+	{
+	    private final String problemName;
+	    private final String problemClass; 
+	    
+	    public ProblemFilter(String problemName, String problemClass)
+	    {
+		this.problemClass = problemClass;
+		this.problemName = problemName;
+	    }
+
+	    @Override
+	    public boolean apply(Problem input) {
+		// TODO Auto-generated method stub
+		return false;
+	    }
+	}
+	
+	
 	public static Predicate<NamedOKBItem> createNameFilter(String name)
 	{
