public override void WriteObject(XmlWriter writer, object graph) { OneWayRequest OneWayRequestField = ((OneWayRequest)(graph)); if (WriteParentElement(writer, true, true, graph)) { WriteAnyAttribute(writer, OneWayRequestField.AnyAttr); if (WriteChildElement(writer, "Param", true, true, OneWayRequestField.Param)) { writer.WriteString(XmlConvert.ToString(OneWayRequestField.Param)); writer.WriteEndElement(); } WriteAnyElement(writer, OneWayRequestField.Any, false); writer.WriteEndElement(); } return; }
public override object ReadObject(XmlReader reader) { OneWayRequest OneWayRequestField = null; if (IsParentStartElement(reader, false, true)) { OneWayRequestField = new OneWayRequest(); OneWayRequestField.AnyAttr = ReadAnyAttribute(reader); reader.Read(); if (IsChildStartElement(reader, "Param", true, true)) { reader.Read(); OneWayRequestField.Param = XmlConvert.ToInt32(reader.ReadString()); reader.ReadEndElement(); } OneWayRequestField.Any = ReadAnyElement(reader, false); reader.ReadEndElement(); } return OneWayRequestField; }
public override object ReadObject(XmlReader reader) { OneWayRequest OneWayRequestField = null; if (IsParentStartElement(reader, false, true)) { OneWayRequestField = new OneWayRequest(); OneWayRequestField.AnyAttr = ReadAnyAttribute(reader); reader.Read(); if (IsChildStartElement(reader, "Param", true, true)) { reader.Read(); OneWayRequestField.Param = XmlConvert.ToInt32(reader.ReadString()); reader.ReadEndElement(); } OneWayRequestField.Any = ReadAnyElement(reader, false); reader.ReadEndElement(); } return(OneWayRequestField); }
public virtual void OneWay(OneWayRequest req) { // Create request header String action; action = "http://schemas.example.org/SimpleService/OneWay"; WsWsaHeader header; header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null); WsMessage request = new WsMessage(header, req, WsPrefix.None); // Create request serializer OneWayRequestDataContractSerializer reqDcs; reqDcs = new OneWayRequestDataContractSerializer("OneWayRequest", "http://schemas.example.org/SimpleService"); request.Serializer = reqDcs; request.Method = "OneWay"; // Send service request m_requestChannel.Open(); m_requestChannel.RequestOneWay(request); m_requestChannel.Close(); }
public void OneWay(OneWayRequest req) { System.Ext.Console.Write(""); System.Ext.Console.Write("OneWay request integer value = " + req.Param.ToString()); }