You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2016/08/17 08:25:23 UTC

[1/2] olingo-odata4 git commit: [OLINGO-1004] removed CTCompCompExtended and added CTBase in ESFourKeyAlias instead

Repository: olingo-odata4
Updated Branches:
  refs/heads/master deb1d2036 -> 37a1e110c


[OLINGO-1004] removed CTCompCompExtended and added CTBase in ESFourKeyAlias instead

Signed-off-by: Christian Amend <ch...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/d30f47ec
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/d30f47ec
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/d30f47ec

Branch: refs/heads/master
Commit: d30f47ec6b476e99904ccbdc3521a16a39c261a4
Parents: deb1d20
Author: Morten Riedel <Mo...@sap.com>
Authored: Tue Aug 16 15:11:43 2016 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Wed Aug 17 09:43:38 2016 +0200

----------------------------------------------------------------------
 .../olingo/server/tecsvc/data/DataCreator.java  |  10 +-
 .../tecsvc/provider/ComplexTypeProvider.java    |   8 -
 .../json/ODataJsonDeserializerEntityTest.java   |  45 ++--
 .../xml/ODataXmlDeserializerTest.java           |  65 +++--
 .../json/ODataJsonSerializerTest.java           |  96 ++++---
 .../serializer/xml/ODataXmlSerializerTest.java  | 266 ++++++++-----------
 6 files changed, 234 insertions(+), 256 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
index aac9a34..542e393 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
@@ -196,9 +196,10 @@ public class DataCreator {
         .addProperty(createComplex("PropertyCompComp",
             ComplexTypeProvider.nameCTCompComp.getFullQualifiedNameAsString(),
             createComplex("PropertyComp",
-                ComplexTypeProvider.nameCTTwoPrim.getFullQualifiedNameAsString(),
+                ComplexTypeProvider.nameCTBase.getFullQualifiedNameAsString(),
                 createPrimitive("PropertyInt16", (short) 111),
-                createPrimitive("PropertyString", "Num111")
+                createPrimitive("PropertyString", "Num111"),
+                createPrimitive("AdditionalPropString", "Test123")
             )
             ))
         );
@@ -1197,12 +1198,11 @@ public class DataCreator {
     entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", (short) 2));
     entity.addProperty(createComplex("PropertyComp", 
-        ComplexTypeProvider.nameCTCompCompExtended.getFullQualifiedNameAsString(), 
+        ComplexTypeProvider.nameCTCompComp.getFullQualifiedNameAsString(), 
         createComplex("PropertyComp",
             ComplexTypeProvider.nameCTTwoPrim.getFullQualifiedNameAsString(),
             createPrimitive("PropertyInt16", (short) 987),
-            createPrimitive("PropertyString", "String 2")),
-        createPrimitive("PropertyDate", getDate(2012, 12, 3))));
+            createPrimitive("PropertyString", "String 2"))));
     entityCollection.getEntities().add(entity);
 
     setEntityType(entityCollection, edm.getEntityType(EntityTypeProvider.nameETCompComp));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
