Harmonizes / usage with C# SDK

* Adds model proxy factory for creating proxies for paths with multiple endpoints
* Removes // usage in VABElementProxy
* Clarifies interface for IConnectorProvider

Change-Id: If7b6ffc77e44c860ae41cc999981b8b1229ab161
Signed-off-by: Daniel Espen <daniel.espen@iese.fraunhofer.de>
diff --git a/components/basys.components/src/main/java/org/eclipse/basyx/components/directory/SQLDirectoryProvider.java b/components/basys.components/src/main/java/org/eclipse/basyx/components/directory/SQLDirectoryProvider.java
index c4d42bf..af5191a 100644
--- a/components/basys.components/src/main/java/org/eclipse/basyx/components/directory/SQLDirectoryProvider.java
+++ b/components/basys.components/src/main/java/org/eclipse/basyx/components/directory/SQLDirectoryProvider.java
@@ -17,6 +17,7 @@
 import org.eclipse.basyx.components.sqlprovider.driver.SQLDriver;
 import org.eclipse.basyx.vab.coder.json.serialization.DefaultTypeFactory;
 import org.eclipse.basyx.vab.coder.json.serialization.GSONTools;
+import org.eclipse.basyx.vab.modelprovider.VABPathTools;
 import org.eclipse.basyx.vab.modelprovider.api.IModelProvider;
 
 /**
@@ -27,7 +28,7 @@
  */
 public class SQLDirectoryProvider implements IModelProvider {
 
-	private static String registryPath = "/api/v1/registry";
+	private static String registryPath = "api/v1/registry";
 
 
 	/**
@@ -213,7 +214,8 @@
 	 */
 	@Override
 	public Object getModelPropertyValue(String path) throws Exception {
-
+		path = VABPathTools.stripSlashes(path);
+		
 		// Process get request
 		// - Get all (local) AAS
 		if (path.equals(registryPath)) {
diff --git a/components/basys.components/src/test/java/org/eclipse/basyx/regression/processengineconnector/tests/TestAASServicecall.java b/components/basys.components/src/test/java/org/eclipse/basyx/regression/processengineconnector/tests/TestAASServicecall.java
index 2ae286c..600345c 100644
--- a/components/basys.components/src/test/java/org/eclipse/basyx/regression/processengineconnector/tests/TestAASServicecall.java
+++ b/components/basys.components/src/test/java/org/eclipse/basyx/regression/processengineconnector/tests/TestAASServicecall.java
@@ -79,7 +79,7 @@
 
 		// setup the connection-manager with the model-provider
 		ConnectorProviderStub connectorProvider = new ConnectorProviderStub();
-		connectorProvider.addMapping("/aas/submodels/submodel1", provider);
+		connectorProvider.addMapping("", provider);
 		
 		// create the service executor that calls the services using aas
 		ConnectedAssetAdministrationShellManager manager = new ConnectedAssetAdministrationShellManager(registry,
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/manager/ConnectedAssetAdministrationShellManager.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/manager/ConnectedAssetAdministrationShellManager.java
index 2bad9fd..216618b 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/manager/ConnectedAssetAdministrationShellManager.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/manager/ConnectedAssetAdministrationShellManager.java
@@ -17,8 +17,8 @@
 import org.eclipse.basyx.submodel.metamodel.connected.ConnectedSubModel;
 import org.eclipse.basyx.submodel.metamodel.map.SubModel;
 import org.eclipse.basyx.vab.exception.FeatureNotImplementedException;
+import org.eclipse.basyx.vab.factory.java.ModelProxyFactory;
 import org.eclipse.basyx.vab.modelprovider.VABElementProxy;
-import org.eclipse.basyx.vab.modelprovider.VABPathTools;
 import org.eclipse.basyx.vab.protocol.api.IConnectorProvider;
 
 /**
@@ -31,8 +31,8 @@
 public class ConnectedAssetAdministrationShellManager implements IAssetAdministrationShellManager {
 
 	protected IAASRegistryService aasDirectory;
-
-	protected IConnectorProvider providerProvider;
+	protected IConnectorProvider connectorProvider;
+	protected ModelProxyFactory proxyFactory;
 
 	/**
 	 * @param networkDirectoryService
@@ -41,7 +41,8 @@
 	public ConnectedAssetAdministrationShellManager(IAASRegistryService directory,
 			IConnectorProvider provider) {
 		this.aasDirectory = directory;
-		this.providerProvider = provider;
+		this.connectorProvider = provider;
+		this.proxyFactory = new ModelProxyFactory(provider);
 	}
 
 	@Override
@@ -56,9 +57,7 @@
 		String addr = smDescriptor.getFirstEndpoint();
 
 		// Return a new VABElementProxy
-		VABElementProxy proxy = new VABElementProxy(VABPathTools.removeAddressEntry(addr),
-				providerProvider.getConnector(addr));
-		return new ConnectedSubModel(proxy);
+		return new ConnectedSubModel(proxyFactory.createProxy(addr));
 	}
 
 	@Override
@@ -70,7 +69,6 @@
 	@Override
 	public void createAAS(AssetAdministrationShell aas, ModelUrn urn) {
 		VABElementProxy proxy = getAASProxyFromURN(urn);
-
 		proxy.createValue("/", aas);
 	}
 
@@ -82,7 +80,7 @@
 		String addr = aasDescriptor.getFirstEndpoint();
 
 		// Return a new VABElementProxy
-		return new VABElementProxy(VABPathTools.removeAddressEntry(addr), providerProvider.getConnector(addr));
+		return proxyFactory.createProxy(addr);
 	}
 
 	@Override
@@ -104,8 +102,7 @@
 		String addr = aasDescriptor.getFirstEndpoint();
 
 		// Return a new VABElementProxy
-		VABElementProxy proxy = new VABElementProxy(VABPathTools.removeAddressEntry(addr),
-				providerProvider.getConnector(addr));
+		VABElementProxy proxy = proxyFactory.createProxy(addr);
 
 		// Create sm
 		proxy.createValue(AssetAdministrationShell.SUBMODELS, submodel);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiAASProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiAASProvider.java
index f1aa6ad..1ebee0b 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiAASProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiAASProvider.java
@@ -129,7 +129,7 @@
 	 *         the path is invalid or does not contain an AAS id.
 	 */
 	private String getId(String path) {
-		if (path == null || !path.startsWith("/path://")) {
+		if (path == null || !path.startsWith("path://")) {
 			return null;
 		}
 
@@ -153,7 +153,7 @@
 	 * @return The remaining sub-path, when removing the id from the VAB path
 	 */
 	private String getSubPath(String path, String aasId) {
-		String prefix = "/path://" + aasId;
+		String prefix = "path://" + aasId;
 		return path.substring(prefix.length());
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/factory/java/ModelProxyFactory.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/factory/java/ModelProxyFactory.java
new file mode 100644
index 0000000..7c33ed7
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/factory/java/ModelProxyFactory.java
@@ -0,0 +1,36 @@
+package org.eclipse.basyx.vab.factory.java;
+
+import org.eclipse.basyx.vab.modelprovider.VABElementProxy;
+import org.eclipse.basyx.vab.modelprovider.VABPathTools;
+import org.eclipse.basyx.vab.modelprovider.api.IModelProvider;
+import org.eclipse.basyx.vab.protocol.api.IConnectorProvider;
+
+/**
+ * A factory for creating model providers out of addresses with multiple endpoints included.
+ * 
+ *  @author espen
+ *
+ */
+public class ModelProxyFactory {
+	private IConnectorProvider connectorProvider;
+
+	public ModelProxyFactory(IConnectorProvider connectorProvider) {
+		this.connectorProvider = connectorProvider;
+	}
+	
+	/**
+	 * Returns an element proxy for a path that can contain multiple endpoints
+	 * 
+	 * @param path A path containing one or more endpoints.
+	 * @return A proxy that directly connects to the element referenced by the given path.
+	 */
+	public VABElementProxy createProxy(String path) {
+		// Create a model provider for the first endpoint
+		String addressEntry = VABPathTools.getFirstEndpoint(path);
+		IModelProvider provider = connectorProvider.getConnector(addressEntry);
+		
+		// Return a proxy for the whole path using the connector to the first endpoint
+		String subPath = VABPathTools.removeFirstEndpoint(path);
+		return new VABElementProxy(subPath, provider);
+	}
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/gateway/DelegatingModelProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/gateway/DelegatingModelProvider.java
index 32f7a0f..3010d2a 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/gateway/DelegatingModelProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/gateway/DelegatingModelProvider.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.vab.gateway;
 
-import org.eclipse.basyx.vab.modelprovider.VABPathTools;
+import org.eclipse.basyx.vab.factory.java.ModelProxyFactory;
 import org.eclipse.basyx.vab.modelprovider.api.IModelProvider;
 import org.eclipse.basyx.vab.protocol.api.IConnectorProvider;
 
@@ -14,41 +14,41 @@
 public class DelegatingModelProvider implements IModelProvider {
 
 	// Provider that provides the connectors
-	private IConnectorProvider connectorProvider;
+	private ModelProxyFactory proxyFactory;
 
 	public DelegatingModelProvider(IConnectorProvider connectorProvider) {
 		super();
-		this.connectorProvider = connectorProvider;
+		this.proxyFactory = new ModelProxyFactory(connectorProvider);
 	}
 
 	@Override
 	public Object getModelPropertyValue(String path) throws Exception {
-		return getProvider(path).getModelPropertyValue(VABPathTools.removeAddressEntry(path));
+		return getProvider(path).getModelPropertyValue("");
 	}
 
 	@Override
 	public void setModelPropertyValue(String path, Object newValue) throws Exception {
-		getProvider(path).setModelPropertyValue(VABPathTools.removeAddressEntry(path), newValue);
+		getProvider(path).setModelPropertyValue("", newValue);
 	}
 
 	@Override
 	public void createValue(String path, Object newEntity) throws Exception {
-		getProvider(path).createValue(VABPathTools.removeAddressEntry(path), newEntity);
+		getProvider(path).createValue("", newEntity);
 	}
 
 	@Override
 	public void deleteValue(String path) throws Exception {
-		getProvider(path).deleteValue(VABPathTools.removeAddressEntry(path));
+		getProvider(path).deleteValue("");
 	}
 
 	@Override
 	public void deleteValue(String path, Object obj) throws Exception {
-		getProvider(path).deleteValue(VABPathTools.removeAddressEntry(path), obj);
+		getProvider(path).deleteValue("", obj);
 	}
 
 	@Override
 	public Object invokeOperation(String path, Object... parameter) throws Exception {
-		return getProvider(path).invokeOperation(VABPathTools.removeAddressEntry(path), parameter);
+		return getProvider(path).invokeOperation("", parameter);
 	}
 
 	/**
@@ -58,6 +58,6 @@
 	 * @return
 	 */
 	private IModelProvider getProvider(String path) {
-		return connectorProvider.getConnector(VABPathTools.getAddressEntry(path));
+		return proxyFactory.createProxy(path);
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/manager/VABConnectionManager.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/manager/VABConnectionManager.java
index ad9d13a..9781e42 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/manager/VABConnectionManager.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/manager/VABConnectionManager.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.vab.manager;
 
 import org.eclipse.basyx.vab.directory.api.IVABDirectoryService;
+import org.eclipse.basyx.vab.factory.java.ModelProxyFactory;
 import org.eclipse.basyx.vab.modelprovider.VABElementProxy;
-import org.eclipse.basyx.vab.modelprovider.VABPathTools;
 import org.eclipse.basyx.vab.protocol.api.IConnectorProvider;
 
 
@@ -15,7 +15,6 @@
  */
 public class VABConnectionManager {
 
-	
 	/**
 	 * Directory service reference
 	 */
@@ -25,11 +24,13 @@
 	/**
 	 * Store connection providers
 	 */
-	protected IConnectorProvider providerProvider;
+	protected IConnectorProvider connectorProvider = null;
+	
+	/**
+	 * Factory for creating proxies for addresses with multiple endpoints
+	 */
+	private ModelProxyFactory proxyFactory = null;
 
-	
-	
-	
 	/**
 	 * 
 	 * @param networkDirectoryService
@@ -42,9 +43,11 @@
 		directoryService = networkDirectoryService;
 
 		// Set connector reference
-		this.providerProvider = providerProvider;
+		this.connectorProvider = providerProvider;
+		
+		// Set proxy factory
+		this.proxyFactory = new ModelProxyFactory(providerProvider);
 	}
-
 	
 	/**
 	 * Connect to an VAB element
@@ -58,9 +61,8 @@
 
 		// Lookup address in directory server
 		addr = directoryService.lookup(urn);
-
-		// Return a new VABElementProxy
-		return new VABElementProxy(VABPathTools.removeAddressEntry(addr), providerProvider.getConnector(addr));
+		
+		return connectToVABElementByPath(addr);
 	}
 
 	/**
@@ -70,10 +72,6 @@
 	 *            the path that describes the element location.
 	 */
 	public VABElementProxy connectToVABElementByPath(String path) {
-
-		// Return a new VABElementProxy
-		// - Do not pass path here to provider as address, as the path parameter is
-		// already absolute and contains the address.
-		return new VABElementProxy(VABPathTools.removeAddressEntry(path), providerProvider.getConnector(path));
+		return proxyFactory.createProxy(path);	
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABElementProxy.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABElementProxy.java
index 4ef60f3..1d1f1b4 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABElementProxy.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABElementProxy.java
@@ -27,22 +27,23 @@
 	protected IModelProvider provider = null;
 
 	/**
-	 * Constructor expects address and provider reference <br />
+	 * Creates the proxy based on a specific model provider.
 	 * E.g, if the element resides on <i>basyx://127.0.0.1</i> in the path
 	 * <i>a/b/c</i>, <i>provider</i> would realize the connection to
 	 * <i>basyx://127.0.0.1</i> and <i>addr</i> would be <i>a/b/c</i>. The
 	 * VABElementProxy then directly points to the element.
 	 * 
 	 * @param addr
-	 *            address "within" the provider
-	 * @param provider
+	 *            Address "within" the provider
+	 * @param provider The provider this proxy is based on
+	 * 	
 	 */
 	public VABElementProxy(String addr, IModelProvider provider) {
 		// Store references
-		this.addr = trimAddress(addr);
+		this.addr = VABPathTools.stripSlashes(addr);
 		this.provider = provider;
 	}
-
+	
 	/**
 	 * Read VAB element value
 	 */
@@ -149,36 +150,7 @@
 		}
 	}
 
-	/**
-	 * Remove trailing slashes from address "/"
-	 */
-	private String trimAddress(String parAddr) {
-		if (parAddr == null) {
-			return null;
-		}
 
-		// Return value
-		String result = parAddr;
-
-		// Remove trailing "/" from address
-		while (result.endsWith("/")) {
-			result = result.substring(0, result.length() - 1);
-		}
-
-		// Return trimmed address
-		return result;
-	}
-
-	/**
-	 * Add path to VAB element address. Make sure that resulting path contains the proper number of slashes ("/")
-	 * 
-	 * @param path
-	 *            Input path
-	 * @return processed path
-	 */
-	private String constructPath(String path) {
-		return constructPathWithSeparator(path, "//");
-	}
 
 	/**
 	 * Add path to VAB element address. Make sure that resulting path contains the
@@ -186,31 +158,25 @@
 	 * 
 	 * @param path
 	 *            Input path
-	 * @param separator
-	 *            Allows passing different separators (/ vs. //)
 	 * @return processed path
 	 */
-	private String constructPathWithSeparator(String path, String separator) {
+	private String constructPath(String path) {
 		if (path == null) {
 			return null;
 		}
 
 		// Trim input path
-		String trimmedPath = trimAddress(path);
-		// Remove leading slashes from path
-		while (trimmedPath.startsWith("/")) {
-			trimmedPath = trimmedPath.substring(1);
-		}
-		// Add one slash at beginning of path
-		trimmedPath = "/" + trimmedPath;
+		path = VABPathTools.stripSlashes(path);
 
 		// Now combine both paths
-		if (addr != null && !addr.isEmpty()) {
+		if ( path.isEmpty() ) {
+			return addr;
+		} else if (addr != null && !addr.isEmpty()) {
 			// Double slashes are used to separate between address and path to be able to
 			// differentiate later on
-			return addr + separator + trimmedPath;
+			return addr + "/" + path;
 		} else {
-			return trimmedPath;
+			return path;
 		}
 	}
 
@@ -222,6 +188,6 @@
 	 * @return
 	 */
 	public VABElementProxy getDeepProxy(String path) {
-		return new VABElementProxy(constructPathWithSeparator(path, "/"), provider);
+		return new VABElementProxy(constructPath(path), provider);
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABPathTools.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABPathTools.java
index 030d6b0..b113996 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABPathTools.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/VABPathTools.java
@@ -190,45 +190,54 @@
 	}
 
 	/**
-	 * Gets the address entry of a path <br />
-	 * E.g. basyx://127.0.0.1:6998//https://localhost/test/ will return
-	 * basyx://127.0.0.1:6998
+	 * Gets the first endpoint of a path.
+	 * @path 
+	 * 		A path that can contain 0..* endpoints.
+	 * @return
+	 * 		The first address entry of a path. The address entry is the first endpoint combined with a protocol.
+	 * 		If there is no protocol defined, the address entry is empty ("").
+	 * 		E.g. basyx://127.0.0.1:6998//https://localhost/test/ will return basyx://127.0.0.1:6998, 
+	 * 		https://localhost/test//basyx://127.0.0.1:6998/ will return https://localhost/test
+	 * 		and http://localhost/test/ will return "". 
 	 */
-	public static String getAddressEntry(String path) {
+	public static String getFirstEndpoint(String fullPath) {
 		// Return null result for null argument
-		if (path == null) {
+		if (fullPath == null) {
 			return null;
 		}
 
-		if (isEmptyPath(path) || !path.contains("//")) {
+		if (isEmptyPath(fullPath) || !fullPath.contains("//")) {
 			return "";
 		} else {
-			String splitted[] = path.split("//");
+			String[] splitted = fullPath.split("//");
 			return splitted[0] + "//" + splitted[1];
 		}
 	}
 
 	/**
-	 * Removes from a path the address part <br/>
-	 * E.g. basyx://127.0.0.1:6998//https://localhost/test/ will return
-	 * https://localhost/test/
+	 * Removes the first endpoint from a path. See {@link #getAddressEntry}<br/>
+	 * @path
+	 * @return 
+	 * 		The first endpoint. E.g. basyx://127.0.0.1:6998//https://localhost/test/ will return
+	 * 		https://localhost/test/.
+	 * 
 	 */
-	public static String removeAddressEntry(String path) {
+	public static String removeFirstEndpoint(String fullPath) {
 		// Return null result for null argument
-		if (path == null) {
+		if (fullPath == null) {
 			return null;
 		}
 
-		if (isEmptyPath(path)) {
+		if (isEmptyPath(fullPath)) {
 			return "";
-		} else if (!path.contains("//")) {
-			return path;
+		} else if (!fullPath.contains("//")) {
+			return fullPath;
 		} else {
-			path = path.replaceFirst(getAddressEntry(path), "");
-			if (path.startsWith("//")) {
-				path = path.replaceFirst("//", "");
+			String firstEndpoint = fullPath.replaceFirst(getFirstEndpoint(fullPath), "");
+			if (firstEndpoint.startsWith("//")) {
+				firstEndpoint = firstEndpoint.replaceFirst("//", "");
 			}
-			return path;
+			return firstEndpoint;
 		}
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/api/IConnectorProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/api/IConnectorProvider.java
index 15007d8..9d1f49d 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/api/IConnectorProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/api/IConnectorProvider.java
@@ -15,10 +15,15 @@
 public interface IConnectorProvider {
 
 	/**
-	 * Gets an IModelProvider connecting the specific address
-	 * 
-	 * @param addr
+	 * Gets an IModelProvider connecting the specific address.
+	 *
+	 * @param addr 
+	 * 		The address for which a provider is returned. Must be an address limited to one included endpoint.
+	 * 		For example, it does NOT support basyx://localhost:6998//http://localhost/a/b/c, but http://localhost/a/b/c
 	 * @return
+	 * 		A provider that directly points to the element referenced by the given address. 
+	 * 		E.g. the returned model provider for http://localhost/a/b/c directly points to the element c. Therefore, 
+	 * 		getConnector("http://localhost/a/b/c").getModelPropertyValue(""); returns the value of the element c.  
 	 */
 	public IModelProvider getConnector(String addr);
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/basyx/connector/BaSyxConnectorProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/basyx/connector/BaSyxConnectorProvider.java
index ae37d41..81476ad 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/basyx/connector/BaSyxConnectorProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/basyx/connector/BaSyxConnectorProvider.java
@@ -22,7 +22,7 @@
 	@Override
 	protected IModelProvider createProvider(String address) {
 		// Create address
-		address = VABPathTools.getAddressEntry(address);
+		address = VABPathTools.getFirstEndpoint(address);
 		address = address.replace("basyx://", "");
 		String hostName = address.substring(0, address.indexOf(':'));
 		String[] splitted = address.split("/");
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/http/server/VABHTTPInterface.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/http/server/VABHTTPInterface.java
index 64ea4b6..cdb470e 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/http/server/VABHTTPInterface.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/protocol/http/server/VABHTTPInterface.java
@@ -171,11 +171,6 @@
 		String contextPath = req.getContextPath();
 		String path = uri.substring(contextPath.length() + req.getServletPath().length() + 1);
 
-		// Add leading "/" to path if necessary
-		if (!path.startsWith("/")) {
-			path = "/" + path;
-		}
-
 		// Decode URL
 		path = java.net.URLDecoder.decode(path, "UTF-8");
 
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/manager/TestConnectedAssetAdministrationShellManager.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/manager/TestConnectedAssetAdministrationShellManager.java
index 4925282..11735ad 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/manager/TestConnectedAssetAdministrationShellManager.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/manager/TestConnectedAssetAdministrationShellManager.java
@@ -62,7 +62,7 @@
 		// Register AAS at directory
 		IIdentifier id = new Identifier(IdentifierType.URI, aasId);
 		registry.register(new AASDescriptor(id, "/aas"));
-		connectorProvider.addMapping("/aas", new VABMultiSubmodelProvider());
+		connectorProvider.addMapping("", new VABMultiSubmodelProvider());
 
 		// Create an AAS containing a reference to the created SubModel
 		createAAS(urn, aasId);
@@ -89,8 +89,7 @@
 		desc.addSubmodelDescriptor(new SubmodelDescriptor(smId, IdentifierType.URI, "/aas/submodels/" + smId));
 		registry.register(desc);
 		IModelProvider provider = new VABMultiSubmodelProvider(new AASModelProvider(new HashMap<>()));
-		connectorProvider.addMapping("/aas", provider);
-		connectorProvider.addMapping("/aas/submodels/" + smId, provider);
+		connectorProvider.addMapping("", provider);
 
 		// Create sub model
 		SubModel submodel = new SubModel();
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/connected/TestConnectedAssetAdministrationShell.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/connected/TestConnectedAssetAdministrationShell.java
index e0e0084..0e2edff 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/connected/TestConnectedAssetAdministrationShell.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/connected/TestConnectedAssetAdministrationShell.java
@@ -86,8 +86,7 @@
 
 		// Create connector provider stub, map address to provider
 		ConnectorProviderStub connectorProvider = new ConnectorProviderStub();
-		connectorProvider.addMapping(aasDescriptor.getFirstEndpoint(), provider);
-		connectorProvider.addMapping(smDescriptor.getFirstEndpoint(), provider);
+		connectorProvider.addMapping("", provider);
 
 	// Create connection manager using the dummy
 		ConnectedAssetAdministrationShellManager manager = new ConnectedAssetAdministrationShellManager(registry,
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/gateway/TestGateway.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/gateway/TestGateway.java
index 843c084..bd2362a 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/gateway/TestGateway.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/gateway/TestGateway.java
@@ -15,6 +15,10 @@
 import org.eclipse.basyx.vab.modelprovider.map.VABHashmapProvider;
 import org.eclipse.basyx.vab.protocol.basyx.connector.BaSyxConnectorProvider;
 import org.eclipse.basyx.vab.protocol.basyx.server.BaSyxTCPServer;
+import org.eclipse.basyx.vab.protocol.http.connector.HTTPConnectorProvider;
+import org.eclipse.basyx.vab.protocol.http.server.AASHTTPServer;
+import org.eclipse.basyx.vab.protocol.http.server.BaSyxContext;
+import org.eclipse.basyx.vab.protocol.http.server.VABHTTPInterface;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -27,9 +31,9 @@
  *
  */
 public class TestGateway {
-
-	BaSyxTCPServer<VABHashmapProvider> server;
-	BaSyxTCPServer<DelegatingModelProvider> gateway;
+	private BaSyxTCPServer<VABHashmapProvider> server;
+	private BaSyxTCPServer<DelegatingModelProvider> basyxGateway;
+	private AASHTTPServer httpGateway;
 
 	@Before
 	public void build() { // Create VAB element
@@ -43,13 +47,21 @@
 		// BaSyxConnectorProvider for gateway
 		ConnectorProviderMapper gatewayMapper = new ConnectorProviderMapper();
 		gatewayMapper.addConnectorProvider("basyx", new BaSyxConnectorProvider());
+		gatewayMapper.addConnectorProvider("http", new HTTPConnectorProvider());
 
-		// Create gateway using DelegatingModelProvider
-		gateway = new BaSyxTCPServer<>(new DelegatingModelProvider(gatewayMapper), 6999);
+		// Create tcp gateway using DelegatingModelProvider
+		basyxGateway = new BaSyxTCPServer<>(new DelegatingModelProvider(gatewayMapper), 6999);
+		
+		// Create a http gateway using DelegatingModelProvider
+		DelegatingModelProvider httpGWProvider = new DelegatingModelProvider(gatewayMapper);
+		BaSyxContext context = new BaSyxContext("", "", "localhost", 5123);
+		context.addServletMapping("/path/to/gateway/*", new VABHTTPInterface<DelegatingModelProvider>(httpGWProvider));
+		httpGateway = new AASHTTPServer(context);
 
 		// Start element provider and gateway
 		server.start();
-		gateway.start();
+		basyxGateway.start();
+		httpGateway.start();
 	}
 
 	/**
@@ -78,11 +90,11 @@
 		// Create Directory, here it is configured statically, of course a dynamic
 		// request to e.g. a servlet is also possible
 		DirectoryServiceStub directory = new DirectoryServiceStub();
-		directory.addMapping("Elem", "basyx://127.0.0.1:6999//basyx://127.0.0.1:6998");
+		directory.addMapping("Elem", "http://localhost:5123/path/to/gateway//basyx://127.0.0.1:6999//basyx://127.0.0.1:6998");
 
 		// Create ConnectionProviderMapper for client
 		ConnectorProviderMapper clientMapper = new ConnectorProviderMapper();
-		clientMapper.addConnectorProvider("basyx", new BaSyxConnectorProvider());
+		clientMapper.addConnectorProvider("http", new HTTPConnectorProvider());
 
 		// Create VABConnectionManager
 		VABConnectionManager manager = new VABConnectionManager(directory, clientMapper);
@@ -100,8 +112,12 @@
 			server.stop();
 		}
 
-		if (gateway != null) {
-			gateway.stop();
+		if (basyxGateway != null) {
+			basyxGateway.stop();
+		}
+
+		if (httpGateway != null) {
+			httpGateway.shutdown();
 		}
 	}
 }
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/manager/VABConnectionManagerStub.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/manager/VABConnectionManagerStub.java
index 3e6ac9a..f4f1489 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/manager/VABConnectionManagerStub.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/manager/VABConnectionManagerStub.java
@@ -36,7 +36,7 @@
 	}
 
 	private ConnectorProviderStub getConnectorProvider() {
-		return (ConnectorProviderStub) providerProvider;
+		return (ConnectorProviderStub) connectorProvider;
 	}
 
 	/**
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/modelprovider/VABPathToolsTest.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/modelprovider/VABPathToolsTest.java
index bfd455c..79efe0d 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/modelprovider/VABPathToolsTest.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/modelprovider/VABPathToolsTest.java
@@ -47,10 +47,10 @@
 	 */
 	@Test
 	public void testRemoveAddress() {
-		assertEquals(pathWithoutAddress, VABPathTools.removeAddressEntry(pathWithoutAddress));
-		assertEquals(pathWithoutAddress, VABPathTools.removeAddressEntry(pathWithOneAddress));
-		assertEquals("", VABPathTools.removeAddressEntry(onlyAddress));
-		assertNull(VABPathTools.removeAddressEntry(null));
+		assertEquals(pathWithoutAddress, VABPathTools.removeFirstEndpoint(pathWithoutAddress));
+		assertEquals(pathWithoutAddress, VABPathTools.removeFirstEndpoint(pathWithOneAddress));
+		assertEquals("", VABPathTools.removeFirstEndpoint(onlyAddress));
+		assertNull(VABPathTools.removeFirstEndpoint(null));
 	}
 
 	/**
@@ -58,10 +58,10 @@
 	 */
 	@Test
 	public void testGetAddress() {
-		assertEquals("", VABPathTools.getAddressEntry(pathWithoutAddress));
-		assertEquals("basyx://127.0.0.1:6889", VABPathTools.getAddressEntry(pathWithTwoAddress));
-		assertEquals(onlyAddress, VABPathTools.getAddressEntry(onlyAddress));
-		assertNull(VABPathTools.getAddressEntry(null));
+		assertEquals("", VABPathTools.getFirstEndpoint(pathWithoutAddress));
+		assertEquals("basyx://127.0.0.1:6889", VABPathTools.getFirstEndpoint(pathWithTwoAddress));
+		assertEquals(onlyAddress, VABPathTools.getFirstEndpoint(onlyAddress));
+		assertNull(VABPathTools.getFirstEndpoint(null));
 	}
 
 	/**