Пример #1
0
        public static MemoryStream DetachProtocol(MemoryStream ms, MsgProtocol mp)
        {
            if (mp == MsgProtocol.SOAP)
            {
                return(SOAPProtocol.GetSOAPBody(ms));
            }
            else if (mp == MsgProtocol.Interop)
            {
                return(ms); // There is no Header
            }

            throw new ArgumentOutOfRangeException("commInfo.MessageProtocol");
        }
Пример #2
0
        public static MemoryStream AttachProtocol(MemoryStream ms, CommunicationInformation commInfo)
        {
            if (commInfo.MessageProtocol == MsgProtocol.SOAP)
            {
                return(SOAPProtocol.CreateSoapRequest(ms, commInfo));
            }
            else if (commInfo.MessageProtocol == MsgProtocol.Interop)
            {
                return(ms); // There is no Header
            }

            throw new ArgumentOutOfRangeException("commInfo.MessageProtocol");
        }