index 7d539b6..b04b3d1 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
@@ -38,8 +38,6 @@ public class ComplexTypeProvider {
   public static final FullQualifiedName nameCTCompCollComp = new FullQualifiedName(SchemaProvider.NAMESPACE,
       "CTCompCollComp");
   public static final FullQualifiedName nameCTCompComp = new FullQualifiedName(SchemaProvider.NAMESPACE, "CTCompComp");
-  public static final FullQualifiedName nameCTCompCompExtended = new FullQualifiedName(
-      SchemaProvider.NAMESPACE, "CTCompCompExtended");
   public static final FullQualifiedName nameCTCompNav = new FullQualifiedName(SchemaProvider.NAMESPACE, "CTCompNav");
 
   public static final FullQualifiedName nameCTMixPrimCollComp = new FullQualifiedName(SchemaProvider.NAMESPACE,
@@ -126,12 +124,6 @@ public class ComplexTypeProvider {
       return new CsdlComplexType()
           .setName("CTCompComp")
           .setProperties(Arrays.asList(PropertyProvider.propertyComp_CTTwoPrim));
-
-    } else if (complexTypeName.equals(nameCTCompCompExtended)) {
-      return new CsdlComplexType()
-        .setName("CTCompCompExtended")
-        .setBaseType(nameCTCompComp)
-        .setProperties(Arrays.asList(PropertyProvider.propertyDate));
       
     } else if (complexTypeName.equals(nameCTCompCollComp)) {
       return new CsdlComplexType()

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
index c92edfc..d91f3ff 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
@@ -46,7 +46,6 @@ import org.apache.olingo.commons.api.edm.EdmProperty;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlMapping;
 import org.apache.olingo.commons.api.format.ContentType;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmDate;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.deserializer.DeserializerException;
 import org.apache.olingo.server.api.deserializer.DeserializerResult;
@@ -229,26 +228,34 @@ public class ODataJsonDeserializerEntityTest extends AbstractODataDeserializerTe
         + "\"@odata.etag\":\"W/\\\"32767\\\"\","
         + "\"PropertyInt16\":32767,"
         + "\"PropertyComp\":{"
-        + "\"@odata.type\":\"#olingo.odata.test1.CTCompCompExtended\","
-        +   "\"PropertyComp\":{"
-        +   "\"@odata.type\":\"#olingo.odata.test1.CTTwoPrim\","
-        +   "\"PropertyInt16\":32767,"
-        +   "\"PropertyString\":\"First Resource - first\""
-        +   "},"
-        +   "\"PropertyDate\":\"2012-10-03\""
-        + "}}";
-    final Entity result = deserialize(payload, "ETCompComp");
+            +  "\"@odata.type\":\"#olingo.odata.test1.CTTwoPrim\","
+            +  "\"PropertyInt16\":11,"
+            +  "\"PropertyString\":\"Num11\""
+        +  "},"
+        +  "\"PropertyCompComp\":{"
+            +  "\"@odata.type\":\"#olingo.odata.test1.CTCompComp\","
+            +  "\"PropertyComp\":{"
+            +  "\"@odata.type\":\"#olingo.odata.test1.CTBase\","
+            +  "\"PropertyInt16\":32767,"
+            +  "\"PropertyString\":\"Num111\","
+            +  "\"AdditionalPropString\":\"Test123\""
+        +  "}}}";
+    final Entity result = deserialize(payload, "ETFourKeyAlias");
     
     Assert.assertNotNull(result);
-    Property property = result.getProperty("PropertyComp");
-    Assert.assertEquals("PropertyComp", property.getName());    
-    Assert.assertTrue(property.isComplex());
-    final ComplexValue cv = property.asComplex();
-    Assert.assertEquals("olingo.odata.test1.CTCompCompExtended", property.getType());
-    Assert.assertEquals(
-        "2012-10-03",
-        EdmDate.getInstance().valueToString(getCVProperty(cv, "PropertyDate").asPrimitive(), false, 10, 3, 0,
-        false));
+    Property propertyCompComp = result.getProperty("PropertyCompComp");
+    Assert.assertEquals("PropertyCompComp", propertyCompComp.getName());   
+    Assert.assertEquals("olingo.odata.test1.CTCompComp", propertyCompComp.getType());
+    Assert.assertTrue(propertyCompComp.isComplex());
+    
+    ComplexValue complexValuePropComp = propertyCompComp.asComplex();    
+    Property propertyComp = getCVProperty(complexValuePropComp, "PropertyComp");
+    Assert.assertEquals("PropertyComp", propertyComp.getName()); 
+    Assert.assertEquals("olingo.odata.test1.CTBase", propertyComp.getType());
+    Assert.assertTrue(propertyComp.isComplex());  
+    
+    final ComplexValue cvAdditionalString = propertyComp.asComplex();
+    Assert.assertEquals("Test123",getCVProperty(cvAdditionalString, "AdditionalPropString").asPrimitive());
   }  
   
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializerTest.java
index 416c219..0daee4d 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializerTest.java
@@ -32,6 +32,7 @@ import org.apache.olingo.commons.api.data.Link;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
@@ -537,42 +538,50 @@ public class ODataXmlDeserializerTest extends AbstractODataDeserializerTest {
 
   @Test
   public void extendedComplexProperty() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     
     String payload = "<?xml version='1.0' encoding='UTF-8'?>"
         + "<atom:entry xmlns:atom=\"http://www.w3.org/2005/Atom\" "
         + "xmlns:metadata=\"http://docs.oasis-open.org/odata/ns/metadata\" "
-        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\" "
-        + "metadata:etag=\"W/&quot;32767&quot;\">"
+        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\">"
           + "<atom:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" "
-          + "term=\"#olingo.odata.test1.ETCompComp\"/>"
-          + "<atom:content type=\"application/xml\">"
-            + "<metadata:properties>"
-              + "<data:PropertyInt16>32767</data:PropertyInt16>"
-              + "<data:PropertyComp metadata:type=\"#olingo.odata.test1.CTCompCompExtended\">"
-                + "<data:PropertyComp metadata:type=\"#olingo.odata.test1.CTTwoPrim\">"
-                  + "<data:PropertyInt16>32767</data:PropertyInt16>"
-                  + "<data:PropertyString>First Resource - first</data:PropertyString>"
-                  + "</data:PropertyComp>"
-                  + "<data:PropertyDate>2012-10-03</data:PropertyDate>"
-              + "</data:PropertyComp>"
-            + "</metadata:properties>"
-          + "</atom:content>"
-        + "</atom:entry>";
+          + "term=\"#olingo.odata.test1.ETFourKeyAlias\"/>"
+          +  "<atom:content type=\"application/xml\">"
+                +  "<metadata:properties>"
+                    +  "<data:PropertyInt16 metadata:type=\"Int16\">1</data:PropertyInt16>"
+                    +  "<data:PropertyComp metadata:type=\"#olingo.odata.test1.CTTwoPrim\">"
+                        +  "<data:PropertyInt16 metadata:type=\"Int16\">11</data:PropertyInt16>"
+                        +  "<data:PropertyString>Num11</data:PropertyString>"
+                    +  "</data:PropertyComp>"
+                    +  "<data:PropertyCompComp metadata:type=\"#olingo.odata.test1.CTCompComp\">"
+                        +  "<data:PropertyComp metadata:type=\"#olingo.odata.test1.CTBase\">"
+                            +  "<data:PropertyInt16 metadata:type=\"Int16\">111</data:PropertyInt16>"
+                            +  "<data:PropertyString>Num111</data:PropertyString>"
+                            +  "<data:AdditionalPropString>Test123</data:AdditionalPropString>"
+                        +  "</data:PropertyComp>"
+                    +  "</data:PropertyCompComp>"
+                +  "</metadata:properties>"
+              +  "</atom:content>"
+          +  "</atom:entry>";
     
-    Entity result = deserializer.entity(new ByteArrayInputStream(payload.getBytes()), 
-        edmEntitySet.getEntityType()).getEntity();
+    EdmEntityType entityType = edmEntitySet.getEntityType();
+    Entity result = deserializer.entity(new ByteArrayInputStream(payload.getBytes()), entityType)
+            .getEntity();
 
     Assert.assertNotNull(result);
-    Property property = result.getProperty("PropertyComp");
-    Assert.assertEquals("PropertyComp", property.getName());    
-    Assert.assertTrue(property.isComplex());
-    final ComplexValue cv = property.asComplex();
-    Assert.assertEquals("olingo.odata.test1.CTCompCompExtended", property.getType());
-    Assert.assertEquals(
-        "2012-10-03",
-        EdmDate.getInstance().valueToString(getCVProperty(cv, "PropertyDate").asPrimitive(), false, 10, 3, 0,
-        false));
+    Property propertyCompComp = result.getProperty("PropertyCompComp");
+    Assert.assertEquals("PropertyCompComp", propertyCompComp.getName());   
+    Assert.assertEquals("olingo.odata.test1.CTCompComp", propertyCompComp.getType());
+    Assert.assertTrue(propertyCompComp.isComplex());
+    
+    ComplexValue complexValuePropComp = propertyCompComp.asComplex();    
+    Property propertyComp = getCVProperty(complexValuePropComp, "PropertyComp");
+    Assert.assertEquals("PropertyComp", propertyComp.getName()); 
+    Assert.assertEquals("olingo.odata.test1.CTBase", propertyComp.getType());
+    Assert.assertTrue(propertyComp.isComplex());  
+    
+    final ComplexValue cvAdditionalString = propertyComp.asComplex();
+    Assert.assertEquals("Test123",getCVProperty(cvAdditionalString, "AdditionalPropString").asPrimitive());
   }
   
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
index 536c1ac..22b8807 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
@@ -904,11 +904,12 @@ public class ODataJsonSerializerTest {
 
   @Test
   public void selectComplex() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
-    final SelectOption select = ExpandSelectMock.mockSelectOption(Collections.singletonList(
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp", "PropertyString")));
+   final SelectOption select = ExpandSelectMock.mockSelectOption(Arrays.asList(
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyInt16"),
+        ExpandSelectMock.mockSelectItem(edmEntitySet,"PropertyCompComp", "PropertyComp", "PropertyString")));
     InputStream result = serializer
         .entityCollection(metadata, entityType, entitySet,
             EntityCollectionSerializerOptions.with()
@@ -918,21 +919,26 @@ public class ODataJsonSerializerTest {
                 .select(select)
                 .build()).getContent();
     final String resultString = IOUtils.toString(result);
-    Assert.assertEquals("{"
-        + "\"@odata.context\":\"$metadata#ESCompComp(PropertyComp/PropertyComp/PropertyString)\","
-        + "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
-        + "\"value\":["
-        + "{\"@odata.id\":\"ESCompComp(1)\",\"PropertyComp\":"
-        + "{\"PropertyComp\":{\"PropertyString\":\"String 1\"}}},"
-        + "{\"@odata.id\":\"ESCompComp(2)\",\"PropertyComp\":"
-        + "{\"@odata.type\":\"#olingo.odata.test1.CTCompCompExtended\","
-        + "\"PropertyComp\":{\"PropertyString\":\"String 2\"}}}]}",
-        resultString);
+    final String expected = "{"
+           +     "\"@odata.context\":\"$metadata#ESFourKeyAlias"
+           +        "(PropertyInt16,PropertyCompComp/PropertyComp/PropertyString)\"," 
+           +     "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
+           +     "\"value\":[" 
+           +     "{" 
+           +         "\"@odata.id\":\"id\"," 
+           +         "\"PropertyInt16\":1," 
+           +         "\"PropertyCompComp\":{" 
+           +             "\"PropertyComp\":{" 
+           +             "\"@odata.type\":\"#olingo.odata.test1.CTBase\"," 
+           +             "\"PropertyString\":\"Num111\"" 
+           +     "}}}]}";
+    
+   Assert.assertEquals(expected, resultString);
   }
   
   @Test
   public void selectExtendedComplexType() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
     InputStream result = serializer
@@ -942,27 +948,34 @@ public class ODataJsonSerializerTest {
                 .build()).getContent();
     final String resultString = IOUtils.toString(result);
     
-    String expected = "{" + 
-        "\"@odata.context\":\"$metadata#ESCompComp\"," + 
-        "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\"," + 
-        "\"value\":[" + 
-        "{\"PropertyInt16\":1," +
-        "\"PropertyComp\":{\"PropertyComp\":{" + 
-        "\"PropertyInt16\":123,\"PropertyString\":\"String 1\"}}}," + 
-        "{\"PropertyInt16\":2," + 
-        "\"PropertyComp\":{\"@odata.type\":\"#olingo.odata.test1.CTCompCompExtended\"," + 
-        "\"PropertyComp\":{\"PropertyInt16\":987,\"PropertyString\":\"String 2\"},\"PropertyDate\":\"2012-12-03\"}}]}";
+    String expected = "{"
+            + "\"@odata.context\":\"$metadata#ESFourKeyAlias\","
+            + "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
+            + "\"value\":[{"
+                + "\"PropertyInt16\":1,"
+                + "\"PropertyComp\":{"
+                    + "\"PropertyInt16\":11,"
+                    + "\"PropertyString\":\"Num11\""
+                + "},"
+                + "\"PropertyCompComp\":{"
+                    + "\"PropertyComp\":{"
+                        + "\"@odata.type\":\"#olingo.odata.test1.CTBase\","
+                        + "\"PropertyInt16\":111,"
+                        + "\"PropertyString\":\"Num111\","
+                        + "\"AdditionalPropString\":\"Test123\""
+            + "}}}]}";
+    
     Assert.assertEquals(expected, resultString);
   }  
 
   @Test
   public void selectComplexTwice() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
     final SelectOption select = ExpandSelectMock.mockSelectOption(Arrays.asList(
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp", "PropertyString"),
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp")));
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyString"),
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyCompComp", "PropertyComp")));
     final String resultString = IOUtils.toString(serializer
         .entityCollection(metadata, entityType, entitySet,
             EntityCollectionSerializerOptions.with()
@@ -971,16 +984,25 @@ public class ODataJsonSerializerTest {
                     .build())
                 .select(select)
                 .build()).getContent());
-    Assert.assertEquals("{"
-        + "\"@odata.context\":\"$metadata#ESCompComp(PropertyComp/PropertyComp)\","
-        + "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
-        + "\"value\":["
-        + "{\"@odata.id\":\"ESCompComp(1)\",\"PropertyComp\":{\"PropertyComp\":{\"PropertyInt16\":123,"
-        + "\"PropertyString\":\"String 1\"}}},"
-        + "{\"@odata.id\":\"ESCompComp(2)\",\"PropertyComp\":"
-        + "{\"@odata.type\":\"#olingo.odata.test1.CTCompCompExtended\","
-        + "\"PropertyComp\":{\"PropertyInt16\":987,\"PropertyString\":\"String 2\"}}}]}",
-        resultString);
+    
+    String expected = "{"
+            + "\"@odata.context\":\"$metadata#ESFourKeyAlias"
+            +   "(PropertyComp/PropertyString,PropertyCompComp/PropertyComp)\","
+            + "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
+            + "\"value\":[{"
+                + "\"@odata.id\":\"id\","
+                + "\"PropertyComp\":{"
+                    + "\"PropertyString\":\"Num11\""
+                + "},"
+                + "\"PropertyCompComp\":{"
+                    + "\"PropertyComp\":{"
+                        + "\"@odata.type\":\"#olingo.odata.test1.CTBase\","
+                        + "\"PropertyInt16\":111,"
+                        + "\"PropertyString\":\"Num111\","
+                        + "\"AdditionalPropString\":\"Test123\""
+            + "}}}]}";
+    
+    Assert.assertEquals(expected, resultString);
   }
 
     @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d30f47ec/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
index d110622..e9928dd 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
@@ -1153,11 +1153,12 @@ public class ODataXmlSerializerTest {
 
   @Test
   public void selectComplex() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
     final SelectOption select = ExpandSelectMock.mockSelectOption(Arrays.asList(
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp", "PropertyString")));
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyInt16"),
+        ExpandSelectMock.mockSelectItem(edmEntitySet,"PropertyCompComp", "PropertyComp", "PropertyString")));
     long currentTimeMillis = System.currentTimeMillis();
     InputStream result = serializer
         .entityCollection(metadata, entityType, entitySet,
@@ -1165,66 +1166,47 @@ public class ODataXmlSerializerTest {
                 .contextURL(ContextURL.with().entitySet(edmEntitySet)
                     .selectList(helper.buildContextURLSelectList(entityType, null, select))
                     .build())
-                .id("http://host/svc/ESCompComp")
+                .id("http://host/svc/ESFourKeyAlias")
                 .select(select)
                 .build()).getContent();
     final String resultString = IOUtils.toString(result);
     final String expected = "<?xml version='1.0' encoding='UTF-8'?>\n" +
         "<a:feed xmlns:a=\"http://www.w3.org/2005/Atom\"\n" +
-        "  xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\"\n" +
-        "  xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\"\n" +
-        "  m:context=\"$metadata#ESCompComp(PropertyComp/PropertyComp/PropertyString)\"\n" +
-        "  m:metadata-etag=\"metadataETag\">\n" +
-        "  <a:id>http://host/svc/ESCompComp</a:id>\n" +
-        "  <a:entry>\n" +
-        "    <a:id>ESCompComp(1)</a:id>\n" +
-        "    <a:title />\n" +
-        "    <a:summary />\n" +
-        "<a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
-        "    <a:author>\n" +
-        "      <a:name />\n" +
-        "    </a:author>\n" +
-        "    <a:link rel=\"edit\" href=\"ESCompComp(1)\"/>\n" +
-        "    <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\"\n" +
-        "      term=\"#olingo.odata.test1.ETCompComp\" />\n" +
-        "    <a:content type=\"application/xml\">\n" +
-        "      <m:properties>\n" +
-        "        <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" +
-        "          <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
-        "            <d:PropertyString>String 1</d:PropertyString>\n" +
-        "          </d:PropertyComp>\n" +
-        "        </d:PropertyComp>\n" +
-        "      </m:properties>\n" +
-        "    </a:content>\n" +
-        "  </a:entry>\n" +
-        "  <a:entry>\n" +
-        "    <a:id>ESCompComp(2)</a:id>\n" +
-        "    <a:title />\n" +
-        "    <a:summary />\n" +
-        "<a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
-        "    <a:author>\n" +
-        "      <a:name />\n" +
-        "    </a:author>\n" +
-        "    <a:link rel=\"edit\" href=\"ESCompComp(2)\"/>\n" +
-        "    <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\"\n" +
-        "      term=\"#olingo.odata.test1.ETCompComp\" />\n" +
-        "    <a:content type=\"application/xml\">\n" +
-        "      <m:properties>\n" +
-        "        <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompCompExtended\">\n" +
-        "          <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
-        "            <d:PropertyString>String 2</d:PropertyString>\n" +
-        "          </d:PropertyComp>\n" +
-        "        </d:PropertyComp>\n" +
-        "      </m:properties>\n" +
-        "    </a:content>\n" +
-        "  </a:entry>\n" +
-        "</a:feed>\n";
+            "xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\"\n" +
+            "xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\" \n" +
+            "m:context=\"$metadata#ESFourKeyAlias" + 
+            "(PropertyInt16,PropertyCompComp/PropertyComp/PropertyString)\"\n" +
+            "m:metadata-etag=\"metadataETag\">\n" +
+            "<a:id>http://host/svc/ESFourKeyAlias</a:id>\n" +
+            "<a:entry>\n" +
+                "<a:id>id</a:id>\n" +
+                "<a:title />\n" +
+                "<a:summary />\n" +
+                "<a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
+                "<a:author>\n" +
+                    "<a:name/>\n" +
+                "</a:author>\n" +
+                "<a:link rel=\"edit\" href=\"id\"/>\n" +
+                "<a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" " +
+                  "term=\"#olingo.odata.test1.ETFourKeyAlias\"/>\n" +
+                "<a:content type=\"application/xml\">\n" +
+                "<m:properties>\n" +
+                    "<d:PropertyInt16 m:type=\"Int16\">1</d:PropertyInt16>\n" +
+                    "<d:PropertyCompComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" +
+                    "<d:PropertyComp m:type=\"#olingo.odata.test1.CTBase\">\n" +
+                        "<d:PropertyString>Num111</d:PropertyString>\n" +
+                        "</d:PropertyComp>\n" +
+                        "</d:PropertyCompComp>\n" +
+                    "</m:properties>\n" +
+                "</a:content>\n" +
+            "</a:entry>\n" +
+        "</a:feed>";
     checkXMLEqual(expected, resultString);
   }
 
   @Test
   public void selectComplexExtended() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
     long currentTimeMillis = System.currentTimeMillis();
@@ -1232,73 +1214,56 @@ public class ODataXmlSerializerTest {
         .entityCollection(metadata, entityType, entitySet,
             EntityCollectionSerializerOptions.with()
                 .contextURL(ContextURL.with().entitySet(edmEntitySet).build())
-                .id("http://host/svc/ESCompComp")
+                .id("http://host/svc/ESFourKeyAlias")
                 .build()).getContent();
     final String resultString = IOUtils.toString(result);
-    String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 
-        "<a:feed xmlns:a=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\" "
-        + "xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\" m:context=\"$metadata#ESCompComp\" "
-        + "m:metadata-etag=\"metadataETag\">\n" + 
-        "   <a:id>http://host/svc/ESCompComp</a:id>\n" + 
-        "   <a:entry>\n" + 
-        "      <a:id>ESCompComp(1)</a:id>\n" + 
-        "      <a:title />\n" + 
-        "      <a:summary />\n" + 
-        "      <a:updated>"+ UPDATED_FORMAT.format(new Date(currentTimeMillis)) +"</a:updated>\n" + 
-        "      <a:author>\n" + 
-        "         <a:name />\n" + 
-        "      </a:author>\n" + 
-        "      <a:link rel=\"edit\" href=\"ESCompComp(1)\" />\n" + 
-        "      <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" "
-        + "term=\"#olingo.odata.test1.ETCompComp\" />\n" + 
-        "      <a:content type=\"application/xml\">\n" + 
-        "         <m:properties>\n" + 
-        "            <d:PropertyInt16 m:type=\"Int16\">1</d:PropertyInt16>\n" + 
-        "            <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" + 
-        "               <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" + 
-        "                  <d:PropertyInt16 m:type=\"Int16\">123</d:PropertyInt16>\n" + 
-        "                  <d:PropertyString>String 1</d:PropertyString>\n" + 
-        "               </d:PropertyComp>\n" + 
-        "            </d:PropertyComp>\n" + 
-        "         </m:properties>\n" + 
-        "      </a:content>\n" + 
-        "   </a:entry>\n" + 
-        "   <a:entry>\n" + 
-        "      <a:id>ESCompComp(2)</a:id>\n" + 
-        "      <a:title />\n" + 
-        "      <a:summary />\n" + 
-        "      <a:updated>"+ UPDATED_FORMAT.format(new Date(currentTimeMillis)) +"</a:updated>\n" + 
-        "      <a:author>\n" + 
-        "         <a:name />\n" + 
-        "      </a:author>\n" + 
-        "      <a:link rel=\"edit\" href=\"ESCompComp(2)\" />\n" + 
-        "      <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" "
-        + "term=\"#olingo.odata.test1.ETCompComp\" />\n" + 
-        "      <a:content type=\"application/xml\">\n" + 
-        "         <m:properties>\n" + 
-        "            <d:PropertyInt16 m:type=\"Int16\">2</d:PropertyInt16>\n" + 
-        "            <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompCompExtended\">\n" + 
-        "               <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" + 
-        "                  <d:PropertyInt16 m:type=\"Int16\">987</d:PropertyInt16>\n" + 
-        "                  <d:PropertyString>String 2</d:PropertyString>\n" + 
-        "               </d:PropertyComp>\n" + 
-        "               <d:PropertyDate m:type=\"Date\">2012-12-03</d:PropertyDate>\n" + 
-        "            </d:PropertyComp>\n" + 
-        "         </m:properties>\n" + 
-        "      </a:content>\n" + 
-        "   </a:entry>\n" + 
+    String expected = "<?xml version='1.0' encoding='UTF-8'?>\n" +
+        "<a:feed xmlns:a=\"http://www.w3.org/2005/Atom\"\n" +
+            "xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\"\n" +
+            "xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\" \n" +
+            "m:context=\"$metadata#ESFourKeyAlias\"\n" +
+            "m:metadata-etag=\"metadataETag\">\n" +
+            "<a:id>http://host/svc/ESFourKeyAlias</a:id>\n" +
+            "<a:entry>\n" +
+                "<a:id>id</a:id>\n" +
+                "<a:title />\n" +
+                "<a:summary />\n" +
+                "<a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
+                "<a:author>\n" +
+                    "<a:name/>\n" +
+                "</a:author>\n" +
+                "<a:link rel=\"edit\" href=\"id\"/>\n" +
+                "<a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" " +
+                  "term=\"#olingo.odata.test1.ETFourKeyAlias\"/>\n" +
+               "<a:content type=\"application/xml\">\n" +
+                    "<m:properties>\n" +
+                    "<d:PropertyInt16 m:type=\"Int16\">1</d:PropertyInt16>\n" +
+                    "<d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
+                        "<d:PropertyInt16 m:type=\"Int16\">11</d:PropertyInt16>\n" +
+                        "<d:PropertyString>Num11</d:PropertyString>\n" +
+                    "</d:PropertyComp>\n" +
+                    "<d:PropertyCompComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" +
+                        "<d:PropertyComp m:type=\"#olingo.odata.test1.CTBase\">\n" +
+                            "<d:PropertyInt16 m:type=\"Int16\">111</d:PropertyInt16>\n" +
+                            "<d:PropertyString>Num111</d:PropertyString>\n" +
+                            "<d:AdditionalPropString>Test123</d:AdditionalPropString>\n" +
+                        "</d:PropertyComp>\n" +
+                    "</d:PropertyCompComp>\n" +
+                    "</m:properties>\n" +
+                "</a:content>\n" +
+            "</a:entry>\n" +
         "</a:feed>";
     checkXMLEqual(expected, resultString);
   }
   
   @Test
   public void selectComplexTwice() throws Exception {
-    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESCompComp");
+    final EdmEntitySet edmEntitySet = entityContainer.getEntitySet("ESFourKeyAlias");
     final EdmEntityType entityType = edmEntitySet.getEntityType();
     final EntityCollection entitySet = data.readAll(edmEntitySet);
     final SelectOption select = ExpandSelectMock.mockSelectOption(Arrays.asList(
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp", "PropertyString"),
-        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyComp")));
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyComp", "PropertyString"),
+        ExpandSelectMock.mockSelectItem(edmEntitySet, "PropertyCompComp", "PropertyComp")));
     long currentTimeMillis = System.currentTimeMillis();
     InputStream inputStream = serializer
         .entityCollection(metadata, entityType, entitySet,
@@ -1306,62 +1271,45 @@ public class ODataXmlSerializerTest {
                 .contextURL(ContextURL.with().entitySet(edmEntitySet)
                     .selectList(helper.buildContextURLSelectList(entityType, null, select))
                     .build())
-                .id("http://host/svc/ESCompComp")
+                .id("http://host/svc/ESFourKeyAlias")
                 .select(select)
                 .build()).getContent();
     final String resultString = IOUtils.toString(inputStream);
     String expected = "<?xml version='1.0' encoding='UTF-8'?>\n" +
         "<a:feed xmlns:a=\"http://www.w3.org/2005/Atom\"\n" +
-        "  xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\"\n" +
-        "  xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\" \n" +
-        "  m:context=\"$metadata#ESCompComp(PropertyComp/PropertyComp)\"\n" +
-        "  m:metadata-etag=\"metadataETag\">\n" +
-        "  <a:id>http://host/svc/ESCompComp</a:id>\n" +
-        "  <a:entry>\n" +
-        "    <a:id>ESCompComp(1)</a:id>\n" +
-        "    <a:title />\n" +
-        "    <a:summary />\n" +
-        "    <a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
-        "    <a:author>\n" +
-        "      <a:name />\n" +
-        "    </a:author>\n" +
-        "    <a:link rel=\"edit\" href=\"ESCompComp(1)\"/>\n" +
-        "    <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\"\n" +
-        "      term=\"#olingo.odata.test1.ETCompComp\" />\n" +
-        "    <a:content type=\"application/xml\">\n" +
-        "      <m:properties>\n" +
-        "        <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" +
-        "          <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
-        "            <d:PropertyInt16 m:type=\"Int16\">123</d:PropertyInt16>\n" +
-        "            <d:PropertyString>String 1</d:PropertyString>\n" +
-        "          </d:PropertyComp>\n" +
-        "        </d:PropertyComp>\n" +
-        "      </m:properties>\n" +
-        "    </a:content>\n" +
-        "  </a:entry>\n" +
-        "  <a:entry>\n" +
-        "    <a:id>ESCompComp(2)</a:id>\n" +
-        "    <a:title />\n" +
-        "    <a:summary />\n" +
-        "    <a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
-        "    <a:author>\n" +
-        "      <a:name />\n" +
-        "    </a:author>\n" +
-        "    <a:link rel=\"edit\" href=\"ESCompComp(2)\"/>\n" +
-        "    <a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\"\n" +
-        "      term=\"#olingo.odata.test1.ETCompComp\" />\n" +
-        "    <a:content type=\"application/xml\">\n" +
-        "      <m:properties>\n" +
-        "        <d:PropertyComp m:type=\"#olingo.odata.test1.CTCompCompExtended\">\n" +
-        "          <d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
-        "            <d:PropertyInt16 m:type=\"Int16\">987</d:PropertyInt16>\n" +
-        "            <d:PropertyString>String 2</d:PropertyString>\n" +
-        "          </d:PropertyComp>\n" +
-        "        </d:PropertyComp>\n" +
-        "      </m:properties>\n" +
-        "    </a:content>\n" +
-        "  </a:entry>\n" +
-        "</a:feed>\n";
+            "xmlns:m=\"http://docs.oasis-open.org/odata/ns/metadata\"\n" +
+            "xmlns:d=\"http://docs.oasis-open.org/odata/ns/data\" \n" +
+            "m:context=\"$metadata#ESFourKeyAlias" + 
+            "(PropertyComp/PropertyString,PropertyCompComp/PropertyComp)\"\n" +
+            "m:metadata-etag=\"metadataETag\">\n" +
+            "<a:id>http://host/svc/ESFourKeyAlias</a:id>\n" +
+            "<a:entry>\n" +
+                "<a:id>id</a:id>\n" +
+                "<a:title />\n" +
+                "<a:summary />\n" +
+                "<a:updated>" + UPDATED_FORMAT.format(new Date(currentTimeMillis)) + "</a:updated>" +
+                "<a:author>\n" +
+                    "<a:name/>\n" +
+                "</a:author>\n" +
+                "<a:link rel=\"edit\" href=\"id\"/>\n" +
+                "<a:category scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" " +
+                 "term=\"#olingo.odata.test1.ETFourKeyAlias\"/>\n" +
+                "<a:content type=\"application/xml\">\n" +
+                    "<m:properties>\n" +
+                        "<d:PropertyComp m:type=\"#olingo.odata.test1.CTTwoPrim\">\n" +
+                            "<d:PropertyString>Num11</d:PropertyString>\n" +
+                        "</d:PropertyComp>\n" +
+                        "<d:PropertyCompComp m:type=\"#olingo.odata.test1.CTCompComp\">\n" +
+                            "<d:PropertyComp m:type=\"#olingo.odata.test1.CTBase\">\n" +
+                                "<d:PropertyInt16 m:type=\"Int16\">111</d:PropertyInt16>\n" +
+                                "<d:PropertyString>Num111</d:PropertyString>\n" +
+                                "<d:AdditionalPropString>Test123</d:AdditionalPropString>\n" +
+                            "</d:PropertyComp>\n" +
+                        "</d:PropertyCompComp>\n" +
+                    "</m:properties>\n" +
+                "</a:content>\n" +
+            "</a:entry>\n" +
+        "</a:feed>";
     checkXMLEqual(resultString, expected);
   }
 


[2/2] olingo-odata4 git commit: [OLINGO-1004] edm clean up

Posted by ch...@apache.org.
[OLINGO-1004] edm clean up

Signed-off-by: Christian Amend <ch...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/37a1e110
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/37a1e110
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/37a1e110

Branch: refs/heads/master
Commit: 37a1e110c6196c592a86c356fab8237dd12f122f
Parents: d30f47e
Author: Morten Riedel <Mo...@sap.com>
Authored: Tue Aug 16 16:55:57 2016 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Wed Aug 17 09:44:22 2016 +0200

----------------------------------------------------------------------
 .../fit/tecsvc/client/BoundOpearionITCase.java  |  11 +-
 .../server/tecsvc/provider/ActionProvider.java  |  12 +-
 .../tecsvc/provider/ComplexTypeProvider.java    |   4 +-
 .../tecsvc/provider/ContainerProvider.java      |  59 ++-------
 .../tecsvc/provider/EntityTypeProvider.java     |  37 ------
 .../tecsvc/provider/FunctionProvider.java       |  55 ++------
 .../server/tecsvc/provider/SchemaProvider.java  |   9 +-
 .../server/core/PreconditionsValidatorTest.java |   8 +-
 .../json/ODataJsonSerializerTest.java           |   4 -
 .../serializer/xml/MetadataDocumentTest.java    |   7 +-
 .../serializer/xml/ODataXmlSerializerTest.java  |   3 -
 .../core/uri/parser/TestFullResourcePath.java   | 126 ++++++++++---------
 .../core/uri/parser/TestUriParserImpl.java      |   4 +-
 13 files changed, 109 insertions(+), 230 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BoundOpearionITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BoundOpearionITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BoundOpearionITCase.java
index a37ab49..e55a3f7 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BoundOpearionITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BoundOpearionITCase.java
@@ -24,9 +24,7 @@ import static org.junit.Assert.assertNull;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
@@ -78,7 +76,7 @@ public class BoundOpearionITCase extends AbstractParamTecSvcITCase {
 
     List<ClientOperation> ecOperations = entitySet.getOperations();
     assertNotNull(ecOperations);
-    assertEquals(4, ecOperations.size());
+    assertEquals(3, ecOperations.size());
     
     assertEquals("#olingo.odata.test1.BAESAllPrimRTETAllPrim", ecOperations.get(0).getMetadataAnchor());
     assertEquals("olingo.odata.test1.BAESAllPrimRTETAllPrim", ecOperations.get(0).getTitle());
@@ -95,12 +93,7 @@ public class BoundOpearionITCase extends AbstractParamTecSvcITCase {
     assertEquals("olingo.odata.test1.BFNESAllPrimRTCTAllPrim", ecOperations.get(2).getTitle());
     assertEquals("/ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim", 
         ecOperations.get(2).getTarget().toASCIIString());
-    
-    assertEquals("#olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2)", ecOperations.get(3).getMetadataAnchor());
-    assertEquals("olingo.odata.test1.BFNESAllPrimRTCTAllPrim", ecOperations.get(3).getTitle());
-    assertEquals("/ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2=@Param2)", 
-        ecOperations.get(3).getTarget().toASCIIString());
-    
+        
     final List<ClientEntity> entities = entitySet.getEntities();
     assertNotNull(entities);
     assertEquals(3, entities.size());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
index 39244b3..e7ec643 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
@@ -47,8 +47,8 @@ public class ActionProvider {
   public static final FullQualifiedName nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "BAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav");
 
-  public static final FullQualifiedName nameBAETTwoKeyNavRTETTwoKeyNav =
-      new FullQualifiedName(SchemaProvider.NAMESPACE, "BAETTwoKeyNavRTETTwoKeyNav");
+  public static final FullQualifiedName nameBA_RTETTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.NAMESPACE, "BA_RTETTwoKeyNav");
 
   public static final FullQualifiedName nameBAESAllPrimRT =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "BAESAllPrimRT");
@@ -84,7 +84,7 @@ public class ActionProvider {
   public static List<CsdlAction> getBoundActionsForEntityType(FullQualifiedName entityType) throws ODataException {
     FullQualifiedName[] actionNames = {nameBAESAllPrimRTETAllPrim, 
         nameBAESTwoKeyNavRTESTwoKeyNav, nameBAESTwoKeyNavRTESKeyNav, nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav,
-        nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav,nameBAETTwoKeyNavRTETTwoKeyNav,
+        nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav,nameBA_RTETTwoKeyNav,
         nameBAESAllPrimRT,nameBAETAllPrimRT};
     
     List<CsdlAction> actions = new ArrayList<CsdlAction>();
@@ -203,16 +203,16 @@ public class ActionProvider {
                       .setCollection(true)))
               .setReturnType(new CsdlReturnType().setType(PropertyProvider.nameByte)));
 
-    } else if (actionName.equals(nameBAETTwoKeyNavRTETTwoKeyNav)) {
+    } else if (actionName.equals(nameBA_RTETTwoKeyNav)) {
       return Arrays.asList(
-          new CsdlAction().setName(nameBAETTwoKeyNavRTETTwoKeyNav.getName())
+          new CsdlAction().setName("BA_RTETTwoKeyNav")
               .setParameters(Collections.singletonList(
                   new CsdlParameter().setName("ParameterETTwoKeyNav").setType(EntityTypeProvider.nameETTwoKeyNav)
                       .setNullable(false)))
               .setBound(true)
               .setReturnType(new CsdlReturnType().setType(EntityTypeProvider.nameETTwoKeyNav)),
 
-          new CsdlAction().setName(nameBAETTwoKeyNavRTETTwoKeyNav.getName())
+          new CsdlAction().setName("BA_RTETTwoKeyNav")
               .setParameters(Collections.singletonList(
                   new CsdlParameter().setName("ParameterETKeyNav").setType(EntityTypeProvider.nameETKeyNav)
                       .setNullable(false)))

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
index b04b3d1..e93d9b9 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
@@ -141,7 +141,7 @@ public class ComplexTypeProvider {
           .setProperties(Arrays.asList(PropertyProvider.propertyInt16))
           .setNavigationProperties((Arrays.asList(
               PropertyProvider.collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav,
-              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav_WithPartnerERKeyNavOne,
+              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav,
               new CsdlNavigationProperty()
                   .setName("NavPropertyETMediaOne")
                   .setType(EntityTypeProvider.nameETMedia),
@@ -166,8 +166,8 @@ public class ComplexTypeProvider {
           .setName("CTBasePrimCompNav")
           .setBaseType(nameCTPrimComp)
           .setNavigationProperties(Arrays.asList(
-              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav_WithPartnerERKeyNavOne,
               PropertyProvider.collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav,
+              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav,
               PropertyProvider.navPropertyETKeyNavOne_ETKeyNav,
               PropertyProvider.collectionNavPropertyETKeyNavMany_ETKeyNav));
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
index 8dd07a8..459e842 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
@@ -81,15 +81,12 @@ public class ContainerProvider {
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESBase"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESTwoBase"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESTwoKeyTwoPrim"));
-    entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESBaseTwoKeyTwoPrim"));
-    entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESTwoBaseTwoKeyTwoPrim"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESAllKey"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESCompAllPrim"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESCompCollAllPrim"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESCompComp"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESCompCollComp"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESMedia"));
-    entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESKeyTwoKeyComp"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESInvisible"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESServerSidePaging"));
     entitySets.add(prov.getEntitySet(ContainerProvider.nameContainer, "ESAllNullable"));
@@ -140,7 +137,6 @@ public class ContainerProvider {
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTStringTwoParam"));
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTCollStringTwoParam"));
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTCTAllPrimTwoParam"));
-    functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTESMixPrimCollCompTwoParam"));
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTCollETMixPrimCollCompTwoParam"));
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FINRTCollETMixPrimCollCompTwoParam"));
     functionImports.add(prov.getFunctionImport(ContainerProvider.nameContainer, "FICRTCollCTTwoPrim"));
@@ -255,29 +251,7 @@ public class ContainerProvider {
                     .setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String)
                         .setValue("Contains entities with two primitive types with two keys")),
                 new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
-                    new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "false"))));
-
-      } else if (name.equals("ESBaseTwoKeyTwoPrim")) {
-        return new CsdlEntitySet()
-            .setName("ESBaseTwoKeyTwoPrim")
-            .setType(EntityTypeProvider.nameETBaseTwoKeyTwoPrim)
-            .setAnnotations(Arrays.asList(
-                new CsdlAnnotation().setTerm("Core.Description")
-                    .setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String)
-                        .setValue("Contains entities with two primitive types with two keys")),
-                new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
-                    new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "false"))));
-
-      } else if (name.equals("ESTwoBaseTwoKeyTwoPrim")) {
-        return new CsdlEntitySet()
-            .setName("ESTwoBaseTwoKeyTwoPrim")
-            .setType(EntityTypeProvider.nameETTwoBaseTwoKeyTwoPrim)
-            .setAnnotations(Arrays.asList(
-                new CsdlAnnotation().setTerm("Core.Description")
-                    .setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String)
-                        .setValue("Contains entities with two primitive types with two keys")),
-                new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
-                    new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "false"))));
+                    new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "true"))));
 
       } else if (name.equals("ESAllKey")) {
         return new CsdlEntitySet()
@@ -346,17 +320,6 @@ public class ContainerProvider {
                 new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
                     new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "true"))));
 
