Index: /branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/impl/ECJ19ConnectorImpl.java
===================================================================
--- /branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/impl/ECJ19ConnectorImpl.java	(revision 5253)
+++ /branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/impl/ECJ19ConnectorImpl.java	(revision 5254)
@@ -6,4 +6,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import com.sun.codemodel.writer.PrologCodeWriter;
@@ -41,5 +42,5 @@
 		Long algorithmId = okbClient.getAlgorithmId(algorithmName, platformId);
 		if (algorithmId == null)
-			throw new Exception("Algorithm " + algorithmName + " for Platform" + platformName + " not found!");
+			throw new Exception("Algorithm " + algorithmName + " for Platform " + platformName + " not found!");
 
 		Long problemId = okbClient.getProblemId(problemName);
@@ -55,4 +56,10 @@
 		// TODO Auto-generated method stub
 		
+		Set<String> missingParamSet = algoParams.keySet();
+		missingParamSet.removeAll(okbClient.getAlgorithmParameterMap(state.getAlgorithmId()).keySet());
+		
+		//fehlende Param Anlegen
+		
+		okbClient.createMissingAlgoParams(state.getAlgorithmId(), missingParamSet);		
 
 		//create Experiment if algoparams not exists in HL and problemparams not exits (in HL)
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 5253)
+++ /branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java	(revision 5254)
@@ -8,7 +8,11 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.JAXBElement;
 
 import at.hl.wsclient.okb.Algorithm;
 import at.hl.wsclient.okb.AlgorithmClass;
+import at.hl.wsclient.okb.AlgorithmData;
 import at.hl.wsclient.okb.AlgorithmParameter;
 import at.hl.wsclient.okb.ArrayOfAlgorithmParameter;
@@ -102,26 +106,20 @@
 	}
 
-	// public Map<String, ECJDataTypeEnum> getAlgorithParameter(Long
-	// algorithmId) {
-	// Map<String, AlgorithmParameter> returnMap = new HashMap<String,
-	// AlgorithmParameter>();
-	//
-	// AlgorithmData algoData = port.getAlgorithmData(algorithmId);
-	//
-	// ArrayOfAlgorithmParameter algoParamList =
-	// port.getAlgorithmParameters(algorithmId);
-	//
-	// for (AlgorithmParameter algoParam:algoParamList.getAlgorithmParameter())
-	// {
-	// mapOKBDataTypetoECJDataTypeEnum()
-	// port.getDataType(algoParam.getDataTypeId()).getName().getValue()) {
-	//
-	// }
-	// returnMap.put(algoParam.getName().getValue(),
-	// port.getDataType(algoParam.getDataTypeId()).getName().getValue());
-	// }
-	//
-	// return returnMap;
-	// }
+	public Map<String, Object> getAlgorithmParameterMap(Long algorithmId) {
+		Map<String, Object> returnMap = new HashMap<String, Object>();
+
+		AlgorithmData algoData = port.getAlgorithmData(algorithmId);
+
+		ArrayOfAlgorithmParameter algoParamList = port
+				.getAlgorithmParameters(algorithmId);
+
+		for (AlgorithmParameter algoParam : algoParamList
+				.getAlgorithmParameter()) {
+			returnMap.put(algoParam.getName().getValue(), null);
+			// port.getDataType(algoParam.getDataTypeId()).getName().getValue());
+		}
+
+		return returnMap;
+	}
 
 	private <T extends NamedOKBItem> T createNamedOKBItem(Class<T> clazz,
@@ -137,37 +135,28 @@
 		}
 	}
-	
+
 	public Boolean areAlgoParamsEqual() {
 		Boolean retval = false;
-		
-		
+
 		return retval;
 	}
 
 	public void createMissingAlgoParams(Long algorithmId,
-			Map<String, Object> ecjAlgoParams) {
+			Set<String> missingParamNames) {
 
-		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
+		//falls Werte auch verglichen werdne sollen
+		//Map<String, Object> ecjAlgoParams
+		//Set<String> missingParamNames = ecjAlgoParams.keySet();
+		for (String paramname : missingParamNames) {
+			AlgorithmParameter newAlgoParam = new AlgorithmParameter();
+			newAlgoParam.setAlgorithmId(algorithmId);
+			newAlgoParam.setDataTypeId(null);// TODO insert DatatypeId if not
+												// exists (mapping first);
+			newAlgoParam.setDescription(factory
+					.createNamedOKBItemDescription("created from ECJ"));
+			newAlgoParam.setName(factory
+					.createNamedOKBItemDescription(paramname));
+			port.addAlgorithmParameter(newAlgoParam);
 		}
-
-		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]));
-			}
-		}
-
 	}
 }
