Esri / arcobjects-sdk-community-samples

This repo contains the source code samples (.Net c#, .Net vb, and C++) that demonstrate the usage of the ArcObject SDK.
Apache License 2.0
125 stars 195 forks source link

Find Near Features .NET SOE Github Sample (10.8.1) contains WSDL references to version 10.3.1 #18

Open seria1 opened 2 years ago

seria1 commented 2 years ago

Issue: Error deserializing XML from .NET SOAP SOE (10.8.1) due to incorrect WSDL references in sample app

Description:

nearFeatsService.Url = "http://YourDomain.com:6080/arcgis/services/USA/MapServer/NetFindNearFeaturesSoapSOE";

CustomLayerInfo[] layerInfos = nearFeatsService.GetLayerInfos();

Exception Message: There is an error in XML document (1,500).

Inner Exception: "The specified type was not recognized: name = 'EnvelopeN', Namespace: 'http://esri.com/schemas/Arcgis/10.8';, at <Extent xmlns =">."

Cause of the Issue The ESRI XML Schema version in the Github SOE SOAP sample (Find Near Features) is incorrectly set to 10.3.

Solution to the issue.

<xs:schema targetNamespace="http://www.esri.com/schemas/ArcGIS/10.8"" xmlns="http://www.esri.com/schemas/ArcGIS/10.8">; .... ....

<xs:schema xmlns="http://www.esri.com/schemas/ArcGIS/10.8"" targetNamespace="http://examples.esri.com/schemas/NetFindNearFeaturesSoapSOE/1.0"" xmlns:tns="http://examples.esri.com/schemas/NetFindNearFeaturesSoapSOE/1.0">; <xs:import namespace="http://www.esri.com/schemas/ArcGIS/10.8"" /> .... ....