-      } else if (name.equals("ESKeyTwoKeyComp")) {
-        return new CsdlEntitySet()
-            .setName("ESKeyTwoKeyComp")
-            .setType(EntityTypeProvider.nameETKeyTwoKeyComp)
-            .setAnnotations(Arrays.asList(
-                new CsdlAnnotation().setTerm("Core.Description")
-                    .setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String)
-                        .setValue("Contains Keys with alias")),
-                new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
-                    new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "false"))));
-
       } else if (name.equals("ESInvisible")) {
         return new CsdlEntitySet()
             .setName("ESInvisible")
@@ -499,12 +462,6 @@ public class ContainerProvider {
                     .setPath("CollPropertyCompNav/NavPropertyETMediaMany")
                     .setTarget("ESMedia"),
                 new CsdlNavigationPropertyBinding()
-                    .setPath("NavPropertyETTwoBaseTwoKeyNavOne")
-                    .setTarget("ESBaseTwoKeyNav"),
-                new CsdlNavigationPropertyBinding()
-                    .setPath("ETBaseTwoKeyNav/CollPropertyCompNav/NavPropertyETTwoKeyNavMany")
-                    .setTarget("ESTwoKeyNav"),
-                new CsdlNavigationPropertyBinding()
                     .setPath("ETBaseTwoKeyNav/NavPropertyETTwoBaseTwoKeyNavOne")
                     .setTarget("ESBaseTwoKeyNav"),
                 new CsdlNavigationPropertyBinding()
@@ -651,7 +608,13 @@ public class ContainerProvider {
       } else if (name.equals("ESWithStream")) {
         return new CsdlEntitySet()
             .setName("ESWithStream")
-            .setType(EntityTypeProvider.nameETStream);        
+            .setType(EntityTypeProvider.nameETStream)
+            .setAnnotations(Arrays.asList(
+            new CsdlAnnotation().setTerm("Core.Description")
+                .setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String)
+                    .setValue("Entity set with a stream type")),
+            new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(
+                new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, "true"))));
       }
     }
 
