Giter VIP home page Giter VIP logo

autorest-nominatim-example's People

Contributors

dependabot[bot] avatar ibaca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autorest-nominatim-example's Issues

How to test server module ?

Hi @ibaca, I have tested gwt module and it is working with "http://nominatim.openstreetmap.org/" but I wanted to test server module as well. I thought that starting the server, and changing the path in gwt module from "http://nominatim.openstreetmap.org/" to ""http://127.0.0.1:8080/"" should be enough to get the results from server module instead of openstreetmap ?

When I start server and gwt module I receive the following error in server module console each time I refresh the browser (each time gwt module tries to call server module):

com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
INFO: Couldn't find grammar element for class rx.Observable

Am I missing something or I misunderstood the role of server module ?

Thanks in advance.

JSON problems

Hi, sorry if this (again) is a question only exposing my own ignorance ;-) I would appreciate a short answer, perhaps a pointer to some tutorial or reference documentation.

I have made some changes in my own copy of the nominatim example to try to get the hang of things.
I have made a new subclass of SearchResult, using @JsonTypeInfo on the root class.
I have also made a new @post method that takes a SearchResult as argument and returns an Observable, it will return a mix of instances of the root SearchResult and of the new subclass.

On the server side this seems to work. When I inspect the JSON it returns, it has the correct type field identifying the class.

On the client this seems to be ignored - I always get a root SearchResult and never an instance of the subclass.

When I call the new post method with an SearchResult as argument, the request get serialized without the type-argument, and Jackson correctly complains on the server side that it is missing.

To me it looks like the @JsonTypeInfo is used correctly on the server side, but is ignored on the client side.

My problem also is, that while I have a little idea of how Jersey and Jackson works with the ApplicationJacksonModule on the server, am I clueless on how the JSON (de)serialization works on the client, and I have not been able to find a good (or any) introduction to that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.