[OLINGO-562] Merge branch 'master' into OLINGO-562_SpringExtension
diff --git a/ext/config/pom.xml b/ext/config/pom.xml
new file mode 100644
index 0000000..1ac690a
--- /dev/null
+++ b/ext/config/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<artifactId>odata-config</artifactId>
+	<name>${project.artifactId}</name>
+	<packaging>jar</packaging>
+
+	<parent>
+		<groupId>org.apache.olingo</groupId>
+		<artifactId>odata-ext</artifactId>
+		<version>4.0.0-SNAPSHOT</version>
+		<relativePath>..</relativePath>
+	</parent>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-server-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-server-core</artifactId>
+			<version>${project.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-commons-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-commons-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-client-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-client-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<version>${sl4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+
+</project>
diff --git a/ext/config/src/main/java/org/apache/olingo/ext/config/editor/FullQualifiedNameEditor.java b/ext/config/src/main/java/org/apache/olingo/ext/config/editor/FullQualifiedNameEditor.java
new file mode 100644
index 0000000..861096e
--- /dev/null
+++ b/ext/config/src/main/java/org/apache/olingo/ext/config/editor/FullQualifiedNameEditor.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.editor;
+
+import java.beans.PropertyEditorSupport;
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+
+public class FullQualifiedNameEditor extends PropertyEditorSupport {
+  public void setAsText(String text) {
+    String[] tokens = text.split("\\.");
+    if (tokens.length == 2) {
+      setValue(new FullQualifiedName(tokens[0], tokens[1]));
+    } else {
+      setValue(new FullQualifiedName(text));
+    }
+  }
+
+	@Override
+	public String getAsText() {
+		return super.getAsText();
+	}
+}
diff --git a/ext/config/src/main/java/org/apache/olingo/ext/config/edm/GenericEdmProvider.java b/ext/config/src/main/java/org/apache/olingo/ext/config/edm/GenericEdmProvider.java
new file mode 100644
index 0000000..ed38d97
--- /dev/null
+++ b/ext/config/src/main/java/org/apache/olingo/ext/config/edm/GenericEdmProvider.java
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.edm;
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlAliasInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainerInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEnumType;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunctionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.apache.olingo.commons.api.edm.provider.CsdlSingleton;
+import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
+import org.apache.olingo.commons.api.edm.provider.CsdlTypeDefinition;
+import org.apache.olingo.commons.api.ex.ODataException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericEdmProvider extends CsdlAbstractEdmProvider {
+
+  private String containerName = "default";
+
+  private List<CsdlSchema> schemas = new ArrayList<CsdlSchema>();
+
+  // OData
+
+  @Override
+  public List<CsdlSchema> getSchemas() {
+    return schemas;
+  }
+
+  @Override
+  public CsdlEntityContainer getEntityContainer() {
+    CsdlEntityContainer container = new CsdlEntityContainer();
+    container.setName(containerName);
+
+    // EntitySets
+    List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
+    container.setEntitySets(entitySets);
+
+    // Load entity sets per index
+    for (CsdlSchema schema : schemas) {
+
+      if (schema.getEntityContainer() != null
+          && schema.getEntityContainer().getEntitySets() != null) {
+        for (CsdlEntitySet schemaEntitySet : schema.getEntityContainer()
+            .getEntitySets()) {
+          CsdlEntitySet entitySet = new CsdlEntitySet().setName(
+              schemaEntitySet.getName()).setType(
+              new FullQualifiedName(
+                  schemaEntitySet.getTypeFQN().getNamespace(),
+                  schemaEntitySet.getTypeFQN().getName()));
+          entitySets.add(entitySet);
+        }
+      }
+    }
+
+    return container;
+  }
+
+  private CsdlSchema findSchema(String namespace) {
+    for (CsdlSchema schema : schemas) {
+      if (schema.getNamespace().equals(namespace)) {
+        return schema;
+      }
+    }
+
+    return null;
+  }
+
+  private CsdlEntityType findEntityType(CsdlSchema schema, String entityTypeName) {
+    for (CsdlEntityType entityType : schema.getEntityTypes()) {
+      if (entityType.getName().equals(entityTypeName)) {
+        return entityType;
+      }
+    }
+
+    return null;
+  }
+
+  @Override
+  public CsdlEntityType getEntityType(FullQualifiedName entityTypeName) {
+    CsdlSchema schema = findSchema(entityTypeName.getNamespace());
+    return findEntityType(schema, entityTypeName.getName());
+  }
+
+  private CsdlEnumType findEnumType(CsdlSchema schema, String enumTypeName) {
+    for (CsdlEnumType enumType : schema.getEnumTypes()) {
+      if (enumType.getName().equals(enumTypeName)) {
+        return enumType;
+      }
+    }
+
+    return null;
+  }
+
+  @Override
+  public CsdlEnumType getEnumType(FullQualifiedName enumTypeName) {
+    CsdlSchema schema = findSchema(enumTypeName.getNamespace());
+    return findEnumType(schema, enumTypeName.getName());
+  }
+
+  @Override
+  public CsdlTypeDefinition getTypeDefinition(FullQualifiedName typeDefinitionName) throws ODataException {
+    System.out.println(">> getTypeDefinition");
+    // TODO Auto-generated method stub
+    return super.getTypeDefinition(typeDefinitionName);
+  }
+
+  private CsdlComplexType findComplexType(CsdlSchema schema, String complexTypeName) {
+    for (CsdlComplexType complexType : schema.getComplexTypes()) {
+      if (complexType.getName().equals(complexTypeName)) {
+        return complexType;
+      }
+    }
+
+    return null;
+  }
+
+  @Override
+  public CsdlComplexType getComplexType(FullQualifiedName complexTypeName) {
+    CsdlSchema schema = findSchema(complexTypeName.getNamespace());
+    return findComplexType(schema, complexTypeName.getName());
+  }
+
+  @Override
+  public List<CsdlAction> getActions(FullQualifiedName actionName) throws ODataException {
+    System.out.println(">> getActions");
+    // TODO Auto-generated method stub
+    return super.getActions(actionName);
+  }
+
+  @Override
+  public List<CsdlFunction> getFunctions(FullQualifiedName functionName) throws ODataException {
+    System.out.println(">> getFunctions");
+    // TODO Auto-generated method stub
+    return super.getFunctions(functionName);
+  }
+
+  @Override
+  public CsdlTerm getTerm(FullQualifiedName termName) throws ODataException {
+    System.out.println(">> getTerm");
+    // TODO Auto-generated method stub
+    return super.getTerm(termName);
+  }
+
+  private CsdlEntitySet findEntitySetInSchemas(String entitySetName) {
+    List<CsdlSchema> schemas = getSchemas();
+    for (CsdlSchema schema : schemas) {
+      CsdlEntityContainer entityContainer = schema.getEntityContainer();
+      List<CsdlEntitySet> entitySets = entityContainer.getEntitySets();
+      for (CsdlEntitySet entitySet : entitySets) {
+        if (entitySet.getName().equals(entitySetName)) {
+          return entitySet;
+        }
+      }
+    }
+    return null;
+  }
+
+  @Override
+  public CsdlEntitySet getEntitySet(FullQualifiedName entityContainer,
+                                    String entitySetName) {
+    return findEntitySetInSchemas(entitySetName);
+  }
+
+  @Override
+  public CsdlSingleton getSingleton(FullQualifiedName entityContainer,
+                                    String singletonName) throws ODataException {
+    System.out.println(">> getSingleton");
+    // TODO Auto-generated method stub
+    return super.getSingleton(entityContainer, singletonName);
+  }
+
+  @Override
+  public CsdlActionImport getActionImport(FullQualifiedName entityContainer,
+                                          String actionImportName) throws ODataException {
+    System.out.println(">> getActionImport");
+    // TODO Auto-generated method stub
+    return super.getActionImport(entityContainer, actionImportName);
+  }
+
+  @Override
+  public CsdlFunctionImport getFunctionImport(FullQualifiedName entityContainer,
+                                              String functionImportName) throws ODataException {
+    System.out.println(">> getFunctionImport");
+    // TODO Auto-generated method stub
+    return super.getFunctionImport(entityContainer, functionImportName);
+  }
+
+  @Override
+  public CsdlEntityContainerInfo getEntityContainerInfo(
+      FullQualifiedName entityContainerName) {
+    CsdlEntityContainer container = getEntityContainer();
+    FullQualifiedName fqName = new FullQualifiedName(container.getName(),
+        container.getName());
+    CsdlEntityContainerInfo info = new CsdlEntityContainerInfo();
+    info.setContainerName(fqName);
+    return info;
+  }
+
+  @Override
+  public List<CsdlAliasInfo> getAliasInfos() throws ODataException {
+    System.out.println(">> getAliasInfos");
+    // TODO Auto-generated method stub
+    return super.getAliasInfos();
+  }
+
+  // DI
+
+  public void setSchemas(List<CsdlSchema> schemas) {
+    this.schemas = schemas;
+  }
+
+  public String getContainerName() {
+    return containerName;
+  }
+
+  public void setContainerName(String containerName) {
+    this.containerName = containerName;
+  }
+
+}
diff --git a/ext/config/src/main/resources/schemas/configuration/olingo4.xsd b/ext/config/src/main/resources/schemas/configuration/olingo4.xsd
new file mode 100644
index 0000000..a85dd59
--- /dev/null
+++ b/ext/config/src/main/resources/schemas/configuration/olingo4.xsd
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<xsd:schema xmlns="http://olingo.apache.org/schema/olingo4"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	targetNamespace="http://olingo.apache.org/schema/olingo4"
+	elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+	<!-- Edm provider -->
+
+	<xsd:attributeGroup name="configurationAttributes">
+		<xsd:attribute name="id" type="xsd:string" use="required" />
+	</xsd:attributeGroup>
+	
+	<xsd:element name="edm-provider" type="edmProviderBeanType">
+	</xsd:element>
+
+	<xsd:complexType name="edmProviderBeanType">
+		<xsd:sequence>
+			<xsd:element name="schema" maxOccurs="unbounded" type="schemaBeanType"/>
+		</xsd:sequence>
+		<xsd:attribute name="id" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="schemaBeanType">
+		<xsd:sequence>
+			<xsd:element name="entityContainer" minOccurs="1" maxOccurs="1" type="entityContainerBeanType"/>
+			<xsd:element name="entityType" minOccurs="0" maxOccurs="unbounded" type="entityTypeBeanType"/>
+			<xsd:element name="complexType" minOccurs="0" maxOccurs="unbounded" type="complexTypeBeanType"/>
+		</xsd:sequence>
+		<xsd:attribute name="namespace" type="xsd:string" use="required"/>
+		<xsd:attribute name="alias" type="xsd:string"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="entityContainerBeanType">
+		<xsd:sequence>
+			<xsd:element name="entitySet" minOccurs="0" maxOccurs="unbounded" type="entitySetBeanType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+
+	<xsd:complexType name="entitySetBeanType">
+		<xsd:attribute name="name" type="xsd:string" use="required"/>
+		<xsd:attribute name="type" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="entityTypeBeanType">
+		<xsd:sequence>
+			<xsd:element name="key" minOccurs="1" maxOccurs="unbounded" type="entityTypeKeyBeanType"/>
+			<xsd:element name="property" minOccurs="1" maxOccurs="unbounded" type="entityTypePropertyBeanType"/>
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="entityTypeKeyBeanType">
+		<xsd:attribute name="property-name" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="entityTypePropertyBeanType">
+		<xsd:attribute name="name" type="xsd:string" use="required"/>
+		<xsd:attribute name="type" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="complexTypeBeanType">
+		<xsd:attribute name="name" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<!-- Http handler -->
+
+	<xsd:element name="http-handler" type="httpHandlerBeanType">
+	</xsd:element>
+
+	<xsd:complexType name="httpHandlerBeanType">
+		<xsd:sequence>
+			<xsd:element name="reference" minOccurs="1" maxOccurs="unbounded" type="referenceBeanType"/>
+			<xsd:element name="processor" maxOccurs="unbounded" type="processorBeanType"/>
+		</xsd:sequence>
+		<xsd:attribute name="id" type="xsd:string" use="required"/>
+		<xsd:attribute name="edm-provider" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="referenceBeanType">
+		<xsd:sequence>
+			<xsd:element name="include" maxOccurs="unbounded" type="referenceIncludeBeanType"/>
+		</xsd:sequence>
+		<xsd:attribute name="uri" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="referenceIncludeBeanType">
+		<xsd:attribute name="key" type="xsd:string" use="required"/>
+		<xsd:attribute name="value" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="processorBeanType">
+		<xsd:attribute name="ref" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+</xsd:schema>
diff --git a/ext/pom.xml b/ext/pom.xml
index 92a4bc2..4ebfdeb 100644
--- a/ext/pom.xml
+++ b/ext/pom.xml
@@ -39,11 +39,18 @@
     <module>pojogen-maven-plugin</module>
     <module>client-proxy</module>
     <module>client-android</module>
+    <module>config</module>
   </modules>
 
   <profiles>
     <profile>
-      <id>karaf</id>
+      <id>spring</id>
+      <modules>
+        <module>spring</module>
+      </modules>
+    </profile>
+    <profile>
+    <id>karaf</id>
       <modules>
         <module>karaf</module>
       </modules>
diff --git a/ext/spring/pom.xml b/ext/spring/pom.xml
new file mode 100644
index 0000000..97d0e94
--- /dev/null
+++ b/ext/spring/pom.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<artifactId>odata-spring</artifactId>
+	<name>${project.artifactId}</name>
+	<packaging>jar</packaging>
+
+	<parent>
+		<groupId>org.apache.olingo</groupId>
+		<artifactId>odata-ext</artifactId>
+		<version>4.0.0-SNAPSHOT</version>
+		<relativePath>..</relativePath>
+	</parent>
+
+	<properties>
+		<spring.version>4.1.3.RELEASE</spring.version>
+    <javax.servlet.version>2.5</javax.servlet.version>
+    <jetty.version>7.5.4.v20111024</jetty.version>
+		<!--<jetty.version>9.3.0.M1</jetty.version>-->
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>${javax.servlet.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-server-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-server-core</artifactId>
+			<version>${project.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-commons-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-commons-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-client-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-client-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.olingo</groupId>
+			<artifactId>odata-config</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<version>${sl4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-server</artifactId>
+			<version>${jetty.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-http</artifactId>
+			<version>${jetty.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-servlet</artifactId>
+			<version>${jetty.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+
+</project>
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmBeanDefinitionHelper.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmBeanDefinitionHelper.java
new file mode 100644
index 0000000..083b012
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmBeanDefinitionHelper.java
@@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.apache.olingo.ext.config.edm.GenericEdmProvider;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.ManagedList;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.springframework.util.xml.DomUtils;
+import org.w3c.dom.Element;
+
+public abstract class OlingoEdmBeanDefinitionHelper {
+  private static final Class<?> EDM_PROVIDER_CLASS = GenericEdmProvider.class;
+  private static final Class<?> SCHEMA_CLASS = CsdlSchema.class;
+  private static final Class<?> ENTITY_CONTAINER_CLASS = CsdlEntityContainer.class;
+  private static final Class<?> ENTITY_SET_CLASS = CsdlEntitySet.class;
+  private static final Class<?> ENTITY_TYPE_CLASS = CsdlEntityType.class;
+  private static final Class<?> PROPERTY_REF_CLASS = CsdlPropertyRef.class;
+  private static final Class<?> PROPERTY_CLASS = CsdlProperty.class;
+  private static final Class<?> FULL_QUALIFIED_NAME_CLASS = FullQualifiedName.class;
+
+  private static final String SCHEMA_ELEMENT = "schema";
+  private static final String ENTITY_CONTAINER_ELEMENT = "entityContainer";
+  private static final String ENTITY_TYPE_ELEMENT = "entityType";
+  private static final String COMPLEX_TYPE_ELEMENT = "complexType";
+  private static final String ENTITY_SET_ELEMENT = "entitySet";
+  private static final String KEY_ELEMENT = "key";
+  private static final String PROPERTY_ELEMENT = "property";
+
+  private static final String NAME_ATTR = "name";
+  private static final String NAMESPACE_ATTR = "namespace";
+  private static final String TYPE_ATTR = "type";
+  private static final String PROPERTY_NAME_ATTR = "property-name";
+  private static final String ALIAS_ATTR = "alias";
+
+  private static final String SCHEMA_LIST_PROPERTY = "schemas";
+  private static final String ENTITY_TYPE_LIST_PROPERTY = "entityTypes";
+  private static final String COMPLEX_TYPE_LIST_PROPERTY = "complexTypes";
+  private static final String ENTITY_SET_LIST_PROPERTY = "entitySets";
+  private static final String ENTITY_CONTAINER_PROPERTY = "entityContainer";
+  private static final String NAME_PROPERTY = "name";
+  private static final String NAMESPACE_PROPERTY = "namespace";
+  private static final String ALIAS_PROPERTY = "alias";
+  private static final String TYPE_PROPERTY = "type";
+  private static final String KEY_LIST_PROPERTY = "key";
+  private static final String PROPERTY_LIST_PROPERTY = "properties";
+  private static final String PROPERTY_NAME_PROPERTY = "name";
+
+  private static String elementAttribute(Element element, String name) {
+    String value = element.getAttribute(name);
+    return value.length() == 0 ? null : value;
+  }
+
+  private static BeanDefinitionBuilder createBeanDefinitionBuilder(
+      Class<?> beanClass) {
+    return BeanDefinitionBuilder.rootBeanDefinition(beanClass);
+  }
+
+  public static BeanDefinition parseEdmProvider(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder configuration = createBeanDefinitionBuilder(EDM_PROVIDER_CLASS);
+
+    // Schemas
+    List<Element> schemaElements = DomUtils.getChildElementsByTagName(
+        element, SCHEMA_ELEMENT);
+    if (schemaElements.size() > 0) {
+      ManagedList<BeanDefinition> schemaList = new ManagedList<BeanDefinition>(
+          schemaElements.size());
+      for (Element schemaElement : schemaElements) {
+        BeanDefinition schema = parseSchema(schemaElement,
+            parserContext);
+        schemaList.add(schema);
+      }
+      configuration.addPropertyValue(SCHEMA_LIST_PROPERTY, schemaList);
+    }
+
+    return configuration.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseSchema(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder schema = createBeanDefinitionBuilder(SCHEMA_CLASS);
+
+    String namespace = elementAttribute(element, NAMESPACE_ATTR);
+    schema.addPropertyValue(NAMESPACE_PROPERTY, namespace);
+    String alias = elementAttribute(element, ALIAS_ATTR);
+    if (alias != null && !alias.isEmpty()) {
+      schema.addPropertyValue(ALIAS_PROPERTY, alias);
+    }
+
+    // Entity container
+    List<Element> entityContainerElements = DomUtils
+        .getChildElementsByTagName(element, ENTITY_CONTAINER_ELEMENT);
+    if (entityContainerElements.size() == 1) {
+      Element entityContainerElement = entityContainerElements.get(0);
+      BeanDefinition entityContainer = parseEntityContainer(
+          entityContainerElement, namespace, parserContext);
+      schema.addPropertyValue(ENTITY_CONTAINER_PROPERTY, entityContainer);
+    }
+
+    // Entity types
+    List<Element> entityTypeElements = DomUtils.getChildElementsByTagName(
+        element, ENTITY_TYPE_ELEMENT);
+    if (entityTypeElements.size() > 0) {
+      List<BeanDefinition> entityTypeList = new ManagedList<BeanDefinition>(
+          entityTypeElements.size());
+      for (Element entityTypeElement : entityTypeElements) {
+        BeanDefinition entityType = parseEntityType(entityTypeElement,
+            parserContext);
+        entityTypeList.add(entityType);
+      }
+      schema.addPropertyValue(ENTITY_TYPE_LIST_PROPERTY, entityTypeList);
+    }
+
+    // Complex types
+    List<Element> complexTypeElements = DomUtils.getChildElementsByTagName(
+        element, COMPLEX_TYPE_ELEMENT);
+    if (complexTypeElements.size() > 0) {
+      ManagedList<BeanDefinition> complexTypeList = new ManagedList<BeanDefinition>(
+          complexTypeElements.size());
+      for (Element complexTypeElement : complexTypeElements) {
+        BeanDefinition complexType = parseComplexType(
+            complexTypeElement, parserContext);
+        complexTypeList.add(complexType);
+      }
+      schema.addPropertyValue(COMPLEX_TYPE_LIST_PROPERTY, complexTypeList);
+    }
+
+    return schema.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseEntityContainer(Element element,
+      String namespace, ParserContext parserContext) {
+    BeanDefinitionBuilder entityContainer = createBeanDefinitionBuilder(ENTITY_CONTAINER_CLASS);
+
+    // Name
+    entityContainer.addPropertyValue(NAME_PROPERTY, namespace
+        + "EntityContainer");
+
+    // Entity sets
+    List<Element> entitySetElements = DomUtils.getChildElementsByTagName(
+        element, ENTITY_SET_ELEMENT);
+    if (entitySetElements.size() > 0) {
+      ManagedList<BeanDefinition> entitySetList = new ManagedList<BeanDefinition>(
+          entitySetElements.size());
+      for (Element entitySetElement : entitySetElements) {
+        BeanDefinition entitySet = parseEntitySet(entitySetElement,
+            namespace, parserContext);
+        entitySetList.add(entitySet);
+      }
+      entityContainer.addPropertyValue(ENTITY_SET_LIST_PROPERTY,
+          entitySetList);
+    }
+
+    return entityContainer.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseEntitySet(Element element,
+      String namespace, ParserContext parserContext) {
+    BeanDefinitionBuilder entitySet = createBeanDefinitionBuilder(ENTITY_SET_CLASS);
+
+    String name = elementAttribute(element, NAME_ATTR);
+    String type = elementAttribute(element, TYPE_ATTR);
+    entitySet.addPropertyValue(NAME_PROPERTY, name);
+
+    BeanDefinitionBuilder fqn = createBeanDefinitionBuilder(FULL_QUALIFIED_NAME_CLASS);
+    fqn.addConstructorArgValue(namespace);
+    fqn.addConstructorArgValue(type);
+
+    entitySet.addPropertyValue(TYPE_PROPERTY, fqn.getBeanDefinition());
+
+    return entitySet.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseEntityType(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder entityType = createBeanDefinitionBuilder(ENTITY_TYPE_CLASS);
+
+    String propertyName = elementAttribute(element, NAME_ATTR);
+    entityType.addPropertyValue(NAME_PROPERTY, propertyName);
+
+    // Key
+    List<Element> keyElements = DomUtils.getChildElementsByTagName(element,
+        KEY_ELEMENT);
+    if (keyElements.size() > 0) {
+      ManagedList<BeanDefinition> keyList = new ManagedList<BeanDefinition>(
+          keyElements.size());
+      for (Element keyElement : keyElements) {
+        BeanDefinition key = parseKey(keyElement, parserContext);
+        keyList.add(key);
+      }
+      entityType.addPropertyValue(KEY_LIST_PROPERTY, keyList);
+    }
+
+    // Properties
+    List<Element> propertyElements = DomUtils.getChildElementsByTagName(
+        element, PROPERTY_ELEMENT);
+    if (propertyElements.size() > 0) {
+      ManagedList<BeanDefinition> entitySetList = new ManagedList<BeanDefinition>(
+          propertyElements.size());
+      for (Element propertyElement : propertyElements) {
+        BeanDefinition property = parseProperty(propertyElement,
+            parserContext);
+        entitySetList.add(property);
+      }
+      entityType.addPropertyValue(PROPERTY_LIST_PROPERTY, entitySetList);
+    }
+
+    return entityType.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseKey(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder property = createBeanDefinitionBuilder(PROPERTY_REF_CLASS);
+
+    String propertyName = elementAttribute(element, PROPERTY_NAME_ATTR);
+    property.addPropertyValue(PROPERTY_NAME_PROPERTY, propertyName);
+
+    return property.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseProperty(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder property = createBeanDefinitionBuilder(PROPERTY_CLASS);
+
+    String name = elementAttribute(element, NAME_ATTR);
+    String type = elementAttribute(element, TYPE_ATTR);
+    property.addPropertyValue(NAME_PROPERTY, name);
+    property.addPropertyValue(TYPE_PROPERTY, type);
+
+    return property.getBeanDefinition();
+  }
+
+  private static BeanDefinition parseComplexType(Element complexTypeElement,
+      ParserContext parserContext) {
+    // TODO to be implemented
+    return null;
+  }
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmProviderBeanDefinitionParser.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmProviderBeanDefinitionParser.java
new file mode 100644
index 0000000..e152a11
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoEdmProviderBeanDefinitionParser.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.w3c.dom.Element;
+
+public class OlingoEdmProviderBeanDefinitionParser extends AbstractBeanDefinitionParser {
+
+	@Override
+	protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
+		BeanDefinition configuration = OlingoEdmBeanDefinitionHelper.parseEdmProvider(element, parserContext);
+		return (AbstractBeanDefinition) configuration;
+	}
+
+
+}
\ No newline at end of file
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHandlerBeanDefinitionHelper.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHandlerBeanDefinitionHelper.java
new file mode 100644
index 0000000..ab4f89d
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHandlerBeanDefinitionHelper.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import java.util.List;
+
+import org.apache.olingo.ext.config.spring.factory.EdmxReferenceFactoryBean;
+import org.apache.olingo.ext.config.spring.factory.ODataFactoryBean;
+import org.apache.olingo.ext.config.spring.factory.ODataHttpHandlerFactoryBean;
+import org.apache.olingo.ext.config.spring.factory.ServiceMetadataFactoryBean;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.RuntimeBeanReference;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.ManagedList;
+import org.springframework.beans.factory.support.ManagedMap;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.springframework.util.xml.DomUtils;
+import org.w3c.dom.Element;
+
+public abstract class OlingoHandlerBeanDefinitionHelper {
+
+  private static final Class<?> ODATA_FACTORY_BEAN_CLASS = ODataFactoryBean.class;
+  private static final Class<?> HTTP_HANDLER_FACTORY_BEAN_CLASS = ODataHttpHandlerFactoryBean.class;
+  private static final Class<?> SERVICE_METADATA_FACTORY_BEAN_CLASS = ServiceMetadataFactoryBean.class;
+  private static final Class<?> EDMX_REFERENCE_FACTORY_BEAN = EdmxReferenceFactoryBean.class;
+
+  private static final String REFERENCE_ELEMENT = "reference";
+  private static final String PROCESSOR_ELEMENT = "processor";
+  private static final String INCLUDE_ELEMENT = "include";
+
+  private static final String EDM_PROVIDER_ATTR = "edm-provider";
+  private static final String REF_ATTR = "ref";
+  private static final String URI_ATTR = "uri";
+  private static final String KEY_ATTR = "key";
+  private static final String VALUE_ATTR = "value";
+
+  private static final String ODATA_PROPERTY = "odata";
+  private static final String SERVICE_METADATA_PROPERTY = "serviceMetadata";
+  private static final String REFERENCES_LIST_PROPERTY = "references";
+  private static final String PROCESSORS_LIST_PROPERTY = "processors";
+  private static final String EDM_PROVIDER_PROPERTY = "edmProvider";
+  private static final String URI_PROPERTY = "uri";
+  private static final String INCLUDES_PROPERTY = "includes";
+
+  private static String elementAttribute(Element element, String name) {
+    String value = element.getAttribute(name);
+    return value.length() == 0 ? null : value;
+  }
+
+  private static BeanDefinitionBuilder createBeanDefinitionBuilder(
+      Class<?> beanClass) {
+    return BeanDefinitionBuilder.rootBeanDefinition(beanClass);
+  }
+
+  public static BeanDefinition parseHttpHandler(Element element,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder httpHandler = createBeanDefinitionBuilder(HTTP_HANDLER_FACTORY_BEAN_CLASS);
+
+    // OData
+    BeanDefinitionBuilder odataBuilder = createBeanDefinitionBuilder(ODATA_FACTORY_BEAN_CLASS);
+    BeanDefinition odata = odataBuilder.getBeanDefinition();
+
+    httpHandler.addPropertyValue(ODATA_PROPERTY, odata);
+
+    // ServiceMetadata
+    BeanDefinitionBuilder serviceMetadata =
+        createBeanDefinitionBuilder(SERVICE_METADATA_FACTORY_BEAN_CLASS);
+    serviceMetadata.addPropertyValue(ODATA_PROPERTY, odata);
+
+    String edmProviderRef = elementAttribute(element, EDM_PROVIDER_ATTR);
+    serviceMetadata.addPropertyValue(EDM_PROVIDER_PROPERTY,
+        new RuntimeBeanReference(edmProviderRef));
+
+    // References
+    List<Element> referenceElements = DomUtils.getChildElementsByTagName(
+        element, REFERENCE_ELEMENT);
+    if (referenceElements.size() > 0) {
+      ManagedList<BeanDefinition> referenceList = new ManagedList<BeanDefinition>(
+          referenceElements.size());
+      for (Element referenceElement : referenceElements) {
+        BeanDefinition reference = parseReference(referenceElement,
+            parserContext);
+        referenceList.add(reference);
+      }
+      serviceMetadata.addPropertyValue(REFERENCES_LIST_PROPERTY,
+          referenceList);
+    }
+
+    httpHandler.addPropertyValue(SERVICE_METADATA_PROPERTY,
+        serviceMetadata.getBeanDefinition());
+
+    // Processors
+    List<Element> processorElements = DomUtils.getChildElementsByTagName(
+        element, PROCESSOR_ELEMENT);
+    if (processorElements.size() > 0) {
+      ManagedList<RuntimeBeanReference> processorList = new ManagedList<RuntimeBeanReference>(
+          processorElements.size());
+      for (Element processorElement : processorElements) {
+        RuntimeBeanReference processorRef = parseProcessor(
+            processorElement, parserContext);
+        processorList.add(processorRef);
+      }
+      httpHandler.addPropertyValue(PROCESSORS_LIST_PROPERTY,
+          processorList);
+    }
+
+    AbstractBeanDefinition configurationDef = httpHandler
+        .getBeanDefinition();
+    return configurationDef;
+  }
+
+  private static BeanDefinition parseReference(Element referenceElement,
+      ParserContext parserContext) {
+    BeanDefinitionBuilder reference = createBeanDefinitionBuilder(EDMX_REFERENCE_FACTORY_BEAN);
+
+    String uri = elementAttribute(referenceElement, URI_ATTR);
+    reference.addPropertyValue(URI_PROPERTY, uri);
+
+    // Processors
+    List<Element> includeElements = DomUtils.getChildElementsByTagName(
+        referenceElement, INCLUDE_ELEMENT);
+    if (includeElements.size() > 0) {
+      ManagedMap<String, String> includeMap = new ManagedMap<String, String>(
+          includeElements.size());
+      for (Element includeElement : includeElements) {
+        String key = elementAttribute(includeElement, KEY_ATTR);
+        String value = elementAttribute(includeElement, VALUE_ATTR);
+        includeMap.put(key, value);
+      }
+      reference.addPropertyValue(INCLUDES_PROPERTY, includeMap);
+    }
+
+    return reference.getBeanDefinition();
+  }
+
+  private static RuntimeBeanReference parseProcessor(
+      Element processorElement, ParserContext parserContext) {
+    String ref = elementAttribute(processorElement, REF_ATTR);
+    return new RuntimeBeanReference(ref);
+  }
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHttpHandlerBeanDefinitionParser.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHttpHandlerBeanDefinitionParser.java
new file mode 100644
index 0000000..5719b9b
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoHttpHandlerBeanDefinitionParser.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.w3c.dom.Element;
+
+public class OlingoHttpHandlerBeanDefinitionParser extends AbstractBeanDefinitionParser {
+
+  @Override
+  protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
+    BeanDefinition configuration = OlingoHandlerBeanDefinitionHelper.parseHttpHandler(element, parserContext);
+    return (AbstractBeanDefinition) configuration;
+  }
+}
\ No newline at end of file
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoNamespaceHandler.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoNamespaceHandler.java
new file mode 100644
index 0000000..1450bc5
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/OlingoNamespaceHandler.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
+
+/**
+ * Dedicated Spring namespace handler for Olingo. This namespace is directly
+ * usable within a Spring application context.
+ * 
+ * This namespace can be configured in Spring XML configuration files using
+ * standard mechanisms of XML namespace, as following:
+ * 
+ * &lt;beans xmlns="http://www.springframework.org/schema/beans"
+ *     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ *     xmlns:olingo="http://olingo.apache.org/schema/olingo/spring-olingo"
+ *     xsi:schemaLocation="http://www.springframework.org/schema/beans
+ *         http://www.springframework.org/schema/beans/spring-beans.xsd
+ *       http://olingo.apache.org/schema/olingo/spring-olingo
+ *         http://olingo.apache.org/schema/olingo/spring-olingo.xsd"&gt;
+ *   (...)
+ * &lt;/beans&gt;
+ * 
+ * @author Thierry Templier
+ */
+public class OlingoNamespaceHandler extends NamespaceHandlerSupport {
+
+	public static final String EDM_PROVIDER_ELEMENT = "edm-provider";
+
+	public static final String HTTP_HANDLER_ELEMENT = "http-handler";
+
+	/**
+	 * Registers bean definition parsers for the olingo namespace.
+	 * 
+	 * @see OlingoEdmProviderBeanDefinitionParser
+	 * @see OlingoHttpHandlerBeanDefinitionParser
+	 */
+	public void init() {
+		registerBeanDefinitionParser(EDM_PROVIDER_ELEMENT,
+				new OlingoEdmProviderBeanDefinitionParser());
+		registerBeanDefinitionParser(HTTP_HANDLER_ELEMENT,
+				new OlingoHttpHandlerBeanDefinitionParser());
+	}
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/FullQualifiedNameConverter.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/FullQualifiedNameConverter.java
new file mode 100644
index 0000000..25c61b0
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/FullQualifiedNameConverter.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.editor;
+
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.springframework.core.convert.converter.Converter;
+
+public class FullQualifiedNameConverter implements Converter<FullQualifiedName, String>{
+  @Override
+  public String convert(FullQualifiedName fullQualifiedName) {
+    return fullQualifiedName.getFullQualifiedNameAsString();
+  }
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/ToFullQualifiedNameConverter.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/ToFullQualifiedNameConverter.java
new file mode 100644
index 0000000..c92d5f9
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/editor/ToFullQualifiedNameConverter.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.editor;
+
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.springframework.core.convert.converter.Converter;
+
+public class ToFullQualifiedNameConverter implements Converter<String, FullQualifiedName> {
+  @Override
+  public FullQualifiedName convert(String s) {
+    return new FullQualifiedName(s);
+  }
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/EdmxReferenceFactoryBean.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/EdmxReferenceFactoryBean.java
new file mode 100644
index 0000000..d4f7774
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/EdmxReferenceFactoryBean.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.factory;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.olingo.server.api.edmx.EdmxReference;
+import org.apache.olingo.server.api.edmx.EdmxReferenceInclude;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.InitializingBean;
+
+public class EdmxReferenceFactoryBean implements FactoryBean<EdmxReference>,
+		InitializingBean {
+	private String uri;
+	private Map<String, String> includes;
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (uri == null) {
+			throw new IllegalArgumentException("The property uri is required.");
+		}
+	}
+
+	@Override
+	public EdmxReference getObject() throws Exception {
+		EdmxReference reference = new EdmxReference(URI.create(uri));
+		if (includes != null) {
+			for (Entry<String, String> include : includes.entrySet()) {
+				reference.addInclude(new EdmxReferenceInclude(include.getKey(),
+						include.getValue()));
+			}
+		}
+		return reference;
+	}
+
+	@Override
+	public Class<?> getObjectType() {
+		return EdmxReference.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+	public String getUri() {
+		return uri;
+	}
+
+	public void setUri(String uri) {
+		this.uri = uri;
+	}
+
+	public Map<String, String> getIncludes() {
+		return includes;
+	}
+
+	public void setIncludes(Map<String, String> includes) {
+		this.includes = includes;
+	}
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataFactoryBean.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataFactoryBean.java
new file mode 100644
index 0000000..d1e0e3a
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataFactoryBean.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.factory;
+
+import org.apache.olingo.server.api.OData;
+import org.springframework.beans.factory.FactoryBean;
+
+public class ODataFactoryBean implements FactoryBean<OData> {
+
+	@Override
+	public OData getObject() throws Exception {
+		return OData.newInstance();
+	}
+
+	@Override
+	public Class<?> getObjectType() {
+		return OData.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataHttpHandlerFactoryBean.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataHttpHandlerFactoryBean.java
new file mode 100644
index 0000000..c0f846b
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ODataHttpHandlerFactoryBean.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.factory;
+
+import java.util.List;
+
+import org.apache.olingo.server.api.OData;
+import org.apache.olingo.server.api.ODataHttpHandler;
+import org.apache.olingo.server.api.ServiceMetadata;
+import org.apache.olingo.server.api.processor.Processor;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.InitializingBean;
+
+public class ODataHttpHandlerFactoryBean implements
+		FactoryBean<ODataHttpHandler>, InitializingBean {
+	private OData odata;
+	private ServiceMetadata serviceMetadata;
+	private List<Processor> processors;
+
+	@Override
+	public ODataHttpHandler getObject() throws Exception {
+		ODataHttpHandler handler = odata.createHandler(serviceMetadata);
+		if (processors != null) {
+			for (Processor processor : processors) {
+				handler.register(processor);
+			}
+		}
+		return handler;
+	}
+
+	@Override
+	public Class<?> getObjectType() {
+		return ODataHttpHandler.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (odata == null) {
+			throw new IllegalArgumentException(
+					"The property odata is required.");
+		}
+
+		if (serviceMetadata == null) {
+			throw new IllegalArgumentException(
+					"The property serviceMetadata is required.");
+		}
+	}
+
+	public OData getOdata() {
+		return odata;
+	}
+
+	public void setOdata(OData odata) {
+		this.odata = odata;
+	}
+
+	public ServiceMetadata getServiceMetadata() {
+		return serviceMetadata;
+	}
+
+	public void setServiceMetadata(ServiceMetadata serviceMetadata) {
+		this.serviceMetadata = serviceMetadata;
+	}
+
+	public List<Processor> getProcessors() {
+		return processors;
+	}
+
+	public void setProcessors(List<Processor> processors) {
+		this.processors = processors;
+	}
+
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ServiceMetadataFactoryBean.java b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ServiceMetadataFactoryBean.java
new file mode 100644
index 0000000..52e41e4
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/config/spring/factory/ServiceMetadataFactoryBean.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring.factory;
+
+import java.util.List;
+
+import org.apache.olingo.server.api.OData;
+import org.apache.olingo.server.api.ServiceMetadata;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.server.api.edmx.EdmxReference;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.InitializingBean;
+
+public class ServiceMetadataFactoryBean implements
+		FactoryBean<ServiceMetadata>, InitializingBean {
+	private OData odata;
+	private CsdlEdmProvider edmProvider;
+	private List<EdmxReference> references;
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (odata == null) {
+			throw new IllegalArgumentException(
+					"The property odata is required.");
+		}
+
+		if (edmProvider == null) {
+			throw new IllegalArgumentException(
+					"The property edmProvider is required.");
+		}
+
+		if (references == null) {
+			throw new IllegalArgumentException(
+					"The property references is required.");
+		}
+	}
+
+	@Override
+	public ServiceMetadata getObject() throws Exception {
+		return odata.createServiceMetadata(edmProvider, references);
+	}
+
+	@Override
+	public Class<?> getObjectType() {
+		return ServiceMetadata.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+	public OData getOdata() {
+		return odata;
+	}
+
+	public void setOdata(OData odata) {
+		this.odata = odata;
+	}
+
+	public CsdlEdmProvider getEdmProvider() {
+		return edmProvider;
+	}
+
+	public void setEdmProvider(CsdlEdmProvider edmProvider) {
+		this.edmProvider = edmProvider;
+	}
+
+	public List<EdmxReference> getReferences() {
+		return references;
+	}
+
+	public void setReferences(List<EdmxReference> references) {
+		this.references = references;
+	}
+}
diff --git a/ext/spring/src/main/java/org/apache/olingo/ext/spring/OlingoSpringServlet.java b/ext/spring/src/main/java/org/apache/olingo/ext/spring/OlingoSpringServlet.java
new file mode 100644
index 0000000..981bcfe
--- /dev/null
+++ b/ext/spring/src/main/java/org/apache/olingo/ext/spring/OlingoSpringServlet.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.spring;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.http.HttpStatus;
+import org.apache.olingo.server.api.ODataHttpHandler;
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class OlingoSpringServlet extends HttpServlet {
+
+	private ApplicationContext context;
+
+	private ODataHttpHandler httpHandler;
+
+	protected ODataHttpHandler getHttpHandler() throws ServletException {
+		Map<String, ODataHttpHandler> odatas = context
+				.getBeansOfType(ODataHttpHandler.class);
+		if (odatas.size() == 1) {
+			return odatas.values().iterator().next();
+		}
+
+		throw new ServletException(
+				"No OData HTTP handler can be found in the Spring container.");
+	}
+
+	protected ApplicationContext initializeApplicationContext(ServletConfig config)
+			throws ServletException {
+		WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(config
+				.getServletContext());
+
+		if (context==null) {
+			throw new ServletException(
+				"No Spring container is configured within the Web application.");
+		}
+		
+		return context;
+	}
+
+	@Override
+	public void init(ServletConfig config) throws ServletException {
+		super.init();
+
+		context = initializeApplicationContext(config);
+
+		httpHandler = getHttpHandler();
+	}
+
+	@Override
+	protected void service(final HttpServletRequest req,
+			final HttpServletResponse resp) throws ServletException,
+			IOException {
+		System.err.println(">> service - begin - req = "+req.getRequestURL());
+		try {
+			httpHandler.process(req, resp);
+		} catch (RuntimeException e) {
+			// TODO: to be improved
+			throw new ServletException(e);
+		}
+		System.err.println(">> service - end");
+	}
+
+}
diff --git a/ext/spring/src/main/resources/META-INF/spring.handlers b/ext/spring/src/main/resources/META-INF/spring.handlers
new file mode 100644
index 0000000..5c583c5
--- /dev/null
+++ b/ext/spring/src/main/resources/META-INF/spring.handlers
@@ -0,0 +1 @@
+http\://olingo.apache.org/schema/olingo4=org.apache.olingo.ext.config.spring.OlingoNamespaceHandler
\ No newline at end of file
diff --git a/ext/spring/src/main/resources/META-INF/spring.schemas b/ext/spring/src/main/resources/META-INF/spring.schemas
new file mode 100644
index 0000000..166f5e5
--- /dev/null
+++ b/ext/spring/src/main/resources/META-INF/spring.schemas
@@ -0,0 +1 @@
+http\://olingo.apache.org/schema/configuration/olingo4.xsd=schemas/configuration/olingo4.xsd
\ No newline at end of file
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoEdmProviderWithoutNamespaceTest.java b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoEdmProviderWithoutNamespaceTest.java
new file mode 100644
index 0000000..8bc0092
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoEdmProviderWithoutNamespaceTest.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class SpringOlingoEdmProviderWithoutNamespaceTest {
+	@Test
+	public void testLaunchSpring() {
+		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+				"/applicationContext-edm-provider-beans.xml");
+		try {
+			CsdlEdmProvider edmProvider = (CsdlEdmProvider) context
+					.getBean("edmProvider");
+			Assert.assertNotNull(edmProvider);
+			try {
+				CsdlEntityContainer entityContainer = edmProvider.getEntityContainer();
+				Assert.assertNotNull(entityContainer);
+				Assert.assertNotNull(entityContainer.getEntitySets());
+				Assert.assertEquals(1, entityContainer.getEntitySets().size());
+
+				List<CsdlSchema> schemas = edmProvider.getSchemas();
+				Assert.assertNotNull(schemas);
+				Assert.assertEquals(1, schemas.size());
+
+				CsdlSchema schema = schemas.get(0);
+				Assert.assertEquals("test", schema.getNamespace());
+				
+				List<CsdlEntityType> entityTypes = schema.getEntityTypes();
+				Assert.assertNotNull(entityTypes);
+				Assert.assertEquals(1, entityTypes.size());
+
+				CsdlEntityType entityType = entityTypes.get(0);
+				Assert.assertEquals("sources1", entityType.getName());
+				
+				
+				List<CsdlProperty> properties = entityType.getProperties();
+				Assert.assertNotNull(properties);
+				Assert.assertEquals(1, properties.size());
+				CsdlProperty property0 = properties.get(0);
+				Assert.assertEquals("field1", property0.getName());
+				Assert.assertEquals("Edm.String", property0.getType().toString());
+				
+				List<CsdlPropertyRef> key = entityType.getKey();
+				Assert.assertNotNull(key);
+				Assert.assertEquals(1, key.size());
+				CsdlPropertyRef key0 = key.get(0);
+				Assert.assertEquals("field1", key0.getName());
+			} catch (ODataException ex) {
+				ex.printStackTrace();
+			}
+		} finally {
+			if (context != null) {
+				context.close();
+			}
+		}
+	}
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoHttpHandlerWithoutNamespaceTest.java b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoHttpHandlerWithoutNamespaceTest.java
new file mode 100644
index 0000000..af041b2
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoHttpHandlerWithoutNamespaceTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.apache.olingo.server.api.ODataHttpHandler;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class SpringOlingoHttpHandlerWithoutNamespaceTest {
+	@Test
+	public void testLaunchSpring() {
+		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+				"/applicationContext-http-handler-beans.xml");
+		try {
+			ODataHttpHandler httpHandler = (ODataHttpHandler) context
+					.getBean("httpHandler");
+			Assert.assertNotNull(httpHandler);
+		} finally {
+			if (context != null) {
+				context.close();
+			}
+		}
+	}
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceEdmProviderTest.java b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceEdmProviderTest.java
new file mode 100644
index 0000000..05d18ac
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceEdmProviderTest.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class SpringOlingoNamespaceEdmProviderTest {
+	@Test
+	public void testLaunchSpring() {
+		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+				"/applicationContext-edm-provider-namespace.xml");
+		try {
+			CsdlEdmProvider edmProvider = (CsdlEdmProvider) context
+					.getBean("edmProvider");
+			Assert.assertNotNull(edmProvider);
+			try {
+				CsdlEntityContainer entityContainer = edmProvider.getEntityContainer();
+				Assert.assertNotNull(entityContainer);
+				Assert.assertNotNull(entityContainer.getEntitySets());
+				Assert.assertEquals(1, entityContainer.getEntitySets().size());
+				
+				List<CsdlSchema> schemas = edmProvider.getSchemas();
+				Assert.assertNotNull(schemas);
+				Assert.assertEquals(1, schemas.size());
+
+				CsdlSchema schema = schemas.get(0);
+				Assert.assertEquals("test", schema.getNamespace());
+				
+				List<CsdlEntityType> entityTypes = schema.getEntityTypes();
+				Assert.assertNotNull(entityTypes);
+				Assert.assertEquals(1, entityTypes.size());
+
+				CsdlEntityType entityType = entityTypes.get(0);
+				Assert.assertEquals("sources1", entityType.getName());
+				
+				List<CsdlProperty> properties = entityType.getProperties();
+				Assert.assertNotNull(properties);
+				Assert.assertEquals(6, properties.size());
+				// field #0
+				CsdlProperty property0 = properties.get(0);
+				Assert.assertEquals("field1", property0.getName());
+				Assert.assertEquals("Edm.String", property0.getType().toString());
+				// field #1
+				CsdlProperty property1 = properties.get(1);
+				Assert.assertEquals("field2", property1.getName());
+				Assert.assertEquals("Edm.Int32", property1.getType().toString());
+				// field #2
+				CsdlProperty property2 = properties.get(2);
+				Assert.assertEquals("field3", property2.getName());
+				Assert.assertEquals("Edm.Int64", property2.getType().toString());
+				// field #3
+				CsdlProperty property3 = properties.get(3);
+				Assert.assertEquals("field4", property3.getName());
+				Assert.assertEquals("Edm.Double", property3.getType().toString());
+				// field #4
+				CsdlProperty property4 = properties.get(4);
+				Assert.assertEquals("field5", property4.getName());
+				Assert.assertEquals("Edm.Double", property4.getType().toString());
+				// field #5
+				CsdlProperty property5 = properties.get(5);
+				Assert.assertEquals("field6", property5.getName());
+				Assert.assertEquals("Edm.Boolean", property5.getType().toString());
+				
+				List<CsdlPropertyRef> key = entityType.getKey();
+				Assert.assertNotNull(key);
+				Assert.assertEquals(1, key.size());
+				CsdlPropertyRef key0 = key.get(0);
+				Assert.assertEquals("field1", key0.getName());
+			} catch (ODataException ex) {
+				ex.printStackTrace();
+			}
+		} finally {
+			if (context != null) {
+				context.close();
+			}
+		}
+	}
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceHttpHandlerTest.java b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceHttpHandlerTest.java
new file mode 100644
index 0000000..0036c61
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/SpringOlingoNamespaceHttpHandlerTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.apache.olingo.server.api.ODataHttpHandler;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class SpringOlingoNamespaceHttpHandlerTest {
+	@Test
+	public void testLaunchSpring() {
+		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+				"/applicationContext-http-handler-namespace.xml");
+		try {
+			ODataHttpHandler httpHandler = (ODataHttpHandler) context
+					.getBean("httpHandler");
+			Assert.assertNotNull(httpHandler);
+		} finally {
+			if (context != null) {
+				context.close();
+			}
+		}
+	}
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/TestProcessor.java b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/TestProcessor.java
new file mode 100644
index 0000000..5475341
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/config/spring/TestProcessor.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.config.spring;
+
+import org.apache.olingo.server.api.OData;
+import org.apache.olingo.server.api.ServiceMetadata;
+import org.apache.olingo.server.api.processor.Processor;
+
+public class TestProcessor implements Processor {
+
+	@Override
+	public void init(OData arg0, ServiceMetadata arg1) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/OlingoSpringTestServlet.java b/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/OlingoSpringTestServlet.java
new file mode 100644
index 0000000..e0357b3
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/OlingoSpringTestServlet.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.spring.integration;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+
+import org.apache.olingo.ext.spring.OlingoSpringServlet;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class OlingoSpringTestServlet extends OlingoSpringServlet {
+
+	@Override
+	protected ApplicationContext initializeApplicationContext(ServletConfig config)
+			throws ServletException {
+		return new ClassPathXmlApplicationContext("/applicationContext-namespace.xml");
+	}
+
+}
diff --git a/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/SpringOlingoNamespaceIntegrationTest.java b/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/SpringOlingoNamespaceIntegrationTest.java
new file mode 100644
index 0000000..e0e2f95
--- /dev/null
+++ b/ext/spring/src/test/java/org/apache/olingo/ext/spring/integration/SpringOlingoNamespaceIntegrationTest.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.ext.spring.integration;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest;
+import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.domain.ClientServiceDocument;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmComplexType;
+import org.apache.olingo.commons.api.edm.EdmEntityType;
+import org.apache.olingo.commons.api.edm.EdmSchema;
+import org.eclipse.jetty.http.HttpStatus;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class SpringOlingoNamespaceIntegrationTest {
+	private static Server server;
+  private static ServletHolder GET_VOCABULARIES_SERVLET = new ServletHolder(new HttpServlet() {
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+      if("/Org.OData.Core.V1.xml".equals(req.getPathInfo())) {
+        resp.setStatus(HttpStatus.OK_200);
+        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("Org.OData.Core.V1.xml");
+        copy(is, resp.getOutputStream());
+      } else {
+        resp.setStatus(HttpStatus.EXPECTATION_FAILED_417);
+      }
+    }
+  });
+
+	private static void configureAndStartupEmbeddedWebServer(Class<? extends HttpServlet> odataServletClass)
+			throws Exception {
+		server = startupEmbeddedWebServer();
+		ServletHandler handler = (ServletHandler) server.getHandler();
+        handler.addServletWithMapping(odataServletClass, "/odata.svc/*");
+    handler.addServletWithMapping(GET_VOCABULARIES_SERVLET, "/v4.0/cs02/vocabularies/*");
+        server.start();
+	}
+
+  private static void copy(InputStream is, OutputStream os) throws IOException {
+    byte[] buffer = new byte[1024];
+    int readCount;
+    while((readCount = is.read(buffer)) >= 0) {
+      os.write(buffer, 0, readCount);
+    }
+
+    os.flush();
+  }
+
+	private static Server startupEmbeddedWebServer() throws Exception {
+		Server server = new Server(8080);
+		ServletHandler handler = new ServletHandler();
+        server.setHandler(handler);
+		//server.start();
+        
+		return server;
+	}
+	
+	private static void shutdownEmbeddedWebServer() throws Exception {
+		if (server!=null) {
+			server.stop();
+	        server.join();
+	        server.destroy();
+		}
+	}
+
+	@BeforeClass
+	public static void setUp() throws Exception {
+		configureAndStartupEmbeddedWebServer(OlingoSpringTestServlet.class);
+	}
+	
+	@AfterClass
+	public static void tearDown() throws Exception {
+		shutdownEmbeddedWebServer();
+	}
+
+	//@Test
+	public void testServiceDocument() {
+		String serviceRoot = "http://localhost:8080/odata.svc";
+
+		ODataClient client = ODataClientFactory.getClient();
+		ODataServiceDocumentRequest req =
+	        client.getRetrieveRequestFactory().getServiceDocumentRequest(serviceRoot);
+		req.setContentType("application/json;odata.metadata=minimal");
+		req.setAccept("application/json;odata.metadata=minimal");
+		ODataRetrieveResponse<ClientServiceDocument> res = req.execute();
+		
+		ClientServiceDocument serviceDocument = res.getBody();
+
+		Collection<String> entitySetNames = serviceDocument.getEntitySetNames();
+		Assert.assertEquals(1, entitySetNames.size());
+		String entitySetName = entitySetNames.iterator().next();
+		Assert.assertEquals("sources1", entitySetName);
+
+		Map<String,URI> entitySets = serviceDocument.getEntitySets();
+		Assert.assertEquals(1, entitySets.size());
+		Entry<String, URI> entitySet = entitySets.entrySet().iterator().next();
+		Assert.assertEquals("sources1", entitySet.getKey());
+		Assert.assertEquals("http://localhost:8080/odata.svc/sources1", entitySet.getValue().toString());
+
+		Map<String,URI> singletons = serviceDocument.getSingletons();
+		Assert.assertEquals(0, singletons.size());
+
+		Map<String,URI> functionImports = serviceDocument.getFunctionImports();
+		Assert.assertEquals(0, functionImports.size());
+	}
+
+	@Test
+	public void testMetadata() throws InterruptedException {
+        //Thread.sleep(60000);
+		String serviceRoot = "http://localhost:8080/odata.svc";
+    // http://localhost:8080/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml
+
+		ODataClient client = ODataClientFactory.getClient();
+		EdmMetadataRequest request =
+	        client.getRetrieveRequestFactory().getMetadataRequest(serviceRoot);
+		ODataRetrieveResponse<Edm> response = request.execute();
+		
+		Edm edm = response.getBody();
+		
+		List<EdmSchema> schemas = edm.getSchemas();
+		for (EdmSchema schema : schemas) {
+			System.out.println(schema.getNamespace());
+			System.out.println(">> schema.getComplexTypes() size = "+schema.getComplexTypes().size());
+			for (EdmComplexType complexType : schema.getComplexTypes()) {
+				System.out.println("- complex type = "+complexType);
+			}
+			System.out.println(">> schema.getEntityTypes() size = "+schema.getEntityTypes().size());
+			for (EdmEntityType entityType : schema.getEntityTypes()) {
+				System.out.println("- entity type = "+entityType);
+				System.out.println("    >> qn = "+entityType.getFullQualifiedName());
+			}
+		}
+		
+		//edm.get
+    // TODO: check model
+//		EdmEntityType customerType = edm.getEntityType(
+//	            new FullQualifiedName("NorthwindModel", "Order"));
+//		List<String> propertyNames = customerType.getPropertyNames();
+//		for (String propertyName : propertyNames) {
+//			System.out.println(" - propertyName = "+propertyName);
+//			EdmProperty property = customerType.getStructuralProperty(propertyName);
+//			FullQualifiedName typeName = property.getType().getFullQualifiedName();
+//			System.out.println("   - type name = "+typeName);
+//		}
+	}
+}
diff --git a/ext/spring/src/test/resources/Org.OData.Core.V1.xml b/ext/spring/src/test/resources/Org.OData.Core.V1.xml
new file mode 100644
index 0000000..a7a6b91
--- /dev/null
+++ b/ext/spring/src/test/resources/Org.OData.Core.V1.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
+  <edmx:DataServices>
+    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Org.OData.Core.V1" Alias="Core">
+      <Annotation Term="Core.Description">
+        <String>Core terms needed to write vocabularies</String>
+      </Annotation>
+
+      <!--Documentation -->
+
+      <Term Name="Description" Type="Edm.String">
+        <Annotation Term="Core.Description" String="A brief description of a model element" />
+        <Annotation Term="Core.IsLanguageDependent" />
+      </Term>
+
+      <Term Name="LongDescription" Type="Edm.String">
+        <Annotation Term="Core.Description" String="A lengthy description of a model element" />
+        <Annotation Term="Core.IsLanguageDependent" />
+      </Term>
+
+      <!-- Localization -->
+
+      <Term Name="IsLanguageDependent" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term">
+        <Annotation Term="Core.Description" String="Properties and terms annotated with this term are language-dependent" />
+        <Annotation Term="Core.RequiresType" String="Edm.String" />
+      </Term>
+
+      <!-- Term Restrictions -->
+
+      <TypeDefinition Name="Tag" UnderlyingType="Edm.Boolean">
+        <Annotation Term="Core.Description" String="This is the type to use for all tagging terms" />
+      </TypeDefinition>
+
+      <Term Name="RequiresType" Type="Edm.String" AppliesTo="Term">
+        <Annotation Term="Core.Description"
+          String="Properties and terms annotated with this annotation MUST have a type that is identical to or derived from the given type name" />
+      </Term>
+
+      <!--Resource Paths -->
+
+      <Term Name="ResourcePath" Type="Edm.String" AppliesTo="EntitySet Singleton ActionImport FunctionImport">
+        <Annotation Term="Core.Description"
+          String="Resource path for entity container child, can be relative to xml:base and the request URL" />
+        <Annotation Term="Core.IsUrl" />
+      </Term>
+
+      <Term Name="DereferenceableIDs" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer">
+        <Annotation Term="Core.Description" String="Entity-ids are URLs that locate the identified entity" />
+      </Term>
+
+      <Term Name="ConventionalIDs" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer">
+        <Annotation Term="Core.Description" String="Entity-ids follow OData URL conventions" />
+      </Term>
+
+      <!-- Permissions -->
+
+      <Term Name="Permissions" Type="Core.Permission" AppliesTo="Property">
+        <Annotation Term="Core.Description" String="Permissions available for a property.The value of 2 is reserved for future use." />
+      </Term>
+      <EnumType Name="Permission" IsFlags="true">
+        <Member Name="None" Value="0" />
+        <Member Name="Read" Value="1" />
+        <Member Name="ReadWrite" Value="3" />
+      </EnumType>
+
+      <!-- Metadata Extensions -->
+
+      <Term Name="Immutable" Type="Core.Tag" DefaultValue="true" AppliesTo="Property">
+        <Annotation Term="Core.Description"
+          String="A value for this non-key property can be provided on insert and remains unchanged on update" />
+      </Term>
+
+      <Term Name="Computed" Type="Core.Tag" DefaultValue="true" AppliesTo="Property">
+        <Annotation Term="Core.Description" String="A value for this property is generated on both insert and update" />
+      </Term>
+
+      <Term Name="IsURL" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term">
+        <Annotation Term="Core.Description" String="Properties and terms annotated with this term MUST contain a valid URL" />
+        <Annotation Term="Core.RequiresType" String="Edm.String" />
+      </Term>
+
+      <Term Name="AcceptableMediaTypes" Type="Collection(Edm.String)" AppliesTo="EntityType Property">
+        <Annotation Term="Core.Description"
+          String="Lists the MIME types acceptable for the annotated entity type marked with HasStream=&quot;true&quot; or the annotated stream property" />
+        <Annotation Term="Core.IsMediaType" />
+      </Term>
+
+      <Term Name="MediaType" Type="Edm.String" AppliesTo="Property">
+        <Annotation Term="Core.IsMediaType" />
+        <Annotation Term="Core.RequiresType" String="Edm.Binary" />
+      </Term>
+
+      <Term Name="IsMediaType" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term">
+        <Annotation Term="Core.Description" String="Properties and terms annotated with this term MUST contain a valid MIME type" />
+        <Annotation Term="Core.RequiresType" String="Edm.String" />
+      </Term>
+
+      <Term Name="OptimisticConcurrency" Type="Collection(Edm.PropertyPath)" AppliesTo="EntitySet">
+        <Annotation Term="Core.Description"
+          String="Data modification requires the use of Etags. A non-empty collection contains the set of properties that are used to compute the ETag" />
+      </Term>
+
+    </Schema>
+  </edmx:DataServices>
+</edmx:Edmx>
\ No newline at end of file
diff --git a/ext/spring/src/test/resources/applicationContext-edm-provider-beans.xml b/ext/spring/src/test/resources/applicationContext-edm-provider-beans.xml
new file mode 100644
index 0000000..8bd549d
--- /dev/null
+++ b/ext/spring/src/test/resources/applicationContext-edm-provider-beans.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:olingo="http://olingo.apache.org/schema/olingo4"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo4
+                http://olingo.apache.org/schema/configuration/olingo4.xsd">
+
+	<!--
+	<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+		<property name="customEditors">
+			<map>
+				<entry key="org.apache.olingo.commons.api.edm.FullQualifiedName"
+					value="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameEditor" />
+			</map>
+		</property>
+	</bean>
+	-->
+
+	<bean id="conversionService"
+				class="org.springframework.context.support.ConversionServiceFactoryBean">
+		<property name="converters">
+			<set>
+				<bean class="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameConverter"/>
+				<bean class="org.apache.olingo.ext.config.spring.editor.ToFullQualifiedNameConverter"/>
+			</set>
+		</property>
+	</bean>
+
+	<bean id="edmProvider" class="org.apache.olingo.ext.config.edm.GenericEdmProvider">
+		<property name="schemas">
+			<list>
+				<bean class="org.apache.olingo.commons.api.edm.provider.CsdlSchema">
+					<property name="namespace" value="test" />
+					<property name="entityContainer">
+						<bean class="org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer">
+							<property name="entitySets">
+								<list>
+									<bean class="org.apache.olingo.commons.api.edm.provider.CsdlEntitySet">
+										<property name="name" value="sources1" />
+										<property name="type" value="ns.sources1" />
+										<!--<property name="type">-->
+											<!--<bean class="org.apache.olingo.commons.api.edm.FullQualifiedName">-->
+												<!--<constructor-arg value="ns.sources1"/>-->
+											<!--</bean>-->
+										<!--</property>-->
+									</bean>
+								</list>
+							</property>
+						</bean>
+					</property>
+					<property name="entityTypes">
+						<list>
+							<bean class="org.apache.olingo.commons.api.edm.provider.CsdlEntityType">
+								<property name="name" value="sources1" />
+								<property name="key">
+									<list>
+										<bean class="org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef">
+											<property name="name" value="field1" />
+										</bean>
+									</list>
+								</property>
+								<property name="properties">
+									<list>
+										<bean class="org.apache.olingo.commons.api.edm.provider.CsdlProperty">
+											<property name="name" value="field1" />
+											<property name="type" value="Edm.String" />
+										</bean>
+									</list>
+								</property>
+							</bean>
+						</list>
+					</property>
+				</bean>
+			</list>
+		</property>
+	</bean>
+
+</beans>
diff --git a/ext/spring/src/test/resources/applicationContext-edm-provider-namespace.xml b/ext/spring/src/test/resources/applicationContext-edm-provider-namespace.xml
new file mode 100644
index 0000000..53b8bc4
--- /dev/null
+++ b/ext/spring/src/test/resources/applicationContext-edm-provider-namespace.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo4"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo4
+                http://olingo.apache.org/schema/configuration/olingo4.xsd">
+
+  <bean id="conversionService"
+        class="org.springframework.context.support.ConversionServiceFactoryBean">
+    <property name="converters">
+      <set>
+        <bean class="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameConverter"/>
+        <bean class="org.apache.olingo.ext.config.spring.editor.ToFullQualifiedNameConverter"/>
+      </set>
+    </property>
+  </bean>
+
+	<olingo:edm-provider id="edmProvider">
+		<olingo:schema namespace="test" alias="">
+			<olingo:entityContainer>
+				<olingo:entitySet name="sources1" type="sources1"/>
+			</olingo:entityContainer>
+			<!-- EnumType -->
+			<!-- getTypeDefinition -->
+			<olingo:entityType name="sources1">
+				<olingo:key property-name="field1"/>
+
+				<olingo:property name="field1" type="Edm.String"/>
+				<olingo:property name="field2" type="Edm.Int32"/>
+				<olingo:property name="field3" type="Edm.Int64"/>
+				<olingo:property name="field4" type="Edm.Double"/>
+				<olingo:property name="field5" type="Edm.Double"/>
+				<olingo:property name="field6" type="Edm.Boolean"/>
+			</olingo:entityType>
+
+<!-- 			<edm:complexType name="test"> -->
+<!-- 			</edm:complexType> -->
+
+			<!-- getActions -->
+			<!-- getFunctions -->
+			<!-- getTerm -->
+			<!-- getEntitySet -->
+			<!-- getSingleton -->
+			<!-- getActionImport -->
+			<!-- getFunctionImport -->
+			<!-- getEntityContainerInfo -->
+			<!-- getAliasInfos -->
+			<!-- getSchemas -->
+			<!-- getEntityContainer -->
+		</olingo:schema>
+	</olingo:edm-provider>
+</beans>
diff --git a/ext/spring/src/test/resources/applicationContext-http-handler-beans.xml b/ext/spring/src/test/resources/applicationContext-http-handler-beans.xml
new file mode 100644
index 0000000..b00105f
--- /dev/null
+++ b/ext/spring/src/test/resources/applicationContext-http-handler-beans.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:olingo="http://olingo.apache.org/schema/olingo4"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo4
+                http://olingo.apache.org/schema/configuration/olingo4.xsd">
+
+	<bean id="conversionService"
+				class="org.springframework.context.support.ConversionServiceFactoryBean">
+		<property name="converters">
+			<set>
+				<bean class="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameConverter"/>
+				<bean class="org.apache.olingo.ext.config.spring.editor.ToFullQualifiedNameConverter"/>
+			</set>
+		</property>
+	</bean>
+
+	<bean id="odata" class="org.apache.olingo.ext.config.spring.factory.ODataFactoryBean" />
+
+	<bean id="httpHandler"
+		class="org.apache.olingo.ext.config.spring.factory.ODataHttpHandlerFactoryBean">
+		<property name="odata" ref="odata" />
+		<property name="serviceMetadata">
+			<bean class="org.apache.olingo.ext.config.spring.factory.ServiceMetadataFactoryBean">
+				<property name="odata" ref="odata" />
+				<property name="edmProvider" ref="edmProvider" />
+				<property name="references">
+					<list>
+						<bean class="org.apache.olingo.ext.config.spring.factory.EdmxReferenceFactoryBean">
+							<property name="uri"
+								value="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml" />
+							<property name="includes">
+								<map>
+									<entry key="Org.OData.Core.V1" value="Core" />
+								</map>
+							</property>
+						</bean>
+					</list>
+				</property>
+			</bean>
+		</property>
+		<property name="processors">
+			<list>
+				<ref bean="testProcessor" />
+			</list>
+		</property>
+	</bean>
+
+	<bean id="edmProvider" class="org.apache.olingo.ext.config.edm.GenericEdmProvider" />
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.config.spring.TestProcessor" />
+
+</beans>
diff --git a/ext/spring/src/test/resources/applicationContext-http-handler-namespace.xml b/ext/spring/src/test/resources/applicationContext-http-handler-namespace.xml
new file mode 100644
index 0000000..d689005
--- /dev/null
+++ b/ext/spring/src/test/resources/applicationContext-http-handler-namespace.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo4"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo4
+                http://olingo.apache.org/schema/configuration/olingo4.xsd">
+
+	<olingo:http-handler id="httpHandler" edm-provider="edmProvider">
+		<olingo:reference uri="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml">
+			<olingo:include key="Org.OData.Core.V1" value="Core"/>
+		</olingo:reference>
+		<olingo:processor ref="testProcessor"/>
+	</olingo:http-handler>
+
+  <bean id="conversionService"
+        class="org.springframework.context.support.ConversionServiceFactoryBean">
+      <property name="converters">
+          <set>
+              <bean class="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameConverter"/>
+              <bean class="org.apache.olingo.ext.config.spring.editor.ToFullQualifiedNameConverter"/>
+          </set>
+      </property>
+  </bean>
+
+  <bean id="edmProvider" class="org.apache.olingo.ext.config.edm.GenericEdmProvider" />
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.config.spring.TestProcessor" />
+</beans>
diff --git a/ext/spring/src/test/resources/applicationContext-namespace.xml b/ext/spring/src/test/resources/applicationContext-namespace.xml
new file mode 100644
index 0000000..30b2cfd
--- /dev/null
+++ b/ext/spring/src/test/resources/applicationContext-namespace.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo4"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo4
+                http://olingo.apache.org/schema/configuration/olingo4.xsd">
+
+	<olingo:http-handler id="httpHandler" edm-provider="edmProvider">
+		<olingo:reference uri="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml">
+			<olingo:include key="Org.OData.Core.V1" value="Core"/>
+		</olingo:reference>
+		<olingo:processor ref="testProcessor"/>
+	</olingo:http-handler>
+
+	<olingo:edm-provider id="edmProvider">
+		<olingo:schema namespace="test" alias="">
+			<olingo:entityContainer>
+				<olingo:entitySet name="sources1" type="sources1"/>
+			</olingo:entityContainer>
+			<!-- EnumType -->
+			<!-- getTypeDefinition -->
+			<olingo:entityType name="sources1">
+				<olingo:key property-name="field1"/>
+
+				<olingo:property name="field1" type="Edm.String"/>
+				<olingo:property name="field2" type="Edm.Int32"/>
+				<olingo:property name="field3" type="Edm.Int64"/>
+				<olingo:property name="field4" type="Edm.Double"/>
+				<olingo:property name="field5" type="Edm.Double"/>
+				<olingo:property name="field6" type="Edm.Boolean"/>
+			</olingo:entityType>
+		</olingo:schema>
+	</olingo:edm-provider>
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.config.spring.TestProcessor" />
+
+	<bean id="conversionService"
+				class="org.springframework.context.support.ConversionServiceFactoryBean">
+		<property name="converters">
+			<set>
+				<bean class="org.apache.olingo.ext.config.spring.editor.FullQualifiedNameConverter"/>
+				<bean class="org.apache.olingo.ext.config.spring.editor.ToFullQualifiedNameConverter"/>
+			</set>
+		</property>
+	</bean>
+</beans>