@@ -790,12 +753,6 @@ public class ContainerProvider {
             .setFunction(FunctionProvider.nameUFCRTCTAllPrimTwoParam)
             .setIncludeInServiceDocument(true);
 
-      } else if (name.equals("FICRTESMixPrimCollCompTwoParam")) {
-        return new CsdlFunctionImport()
-            .setName(name)
-            .setFunction(FunctionProvider.nameUFCRTESMixPrimCollCompTwoParam)
-            .setIncludeInServiceDocument(true);
-
       } else if (name.equals("FINRTCollETMixPrimCollCompTwoParam")) {
         return new CsdlFunctionImport()
             .setName(name)

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
index 10f3971..c327e8f 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
@@ -61,8 +61,6 @@ public class EntityTypeProvider {
       "ETKeyNavCont");
   public static final FullQualifiedName nameETTwoKeyNavCont = new FullQualifiedName(SchemaProvider.NAMESPACE,
       "ETTwoKeyNavCont");
-  public static final FullQualifiedName nameETKeyTwoKeyComp = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "ETKeyTwoKeyComp");
   public static final FullQualifiedName nameETMedia = new FullQualifiedName(SchemaProvider.NAMESPACE, "ETMedia");
   public static final FullQualifiedName nameETMixPrimCollComp = new FullQualifiedName(SchemaProvider.NAMESPACE,
       "ETMixPrimCollComp");
