private void BufferGeometry(IMessage reqMsg, IMessage respMsg) { IXMLSerializeData reqParams = reqMsg.Parameters; //get Geometry int idx = reqParams.Find("Geometry"); //name of the xml element in the wsdl for this parameter if (idx == -1) { throw new ArgumentNullException("Geometry"); } IGeometry geom = (IGeometry)reqParams.GetObject(idx, c_ns_esri, "Geometry"); //get Distance idx = reqParams.Find("Distance"); //name of the xml element in the wsdl for this parameter if (idx == -1) { throw new ArgumentNullException("Distance"); } double distance = reqParams.GetDouble(idx); //execute IPolygon buffer = BufferGeometry(geom, distance); //fill response respMsg.Name = "BufferGeometryResponse"; //this is the name of the xml element for the SOAP response. It must match the wsdl. respMsg.NamespaceURI = c_ns_soe; //the response message uses your namespace (not ESRI's) respMsg.Parameters.AddObject("Result", buffer); //the name of the xml element for the output parameter is Result. This must match the wsdl. }
/// <summary> /// Deserialize the argument object from the stream provided /// </summary> /// <param name="data">Xml stream to deserialize the argument object from</param> public void Deserialize(IXMLSerializeData data) { int nameIndex = data.Find("Names"); int valIndex = data.Find("Values"); if (nameIndex != -1 && valIndex != -1) { IStringArray myNames = (IStringArray)data.GetVariant(nameIndex); IVariantArray myValues = (IVariantArray)data.GetVariant(valIndex); for (int i = 0; i < myNames.Count; ++i) { myProperties.SetProperty(myNames.get_Element(i), myValues.get_Element(i)); } } }
private int FindMandatoryParam(string fieldName, IXMLSerializeData data) { int idx = data.Find(fieldName); if (idx == -1) { throw new MissingMandatoryFieldException(fieldName); } return(idx); }
private int FindParam(string parameterName, IXMLSerializeData msgParams) { int idx = msgParams.Find(parameterName); if (idx == -1) { throw new ArgumentNullException(parameterName); } return(idx); }
public void Deserialize(IXMLSerializeData data) { int elementIndex = -1; elementIndex = data.Find(m_xmlElementName); if (elementIndex > -1) { DecodeUserNamePassword(data.GetString(elementIndex)); } }
private int FindParam(string parameterName, IXMLSerializeData msgParams) { int idx = msgParams.Find(parameterName); if (idx == -1) throw new ArgumentNullException(parameterName); return idx; }
public void Deserialize(IXMLSerializeData data) { int elementIndex = -1; elementIndex = data.Find(m_xmlElementName); if (elementIndex > -1) { DecodeUserNamePassword(data.GetString(elementIndex)); } }
/// <summary> /// Deserialize the Raster Function from the datastream provided /// </summary> /// <param name="data">Xml stream to deserialize the function from</param> public void Deserialize(IXMLSerializeData data) { myName = data.GetString(data.Find("Name")); myDescription = data.GetString(data.Find("Description")); myPixeltype = (rstPixelType)(data.GetInteger(data.Find("PixelType"))); }
/// <summary> /// Deserialize the argument object from the datastream provided /// </summary> /// <param name="data">Xml stream to deserialize the argument object from</param> public void Deserialize(IXMLSerializeData data) { int nameIndex = data.Find("Names"); int valIndex = data.Find("Values"); if (nameIndex != -1 && valIndex != -1) { IStringArray myNames = (IStringArray)data.GetVariant(nameIndex); IVariantArray myValues = (IVariantArray)data.GetVariant(valIndex); for (int i = 0; i < myNames.Count; ++i) { myProperties.SetProperty(myNames.get_Element(i), myValues.get_Element(i)); } } }
/// <summary> /// Deserialize the Raster Function from the datastream provided /// </summary> /// <param name="data">Xml stream to deserialize the function from</param> public void Deserialize(IXMLSerializeData data) { myName = data.GetString(data.Find("Name")); myDescription = data.GetString(data.Find("Description")); myPixeltype = (rstPixelType)(data.GetInteger(data.Find("PixelType"))); }