Repository: olingo-odata4
Updated Branches:
  refs/heads/master cd23eb96f -> 05cbf674f


[OLINGO-424] Fix: The client proxy sets entity type segements to the right 
position


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

Branch: refs/heads/master
Commit: 935a9b84b9ac2a6b2fafa73ac0ad7cfabf3f36c5
Parents: cd23eb9
Author: Christian Holzer <[email protected]>
Authored: Thu Apr 16 16:32:33 2015 +0200
Committer: Christian Holzer <[email protected]>
Committed: Tue Apr 21 16:57:29 2015 +0200

----------------------------------------------------------------------
 .../commons/EntitySetInvocationHandler.java     |   9 +-
 .../org/apache/olingo/fit/AbstractServices.java |  62 ++--
 .../java/org/apache/olingo/fit/V4Services.java  |   2 +-
 .../filter/(PersonID lt 4).full.json            |  84 +++++
 .../filter/(PersonID lt 4).xml                  |  68 ++++
 .../feed.full.json                              | 333 +++++++++++++++++++
 .../feed.xml                                    | 219 ++++++++++++
 .../olingo/fit/proxy/v4/FilterTestITCase.java   |  23 +-
 8 files changed, 770 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
----------------------------------------------------------------------
diff --git 
a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
 
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
index 6b7ff9c..2f943d6 100644
--- 
a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
+++ 
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
@@ -169,20 +169,19 @@ public class EntitySetInvocationHandler<
     final Class<S> oref = (Class<S>) 
ClassUtils.extractTypeArg(this.collItemRef,
             AbstractEntitySet.class, AbstractSingleton.class, 
EntityCollection.class);
 
-    final URIBuilder uriBuilder = 
getClient().newURIBuilder(this.uri.build().toASCIIString());
-
+    
     if (!oref.equals(ref)) {
-      uriBuilder.appendDerivedEntityTypeSegment(new FullQualifiedName(
+      uri.appendDerivedEntityTypeSegment(new FullQualifiedName(
               ClassUtils.getNamespace(ref), 
ClassUtils.getEntityTypeName(ref)).toString());
     }
 
     final List<ODataAnnotation> anns = new ArrayList<ODataAnnotation>();
 
-    final Triple<List<T>, URI, List<ODataAnnotation>> entitySet = 
fetchPartial(uriBuilder.build(), (Class<T>) ref);
+    final Triple<List<T>, URI, List<ODataAnnotation>> entitySet = 
fetchPartial(uri.build(), (Class<T>) ref);
     anns.addAll(entitySet.getRight());
 
     final EntityCollectionInvocationHandler<S> entityCollectionHandler = new 
EntityCollectionInvocationHandler<S>(
-            service, (List<S>) entitySet.getLeft(), collTypeRef, this.baseURI, 
uriBuilder);
+            service, (List<S>) entitySet.getLeft(), collTypeRef, this.baseURI, 
uri);
     entityCollectionHandler.setAnnotations(anns);
 
     entityCollectionHandler.nextPageURI = entitySet.getMiddle();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java 
b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
index 01f0d92..b04e7ed 100644
--- a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
+++ b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
@@ -927,23 +927,10 @@ public abstract class AbstractServices {
       return xml.createFaultResponse(accept, e);
     }
   }
-
-  /**
-   * Retrieve entity set or function execution sample.
-   *
-   * @param accept Accept header.
-   * @param name entity set or function name.
-   * @param format format query option.
-   * @param count inlinecount query option.
-   * @param filter filter query option.
-   * @param orderby orderby query option.
-   * @param skiptoken skiptoken query option.
-   * @return entity set or function result.
-   */
+  
   @GET