@@ -78,9 +76,6 @@ public class EntityTypeProvider {
   public static final FullQualifiedName nameETTwoKeyTwoPrim = new FullQualifiedName(SchemaProvider.NAMESPACE,
       "ETTwoKeyTwoPrim");
   public static final FullQualifiedName nameETTwoPrim = new FullQualifiedName(SchemaProvider.NAMESPACE, "ETTwoPrim");
-  public static final FullQualifiedName nameETAbstract = new FullQualifiedName(SchemaProvider.NAMESPACE, "ETAbstract");
-  public static final FullQualifiedName nameETAbstractBase = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "ETAbstractBase");
 
   public static final FullQualifiedName nameETMixEnumDefCollComp = new FullQualifiedName(SchemaProvider.NAMESPACE,
       "ETMixEnumDefCollComp");
@@ -246,26 +241,6 @@ public class EntityTypeProvider {
           .setProperties(Arrays.asList(PropertyProvider.propertyInt16_NotNullable))
           .setHasStream(true);
 
-    } else if (entityTypeName.equals(nameETKeyTwoKeyComp)) {
-      return new CsdlEntityType()
-          .setName("ETKeyTwoKeyComp")
-          .setKey(Arrays.asList(
-              new CsdlPropertyRef()
-                  .setName("PropertyInt16"),
-              new CsdlPropertyRef()
-                  .setName("PropertyComp/PropertyInt16")
-                  .setAlias("KeyAlias1"),
-              new CsdlPropertyRef()
-                  .setName("PropertyComp/PropertyString")
-                  .setAlias("KeyAlias2"),
-              new CsdlPropertyRef()
-                  .setName("PropertyCompComp/PropertyComp/PropertyString")
-                  .setAlias("KeyAlias3")))
-          .setProperties(
-              Arrays.asList(
-                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComp_CTTwoPrim,
-                  PropertyProvider.propertyCompComp_CTCompComp));
-
     } else if (entityTypeName.equals(nameETServerSidePaging)) {
       return new CsdlEntityType()
           .setName(nameETServerSidePaging.getName())
@@ -447,19 +422,7 @@ public class EntityTypeProvider {
           .setProperties(
               Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
                   PropertyProvider.propertyMixedPrimCollComp_CTMixPrimCollComp));
-    } else if (entityTypeName.equals(nameETAbstract)) {
-      return new CsdlEntityType()
-          .setName("ETAbstract")
-          .setAbstract(true)
-          .setProperties(Arrays.asList(PropertyProvider.propertyString));
 
-    } else if (entityTypeName.equals(nameETAbstractBase)) {
-      return new CsdlEntityType()
-          .setName("ETAbstractBase")
-          .setBaseType(nameETAbstract)
-          .setKey(Arrays.asList(new CsdlPropertyRef().setName("PropertyInt16")))
-          .setProperties(Arrays.asList(
-              PropertyProvider.propertyInt16_NotNullable));
     } else if (entityTypeName.equals(nameETMixEnumDefCollComp)) {
       return new CsdlEntityType()
           .setName(nameETMixEnumDefCollComp.getName())

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
index 69d179d..f40bd7f 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
@@ -76,8 +76,8 @@ public class FunctionProvider {
   public static final FullQualifiedName nameBFCESTwoKeyNavRTCTTwoPrim =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "BFCESTwoKeyNavRTCTTwoPrim");
 
-  public static final FullQualifiedName nameBFCESTwoKeyNavRTESTwoKeyNav =
-      new FullQualifiedName(SchemaProvider.NAMESPACE, "BFCESTwoKeyNavRTESTwoKeyNav");
+  public static final FullQualifiedName nameBFC_RTESTwoKeyNav_ =
+      new FullQualifiedName(SchemaProvider.NAMESPACE, "BFC_RTESTwoKeyNav_");
 
   public static final FullQualifiedName nameBFCESTwoKeyNavRTString =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "BFCESTwoKeyNavRTString");
