I'm trying to use svcutil to generate code from this GPServer wsdl.
So I run this command:
svcutil GPServer.wsdl
Which generates ESRI_Currents_World_GPServer.cs.
The code has comments saying the code generator "requires additional schema information", is there some other file I can pass to svcutil that has this additional info?
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://www.esri.com/schemas/ArcGIS/9.3", ConfigurationName="GPServerPort")]
public interface GPServerPort
{
// CODEGEN: Parameter 'Result' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayAttribute'.
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
[System.ServiceModel.XmlSerializerFormatAttribute()]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(Patch))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(Field[]))]
[return: System.ServiceModel.MessageParameterAttribute(Name="Result")]
GetJobInputValuesResponse GetJobInputValues(GetJobInputValuesRequest request);
I get the same results with
svcutil GPServer.wsdl /ser:XmlSerializer
I'd like to implement the interface in a web service and have it appear to clients (like arcmap) as if it were arcgis server. Has anyone done this?
Update: This article addresses the issue, but the solution is to change your WSDL so that it's compatible with svcutil. I can't do that, can I?
Update 2 It appears what I'm trying to do is referred to as "WSDL first design". Here's a good discussion. This description could apply to ArcGIS desktop as well as Microsoft office:
And this it may be counter intuitive for some people. The client application, in this case, Microsoft Office, specifies the on-the-wire contract, the WSDL. Lots of people have a server-centric design perspective, and assume that the server defines the contract. That often makes sense, but not in this case. Because there are so many deployments of Microsoft Office out there, it makes sense for the client to define the contract.
Update 3 (Simplified summary) Esri's REST API is open, yet incomplete. Some features supported by SOAP are not supported by REST, like cancelling a GP job. Since the wsdl is public, it should be possible to write a mapservice that implements both the SOAP and the REST API. Does anyone know of a tool that helps me implement a mapservice that adheres to Esri's SOAP contract?