-  @Path("/{name}")
-  public Response getEntitySet(
-      @Context final UriInfo uriInfo,
+  @Path("/{name}/{type:[a-zA-Z].*}")
+  public Response getEntitySet(@Context final UriInfo uriInfo,
       @HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String 
accept,
       @PathParam("name") final String name,
       @QueryParam("$top") @DefaultValue(StringUtils.EMPTY) final String top,
@@ -952,8 +939,9 @@ public abstract class AbstractServices {
       @QueryParam("$inlinecount") @DefaultValue(StringUtils.EMPTY) final 
String count,
       @QueryParam("$filter") @DefaultValue(StringUtils.EMPTY) final String 
filter,
       @QueryParam("$orderby") @DefaultValue(StringUtils.EMPTY) final String 
orderby,
-      @QueryParam("$skiptoken") @DefaultValue(StringUtils.EMPTY) final String 
skiptoken) {
-
+      @QueryParam("$skiptoken") @DefaultValue(StringUtils.EMPTY) final String 
skiptoken,
+      @PathParam("type") final String type) {
+    
     try {
       final Accept acceptType;
       if (StringUtils.isNotBlank(format)) {
@@ -971,13 +959,17 @@ public abstract class AbstractServices {
         if (acceptType == Accept.XML || acceptType == Accept.TEXT) {
           throw new UnsupportedMediaTypeException("Unsupported media type");
         }
-
+        
         // search for entitySet ...
         final String basePath = name + File.separatorChar;
 
         final StringBuilder builder = new StringBuilder();
         builder.append(basePath);
-
+        
+        if(type != null) {
+          builder.append(type).append(File.separatorChar);
+        }
+        
         if (StringUtils.isNotBlank(orderby)) {
           
builder.append(Constants.get(ConstantKey.ORDERBY)).append(File.separatorChar).
               append(orderby).append(File.separatorChar);
@@ -1039,6 +1031,36 @@ public abstract class AbstractServices {
       return xml.createFaultResponse(accept, e);
     }
   }
+  
+  
+  /**
+   * Retrieve entity set or function execution sample.
+   *
+   * @param accept Accept header.
+   * @param name entity set or function name.
+   * @param format format query option.
+   * @param count inlinecount query option.
+   * @param filter filter query option.
+   * @param orderby orderby query option.
+   * @param skiptoken skiptoken query option.
+   * @return entity set or function result.
+   */
+  @GET
+  @Path("/{name}")
+  public Response getEntitySet(
+      @Context final UriInfo uriInfo,
+      @HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String 
accept,
+      @PathParam("name") final String name,
+      @QueryParam("$top") @DefaultValue(StringUtils.EMPTY) final String top,
+      @QueryParam("$skip") @DefaultValue(StringUtils.EMPTY) final String skip,
+      @QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String 
format,
+      @QueryParam("$inlinecount") @DefaultValue(StringUtils.EMPTY) final 
String count,
+      @QueryParam("$filter") @DefaultValue(StringUtils.EMPTY) final String 
filter,
+      @QueryParam("$orderby") @DefaultValue(StringUtils.EMPTY) final String 
orderby,
+      @QueryParam("$skiptoken") @DefaultValue(StringUtils.EMPTY) final String 
skiptoken) {
+
+    return getEntitySet(uriInfo, accept, name, top, skip, format, count, 
filter, orderby, skiptoken, null);
+  }
 
   protected abstract void setInlineCount(final EntityCollection feed, final 
String count);
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/java/org/apache/olingo/fit/V4Services.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/V4Services.java 
b/fit/src/main/java/org/apache/olingo/fit/V4Services.java
index 4a41002..711cdf0 100644
--- a/fit/src/main/java/org/apache/olingo/fit/V4Services.java
+++ b/fit/src/main/java/org/apache/olingo/fit/V4Services.java
@@ -395,7 +395,7 @@ public class V4Services extends AbstractServices {
             ? super.getEntityInternal(
                 uriInfo.getRequestUri().toASCIIString(), accept, "People", 
type, format, null, null)
             : super.getEntitySet(accept, "People", type)
-        : super.getEntitySet(uriInfo, accept, "People", top, skip, format, 
count, filter, orderby, skiptoken);
+        : super.getEntitySet(uriInfo, accept, "People", top, skip, format, 
count, filter, orderby, skiptoken, type);
   }
 
   @GET

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).full.json
----------------------------------------------------------------------
diff --git 
a/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).full.json 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).full.json
new file mode 100644
index 0000000..60ce2fe
--- /dev/null
+++ 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).full.json 
@@ -0,0 +1,84 @@
+{
+  "@odata.context": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/$metadata#People";,
+  "value":
+          [
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "@odata.id": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)",
+              "@odata.editLink": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "PersonID": 3,
+              "FirstName": "Jacob",
+              "LastName": "Zip",
+              "MiddleName": null,
+              "HomeAddress":
+                      {
+                        "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Address",
+                        "Street": "1 Microsoft Way",
+                        "City": "Sydney",
+                        "PostalCode": "98052"
+                      },
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  161.8,
+                                  15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                        "333-333-3333"
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                        null
+                      ],
+              "[email protected]": "#DateTimeOffset",
+              "DateHired": "2010-12-13T00:00:00Z",
+              "[email protected]": "#GeographyPoint",
+              "Office":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  162,
+                                  15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent/$ref",
+              "[email protected]": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent",
+              "[email protected]": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company/$ref",
+              "[email protected]": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            }
+          ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).xml
----------------------------------------------------------------------
diff --git 
a/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).xml 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).xml
new file mode 100644
index 0000000..ff9c952
--- /dev/null
+++ 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Employee/filter/(PersonID
 lt 4).xml       
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<feed 
xml:base="http://odatae2etest.azurewebsites.net/javatest/DefaultService/"; 
xmlns="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"; 
xmlns:georss="http://www.georss.org/georss"; 
xmlns:gml="http://www.opengis.net/gml"; 
m:context="http://odatae2etest.azurewebsites.net/javatest/DefaultService/$metadata#People";>
+  <id>http://odatae2etest.azurewebsites.net/javatest/DefaultService/People</id>
+  <title />
+  <updated>2014-05-08T16:18:03Z</updated>
+  <entry>
+    
<id>http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Employee" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Company"; 
type="application/atom+xml;type=entry" title="Company" 
href="http://odatae2etest.azurewebsites.net/javatest/DefaultService/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company"
 />
