Utility class used to convert objects between ArcGIS Explorer geometry types and types returned from ArcGIS Server SOAP services.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public static class SoapConverter
Visual Basic (Declaration)
Public NotInheritable Class SoapConverter

Remarks

This class provides utility functions for converting objects between ArcGIS Explorer geometry types and ArcGIS Server SOAP proxy geometry types. Use this class in order to convert between the types when programming against ArcGIS SOAP services, for example when you have added a Web Reference or Service Reference to an ArcGIS Server geometry, geocode or geoprocessing service.

Examples

The code below shows you how to convert an ArcGIS Explorer Point object to a SOAP geometry object and back again by using the GeometryToSoap and FromSoap generic methods. The example illustrates the syntax of the process; it is expected that you will use similar code to convert inputs and outputs of SOAP services for use within ArcGIS Explorer. Types are fully-qualified to avoid confusion, with the exception of the SOAP types - you must ensure you have a using/Imports statement to your SOAP web reference namespace or fully-qualify the SOAP types in your own code.
CopyC#
// Remember you will need a using (Imports in Visual Basic) statement to the namespace of the SOAP definitions
// for your web references, e.g. the namespace containing the PointN SOAP type.

// Create an ArcGIS Explorer Point.
ESRI.ArcGISExplorer.Geometry.Point xoPoint_input = new ESRI.ArcGISExplorer.Geometry.Point(3, 4, 5);

// Convert to a SOAP PointN with GeometryToSoap<Explorer Type, SOAP Type>.
PointN soapPointN_input = SoapConverter.GeometryToSoap<ESRI.ArcGISExplorer.Geometry.Point, PointN>(xoPoint_input);

// NOTE - Send the SOAP PointN to the required Web Service.

// NOTE - Set the SOAP PointN from the result of the web service.
PointN soapPointN_result = new PointN();

// Convert the SOAP PointN to an ArcGIS Explorer Point.
ESRI.ArcGISExplorer.Geometry.Point xoPoint_result = SoapConverter.FromSoap<ESRI.ArcGISExplorer.Geometry.Point>(soapPointN_result);
CopyVB.NET
' Remember you will need a using (Imports in Visual Basic) statement to the namespace of the SOAP definitions
' for your web references, e.g. the namespace containing the PointN SOAP type.


' Create an ArcGIS Explorer Point.
Dim xoPoint_input As ESRI.ArcGISExplorer.Geometry.Point = New ESRI.ArcGISExplorer.Geometry.Point(3, 4, 5)

' Convert to a SOAP PointN with GeometryToSoap(Of Explorer Type, SOAP Type).
Dim soapPointN_input As PointN = SoapConverter.GeometryToSoap(Of ESRI.ArcGISExplorer.Geometry.Point, PointN)(xoPoint_input)

' NOTE - Send the SOAP PointN to the required Web Service.


' NOTE - Set the SOAP PointN from the result of the web service.
Dim soapPointN_result As PointN = New PointN()

' Convert the SOAP PointN to an ArcGIS Explorer Point.
Dim xoPoint_result As ESRI.ArcGISExplorer.Geometry.Point = SoapConverter.FromSoap(Of ESRI.ArcGISExplorer.Geometry.Point)(soapPointN_result)

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Geometry..::.SoapConverter

See Also