package gisServer;import com.esri.arcgisws.EsriUnits;
import com.esri.arcgisws.MapServerBindingStub;
import com.esri.arcgisws.PointN;
public class HelloWorldClient{
public static void main(String[] args) {
String wsService = "http://pc-201107111431:8399/arcgis/rest/services/WGS84-GEOGRAPHIC/MapServer";
// MapServerBindingStub mapservice = new MapServerBindingStub(new java.net.URL(wsService), null);
MapServerBindingStub mapservice = new MapServerBindingStub(wsService,"arcgismanager","123"); String mapname = mapservice.getDefaultMapName();
PointN pnt0 = new PointN();
pnt0.setX(-120.0);
pnt0.setY(30.0);
PointN pnt1 = new PointN();
pnt1.setX(-110.0);
pnt1.setY(35.0);
double distance = mapservice.computeDistance(mapname, pnt0, pnt1, EsriUnits.esriMiles); }}
我要怎么才能运行这段代码?
import com.esri.arcgisws.MapServerBindingStub;
import com.esri.arcgisws.PointN;
public class HelloWorldClient{
public static void main(String[] args) {
String wsService = "http://pc-201107111431:8399/arcgis/rest/services/WGS84-GEOGRAPHIC/MapServer";
// MapServerBindingStub mapservice = new MapServerBindingStub(new java.net.URL(wsService), null);
MapServerBindingStub mapservice = new MapServerBindingStub(wsService,"arcgismanager","123"); String mapname = mapservice.getDefaultMapName();
PointN pnt0 = new PointN();
pnt0.setX(-120.0);
pnt0.setY(30.0);
PointN pnt1 = new PointN();
pnt1.setX(-110.0);
pnt1.setY(35.0);
double distance = mapservice.computeDistance(mapname, pnt0, pnt1, EsriUnits.esriMiles); }}
我要怎么才能运行这段代码?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货