Esempio n. 1
0
        public virtual void OneWay(OneWay req)
        {
            // Create request header
            String action;

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

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

            // Create request serializer
            OneWayDataContractSerializer reqDcs;

            reqDcs = new OneWayDataContractSerializer("OneWay", "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, true, false);
        }
        public virtual Byte[] OneWay(WsWsaHeader header, XmlReader reader)
        {
            // Build request object
            OneWayDataContractSerializer reqDcs;
            reqDcs = new OneWayDataContractSerializer("OneWay", "http://schemas.example.org/SimpleService");
            OneWay req;
            req = ((OneWay)(reqDcs.ReadObject(reader)));

            // Call service operation to process request.
            m_service.OneWay(req);

            // Return null response for oneway messages
            return null;
        }
Esempio n. 3
0
        public virtual Byte[] OneWay(WsWsaHeader header, XmlReader reader)
        {
            // Build request object
            OneWayDataContractSerializer reqDcs;

            reqDcs = new OneWayDataContractSerializer("OneWay", "http://schemas.example.org/SimpleService");
            OneWay req;

            req = ((OneWay)(reqDcs.ReadObject(reader)));

            // Call service operation to process request.
            m_service.OneWay(req);

            // Return null response for oneway messages
            return(null);
        }
        public virtual void OneWay(OneWay req)
        {
            // Create request header
            String action;
            action = "http://schemas.example.org/SimpleService/OneWay";
            WsWsaHeader header;
            header = new WsWsaHeader(action, null, ServiceEndpoint, null, EndpointAddress, null);

            // Create request serializer
            OneWayDataContractSerializer reqDcs;
            reqDcs = new OneWayDataContractSerializer("OneWay", "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, true, false);
        }