@@ -142,8 +142,6 @@ public class FunctionProvider {
       "UFCRTCTTwoPrim");
   public static final FullQualifiedName nameUFCRTCTTwoPrimTwoParam =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "UFCRTCTTwoPrimTwoParam");
-  public static final FullQualifiedName nameUFCRTESMixPrimCollCompTwoParam =
-      new FullQualifiedName(SchemaProvider.NAMESPACE, "UFCRTESMixPrimCollCompTwoParam");
   public static final FullQualifiedName nameUFCRTCollETTwoKeyNavParam =
       new FullQualifiedName(SchemaProvider.NAMESPACE, "UFCRTCollETTwoKeyNavParam");
   public static final FullQualifiedName nameUFCRTETAllPrimTwoParam =
@@ -204,7 +202,7 @@ public class FunctionProvider {
         nameBFCESTwoKeyNavRTCollCTTwoPrim,
         nameBFCESTwoKeyNavRTCollString,
         nameBFCESTwoKeyNavRTCTTwoPrim,
-        nameBFCESTwoKeyNavRTESTwoKeyNav,
+        nameBFC_RTESTwoKeyNav_,
         nameBFCESTwoKeyNavRTString,
         nameBFCESTwoKeyNavRTStringParam,
         nameBFCESTwoKeyNavRTTwoKeyNav,
@@ -329,7 +327,6 @@ public class FunctionProvider {
       return Collections.singletonList(
           new CsdlFunction()
               .setName("UFCRTCollETKeyNavContParam")
-              .setBound(true)
               .setComposable(true)
               .setParameters(Collections.singletonList(
                   new CsdlParameter().setName("ParameterInt16")
@@ -398,9 +395,9 @@ public class FunctionProvider {
               .setComposable(false)
               .setBound(false)
               .setReturnType(
-                  new CsdlReturnType().setType(ComplexTypeProvider.nameCTMixPrimCollComp)
-                      .setNullable(false)
-                      .setCollection(true)));
+                    new CsdlReturnType().setType(EntityTypeProvider.nameETMixPrimCollComp)
+                       .setNullable(false)
+                       .setCollection(true)));
 
     } else if (functionName.equals(nameUFNRTByteNineParam)) {
       return Collections.singletonList(
@@ -503,7 +500,8 @@ public class FunctionProvider {
                           .setNullable(false),
                       new CsdlParameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)
                           .setNullable(false)))
-              .setComposable(false)
+              .setComposable(true)
+              .setBound(false)
               .setReturnType(
                   new CsdlReturnType().setType(EntityTypeProvider.nameETMixPrimCollComp).setCollection(true)
                       .setNullable(false)));
@@ -522,21 +520,6 @@ public class FunctionProvider {
               .setReturnType(
                   new CsdlReturnType().setType(EntityTypeProvider.nameETAllPrim).setNullable(false)));
 
-    } else if (functionName.equals(nameUFCRTESMixPrimCollCompTwoParam)) {
-      return Collections.singletonList(
-          new CsdlFunction()
-              .setName(functionName.getName())
-              .setParameters(
-                  Arrays.asList(
-                      new CsdlParameter().setName("ParameterString").setType(PropertyProvider.nameString)
-                          .setNullable(false),
-                      new CsdlParameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)
-                          .setNullable(false)))
-              .setComposable(true)
-              .setReturnType(
-                  new CsdlReturnType().setType(EntityTypeProvider.nameETMixPrimCollComp).setCollection(true)
-                      .setNullable(false)));
-
     } else if (functionName.equals(nameUFNRTCollCTNavFiveProp)) {
       return Collections.singletonList(
           new CsdlFunction()
@@ -544,10 +527,10 @@ public class FunctionProvider {
               .setReturnType(
                   new CsdlReturnType().setType(ComplexTypeProvider.nameCTNavFiveProp).setCollection(true)));
 
-    } else if (functionName.equals(nameBFCESTwoKeyNavRTESTwoKeyNav)) {
+    } else if (functionName.equals(nameBFC_RTESTwoKeyNav_)) {
       return Arrays.asList(
           new CsdlFunction()
-              .setName("BFCESTwoKeyNavRTESTwoKeyNav")
+              .setName(nameBFC_RTESTwoKeyNav_.getName())
               .setEntitySetPath("BindingParam/NavPropertyETTwoKeyNavMany")
               .setBound(true)
               .setParameters(Collections.singletonList(
@@ -559,7 +542,7 @@ public class FunctionProvider {
                       .setNullable(false)),
 
           new CsdlFunction()
-              .setName("BFCESTwoKeyNavRTESTwoKeyNav")
+              .setName(nameBFC_RTESTwoKeyNav_.getName())
               .setBound(true)
               .setParameters(Arrays.asList(
                   new CsdlParameter().setName("BindingParam").setType(EntityTypeProvider.nameETTwoKeyNav)
@@ -572,7 +555,7 @@ public class FunctionProvider {
                       .setNullable(false)),
 
           new CsdlFunction()
-              .setName("BFCESTwoKeyNavRTESTwoKeyNav")
+              .setName(nameBFC_RTESTwoKeyNav_.getName())
               .setBound(true)
               .setParameters(Collections.singletonList(
                   new CsdlParameter().setName("BindingParam").setType(EntityTypeProvider.nameETKeyNav)
@@ -628,19 +611,7 @@ public class FunctionProvider {
                       .setCollection(true).setNullable(false)))
               .setComposable(false)
               .setReturnType(
-                  new CsdlReturnType().setType(ComplexTypeProvider.nameCTAllPrim).setNullable(false)),
-              new CsdlFunction()
-              .setName("BFNESAllPrimRTCTAllPrim")
-              .setBound(true)
-              .setParameters(Arrays.asList(
-                  new CsdlParameter().setName("BindingParam").setType(EntityTypeProvider.nameETAllPrim)
-                      .setCollection(true).setNullable(false),
-                  new CsdlParameter().setName("Param2").setType(PropertyProvider.nameInt16)
-                  .setCollection(true).setNullable(false)))
-              .setComposable(false)
-              .setReturnType(
-                  new CsdlReturnType().setType(ComplexTypeProvider.nameCTAllPrim).setNullable(false))              
-          );
+                  new CsdlReturnType().setType(ComplexTypeProvider.nameCTAllPrim).setNullable(false)));
 
     } else if (functionName.equals(nameBFCESTwoKeyNavRTCTTwoPrim)) {
       return Collections.singletonList(

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
index 062b125..eb998b3 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
@@ -83,9 +83,8 @@ public class SchemaProvider {
     entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoKeyNavCont));
     entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompMixPrimCollComp));
     entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyPrimNav));
-    entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstract));
-    entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstractBase));
-
+    entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETStream));
+    
     // ComplexTypes
     List<CsdlComplexType> complexTypes = new ArrayList<CsdlComplexType>();
     schema.setComplexTypes(complexTypes);