+    <title />
+    <updated>2014-05-08T16:18:03Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">3</d:PersonID>
+        <d:FirstName>Jacob</d:FirstName>
+        <d:LastName>Zip</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress 
m:type="#Microsoft.Test.OData.Services.ODataWCFService.Address">
+          <d:Street>1 Microsoft Way</d:Street>
+          <d:City>Sydney</d:City>
+          <d:PostalCode>98052</d:PostalCode>
+        </d:HomeAddress>
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>15 161.8</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)">
+          <m:element>333-333-3333</m:element>
+        </d:Numbers>
+        <d:Emails m:type="#Collection(String)">
+          <m:element m:null="true" />
+        </d:Emails>
+        <d:DateHired m:type="DateTimeOffset">2010-12-13T00:00:00Z</d:DateHired>
+        <d:Office m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>15 162</gml:pos>
+          </gml:Point>
+        </d:Office>
+      </m:properties>
+    </content>
+  </entry>
+</feed>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.full.json
----------------------------------------------------------------------
diff --git 
a/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.full.json
 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.full.json
new file mode 100644
index 0000000..3e0dda8
--- /dev/null
+++ 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.full.json
@@ -0,0 +1,333 @@
+{
+  "@odata.context": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#People";,
+  "value":
+          [
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Customer",
+              "@odata.id": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)",
+              "@odata.editLink": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer",
+              "PersonID": 1,
+              "FirstName": "Bob",
+              "LastName": "Cat",
+              "MiddleName": null,
+              "HomeAddress":
+                      {
+                        "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.HomeAddress",
+                        "Street": "1 Microsoft Way",
+                        "City": "London",
+                        "PostalCode": "98052",
+                        "FamilyName": "Cats"
+                      },
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  23.1,
+                                  32.1
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                        "111-111-1111"
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                        "[email protected]"
+                      ],
+              "City": "London",
+              "[email protected]": "#DateTimeOffset",
+              "Birthday": "1957-04-03T00:00:00Z",
+              "[email protected]": "#Duration",
+              "TimeBetweenLastTwoOrders": "PT0.0000001S",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            },
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Customer",
+              "@odata.id": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)",
+              "@odata.editLink": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer",
+              "PersonID": 2,
+              "FirstName": "Jill",
+              "LastName": "Jones",
+              "MiddleName": null,
+              "HomeAddress": null,
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  161.8,
+                                  15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                      ],
+              "City": "Sydney",
+              "[email protected]": "#DateTimeOffset",
+              "Birthday": "1983-01-15T00:00:00Z",
+              "[email protected]": "#Duration",
+              "TimeBetweenLastTwoOrders": "PT0.0000002S",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            },
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "@odata.id": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)",
+              "@odata.editLink": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "PersonID": 3,
+              "FirstName": "Jacob",
+              "LastName": "Zip",
+              "MiddleName": null,
+              "HomeAddress":
+                      {
+                        "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Address",
+                        "Street": "1 Microsoft Way",
+                        "City": "Sydney",
+                        "PostalCode": "98052"
+                      },
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  161.8,
+                                  15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                        "333-333-3333"
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                        null
+                      ],
+              "[email protected]": "#DateTimeOffset",
+              "DateHired": "2010-12-13T00:00:00Z",
+              "[email protected]": "#GeographyPoint",
+              "Office":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  162,
+                                  15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            },
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "@odata.id": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)",
+              "@odata.editLink": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee",
+              "PersonID": 4,
+              "FirstName": "Elmo",
+              "LastName": "Rogers",
+              "MiddleName": null,
+              "HomeAddress": null,
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  -61.8,
+                                  -15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                        "444-444-4444",
+                        "555-555-5555",
+                        "666-666-6666"
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                        "[email protected]",
+                        "[email protected]"
+                      ],
+              "[email protected]": "#DateTimeOffset",
+              "DateHired": "2008-03-27T00:00:00Z",
+              "[email protected]": "#GeographyPoint",
+              "Office":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  -62,
+                                  -15
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            },
+            {
+              "@odata.type": 
"#Microsoft.Test.OData.Services.ODataWCFService.Person",
+              "@odata.id": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)",
+              "@odata.editLink": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)",
+              "PersonID": 5,
+              "FirstName": "Peter",
+              "LastName": "Bee",
+              "MiddleName": null,
+              "HomeAddress": null,
+              "[email protected]": "#GeographyPoint",
+              "Home":
+                      {
+                        "type": "Point",
+                        "coordinates":
+                                [
+                                  -261.8,
+                                  -16
+                                ],
+                        "crs":
+                                {
+                                  "type": "name",
+                                  "properties":
+                                          {
+                                            "name": "EPSG:4326"
+                                          }
+                                }
+                      },
+              "[email protected]": "#Collection(String)",
+              "Numbers":
+                      [
+                        "555-555-5555"
+                      ],
+              "[email protected]": "#Collection(String)",
+              "Emails":
+                      [
+                        "[email protected]"
+                      ],
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)/Parent/$ref",
+              "[email protected]": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)/Parent",
+              "#Microsoft.Test.OData.Services.ODataWCFService.ResetAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.ResetAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress"
+                      },
+              "#Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress":
+                      {
+                        "title": 
"Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress",
+                        "target": 
"http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
+                      }
+            }
+          ],
+  "odata.nextLink": "People?$skiptoken=5"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.xml
----------------------------------------------------------------------
diff --git 
a/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.xml
 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.xml
