Architecture for java ee application@Fahim Farook sorry but I'm too busy for now. I'm working in a too complicated project and put this on hold. You can see my answer (the accepted one below) and deduce all process.

Extract a PostGIS dump from OSM with a particular tagTo me it's the easy way since gives me more control. Andre Joost said: And please not that osmosis will give you nodes, ways and relations. If you want a database that can be used for rendering by Mapnik, or to be used with other GIS softawre, osm2pgsql is a better choice.. You can connect all commands to make all in one step. I think the XML step will be made in background anyway.

How to create a point representing a polyline?Well, when I searching for a street, I don't care about house numbers. So, "The middle of the street" is enough to me. You need the median. If you just want to point the location site in a far away zoom level, use any point you want because they will be too close each other.