Select to view content in your preferred language

Arcgis server 10 to 10.1

547
3
01-30-2013 02:32 AM
JojiGeorge
Emerging Contributor
How to connect to ArcGIS server using java API in ArcGIS Server 10.1.
Its working in 10.
Following code is the working code for ArcGIS Server 10.

ServerInitializer serverInitializer = null;
        ServerConnection connection = null;
        serverInitializer = new ServerInitializer();
        serverInitializer.initializeServer("domain", "username", "password");
        try {
            connection = new ServerConnection();
            connection.connect("host");
        } catch (AutomationException ae) {
            System.err.println("Caught AutomationException: " + ae.getMessage() + "\n");
            ae.printStackTrace();
        } catch (IOException e) {
            System.err.println("Caught IOException: " + e.getMessage() + "\n");
            e.printStackTrace();
        }
0 Kudos
3 Replies
RichardWatson
Deactivated User
You know that the DCOM stuff is dead, right?

REST is the technique to use.
0 Kudos
JojiGeorge
Emerging Contributor
How to use REST services?
Plz help
0 Kudos
RichardWatson
Deactivated User
I'd start with the samples and online help.

This not something that I can summarize in a paragraph.
0 Kudos