示例#1
0
        public override void WriteObject(XmlWriter writer, object graph)
        {
            GetMeasurements GetMeasurementsField = ((GetMeasurements)(graph));

            if (WriteParentElement(writer, true, true, graph))
            {
                writer.WriteEndElement();
            }
            return;
        }
示例#2
0
        public override object ReadObject(XmlReader reader)
        {
            GetMeasurements GetMeasurementsField = null;

            if (IsParentStartElement(reader, false, true))
            {
                GetMeasurementsField = new GetMeasurements();
                reader.Read();
                reader.ReadEndElement();
            }
            return(GetMeasurementsField);
        }
示例#3
0
        public virtual GetMeasurementsResponse GetMeasurements(GetMeasurements req)
        {
            // Create request header
            String action;

            action = "http://tempuri.org/ISmartService/GetMeasurements";
            WsWsaHeader header;

            header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null);
            WsMessage request = new WsMessage(header, req, WsPrefix.None);

            // Create request serializer
            GetMeasurementsDataContractSerializer reqDcs;

            reqDcs             = new GetMeasurementsDataContractSerializer("GetMeasurements", "http://tempuri.org/");
            request.Serializer = reqDcs;
            request.Method     = "GetMeasurements";


            // Send service request
            m_requestChannel.Open();
            WsMessage response = m_requestChannel.Request(request);

            m_requestChannel.Close();

            // Process response
            GetMeasurementsResponseDataContractSerializer respDcs;

            respDcs = new GetMeasurementsResponseDataContractSerializer("GetMeasurementsResponse", "http://tempuri.org/");
            GetMeasurementsResponse resp;

            resp = ((GetMeasurementsResponse)(respDcs.ReadObject(response.Reader)));
            response.Reader.Dispose();
            response.Reader = null;
            return(resp);
        }