new file mode 100644
index 0000000..ee58f0a
--- /dev/null
+++ 
b/fit/src/main/resources/V40/People/Microsoft.Test.OData.Services.ODataWCFService.Person/feed.xml
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<feed 
xml:base="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/";
 
+      xmlns="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"; 
+      xmlns:georss="http://www.georss.org/georss"; 
+      xmlns:gml="http://www.opengis.net/gml"; 
+      
m:context="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#People";>
+  
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People</id>
+  <title />
+  <updated>2014-03-20T14:31:00Z</updated>
+  <entry>
+    
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Customer" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Orders"; 
type="application/atom+xml;type=feed" title="Orders" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Company"; 
type="application/atom+xml;type=entry" title="Company" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(1)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company"
 />
+    <title />
+    <updated>2014-03-20T14:31:00Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">1</d:PersonID>
+        <d:FirstName>Bob</d:FirstName>
+        <d:LastName>Cat</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress 
m:type="#Microsoft.Test.OData.Services.ODataWCFService.HomeAddress">
+          <d:Street>1 Microsoft Way</d:Street>
+          <d:City>London</d:City>
+          <d:PostalCode>98052</d:PostalCode>
+          <d:FamilyName>Cats</d:FamilyName>
+        </d:HomeAddress>
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>32.1 23.1</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)">
+          <m:element>111-111-1111</m:element>
+        </d:Numbers>
+        <d:Emails m:type="#Collection(String)">
+          <m:element>[email protected]</m:element>
+        </d:Emails>
+        <d:City>London</d:City>
+        <d:Birthday m:type="DateTimeOffset">1957-04-03T00:00:00Z</d:Birthday>
+        <d:TimeBetweenLastTwoOrders 
m:type="Duration">PT0.0000001S</d:TimeBetweenLastTwoOrders>
+      </m:properties>
+    </content>
+  </entry>
+  <entry>
+    
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Customer" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Orders"; 
type="application/atom+xml;type=feed" title="Orders" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Company"; 
type="application/atom+xml;type=entry" title="Company" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(2)/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company"
 />
