コード例 #1
0
        public virtual WsMessage GetNestedData(WsMessage request)
        {
            // Build request object
            GetNestedDataDataContractSerializer reqDcs;

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

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

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

            resp = m_service.GetNestedData(req);

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

            // Create response serializer
            GetNestedDataResponseDataContractSerializer respDcs;

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

            // Indicate that message is Mtom encoded
            response.BodyParts = new WsMtomBodyParts();
            return(response);
        }
コード例 #2
0
        public virtual GetNestedDataResponse GetNestedData(GetNestedData req)
        {
            // Create request header
            String action;

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

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

            // Create request serializer
            GetNestedDataDataContractSerializer reqDcs;

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


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

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

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

            return(resp);
        }
コード例 #3
0
        public virtual GetNestedDataResponse GetNestedData(GetNestedData req)
        {

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

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


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

            return resp;
        }
コード例 #4
0
        public virtual WsMessage GetNestedData(WsMessage request)
        {
            // Build request object
            GetNestedDataDataContractSerializer reqDcs;
            reqDcs = new GetNestedDataDataContractSerializer("GetNestedData", "http://tempuri.org/");
            reqDcs.BodyParts = request.BodyParts;
            GetNestedData req;
            req = ((GetNestedData)(reqDcs.ReadObject(request.Reader)));

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

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

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

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