public virtual AnyCheckResponse AnyCheckRequest(AnyCheckRequest req)
        {
            // Create request header
            String action;
            action = "http://schemas.example.org/SimpleService/AnyCheckRequest";
            WsWsaHeader header;
            header = new WsWsaHeader(action, null, ServiceEndpoint, null, EndpointAddress, null);

            // Create request serializer
            AnyCheckRequestDataContractSerializer reqDcs;
            reqDcs = new AnyCheckRequestDataContractSerializer("AnyCheckRequest", "http://schemas.example.org/SimpleService");

            // Build soap request message
            byte[] soapBuffer = SoapMessageBuilder.BuildSoapMessage(header, reqDcs, req);

            // Send service request
            DpwsHttpClient httpClient;
            httpClient = new DpwsHttpClient();
            DpwsSoapResponse response;
            response = httpClient.SendRequest(soapBuffer, ServiceEndpoint, false, false);

            // Process response
            AnyCheckResponseDataContractSerializer respDcs;
            respDcs = new AnyCheckResponseDataContractSerializer("AnyCheckResponse", "http://schemas.example.org/SimpleService");
            AnyCheckResponse resp;
            resp = ((AnyCheckResponse)(respDcs.ReadObject(response.Reader)));
            return resp;
        }
Example #2
0
        public virtual AnyCheckResponse AnyCheckRequest(AnyCheckRequest req)
        {
            // Create request header
            String action;

            action = "http://schemas.example.org/SimpleService/AnyCheckRequest";
            WsWsaHeader header;

            header = new WsWsaHeader(action, null, ServiceEndpoint, null, EndpointAddress, null);

            // Create request serializer
            AnyCheckRequestDataContractSerializer reqDcs;

            reqDcs = new AnyCheckRequestDataContractSerializer("AnyCheckRequest", "http://schemas.example.org/SimpleService");

            // Build soap request message
            byte[] soapBuffer = SoapMessageBuilder.BuildSoapMessage(header, reqDcs, req);

            // Send service request
            DpwsHttpClient httpClient;

            httpClient = new DpwsHttpClient();
            DpwsSoapResponse response;

            response = httpClient.SendRequest(soapBuffer, ServiceEndpoint, false, false);

            // Process response
            AnyCheckResponseDataContractSerializer respDcs;

            respDcs = new AnyCheckResponseDataContractSerializer("AnyCheckResponse", "http://schemas.example.org/SimpleService");
            AnyCheckResponse resp;

            resp = ((AnyCheckResponse)(respDcs.ReadObject(response.Reader)));
            return(resp);
        }
        public virtual AnyCheckResponse AnyCheck(AnyCheckRequest req)
        {
            // Create request header
            String action;

            action = "http://schemas.example.org/SimpleService/AnyCheck";
            WsWsaHeader header;

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

            // Create request serializer
            AnyCheckRequestDataContractSerializer reqDcs;

            reqDcs             = new AnyCheckRequestDataContractSerializer("AnyCheckRequest", "http://schemas.example.org/SimpleService");
            request.Serializer = reqDcs;
            request.Method     = "AnyCheck";


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

            m_requestChannel.Close();

            // Process response
            AnyCheckResponseDataContractSerializer respDcs;

            respDcs = new AnyCheckResponseDataContractSerializer("AnyCheckResponse", "http://schemas.example.org/SimpleService");
            AnyCheckResponse resp;

            resp = ((AnyCheckResponse)(respDcs.ReadObject(response.Reader)));
            return(resp);
        }
 public AnyCheckResponse AnyCheck(AnyCheckRequest req)
 {
     AnyCheckResponse resp = new AnyCheckResponse();
     resp.Any = req.Any;
     resp.AnyAttr = req.AnyAttr;
     return resp;
 }
        public AnyCheckResponse AnyCheck(AnyCheckRequest req)
        {
            AnyCheckResponse resp = new AnyCheckResponse();

            resp.Any     = req.Any;
            resp.AnyAttr = req.AnyAttr;
            return(resp);
        }
Example #6
0
        public override void WriteObject(XmlWriter writer, object graph)
        {
            AnyCheckRequest AnyCheckRequestField = ((AnyCheckRequest)(graph));

            if (WriteParentElement(writer, true, true, graph))
            {
                WriteAnyAttribute(writer, AnyCheckRequestField.AnyAttr);
                WriteAnyElement(writer, AnyCheckRequestField.Any, false);
                writer.WriteEndElement();
            }
            return;
        }
 public override object ReadObject(XmlReader reader)
 {
     AnyCheckRequest AnyCheckRequestField = null;
     if (IsParentStartElement(reader, false, true))
     {
         AnyCheckRequestField = new AnyCheckRequest();
         AnyCheckRequestField.AnyAttr = ReadAnyAttribute(reader);
         reader.Read();
         AnyCheckRequestField.Any = ReadAnyElement(reader, false);
         reader.ReadEndElement();
     }
     return AnyCheckRequestField;
 }
Example #8
0
        public override object ReadObject(XmlReader reader)
        {
            AnyCheckRequest AnyCheckRequestField = null;

            if (IsParentStartElement(reader, false, true))
            {
                AnyCheckRequestField         = new AnyCheckRequest();
                AnyCheckRequestField.AnyAttr = ReadAnyAttribute(reader);
                reader.Read();
                AnyCheckRequestField.Any = ReadAnyElement(reader, false);
                reader.ReadEndElement();
            }
            return(AnyCheckRequestField);
        }
        public virtual AnyCheckResponse AnyCheck(AnyCheckRequest req)
        {

            // Create request header
            String action;
            action = "http://schemas.example.org/SimpleService/AnyCheck";
            WsWsaHeader header;
            header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null);
            WsMessage request = new WsMessage(header, req, WsPrefix.None);

            // Create request serializer
            AnyCheckRequestDataContractSerializer reqDcs;
            reqDcs = new AnyCheckRequestDataContractSerializer("AnyCheckRequest", "http://schemas.example.org/SimpleService");
            request.Serializer = reqDcs;
            request.Method = "AnyCheck";


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

            // Process response
            AnyCheckResponseDataContractSerializer respDcs;
            respDcs = new AnyCheckResponseDataContractSerializer("AnyCheckResponse", "http://schemas.example.org/SimpleService");
            AnyCheckResponse resp;
            resp = ((AnyCheckResponse)(respDcs.ReadObject(response.Reader)));
            return resp;
        }
 AnyCheckResponse ISimpleService.AnyCheck(AnyCheckRequest req)
 {
     throw new NotImplementedException();
 }