public virtual SetNestedDataResponse SetNestedData(SetNestedData req)
        {
            // Create request header
            String action;

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

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

            // Create request serializer
            SetNestedDataDataContractSerializer reqDcs;

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


            // 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
            SetNestedDataResponseDataContractSerializer respDcs;

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

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

            return(resp);
        }
示例#2
0
        public virtual SetNestedDataResponse SetNestedData(SetNestedData req)
        {

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

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


            // 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
            SetNestedDataResponseDataContractSerializer respDcs;
            respDcs = new SetNestedDataResponseDataContractSerializer("SetNestedDataResponse", "http://tempuri.org/");
            respDcs.BodyParts = response.BodyParts;
            SetNestedDataResponse resp;
            resp = ((SetNestedDataResponse)(respDcs.ReadObject(response.Reader)));
            response.Reader.Dispose();
            response.Reader = null;

            return resp;
        }