+    <title />
+    <updated>2014-03-20T14:31:00Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">2</d:PersonID>
+        <d:FirstName>Jill</d:FirstName>
+        <d:LastName>Jones</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress m:null="true" />
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>15 161.8</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)" />
+        <d:Emails m:type="#Collection(String)" />
+        <d:City>Sydney</d:City>
+        <d:Birthday m:type="DateTimeOffset">1983-01-15T00:00:00Z</d:Birthday>
+        <d:TimeBetweenLastTwoOrders 
m:type="Duration">PT0.0000002S</d:TimeBetweenLastTwoOrders>
+      </m:properties>
+    </content>
+  </entry>
+  <entry>
+    
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Employee" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Company"; 
type="application/atom+xml;type=entry" title="Company" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(3)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company"
 />
+    <title />
+    <updated>2014-03-20T14:31:00Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">3</d:PersonID>
+        <d:FirstName>Jacob</d:FirstName>
+        <d:LastName>Zip</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress 
m:type="#Microsoft.Test.OData.Services.ODataWCFService.Address">
+          <d:Street>1 Microsoft Way</d:Street>
+          <d:City>Sydney</d:City>
+          <d:PostalCode>98052</d:PostalCode>
+        </d:HomeAddress>
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>15 161.8</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)">
+          <m:element>333-333-3333</m:element>
+        </d:Numbers>
+        <d:Emails m:type="#Collection(String)">
+          <m:element m:null="true" />
+        </d:Emails>
+        <d:DateHired m:type="DateTimeOffset">2010-12-13T00:00:00Z</d:DateHired>
+        <d:Office m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>15 162</gml:pos>
+          </gml:Point>
+        </d:Office>
+      </m:properties>
+    </content>
+  </entry>
+  <entry>
+    
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Employee" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Parent"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Company"; 
type="application/atom+xml;type=entry" title="Company" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(4)/Microsoft.Test.OData.Services.ODataWCFService.Employee/Company"
 />
