Esri/arcobjects-sdk-community-samples

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

Opened this issue · 0 comments

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";

  • Right-click the Web References (folder in Solution Explorer) > LocalHost, and choose "Update Web Reference", which downloads the WSDL web references file from the SOE into the SOAP Client app.
  • Run the app.
  • When the form opens, click the first button on the form, Get Layer Infos.
  • An exception is thrown on this line of code in Form1.cs:

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.

  • Changing the value from 10.3 to 10.8 resolves the exception.
  • This change should be made in four places within the XML code in the WSDL file (in the "Find Near Features" SOAP SOE project), as shown below:
    NetFindNearFeaturesSoapSOE.wsdl

<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"" />
....
....

  • Issue was reported by a customer to ESRI Support.