Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Arcgis server 10 to 10.1

$
0
0
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();
}

Viewing all articles
Browse latest Browse all 1374

Trending Articles