diff --git a/fit/src/main/resources/V30/AllGeoTypesSet/-10/entity.xml b/fit/src/main/resources/V30/AllGeoTypesSet/-10/entity.xml
new file mode 100644
index 000000000..42dc8c2fa
--- /dev/null
+++ b/fit/src/main/resources/V30/AllGeoTypesSet/-10/entity.xml
@@ -0,0 +1,161 @@
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-10)
+
+
+
+ 2014-05-08T12:27:58Z
+
+
+
+
+
+ -10
+
+
+ 51.65 178.7
+
+
+
+
+ 52.8606 173.334
+
+
+
+
+ 40.5 40.5
+ 30.5 30.5
+ 20.5 40.5
+ 10.5 30.5
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 10 40
+
+
+ 40 40
+ 30 30
+ 40 20
+ 30 10
+
+
+
+
+
+
+
+
+
+
+ 40 40
+ 20 45
+ 45 30
+ 40 40
+
+
+
+
+
+
+ 20 35
+ 45 20
+ 30 5
+ 10 10
+ 10 30
+ 20 35
+
+
+
+
+ 30 20
+ 20 25
+ 20 15
+ 30 20
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fit/src/main/resources/V30/AllGeoTypesSet/feed.xml b/fit/src/main/resources/V30/AllGeoTypesSet/feed.xml
new file mode 100644
index 000000000..7d689e773
--- /dev/null
+++ b/fit/src/main/resources/V30/AllGeoTypesSet/feed.xml
@@ -0,0 +1,1371 @@
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet
+ AllGeoTypesSet
+ 2014-05-08T12:26:29Z
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-10)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -10
+
+
+ 51.65 178.7
+
+
+
+
+ 52.8606 173.334
+
+
+
+
+ 40.5 40.5
+ 30.5 30.5
+ 20.5 40.5
+ 10.5 30.5
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 10 40
+
+
+ 40 40
+ 30 30
+ 40 20
+ 30 10
+
+
+
+
+
+
+
+
+
+
+ 40 40
+ 20 45
+ 45 30
+ 40 40
+
+
+
+
+
+
+ 20 35
+ 45 20
+ 30 5
+ 10 10
+ 10 30
+ 20 35
+
+
+
+
+ 30 20
+ 20 25
+ 20 15
+ 30 20
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-9)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -9
+
+
+
+
+
+
+
+ 52.7892 172.826
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 47.38 -122.7
+
+
+
+
+
+
+
+
+
+
+
+
+ 15 5
+ 40 10
+ 10 20
+ 5 10
+ 15 5
+
+
+
+
+
+
+ 4369367.0586663447 6352015.6916818349
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+ 20 35
+ 45 20
+ 30 5
+ 10 10
+ 10 30
+ 20 35
+
+
+
+
+ 30 20
+ 20 25
+ 20 15
+ 30 20
+
+
+
+
+
+
+
+
+
+
+
+ 0 0
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-8)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -8
+
+
+ 51.5961 178.94
+
+
+
+
+ 51.65 178.7
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+
+
+
+
+
+
+
+
+
+
+ 47.38 -122.7
+
+
+
+
+
+
+
+
+ 10.5 10.5
+ 20.5 20.5
+ 40.5 10.5
+
+
+ 40.5 40.5
+ 30.5 30.5
+ 20.5 40.5
+ 10.5 30.5
+
+
+
+
+
+
+
+
+
+
+ 40 40
+ 45 20
+ 30 45
+ 40 40
+
+
+
+
+
+
+ 35 20
+ 20 45
+ 5 30
+ 10 10
+ 30 10
+ 35 20
+
+
+
+
+ 20 30
+ 25 20
+ 15 20
+ 20 30
+
+
+
+
+
+
+
+
+ 4369367.0586663447 6352015.6916818349
+
+
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+ 30 20
+ 10 40
+ 45 40
+ 30 20
+
+
+
+
+
+
+
+
+ 4 6
+
+
+ 4 6
+ 7 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-7)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -7
+
+
+ 52.8103 173.045
+
+
+
+
+ 52.795 173.105
+
+
+
+
+ 10.5 10.5
+ 20.5 20.5
+ 40.5 10.5
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+ 47.38 -122.7
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+
+
+ 4605537.5782547453 5924460.4760093335
+
+
+
+
+ 1 1
+ 3 3
+
+
+
+
+
+
+
+
+
+
+ 0 0
+
+
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-6)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -6
+
+
+ 52.8453 173.153
+
+
+
+
+ 51.9917 177.508
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+
+
+
+
+ 20 30
+ 40 10
+ 40 45
+ 20 30
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+ 4358017.0935490858 6362964.504044747
+
+
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+
+
+
+ 30 20
+ 10 40
+ 45 40
+ 30 20
+
+
+
+
+
+
+
+
+
+
+
+ 0 0
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 10 40
+
+
+ 40 40
+ 30 30
+ 40 20
+ 30 10
+
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-5)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -5
+
+
+
+
+
+
+ 10.5 10.5
+ 20.5 20.5
+ 40.5 10.5
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+
+
+ 2 1
+
+
+
+
+
+
+
+
+
+
+ 47.38 -122.7
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 40 40
+ 45 20
+ 30 45
+ 40 40
+
+
+
+
+
+
+ 35 20
+ 20 45
+ 5 30
+ 10 10
+ 30 10
+ 35 20
+
+
+
+
+ 20 30
+ 25 20
+ 15 20
+ 20 30
+
+
+
+
+
+
+
+
+
+
+
+ 4513675.2944411123 6032903.5882574534
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+
+
+
+
+
+
+ 1 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 10 40
+
+
+ 40 40
+ 30 30
+ 40 20
+ 30 10
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-4)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -4
+
+
+
+
+ 10 10
+ 20 20
+ 40 10
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+ 52.8606 173.334
+
+
+
+
+
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+ 51.5961 178.94
+
+
+ 52.7892 172.826
+
+
+ 52.1022 177.539
+
+
+ 51.9917 177.508
+
+
+ 52.8453 173.153
+
+
+ 52.8103 173.045
+
+
+ 51.9461 177.76
+
+
+
+
+
+
+
+
+
+
+
+
+ 4605537.5782547453 5924460.4760093335
+
+
+
+
+ 4505479.22279754 6049837.1931612007
+
+
+
+
+ 1 1
+ 3 3
+
+
+
+
+
+
+ 15 5
+ 40 10
+ 10 20
+ 5 10
+ 15 5
+
+
+
+
+
+
+
+
+
+
+
+ 4541876.7599749668 5944203.8929384714
+
+
+ 4358017.0935490858 6362964.504044747
+
+
+ 4515785.037825482 6055723.864035368
+
+
+ 4505479.22279754 6049837.1931612007
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+
+
+
+
+ 10 10
+ 20 20
+ 10 40
+
+
+ 40 40
+ 30 30
+ 40 20
+ 30 10
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-3)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -3
+
+
+ 51.9917 177.508
+
+
+
+
+ 51.65 178.7
+
+
+
+
+ 40 40
+ 30 30
+ 20 40
+ 10 30
+
+
+
+
+
+
+
+
+
+
+
+ 1 1
+ 3 3
+
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+ 1 1
+
+
+
+
+
+
+ 15 5
+ 40 10
+ 10 20
+ 5 10
+ 15 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10.5 10.5
+ 20.5 20.5
+ 10.5 40.5
+
+
+ 40.5 40.5
+ 30.5 30.5
+ 40.5 20.5
+ 30.5 10.5
+
+
+
+
+
+
+
+
+
+
+ 40 40
+ 20 45
+ 45 30
+ 40 40
+
+
+
+
+
+
+ 20 35
+ 45 20
+ 30 5
+ 10 10
+ 10 30
+ 20 35
+
+
+
+
+ 30 20
+ 20 25
+ 20 15
+ 30 20
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-2)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -2
+
+
+ 52.7892 172.826
+
+
+
+
+
+ 40.5 40.5
+ 30.5 30.5
+ 20.5 40.5
+ 10.5 30.5
+
+
+
+
+
+
+ 5 15
+ 10 40
+ 20 10
+ 10 5
+ 5 15
+
+
+
+
+
+
+
+
+
+
+
+ 2 1
+
+
+
+
+
+
+
+
+
+
+ 52.8606 173.334
+
+
+ 51.65 178.7
+
+
+ 51.9125 179.5
+
+
+ 51.9222 179.728
+
+
+ 52.795 173.105
+
+
+ 52.9778 172.914
+
+
+
+
+
+
+
+
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+
+
+
+
+
+
+ 15 5
+ 40 10
+ 10 20
+ 5 10
+ 15 5
+
+
+
+
+
+
+
+
+
+ 0 0
+
+
+
+
+
+
+
+
+
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/AllGeoTypesSet(-1)
+
+
+
+ 2014-05-08T12:26:29Z
+
+
+
+
+
+ -1
+
+
+ 51.65 178.7
+
+
+
+
+
+
+
+
+
+
+ 52.8606 173.334
+
+
+ 51.65 178.7
+
+
+ 51.9125 179.5
+
+
+ 51.9222 179.728
+
+
+ 52.795 173.105
+
+
+ 52.9778 172.914
+
+
+
+
+
+
+
+
+
+
+ 4358017.0935490858 6362964.504044747
+
+
+
+
+ 4358017.0935490858 6362964.504044747
+
+
+
+
+ 1 1
+ 3 3
+ 2 4
+ 2 0
+ 1 1
+
+
+
+
+
+
+ 30 20
+ 10 40
+ 45 40
+ 30 20
+
+
+
+
+
+
+
+
+ 4 6
+
+
+ 4 6
+ 7 10
+
+
+
+
+
+
+
+
+ 4541876.7599749668 5944203.8929384714
+
+
+ 4358017.0935490858 6362964.504044747
+
+
+ 4515785.037825482 6055723.864035368
+
+
+ 4505479.22279754 6049837.1931612007
+
+
+ 4377000.868172125 6348217.1067010015
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 30 20
+ 10 40
+ 45 40
+ 30 20
+
+
+
+
+
+
+ 15 5
+ 40 10
+ 10 20
+ 5 10
+ 15 5
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fit/src/main/resources/V30/Computer/feed.xml b/fit/src/main/resources/V30/Computer/feed.xml
index 62605c958..6c727fe34 100644
--- a/fit/src/main/resources/V30/Computer/feed.xml
+++ b/fit/src/main/resources/V30/Computer/feed.xml
@@ -19,13 +19,13 @@
under the License.
-->
-
- http://localhost:8080/DefaultService.svc/Computer
+
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer
Computer
2014-05-08T10:00:26Z
- http://localhost:8080/DefaultService.svc/Computer(11)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(11)
@@ -34,7 +34,7 @@
-
+
11
@@ -43,7 +43,7 @@
- http://localhost:8080/DefaultService.svc/Computer(12)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(12)
@@ -52,7 +52,7 @@
-
+
12
@@ -61,7 +61,7 @@
- http://localhost:8080/DefaultService.svc/Computer(13)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(13)
@@ -70,7 +70,7 @@
-
+
13
@@ -79,7 +79,7 @@
- http://localhost:8080/DefaultService.svc/Computer(14)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(14)
@@ -88,7 +88,7 @@
-
+
14
@@ -97,7 +97,7 @@
- http://localhost:8080/DefaultService.svc/Computer(15)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(15)
@@ -106,7 +106,7 @@
-
+
15
@@ -115,7 +115,7 @@
- http://localhost:8080/DefaultService.svc/Computer(16)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(16)
@@ -124,7 +124,7 @@
-
+
16
@@ -133,7 +133,7 @@
- http://localhost:8080/DefaultService.svc/Computer(17)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(17)
@@ -142,7 +142,7 @@
-
+
17
@@ -151,7 +151,7 @@
- http://localhost:8080/DefaultService.svc/Computer(18)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(18)
@@ -160,7 +160,7 @@
-
+
18
@@ -169,7 +169,7 @@
- http://localhost:8080/DefaultService.svc/Computer(19)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(19)
@@ -178,7 +178,7 @@
-
+
19
@@ -187,7 +187,7 @@
- http://localhost:8080/DefaultService.svc/Computer(20)
+ http://localhost:${cargo.servlet.port}/stub/StaticService/V30/Static.svc/Computer(20)
@@ -196,7 +196,7 @@
-
+
20
diff --git a/fit/src/test/java/org/apache/olingo/fit/v3/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v3/EntityRetrieveTestITCase.java
index 1b95c6015..b6943aa0d 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v3/EntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v3/EntityRetrieveTestITCase.java
@@ -31,6 +31,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataRawReque
import org.apache.olingo.client.api.communication.response.ODataRawResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
@@ -202,7 +203,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
}
@Test
- public void checkForETagAsATOM() {
+ public void checkForETagAsAtom() {
checkForETag(ODataPubFormat.ATOM);
}
@@ -239,4 +240,25 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
// since we are attempting to parse an EntitySet as if it was an Entity
req.execute().getBody();
}
+
+ private void geospatial(final ODataPubFormat format) {
+ final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot()).
+ appendEntitySetSegment("AllGeoTypesSet").appendKeySegment(-10);
+
+ final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
+ req.setFormat(format);
+
+ final ODataEntity entity = req.execute().getBody();
+ assertNotNull(entity);
+ }
+
+ @Test
+ public void geospatialAsJSON() {
+ geospatial(ODataPubFormat.JSON_FULL_METADATA);
+ }
+
+ @Test
+ public void geospatialAsAtom() {
+ geospatial(ODataPubFormat.ATOM);
+ }
}
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
index 4d579bfa4..41a129f92 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
@@ -73,6 +73,11 @@ class AtomGeoValueDeserializer {
}
}
+ // handles bad input, e.g. things like
+ if (result.isEmpty()) {
+ result.add(new Point(GeoUtils.getDimension(type), srid));
+ }
+
return result;
}