Kopie des alten Systems

Dies ist eine alte Kopie des GenWiki und spiegelt den Stand vom 8. Mai 2022 wider.

This is an old copy of the GenWiki and reflects the status as of May 8, 2022. Please visit us at wiki.genealogy.net

GOV/Webservice/Java

aus GenWiki, dem genealogischen Lexikon zum Mitmachen.

Wechseln zu: Navigation, Suche

Position setzen

So setzt man die Position eines Ortes:

import net.genealogy.gov.data.Position;
import net.genealogy.gov.ws.*;
 
public class GovClient {
   public static void main(final String[] args) throws Exception {
       String user = args[0];
       String password = args[1];
       String id = args[2];
       double longitude = Double.parseDouble(args[3]);
       double latitude = Double.parseDouble(args[4]);
 
       ComplexServicePortType readClient =
           new ComplexServiceLocator().getComplexServiceHttpPort();
       ChangeServicePortType writeClient =
           new ChangeServiceLocator().getChangeServiceHttpPort();
 
       net.genealogy.gov.data.Object place = readClient.getObject(id);
       Position position = new Position();
       position.setLat(latitude);
       position.setLon(longitude);
       place.setPosition(position);
 
       writeClient.saveObject(place, user, password);
   }
}
Persönliche Werkzeuge