@@ -109,7 +108,7 @@ public class SchemaProvider {
     // Actions
     List<CsdlAction> actions = new ArrayList<CsdlAction>();
     schema.setActions(actions);
-    actions.addAll(prov.getActions(ActionProvider.nameBAETTwoKeyNavRTETTwoKeyNav));
+    actions.addAll(prov.getActions(ActionProvider.nameBA_RTETTwoKeyNav));
     actions.addAll(prov.getActions(ActionProvider.nameBAESAllPrimRTETAllPrim));
     actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESTwoKeyNav));
     actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESKeyNav));
@@ -158,7 +157,7 @@ public class SchemaProvider {
     functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETKeyNavContParam));
     functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTByteNineParam));
 
-    functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(prov.getFunctions(FunctionProvider.nameBFC_RTESTwoKeyNav_));
     functions.addAll(prov.getFunctions(FunctionProvider.nameBFCStringRTESTwoKeyNav));
     functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETBaseTwoKeyNavRTETTwoKeyNav));
     functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESBaseTwoKeyNavRTESBaseTwoKey));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/PreconditionsValidatorTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/PreconditionsValidatorTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/PreconditionsValidatorTest.java
index 1765ac3..4d73a4d 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/PreconditionsValidatorTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/PreconditionsValidatorTest.java
@@ -105,13 +105,13 @@ public class PreconditionsValidatorTest {
 
   @Test
   public void boundActionOnEsKeyNav() throws Exception {
-    assertTrue(mustValidate("ESKeyNav(1)/Namespace1_Alias.BAETTwoKeyNavRTETTwoKeyNav", "ESKeyNav"));
+    assertTrue(mustValidate("ESKeyNav(1)/Namespace1_Alias.BA_RTETTwoKeyNav", "ESKeyNav"));
   }
 
   @Test
   public void boundActionOnEsKeyNavWithNavigation() throws Exception {
     assertTrue(
-        mustValidate("ESKeyNav(1)/NavPropertyETKeyNavOne/Namespace1_Alias.BAETTwoKeyNavRTETTwoKeyNav", "ESKeyNav"));
+        mustValidate("ESKeyNav(1)/NavPropertyETKeyNavOne/Namespace1_Alias.BA_RTETTwoKeyNav", "ESKeyNav"));
   }
 
   @Test