+    <title />
+    <updated>2014-03-20T14:31:00Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">4</d:PersonID>
+        <d:FirstName>Elmo</d:FirstName>
+        <d:LastName>Rogers</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress m:null="true" />
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>-15 -61.8</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)">
+          <m:element>444-444-4444</m:element>
+          <m:element>555-555-5555</m:element>
+          <m:element>666-666-6666</m:element>
+        </d:Numbers>
+        <d:Emails m:type="#Collection(String)">
+          <m:element>[email protected]</m:element>
+          <m:element>[email protected]</m:element>
+        </d:Emails>
+        <d:DateHired m:type="DateTimeOffset">2008-03-27T00:00:00Z</d:DateHired>
+        <d:Office m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>-15 -62</gml:pos>
+          </gml:Point>
+        </d:Office>
+      </m:properties>
+    </content>
+  </entry>
+  <entry>
+    
<id>http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)</id>
+    <category term="#Microsoft.Test.OData.Services.ODataWCFService.Person" 
scheme="http://docs.oasis-open.org/odata/ns/scheme"; />
+    <link rel="edit" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)"
 />
+    <link rel="http://docs.oasis-open.org/odata/ns/related/Parent"; 
type="application/atom+xml;type=entry" title="Parent" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People(5)/Parent"
 />
+    <title />
+    <updated>2014-03-20T14:31:00Z</updated>
+    <author>
+      <name />
+    </author>
+    <content type="application/xml">
+      <m:properties>
+        <d:PersonID m:type="Int32">5</d:PersonID>
+        <d:FirstName>Peter</d:FirstName>
+        <d:LastName>Bee</d:LastName>
+        <d:MiddleName m:null="true" />
+        <d:HomeAddress m:null="true" />
+        <d:Home m:type="GeographyPoint">
+          <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326";>
+            <gml:pos>-16 -261.8</gml:pos>
+          </gml:Point>
+        </d:Home>
+        <d:Numbers m:type="#Collection(String)">
+          <m:element>555-555-5555</m:element>
+        </d:Numbers>
+        <d:Emails m:type="#Collection(String)">
+          <m:element>[email protected]</m:element>
+        </d:Emails>
+      </m:properties>
+    </content>
+  </entry>
+  <link rel="next" 
href="http://localhost:${tomcat.servlet.port}/stub/StaticService/V40/Static.svc/People?$skiptoken=5"/>
+</feed>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/935a9b84/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
----------------------------------------------------------------------
diff --git 
a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java 
b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
index 9c826d9..f889fd2 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
@@ -22,28 +22,43 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.olingo.ext.proxy.api.Search;
-import org.apache.olingo.ext.proxy.api.Sort;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import org.junit.Test;
 
+import org.apache.olingo.ext.proxy.api.Search;
+import org.apache.olingo.ext.proxy.api.Sort;
 //CHECKSTYLE:OFF (Maven checkstyle)
 import 
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.People;
+import 
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee;
+import 
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.EmployeeCollection;
 import 
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
 import 
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PersonCollection;
+import org.junit.Test;
 //CHECKSTYLE:ON (Maven checkstyle)
 
 public class FilterTestITCase extends AbstractTestITCase {
 
   @Test
+  public void testFilterWithEntityType() {
+    final People people = container.getPeople();
+    final EmployeeCollection response = 
people.filter(service.getClient().getFilterFactory().lt("PersonID", 4))
+                                                                         
.execute(EmployeeCollection.class);
+    
+    assertEquals(1, response.size());
+    
+    for(final Employee employee : response) {
+      assertEquals(Integer.valueOf(3), employee.getPersonID());
+    }
+  }
+  
+  @Test
   public void filterOrderby() {
     final People people = container.getPeople();
 
     PersonCollection result =
             
people.filter(service.getClient().getFilterFactory().lt("PersonID", 
3)).execute();
-
+    
     // 1. check that result looks as expected
     assertEquals(2, result.size());
 

Reply via email to