public virtual WsMessage SetFileInfo(WsMessage request)
        {
            // Build request object
            SetFileInfoDataContractSerializer reqDcs;

            reqDcs           = new SetFileInfoDataContractSerializer("SetFileInfo", "http://tempuri.org/");
            reqDcs.BodyParts = request.BodyParts;
            SetFileInfo req;

            req = ((SetFileInfo)(reqDcs.ReadObject(request.Reader)));
            request.Reader.Dispose();
            request.Reader = null;

            // Create response object
            // Call service operation to process request and return response.
            SetFileInfoResponse resp;

            resp = m_service.SetFileInfo(req);

            // Create response header
            WsWsaHeader respHeader = new WsWsaHeader("http://tempuri.org/IDataAccessService/SetFileInfoResponse", request.Header.MessageID, m_version.AnonymousUri, null, null, null);
            WsMessage   response   = new WsMessage(respHeader, resp, WsPrefix.Wsdp);

            // Create response serializer
            SetFileInfoResponseDataContractSerializer respDcs;

            respDcs             = new SetFileInfoResponseDataContractSerializer("SetFileInfoResponse", "http://tempuri.org/");
            response.Serializer = respDcs;

            // Indicate that message is Mtom encoded
            response.BodyParts = new WsMtomBodyParts();
            return(response);
        }
        public virtual SetFileInfoResponse SetFileInfo(SetFileInfo req)
        {
            // Create request header
            String action;

            action = "http://tempuri.org/IDataAccessService/SetFileInfo";
            WsWsaHeader header;

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

            // Create request serializer
            SetFileInfoDataContractSerializer reqDcs;

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


            // Indicate that this message will use Mtom encoding
            request.BodyParts = new WsMtomBodyParts();

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

            m_requestChannel.Close();

            // Process response
            SetFileInfoResponseDataContractSerializer respDcs;

            respDcs           = new SetFileInfoResponseDataContractSerializer("SetFileInfoResponse", "http://tempuri.org/");
            respDcs.BodyParts = response.BodyParts;
            SetFileInfoResponse resp;

            resp = ((SetFileInfoResponse)(respDcs.ReadObject(response.Reader)));
            response.Reader.Dispose();
            response.Reader = null;

            return(resp);
        }
예제 #3
0
        public virtual SetFileInfoResponse SetFileInfo(SetFileInfo req)
        {

            // Create request header
            String action;
            action = "http://tempuri.org/IDataAccessService/SetFileInfo";
            WsWsaHeader header;
            header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null);
            WsMessage request = new WsMessage(header, req, WsPrefix.None);

            // Create request serializer
            SetFileInfoDataContractSerializer reqDcs;
            reqDcs = new SetFileInfoDataContractSerializer("SetFileInfo", "http://tempuri.org/");
            request.Serializer = reqDcs;
            request.Method = "SetFileInfo";


            // Indicate that this message will use Mtom encoding
            request.BodyParts = new WsMtomBodyParts();

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

            // Process response
            SetFileInfoResponseDataContractSerializer respDcs;
            respDcs = new SetFileInfoResponseDataContractSerializer("SetFileInfoResponse", "http://tempuri.org/");
            respDcs.BodyParts = response.BodyParts;
            SetFileInfoResponse resp;
            resp = ((SetFileInfoResponse)(respDcs.ReadObject(response.Reader)));
            response.Reader.Dispose();
            response.Reader = null;

            return resp;
        }
예제 #4
0
        public virtual WsMessage SetFileInfo(WsMessage request)
        {
            // Build request object
            SetFileInfoDataContractSerializer reqDcs;
            reqDcs = new SetFileInfoDataContractSerializer("SetFileInfo", "http://tempuri.org/");
            reqDcs.BodyParts = request.BodyParts;
            SetFileInfo req;
            req = ((SetFileInfo)(reqDcs.ReadObject(request.Reader)));

            // Create response object
            // Call service operation to process request and return response.
            SetFileInfoResponse resp;
            resp = m_service.SetFileInfo(req);

            // Create response header
            WsWsaHeader respHeader = new WsWsaHeader("http://tempuri.org/IDataAccessService/SetFileInfoResponse", request.Header.MessageID, m_version.AnonymousUri, null, null, null);
            WsMessage response = new WsMessage(respHeader, resp, WsPrefix.Wsdp);

            // Create response serializer
            SetFileInfoResponseDataContractSerializer respDcs;
            respDcs = new SetFileInfoResponseDataContractSerializer("SetFileInfoResponse", "http://tempuri.org/");
            response.Serializer = respDcs;

            // Indicate that message is Mtom encoded
            response.BodyParts = new WsMtomBodyParts();
            return response;
        }