@@ -131,12 +131,12 @@ public class PreconditionsValidatorTest {
 
   @Test
   public void singletonWithAction() throws Exception {
-    assertTrue(mustValidate("SINav/Namespace1_Alias.BAETTwoKeyNavRTETTwoKeyNav", "SINav"));
+    assertTrue(mustValidate("SINav/Namespace1_Alias.BA_RTETTwoKeyNav", "SINav"));
   }
 
   @Test
   public void singletonWithActionAndNavigation() throws Exception {
-    assertTrue(mustValidate("SINav/NavPropertyETKeyNavOne/Namespace1_Alias.BAETTwoKeyNavRTETTwoKeyNav", "ESKeyNav"));
+    assertTrue(mustValidate("SINav/NavPropertyETKeyNavOne/Namespace1_Alias.BA_RTETTwoKeyNav", "ESKeyNav"));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
index 22b8807..dae060a 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
@@ -197,10 +197,6 @@ public class ODataJsonSerializerTest {
           "\"title\":\"olingo.odata.test1.BFNESAllPrimRTCTAllPrim\"," + 
           "\"target\":\"ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim\"" + 
         "}," + 
-        "\"#olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2)\":{" + 
-          "\"title\":\"olingo.odata.test1.BFNESAllPrimRTCTAllPrim\"," + 
-          "\"target\":\"ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2=@Param2)\"" + 
-        "}," + 
         "\"value\":[" + 
           "{" + 
             "\"@odata.type\":\"#olingo.odata.test1.ETAllPrim\"," + 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
index 2b7a5fd..a8ea4b5 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
@@ -92,7 +92,7 @@ public class MetadataDocumentTest {
     assertThat(metadata, containsString("<Action Name=\"UARTCTTwoPrimParam\" IsBound=\"false\">"
         + "<Parameter Name=\"ParameterInt16\" Type=\"Edm.Int16\" Nullable=\"false\"/>"
         + "<ReturnType Type=\"Namespace1_Alias.CTTwoPrim\" Nullable=\"false\"/></Action>"));
-
+    
     assertThat(metadata,
         containsString("<Action Name=\"BAESAllPrimRTETAllPrim\" IsBound=\"true\">"
             + "<Parameter Name=\"ParameterESAllPrim\" "
@@ -104,7 +104,7 @@ public class MetadataDocumentTest {
             + "<ReturnType Type=\"Edm.Int16\"/></Function>"));
 
     assertThat(metadata,
-        containsString("<Function Name=\"BFCESTwoKeyNavRTESTwoKeyNav\" "
+        containsString("<Function Name=\"BFC_RTESTwoKeyNav_\" "
             + "EntitySetPath=\"BindingParam/NavPropertyETTwoKeyNavMany\" IsBound=\"true\" IsComposable=\"true\">"
             + "<Parameter Name=\"BindingParam\" Type=\"Collection(Namespace1_Alias.ETTwoKeyNav)\" "
             + "Nullable=\"false\"/>"
@@ -137,9 +137,6 @@ public class MetadataDocumentTest {
 
     // BaseTypeCheck
     assertThat(metadata, containsString("<EntityType Name=\"ETBase\" BaseType=\"Namespace1_Alias.ETTwoPrim\">"));
-    assertThat(metadata, containsString("<EntityType Name=\"ETAbstract\" Abstract=\"true\">"));
-    assertThat(metadata,
-        containsString("<EntityType Name=\"ETAbstractBase\" BaseType=\"Namespace1_Alias.ETAbstract\">"));
 
     // TypeDefCheck
     assertThat(metadata,

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
index e9928dd..381f862 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializerTest.java
@@ -193,9 +193,6 @@ public class ODataXmlSerializerTest {
         "   <m:function metadata=\"#olingo.odata.test1.BFNESAllPrimRTCTAllPrim\" "
         + "title=\"olingo.odata.test1.BFNESAllPrimRTCTAllPrim\" "
         + "target=\"ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim\" />\n" + 
-        "   <m:function metadata=\"#olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2)\" "
-        + "title=\"olingo.odata.test1.BFNESAllPrimRTCTAllPrim\" "
-        + "target=\"ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim(Param2=@Param2)\" />\n" + 
         "   <a:entry>\n" + 
         "      <a:id>ESAllPrim(32767)</a:id>\n" + 
         "      <a:title />\n" + 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java
index 82335a3..53e9c88 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java
@@ -137,7 +137,7 @@ public class TestFullResourcePath {
   @Test
   public void functionBound_varOverloading() throws Exception {
     // on ESTwoKeyNav
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()").goPath()
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()").goPath()
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
         .isType(EntityTypeProvider.nameETTwoKeyNav, true)
@@ -146,7 +146,7 @@ public class TestFullResourcePath {
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
     // with string parameter
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='ABC')").goPath()
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_(ParameterString='ABC')").goPath()
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
         .isType(EntityTypeProvider.nameETTwoKeyNav, true)
@@ -155,7 +155,7 @@ public class TestFullResourcePath {
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
     // with string parameter
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()").goPath()
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()").goPath()
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
         .isType(EntityTypeProvider.nameETTwoKeyNav, true)
@@ -335,14 +335,14 @@ public class TestFullResourcePath {
         .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBaseTwoKeyNav);
 
     testUri.run("ESTwoKeyNav"
-        + "/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()"
+        + "/olingo.odata.test1.BFC_RTESTwoKeyNav_()"
         + "/olingo.odata.test1.ETBaseTwoKeyNav(PropertyInt16=1,PropertyString='2')"
         + "/olingo.odata.test1.ETTwoBaseTwoKeyNav")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isType(EntityTypeProvider.nameETTwoKeyNav)
         .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav)
         .isKeyPredicate(0, "PropertyInt16", "1")
@@ -515,13 +515,13 @@ public class TestFullResourcePath {
         .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav);
 
     testUri
-        .run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()(PropertyInt16=1,PropertyString='2')"
+        .run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()(PropertyInt16=1,PropertyString='2')"
             + "/NavPropertyETTwoKeyNavOne/olingo.odata.test1.ETTwoBaseTwoKeyNav")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isType(EntityTypeProvider.nameETTwoKeyNav, false)
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'")
@@ -635,56 +635,56 @@ public class TestFullResourcePath {
   @Test
   public void runBfuncBnEsRtEs() throws Exception {
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='2')")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_(ParameterString='2')")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isParameter(0, "ParameterString", "'2'")
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
-    testUri.run("ESKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='3')")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_(ParameterString='3')")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isParameter(0, "ParameterString", "'3'")
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()/$count")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()/$count")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isType(EntityTypeProvider.nameETTwoKeyNav)
         .n()
         .isCount();
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()(PropertyInt16=1,PropertyString='2')")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()(PropertyInt16=1,PropertyString='2')")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .n()
-        .isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
+        .isFunction("BFC_RTESTwoKeyNav_")
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'");
 
@@ -845,22 +845,22 @@ public class TestFullResourcePath {
   @Test
   public void runActionBound_on_EntityEntry() throws Exception {
 
-    testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.BAETTwoKeyNavRTETTwoKeyNav")
+    testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.BA_RTETTwoKeyNav")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESTwoKeyNav")
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'")
         .n()
-        .isAction("BAETTwoKeyNavRTETTwoKeyNav");
+        .isAction("BA_RTETTwoKeyNav");
 
-    testUri.run("ESKeyNav(PropertyInt16=1)/olingo.odata.test1.BAETTwoKeyNavRTETTwoKeyNav")
+    testUri.run("ESKeyNav(PropertyInt16=1)/olingo.odata.test1.BA_RTETTwoKeyNav")
         .isKind(UriInfoKind.resource).goPath()
         .first()
         .isEntitySet("ESKeyNav")
         .isKeyPredicate(0, "PropertyInt16", "1")
         .n()
-        .isAction("BAETTwoKeyNavRTETTwoKeyNav");
+        .isAction("BA_RTETTwoKeyNav");
   }
 
   @Test
@@ -931,7 +931,7 @@ public class TestFullResourcePath {
         .isType(EntityTypeProvider.nameETTwoKeyNav);
 
     // on collection of entity
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .goPath()
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
@@ -1215,24 +1215,7 @@ public class TestFullResourcePath {
 
   @Test
   public void runNonComposableFunctions() throws Exception {
-    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')")
-        .isKind(UriInfoKind.resource)
-        .goPath().first()
-        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
-        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
-        .isParameter(0, "ParameterInt16", "1")
-        .isParameter(1, "ParameterString", "'1'");
-
-    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')(0)")
-        .isKind(UriInfoKind.resource)
-        .goPath().first()
-        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
-        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
-        .isParameter(0, "ParameterInt16", "1")
-        .isParameter(1, "ParameterString", "'1'");
 
-    testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')(0)/PropertyInt16")
-        .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
 
     testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1");
     testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$top=1");
@@ -1253,6 +1236,13 @@ public class TestFullResourcePath {
     testUri.runEx("ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim()"
         + "/PropertyString")
         .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
+    
+    testUri.runEx("FINRTByteNineParam(ParameterEnum=Namespace1_Alias.ENString'String1',"
+        + "CollParameterETTwoPrim=@collComp,ParameterComp=@comp,ParameterDef='key1',"
+        + "ParameterETTwoPrim=@comp,CollParameterDef=@collDef,CollParameterByte=@collByte,"
+        + "CollParameterComp=@collComp,CollParameterEnum=@collEnum)/$value?@comp={\"PropertyInt16\":1}"
+        + "&@collByte=[1]&@collEnum=[\"String1,String1\"]&@collDef=[\"Test\"]&@collComp=[{\"PropertyInt16\":11}]")
+        .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
   }
 
   @Test
@@ -2081,34 +2071,50 @@ public class TestFullResourcePath {
 
   @Test
   public void runFunctionImpEs() throws Exception {
-    testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
         .isKind(UriInfoKind.resource).goPath()
         .first()
-        .isFunctionImport("FICRTESMixPrimCollCompTwoParam")
-        .isFunction("UFCRTESMixPrimCollCompTwoParam")
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
+        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
         .isParameter(0, "ParameterInt16", "1")
         .isParameter(1, "ParameterString", "'2'")
         .isType(EntityTypeProvider.nameETMixPrimCollComp);
 
-    testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
         .isKind(UriInfoKind.resource).goPath()
         .first()
-        .isFunctionImport("FICRTESMixPrimCollCompTwoParam")
-        .isFunction("UFCRTESMixPrimCollCompTwoParam")
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
+        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
         .isParameter(0, "ParameterInt16", "1")
         .isParameter(1, "ParameterString", "'2'")
         .isType(EntityTypeProvider.nameETMixPrimCollComp);
 
-    testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')/$count")
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')/$count")
         .isKind(UriInfoKind.resource).goPath()
         .first()
-        .isFunctionImport("FICRTESMixPrimCollCompTwoParam")
-        .isFunction("UFCRTESMixPrimCollCompTwoParam")
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
+        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
         .isParameter(0, "ParameterInt16", "1")
         .isParameter(1, "ParameterString", "'2'")
         .isType(EntityTypeProvider.nameETMixPrimCollComp)
         .n()
         .isCount();
+    
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')")
+        .isKind(UriInfoKind.resource)
+        .goPath().first()
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
+        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
+        .isParameter(0, "ParameterInt16", "1")
+        .isParameter(1, "ParameterString", "'1'");
+
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')(0)")
+        .isKind(UriInfoKind.resource)
+        .goPath().first()
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
+        .isFunction("UFCRTCollETMixPrimCollCompTwoParam")
+        .isParameter(0, "ParameterInt16", "1")
+        .isParameter(1, "ParameterString", "'1'");
   }
 
   @Test
@@ -3110,10 +3116,10 @@ public class TestFullResourcePath {
         .goPath().first()
         .isSingleton("SINav");
 
-    testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
+    testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
         .isKind(UriInfoKind.resource)
         .goPath()
-        .isFunctionImport("FICRTESMixPrimCollCompTwoParam")
+        .isFunctionImport("FICRTCollETMixPrimCollCompTwoParam")
         .isType(EntityTypeProvider.nameETMixPrimCollComp)
         .isParameter(0, "ParameterInt16", "1")
         .isParameter(1, "ParameterString", "'2'");
@@ -3189,11 +3195,11 @@ public class TestFullResourcePath {
         .isEntitySet("ESKeyNav")
         .n().isRef();
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .isKind(UriInfoKind.resource)
         .goPath().first()
         .isEntitySet("ESTwoKeyNav")
-        .n().isFunction("BFCESTwoKeyNavRTESTwoKeyNav");
+        .n().isFunction("BFC_RTESTwoKeyNav_");
 
     testUri.run("ESAllPrim/olingo.odata.test1.BAESAllPrimRTETAllPrim")
         .isKind(UriInfoKind.resource)
@@ -3201,11 +3207,11 @@ public class TestFullResourcePath {
         .isEntitySet("ESAllPrim")
         .n().isAction("BAESAllPrimRTETAllPrim");
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .isKind(UriInfoKind.resource)
         .goPath().first()
         .isEntitySet("ESTwoKeyNav")
-        .n().isFunction("BFCESTwoKeyNavRTESTwoKeyNav");
+        .n().isFunction("BFC_RTESTwoKeyNav_");
 
     testUri.run("ESTwoKeyNav/olingo.odata.test1.ETBaseTwoKeyNav")
         .isKind(UriInfoKind.resource)
@@ -3254,11 +3260,11 @@ public class TestFullResourcePath {
         .isEntitySet("ESAllPrim")
         .n().isAction("BAESAllPrimRTETAllPrim");
 
-    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()")
+    testUri.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_()")
         .isKind(UriInfoKind.resource)
         .goPath().first()
         .isEntitySet("ESTwoKeyNav")
-        .n().isFunction("BFCESTwoKeyNavRTESTwoKeyNav");
+        .n().isFunction("BFC_RTESTwoKeyNav_");
 
     testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav")
         .isKind(UriInfoKind.resource)
@@ -5600,7 +5606,7 @@ public class TestFullResourcePath {
         + "/olingo.odata.test1.CTBase/olingo.odata.test1.CTBase")
         .isExSemantic(MessageKeys.TYPE_FILTER_NOT_CHAINABLE);
 
-    testUri.runEx("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav")
+    testUri.runEx("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_")
         .isExSemantic(MessageKeys.UNKNOWN_TYPE);
 
     // $ref
@@ -5615,7 +5621,7 @@ public class TestFullResourcePath {
     testUri.runEx(ContainerProvider.AIRTCT_TWO_PRIM_PARAM + "/PropertyInt16")
         .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
     testUri.runEx("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/"
-        + "olingo.odata.test1.BAETTwoKeyNavRTETTwoKeyNav/olingo.odata.test1.ETTwoKeyNav")
+        + "olingo.odata.test1.BA_RTETTwoKeyNav/olingo.odata.test1.ETTwoKeyNav")
         .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
     testUri.runEx("ESTwoKeyNav/olingo.odata.test1.BAESTwoKeyNavRTESTwoKeyNav/$count")
         .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/37a1e110/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestUriParserImpl.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestUriParserImpl.java
index c38fba5..6c7feec 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestUriParserImpl.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestUriParserImpl.java
@@ -74,13 +74,13 @@ public class TestUriParserImpl {
     .at(1).isUriPathInfoKind(UriResourceKind.function);
 
     // one input
-    testRes.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='ABC')")
+    testRes.run("ESTwoKeyNav/olingo.odata.test1.BFC_RTESTwoKeyNav_(ParameterString='ABC')")
     .at(0).isUriPathInfoKind(UriResourceKind.entitySet)
     .at(1).isUriPathInfoKind(UriResourceKind.function)
     .isParameter(0, "ParameterString", "'ABC'");
 
     // two input
-    testRes.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
+    testRes.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')")
     .at(0)
     .isUriPathInfoKind(UriResourceKind.function)
     .isParameter(0, "ParameterInt16", "1")