Dear all, I'm using olingo 4.7.1 and I have a Geography property in my entity.
I created a new edm.geo.Geospatial object as: Geospatial geospatial = new Polygon(Dimension.GEOGRAPHY, SRID.valueOf("4326"), ..., ...); If I try to put it into a property defined as: new CsdlProperty().setName(F_GEO).setType(EdmPrimitiveTypeKind.GeographyPolygon.getFullQualifiedName()).setNullable(true) The above code works perfectly when I retrieve the entity. But If I try to put my geometry into a property defined as generic geography like: new CsdlProperty().setName(F_GEO).setType(EdmPrimitiveTypeKind.Geography.getFullQualifiedName()).setNullable(true) I have an error when serializer tries to convert the object to a string... why? ERROR - Wrong value for property! Wrong value for property! at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writePropertyValue(ODataXmlSerializer.java:864) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writeProperty(ODataXmlSerializer.java:798) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writeProperties(ODataXmlSerializer.java:639) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writeEntity(ODataXmlSerializer.java:526) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.entity(ODataXmlSerializer.java:364) at com.telespazio.esa.lta.odata.LtaEntityProcessor.readEntity(LtaEntityProcessor.java:368) at org.apache.olingo.server.core.ODataDispatcher.handleSingleEntityDispatching(ODataDispatcher.java:596) at org.apache.olingo.server.core.ODataDispatcher.handleEntityDispatching(ODataDispatcher.java:513) at org.apache.olingo.server.core.ODataDispatcher.handleResourceDispatching(ODataDispatcher.java:152) at org.apache.olingo.server.core.ODataDispatcher.dispatch(ODataDispatcher.java:118) at org.apache.olingo.server.core.ODataHandlerImpl.processInternal(ODataHandlerImpl.java:164) at org.apache.olingo.server.core.ODataHandlerImpl.process(ODataHandlerImpl.java:85) at org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:74) at org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:88) at com.telespazio.esa.lta.ODataServlet.service(ODataServlet.java:58) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: Not implemented! at org.apache.olingo.commons.core.edm.primitivetype.EdmGeography.internalValueToString(EdmGeography.java:47) at org.apache.olingo.commons.core.edm.primitivetype.AbstractPrimitiveType.valueToString(AbstractPrimitiveType.java:86) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writePrimitiveValue(ODataXmlSerializer.java:992) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writePrimitive(ODataXmlSerializer.java:972) at org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer.writePropertyValue(ODataXmlSerializer.java:843) ... 37 more I need to put different geometries int my F_GEO property (It could be a Polygon or a LineString or a MultiPoint and so on...) Reading documentation, it seems that EdmPrimitiveTypeKind.Geography should be used for all geometry types, isn't it? Where am I going wrong? Is there a workaround? I'm looking forward to reading your reply Regards Mario [Telespazio S.p.A.] Mario Leggio LoB Satellite Systems and Operations System and Ground Segment Engineering Via Tiburtina, 965 - 00156 Rome - Italy Ph: +39 06 4079 3072 | Fax: +39 06 4099-8286 mario.leg...@telespazio.com telespazio.com<http://www.telespazio.com> -WARNING: This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for the use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. Any other use of this e-mail is strictly forbidden. Thank you in advance for your cooperation. Please consider the environment before printing this e-mail.